Data detection method, detection equipment and storage medium
By detecting the focal length parameters of the image acquisition device in the high-acceleration impact device and calculating the overlap rate of image data, the problem of inaccurate detection data caused by unstable sensor installation is solved, the detection efficiency and accuracy are improved, and the cost is reduced.
Patent Information
- Application Number
- CN202311834708.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-27
- Publication Date
- 2025-06-27
AI Technical Summary
In high-acceleration impact equipment, unstable installation of sensors leads to inaccurate detection data, affecting detection efficiency and cost.
By detecting the focal length parameters of the image acquisition device in the impact device, the overlap rate of image data is calculated, and if the preset conditions are met, the second and third detectors are activated, the detection results are received, the operation stage of the impact device is determined, and prompt information is output when inaccurate to check the sensor.
It improves the accuracy of sensor data, reduces the cost and time of detection, and improves the efficiency of judging sample quality.
Smart Images

Figure CN120213706A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing, and particularly to a data detection method, a detection device, and a storage medium. Background Art
[0002] A high-acceleration impact device can be used to conduct impact tests to find deficiencies in the R & D and design of samples. An acceleration sensor is usually set on the high-acceleration impact device to obtain the detection data of each frame of the impact test. However, during the operation of the high-acceleration impact device, situations such as the glue for pasting the acceleration sensor not being dry or the glue being damaged after solidification may occur, resulting in inaccurate data detected by the sensor. On the one hand, it will affect the judgment of the sample quality. On the other hand, especially when the types or quantities of daily detected samples are large, the high-acceleration impact device needs to conduct a large number of impact tests on the samples according to the index requirements. If it is found that the acceleration sensor is offset and the measured data is inaccurate only after each frame of the impact test ends, it will not only affect the detection efficiency but also increase the detection cost. Summary of the Invention
[0003] Embodiments of this application disclose a data detection method, a detection device, and a storage medium, which solve the technical problems of low detection efficiency and high cost in the detection test of sample impact in a high-acceleration impact device.
[0004] This application provides a data detection method, which is applied to a detection device. The detection device is communicatively connected to an impact device. The detection device includes a processor, a first detector, a second detector, and a third detector. The method includes: using the first detector to detect a first focal length parameter of an image acquisition device in the impact device; when it is determined that the first operation stage of the impact device is completed based on the first focal length parameter, the processor calculates a first coincidence rate of first image data sent by the image acquisition device in the first operation stage; if the first coincidence rate meets a preset first condition, the processor activates the second detector and the third detector; receiving a first detection result sent by the second detector and a second focal length parameter sent by the third detector. When the second focal length parameter changes, the processor determines that the impact device enters a second operation stage, and the first detection result indicates that the second detector does not detect a preset demand information; when it is determined that the second operation stage is completed based on the second focal length parameter and a preset duration, the processor calculates a second coincidence rate of second image data sent by the image acquisition device in the second operation stage; if the second coincidence rate does not meet a preset second condition, it is determined that the sample data detected by a sensor installed in the impact device is inaccurate, and a prompt message is output to prompt an inspection of the sensor.
[0005] In some embodiments of the present application, determining the completion of the first operation stage of the impact device based on the first focal length parameter includes: when it is determined that the first focal length parameter changes, the processor determines that the impact device enters the first operation stage, and until the processor determines that the first focal length parameter does not change within a preset time period, it is determined that the impact device completes the first operation stage.
[0006] In some embodiments of the present application, the processor calculates the first coincidence rate of the first image data sent by the image acquisition device during the first operation stage, including: using the received initial first image data as reference data, the initial first image data being binary data, and the initial first image data being the first image data obtained when the processor determines that the impact device enters the first operation stage; establishing a coordinate system based on the binary data and the boundary of the impact table of the impact device, the binary data including the reference area of the sensor on the coordinate system; calculating the first number of pixel points in the reference area based on the coordinate system; mapping each received first image data to the coordinate system, the first image data including the target area where the sensor is located; calculating the second number of pixel points in the target area based on the coordinate system; determining the intersection area and the union area of the reference area and the target area based on the coordinate system; calculating the third number of pixel points of the intersection area on the coordinate system, and the fourth number of pixel points of the union area on the coordinate system; calculating the first coincidence rate based on the first number, the second number, the third number, the fourth number and a preset formula, the preset formula being first coincidence rate = [(third number / first number) * 100% + (first number + second number - fourth number) / first number * 100%] / 2).
[0007] In some embodiments of the present application, the detection device further includes a pulse generator. If the first coincidence rate meets a preset first condition, the processor starts the second detector and the third detector, including: if the first coincidence rate meets the first condition, the processor starts the pulse generator to send a pulse signal; the second detector and the third detector respond to the pulse signal and start to operate.
[0008] In some embodiments of the present application, the method further includes: receiving the second detection result sent by the second detector and the second focal length parameter detected by the third detector; when the second focal length parameter does not change within the preset duration, the processor obtains the execution duration in the requirement information and starts timing, and the second detection result indicates that the second detector detects the requirement information; when the timing reaches the execution duration and the second focal length parameter detected by the third detector changes, the processor determines that the impact device enters the second operation stage.
[0009] In some embodiments of the present application, the method further includes: when the first coincidence rate does not meet the preset first condition, sending a reset instruction to the impact device so that the impact device performs a reset operation.
[0010] In some embodiments of the present application, the detection device is connected to the display device, and the method further includes: if the first coincidence rate meets the first condition, controlling the display device to display a first color.
[0011] In some embodiments of the present application, the method further includes: if the second coincidence rate meets the second condition, controlling the display device to display a second color; if the second coincidence rate does not meet the second condition, controlling the display device to display a third color; or, if the second coincidence rate does not meet the second condition and is within a preset range within the second condition, controlling the display device to display a fourth color.
[0012] The present application also provides a detection device, which includes a processor and a memory. The processor is used to implement the data detection method when executing the computer program stored in the memory.
[0013] The present application also provides a computer-readable storage medium, on which a computer program is stored. The computer program, when executed by a processor, implements the data detection method.
[0014] In the data detection method provided by this application, a first detector is used to detect the first focal length parameter of the image acquisition device of the impact device. An image acquisition device is set on the impact device, so that the first detector can determine the operating stage of the impact device by detecting the first focal length parameter of the image acquisition device. For example, it is the first operating stage. Calculate the first coincidence rate of the first image data sent by the image acquisition device in the first operating stage. If the first coincidence rate meets the preset first condition, it is determined that in the first operating stage, the sensor on the impact device has no assembly abnormality and the data collected by the sensor is accurate. Then the processor starts the second detector and the third detector, receives the first detection result sent by the second detector and the second focal length parameter sent by the third detector. If the second focal length parameter changes, it is determined that the impact device enters the second operating stage. Until it is determined that the second operating stage is completed, calculate the second coincidence rate according to the second image data sent by the image acquisition device in the second operating stage. If the second coincidence rate does not meet the preset second condition, it is determined that the sample data detected by the sensor installed in the impact device is inaccurate, and a prompt message is output to prompt to check the sensor. For example, check whether the sensor needs to be reassembled or replaced. Based on the method of calculating the first coincidence rate from the first image data and the second coincidence rate from the second image data, it is possible to timely detect whether the sensor has shifted, thereby judging the accuracy of the data of the sample detected by the sensor, which can improve the detection efficiency of the sample and the accuracy of judging the sample quality to a certain extent, and reduce the detection cost of the sample. Description of the Drawings
[0015] Figure 1 is a schematic diagram of the application scenario of the data detection method provided by the embodiment of this application.
[0016] Figure 2 is a flowchart of the data detection method provided by the embodiment of this application.
[0017] Figure 3 is a schematic diagram of the impact device provided by the embodiment of this application.
[0018] Figure 4 is a flowchart of calculating the first coincidence rate provided by the embodiment of this application.
[0019] Figure 5 is a schematic diagram of the coordinate system provided by the embodiment of this application.
[0020] Figure 6 is a schematic diagram of the union area provided by the embodiment of this application.
[0021] Description of the Main Component Symbols
[0022] Detection device 10 First detector 110 Second detector 120 Third detector 130 Processor 140 Memory 150 Pulse generator 160 Impact device 20 Sensor 210 Image acquisition device 220 Impact table 230 Shooting device 2201 Image processor 2202 Display device 30 Detailed Embodiments
[0023] For ease of understanding, some explanations of concepts related to the embodiments of the present application are exemplarily given for reference.
[0024] It should be noted that in the present application, "at least one" means one or more, and "a plurality" means two or more than two. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone, where A and B may be singular or plural. The terms "first", "second", "third", "fourth", etc. (if any) in the specification, claims and drawings of the present application are used to distinguish similar objects, rather than to describe a specific order or sequence.
[0025] A high-acceleration shock device can be used to conduct shock tests to find deficiencies in the R & D and design of samples. An acceleration sensor is usually required to be set on the high-acceleration shock device to obtain the detection data of each frame of the shock test. However, during the operation of the high-acceleration shock device, situations such as the glue for pasting the acceleration sensor not being dry or the glue being damaged after solidification may occur, resulting in inaccurate data detected by the sensor. On the one hand, it will affect the judgment of the sample quality. On the other hand, especially when the types or quantities of daily test samples are large, the high-acceleration shock device needs to conduct a large number of shock tests on the samples according to the index requirements. If it is found that the acceleration sensor is offset and the measured data is inaccurate only after each frame of the shock test is completed, it will not only affect the detection efficiency but also increase the detection cost.
[0026] In order to solve the technical problems of low detection efficiency and high cost in the detection test of sample shock in a high-acceleration shock device, the application scenarios of the data detection method of the present application will be described first below.
[0027] Figure 1It is a schematic diagram of the application scenario of the data detection method provided by the embodiments of the present application. The data detection method provided by the embodiments of the present application is applied to the detection device 10. The detection device 10, the impact device 20 and the display device 30 are communicatively connected. The communication connection method can be wired network communication or wireless network communication. The wired network can be any one of a local area network, a metropolitan area network and a wide area network, and the wireless network can be any one of Bluetooth (BT), Wireless Fidelity (Wi-Fi), Near Field Communication (NFC), ZigBee Wireless Networks (ZigBee), infrared technology (IR), ultra-wideband (UWB) technology, wireless universal serial bus (USB), etc.
[0028] The detection device 10 can be a data detection device. The detection device 10 can include, but is not limited to: a first detector 110, a second detector 120, a third detector 130, a processor 140, a memory 150, and a pulse generator 160.
[0029] The impact device 20 can be any one of a shock testing machine, a vibration table, and an explosive shock simulator, and the present application does not limit this. The impact device 20 can include, but is not limited to, a sensor 210, an image acquisition device 220, and an impact table 230. The sensor 210 can be installed at any position on the impact table 230, and the position of the sensor 210 can be located on the impact table 230 according to the verification requirement information. Among them, the image acquisition device 220 includes a shooting device 2201 and an image processor 2202.
[0030] The display device 30 can be an electronic device with a display function such as a display, a computer, and a mobile phone.
[0031] The processor 140 is used to process the data detected by the first detector 110 and the third detector 130. The processor 140 is also used to judge the data detected by the second detector 120. For example, if the processor 140 receives the first detection result sent by the second detector 120, the processor 140 determines that the second detector 120 has not detected the preset requirement information.
[0032] The memory 150 is used to store the requirement information preset by the user.
[0033] The pulse generator 160 is used to output a pulse signal to control the activation of the second detector 120 and the third detector 130.
[0034] The first detector 110 is used to detect the first focal length parameter of the imaging device 2201 and the first image data sent by the image processor 2202 during the first operation phase. For example, the first detector 110 may be a data acquisition device, and the embodiments of the present application do not limit the type of the data acquisition device.
[0035] The second detector 120 is communicatively connected to the memory 150 and is used to read the information stored in the memory 150, such as demand information. The second detector 120 may be a data acquisition device, and the embodiments of the present application do not limit the type of the data acquisition device.
[0036] The third detector 130 is used to detect the second focal length parameter of the imaging device 2201 and the second image data sent by the image processor 2202 during the second operation phase. The third detector 130 may be a data acquisition device, and the embodiments of the present application do not limit the type of the data acquisition device.
[0037] The sensor 210 is used to detect sample data, such as the stress state of the sample under impact.
[0038] The imaging device 2201 may be a high-speed camera, which is used to capture the sample on the impact table 230 and the corresponding sensor 210 of the sample. The imaging device 2201 may adjust the clarity of the captured image according to actual needs, thereby generating different focal length parameters.
[0039] The image processor 2202 is used to receive the image data captured by the imaging device 2201, such as the first image data or the second image data. The image processor 2202 may send the first image data to the first detector 110 and send the second image data to the third detector 130, so that the processor 140 can process the first image data and the second image data.
[0040] The illustration Figure 1 is only an example of the detection device 10 and does not constitute a limitation on the detection device 10. It may include more or fewer components than shown in the figure, or combine some components, or different components. For example, the detection device 10 may further include an input / output device, a network access device, etc.
[0041] To solve the above problems, please refer to Figure 2 as shown Figure 2 is a flowchart of the data detection method provided by the embodiments of the present application and is applied to the detection device 10. According to different requirements, the order of the steps in this flowchart may be changed, and some steps may be omitted.
[0042] Step S201: Use a first detector to detect the first focal length parameter of the image acquisition device in the impact device.
[0043] In some embodiments of the present application, the image acquisition device 220 may include a photographing device 2201, and the photographing device 2201 can automatically adjust the focal length according to the shooting distance, so that the captured image has a high clarity. Installing the photographing device 2201 in the impact device 20 can determine the operating state of the impact device 20 according to the focal length parameter generated by the photographing device 2201. For example, the impact table 230 of the impact device 20 is in the ascending state, descending state, etc.
[0044] In some embodiments of the present application, the detection device 10 is communicatively connected to the impact device 20. The detection device 10 includes a first detector 110, and the first detector 110 is used to detect the first focal length parameter of the image acquisition device 220 in the impact device 20, so that the detection device 10 determines the operating state of the impact device 20 based on the first focal length parameter.
[0045] Step S202: When it is determined that the first operation stage of the impact device is completed based on the first focal length parameter, the processor calculates the first coincidence rate of the first image data sent by the image acquisition device during the first operation stage.
[0046] In some embodiments of the present application, during the impact process of the sample, the sample can be placed on the impact table 230. Among them, a sensor 210 can be configured on the sample or the impact table 230. The impact device 20 controls the rising height of the impact table 230, then releases energy for downward impact, generating an impact force on the lower component, so that the sensor 210 obtains the force vibration state of the sample during the impact process and is recognized by the host computer software through analog-to-digital conversion, which is used as the impact data of the sample. For example, the impact acceleration amplitude and pulse width of the sample, etc.
[0047] In some embodiments of the present application, the processor 140 of the detection device 10 can receive the first focal length parameter detected by the first detector 110. If it is determined that the first focal length parameter changes, the processor 140 determines that the impact device 20 enters the first operation stage, and the first operation stage can be the stage when the impact table 230 rises. If the processor 140 determines that the first focal length parameter does not change within a preset time period, it is determined that the impact device 20 has completed the first operation stage. Completing the first operation stage may mean that the impact table 230 reaches the preset position of the impact device 20, and this position can be the limit rising height of the impact device 20, or it can also be a height pre-defined by the user. The present application does not limit this.
[0048] Figure 3 is a schematic diagram of the impact device provided by the embodiment of the present application, asFigure 3 As shown in the figure, the sample is placed on the impact table 230, and a sensor 210 is installed on the sample. Position 1 is the initial position. When it is determined to enter the first operation stage, the impact table 230 rises to position 2 or position 3. Among them, position 3 can be the limited rising height of the impact table 230, and position 2 can be the height preset by the user.
[0049] In some embodiments of the present application, the sensor 210 on the impact table 230 can be installed on the impact table 230 by means of glue, screws, tape, etc., and there is no limitation in actual application. Since the sensor 210 may be installed obliquely during the installation process. For example, due to the glue structure not being completely stable under the action of the coagulant or during natural solidification, and because the human eye cannot accurately determine its stability, during the vertical displacement process of the impact table 230, the sensor 210 may expand and contract accordingly, resulting in a position deviation. Therefore, to avoid detecting relatively inaccurate data when the sensor 210 is in an oblique state, the state of the sensor 210 can be detected through the first image data sent by the image acquisition device 220.
[0050] In some embodiments of the present application, the processor 140 can detect the installation state of the sensor 210 by calculating the first coincidence rate of the first image data sent by the image acquisition device 220 during the first operation stage.
[0051] Figure 4 is the calculation flowchart of the first coincidence rate provided by the embodiments of the present application. As Figure 4 shown, it includes the following steps:
[0052] Step S401, taking the received initial first image data as the reference data.
[0053] In some embodiments of the present application, the initial first image data is the first image data obtained when the processor 140 determines that the impact device 20 enters the first operation stage. The initial first image data can be used as the reference for the subsequent received first image data. The first image data can be the data generated after the image processor 2202 processes the image data captured by the imaging device 2201. After receiving the image data, the image processor 2202 grayscales each frame of the image and then performs binaryzation processing on the grayscaled image to obtain binaryzation data, and determines the border positions of the sensor 210 and the impact table surface in the binaryzation data through an edge extractor and the Hough transform.
[0054] Step S402, establishing a coordinate system based on the binaryzation data and the boundary of the impact table surface of the impact device.
[0055] In some embodiments of the present application, since the binarized data includes the impact tabletop and the boundary of the sensor 210, a coordinate system can be established according to the boundary of the impact tabletop of the impact device 20. In the coordinate system, the area where the sensor 210 is located in the initial first image data can be determined as the reference area.
[0056] Figure 5 is a schematic diagram of the coordinate system provided by the embodiments of the present application. As Figure 5 shown, based on the binarized data, according to the pixel values and the initial first image data, the reference area corresponding to the sensor 210 can be determined. For example, the positions of the pixel points with pixel values greater than or equal to a preset value are set to 1, and the positions of the pixel points with pixel values less than the preset value are set to 0. Then, the reference area can be determined based on the area set to 1.
[0057] Step S403: Calculate the first quantity of the pixel points in the reference area based on the coordinate system.
[0058] In some embodiments of the present application, after determining the reference area, the number of pixel points in the reference area can be calculated as the first quantity.
[0059] Step S404: Map the first image data received each time to the coordinate system.
[0060] In some embodiments of the present application, the processor 140 maps the first image data received each time to the coordinate system, and takes the position of the first image data on the coordinate system as the target area.
[0061] Step S405: Calculate the second quantity of the pixel points in the target area based on the coordinate system.
[0062] In some embodiments of the present application, after determining the target area, the number of pixel points in the target area can be calculated as the second quantity.
[0063] Step S406: Determine the intersection area and the union area between the reference area and the target area based on the coordinate system.
[0064] Step S407: Calculate the third quantity of the pixel points of the intersection area on the coordinate system and the fourth quantity of the pixel points of the union area on the coordinate system.
[0065] Figure 6 is a schematic diagram of the union area provided by the embodiments of the present application. As Figure 6 shown, the intersection area is shown as the shaded part A, and the union area is shown as the shaded part B. Calculate the number of pixel points of the shaded part A on the coordinate system as the third quantity, and calculate the number of pixel points of the shaded part B on the coordinate system as the fourth quantity. Among them, Figure 6For the sole purpose of illustrating the union region and the intersection region, in practical applications, there is only one reference region, and one image corresponds to one target region.
[0066] Step S408: Calculate a first coincidence rate based on the first quantity, the second quantity, the third quantity, the fourth quantity, and a preset formula.
[0067] In some embodiments of the present application, the preset formula is: first coincidence rate = [((third quantity / first quantity) * 100%) + ((first quantity + second quantity - fourth quantity) / first quantity * 100%)] / 2. Among them, according to (third quantity / first quantity) * 100%, a first ratio is calculated, and according to (first quantity + second quantity - fourth quantity) / first quantity * 100%, a second ratio is calculated. Then, the average value of the first ratio and the second ratio is calculated, which can avoid errors or misjudgments.
[0068] In the embodiments of the present application, by calculating the first quantity, the second quantity, the third quantity, and the fourth quantity to obtain the first coincidence rate, and judging whether the sensor 210 has shifted based on the first coincidence rate, the assembly state of the sensor can be detected in a timely manner, which can improve the detection efficiency to a certain extent and avoid errors.
[0069] Step S203: If the first coincidence rate meets a preset first condition, the processor activates the second detector and the third detector.
[0070] In some embodiments of the present application, the first condition may be the coincidence degree between the reference region and the target region within a certain error range (97% - 100%). Then, the range that meets the first condition may include 97% - 100%. If the first coincidence rate does not meet the preset first condition (for example, the first coincidence rate is not within the range of 97% - 100%), it indicates that the sensor 210 has a position shift during the first operation stage. As Figure 6 shown, the shaded part is smaller than the reference region, then the processor 140 sends a reset instruction to the impact device 20 to instruct the impact device 20 to perform a reset operation. For example, the impact table 230 is restored to its initial position.
[0071] In some embodiments of the present application, if the first coincidence rate meets the preset first condition, it indicates that the sensor 210 has not shifted during the first operation stage. After determining that the first coincidence rate meets the preset first condition, the processor 140 activates the pulse generator 160 to send a pulse signal, and the second detector 120 and the third detector 130 respond to the pulse signal and start to operate.
[0072] Step S204: Receive a first detection result sent by the second detector and a second focal length parameter sent by the third detector. When the second focal length parameter changes, the processor determines that the impact device 20 enters the second operation stage.
[0073] In some embodiments of the present application, after the second detector 120 is activated, the detector reads the demand information in the memory 150. If no demand information is read, the second detector 120 sends a first detection result to the processor 140, and the first detection result indicates that the second detector 120 has not detected demand information.
[0074] In some embodiments of the present application, after the third detector 130 is activated, it starts to detect the second focal length parameter of the image acquisition device 220. If the second focal length parameter changes, it indicates that the impact device 20 enters the second operation stage, and the second operation stage may be the stage where the impact table 230 drives the sample and the sensor 210 to descend.
[0075] In some embodiments of the present application, if the processor 140 receives the second detection result sent by the second detector 120, and the second detection result indicates that the second detector 120 has detected demand information, the demand information may be preset by the user. In one example, the servo motor of the impact device 20 controls the slide rail to lift the impact table 230 to the specified impact height (limiting height). At this time, due to the lifting of the impact height, the elastic cord deforms, and the elastic force of the elastic cord is released through control of the air valve, etc., and the impact table 230 performs an impact to complete the impact verification. When lifted to the specified height, the processor 140 waits for other components to return to their positions according to the execution duration of the demand information. The demand information may also include functional requirements such as warning delay, for example, 1 s, 2 s, to remind the operator that an impact action will occur and to take safety protection measures.
[0076] In some embodiments of the present application, when the processor 140 receives the second detection result, if the second focal length parameter has not changed, it indicates that the impact table 230 is in a paused state. The processor 140 obtains the execution duration in the demand information (for example, 2 s) and starts timing. When the timing reaches the execution duration and the second focal length parameter detected by the third detector 130 changes, it is determined that the impact device 20 restarts and enters the second operation stage.
[0077] Step S205, when it is determined that the second operation stage is completed based on the second focal length parameter, the processor calculates the second coincidence rate of the second image data sent by the image acquisition device in the second operation stage.
[0078] In some embodiments of the present application, when the second focal length parameter received by the processor 140 does not change within a preset time period, it is determined that the impact device 20 has completed the second operation stage, and an impact test is completed. And the second coincidence rate of the second image data transmitted by the image acquisition device 220 during the second operation stage is calculated. The method for calculating the second coincidence rate is the same as that for calculating the first coincidence rate, which will not be repeated here. Moreover, before returning to its original position, the impact device 20 will experience a short stop, such as the collision contact duration on the surface of the impact table 230 when generating an impact force. Therefore, the preset time period can be greater than the expected short stop time to accurately determine that the impact device 20 has completed the second operation stage.
[0079] Step S206, if the second coincidence rate does not meet the preset second condition, it is determined that the sample data detected by the sensor installed in the impact device is inaccurate, and a prompt message is output to prompt an inspection of the sensor.
[0080] In some embodiments of the present application, the second condition refers to the coincidence degree between the reference area and the target area within a certain error range. The range that meets the second condition can be 97% - 100%, and the range that does not meet the second condition can be 0% - 96%. If the second coincidence rate does not meet the second condition, it may indicate that the glue for installing the sensor 210 may have structural damage but not completely fallen off, and it is determined that the sample data detected by the sensor 210 installed in the impact device 20 is inaccurate. If the second coincidence rate does not meet the second condition and is within the preset range within the second condition, for example, the preset range within the second condition can be 0% - 90%, it may indicate that the structure of the sensor 210 is severely damaged or basically fallen off, and then it is determined that the data detected by the sensor 210 is abnormal. In the embodiments of the present application, the first detector 110 is used to detect the first focal length parameter of the image acquisition device 220 of the impact device 20. The image acquisition device 220 is arranged at a fixed position above the impact device 20, so that the first detector 110 can determine the operating stage of the impact device 20 by detecting the first focal length parameter of the image acquisition device 220, for example, the first operating stage. Calculate the first coincidence rate of the first image data sent by the image acquisition device 220 in the first operating stage. If the first coincidence rate meets the preset first condition, it is determined that in the first operating stage, the sensor 210 on the impact device 20 does not have assembly abnormalities, and the sensor 210 collects data in the correct assembly state. Then, the processor 140 activates the second detector 120 and the third detector 130, receives the first detection result sent by the second detector 120 and the second focal length parameter sent by the third detector 130. If the second focal length parameter changes, it is determined that the impact device 20 enters the second operating stage. Until it is determined that the second operating stage is completed, calculate the second coincidence rate according to the second image data sent by the image acquisition device 220 in the second operating stage. If the second coincidence rate does not meet the preset second condition, it is determined that the sample data detected by the sensor 210 installed in the impact device 20 is inaccurate, and a prompt message is output to prompt to check the sensor 210, for example, re-assemble or replace with a new sensor. Based on the method of calculating the first coincidence rate from the first image data and the second coincidence rate from the second image data, it is possible to timely detect whether the sensor 210 is offset, so as to judge the accuracy of the sample data detected by the sensor 210, which can improve the detection efficiency of the sample to a certain extent and reduce the detection cost of judging the sample quality. In addition, the present application can reduce the number of invalid tests, thereby effectively protecting the service life of the impact device 20 and the fixture for loading samples.
[0081] In other embodiments of the present application, in order to more intuitively determine the state of the sensor 210, the detection device 10 is connected to a display device, and the display device may be an LED light. If the first coincidence rate meets the first condition, the display device is controlled to display a first color, and the first color may be purple. If the second coincidence rate meets the second condition, the display device is controlled to display a second color, and the second color may be green. If the second coincidence rate does not meet the second condition, the display device is controlled to display a third color, and the third color may be yellow. If the second coincidence rate does not meet the second condition and is within the preset range of the second condition, the display device is controlled to display a fourth color, and the fourth color may be a transition from yellow to red. The above colors are only examples and can be set according to actual needs, and the present application does not limit this.
[0082] Please continue to refer to Figure 1 , in this embodiment, the memory 150 may be an internal memory of the detection device 10, that is, a memory built into the detection device 10. In other embodiments, the memory 150 may also be an external memory of the detection device 10, that is, a memory externally connected to the detection device 10.
[0083] In some embodiments, the memory 150 is used to store program codes and various data, and to achieve high-speed and automatic access to programs or data during the operation of the detection device 10.
[0084] The memory 150 may include a random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0085] In one embodiment, the processor 140 may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor, or the processor may also be any other conventional processor, etc.
[0086] If the program code and various data in the memory 150 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above-described method embodiments of the present application, such as the data detection method, it can also be completed by a computer program instructing relevant hardware. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-described method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), etc.
[0087] It can be understood that the above-described module division is a logical function division, and there may be other division methods in actual implementation. In addition, in each embodiment of the present application, the functional modules can be integrated in the same processing unit, or each module can exist physically alone, or two or more modules can be integrated in the same unit. The above-mentioned integrated modules can be implemented in the form of hardware, or in the form of hardware plus software functional modules.
[0088] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and not to limit them. Although the present application has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present application can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present application.
Claims
1. A data detection method, applied to a detection device, characterized in that The detection device is communicatively connected to the impact device. The detection device includes a processor, a first detector, a second detector, and a third detector. The method includes: Using the first detector to detect a first focal length parameter of an image acquisition device in the impact device; When it is determined that the first operation stage of the impact device is completed based on the first focal length parameter, the processor calculates a first coincidence rate of first image data sent by the image acquisition device during the first operation stage; If the first coincidence rate meets a preset first condition, the processor activates the second detector and the third detector; Receiving a first detection result sent by the second detector and a second focal length parameter sent by the third detector. When the second focal length parameter changes, the processor determines that the impact device enters a second operation stage, and the first detection result indicates that the second detector does not detect a preset required information; When it is determined that the second operation stage is completed based on the second focal length parameter and a preset duration, the processor calculates a second coincidence rate of second image data sent by the image acquisition device during the second operation stage; If the second coincidence rate does not meet a preset second condition, it is determined that sample data detected by a sensor installed in the impact device is inaccurate, and a prompt message is output to prompt an inspection of the sensor.
2. The data detection method according to claim 1, wherein The determining that the first operation stage of the impact device is completed based on the first focal length parameter includes: When it is determined that the first focal length parameter changes, the processor determines that the impact device enters the first operation stage, and until the processor determines that the first focal length parameter does not change within a preset duration, it is determined that the impact device completes the first operation stage.
3. The data detection method according to claim 2, wherein The processor calculating the first coincidence rate of the first image data sent by the image acquisition device during the first operation stage includes: Taking the received initial first image data as reference data. The initial first image data is binary data, and the initial first image data is the first image data obtained when the processor determines that the impact device enters the first operation stage; Based on the binary data and the boundary of the impact tabletop of the impact device, a coordinate system is established. The binary data includes a reference area of the sensor on the coordinate system; Based on the coordinate system, calculate a first quantity of pixel points in the reference area; Map each received first image data to the coordinate system. The first image data includes a target area where the sensor is located; Based on the coordinate system, calculate a second quantity of pixel points in the target area; Based on the coordinate system, determine an intersection area and a union area between the reference area and the target area; Calculate a third quantity of pixel points of the intersection area on the coordinate system, and a fourth quantity of pixel points of the union area on the coordinate system; Calculate a first coincidence rate based on the first quantity, the second quantity, the third quantity, the fourth quantity, and a preset formula, where the preset formula is: first coincidence rate = [((third quantity / first quantity) * 100%) + ((first quantity + second quantity - fourth quantity) / first quantity * 100%)] / 2).
4. The data detection method according to claim 1, characterized in that The detection device further includes a pulse generator. If the first coincidence rate meets a preset first condition, the processor activates the second detector and the third detector, including: If the first coincidence rate meets the first condition, the processor activates the pulse generator to send a pulse signal; The second detector and the third detector respond to the pulse signal and start running.
5. The data detection method according to claim 1, wherein The method further includes: Receive a second detection result sent by the second detector and the second focal length parameter detected by the third detector. When the second focal length parameter does not change within the preset time period, the processor obtains the execution duration in the requirement information and starts timing. The second detection result indicates that the second detector detects the requirement information; When the timing reaches the execution duration and the second focal length parameter detected by the third detector changes, the processor determines that the impact device enters the second operation stage.
6. The data detection method according to claim 1, wherein The method further includes: When the first coincidence rate does not meet the preset first condition, send a reset instruction to the impact device so that the impact device performs a reset operation.
7. The data detection method according to claim 1, characterized in that, The detection device is connected to a display device. The method further includes: If the first coincidence rate meets the first condition, control the display device to display a first color.
8. The data detection method according to claim 7, characterized in that The method further includes: If the second coincidence rate meets the second condition, control the display device to display a second color; If the second coincidence rate does not meet the second condition, control the display device to display a third color; or, If the second coincidence rate does not meet the second condition and is within a preset range within the second condition, control the display device to display a fourth color.
9. A detection device, characterized in that, The detection device includes a processor and a memory. The processor is configured to execute a computer program stored in the memory to implement the data detection method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one instruction, and when the at least one instruction is executed by a processor, it implements the data detection method according to any one of claims 1 to 8.