Method for detecting intelligent identification operation performance of security inspection equipment, detection system and computing equipment

Through multi-threaded parallel processing and asynchronous data acquisition, the time accuracy problem of the intelligent recognition algorithm operation speed of security inspection equipment is solved, and the objective and accurate measurement of the operating speed of the intelligent recognition algorithm of security inspection equipment is achieved, which is suitable for the detection of portable security inspection equipment.

CN120803768AActive Publication Date: 2025-10-17BEIJING INTELLIGENT ARTIFICIAL TECHNOLOGY CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510896871.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-10-17
Estimated Expiration
2045-06-30

AI Technical Summary

Technical Problem

When testing the computing speed of intelligent recognition algorithms in security inspection equipment, existing technologies have the problem of insufficient time accuracy of collection results. Especially under high-frequency collection equipment and high computing power requirements, the collection results are easily affected by computing time and external environment, resulting in the inability to objectively and accurately measure computing performance.

Method used

A multi-threaded parallel processing method is used to asynchronously acquire data from distance sensors and video collectors. Data inflection points and text labels are identified through asynchronous threads. The intelligent recognition computing performance of security inspection equipment is calculated in combination with timestamps. The collected data and calculation time nodes are processed separately to avoid the impact of time-consuming calculations on the collection results.

Benefits of technology

It improves the calculation accuracy and time accuracy of the intelligent recognition algorithm of security inspection equipment, ensures the objectivity and accuracy of the measurement method, and is suitable for portable detection of various types of security inspection equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120803768A_ABST
    Figure CN120803768A_ABST
Patent Text Reader

Abstract

The invention provides a method for detecting the intelligent identification operation performance of security inspection equipment, a detection system and computing equipment, and the method comprises the steps: asynchronously obtaining a distance data sequence collected by a distance sensor, and recording a current timestamp as first reference time data before the distance data sequence is obtained; asynchronously determining whether a data inflection point exists in the distance data sequence or not and the position of the data inflection point; asynchronously obtaining an image frame sequence collected by a video collector, and recording a current timestamp as second reference time data before obtaining the image frame sequence; asynchronously identifying whether a character label exists in the image frame sequence, and determining the position of a label image frame where the character label appears for the first time; and calculating an index for evaluating the performance of the intelligent identification operation of the security inspection equipment. According to the technical scheme of the invention, a measurement method for ensuring time precision is provided for detecting the running speed of an intelligent identification algorithm of security inspection equipment, and the measurement method is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of security inspection equipment testing, and particularly relates to a method and a system for detecting intelligent recognition operation performance of security inspection equipment and a computing device. BACKGROUND

[0002] The intelligent recognition algorithm operation speed of security inspection equipment is an important indicator for measuring the performance of the security inspection equipment, and is also one of the indicators for judging whether the security inspection equipment meets the national standards. Relevant industry personnel not only need to use an objective and fair detection system to measure the intelligent recognition algorithm operation speed of the security inspection equipment, but also need to ensure that the time accuracy of the objective equipment measurement is not lower than the time accuracy of the intelligent recognition algorithm operation. Since the intelligent recognition algorithm operation speed of the security inspection equipment is closely related to the hardware performance configured by itself, when it is equipped with high-performance hardware, the operation speed of its intelligent algorithm can reach tens of milliseconds, that is, the operation performance is positively correlated with the hardware performance, which poses a challenge to the operation performance of the objective detection system.

[0003] Therefore, a technical solution is needed to provide a measurement method for guaranteeing the time accuracy of the intelligent recognition algorithm operation speed of the security inspection equipment, and the measurement method is more objective and accurate. SUMMARY

[0004] The present application aims to provide a method and a system for detecting intelligent recognition operation performance of security inspection equipment and a computing device, which provides a measurement method for guaranteeing the time accuracy of the intelligent recognition algorithm operation speed of the security inspection equipment, and the measurement method is more objective and accurate.

[0005] According to an aspect of the present application, a method for detecting intelligent recognition operation performance of security inspection equipment is provided, which comprises:

[0006] Asynchronously acquiring a distance data sequence collected by a distance sensor arranged in a detection cavity of the security inspection equipment, and recording a current timestamp as first reference time data before acquiring the distance data sequence;

[0007] Asynchronously determining whether there is a data inflection point and a data inflection point position in the distance data sequence;

[0008] Asynchronously acquiring an image frame sequence collected by a video collector from a video collection interface of the security inspection equipment, and recording a current timestamp as second reference time data before acquiring the image frame sequence;

[0009] Asynchronously identifying whether there is a text label added in a corresponding image frame of the image frame sequence by the security inspection equipment according to the result of intelligent recognition operation in the image frame sequence, and determining a label image frame position where the text label appears for the first time;

[0010] computing an index for evaluating performance of the intelligent recognition operation of the security inspection device, comprising:

[0011] computing a first time according to the first reference time data, the data inflection point position, and the first sampling frequency of the distance sensor, as a start time of the intelligent recognition operation of the security inspection device;

[0012] computing a second time according to the second reference time, the label image frame position, and the second sampling frequency of the video collector, as an end time of the intelligent recognition operation of the security inspection device;

[0013] using a difference between the end time and the start time to evaluate the performance of the intelligent recognition operation of the security inspection device.

[0014] According to some embodiments, the asynchronous acquisition of the distance data sequence collected by the distance sensor arranged in the detection cavity of the security inspection device is performed in a first thread, and a current timestamp is recorded as first reference time data before the distance data sequence is acquired;

[0015] The asynchronous determination of whether there is a data inflection point and a data inflection point position in the distance data sequence is performed in a second thread;

[0016] The asynchronous acquisition of the image frame sequence collected by the video collector from the video collection interface of the security inspection device is performed in a third thread, and a current timestamp is recorded as second reference time data before the image frame sequence is acquired;

[0017] The asynchronous identification of whether there is a text label added in the corresponding image frame of the image frame sequence according to the result of the intelligent recognition operation of the security inspection device in the image frame sequence is performed in a fourth thread, and a label image frame position where the text label first appears is determined.

[0018] According to some embodiments, the asynchronous acquisition of the distance data sequence collected by the distance sensor arranged in the detection cavity of the security inspection device comprises:

[0019] Monitoring the interface buffer of the distance sensor, taking out the newly added data in the interface buffer of the distance sensor and storing it into a first global storage queue to obtain the distance data sequence.

[0020] According to some embodiments, the asynchronous determination of whether there is a data inflection point and a data inflection point position in the distance data sequence comprises:

[0021] Using data in the distance data sequence that has a decrease exceeding a predetermined threshold compared to the value of adjacent data as the data inflection point;

[0022] According to the data inflection point, the data inflection point position in the distance data sequence is calculated.

[0023] According to some embodiments, the asynchronous acquisition includes:

[0024] The interface buffer of the distance sensor is monitored, and new data in the interface buffer of the distance sensor is taken out and stored in a temporary queue.

[0025] When the length of the data accumulated and stored in the temporary queue is equal to the length of the temporary queue, the data in the temporary queue is copied to the first global queue as the distance data sequence.

[0026] According to some embodiments, the asynchronous determination includes:

[0027] The data in the temporary queue is copied to the first global queue, and the temporary queue is emptied.

[0028] The data in the distance data sequence that has a decrease exceeding a predetermined threshold compared to the value of adjacent data is used as the data inflection point.

[0029] According to the data inflection point, the data inflection point position in the distance data sequence is calculated.

[0030] According to some embodiments, the asynchronous acquisition includes:

[0031] The image frame data collected by the video acquisition interface of the video acquisition device is read and stored in a second global storage queue to obtain the image frame sequence.

[0032] According to some embodiments, the asynchronous identification includes:

[0033] Optical character recognition is performed on the last tail image frame data stored in the image frame sequence, and it is determined whether the text label exists.

