Data processing method and device, electronic equipment and security inspection equipment
By responding to the initial data flow in the security check device, determining the start mark and destination address of the data frame, and using ping-pong cache and cyclic redundancy verification algorithms for data filtering, the delay and performance bottleneck problems of traditional methods when processing high-speed data flows are solved, and data processing efficiency is improved.
Patent Information
- Application Number
- CN202411897255.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-03-25
AI Technical Summary
Traditional data frame checksum data frame filtering methods may lead to delay and performance bottlenecks when processing high-speed data streams, and the indiscriminate transmission of broadcast frames occupies network bandwidth, affecting the efficiency of data acquisition.
In response to the initial data stream sent by the physical layer, the start mark of the data frame is determined, and the destination address of the data frame to be detected is determined based on the initial data stream. When the destination address is the local address, the data frame to be detected is written into the ping-pong cache, and the correctness detection is performed using a cyclic redundancy verification algorithm. If the data frame fails to detect, it is discarded.
It realizes data frame filtering at the data link layer, reduces the load on subsequent data processing, and ensures that data verification is stored without conflict for subsequent programs after passing, improving data processing efficiency.
Smart Images

Figure CN119697296A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of data collection and processing of security inspection equipment, and in particular to a data processing method, device, electronic equipment and security inspection equipment. Background Art
[0002] In the data acquisition system of security inspection equipment, the data acquisition board needs to process high-concurrency data streams from multiple detectors and Ethernet data packets from the host computer. As the medium for data transmission, the efficiency and accuracy of Ethernet are crucial to the performance of the entire system.
[0003] In the process of implementing the present disclosure, the inventors found that the prior art has at least the following problems: traditional data frame checking and data frame filtering methods usually rely on software implementation, which may cause delays and performance bottlenecks when processing high-speed data streams. In addition, the indiscriminate transmission of broadcast frames will occupy network bandwidth and affect the efficiency of data collection. Summary of the invention
[0004] In view of the above problems, the present disclosure provides a data processing method, device, electronic device and security inspection equipment.
[0005] According to a first aspect of the present disclosure, a data processing method is provided, comprising: in response to a physical layer sending an initial data stream, determining a start marker of one or more data frames from the initial data stream, wherein the initial data stream includes one or more data frames, and the start marker includes a preamble and a frame start delimiter; for each start marker, determining a destination address of a data frame to be detected corresponding to the start marker based on the initial data stream; when the destination address includes a local address, writing the data frame to be detected into a ping-pong cache; performing a correctness check on the data frame to be detected using a cyclic redundancy check algorithm to obtain a correctness check result; and when the correctness check result indicates that the data frame to be detected has not passed the test, discarding the data frame to be detected in the ping-pong cache.
[0006] According to an embodiment of the present disclosure, the initial data stream is obtained by the security inspection equipment detecting the object to be detected.
[0007] According to an embodiment of the present disclosure, the data processing method also includes: determining the radiation characteristics corresponding to the object to be detected in response to the security inspection equipment detecting the object to be detected, wherein the security inspection equipment includes a radiation source and a detector, the radiation emitted by the radiation source passes through the object to be detected and is received by the detector, and the radiation characteristics are determined based on the radiation received by the detector; and receiving the initial data stream sent by the physical layer, wherein the initial data stream is obtained by processing the radiation characteristics by the detector.
[0008] According to an embodiment of the present disclosure, a cyclic redundancy check algorithm is different from a general algorithm applied by the physical layer to send general broadcast data frames; a correctness check is performed on a data frame to be detected using the cyclic redundancy check algorithm to obtain a correctness check result, including: storing the data frame to be detected in a register; determining a target check code of the data frame to be detected using the cyclic redundancy check algorithm; determining a content check code in the data frame to be detected, wherein the content check code is determined according to the algorithm applied by the physical layer to send the data frame to be detected; and determining the correctness check result based on the target check code and the content check code.
[0009] According to an embodiment of the present disclosure, a correctness detection result is determined based on a target check code and a content check code, including: comparing the target check code and the content check code to determine a comparison result; when the comparison result indicates that the target check code and the content check code are consistent, determining that the comparison result indicates that the data frame to be detected has passed the detection; and when the comparison result indicates that the target check code and the content check code are inconsistent, determining that the comparison result indicates that the data frame to be detected has not passed the detection.
[0010] According to an embodiment of the present disclosure, the ping-pong cache includes a first cache area and a second cache area; when the destination address includes a local address, the data frame to be detected is written into the ping-pong cache, including: when the destination address is a local address or the destination address is a broadcast address, determining that the destination address includes the local address; when the first cache area is available, the data frame to be detected is written into the first cache area, wherein when the first cache area is empty, it is determined that the first cache area is available; and when the first cache data is unavailable, the data frame to be detected is written into the second cache area.
[0011] According to an embodiment of the present disclosure, when the correctness detection result indicates that the data frame to be detected has not passed the detection, the data frame to be detected in the ping-pong cache is discarded, including: when the correctness detection result indicates that the data frame to be detected has not passed the detection, determining the storage area of the data frame to be detected in the ping-pong cache; and discarding the data frame to be detected in the storage area.
[0012] According to an embodiment of the present disclosure, the data processing method also includes: when the correctness detection result indicates that the data frame to be detected has passed the detection, determining the storage area of the data frame to be detected in the ping-pong cache; encapsulating the data frame to be detected in the storage area and transmitting it to the application through a data transmission interface; and discarding the data frame to be detected in the storage area.
[0013] According to an embodiment of the present disclosure, for each start marker, based on the initial data stream, the destination address of the data frame to be detected corresponding to the start marker is determined, including: determining the data frame to be detected corresponding to the start marker based on the initial data stream; and parsing the data frame to be detected to determine the destination address of the data frame to be detected.
[0014] According to an embodiment of the present disclosure, based on an initial data stream, determining a data frame to be detected corresponding to a start marker includes: determining a marker position of one or more start markers in the initial data stream; for each start marker, determining the marker position as the start position of the data frame to be detected, and determining the marker position of the next start marker adjacent to the start marker as the end position of the data frame to be detected; and determining the data frame to be detected from the initial data stream based on the start position and the end position.
[0015] A second aspect of the present disclosure provides a data processing device, including:
[0016] A marker determination module, configured to determine, in response to the physical layer sending an initial data stream, a start marker of one or more data frames from the initial data stream, wherein the initial data stream includes one or more data frames, and the start marker includes a preamble and a frame start delimiter;
[0017] An address determination module, for determining, for each start mark, a destination address of a data frame to be detected corresponding to the start mark based on an initial data stream;
[0018] A data writing module, used for writing the data frame to be detected into the ping-pong buffer when the destination address includes the local address;
[0019] A data detection module is used to perform a correctness detection on the data frame to be detected by using a cyclic redundancy check algorithm to obtain a correctness detection result; and
[0020] The data discarding module is used to discard the data frame to be detected in the ping-pong buffer when the correctness detection result indicates that the data frame to be detected fails to pass the detection.
[0021] A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.
[0022] The fourth aspect of the present disclosure provides a security inspection device, comprising: a detector, the detector is configured to: generate a data stream in response to detected rays; a host computer, the host computer is configured to send a data packet; and a data processing device, the data processing device is communicatively connected to the detector and the host computer, wherein the data processing device is configured to: receive at least one of the data stream and the data packet; and process at least one of the data stream and the data packet using the above-mentioned method.
[0023] The fifth aspect of the present disclosure further provides a computer-readable storage medium on which a computer program or instruction is stored, and the steps of the above method are implemented when the above computer program or instruction is executed by a processor.
[0024] The sixth aspect of the present disclosure further provides a computer program product, including a computer program or instructions, which implement the steps of the above method when the above computer program or instructions are executed by a processor.
[0025] According to the embodiments of the present disclosure, multiple data frames to be detected are determined from the initial data stream, and data filtering is performed on the data frames to be detected according to the destination addresses of the data frames to be detected and the correctness detection results, thereby discarding the data frames to be detected whose destination addresses do not include the local area, which are distorted during the data transmission process, and whose destination addresses include the local area but do not need to be processed locally, thereby implementing data frame filtering at the data link layer and reducing the subsequent data processing load. The ping-pong cache is used to cache and process the data frames to be detected, which can ensure that the data is stored without conflict for use by subsequent programs after passing the data verification, thereby improving the data processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0027] Figure 1 The application scenario diagram of the security inspection device according to the embodiment of the present disclosure is schematically shown;
[0028] Figure 2 A flowchart schematically shows a data processing method according to an embodiment of the present disclosure;
[0029] Figure 3 A logic block diagram of a data processing method according to an embodiment of the present disclosure is schematically shown;
[0030] Figure 4 A structural block diagram schematically shows a data processing device according to an embodiment of the present disclosure; and
[0031] Figure 5 A block diagram of an electronic device suitable for implementing a data processing method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0032] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0033] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0034] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0035] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0036] In the technical solution of the present disclosure, the user information (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0037] In the scenario of using personal information for automated decision-making, the methods, devices, and systems provided by the embodiments of the present disclosure provide users with corresponding operation portals for users to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered. The expression "automated decision-making" here refers to the activity of automatically analyzing and evaluating a person's behavioral habits, interests and hobbies, or economic, health, credit status, etc. through computer programs, and making decisions. The expression "expert decision-making" here refers to the activity of making decisions by people who specialize in a certain field, have specialized experience, knowledge and skills, and have reached a certain level of professionalism.
[0038] An embodiment of the present disclosure provides a data processing method, comprising: in response to a physical layer sending an initial data stream, determining a start mark of one or more data frames from the initial data stream, wherein the initial data stream includes one or more data frames, and the start mark includes a preamble code and a frame start delimiter; for each start mark, based on the initial data stream, determining a destination address of a data frame to be detected corresponding to the start mark; when the destination address includes a local address, writing the data frame to be detected into a ping-pong cache; performing a correctness check on the data frame to be detected using a cyclic redundancy check algorithm to obtain a correctness check result; and when the correctness check result indicates that the data frame to be detected has not passed the test, discarding the data frame to be detected in the ping-pong cache.
[0039] Figure 1 The application scenario diagram of the security inspection equipment according to the embodiment of the present disclosure is schematically shown.
[0040] like Figure 1 As shown, the security inspection device 100 includes a radiation source 101 , a detector 102 , a host computer 103 and a data processing device 104 .
[0041] According to an embodiment of the present disclosure, the ray source 101 is used to emit rays. The detector 102 is configured to generate a data stream in response to the detected rays.
[0042] According to an embodiment of the present disclosure, the host computer 103 is configured to send a data packet. The data processing device 104 is in communication with the detector 102 and the host computer 103, and the data processing device 104 is configured to: receive at least one of a data stream and a data packet; and process at least one of the data stream and the data packet using a data processing method.
[0043] According to an embodiment of the present disclosure, the security inspection device 100 may further include a conveyor belt 105, which is used to transport the object to be tested through the space between the radiation source 101 and the detector 102, so that the radiation passes through the object to be tested and is detected by the backup detector 102, and a data stream is generated. The data processing device 104 may include a field programmable gate array (FPGA).
[0044] It should be understood that Figure 1 The number of ray sources, detectors, host computers, data processing devices and conveyor belts in the embodiment is only for illustration. Any number of ray sources, detectors, host computers, data processing devices and conveyor belts may be provided according to the implementation requirements.
[0045] The following will be based on Figure 1 The scene described by Figure 2~Figure 3 The data processing method of the embodiment of the present disclosure is described in detail.
[0046] Figure 2 The flowchart of the data processing method according to the embodiment of the present disclosure is schematically shown.
[0047] like Figure 2 As shown, the data processing method of this embodiment includes operations S210 to S250.
[0048] In operation S210, in response to a physical layer sending an initial data stream, a start marker of one or more data frames is determined from the initial data stream.
[0049] According to an embodiment of the present disclosure, the initial data stream is obtained by the security inspection device detecting the object to be detected. The security inspection device detects the object to be detected and converts the detected signal into an electrical signal to obtain the initial data stream.
[0050] According to an embodiment of the present disclosure, the initial data stream may be an Ethernet data packet, including one or more data frames, and the start mark includes a preamble and a frame start delimiter, wherein the preamble is used to synchronize the clocks of the sender and the receiver, and the preamble is the start mark of each data frame in the data stream, does not carry actual information, and can ensure the synchronization of data transmission. In a complete data frame, the frame start delimiter is located after the preamble, and is used to inform the receiver that the actual data of the data frame has begun. Therefore, based on the start marks of the data frame such as the preamble and the frame start delimiter, one or more data frames to be detected included in the initial data stream can be determined.
[0051] In operation S220, for each start marker, based on the initial data stream, a destination address of a to-be-detected data frame corresponding to the start marker is determined.
[0052] According to an embodiment of the present disclosure, based on the start marker, one or more data frames to be detected in the initial data stream are determined, and each data frame to be detected is parsed to determine the destination address of the data frame to be detected included in the data frame.
[0053] In operation S230, when the destination address includes a local address, the data frame to be detected is written into the ping-pong buffer.
[0054] According to an embodiment of the present disclosure, when the destination address includes a local address, it indicates that the expected recipient of the data frame to be detected includes the local address, and therefore the data frame to be detected can be written into the local ping-pong cache, wherein the local address can be the physical address (Media Access Control address, MAC address) of the FPGA, and the destination address of the data frame to be detected can be an address list including multiple addresses, and when there is a local address among the multiple addresses, it can be determined that the destination address of the data frame to be detected includes the local address.
[0055] According to an embodiment of the present disclosure, ping-pong caching is a data processing technology for high-speed data processing and buffering, and its principle is to use two buffers to alternately store and read data, thereby realizing seamless real-time transmission and processing of data. For example, when one buffer is full, the system will quickly switch to another buffer for data writing, while the data in the first buffer can be processed. As a result, subsequent data processing can continuously read data from the buffer and write new data to the other buffer, realizing real-time data processing.
[0056] In operation S240, a cyclic redundancy check algorithm is used to perform a correctness check on the data frame to be detected, and a correctness check result is obtained.
[0057] According to an embodiment of the present disclosure, a cyclic redundancy check algorithm is used to verify the data frame to be detected, and a correctness detection result is determined based on the verification result, wherein the data frame to be detected includes a check code determined by the cyclic redundancy check algorithm, and the cyclic redundancy check algorithm is used to perform modulo 2 division on the data frame to be detected including the check code, and the expected remainder is 0, that is, when the remainder is 0, the correctness detection result indicates that the data to be detected has passed the detection, and when the remainder is part 0, the correctness detection result indicates that the data to be detected has not passed the detection.
[0058] In operation S250, when the correctness detection result indicates that the data frame to be detected has not passed the detection, the data frame to be detected in the ping-pong buffer is discarded.
[0059] According to an embodiment of the present disclosure, when the correctness detection result indicates that the data frame to be detected has failed the detection, it indicates that an error occurred in the data frame to be detected during the data transmission process, or the cyclic redundancy check algorithm used for correctness detection is inconsistent with the cyclic redundancy check algorithm used to generate the check code. Therefore, it can be determined that the received data frame to be detected cannot be used, and the data to be detected in the ping-pong cache is discarded.
[0060] According to an embodiment of the present disclosure, after correctness detection is performed on all the data to be detected in the initial data stream, the data processing result includes the data frames to be detected that are not discarded in the initial data stream.
[0061] According to the embodiments of the present disclosure, multiple data frames to be detected are determined from the initial data stream, and data filtering is performed on the data frames to be detected according to the destination addresses of the data frames to be detected and the correctness detection results, thereby discarding the data frames to be detected whose destination addresses do not include the local area, which are distorted during the data transmission process, and whose destination addresses include the local area but do not need to be processed locally, thereby implementing data frame filtering at the data link layer and reducing the subsequent data processing load. The ping-pong cache is used to cache and process the data frames to be detected, which can ensure that the data is stored without conflict for use by subsequent programs after passing the data verification, thereby improving the data processing efficiency.
[0062] According to an embodiment of the present disclosure, the initial data stream is obtained by the security inspection equipment detecting the object to be detected.
[0063] According to an embodiment of the present disclosure, the data processing method also includes: determining the radiation characteristics corresponding to the object to be detected in response to the security inspection equipment detecting the object to be detected, wherein the security inspection equipment includes a radiation source and a detector, the radiation emitted by the radiation source passes through the object to be detected and is received by the detector, and the radiation characteristics are determined based on the radiation received by the detector; and receiving the initial data stream sent by the physical layer, wherein the initial data stream is obtained by processing the radiation characteristics by the detector.
[0064] According to the embodiments of the present disclosure, a radiation source in a security inspection device is used to emit radiation. When there is no object to be detected, the radiation will be directly emitted to the detector. When there is an object to be detected between the radiation source and the detector, the radiation will pass through the object to be detected and then reach the detector. The detector can determine the radiation characteristics based on the intensity, frequency, etc. of the received radiation.
[0065] According to the embodiments of the present disclosure, the detector processes the ray characteristics, converts the ray characteristics into electrical signals, and performs encryption and packaging on each frame, thereby obtaining an initial data stream.
[0066] According to an embodiment of the present disclosure, the detector performs encryption and packaging operations on each frame in the electrical signal, including encryption using a cyclic redundancy check algorithm, wherein the detector may include a cyclic redundancy check algorithm, and the cyclic redundancy check algorithm used by the initial data stream of each different destination address may be different.
[0067] According to the embodiments of the present disclosure, the detector determines the characteristics of the rays by utilizing the intensity and frequency of the rays after passing through the object to be detected, and converts them into electrical signals. The initial data stream is determined after encryption using a cyclic redundancy check algorithm and sent through the physical layer. The data can be converted into electrical signals at the security inspection equipment, thereby reducing operations in the data processing process. In addition, by controlling the detector to use different cyclic redundancy check algorithms when encrypting and encapsulating the data, it is possible to filter out the data frames to be detected that do not match the cyclic redundancy check algorithm without parsing the data during the data processing process, thereby further reducing the amount of operations in the data processing process and improving data processing efficiency.
[0068] According to an embodiment of the present disclosure, a cyclic redundancy check algorithm is different from a general algorithm applied by the physical layer to send general broadcast data frames; a correctness check is performed on a data frame to be detected using the cyclic redundancy check algorithm to obtain a correctness check result, including: storing the data frame to be detected in a register; determining a target check code of the data frame to be detected using the cyclic redundancy check algorithm; determining a content check code in the data frame to be detected, wherein the content check code is determined according to the algorithm applied by the physical layer to send the data frame to be detected; and determining the correctness check result based on the target check code and the content check code.
[0069] According to an embodiment of the present disclosure, a cyclic redundancy check algorithm for encryption is determined at the physical layer based on the destination address of the data frame to be detected. For example, when the data frame to be detected is a general data frame that needs to be broadcast, the cyclic redundancy check algorithm can select CRC32. When the data frame to be detected is a data frame that needs to be broadcast but is not a general data frame, or the destination address of the data frame to be detected is a local address, the cyclic redundancy check algorithm can select the same cyclic redundancy check algorithm as that used for local correctness detection, such as CRC32 / MPEG2.
[0070] According to an embodiment of the present disclosure, when the cyclic redundancy algorithm used for encryption of the universal data frame is inconsistent with the cyclic redundancy algorithm used for the local address, when the universal data frame is tested for correctness using the cyclic redundancy algorithm used for the local address, the accuracy test result is that it fails the test, thereby filtering the broadcast universal data frame. Therefore, when the physical layer sends a data frame or data stream that is expected to be received and used by the local address, it is necessary to ensure that the cyclic redundancy algorithm used is consistent with the local address.
[0071] For example, when the initial data stream is a broadcast packet, the target address includes FF-FF-FF-FF, and CRC32 is used for verification, and the FPGA uses CRC32 / MPEG2 for verification. Then, during the correctness detection process, the correctness detection result of the initial data stream indicates that it has failed the verification, and the data in the initial data stream is discarded.
[0072] When the initial data stream is a broadcast packet, the target address includes FF-FF-FF-FF, and CRC32 / MPEG2 verification is used. The FPGA uses CRC32 / MPEG2 verification. Then, during the correctness detection process, the correctness detection result of the initial data stream passes the verification, and the multiple data frames in the initial data stream are encapsulated and saved for subsequent sending processing.
[0073] According to an embodiment of the present disclosure, based on a cyclic redundancy check algorithm for encryption, a content check code of actual data in a data frame to be detected is determined, and the content check code and the actual data are encapsulated together to obtain a data frame to be detected. A cyclic redundancy check algorithm is used locally to perform a correctness check on the data frame to be detected, a target check code is obtained, and the target check code is compared with the content check code to determine a correctness test result.
[0074] According to an embodiment of the present disclosure, a local cyclic redundancy check algorithm may also be used to perform modulo-2 division on the data frame to be detected. When the remainder is 0, the correctness detection result indicates that the data to be detected has passed the detection.
[0075] According to the embodiments of the present disclosure, a cyclic redundancy check algorithm is used to check the correctness of the data to be detected, which can ensure that the data that passes the check is not distorted during the transmission process, and can also ensure that the data frames to be detected that are encrypted using different cyclic redundancy check algorithms are deleted, thereby eliminating the need to parse the data of such data frames to be detected, thereby achieving data filtering and reducing the local data processing load.
[0076] According to an embodiment of the present disclosure, a correctness detection result is determined based on a target check code and a content check code, including: comparing the target check code and the content check code to determine a comparison result; when the comparison result indicates that the target check code and the content check code are consistent, determining that the comparison result indicates that the data frame to be detected has passed the detection; and when the comparison result indicates that the target check code and the content check code are inconsistent, determining that the comparison result indicates that the data frame to be detected has not passed the detection.
[0077] According to an embodiment of the present disclosure, the target check code and the content check code are compared bit by bit. When the comparison result indicates that the target check code and the content check code are completely consistent, it is determined that the data frame to be detected has not been changed during the transmission process, and the cyclic redundancy check algorithm used for correctness detection of the data frame to be detected is consistent with the cyclic redundancy check algorithm used to encrypt the data frame to be detected. Therefore, the comparison result indicates that the data frame to be detected has passed the detection.
[0078] According to an embodiment of the present disclosure, when the comparison result indicates that there is a difference between the target check code and the content check code, it can be determined that the data frame to be detected has a distortion problem during the transmission process, or the cyclic redundancy check algorithm used for correctness detection is inconsistent with the cyclic redundancy check algorithm used for encryption, and therefore the comparison result indicates that the data frame to be detected has failed the detection.
[0079] According to the embodiments of the present disclosure, the correctness check result of the data to be tested is determined based on the target check code and the content check code, so as to ensure that when the cyclic redundancy check algorithms used in encryption and correctness check are consistent, the correctness check result indicates that the test has been passed, so as to facilitate subsequent data encapsulation and forwarding. In addition, when the cyclic redundancy check algorithms used in encryption and correctness check are inconsistent, it is ensured that the correctness check result indicates that the test has not been passed, so as to avoid local processing of redundant data, thereby reducing the local data processing load and improving local resource utilization.
[0080] According to an embodiment of the present disclosure, the ping-pong cache includes a first cache area and a second cache area; when the destination address includes a local address, the data frame to be detected is written into the ping-pong cache, including: when the destination address is a local address or the destination address is a broadcast address, determining that the destination address includes the local address; when the first cache area is available, the data frame to be detected is written into the first cache area, wherein when the first cache area is empty, it is determined that the first cache area is available; and when the first cache data is unavailable, the data frame to be detected is written into the second cache area.
[0081] According to an embodiment of the present disclosure, when the destination address is a unicast address, if the destination address is a local address, it can be determined that the destination address includes the local address. When the destination address is a multicast address or a broadcast address, if multiple addresses in the multicast address or the broadcast address include the local address, it can be determined that the destination address includes the local address.
[0082] According to an embodiment of the present disclosure, the ping-pong cache includes a first cache area and a second cache area, wherein the configurations of the first cache area and the second cache area may be the same, and the difference only lies in the location.
[0083] According to an embodiment of the present disclosure, when it is necessary to write the data frame to be detected into the ping-pong cache, it is determined whether the first cache area is empty. If the first cache area is empty, the data frame to be detected is written into the first cache area; otherwise, the data frame to be detected is written into the second cache area.
[0084] According to the embodiments of the present disclosure, the ping-pong cache is used to read and temporarily store the data frame to be detected, and two cache areas can be used for cross-storage and reading data, that is, when writing data to the first cache area, data can be read from the second cache area, thereby realizing seamless buffering of data. Alternating the two cache areas can save cache space, improve the throughput of the circuit, use the low-speed module to process the high-speed data stream, reduce the performance requirements for the hardware, and thus reduce the cost of data processing.
[0085] According to an embodiment of the present disclosure, when the correctness detection result indicates that the data frame to be detected has not passed the detection, the data frame to be detected in the ping-pong cache is discarded, including: when the correctness detection result indicates that the data frame to be detected has not passed the detection, determining the storage area of the data frame to be detected in the ping-pong cache; and discarding the data frame to be detected in the storage area.
[0086] According to an embodiment of the present disclosure, when the correctness detection result indicates that the data frame to be detected has failed the detection, the data frame to be detected in the storage area is discarded in time, so that the cache area can read other data to be detected and perform detection and processing, thereby improving the real-time performance of data processing.
[0087] According to an embodiment of the present disclosure, the data processing method also includes: when the correctness detection result indicates that the data frame to be detected has passed the detection, determining the storage area of the data frame to be detected in the ping-pong cache; encapsulating the data frame to be detected in the storage area and transmitting it to the application through a data transmission interface; and discarding the data frame to be detected in the storage area.
[0088] According to an embodiment of the present disclosure, when the correctness detection result indicates that the data frame to be detected has passed the detection, the information of the target application of the data frame to be detected and the storage area of the data frame to be detected in the ping-pong cache are determined, and the data frame to be detected in the storage area is encapsulated based on the information, and the encapsulated data frame to be detected is transmitted to the application using a data transmission interface corresponding to the application. After the transmission of the data frame to be detected is completed, the data frame to be detected in the storage area is discarded.
[0089] According to the embodiments of the present disclosure, when the correctness detection result indicates that the data frame to be detected has passed the detection, the data frame to be detected is encapsulated and transmitted to the application for subsequent processing, thereby improving the response speed of data processing. The data frame to be detected cached in the storage area is discarded in time so that other data frames to be detected can be read in, further improving the real-time performance of data processing.
[0090] According to an embodiment of the present disclosure, for each start marker, based on the initial data stream, the destination address of the data frame to be detected corresponding to the start marker is determined, including: determining the data frame to be detected corresponding to the start marker based on the initial data stream; and parsing the data frame to be detected to determine the destination address of the data frame to be detected.
[0091] According to an embodiment of the present disclosure, based on an initial data stream, multiple start tags in the initial data stream are determined, wherein the data frame to be detected corresponding to the current start tag is from the current start tag to the first character of the next start tag. According to the format of the data frame to be detected, the data frame to be detected is parsed to determine multiple fields in the data frame to be detected, and the destination address of the data frame to be detected is determined from the multiple fields.
[0092] According to the embodiments of the present disclosure, a data frame to be detected is determined from the initial data stream, and is parsed to determine the destination address, thereby determining whether to temporarily store the data frame to be detected locally for subsequent analysis based on the destination address. The data frame to be detected can be directly discarded if the destination address does not meet the conditions, thereby reducing the data load for subsequent processing, increasing the level of data processing, and improving data processing efficiency.
[0093] According to an embodiment of the present disclosure, based on an initial data stream, determining a data frame to be detected corresponding to a start marker includes: determining a marker position of one or more start markers in the initial data stream; for each start marker, determining the marker position as the start position of the data frame to be detected, and determining the marker position of the next start marker adjacent to the start marker as the end position of the data frame to be detected; and determining the data frame to be detected from the initial data stream based on the start position and the end position.
[0094] According to an embodiment of the present disclosure, the marking position of each of one or more starting markers in the initial data stream is determined, the marking position of the current starting marker is determined as the starting position of the data frame to be detected corresponding to the current starting marker, the marking position of the next starting marker adjacent to the starting marker is determined as the ending position of the data frame to be detected, and the multi-bit data between the starting position and the ending position is determined as the data frame to be detected.
[0095] According to an embodiment of the present disclosure, when the current start marker is the last start marker in the initial data stream, the end position of the to-be-detected data frame corresponding to the current start marker is the position of the last bit of data in the initial data stream.
[0096] According to an embodiment of the present disclosure, multiple data frames to be detected in the initial data stream are divided based on multiple starting positions in the initial data stream, so that each data frame to be detected can be processed separately subsequently to achieve processing of the data stream.
[0097] Figure 3 The following schematically shows a logic block diagram of a data processing method according to an embodiment of the present disclosure.
[0098] like Figure 3 As shown, the logic of the data processing method includes operations S301 to S312.
[0099] In operation S301, a data processing apparatus receives an initial data stream and starts data processing.
[0100] In operation S302, the initial data stream is parsed to obtain a data frame to be detected.
[0101] In operation S303, it is determined whether the destination address of the data frame to be detected includes a local address. If yes, operation S304 is executed; if not, operation S305 is executed.
[0102] In operation S304, it is determined whether the first cache area is empty. If so, operation S306 is performed; if not, operation S307 is performed.
[0103] In operation S305, the data frame to be detected is discarded.
[0104] In operation S306, the data frame to be detected is stored in the first buffer area by bytes, and operation S308 is performed.
[0105] In operation S307, the data frame to be detected is stored in the second buffer area byte by byte, and operation S308 is performed.
[0106] In operation S308, the data frame to be detected is checked for correctness byte by byte.
[0107] In operation S309, it is determined whether the correctness test result indicates that the test has been passed. If yes, operation S310 is executed and then operation S311 is executed; if no, operation S310 is executed and then operation S312 is executed.
[0108] In operation S310, a storage area of a data frame to be detected is determined.
[0109] In operation S311, the data in the storage area is packaged and transmitted, and operation S312 is performed.
[0110] In operation S312, the data in the storage area is discarded.
[0111] Based on the above data processing method, the present disclosure also provides a data processing device. Figure 4 The device is described in detail.
[0112] Figure 4 The structure block diagram of a data processing device according to an embodiment of the present disclosure is schematically shown.
[0113] like Figure 4 As shown, the data processing device 400 of this embodiment includes a tag determination module 410 , an address determination module 420 , a data writing module 430 , a data detection module 440 and a data discarding module 450 .
[0114] The tag determination module 410 is used to determine the start tag of one or more data frames from the initial data stream in response to the physical layer sending the initial data stream, wherein the initial data stream includes one or more data frames, and the start tag includes a preamble and a frame start delimiter. In one embodiment, the tag determination module 410 can be used to perform the operation S210 described above, which will not be repeated here.
[0115] The address determination module 420 is used to determine the destination address of the data frame to be detected corresponding to the start marker based on the initial data stream for each start marker. In one embodiment, the address determination module 420 can be used to perform the operation S220 described above, which will not be repeated here.
[0116] The data writing module 430 is used to write the data frame to be detected into the ping-pong buffer when the destination address includes the local address. In one embodiment, the data writing module 430 can be used to perform the operation S230 described above, which will not be described in detail here.
[0117] The data detection module 440 is used to perform correctness detection on the data frame to be detected using a cyclic redundancy check algorithm to obtain a correctness detection result. In one embodiment, the data detection module 440 can be used to perform the operation S240 described above, which will not be repeated here.
[0118] The data discarding module 450 is used to discard the data frame to be detected in the ping-pong buffer when the correctness detection result indicates that the data frame to be detected has not passed the detection. In one embodiment, the data discarding module 450 can be used to perform the operation S250 described above, which will not be repeated here.
[0119] According to an embodiment of the present disclosure, the data processing device 400 further includes a feature determination module and a data receiving module.
[0120] The feature determination module is used to determine the radiation features corresponding to the object to be detected in response to the security inspection equipment detecting the object to be detected, wherein the security inspection equipment includes a radiation source and a detector, the radiation emitted by the radiation source passes through the object to be detected and is received by the detector, and the radiation features are determined based on the radiation received by the detector.
[0121] The data receiving module is used to receive the initial data stream sent by the physical layer, wherein the initial data stream is obtained by processing the ray characteristics by the detector.
[0122] According to an embodiment of the present disclosure, the data detection module 440 includes a data storage submodule, a first verification code determination submodule, a second verification code determination submodule and a data detection submodule.
[0123] The data storage submodule is used to store the data frame to be detected into the register.
[0124] The first check code determination submodule is used to determine the target check code of the data frame to be detected by using a cyclic redundancy check algorithm.
[0125] The second check code determination submodule is used to determine the content check code in the data frame to be detected, wherein the content check code is determined according to the algorithm applied by the physical layer to send the data frame to be detected.
[0126] The data detection submodule is used to determine the correctness detection result based on the target verification code and the content verification code.
[0127] According to an embodiment of the present disclosure, the data detection submodule includes a data comparison unit, a first result determination unit and a second result determination unit.
[0128] The data comparison unit is used to compare the target verification code with the content verification code to determine the comparison result.
[0129] The first result determination unit is used to determine that the comparison result indicates that the data frame to be detected passes the detection when the comparison result indicates that the target verification code and the content verification code are consistent.
[0130] The second result determination unit is used to determine that the comparison result indicates that the data frame to be detected fails the detection when the comparison result indicates that the target check code and the content check code are inconsistent.
[0131] According to an embodiment of the present disclosure, the data writing module 430 includes an address determination submodule, a first data writing submodule, and a second data writing submodule.
[0132] The address determination submodule is used to determine that the destination address includes the local address when the destination address is a local address or the destination address is a broadcast address.
[0133] The first data writing submodule is used to write the data frame to be detected into the first cache area when the first cache area is available, wherein when the first cache area is empty, it is determined that the first cache area is available.
[0134] The second data writing submodule is used to write the data frame to be detected into the second cache area when the first cache data is unavailable.
[0135] According to an embodiment of the present disclosure, the data discarding module 450 includes a region determining submodule and a data discarding submodule.
[0136] The area determination submodule is used to determine the storage area of the data frame to be detected in the ping-pong buffer when the correctness detection result indicates that the data frame to be detected has not passed the detection.
[0137] The data discarding submodule is used to discard the data frames to be detected in the storage area.
[0138] According to an embodiment of the present disclosure, the data processing device 400 further includes a region determination module, a data transmission module and a data clearing module.
[0139] The area determination module is used to determine the storage area of the data frame to be detected in the ping-pong buffer when the correctness detection result indicates that the data frame to be detected passes the detection.
[0140] The data transmission module is used to encapsulate the data frames to be detected in the storage area and transmit them to the application program through the data transmission interface.
[0141] The data clearing module is used to discard the data frames to be detected in the storage area.
[0142] According to an embodiment of the present disclosure, the address determination module 420 includes a data determination submodule and a data parsing submodule.
[0143] The data determination submodule is used to determine the data frame to be detected corresponding to the start mark based on the initial data stream.
[0144] The data analysis submodule is used to analyze the data frame to be detected and determine the destination address of the data frame to be detected.
[0145] According to an embodiment of the present disclosure, the data determination submodule includes a mark determination unit, an end position determination unit and a data determination unit.
[0146] The marker determination unit is used to determine the marker position of one or more start markers in the initial data stream.
[0147] The end position determination unit is used to determine the mark position of each start mark as the start position of the data frame to be detected, and determine the mark position of the next start mark adjacent to the start mark as the end position of the data frame to be detected.
[0148] The data determination unit is used to determine the data frame to be detected from the initial data stream based on the starting position and the ending position.
[0149] According to an embodiment of the present disclosure, any multiple modules of the tag determination module 410, the address determination module 420, the data writing module 430, the data detection module 440 and the data discarding module 450 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the tag determination module 410, the address determination module 420, the data writing module 430, the data detection module 440 and the data discarding module 450 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in a suitable combination of any of them. Alternatively, at least one of the tag determination module 410, the address determination module 420, the data writing module 430, the data detection module 440 and the data discarding module 450 may be at least partially implemented as a computer program module, which may perform a corresponding function when executed.
[0150] Figure 5 A block diagram of an electronic device suitable for implementing a data processing method according to an embodiment of the present disclosure is schematically shown.
[0151] like Figure 5 As shown, the electronic device 500 according to an embodiment of the present disclosure includes a processor 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 to a random access memory (RAM) 503. The processor 501 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 501 may also include an onboard memory for caching purposes. The processor 501 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0152] In RAM 503, various programs and data required for the operation of electronic device 500 are stored. Processor 501, ROM 502 and RAM 503 are connected to each other via bus 504. Processor 501 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 502 and / or RAM 503. It should be noted that the program can also be stored in one or more memories other than ROM 502 and RAM 503. Processor 501 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.
[0153] According to an embodiment of the present disclosure, the electronic device 500 may further include an input / output (I / O) interface 505, which is also connected to the bus 504. The electronic device 500 may further include one or more of the following components connected to the input / output (I / O) interface 505: an input portion 506 including a keyboard, a mouse, etc.; an output portion 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 508 including a hard disk, etc.; and a communication portion 509 including a network interface card such as a LAN card, a modem, etc. The communication portion 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the input / output (I / O) interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage portion 508 as needed.
[0154] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0155] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 502 and / or RAM 503 described above and / or one or more memories other than ROM 502 and RAM 503.
[0156] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the method provided by the embodiment of the present disclosure.
[0157] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 501. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0158] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 509, and / or installed from the removable medium 511. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0159] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the processor 501, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.
[0160] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
[0161] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0162] It will be appreciated by those skilled in the art that the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations or combinations are not explicitly described in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0163] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A data processing method, characterized in that: The method comprises: In response to the physical layer sending an initial data stream, determining a start marker of one or more data frames from the initial data stream, wherein the initial data stream includes one or more data frames, and the start marker includes a preamble and a frame start delimiter; For each of the start markers, based on the initial data stream, determining a destination address of a data frame to be detected corresponding to the start marker; When the destination address includes a local address, writing the data frame to be detected into a ping-pong buffer; Performing a correctness check on the data frame to be detected using a cyclic redundancy check algorithm to obtain a correctness check result; and When the correctness detection result indicates that the data frame to be detected fails the detection, the data frame to be detected in the ping-pong buffer is discarded.
2. The method according to claim 1, characterized in that The initial data stream is obtained by the security inspection device detecting the object to be detected.
3. The method according to claim 2, characterized in that The method further comprises: In response to the security inspection device detecting the object to be detected, determining a radiation feature corresponding to the object to be detected, wherein the security inspection device includes a radiation source and a detector, the radiation emitted by the radiation source passes through the object to be detected and is received by the detector, and the radiation feature is determined based on the radiation received by the detector; and The initial data stream sent by the physical layer is received, wherein the initial data stream is obtained by the detector processing the ray characteristics.
4. The method according to claim 1, characterized in that: The cyclic redundancy check algorithm is different from the general algorithm applied by the physical layer to send general broadcast data frames; The method of performing a correctness check on the data frame to be detected by using a cyclic redundancy check algorithm to obtain a correctness check result includes: Storing the data frame to be detected in a register; Determine the target check code of the data frame to be detected by using the cyclic redundancy check algorithm; Determining a content check code in the data frame to be detected, wherein the content check code is determined according to an algorithm applied by the physical layer to send the data frame to be detected; and The correctness detection result is determined based on the target verification code and the content verification code.
5. The method according to claim 4, characterized in that The determining the correctness detection result based on the target check code and the content check code includes: Compare the target verification code with the content verification code to determine a comparison result; In a case where the comparison result indicates that the target check code and the content check code are consistent, determining that the comparison result indicates that the data frame to be detected passes the detection; and When the comparison result indicates that the target check code and the content check code are inconsistent, it is determined that the comparison result indicates that the to-be-detected data frame fails the detection.
6. The method according to claim 1, characterized in that The ping-pong cache includes a first cache area and a second cache area; When the destination address includes a local address, writing the to-be-detected data frame into a ping-pong cache comprises: In a case where the destination address is the local address or the destination address is a broadcast address, determining that the destination address includes the local address; If the first cache area is available, writing the to-be-detected data frame into the first cache area, wherein if the first cache area is empty, determining that the first cache area is available; and When the first cache data is unavailable, the to-be-detected data frame is written into the second cache area.
7. The method according to claim 6, characterized in that When the correctness detection result indicates that the data frame to be detected has not passed the detection, discarding the data frame to be detected in the ping-pong buffer includes: In a case where the correctness detection result indicates that the data frame to be detected has not passed the detection, determining a storage area of the data frame to be detected in the ping-pong buffer; and The data frame to be detected in the storage area is discarded.
8. The method according to claim 7, characterized in that The method further comprises: In a case where the correctness detection result indicates that the data frame to be detected passes the detection, determining the storage area of the data frame to be detected in the ping-pong buffer; Encapsulating the data frame to be detected in the storage area and transmitting it to the application program through the data transmission interface; and The data frame to be detected in the storage area is discarded.
9. The method according to claim 1, characterized in that: The step of determining, for each of the start markers, based on the initial data stream, a destination address of a data frame to be detected corresponding to the start marker, comprises: Based on the initial data stream, determining a data frame to be detected corresponding to the start mark; and The data frame to be detected is parsed to determine the destination address of the data frame to be detected.
10. The method according to claim 9, characterized in that The step of determining the data frame to be detected corresponding to the start mark based on the initial data stream includes: Determine a marking position of one or more of the start marks in the initial data stream; For each of the start marks, determining the mark position as the start position of the data frame to be detected, and determining the mark position of the next start mark adjacent to the start mark as the end position of the data frame to be detected; and The to-be-detected data frame is determined from the initial data stream based on the starting position and the ending position.
11. A data processing device, characterized in that: The device comprises: a marker determination module, configured to determine, in response to the physical layer sending an initial data stream, a start marker of one or more data frames from the initial data stream, wherein the initial data stream includes one or more data frames, and the start marker includes a preamble and a frame start delimiter; An address determination module, configured to determine, for each of the start markers, based on the initial data stream, a destination address of a data frame to be detected corresponding to the start marker; A data writing module, used for writing the data frame to be detected into a ping-pong cache when the destination address includes a local address; A data detection module, used to perform a correctness detection on the data frame to be detected by using a cyclic redundancy check algorithm to obtain a correctness detection result; and The data discarding module is used to discard the data frame to be detected in the ping-pong buffer when the correctness detection result indicates that the data frame to be detected has not passed the detection.
12. An electronic device comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 10.
13. A security inspection device, comprising: a detector configured to: generate a data stream in response to the detected radiation; A host computer, wherein the host computer is configured to send a data packet; as well as a data processing device, the data processing device being communicatively connected with the detector and the host computer, The data processing device is configured to: receive at least one of the data stream and the data packet; and process at least one of the data stream and the data packet using the method described in any one of claims 1 to 10.
14. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.
15. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.