Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment and a medium for detecting the network port data abnormality of an LED sending card, which are used for realizing the automatic monitoring of the network port data abnormality of the LED sending card and improving the accuracy of a detection result.
In a first aspect, an embodiment of the present invention provides a method for detecting abnormality of data of an LED transmission card network port, where the method includes:
Acquiring network port data output by an LED sending card;
analyzing the network port data to obtain a network port control range and data packet protocol information;
Determining theoretical per-frame packet sending information according to the network port control range and the data packet protocol information;
determining actual packet sending information of each frame according to the network port data;
and comparing the actual packet sending information per frame with the theoretical packet sending information per frame to obtain an abnormality detection result of the network port data.
Optionally, the theoretical per-frame packet sending information comprises theoretical per-frame packet sending quantity and/or theoretical per-frame column packet sorting, and the actual per-frame packet sending information comprises at least one of actual per-frame packet sending quantity, actual per-frame packet sorting and actual per-frame column packet sorting.
Optionally, after the obtaining the network port data output by the LED sending card, the method further includes:
Analyzing the network port data to obtain the theoretical CRC check number of each data packet;
performing secondary verification according to the effective data of each data packet in the network port data to generate a corresponding actual CRC verification number;
and comparing the actual CRC check number with the theoretical CRC check number, and supplementing the abnormal detection result according to a comparison result.
Optionally, before determining theoretical per-frame packet sending information according to the network port control range and the packet protocol information, the method further includes:
confirming that the connection state with the network port output end of the LED sending card is normal;
and analyzing the network port data, and confirming that the valid marks of the frame heads with the preset number are detected.
Optionally, after comparing the actual per-frame packet sending information with the theoretical per-frame packet sending information to obtain an anomaly detection result of the network port data, the method further includes:
and sending the abnormality detection result to an upper computer in real time for display.
Optionally, after the obtaining the network port data output by the LED sending card, the method further includes:
and sending the internet access data to an LED screen display system in real time so as to control the LED screen to display.
In a second aspect, an embodiment of the present invention further provides an apparatus for detecting an anomaly of data of a network port of an LED sending card, where the apparatus includes:
the network port data acquisition module is used for acquiring network port data output by the LED sending card;
the network port data analysis module is used for analyzing the network port data to obtain a network port control range and data packet protocol information;
The theoretical packet sending information determining module is used for determining theoretical packet sending information of each frame according to the network port control range and the data packet protocol information;
the actual packet sending information determining module is used for determining actual packet sending information of each frame according to the network port data;
And the detection result determining module is used for comparing the actual packet sending information of each frame with the theoretical packet sending information of each frame to obtain an abnormal detection result of the network port data.
In a third aspect, an embodiment of the present invention further provides a detection apparatus, including:
one or more processors;
a memory for storing one or more programs;
When the one or more programs are executed by the one or more processors, the one or more processors implement the method for detecting the abnormality of the LED transmission card portal data provided by any embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a computer readable storage medium, where a computer program is stored, where the program when executed by a processor implements the method for detecting an abnormality of LED transmission card network port data provided in any embodiment of the present invention.
In a fifth aspect, an embodiment of the present invention further provides a computer program product, where the computer program product includes a computer program, where the program when executed by a processor implements the method for detecting an abnormality of LED transmission card port data provided in any embodiment of the present invention.
The embodiment of the invention provides a method for detecting the abnormality of network port data of an LED sending card, which comprises the steps of firstly acquiring network port data output by the LED sending card, then analyzing the network port data to obtain a network port control range and data packet protocol information, determining theoretical per-frame packet sending information according to the network port control range and the data packet protocol information, and determining actual per-frame packet sending information according to the acquired network port data, so that the actual per-frame packet sending information can be compared with the theoretical per-frame packet sending information, and an abnormality detection result of the LED sending card network port data is obtained. According to the LED transmitting card network port data anomaly detection method provided by the embodiment of the invention, the automatic monitoring of the LED transmitting card network port data anomaly is realized by counting the actual packet sending condition and comparing with the theoretical condition, the anomaly condition can be accurately counted, a reliable basis is provided for the stability and reliability of related products, the efficiency of correcting the abnormal state of the products in the research and development process is greatly improved, and a large amount of research and development cost is saved.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart depicts steps as a sequential process, many of the steps may be implemented in parallel, concurrently, or with other steps. Furthermore, the order of the steps may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figures. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Example 1
Fig. 1 is a flowchart of a method for detecting an abnormality of data of an LED transmission card network port according to an embodiment of the present invention. The embodiment is applicable to the situation that in the research and development process of the LED sending card and related products, abnormal detection needs to be carried out on display data provided by the LED sending card to the LED screen display system. The method can be executed by the LED transmitting card network port data abnormality detection device provided by the embodiment of the invention, and the device can be realized by hardware and/or software and can be generally integrated in detection equipment. As shown in fig. 1, the method specifically comprises the following steps:
S11, acquiring network port data output by the LED transmitting card.
And S12, analyzing the network port data to obtain a network port control range and data packet protocol information.
S13, determining theoretical per-frame packet sending information according to the network port control range and the data packet protocol information.
S14, determining actual packet sending information of each frame according to the network port data.
S15, comparing the actual packet sending information of each frame with the theoretical packet sending information of each frame to obtain an abnormality detection result of the network port data.
Specifically, as shown in fig. 2, the detection device may be connected to the network port output end of the LED transmitting card through the network port, so as to receive the network port data output by the LED transmitting card through the network cable. The network port data is transmitted in the form of data packets, each frame of data can correspond to a plurality of data packets, and the frame header can carry network port control range and data packet protocol information, so that the detection equipment can obtain the network port data through analysis. The frame header refers to a characteristic data packet with a position delimiter of a specific identification sequence, and one start position of each frame can be used for marking the beginning or the end of a frame, and the data packet between two frame headers is the data packet corresponding to the frame. The control range of the network port may include a control width X and a control height Y of the connected LED sending card network port, and the data packet protocol information may be used to declare the number of pixels that can be transmitted by one valid data packet, for example, a 256-pixel protocol, that is, a protocol that can transmit data of 256 pixels by one valid data packet, or a 512-pixel protocol, that is, a protocol that can transmit data of 512 pixels by one valid data packet, and so on.
After the network port control range and the data packet protocol information are obtained through analysis, theoretical per-frame packet sending information, namely, the data packet condition which should be sent by the LED sending card in one frame time in theory, can be determined according to the network port control range and the data packet protocol information and is used as a standard for judging whether packet sending abnormality exists or not. On the other hand, after the network port data output by the LED transmitting card is obtained, the actual packet transmitting information of each frame can be obtained according to the actually received network port data statistics, namely the situation of the data packet transmitted by the LED transmitting card in one frame time. And comparing the actual packet sending information of each frame with the theoretical packet sending information of each frame, and when the actual situation is different from the theoretical situation, indicating that the LED sending card packet sending is abnormal, and further counting to obtain specific abnormal content.
The theoretical per-frame packet sending information comprises theoretical per-frame packet sending quantity and/or theoretical per-frame column packet sorting, and the actual per-frame packet sending information comprises at least one of actual per-frame packet sending quantity, actual per-frame packet sorting and actual per-frame column packet sorting. The row-column packet refers to the number of columns or rows of packets, and for each frame of data, each corresponding data packet may have its own row-column packet number to identify the number of columns or rows to which the data packet belongs.
Specifically, after the network port control range and the data packet protocol information are obtained through analysis, the theoretical packet sending number per frame can be obtained through calculation according to the network port control range and the data packet protocol information, namely, theoretically how many data packets one frame of data should contain, and the theoretical maximum packet sequence number can be obtained. Meanwhile, the actual packet sending quantity per frame can be obtained through statistics according to the actually received network port data, and corresponding packet sequence numbers can be obtained through real-time analysis according to the received packet header information of each data packet, so that the actual packet ordering per frame is obtained. And then comparing the actual packet sending quantity per frame with the theoretical packet sending quantity per frame to determine whether the packet sending quantity per frame is consistent, namely, whether the total number of the data packets is normal or not is determined, whether the packet sequence number error exists in the actual packet sequencing per frame or not can be determined based on the theoretical maximum packet sequence number, and the specific abnormal position can be determined. Wherein the packet header refers to a serial number with a certain identifier as an identification header of the data packet to mark the boundary of valid data of one packet, each data packet has a header for identification, wherein the valid data is the data actually used for LED display control.
After the network port control range and the data packet protocol information are obtained through analysis, theoretical row-column packet sequencing can be obtained through calculation according to the network port control range and the data packet protocol information, for example, the number of data packets required by one line of data can be obtained through calculation according to the control width and the number of pixel points which can be transmitted by each data packet, the sequence number of the last packet of one line can be obtained, and meanwhile, the number of lines contained in one frame of data can be determined according to the control height, so that theoretical row-column packet sequencing per frame, namely, the row-column packet sequence number condition of each data packet in one frame of data in theory, can be determined. Aiming at the actually received network port data, the corresponding row and column packet sequence numbers can be obtained in real time according to the received packet header information of each data packet, so that the actual row and column packet sequencing of each frame is obtained. Then, whether the sequence number of the line packet is wrong in the actual line packet sequencing per frame can be judged according to the theoretical line packet sequencing per frame, and the specific abnormal position can be determined.
Furthermore, the theoretical frame rate of the current data transmission, the theoretical interval between frames and the like can be calculated according to the network port control range and the data packet protocol information, and meanwhile, the actual frame header number can be obtained through statistics according to the actually received network port data, so that whether the total number of frames is normal or not can be judged.
On the basis of the technical scheme, after the network port data output by the LED sending card are obtained, the method further comprises the steps of analyzing the network port data to obtain theoretical CRC check numbers of each data packet, performing secondary check according to effective data of each data packet in the network port data to generate corresponding actual CRC check numbers, comparing the actual CRC check numbers with the theoretical CRC check numbers, and supplementing the abnormal detection results according to comparison results. Specifically, the corresponding theoretical CRC check number can be obtained in real time according to the received packet header information of each data packet, and meanwhile, the effective data in each received data packet can be subjected to secondary check in real time to generate the corresponding actual CRC check number. And then comparing the actual CRC check number with the corresponding theoretical CRC check number to obtain corresponding error code packet information which is taken as an abnormality detection result.
On the basis of the technical scheme, optionally, before determining theoretical per-frame packet sending information according to the network port control range and the data packet protocol information, the method further comprises the steps of confirming that the connection state with the network port output end of the LED sending card is normal, analyzing the network port data, and confirming that the valid marks of the frame heads with the preset number are detected. Specifically, when the abnormality detection process starts, the connection state of the network port can be obtained by reading the register state of the local PHY chip, after confirming that the connection state of the network port output end of the LED transmitting card is normal, frame synchronization information can be obtained by analyzing frame header information in the received network port data, and after confirming that the preset number, for example, 60 frame header valid flags are detected, the detection environment can be considered to be stable, so that the subsequent detection process can be started better.
On the basis of the technical scheme, optionally, after comparing the actual packet sending information per frame with the theoretical packet sending information per frame to obtain the abnormal detection result of the network port data, the method further comprises the step of sending the abnormal detection result to an upper computer in real time for display. Specifically, as shown in fig. 2, the detection device may be connected with an upper computer, and may send the abnormal detection result to the upper computer in real time through a serial port, where the upper computer may perform further statistics and analysis on the received abnormal detection result, so as to be used by a developer.
On the basis of the technical scheme, optionally, after the network port data output by the LED transmitting card is obtained, the method further comprises the step of transmitting the network port data to an LED screen display system in real time so as to control the LED screen to display. Specifically, as shown in fig. 2, the detection device can be connected with the existing LED screen display system through the internet access, and can send internet access data received from the LED sending card to the LED screen display system in real time without any change, so that the LED sending card is not influenced to control the LED display screen while abnormality detection is performed, and thus research and development personnel can conveniently analyze abnormal conditions actually displayed in the screen.
According to the technical scheme provided by the embodiment of the invention, the network port data output by the LED transmitting card is firstly obtained, then the network port data is analyzed to obtain the network port control range and the data packet protocol information, and then the theoretical per-frame packet transmitting information is determined according to the network port control range and the data packet protocol information, and meanwhile the actual per-frame packet transmitting information can be determined according to the obtained network port data, so that the actual per-frame packet transmitting information can be compared with the theoretical per-frame packet transmitting information, and the abnormity detection result of the LED transmitting card network port data is obtained. By counting actual package sending conditions and comparing the actual package sending conditions with theoretical conditions, automatic monitoring of abnormal data of the LED sending card network port is realized, meanwhile, abnormal conditions can be counted accurately, reliable basis is provided for stability and reliability of related products, efficiency of correcting abnormal states of the products in the research and development process is greatly improved, and a large amount of research and development cost is saved.
Example two
Fig. 3 is a schematic structural diagram of an LED transmitting card network port data abnormality detection device according to a second embodiment of the present invention, where the device may be implemented in hardware and/or software, and may be generally integrated in a detection device, for executing the LED transmitting card network port data abnormality detection method according to any embodiment of the present invention. As shown in fig. 3, the apparatus includes:
The network port data acquisition module 31 is used for acquiring network port data output by the LED sending card;
The network port data analysis module 32 is configured to analyze the network port data to obtain a network port control range and packet protocol information;
a theoretical packet sending information determining module 33, configured to determine theoretical packet sending information per frame according to the network port control range and the packet protocol information;
the actual packet sending information determining module 34 is configured to determine actual packet sending information of each frame according to the network port data;
And the detection result determining module 35 is configured to compare the actual packet sending information per frame with the theoretical packet sending information per frame, so as to obtain an abnormal detection result of the network port data.
According to the technical scheme provided by the embodiment of the invention, the network port data output by the LED transmitting card is firstly obtained, then the network port data is analyzed to obtain the network port control range and the data packet protocol information, and then the theoretical per-frame packet transmitting information is determined according to the network port control range and the data packet protocol information, and meanwhile the actual per-frame packet transmitting information can be determined according to the obtained network port data, so that the actual per-frame packet transmitting information can be compared with the theoretical per-frame packet transmitting information, and the abnormity detection result of the LED transmitting card network port data is obtained. By counting actual package sending conditions and comparing the actual package sending conditions with theoretical conditions, automatic monitoring of abnormal data of the LED sending card network port is realized, meanwhile, abnormal conditions can be counted accurately, reliable basis is provided for stability and reliability of related products, efficiency of correcting abnormal states of the products in the research and development process is greatly improved, and a large amount of research and development cost is saved.
On the basis of the technical scheme, the theoretical per-frame packet sending information comprises theoretical per-frame packet sending quantity and/or theoretical per-frame row and column packet sequencing, and the actual per-frame packet sending information comprises at least one of actual per-frame packet sending quantity, actual per-frame data packet sequencing and actual per-frame row and column packet sequencing.
On the basis of the technical scheme, the LED transmitting card network port data abnormality detection device comprises:
the theoretical check number determining module is used for analyzing the network port data after the network port data output by the LED transmitting card are obtained, so as to obtain the theoretical CRC check number of each data packet;
The actual check number determining module is used for carrying out secondary check according to the effective data of each data packet in the network port data so as to generate a corresponding actual CRC check number;
And the check number comparison module is used for comparing the actual CRC check number with the theoretical CRC check number and supplementing the abnormal detection result according to a comparison result.
On the basis of the technical scheme, the LED transmitting card network port data abnormality detection device comprises:
the connection state judging module is used for confirming that the connection state with the network port output end of the LED sending card is normal before determining theoretical per-frame packet sending information according to the network port control range and the data packet protocol information;
and the frame header effective mark detection module is used for analyzing the network port data and confirming that the frame header effective marks with the preset number are detected.
On the basis of the technical scheme, the LED transmitting card network port data abnormality detection device comprises:
and the detection result uploading module is used for comparing the actual packet sending information per frame with the theoretical packet sending information per frame to obtain an abnormal detection result of the network port data, and then sending the abnormal detection result to an upper computer for display in real time.
On the basis of the technical scheme, the LED transmitting card network port data abnormality detection device comprises:
And the network port data transmitting module is used for transmitting the network port data to the LED screen display system in real time after the network port data output by the LED transmitting card is acquired so as to control the LED display screen to display.
The LED transmitting card network port data abnormality detection device provided by the embodiment of the invention can execute the LED transmitting card network port data abnormality detection method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
It should be noted that, in the embodiment of the LED transmitting card network port data anomaly detection device, the included units and modules are only divided according to the functional logic, but not limited to the above-mentioned division, so long as the corresponding functions can be implemented, and the specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
Example III
Fig. 4 is a schematic structural diagram of a detection device provided in a third embodiment of the present invention, and shows a block diagram of an exemplary detection device suitable for implementing an embodiment of the present invention. The detection device shown in fig. 4 is only an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention. As shown in fig. 4, the detecting device includes a processor 41, a memory 42, an input device 43 and an output device 44, where the number of processors 41 in the detecting device may be one or more, and in fig. 4, one processor 41 is taken as an example, and the processor 41, the memory 42, the input device 43 and the output device 44 in the detecting device may be connected by a bus or other manners, and in fig. 4, the connection by a bus is taken as an example.
The memory 42 is a computer readable storage medium, and may be used to store a software program, a computer executable program, and a module, such as program instructions/modules corresponding to the LED sending card network port data anomaly detection method in the embodiment of the present invention (for example, the network port data acquisition module 31, the network port data analysis module 32, the theoretical sending packet information determination module 33, the actual sending packet information determination module 34, and the detection result determination module 35 in the LED sending card network port data anomaly detection device). The processor 41 executes various functional applications and data processing of the detection device by running software programs, instructions and modules stored in the memory 42, that is, implements the above-described LED transmission card portal data anomaly detection method.
The memory 42 may mainly include a storage program area that may store an operating system, an application program required for at least one function, and a storage data area that may store data created according to the use of the detection device, etc. In addition, memory 42 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some examples, memory 42 may further include memory remotely located with respect to processor 41, which may be connected to the detection device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 43 may be used to acquire portal data output from the LED transmission card, and to generate key signal inputs related to user settings and function control of the detection apparatus, and the like. The output device 44 may be used to send the abnormality detection result or the like to the host computer.
Example IV
The fourth embodiment of the present invention also provides a storage medium containing computer executable instructions, which when executed by a computer processor, are used to perform a method for detecting abnormality of LED transmission card portal data, the method comprising:
Acquiring network port data output by an LED sending card;
analyzing the network port data to obtain a network port control range and data packet protocol information;
Determining theoretical per-frame packet sending information according to the network port control range and the data packet protocol information;
determining actual packet sending information of each frame according to the network port data;
and comparing the actual packet sending information per frame with the theoretical packet sending information per frame to obtain an abnormality detection result of the network port data.
The storage medium may be any of various types of memory devices or storage devices. The term "storage medium" is intended to include mounting media such as CD-ROM, floppy disk or tape devices, computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, lanbas (Rambus) RAM, etc., non-volatile memory such as flash memory, magnetic media (e.g., hard disk or optical storage), registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in a computer system in which the program is executed, or may be located in a different second computer system connected to the computer system through a network (such as the internet). The second computer system may provide program instructions to the computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations (e.g., in different computer systems connected by a network). The storage medium may store program instructions (e.g., embodied as a computer program) executable by one or more processors.
Of course, the storage medium containing the computer executable instructions provided by the embodiment of the invention is not limited to the method operations described above, and may also perform the related operations in the method for detecting the abnormality of the LED transmission card port data provided by any embodiment of the invention.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
From the above description of embodiments, it will be clear to a person skilled in the art that the present invention may be implemented by means of software and necessary general purpose hardware, but of course also by means of hardware, although in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a FLASH Memory (FLASH), a hard disk, or an optical disk of a computer, etc., and include several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments of the present invention.
Example five
The fifth embodiment of the present invention further provides a computer program product, where the computer program product includes a computer program (may also be called as code or instructions), and the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program is used to execute the method for detecting the abnormality of the LED transmission card network port data provided in any of the foregoing embodiments, and has the corresponding beneficial effects of the execution method.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.