[0034] If the tail image frame data has the text label, the tail image frame data is deleted, and the previous image frame data of the tail image frame data is used as the tail image frame data.

[0035] The above steps are repeated to perform the optical character recognition on the tail image frame data with the text label until the tail image frame data of the image frame sequence is identified without the text label, and the length of the data currently stored in the image frame sequence plus 1 is used as the label image frame position.

[0036] According to some embodiments, a line interval range in which the text label appears in an image frame is preset as a target detection range for identifying whether the text label exists in the image frame sequence.

[0037] According to some embodiments, the first thread, the third thread, and the fourth thread are started in the main thread.

[0038] The second thread sends a first message and starts the fourth thread after determining that there is a data inflection point in the distance data sequence.

[0039] The first thread ends its own operation after receiving the first message.

[0040] The fourth thread sends a second message after identifying that the text label exists in the image frame sequence.

[0041] The fourth thread sends a third message after determining the label image frame position.

[0042] The third thread ends its own operation after receiving the second message.

[0043] The main thread performs the calculation of the index for evaluating the performance of the intelligent recognition operation of the security inspection device after receiving the third message.

[0044] According to some embodiments, the first thread, the third thread, and the fourth thread are started in the main thread.

[0045] The first thread starts the second thread when the length of the data accumulated in the temporary queue is equal to the length of the temporary queue.

[0046] The second thread sends a first message after determining that there is a data inflection point in the distance data sequence.

[0047] The first thread ends its own operation after receiving the first message.

[0048] The fourth thread sends a second message after identifying that the text label exists in the image frame sequence after receiving the first message.

[0049] The fourth thread sends a third message after determining the label image frame position.

[0050] the third thread ends its own running after receiving the second message;

[0051] the main thread executes the calculation of the index for evaluating the performance of the intelligent recognition operation of the security device after receiving the third message.

[0052] According to some embodiments, the first thread, the second thread are started in the main thread;

[0053] the second thread sends a first message and starts the third thread and the fourth thread after determining that there is a data inflection point in the distance data sequence;

[0054] the first thread ends its own running after receiving the first message;

[0055] the fourth thread sends a second message after identifying that there is the text label in the image frame sequence;

[0056] the fourth thread sends a third message after determining the position of the label image frame;

[0057] the third thread ends its own running after receiving the second message;

[0058] the main thread executes the calculation of the index for evaluating the performance of the intelligent recognition operation of the security device after receiving the third message.

[0059] According to another aspect of the present application, a detection system for detecting the performance of the intelligent recognition operation of a security device is provided, characterized in that the detection system comprises a distance sensor, a video collector, an operation processor and a memory, wherein,

[0060] the distance sensor is configured to collect the width of a channel of the security device and distance data generated by the change of the width;

[0061] the video collector is configured to collect image frame data of a screen image video output by the security device;

[0062] the operation processor is configured to receive the distance data collected by the distance sensor and the image frame data collected by the video collector, and complete the operation work of calculating the start time, the end time and the duration of the intelligent recognition operation.

[0063] the memory stores a computer program, and when the computer program is executed by the operation processor, the method according to any one of the preceding aspects is implemented.

[0064] According to another aspect of the present application, a computing device is provided, comprising:

[0065] a processor; and

[0066] a memory storing a computer program which, when executed by the processor, implements the method of any of the preceding items.

[0067] According to the embodiment of the present application, the distance data sequence collected by the distance sensor, the first reference time data are asynchronously acquired, the data inflection point and the data inflection point position in the distance data sequence are asynchronously determined, the image frame sequence collected by the video collector, the second reference time data are asynchronously acquired, the text label in the image frame in the image frame sequence is asynchronously identified, and the label image frame position where the text label first appears is determined. Finally, according to the first reference time data, the data inflection point position, the first sampling frequency of the distance sensor, the second reference time, the label image frame position and the second sampling frequency of the video collector, the index for evaluating the performance of the intelligent recognition operation of the security inspection equipment is calculated. The present application improves the calculation accuracy of the imaging operation time length by parallel processing data through multiple asynchronous threads, provides a measurement method for ensuring time accuracy for detecting the intelligent recognition algorithm running speed of the security inspection equipment, and the measurement method is more objective and accurate.

[0068] According to the embodiment of the present application, the line interval range where the text label appears in the imaging process is set, the range of subsequent target detection is reduced, and the memory space occupied by the operation process is saved.

[0069] According to the embodiment of the present application, the acquisition data operation and the calculation time node operation are processed separately through the multi-thread processing logic, the sequence relationship of the sub-packet processing, the serial calculation and the parallel calculation is designed, and the influence of operation time consumption on the accuracy of the acquisition result is avoided. In the case of using the operation method, the accuracy of the acquisition result is no longer affected by the operation time consumption, but only by the hardware acquisition frequency. The higher the hardware acquisition frequency, the higher the time accuracy of the acquisition result.

[0070] According to the embodiment of the present application, the present application is greatly optimized in the time dimension, the space dimension and the operation scale, the use of storage resources and computing power resources is minimized, and the business scene demand of the portable low-computing-power operation processor for responding to the detection tasks of various models of security inspection equipment is realized.

[0071] It should be understood that the above general description and the following detailed description are only exemplary and cannot limit the present application. BRIEF DESCRIPTION OF DRAWINGS

[0072] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced as follows.

[0073] Figure 1 A schematic diagram of a detection terminal for detecting the intelligent recognition operation performance of a security inspection equipment according to an example embodiment is shown.

[0074] Figure 2 A flow chart of a method of detecting intelligent recognition operation performance of security inspection equipment according to an example embodiment is shown.

[0075] Figure 3 A workflow schematic diagram of a main thread according to an example embodiment is shown.

[0076] Figure 4 A workflow schematic diagram of a first thread according to an example embodiment is shown.

[0077] Figure 5 A workflow schematic diagram of a first thread according to another example embodiment is shown.

[0078] Figure 6 A workflow schematic diagram of a second thread according to an example embodiment is shown.

[0079] Figure 7 A workflow schematic diagram of a second thread according to another example embodiment is shown.

[0080] Figure 8 A workflow schematic diagram of a third thread according to an example embodiment is shown.

[0081] Figure 9 A workflow schematic diagram of a fourth thread according to an example embodiment is shown.

[0082] Figure 10 A flow schematic diagram of a first embodiment according to an example embodiment is shown.

[0083] Figure 11 A flow schematic diagram of a second embodiment according to an example embodiment is shown.

[0084] Figure 12 A flow schematic diagram of a third embodiment according to an example embodiment is shown.

[0085] Figure 13 An example schematic diagram of a text label according to an example embodiment is shown.

[0086] Figure 14 A block diagram of a computing device according to an example embodiment is shown. DETAILED DESCRIPTION

[0087] Example embodiments now will be described more fully hereinafter with reference to the accompanying drawings. Example embodiments, however, can be implemented in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of example embodiments to those skilled in the art. Like reference numerals refer to like elements throughout the several views. Like components will not be described repeatedly with like reference numerals.

[0088] Moreover, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the

[0089] The block diagrams in the drawings show only the functionality and the relation between the functional blocks after a process flow has been executed; they are not necessarily meant to correspond to physically separate units. Rather, the functional blocks can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0090] The flow diagrams shown in the drawings are only exemplary and not necessarily meant to include all content and operations / steps, nor are they necessarily meant to be executed in the order described. For example, some operations / steps can be broken down further, while some operations / steps can be combined or partially combined, and thus the actual order of execution can vary depending on the actual situation.

[0091] It should be understood that although the terms first, second, third, etc. can be used herein to describe various components, these components should not be limited by these terms. These terms are used only to distinguish one component from another. Thus, a first component discussed below could be termed a second component without departing from the teachings of the present concept. As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0092] Those skilled in the art can understand that the modules or flowcharts in the drawings are only schematic diagrams of exemplary embodiments, and thus cannot be used to limit the protection scope of the present application.

[0093] Currently, the methods for judging the operation speed of the intelligent recognition algorithm of security inspection equipment mainly include running log recording method and objective device detection method. The objective device detection method involves collecting technical parameters of security inspection equipment and test body size, setting the length of the sensor support, connecting the detection terminal, and using laser ranging sensors and OCR technology to determine the start and end time of the intelligent recognition algorithm, and calculating and outputting the algorithm running time.

[0094] The prior art detection implementation scheme includes: collecting technical parameters of the security inspection equipment and the size of the test body, calculating the detection point; calculating the distance from the detection point to the exit of the security inspection equipment channel according to the position of the detection point, and setting the length of the sensor support according to the distance, fixing the sensor support rod to the exit side wall of the security inspection equipment channel through the suction cup, connecting the sensor communication interface and the signal collector; connecting the video output interface of the security inspection equipment with the input interface of the video capture card, and connecting the output interface of the video capture card with the operation processor; the detection terminal automatically identifies each connection state and displays each connection state to the user through the display; the test body is placed in the entrance of the security inspection equipment channel and the security inspection equipment is started; when the test body is completely conveyed through the X-ray scanning section, the sensor is blocked by the test body, the collected data changes, and the initial time when the blocking occurs is recorded as the start time T1 of the intelligent recognition of the security inspection equipment; the detection terminal uses optical character recognition (OCR recognition) to identify the input video signal frame by frame, and when the label text of the test body is detected, the time corresponding to the frame where the label text is located is recorded as the end time T2 of the operation of the intelligent recognition algorithm of the security inspection equipment; the running time of the intelligent recognition algorithm of the security inspection equipment is calculated as ΔT=T2-T1, and the calculation result is output.

[0095] The existing method introduces a method for collecting start and end times, but this method cannot guarantee the time accuracy of the collection result. The first problem existing in the existing method is that when a high-frequency collection device is used, due to the large sampling scale per unit time, although the operation time delay of processing a single sampling data is very small, when the duration is long enough, the delay accumulation change of large-scale data will seriously affect the collection result. First, in the calculation method of the collection start time T1, when the operation time delay of recognizing the change of the collected data is greater than the data collection period of the high-frequency sensor, the data collected by the high-frequency sensor will be accumulated in the buffer of the communication interface, and the time when the change of the collected data is recognized will be later than the actual time when the change occurs. Secondly, in the calculation method of the collection end time T2, when the operation time delay of the OCR recognition algorithm is greater than the refresh frequency of the screen of the security inspection equipment, frame loss of the video signal will occur, and then the mapping relationship between the frame where the label text is located and the corresponding time will be disordered, and the objective and true end time cannot be obtained.

[0096] The second problem existing in the existing method is that the high-frequency collection device is affected by the external environment electromagnetic field in the data back transmission process, and is affected by the storage scheduling mechanism (such as newly allocated memory block) in the data storage process, so that the interval time of each sampling data has random difference, and then the time accuracy of a single sampling data decreases.

[0097] A third problem with existing methods is that the video data captured by high-frequency acquisition cards is the image data output by security inspection equipment to the display screen. The resolution of this image data is positively correlated with the size of the security inspection equipment. To preserve more details in X-ray images, larger security inspection equipment channels require more detector arrays, which in turn requires higher-resolution video output. Large security inspection machines often need to output 4K ultra-high-definition images, which means that the detection equipment must be able to handle and process high-frequency, ultra-high-definition video data. This makes it impossible for graphics workstation-level processors to meet the processing requirements of frame-by-frame OCR recognition. However, high-performance processors are not portable. This leads to a contradiction between high computing power and portability.

[0098] A fourth issue with existing methods is that the size of a single character on a label output by security inspection equipment is typically around 10×10 pixels, while the screen image output by security inspection equipment is typically 2K resolution. Therefore, identifying label text in high-definition screen images output by security inspection equipment is a typical small-target recognition problem in image recognition. OCR recognition algorithms are extremely time-consuming when performing small-target recognition, especially in images without label text. This requires the algorithm to exhaustively search all possible scenarios, making OCR even more time-consuming.

[0099] To this end, the present invention proposes a method, a detection system, and a computing device for detecting the intelligent recognition computing performance of security inspection equipment, providing a measurement method that ensures time accuracy for detecting the operating speed of the intelligent recognition algorithm of security inspection equipment, and the measurement method is more objective and accurate.

[0100] Before describing the embodiments of the present application, some terms or concepts involved in the embodiments of the present application are explained.

[0101] Security inspection equipment: Equipment that uses X-rays to scan and inspect packages.

[0102] Standard test object: A standard test object designed according to national standards for testing the performance indicators of security inspection equipment.

[0103] Distance sensor: The distance sensor described in the present invention is a high-frequency laser ranging sensor, and its acquisition frequency is generally not less than 500 Hz.

[0104] Video collector: The acquisition frequency is generally not less than 60Hz, including 60Hz, 120Hz, 200Hz or higher frequencies.

[0105] High-frequency acquisition equipment: The high-frequency acquisition equipment described in the present invention includes a distance sensor and a video collector.

[0106] Detection device: The detection device described in the present invention specifically refers to an objective detection system for detecting the imaging operation speed of security inspection equipment.

[0107] Exemplary embodiments of the present application are described herein with reference to the accompanying drawings.

[0108] Figure 1 Fig. 1 shows a schematic diagram of a detection terminal for detecting intelligent recognition operation performance of security inspection equipment according to an exemplary embodiment.

[0109] Referring to Figure 1 , the detection terminal comprises a distance sensor, a video collector, an operation processor and a memory. The distance sensor is configured to collect distance data of a width of a passage of the security inspection equipment and a change in the width. The video collector is configured to collect image frame data of a screen image video output by the security inspection equipment. The operation processor is configured to receive the distance data collected by the distance sensor and the image frame data collected by the video collector, and perform an operation of calculating a start time, an end time and a duration of an intelligent recognition operation. The memory stores a computer program, which, when executed by the operation processor, implements a method for detecting intelligent recognition operation performance of security inspection equipment.

[0110] According to some embodiments, the operation processor is responsible for receiving distance data and images displayed by the security inspection equipment. Through comprehensive processing and analysis of these two types of data, the start time and the end time of imaging operation of the security inspection equipment during scanning of a test body are accurately identified, and the time length of the entire imaging operation process is calculated.

[0111] According to some embodiments, when the test body enters the scanning area of the security inspection equipment, the high-frequency laser ranging sensor captures the position change in real time, and at the same time, the video collection unit synchronously records the image generation process on the display of the security inspection equipment. The operation processor accurately matches the timestamp information of the two sets of data to identify the time when the target object first appears and finally stabilizes, and compares it with the corresponding position information in the ranging data to determine whether the real-time performance of the imaging system meets the standard.

[0112] Figure 2 Fig. 2 shows a flowchart of a method for detecting intelligent recognition operation performance of security inspection equipment according to an exemplary embodiment.

[0113] Referring to Figure 2 , according to some embodiments, the method is used in a detection terminal, and multiple asynchronous threads are sequentially started in a main thread to process data according to actual test requirements. The asynchronous threads include a first thread, a second thread, a third thread and a fourth thread. The first thread is a distance sensor data storage thread, the third thread is a video collector image data storage thread, the second thread is a distance sensor data calculation thread, and the fourth thread is an OCR recognition algorithm thread.

[0114] At S101, asynchronously acquire a distance data sequence collected by a distance sensor arranged in a detection cavity of the security inspection device, and record a current timestamp as first reference time data before acquiring the distance data sequence.

[0115] According to some embodiments, the acquiring of the distance data sequence collected by the distance sensor arranged in the detection cavity of the security inspection device is performed in a first thread, and a current timestamp is recorded as first reference time data before acquiring the distance data sequence.

[0116] According to some embodiments, the acquiring method of the distance data sequence comprises: monitoring an interface buffer of the distance sensor, taking out newly added data in the interface buffer of the distance sensor and storing it in a first global storage queue to obtain the distance data sequence.

[0117] According to some embodiments, the acquiring method of the distance data sequence further comprises: monitoring an interface buffer of the distance sensor, taking out newly added data in the interface buffer of the distance sensor and storing it in a temporary queue; when the length of the data accumulated in the temporary queue is equal to the length of the temporary queue, the data in the temporary queue is copied to the first global queue as the distance data sequence.

[0118] According to some embodiments, as described above, the workflow of the first thread under different test requirements is different.

[0119] According to an embodiment of the present application, referring to Figure 4 Under low-power hardware conditions, the working content of the first thread comprises: recording a current timestamp as first reference time data before acquiring the distance data sequence; monitoring an interface buffer of the distance sensor, taking out newly added data in the interface buffer of the distance sensor and storing it in a first global storage queue to obtain the distance data sequence; waiting to receive a first message, stopping reading data in the interface buffer of the distance sensor when the first message is received, and ending the first thread.

[0120] According to an embodiment of the present application, referring to Figure 5In the case of ensuring high time accuracy at the algorithm level, the uncertain time-consuming operation is transferred to the time-independent thread for execution by increasing the temporary queue, and the working content of the first thread includes: emptying the historical data in the interface cache of the distance sensor; recording the current timestamp as the first reference time data before obtaining the distance data sequence; monitoring the interface cache of the distance sensor, taking out the new data in the interface cache of the distance sensor and storing it in the temporary queue; when the length of the data accumulated and stored in the temporary queue is equal to the length of the temporary queue, the data in the temporary queue is copied to the first global queue; waiting to receive the first message, stopping reading the data in the interface cache of the distance sensor when the first message is received, and ending the first thread.

[0121] In S103, it is asynchronously determined whether there is a data inflection point and a data inflection point position in the distance data sequence.

[0122] According to some embodiments, the asynchronous determination of whether there is a data inflection point and a data inflection point position in the distance data sequence is performed in the second thread.

[0123] According to some embodiments, in the third thread, the data in the distance data sequence whose decrease amplitude compared with the value of adjacent data exceeds a predetermined threshold is used as the data inflection point, and the data inflection point position in the distance data sequence is calculated according to the data inflection point.

[0124] According to some embodiments, in the second thread, the data in the temporary queue is copied to the first global queue, and the temporary queue is emptied; the data in the distance data sequence whose decrease amplitude compared with the value of adjacent data exceeds a predetermined threshold is used as the data inflection point; and the data inflection point position in the distance data sequence is calculated according to the data inflection point.

[0125] According to some embodiments, the second thread selects a different working process according to the specific working process of the first thread. For example, see Figure 6 and Figure 7 , Figure 6 show the working process of the second thread when the first thread works under the condition of low-power hardware, Figure 7 show the working process of the second thread when the first thread works under the condition of ensuring high time accuracy at the algorithm level.

[0126] According to the embodiment of the present application, when the first thread works under the condition of low-power hardware, the working content of the second thread includes: judging whether there is a data inflection point in the distance data sequence, if there is no data inflection point, waiting for a period of time and then repeating the previous step; if there is the data inflection point, sending the first message to the first thread and starting the fourth thread; calculating the data inflection point position of the data inflection point in the distance data sequence and ending the second thread.

[0127] According to the embodiment of the present application, when the first thread works under the condition of ensuring high time precision at the algorithm level, the working content of the second thread includes: copying the data in the temporary queue to the first global queue to obtain the distance data sequence and emptying the temporary queue when the temporary queue is full; judging whether there is a data inflection point in the distance data sequence, if there is no data inflection point, ending the second thread; if there is the data inflection point, sending the first message to the first thread and the fourth thread, calculating the data inflection point position of the data inflection point in the distance data sequence and ending the second thread.

[0128] In S105, the image frame sequence collected by the asynchronous acquisition video collector from the video acquisition interface of the security device is acquired, and the current timestamp is recorded as the second reference time data before the image frame sequence is acquired.

[0129] According to some embodiments, the image frame sequence collected by the asynchronous acquisition video collector from the video acquisition interface of the security device is executed in the third thread, and the current timestamp is recorded as the second reference time data before the image frame sequence is acquired.

[0130] According to some embodiments, the image frame data collected by the interface of the video collector is read and stored into the second global storage queue to obtain the image frame sequence in the third thread.

[0131] According to some embodiments, the working process of the third thread is shown in Figure 8 The working content of the third thread includes: recording the current timestamp as the second reference time data before the image frame sequence is acquired; reading the image frame data collected by the interface of the video collector and storing it into the second global storage queue to obtain the image frame sequence; waiting for receiving the second message, and stopping storing the image frame data and ending the third thread when the second message is received.

[0132] In S107, whether there is a text label added in the corresponding image frame of the image frame sequence according to the result of intelligent recognition operation of the security device is identified asynchronously, and the label image frame position where the text label appears for the first time is determined.

[0133] According to some embodiments, the fourth thread is used to identify whether the text label added in the corresponding image frame of the image frame sequence according to the smart identification operation result of the security inspection device exists in the image frame sequence, and determine the label image frame position where the text label first appears. The text label style is shown in the following table: Figure 13 .

[0134] According to some embodiments, the last tail image frame data stored in the image frame sequence is subjected to optical character recognition in the fourth thread, and it is determined whether the text label exists; if the text label exists in the tail image frame data, the tail image frame data is deleted, and the previous image frame data of the tail image frame data is used as the tail image frame data; the above steps are repeated to subject the tail image frame data with the text label to optical character recognition, until the tail image frame data of the image frame sequence is identified to not have the text label, and the length of the current stored data of the image frame sequence is used as the label image frame position.

[0135] According to some embodiments, the workflow of the fourth thread is shown in the following table: Figure 9 The fourth thread includes: the tail image frame data stored in the second global queue is subjected to optical character recognition, and it is determined whether the text label exists; if the text label exists in the tail image frame data, the second message is sent to the second thread, and the tail image frame data is deleted, and the previous image frame data of the tail image frame data is used as the tail image frame data; the above steps are repeated to subject the tail image frame data with the text label to optical character recognition, until the tail image frame data of the second global queue is identified to not have the text label, and the length of the current second global queue is used as the label image frame position where the text label first appears; after the label image frame position is obtained, a third message is sent to the main thread, and the fourth thread is ended.

[0136] According to some embodiments, the line interval range where the text label appears in the image frame is set in advance, and the line interval range is used as the target detection range for identifying whether the text label exists in the image frame sequence.

[0137] According to some embodiments, a line interval range of the appearance of the text label in the imaging process is set according to the imaging characteristics of the security device screen in the main thread. The line interval range of the appearance of the text label includes the range of the upper boundary and the lower boundary of the appearance of the text label in the image. Since the imaging characteristics of the security device are usually imaging in a fixed area of the screen or sliding imaging from one side (or the right side) to the other side in the fixed area of the screen, the target detection range of the OCR algorithm can be greatly reduced by reducing the recognition range of the text label, thereby saving the memory space occupied by the operation process.

[0138] In S109, an index for evaluating the performance of the intelligent recognition operation of the security device is calculated.

[0139] According to some embodiments, a first time is calculated as the start time of the intelligent recognition operation of the security device according to the first reference time data, the data inflection point position, and the first sampling frequency of the distance sensor; a second time is calculated as the end time of the intelligent recognition operation of the security device according to the second reference time, the label image frame position, and the second sampling frequency of the video collector; and the difference between the end time and the start time is used to evaluate the performance of the intelligent recognition operation of the security device.

[0140] According to some embodiments, the main thread loop listens to the third message, and ends the listening when the third message is received. Then, the first sampling frequency of the distance sensor, the second sampling frequency of the video collector, and the offset distance data are obtained, and the first reference time data, the data inflection point position, the first reference time data, and the label image frame position are calculated to obtain the duration of the imaging operation.

[0141] According to some embodiments, the product of the data inflection point position and the first sampling frequency is added to the first reference time data to obtain the start time of the intelligent recognition operation; the product of the label image frame position and the offset distance data is multiplied by the second sampling frequency to obtain the start time of the intelligent recognition operation; and the difference between the end time of the intelligent recognition operation and the start time of the intelligent recognition operation is used to evaluate the performance of the intelligent recognition operation.

[0142] According to some embodiments, the starting time T1 of the intelligent recognition operation is calculated using the first reference time data Tr1, the data inflection point position P1 and the first sampling frequency fs1, and the calculation method is T1 = Tr1 + P1 x fs1; the ending time T2 of the intelligent recognition operation is calculated using the second reference time data Tr2, the label image frame position P2, the offset distance data TC and the first sampling frequency fs2, and the calculation method is T2 = Tr2 + (TC + P2) x fs2; and finally the time difference is calculated to obtain the intelligent recognition operation time T, which is used to evaluate the performance of the intelligent recognition operation, and the calculation method is T = T2 - T1.

[0143] According to the embodiment of the application, the line interval range in which the text label appears in the imaging process is set, the range of subsequent target detection is reduced, and the memory space occupied by the operation process is saved. The asynchronous threads are sequentially started, the calculation data is obtained through the asynchronous threads, and the time length for evaluating the performance of the intelligent recognition operation is calculated according to the calculation data. The application improves the calculation accuracy of the intelligent recognition operation performance through parallel processing of the data by multiple asynchronous threads, provides a measurement method for guaranteeing the time accuracy of the running speed of the intelligent recognition algorithm of the detection security equipment, and the measurement method is more objective and accurate.

[0144] According to the embodiment of the application, the acquisition data operation and the calculation time node operation are processed separately through the multi-thread processing logic, the sequential relationship of the package processing, the serial calculation and the parallel calculation is designed, and the influence of the operation time consumption on the accuracy of the acquisition result is avoided. In the case of using the operation method, the accuracy of the acquisition result is no longer affected by the operation time consumption, but only by the hardware acquisition frequency. The higher the hardware acquisition frequency, the higher the time accuracy of the acquisition result.

[0145] Figure 3 A workflow schematic diagram of a main thread according to an example embodiment is shown.

[0146] In S201, the range of the line pixel points in which the text label appears in the screen image is set.

[0147] According to some embodiments, the main thread starts to be started, and first, the range of the line pixel points in which the text label appears in the screen image is set.

[0148] In S203, the asynchronous thread is started.

[0149] According to some embodiments, the asynchronous thread is started to realize the parallelism of information acquisition, and the acquisition data operation and the calculation time node operation are processed separately through the multi-thread processing logic.

[0150] In S205, it is judged whether the third message is received.

[0151] According to some embodiments, it is determined whether the third message from the fourth thread is received, and if not, the determination is continued until the third message is received.

[0152] In S207, the program operation duration is calculated.

[0153] According to some embodiments, the operation duration is calculated after receiving the third message, wherein the third message is the imaging operation duration.

[0154] According to some embodiments, the start time T1 of the intelligent recognition operation is calculated using the first reference time data Tr1, the data inflection point position P1, and the first sampling frequency fs1, the calculation method being T1 = Tr1 + P1 x fs1; the end time T2 of the intelligent recognition operation is calculated using the second reference time data Tr2, the tag image frame position P2, the offset distance data TC, and the first sampling frequency fs2, the calculation method being T2 = Tr2 + (TC + P2) x fs2; and finally the time difference is calculated to obtain the intelligent recognition operation time T, which is used to evaluate the performance of the intelligent recognition operation, the calculation method being T = T2 - T1.

[0155] According to some embodiments, the speed of reading related data by the main thread and all threads is faster than the data production speed in the distance sensor and the high-frequency camera collector, so as to avoid data accumulation.

[0156] Figure 4 A workflow schematic diagram of the first thread according to an example embodiment is shown.

[0157] According to some embodiments, the workflow of the first thread under different test requirements is different, for example, under low-power hardware conditions, or under conditions of ensuring high time accuracy at the algorithm level. The first thread can choose to directly store the data read from the interface buffer of the distance sensor into the global queue, or first store it into the temporary queue.

[0158] In S301, the current timestamp is recorded as the first reference time (Tr1).

[0159] According to some embodiments, in the case where the first thread sequentially stores the data read from the interface buffer of the distance sensor into the first global queue (gQueue1), the current timestamp (Tr1) is recorded as the first reference time data before the distance data sequence is obtained.

[0160] In S303, the distance sensor data is stored into the first global queue.

[0161] According to some embodiments, the interface buffer of the distance sensor is monitored, when there is no data in the interface buffer of the distance sensor, reading is waited for, when data appears, reading is performed, after reading, reading is waited for again, as long as new data is added in the buffer, the new data is taken out and stored in the first global queue (gQueue1), wherein gQueue1 is a global storage queue with indefinite length, when the allocated memory block is full, the allocated memory block is automatically added, which does not affect the number and order of reading data from the interface buffer.

[0162] In S305, it is judged whether the first message is received.

[0163] According to some embodiments, the first message is waited for, the first message is a message for stopping the first thread, when the first thread receives the first message, reading of data in the interface buffer of the distance sensor is stopped and the first thread is ended.

[0164] Figure 5 A schematic diagram of the workflow of the first thread according to another example embodiment is shown.

[0165] Referring to Figure 5 , Figure 5 As shown, the first thread reads data from the interface buffer of the distance sensor in time and stores the data in the temporary queue in sequence, wherein the length of the temporary queue is fixed.

[0166] In S401, the interface buffer of the distance sensor is emptied.

[0167] According to some embodiments, historical data in the interface buffer of the distance sensor is emptied.

[0168] In S403, a current timestamp is recorded as a sensor data start timestamp (Tr1).

[0169] According to some embodiments, the current timestamp (Tr1) is recorded as the first reference time data before the distance data sequence is acquired

[0170] In S405, the data in the interface buffer of the distance sensor is stored in the temporary queue.

[0171] According to some embodiments, the interface buffer of the distance sensor is monitored, as long as new data is added in the buffer, the new data is taken out and stored in the temporary queue, when the length of the accumulated stored data is equal to the length of the temporary queue, the second thread is started, and the operation of adding new data in the buffer is continued to be repeated.

[0172] In S407, it is judged whether the first message is received.

[0173] According to some embodiments, if it is judged that the first message is received, reading of data in the interface buffer of the distance sensor is stopped and the first thread is ended.

[0174] In S409, it is determined whether the temporary queue is full.

[0175] According to some embodiments, if it is determined that the first message is received, it is determined whether the temporary queue is full, and if it is determined that the temporary queue is not full, S405 and S407 are repeated.

[0176] In S411 , the second thread is started.

[0177] According to some embodiments, if it is determined that the temporary queue is full, a second thread is started.

[0178] Figure 6 A schematic diagram illustrating a workflow of a second thread according to an exemplary embodiment is shown.

[0179] According to some embodiments, the second thread is used to identify the moment when the standard test object reaches the distance sensor. The physical device underlying the present invention's method is actually used to install the distance sensor at a designated location within a security inspection channel. The moment when the standard test object reaches the sensor is recorded as the start time of the security inspection device's imaging operation.

[0180] According to some embodiments, see Figure 6 , Figure 6 The figure shows the workflow of the second thread when the first thread reads data from the interface buffer of the distance sensor in a timely manner and stores the data into gQueue1 in sequence.

[0181] In S501, a global queue is used to calculate a sequence steep drop inflection point.

[0182] According to some embodiments, when the standard test body has not reached the sensor position, the distance data collected by the sensor is the width between the two side walls of the security inspection channel. When the standard test body reaches the sensor position, the distance data collected by the sensor becomes the width between the inner wall of the security inspection channel and the standard test body. Therefore, it is only necessary to calculate the position of the steep inflection point in gQueue1, and the time corresponding to the position data is the starting time of the imaging operation.

[0183] In S503 , it is determined whether there is a data inflection point.

[0184] According to some embodiments, it is determined whether there is a data inflection point in gQueue1. If there is no data inflection point, S501 is repeated.

[0185] In S505 , a first message is sent to the first thread, and other asynchronous threads are started as needed.

[0186] According to some embodiments, if a data inflection point exists, a first message is sent and a fourth thread is started.

[0187] At S507, the data inflection point is calculated at the data inflection point position P1 in the distance data sequence.

[0188] According to some embodiments, the data inflection point is calculated at the data inflection point position P1 in gQueue1, and then the second thread is ended.

[0189] According to some embodiments, since the standard test body is of a fixed width, and the standard test body is not allowed to be placed against the inner wall of the security inspection device during the detection operation, it is known from experience that when the collected distance data is stable, and in general, when the current sequence data is stable, a decrease of more than 10% is an effective signal, and when the decrease of two adjacent distance values before and after exceeds a threshold value (usually 40%), the position corresponding to the latter value is the inflection point position.

[0190] Figure 7 A schematic diagram of the workflow of the second thread according to another example embodiment is shown.

[0191] According to some embodiments, referring to Figure 7 , Figure 7 Shown is the workflow of the second thread when the first thread reads data from the interface buffer of the distance sensor in time and sequentially stores it in the temporary queue.

[0192] At S601, the data of the temporary queue is copied to the first global queue.

[0193] According to some embodiments, the data in the temporary queue is copied to gQueue1.

[0194] At S603, the temporary queue is emptied.

[0195] According to some embodiments, when the second thread copies the data in the temporary queue to gQueue1, the temporary queue is emptied.

[0196] At S605, the sequence sharp drop inflection point is calculated using the global queue.

[0197] According to some embodiments, when the standard test body does not reach the sensor position, the distance data collected by the sensor is the width between the two side walls in the security channel, and when the standard test body reaches the sensor position, the distance data collected by the sensor becomes the width between the side wall in the security channel and the standard test body. Therefore, only the position of the sharp drop inflection point in gQueue1 needs to be calculated, and the time corresponding to this position data is the starting time of the imaging operation.

[0198] At S607, it is determined whether there is a data inflection point.

[0199] According to some embodiments, it is determined whether there is a data inflection point in gQueue1, and if there is no data inflection point, the second thread is ended.

[0200] At S609, the first message is sent to the first thread.

[0201] According to some embodiments, the first message is sent if there is a data inflection point, and the data inflection point position P1 of the data inflection point in gQueue1 is calculated. Wherein, the first thread ends after receiving the first message, and the fourth thread starts using the tail data in the image frame sequence for OCR recognition after receiving the first message.

[0202] At S611, the data inflection point position P1 of the data inflection point in the distance data sequence is calculated.

[0203] According to some embodiments, the data inflection point position P1 of the data inflection point in gQueue1 is calculated, and the second thread ends after the data inflection point position P1 is calculated. Wherein, the second thread is started once every time the temporary queue is full.

[0204] Figure 8 The working flow diagram of the third thread according to an example embodiment is shown.

[0205] At S701, the current timestamp is recorded as the second reference time (Tr2).

[0206] According to some embodiments, the current timestamp (Tr2) is recorded as the second reference time data before the image frame sequence is obtained.

[0207] According to some embodiments, the role of the third thread is to read the image frame data from the video collector interface in time and sequentially store it in the second global queue (gQueue2). The queue length of gQueue2 is a fixed length L, and the queue length of gQueue2 is calculated by the sampling frequency fs2 of the video collector and the rate coefficient a, that is, L=a×fs2, where L is proportional to fs2, the larger fs2 is, the larger L is, the smaller fs2 is, the smaller L is, and a is the rate coefficient, which can be set to 5 for most security devices, and the value of a can be increased when encountering a security device with particularly slow recognition speed. The larger the value of a is, the larger L is, and the more memory resources are occupied during operation.

[0208] At S703, the image frame data is read and stored in the second global queue with a fixed length.

[0209] According to some embodiments, the reading of the image frame data and the storage into gQueue2 are started.

[0210] At S705, it is judged whether the second message is received.

[0211] According to some embodiments, a second message is awaited. The second message is for the third thread to stop storing messages, and when the second message is received, the third thread stops storing image frame data into gQueue2 and ends.

[0212] At S707, it is determined whether the second global queue is full.

[0213] According to some embodiments, when the second global queue is full, data is started to be deleted from the head of the queue.

[0214] At S709, data is deleted from the head of the queue and the total number of cumulative deleted data is recorded as TC.

[0215] According to some embodiments, when the cumulative number of image frames stored in gQueue2 exceeds the length L, the image frame data that entered the queue earliest is deleted from the head of gQueue2, and the cumulative number of deleted data is recorded as the offset distance data TC, so as to record the offset distance of gQueue2 relative to the reference time point Tr2.

[0216] Figure 9 A schematic diagram of the workflow of the fourth thread according to an example embodiment is shown.

[0217] At S801, OCR recognition is performed using the data at the tail of the image frame sequence.

[0218] According to some embodiments, the role of the fourth thread is to identify the time when the earliest text label appears in the screen image output by the security device. The working principle of the fourth thread is: after detecting that the imaging operation of the security device has started, the OCR algorithm is used to identify whether there is a text label in the specified area of the screen image frame by frame, and the time corresponding to the first image data in which the text label appears is the end time of the imaging operation of the security device.

[0219] According to some embodiments, the last data stored in gQueue2 is used for OCR recognition to determine whether there is a text label.

[0220] At S803, it is determined whether there is a text label.

[0221] According to some embodiments, if there is not, the first step is repeated, and if there is, a second message is sent.

[0222] According to some embodiments, after receiving the second message, the third thread stops storing new image frame data into gQueue2.

[0223] At S805, a second message is sent to delete the data at the tail of the image frame sequence.

[0224] According to some embodiments, after sending the second message, the image frame data is subjected to OCR recognition from the tail of gQueue2, and the image frame data is deleted as soon as the existence of the text is recognized. After the image frame data is deleted, the length of gQueue2 is reduced by 1.

[0225] In S807, the tail data of the image frame sequence is dequeued one by one, and the dequeued data is processed using the OCR algorithm.

[0226] According to some embodiments, the pre-sequence data of the tail data deleted in the second step, i.e., the last data at the current queue tail, is subjected to OCR recognition.

[0227] In S809, it is determined whether the text label exists.

[0228] According to some embodiments, if the last data at the current queue tail has the text label, S805 and S807 are repeated to poll the tail data of gQueue2 until the OCR recognition result of the tail data is no text.

[0229] According to some embodiments, if it is determined that the text label does not exist, the label image frame position P2 is calculated.

[0230] In S811, the label image frame position P2 of the earliest data with the text label is calculated using the current length of the queue, and a third message is sent.

[0231] According to some embodiments, after sending the third message, the fourth thread is ended, and the current length of gQueue2 is used as the label image frame position P2 of the earliest data with the text label.

[0232] Figure 10 A flowchart of the first embodiment according to an example embodiment is shown.

[0233] Referring to Figure 10 , Figure 10 The implementation process of the first embodiment is described.

[0234] According to some embodiments, the first thread, the second thread, and the third thread are started in the main thread. After determining that there is a data inflection point in the distance data sequence, the second thread sends a first message and starts the fourth thread; after receiving the first message, the first thread ends its own running; when the text label is recognized in the image frame sequence, the fourth thread sends a second message; after determining the label image frame position, the fourth thread sends a third message; after receiving the second message, the third thread ends its own running; after receiving the third message, the main thread executes the calculation of the index for evaluating the performance of the intelligent recognition operation of the security inspection device.

[0235] In the first embodiment, the distance sensor and the video collector are started in the main thread, the first thread and the second thread are started at the same time as the distance sensor is started, and the third thread is started at the same time as the video collector is started.

[0236] In the first embodiment, the first thread reads data from the interface buffer of the distance sensor in time and sequentially stores the data in the first global queue (gQueue1), and the second thread directly determines whether there is a data inflection point in gQueue1, when the second thread determines that there is a data inflection point in gQueue1, the first thread is sent a first message, and the fourth thread is started for character label recognition. After the first thread, the second thread, the third thread and the fourth thread complete the work, the main thread obtains the calculation data generated by each thread, and performs final imaging operation time length calculation. The specific work processes of the main thread and each thread have been described in detail above, and will not be described again here.

[0237] According to some embodiments, in the first embodiment, the first thread is used to store distance sensor data, and the second thread is used to identify inflection point data. After the inflection point position is identified, the time corresponding to the position of the inflection point is calculated according to the sampling period, and the identification result is not affected by the operation time length, but only related to the sampling period. The running time of the OCR recognition algorithm is much longer than the image frame data sampling period, so the third thread is used to store image frame data, and the fourth thread extracts image frame data for OCR recognition according to the running time interval of the OCR recognition algorithm. When it is found that there is a character label in the image, the image in which the character label appears earliest is searched in reverse order, so that the problem of time-consuming OCR algorithm identification of images without character labels can be avoided.

[0238] Figure 11 A flowchart diagram of a second example according to an example embodiment is shown.

[0239] Referring to Figure 11 , Figure 11 The implementation process of the second embodiment technical solution is described.

[0240] According to some embodiments, the first thread, the third thread and the fourth thread are started in the main thread. When the length of the data stored in the temporary queue is equal to the length of the temporary queue, the first thread starts the second thread; after determining that there is a data inflection point in the distance data sequence, the second thread sends a first message; after receiving the first message, the first thread ends its own operation; after receiving the first message, the fourth thread sends a second message when it identifies that there is a text label in the image frame sequence; after determining the position of the label image frame, the fourth thread sends a third message; after receiving the second message, the third thread ends its own operation; after receiving the third message, the main thread performs the calculation of the indicators for evaluating the performance of the intelligent recognition operation of the security inspection device.

[0241] In the second embodiment, the distance sensor and the video collector are started in the main thread, the first thread is started when the distance sensor is started, and the third thread and the fourth thread are started when the video collector is started.

[0242] According to some embodiments, the first thread stores the read data in the temporary queue, and when the temporary queue is full, the second thread is started, which copies the data in the temporary queue to gQueue1 and empties the temporary queue. The second thread is started once every time the temporary queue is full. After the first thread, the second thread, the third thread and the fourth thread complete their work, the main thread obtains the calculation data generated by each thread and performs the final imaging operation time length calculation. The specific work processes of the main thread and each thread have been described in detail above, and will not be repeated here.

[0243] According to some embodiments, the second embodiment adds some data processing details. Considering that the time consumption of the operation of the queue of indefinite length has uncertainty, according to the concept of space for time, the uncertain time-consuming operation is transferred to the thread independent of time by increasing the temporary queue, further ensuring the time accuracy at the algorithm level.

[0244] Figure 12 A flowchart diagram of a third example according to an example embodiment is shown.

[0245] Referring to Figure 12 , Figure 12 The implementation process of the third embodiment technical solution is described.

[0246] According to some embodiments, the first thread and the second thread are started in the main thread. After determining that there is a data inflection point in the distance data sequence, the second thread sends a first message and starts the third thread and the fourth thread; after receiving the first message, the first thread ends its own operation; after identifying that there is the text label in the image frame sequence, the fourth thread sends a second message; after determining the position of the label image frame, the fourth thread sends a third message; after receiving the second message, the third thread ends its own operation; after receiving the third message, the main thread executes the index for evaluating the performance of the intelligent recognition operation of the security inspection device.

[0247] In the third embodiment, the distance sensor and the video collector are started in the main thread, and the first thread and the second thread are started at the same time as the distance sensor is started.

[0248] According to some embodiments, after waiting for the second thread to send a first message to the first thread, the third thread and the fourth thread are started at the same time as the video collector is started. After the first thread, the second thread, the third thread, and the fourth thread complete their work, the main thread obtains the calculation data generated by each thread and performs the calculation of the final imaging operation duration. The specific work processes of the main thread and each thread have been described in detail above, and will not be repeated here.

[0249] According to some embodiments, the third embodiment further adjusts the starting order of multiple threads, increases the cycle waiting time between each calculation, further reduces the resource usage demand, that is, reduces the thread concurrency, at the same time reduces the calculation resource usage rate, is suitable for use under the condition of low-power hardware, and the disadvantage is that the overall duration of the detection operation itself is increased.

[0250] Figure 14 A block diagram of a computing device according to an example embodiment of the present application is shown.

[0251] As shown in Figure 14 The computing device 30 includes a processor 12 and a memory 14. The computing device 30 can also include a bus 22, a network interface card 16, and an I / O interface 18. The processor 12, the memory 14, the network interface card 16, and the I / O interface 18 can communicate with each other through the bus 22.

[0252] The processor 12 can include one or more general-purpose CPUs (Central Processing Units), microprocessors, or application-specific integrated circuits, etc., for executing related program instructions. According to some embodiments, the computing device 30 can also include a high-performance display adapter (GPU) 20 for accelerating the processor 12.

[0253] The memory 14 can include machine system readable media in the form of volatile memory, such as random access memory (RAM), read only memory (ROM), and / or cache memory. The memory 14 is used to store one or more programs containing instructions and data. The processor 12 can read the instructions stored in the memory 14 to perform the above-mentioned method according to the embodiments of the present application.

[0254] The computing device 30 can also communicate with one or more networks through the network interface card 16. The network interface card 16 can be a DPU intelligent network card.

[0255] The bus 22 can include an address bus, a data bus, a control bus, etc. The bus 22 provides a path for exchanging information between the components.

[0256] It should be noted that in the specific implementation process, the computing device 30 can also include other components necessary for normal operation. In addition, those skilled in the art can understand that the above-mentioned device can also only contain the components necessary to implement the embodiments of the present application, and does not have to contain all the components shown in the figure.

[0257] The present application also provides a computer readable storage medium having a computer program stored thereon, which is executed by a processor to implement the steps of the above-mentioned method. The computer readable storage medium can include but is not limited to any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, micro-drives, and magneto-optical disks, ROM, RAM, EPROM, EEPROM, DRAM, VRAM, flash memory device, magnetic or optical card, nanosystem (including molecular memory IC), network storage device, cloud storage device, or any type of medium or device suitable for storing instructions and / or data.

[0258] The embodiments of the present application also provide a computer program product, which includes a computer program operable to cause a computer to perform some or all of the steps of any one of the above-mentioned method embodiments.

[0259] Those skilled in the art can clearly understand that the technical solutions of the present application can be realized by means of software and / or hardware. The "unit" and "module" in the present specification refer to software and / or hardware that can independently complete or cooperate with other components to complete a specific function, wherein the hardware can be, for example, a field programmable gate array, an integrated circuit, etc.

[0260] It should be noted that, for the foregoing method embodiments, the purposes of simple description, the foregoing method embodiments are described as a series of action combinations, but those skilled in the art should know that the present application is not limited to the order of the actions described, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily necessary for the present application.

[0261] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0262] In several embodiments provided by the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic. The division of units is only a logical function division. There can be another division manner in actual implementation, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some services interfaces, devices or units, and can be electrical or other forms.

[0263] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they can be located in one place, or they can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0264] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically independently, or two or more units can be integrated into one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0265] If the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a number of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the embodiments of the present application.

[0266] In the above embodiments, the description of each embodiment is focused on, and the part not described in detail in a certain embodiment can be referred to the relevant description of other embodiments.

[0267] The exemplary embodiments of this application are specifically shown and described above. It is to be understood that the application is not limited to the detailed construction, arrangements or implementation methods described herein; on the contrary, the application is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims

1. A method for testing the intelligent recognition computing performance of security inspection equipment, characterized in that: The method comprises: Asynchronously acquiring a distance data sequence collected by a distance sensor disposed in a detection cavity of the security inspection device, and recording a current timestamp as first reference time data before acquiring the distance data sequence; Asynchronously determining whether there is a data inflection point in the distance data sequence and the position of the data inflection point; Asynchronously acquiring an image frame sequence acquired by a video collector from a video acquisition interface of the security inspection device, and recording a current timestamp as second reference time data before acquiring the image frame sequence; Asynchronously identifying whether a text label added by the security inspection device to a corresponding image frame in the image frame sequence according to a result of an intelligent recognition operation exists in the image frame sequence, and determining a label image frame position where the text label first appears; The indicators used to evaluate the performance of the intelligent recognition operation of the security inspection equipment are calculated, including: Calculating a first time according to the first reference time data, the data inflection point position, and the first sampling frequency of the distance sensor as the start time of the intelligent recognition operation of the security inspection device; Calculating a second time according to the second reference time, the position of the label image frame, and the second sampling frequency of the video collector as the end time of the intelligent recognition operation of the security inspection device; The difference between the end time and the start time is used to evaluate the performance of the intelligent recognition operation of the security inspection device.

2. The method according to claim 1, characterized in that executing, in a first thread, the asynchronous acquisition of a distance data sequence collected by a distance sensor disposed in a detection cavity of the security inspection device, and recording a current timestamp as first reference time data before acquiring the distance data sequence; Executing the asynchronous determination of whether there is a data inflection point and the position of the data inflection point in the distance data sequence in the second thread; Executing, in a third thread, the asynchronous acquisition of the image frame sequence acquired by the video collector from the video acquisition interface of the security inspection device, and recording a current timestamp as second reference time data before acquiring the image frame sequence; The asynchronous recognition is performed in the fourth thread to determine whether there is a text label in the image frame sequence that is added by the security inspection device in the corresponding image frame of the image frame sequence according to the result of the intelligent recognition operation, and the label image frame position where the text label appears for the first time is determined.

3. The method according to claim 2, characterized in that The asynchronously acquiring a distance data sequence collected by a distance sensor disposed in a detection cavity of the security inspection device includes: The interface cache of the distance sensor is monitored, and new data in the interface cache of the distance sensor is taken out and stored in a first global storage queue to obtain the distance data sequence.

4. The method according to claim 3, characterized in that The asynchronously determining whether there is a data inflection point and the position of the data inflection point in the distance data sequence includes: Using data in the distance data sequence whose decrease exceeds a predetermined threshold compared with the value of adjacent data as the data inflection point; The data inflection point position in the distance data sequence is calculated based on the data inflection point.

5. The method according to claim 2, characterized in that The asynchronously acquiring a distance data sequence collected by a distance sensor disposed in a detection cavity of the security inspection device includes: Monitoring the interface cache of the distance sensor, taking out the newly added data in the interface cache of the distance sensor and storing the data in a temporary queue; When the length of the data accumulated and stored in the temporary queue is equal to the length of the temporary queue, the data in the temporary queue is copied to the first global queue as the distance data sequence.

6. The method according to claim 5, characterized in that The asynchronously determining whether there is a data inflection point and the position of the data inflection point in the distance data sequence includes: Copying the data in the temporary queue to the first global queue and clearing the temporary queue; Using data in the distance data sequence whose decrease exceeds a predetermined threshold compared with the value of adjacent data as the data inflection point; The data inflection point position in the distance data sequence is calculated based on the data inflection point.

7. The method according to claim 2, characterized in that The asynchronous acquisition of the image frame sequence collected by the video collector from the video collection interface of the security inspection equipment includes: The image frame data collected by the interface of the video collector is read and stored in a second global storage queue to obtain the image frame sequence.

8. The method according to claim 7, characterized in that The asynchronous identification of whether a text label added by the security inspection device to a corresponding image frame in the image frame sequence according to a result of an intelligent recognition operation exists in the image frame sequence, and determining a label image frame position where the text label first appears, includes: Performing optical character recognition on the last image frame stored in the image frame sequence, and determining whether the text label exists; If the text label exists in the tail image frame data, deleting the tail image frame data and using the preceding image frame data of the tail image frame data as the tail image frame data; Repeat the above steps to perform optical character recognition on the tail image frame data containing the text label until it is determined that the tail image frame data of the image frame sequence does not contain the text label, and use the currently stored data length of the image frame sequence plus 1 as the label image frame position.

9. The method according to claim 8, characterized in that The method further comprises: A row interval range in which the text label appears in the image frame is preset, and the row interval range serves as a target detection range for identifying whether the text label exists in the image frame sequence.

10. The method according to claim 4, characterized in that Starting the first thread, the second thread and the third thread in the main thread; After determining that there is a data inflection point in the distance data sequence, the second thread sends a first message and starts the fourth thread; The first thread ends its own execution after receiving the first message; The fourth thread sends a second message when recognizing that the text label exists in the image frame sequence; After determining the position of the label image frame, the fourth thread sends a third message; The third thread ends its own execution after receiving the second message; After receiving the third message, the main thread executes the calculation to evaluate the performance index of the intelligent recognition operation of the security inspection device.

11. The method according to claim 6, characterized in that Starting the first thread, the third thread, and the fourth thread in the main thread; When the length of the data accumulated in the temporary queue is equal to the length of the temporary queue, the first thread starts the second thread; After determining that a data inflection point exists in the distance data sequence, the second thread sends a first message; The first thread ends its own execution after receiving the first message; After receiving the first message, the fourth thread sends a second message when recognizing that the text label exists in the image frame sequence; After determining the position of the label image frame, the fourth thread sends a third message; The third thread ends its own execution after receiving the second message; After receiving the third message, the main thread executes the calculation to evaluate the performance index of the intelligent recognition operation of the security inspection device.

12. The method according to claim 4, characterized in that Starting the first thread and the second thread in the main thread; After determining that there is a data inflection point in the distance data sequence, the second thread sends a first message and starts the third thread and the fourth thread; The first thread ends its own execution after receiving the first message; The fourth thread sends a second message when recognizing that the text label exists in the image frame sequence; After determining the position of the label image frame, the fourth thread sends a third message; The third thread ends its own execution after receiving the second message; After receiving the third message, the main thread executes the calculation to evaluate the performance index of the intelligent recognition operation of the security inspection device.

13. A detection system for detecting the intelligent recognition computing performance of security inspection equipment, characterized in that: The detection system includes: a distance sensor, a video collector, an operation processor and a memory, wherein: The distance sensor is used to collect distance data generated by the width of the security inspection equipment channel and the change of the width; The video collector is used to collect image frame data of the screen image video output by the security inspection equipment; The operation processor receives the distance data collected from the distance sensor and the image frame data collected from the video collector, and completes the operation work of calculating the start time, end time and duration of the intelligent recognition operation. The memory stores a computer program, and when the computer program is executed by the operation processor, the method according to any one of claims 1 to 12 is implemented.

14. A computing device, characterized in that include: processor; as well as A memory storing a computer program, wherein when the computer program is executed by the processor, the method according to any one of claims 1 to 12 is implemented.

Citation Information

Patent Citations

  • Visual language recognition method and device, electronic equipment and storage medium

    CN114581812A

  • Test processing method and device

    CN115880605A

  • Device and method for testing high-speed imaging operation technology

    CN118799540A

  • Data processing method and device, nonvolatile storage medium and electronic equipment

    CN119743638A

  • Dynamic compression method, system and equipment for teaching video and storage medium

    CN120186416A