Vehicle detection method, microprocessor, electronic device and storage medium

By using photoresistive resistors and infrared detector signal judgment in infrared detection systems, the problem of infrared detection systems being susceptible to interference and causing false triggering is solved, and the detection accuracy is improved.

CN119049298BActive Publication Date: 2025-02-07X-SENSE INNOVATIONS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411527848.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-02-07
Estimated Expiration
2044-10-30

AI Technical Summary

Technical Problem

Infrared detection systems are susceptible to interference and cause false triggering, resulting in low accuracy of lane alarms.

Method used

By acquiring the signals of the photoresistor and infrared detector, it is determined whether the second signal is a valid signal. If it is a valid signal, it is determined that the vehicle exists. The method includes obtaining the first signal to represent the interference light source, obtaining the second signal to represent the target infrared light source, determining whether the second signal is valid based on the first signal, and confirming that the vehicle exists after confirming that it is valid.

Benefits of technology

The false alarm rate of the infrared detection system is reduced, the detection accuracy of the infrared detection device is improved, and the false triggering caused by interference with the light source is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119049298B_ABST
    Figure CN119049298B_ABST
Patent Text Reader

Abstract

The present invention discloses a vehicle detection method, a microprocessor, an electronic device and a storage medium. The method is applied to a microprocessor in an infrared detection system. The infrared detection system also includes a photoresistor and an infrared detector. The method includes: obtaining a first signal, the first signal indicates that the photoresistor detects that there is an interfering light source in a first target area, and the first target area is an area within the effective detection range of the infrared detection system; obtaining a second signal, the second signal indicates that the infrared detector detects that there is a target infrared light source in the first target area; judging whether the second signal is a valid signal according to the first signal; if the second signal is a valid signal, it is determined that there is a vehicle in the first target area. By implementing the method of the present invention, the false alarm rate of the infrared detection system is reduced, and the detection accuracy of the infrared detection device is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of optical detection and measurement related to new energy, and in particular to a vehicle detection method, a microprocessor, an electronic device and a storage medium. Background Art

[0002] Lane alarms are used to be installed on both sides of the roadway. When a vehicle passes by, an alarm is triggered to remind the user that a vehicle is passing by. A low-cost solution for detecting vehicle movement is to use infrared detectors for detection. Regardless of whether it is a new energy vehicle or a traditional energy vehicle, since the temperature of the vehicle itself is higher than the ambient temperature, it can trigger the infrared detector to generate a signal when passing by. The passive infrared detector transmits the signal to the microprocessor for processing and generates an alarm.

[0003] The characteristic of infrared detectors is that they are sensitive to infrared light and also to ambient white light of a certain intensity. When a vehicle is driving at night with the high beam on, the light sweeps over or shines on the infrared detector, which may cause the infrared detector to be falsely triggered, resulting in a low accuracy rate of the lane alarm. Summary of the invention

[0004] In response to the above problems, the example of the present application provides a vehicle detection method, a microprocessor, an electronic device and a storage medium. The use of the solution of the present application is conducive to improving the accuracy of the infrared detection system.

[0005] In a first aspect, an embodiment of the present application provides a vehicle detection method, which is applied to a microprocessor in an infrared detection system, wherein the infrared detection system also includes a photoresistor and an infrared detector, and the method includes: obtaining a first signal, wherein the first signal indicates that the photoresistor detects the presence of an interfering light source in a first target area, and the first target area is an area within an effective detection range of the infrared detection system; obtaining a second signal, wherein the second signal indicates that the infrared detector detects the presence of a target infrared light source in the first target area; determining whether the second signal is a valid signal based on the first signal; and determining that a vehicle exists in the first target area if the second signal is a valid signal.

[0006] It can be seen that in the embodiment of the present application, the first signal is obtained to determine whether the second signal is a valid signal, and then the presence of a vehicle in the first target area is determined after the second signal is determined to be a valid signal. This solves the problem of false triggering caused by interference of the infrared detection system, reduces the false alarm rate of the infrared detection system, and improves the detection accuracy of the infrared detection device.

[0007] In combination with the first aspect, in a possible embodiment, determining whether the second signal is a valid signal based on the first signal includes: obtaining a first moment when the first signal is received and a second moment when the second signal is received; if the first moment is not before the second moment, determining that the second signal is a valid signal; if the first moment is before the second moment, determining whether the first signal and the second signal are generated by the same light source; if the first signal and the second signal are generated by the same light source, determining that the second signal is not a valid signal; if the first signal and the second signal are generated by different light sources, determining that the second signal is a valid signal.

[0008] It can be seen that in the embodiment of the present application, before determining whether the first signal and the second signal are generated by the same light source, the generation time of the first signal and the second signal is determined according to the first moment and the second moment. If it is determined that the first moment is not before the second moment, the second signal is directly determined to be a valid signal, thereby improving the detection efficiency of the infrared detection system.

[0009] In combination with the first aspect, in a possible embodiment, determining whether the first signal and the second signal are generated by the same light source includes: calculating the reception time difference between the first signal and the second signal based on the first moment and the second moment; if the reception time difference is not within a preset time difference range, determining that the first signal and the second signal are not generated by the same light source; if the reception time difference is within the preset time difference range, determining that the first signal and the second signal are generated by the same light source.

[0010] It can be seen that in the embodiment of the present application, the reception time difference between the first signal and the second signal is calculated by judging the first moment corresponding to the first signal and the second moment corresponding to the second signal, and then judging whether the first signal and the second signal are generated by the same light source is judged according to the reception time difference. This takes into account the lag of the infrared detector in generating the second signal, thereby improving the detection accuracy of the infrared detection system.

[0011] In combination with the first aspect, in a possible embodiment, the microprocessor obtains signals from the photoresistor and the infrared detector according to a preset frequency. Before determining that the first signal and the second signal are generated by the same light source, the method also includes: determining multiple third moments before the first moment according to the preset frequency; if the third signal is obtained in multiple third moments, it is determined that the first signal and the second signal are generated by different light sources, and the third signal is a characterization that the infrared detector detects the presence of a target infrared light source in the first target area; if the third signal is not obtained in multiple third moments, it is determined that the first signal and the second signal are generated by the same light source.

[0012] It can be seen that in the embodiment of the present application, before determining whether the first signal and the second signal are from the same light source, it is first determined whether the interfering light source corresponding to the first signal has existed for a period of time. After determining that the interfering light source corresponding to the first signal has existed for a period of time, it is directly determined that the first signal and the second signal are generated by different light sources. There is no need to calculate the acquisition time difference of the first signal and the second signal, thereby improving the detection efficiency of the infrared detection system.

[0013] In combination with the first aspect, in a possible embodiment, the infrared detection system includes multiple photoresistors, and the multiple photoresistors are arranged in different directions; if the second signal is not a valid signal, the method also includes: obtaining multiple fourth moments, the fourth moment is the moment when any one of the multiple photoresistors detects the presence of an interfering light source in the first target area; determining the source direction of the interfering light source according to the multiple fourth moments; if the source direction of the interfering light source is the target direction, recording the duration of the second signal according to the second moment of the second signal; if the duration of the second signal is greater than the first preset duration, it is determined that there is a vehicle in the second target area, and the second target area is an area outside the effective detection range of the infrared detector and adjacent to the first target area.

[0014] It can be seen that in the embodiment of the present application, the interference direction and duration of the interference light source are used to determine whether there is a vehicle in the second target area outside the effective detection range of the infrared detection system, thereby improving the detection range of the infrared detection system and ensuring the safety of the user.

[0015] In combination with the first aspect, in a possible embodiment, if the second signal is not a valid signal, the method also includes: if there are other second signals that are judged not to be valid signals within a second preset time period before the second moment, marking the second signal as a continuous signal; if the number of second signals marked as continuous signals is greater than the preset number, obtaining multiple first signals corresponding to the second signals marked as continuous signals; obtaining multiple light intensity data corresponding to the multiple first signals corresponding to the second signals marked as continuous signals; calculating the difference rate between the multiple light intensity data and the target light intensity data; if the difference rate is less than the preset difference rate, determining that there are multiple vehicles passing continuously in the first target area.

[0016] It can be seen that in the embodiment of the present application, when multiple second signals are judged not to be valid signals, the microprocessor determines whether the multiple second signals are caused by the continuous passage of multiple vehicles through the difference rate between the light intensity data corresponding to the multiple second signals and the target light intensity data, thereby solving the problem of misjudgment of the infrared detection system caused by multiple second signals and further improving the detection accuracy of the infrared detection device.

[0017] In combination with the first aspect, in a possible embodiment, after determining that there are multiple vehicles passing continuously in the first target area, the method also includes: determining target data from multiple light intensity data, the target data being data that is greater than all adjacent data after the multiple light intensity data are arranged in chronological order; and determining the number of vehicles passing continuously in the first target area based on the number of target data.

[0018] In a second aspect, an embodiment of the present application provides a microprocessor, the microprocessor belongs to an infrared detection system, the infrared detection system also includes a photoresistor and an infrared detector, the microprocessor includes:

[0019] An acquisition unit is used to acquire a first signal, where the first signal indicates that the photoresistor detects the presence of an interfering light source in a first target area, and the first target area is an area within an effective detection range of the infrared detection system.

[0020] A second signal is acquired, where the second signal indicates that the infrared detector detects that there is a target infrared light source in the first target area.

[0021] Determination unit: used for determining whether the second signal is a valid signal according to the first signal.

[0022] A determination unit is configured to determine that there is a vehicle in the first target area if the second signal is a valid signal.

[0023] In a third aspect, an embodiment of the present application provides an electronic device comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and one or more instructions are suitable for being loaded by the processor and executing part or all of the methods of the first aspect and / or the second aspect.

[0024] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the method of the first aspect and / or the second aspect.

[0025] In a fifth aspect, the present application provides a computer program product. When a computer reads and executes the computer program product, the computer executes part or all of the method of the first aspect and / or the second aspect.

[0026] It can be understood that the beneficial effects of the embodiments described in the second to fifth aspects can refer to the beneficial effects of the method described in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0028] Figure 1 A schematic diagram of an application scenario of a vehicle detection method provided in an embodiment of the present application;

[0029] Figure 2 A schematic diagram of a vehicle detection method provided in an embodiment of the present application;

[0030] Figure 3 A schematic diagram of a scenario of a vehicle light interference infrared detection system provided in an embodiment of the present application;

[0031] Figure 4 A schematic diagram of the reception time of a first signal and a second signal generated by the same light source provided in an embodiment of the present application;

[0032] Figure 5 A flow chart of another vehicle detection method provided in an embodiment of the present application;

[0033] Figure 6 A schematic diagram of the structure of an infrared detection system provided in an embodiment of the present application;

[0034] Figure 7 An example diagram of a target direction determination principle provided in an embodiment of the present application;

[0035] Figure 8 A schematic diagram of a scenario in which multiple vehicles pass through a first target area provided in an embodiment of the present application;

[0036] Fig. 9 A schematic diagram for comparing light intensity data provided in an embodiment of the present application;

[0037] Fig.10 A schematic diagram of the structure of a second microprocessor provided in an embodiment of the present application;

[0038] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0039] Description of Figure Numbers

[0040] Application scenario 100; infrared detection system 101; first microprocessor 1011; photoresistor 1012; infrared detector 1013; vehicle 102; terminal device 103; first photoresistor 601; second photoresistor 602; third photoresistor 603; second microprocessor 1000; acquisition unit 1001; judgment unit 1002; determination unit 1003; electronic device 1100; memory 1101; processor 1102; communication interface 1103; bus 1104. DETAILED DESCRIPTION

[0041] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0042] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0043] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0044] The embodiments of the present application are described below in conjunction with the accompanying drawings.

[0045] See also Figure 1 , Figure 1A schematic diagram of an application scenario of a vehicle detection method provided in an embodiment of the present application, wherein the application scenario 100 includes an infrared detection system 101, a vehicle 102 and a terminal device 103; the infrared detection system 101 also includes a first microprocessor 1011, a photoresistor 1012 and an infrared detector 1013, and the infrared detection system 101 is specifically a lane alarm. The vehicle 102 here is specifically a new energy or traditional energy vehicle such as a sedan, an off-road vehicle, a truck, etc. The terminal device 103 here is specifically a home computer, a vehicle-mounted terminal, a mobile terminal and other devices.

[0046] The infrared detection system 101 detects whether there is a vehicle in the first target area based on the first microprocessor 1011 processing the signals of the photoresistor 1012 and the infrared detector 1013, and notifies the terminal device 103 when it is determined that there is a vehicle in the first target area, so as to inform the user of the terminal device 103 that there is a vehicle 102 in the first target area. The infrared detection system 101 can also detect whether there are pedestrians, two-wheeled electric vehicles, motorcycles and other targets in the first target area.

[0047] The first microprocessor 1011 here is specifically a processor such as a microcontroller unit (MCU) or a central processing unit (CPU), which is used to determine whether there is a vehicle 102 in the first target area according to the signals of the photoresistor 1012 and the infrared detector 1013.

[0048] The photoresistor 1012 herein is specifically a device including one or more photoresistors, which can determine whether the infrared detection system 101 is interfered by light from light sources such as car lights and street lights based on principles such as the internal photoelectric effect.

[0049] The infrared detector 1013 is a passive infrared sensor (PIR Sensor) or an active infrared detector (AID). The infrared detector 1013 can detect whether there is a vehicle 102 in the first target area, but it is easily interfered by light sources such as car lights and street lights, resulting in misjudgment.

[0050] The first target area is an area within the effective detection range of the infrared detection system 101. Depending on the specific scenario, the first target area here is specifically a driveway, a parking lot entrance, an entrance to a residential area, etc. For example, if the infrared detection system 101 is installed at the entrance to a residential area, the infrared detection system 101 is used to detect whether an unknown vehicle passes through the entrance driveway of the residential area. When an unknown vehicle is detected passing through the entrance driveway of the residential area, the terminal device 103 is notified to prompt the user of the terminal device 103 that an unknown vehicle has entered the residential area.

[0051] In the embodiment of the present application, the first microprocessor 1011 obtains the first signal sent by the photoresistor 1012, and the first signal indicates that the photoresistor 1012 detects the presence of an interfering light source in the target area. The interfering light source here is specifically generated by the high beam of the vehicle 102, the lighting lamp beside the road, etc. When the infrared detector 1013 is interfered by the interfering light source, the infrared detector 1013 will be triggered by mistake.

[0052] The first microprocessor 1011 obtains a second signal sent by the infrared detector 1013, and the second signal indicates that the infrared detector 1013 detects the presence of a target infrared light source in the first target area. Specifically, the target infrared light source is generated when the vehicle 102 or other targets that need to be detected by the infrared detection system 101 enters the first target area; or when the infrared detector 1013 is interfered by an interference light source.

[0053] The first microprocessor 1011 determines whether the second signal is a valid signal based on the first signal. The first signal here is the second signal whose acquisition time is closest to the acquisition time of the second signal. The first microprocessor 1011 can determine the acquisition time, signal strength and other information of the first signal and the second signal to determine whether the second signal is generated by the vehicle 102 or the interfering light source, thereby determining whether the second signal is a valid signal.

[0054] After determining that the second signal is a valid signal, the first microprocessor 1011 determines that there is a vehicle 102 in the first target area, and then sends the information that there is the vehicle 102 in the first target area to the terminal device 103, notifying the user of the terminal device 103 that there is a vehicle 102 in the first target area.

[0055] It can be seen that in the embodiment of the present application, the first signal is obtained to determine whether the second signal is a valid signal, and then the presence of a vehicle in the first target area is determined after the second signal is determined to be a valid signal. This solves the problem of false triggering caused by interference of the infrared detection system, reduces the false alarm rate of the infrared detection system, and improves the detection accuracy of the infrared detection device.

[0056] See also Figure 2 , Figure 2 A flow chart of a vehicle detection method provided in an embodiment of the present application can be based on Figure 1 The application scenario 100 shown is implemented as Figure 2 As shown, steps S201-S204 are included:

[0057] S201: The microprocessor obtains a first signal, where the first signal indicates that the photoresistor detects the presence of an interfering light source in a first target area, where the first target area is an area within an effective detection range of the infrared detection system.

[0058] Specifically, the microprocessor acquires a first signal, where the first signal is sent to the microprocessor after the photoresistor detects that there is an interfering light source in the first target area. The interfering light source is usually generated by the headlights of a car.

[0059] For example, see Figure 3 , Figure 3 A schematic diagram of a scenario in which a car headlight interferes with an infrared detection system is provided in an embodiment of the present application. It can be seen that the infrared detection system is installed at the entrance of a residential area. When a vehicle is driving normally on a public road, although the vehicle has no intention of entering the residential area, when the vehicle turns on its headlights, the illumination range of the headlights covers the infrared detection system. The presence of an interfering light source in the first target area mentioned above means that there is an interfering light source that may cause the infrared detector to falsely trigger and generate a second signal. At this time, the light generated by the car headlights will illuminate the photoresistor, causing the photoresistor to generate a first signal. The microprocessor can then determine, based on the first signal, whether the second signal sent by the infrared detector is a valid signal generated normally or a false signal. Figure 3 False positive signals generated in the scenario shown.

[0060] S202: The microprocessor acquires a second signal, where the second signal indicates that the infrared detector detects that there is a target infrared light source in the first target area.

[0061] Specifically, when a vehicle or other target enters the first target area, an infrared light source will be generated that can be detected and identified by the infrared detector. At this time, the infrared detector generates a second signal and sends it to the microprocessor, so that the microprocessor can obtain the second signal generated by the infrared detector.

[0062] S203: The microprocessor determines whether the second signal is a valid signal according to the first signal.

[0063] Specifically, the microprocessor determines whether the second signal is a valid signal based on information such as the generation time and signal characteristics of the first signal and the second signal. Here, the first signal is a signal sent by the photoresistor whose reception time is closest to the second signal.

[0064] For example, the microprocessor can determine that the first signal and the second signal are generated at the same time based on the generation time of the first signal and the second signal; or the microprocessor can determine that the first signal and the second signal have the same source type based on the signal characteristics of the first signal and the second signal, for example, both come from car lights. The microprocessor can determine that the first signal is not a valid signal, and that the car lights or other interfering light sources interfere with the infrared detector and cause false triggering.

[0065] In the following embodiments, the microprocessor will specifically describe how to determine whether the second signal is a valid signal according to the first signal.

[0066] In a possible embodiment, determining whether the second signal is a valid signal based on the first signal includes: obtaining a first moment when the first signal is received and a second moment when the second signal is received; if the first moment is not before the second moment, determining that the second signal is a valid signal; if the first moment is before the second moment, determining whether the first signal and the second signal are generated by the same light source; if the first signal and the second signal are generated by the same light source, determining that the second signal is not a valid signal; if the first signal and the second signal are generated by different light sources, determining that the second signal is a valid signal.

[0067] Specifically, in the embodiment of the present application, the microprocessor determines whether the second signal is a valid signal according to the generation time of the first signal and the second signal. If the first signal and the second signal are generated at the same time, it can be inferred that the second signal is a false trigger signal caused by the interfering light source corresponding to the first signal.

[0068] The microprocessor first obtains the first moment when the first signal is received and the second moment when the second signal is received. Due to the operating principle of the infrared detector that sends the second signal, the second signal has a lag. After the vehicle enters the first target area or is irradiated by the interfering light source, the infrared detector will generate the second signal after a short processing. Therefore, there is a delay between the second moment when the microprocessor receives the second signal and the moment when the vehicle initially enters the first target area and the moment when the interfering light source initially interferes with the infrared detector. Therefore, the moment when the infrared light source corresponding to the second signal enters the first target area is earlier than the second moment when the microprocessor receives the second signal. The photoresistor will not have the above problem. When the photoresistor is irradiated by the interfering light source, it will immediately generate the first signal and send it to the microprocessor.

[0069] Based on the above reasons, the microprocessor first determines the order of receiving the first signal and the second signal. If the first moment is not before the second moment, combined with the hysteresis of the second signal, it is proved that the interference light source corresponding to the second signal is generated before the infrared light source corresponding to the first signal, so the second signal can be directly determined as a valid signal.

[0070] If the first moment is before the second moment, the hysteresis of the second signal must be considered to determine whether the first signal and the second signal are generated by the same light source. Furthermore, if the infrared detector can compensate the second signal for the hysteresis of the second information, the generation time of the second signal is determined according to the second moment corresponding to the sending of the second information, and the microprocessor determines whether the first signal and the second signal are generated by the same light source according to the generation time and the first moment.

[0071] It can be seen that in the embodiment of the present application, before determining whether the first signal and the second signal are generated by the same light source, the generation time of the first signal and the second signal is determined according to the first moment and the second moment. If it is determined that the first moment is not before the second moment, the second signal is directly determined to be a valid signal, thereby improving the detection efficiency of the infrared detection system.

[0072] In a possible embodiment, determining whether the first signal and the second signal are generated by the same light source includes: calculating the reception time difference between the first signal and the second signal based on the first moment and the second moment; if the reception time difference is not within a preset time difference range, determining that the first signal and the second signal are not generated by the same light source; if the reception time difference is within the preset time difference range, determining that the first signal and the second signal are generated by the same light source.

[0073] Specifically, if the first moment when the microprocessor receives the first signal is before the second moment when the microprocessor receives the second signal, due to the hysteresis of the second signal generation, in the above case, the first signal and the second signal may be generated by the same light source. Therefore, here, by calculating the reception time difference between the second moment and the second moment, it is determined whether the first signal and the second signal are generated by the same light source, that is, it is determined whether the first signal and the second signal are both generated by the interfering light source. The following describes how to determine whether the first signal and the second signal are generated by the same light source through the reception time difference between the first signal and the second signal.

[0074] The microprocessor first calculates the receiving time difference between the first signal and the second signal according to the first moment and the second moment. The preset time difference range here is determined according to the performance of the infrared detector. If the performance of the infrared detector is poor, the time difference range may be 3-5s. If the performance of the infrared detector is good, the time difference range may be 1-2s. The specific values ​​of the time difference range here are only examples. In actual applications, the time difference range can also be calibrated according to actual tests.

[0075] If the receiving time difference is not within the preset time difference range, it can be inferred that the interference light source corresponding to the first signal existed before the infrared light source corresponding to the second signal entered the first target area, so the first signal and the second signal are not generated by the same light source. If the receiving time difference is within the first preset time range, it can be inferred that the interference light source corresponding to the first signal and the infrared light source corresponding to the second signal entered the first target area at the same time, so the first signal and the second signal are generated by the same light source.

[0076] For example, see Figure 4 , Figure 4 A schematic diagram of the reception time of a first signal and a second signal generated by the same light source provided in an embodiment of the present application shows that the second moment is 5s. If the preset time difference range at this time is 2-4s, then the infrared light source corresponding to the second signal is 2-4s before the second moment when the second signal is received, that is, Figure 4 It can be seen that the first moment of receiving the first signal is within the actual time range, and the receiving time difference between the first signal and the second signal is less than the preset time difference range. Figure 4 The first signal and the second signal corresponding to the first moment and the second moment are generated by the same light source.

[0077] It can be seen that in the embodiment of the present application, the reception time difference between the first signal and the second signal is calculated by judging the first moment corresponding to the first signal and the second moment corresponding to the second signal, and then judging whether the first signal and the second signal are generated by the same light source is judged according to the reception time difference. This takes into account the lag of the infrared detector in generating the second signal, thereby improving the detection accuracy of the infrared detection system.

[0078] In a possible embodiment, the microprocessor obtains signals from the photoresistor and the infrared detector at a preset frequency. Before determining that the first signal and the second signal are generated by the same light source, the method also includes: determining multiple third moments before the first moment according to the preset frequency; if the third signal is obtained in multiple third moments, it is determined that the first signal and the second signal are generated by different light sources, and the third signal is a representation that the infrared detector detects the presence of a target infrared light source in the first target area; if the third signal is not obtained in multiple third moments, it is determined that the first signal and the second signal are generated by the same light source.

[0079] Specifically, based on the above description, if the interfering light source enters the first target area, it will trigger the photoresistor to send a first signal to the microprocessor. If the interfering light source causes an accidental triggering of the infrared detector, the infrared detector will also send a second signal to the microprocessor. Furthermore, if the interfering light source continues to exist, the photoresistor will continue to be triggered and continue to send the first signal to the microprocessor, but the infrared detector will not be continuously triggered. The second signal sent by the infrared detector to the microprocessor by the accidental triggering of the interfering light source will only last for a short time. Even if the interfering light source can continue to exist, the infrared detector will not be continuously triggered, and when a new infrared light source enters the first target area at this time, it will also be triggered normally.

[0080] Based on the above principle, if the interfering light source corresponding to the first signal is generated and exists continuously before the infrared light source corresponding to the second signal is generated, and the reception time difference between the first signal and the second signal is less than the preset time difference range, it cannot be inferred that the first signal and the second signal come from the same light source. Therefore, the microprocessor determines multiple third moments before the first moment through the preset frequency. For example, if the preset frequency here is 20Hz, the microprocessor determines multiple third moments before the first moment at intervals of 0.05s. At each third moment, the microprocessor will try to obtain the signals sent by the photoresistor and the infrared detector.

[0081] If the microprocessor obtains the third signal indicating the presence of an interfering light source in the first target area at each of the multiple third moments, it proves that there is a continuous interfering light source in the first target area and it lasts for a period of time. At this time, it can be determined that the second signal is not mistakenly triggered by the interfering light source corresponding to the first signal. The third signal here is a signal sent by the photoresistor that is different from the aforementioned second signal. Therefore, if the third signal is obtained at multiple third moments, it is determined that the first signal and the second signal are generated by different light sources; if the third signal is not obtained at multiple third moments, it is determined that the first signal and the second signal are generated by the same light source.

[0082] It can be seen that in the embodiment of the present application, before determining whether the first signal and the second signal are from the same light source, it is first determined whether the interfering light source corresponding to the first signal has existed for a period of time. After determining that the interfering light source corresponding to the first signal has existed for a period of time, it is directly determined that the first signal and the second signal are generated by different light sources. There is no need to calculate the acquisition time difference of the first signal and the second signal, thereby improving the detection efficiency of the infrared detection system.

[0083] S204: If the second signal is a valid signal, the microprocessor determines that there is a vehicle in the first target area.

[0084] Specifically, if the microprocessor determines that the second signal is a valid signal, it can be determined that there is a vehicle in the first target area. Depending on the actual application scenario of the infrared detection system, the microprocessor will subsequently generate corresponding notification information to notify the user terminal. Figure 1 In the scenario shown, the notification message informs the user that an unknown vehicle has entered the residential area; if the infrared detection system is installed in the vehicle, the notification message informs the user that there are other vehicles in the target lane (i.e., the first target area), and the user should pay attention to avoid them.

[0085] The above application embodiment describes a vehicle detection method. When the second signal is a valid signal, it is determined that there is a vehicle in the first target area. Based on this, under the premise that the second signal is not a valid signal, the present application embodiment also provides another vehicle detection method. Please refer to Figure 5 , Figure 5 A flow chart of another vehicle detection method provided in an embodiment of the present application can be based on Figure 1 The application scenario shown is implemented, including steps S501-S504:

[0086] S501: The microprocessor obtains a first signal, where the first signal indicates that the photoresistor detects that there is an interfering light source in a first target area, where the first target area is an area within an effective detection range of the infrared detection system.

[0087] S502: The microprocessor acquires a second signal, where the second signal indicates that the infrared detector detects that there is a target infrared light source in the first target area.

[0088] S503: The microprocessor determines whether the second signal is a valid signal according to the first signal.

[0089] For the detailed description of steps S501-S503, please refer to the description of the aforementioned steps S201-S203 and related descriptions, which will not be repeated here.

[0090] S504: If the second signal is not a valid signal, the microprocessor determines that there is no vehicle in the first target area and records the second signal.

[0091] In a possible embodiment, the infrared detection system includes multiple photoresistors, and the multiple photoresistors are arranged in different directions; if the second signal is not a valid signal, the method also includes: obtaining multiple fourth moments, the fourth moment is the moment when any one of the multiple photoresistors detects the presence of an interfering light source in the first target area; determining the source direction of the interfering light source according to the multiple fourth moments; if the source direction of the interfering light source is the target direction, recording the duration of the second signal according to the second moment of the second signal; if the duration of the second signal is greater than the first preset duration, it is determined that there is a vehicle in the second target area, and the second target area is an area outside the effective detection range of the infrared detector and adjacent to the first target area.

[0092] Specifically, as described above, when there is a continuous interfering light source in the first target area, the photoresistor will continue to send a signal to the microprocessor to indicate that there is an interfering light source in the first target area. The interfering light source here may be the lights of passing vehicles, street lights on the road, or even sunlight interference caused by swaying tree shadows.

[0093] If the detection system includes a plurality of photoresistors arranged in different directions, the interference direction of the interfering light source can be determined according to the photoresistors, and then the specific type of the interfering light source can be determined according to the interference direction of the interfering light source.

[0094] For example, see Figure 6 , Figure 6 A structural schematic diagram of an infrared detection system provided in an embodiment of the present application shows that a first photoresistor 601 is arranged on the upper side of the infrared detection system, a second photoresistor 602 is arranged on the left side, and a third photoresistor 603 is arranged on the right side. Three different photoresistors are used to determine the interference direction of the interfering light source so that the microprocessor can further determine whether there is a vehicle in the first target area based on the interference direction in combination with the second signal sent by the infrared detector. If the interfering light source interferes with the infrared detection system from the right side, when the interfering light source illuminates the infrared detection system, the third photoresistor 603 arranged on the right side will first trigger to send a first signal to the microprocessor, and the first photoresistor 601 arranged on the upper side and the second photoresistor 602 arranged on the left side will be triggered later or not triggered. Therefore, the microprocessor can determine the interference direction of the interfering light source according to the fourth moment when the signal corresponding to each photoresistor is received.

[0095] The target direction here is determined by the direction set by the infrared detection system, see Figure 7 , Figure 7 An example diagram of the principle of determining the target direction provided by an embodiment of the present application is shown in the figure. As shown in the figure, the detection direction of the infrared detection system is the front, the right side of the infrared detection system is the residential area and the road in the residential area, and the left side of the infrared detection system is the public road. Figure 7The infrared detection system is shown installed with the target direction to the left.

[0096] If the source direction of the interfering light source is the target direction, it can be determined that the interfering light source is the headlight of the vehicle, and the duration of the second signal is recorded. If the duration of the second signal is not greater than the first preset duration, it can be determined that the vehicle is just passing by the infrared detection system. If the duration of the second signal is greater than the first preset duration, it can be determined that although the vehicle has not entered the first target area, the target vehicle has been parked in the second target area near the first target area for a long time, and the vehicle may have the intention to enter the residential area, so the microprocessor further generates a notification message to notify the user that there is a vehicle in the second target area.

[0097] It can be seen that in the embodiment of the present application, the interference direction and duration of the interference light source are used to determine whether there is a vehicle in the second target area outside the effective detection range of the infrared detection system, thereby improving the detection range of the infrared detection system and ensuring the safety of the user.

[0098] In a possible embodiment, if the second signal is not a valid signal, the method also includes: if there are other second signals that are judged not to be valid signals within a second preset time period before the second moment, marking the second signal as a continuous signal; if the number of second signals marked as continuous signals is greater than the preset number, obtaining multiple first signals corresponding to the second signals marked as continuous signals; obtaining multiple light intensity data corresponding to the multiple first signals corresponding to the second signals marked as continuous signals; calculating the difference rate between the multiple light intensity data and the target light intensity data; if the difference rate is less than the preset difference rate, determining that there are multiple vehicles passing continuously in the first target area.

[0099] Specifically, if there are other second signals that are judged not to be valid signals within the second preset time period before the second moment, it proves that there are multiple interfering light sources that continue to interfere with the infrared detection system in a short period of time. The multiple interfering light sources here may be generated by passing vehicles or may be caused by multiple vehicles entering the first target area in succession.

[0100] See also Figure 8 , Figure 8 A schematic diagram of a scenario in which multiple vehicles pass through a first target area is provided for an embodiment of the present application. When multiple vehicles enter the first target area in sequence, when the front vehicle passes through the infrared detection system and triggers the infrared detector, the headlights of the rear vehicle just trigger the photoresistor, which may cause the infrared detection system to determine that the second signal triggered by the front vehicle is not a valid signal.

[0101] To avoid the above situation, if there are other second signals that are judged not to be valid signals within the second preset time period before the second moment, the second signal will be marked as a continuous signal; in addition, if there are no other second signals that are judged not to be valid signals within the second preset time period before the second moment, all continuous signals will be cleared.

[0102] If the number of second signals marked as continuous signals is greater than the preset number, it is necessary to determine whether there is a possibility that multiple vehicles enter the first target area in sequence. The preset number here is specifically 2, 3, 4, etc. At this time, multiple light intensity data corresponding to multiple first signals corresponding to the second signal marked as continuous signals are obtained. The light intensity data here is generated based on the photoresistor, and the light intensity data corresponding to each first signal is sent to the microprocessor at the same time as the corresponding first signal or is obtained by the microprocessor based on the first signal.

[0103] The microprocessor calculates the difference rate between the multiple light intensity data and the target light intensity data; if the difference rate is less than the preset difference rate, it is determined that there are multiple vehicles passing through the first target area continuously. The target light intensity data here is the standard target light intensity data generated by the multiple vehicles passing through the first area continuously in advance, including multiple light intensity data collected in time sequence. The microprocessor calculates the difference rate between the multiple light intensity data corresponding to the multiple first signals and the target light intensity sequence through an algorithm, or generates images of the multiple light intensity data corresponding to the multiple first signals and the target light intensity data respectively, and calculates the difference rate through an image algorithm. The difference rate mentioned here refers to the difference rate between the target light intensity data and the closest part of the multiple light intensity data corresponding to the multiple first signals, and does not refer to the difference rate between the target light intensity data and the multiple light intensity data corresponding to the multiple first signals as a whole. If the difference rate is less than the preset difference rate, it is determined that there are multiple vehicles passing through the first target area continuously.

[0104] For example, see Fig. 9 , Fig. 9A comparative schematic diagram of illumination intensity data provided for an embodiment of the present application, wherein the dotted line image corresponds to the data corresponding to the target illumination intensity data, and the solid line image is the data corresponding to the multiple illumination intensities corresponding to the multiple first signals. According to the image corresponding to the target illumination intensity data, it can be seen that when multiple vehicles pass through the first target area continuously, as the distance of the first vehicle from the infrared detection system gradually decreases, the illumination intensity gradually increases, and when the first vehicle is closest to the infrared detection system, the illumination intensity reaches the highest value, and then the vehicle passes through the detection range of the infrared detection system, and the illumination intensity decreases rapidly. It can be seen that the images corresponding to the multiple illumination intensity data corresponding to the multiple first signals basically conform to the images corresponding to the target illumination intensity data, and it is not difficult to understand that the difference rate between the multiple illumination intensity data corresponding to the multiple first signals and the target illumination intensity data is also less than the preset difference rate. The microprocessor thereby determines that there are multiple vehicles passing continuously in the first target area. Then a notification message is generated to notify the target user.

[0105] It can be seen that in the embodiment of the present application, when multiple second signals are judged not to be valid signals, the microprocessor determines whether the multiple second signals are caused by the continuous passage of multiple vehicles through the difference rate between the light intensity data corresponding to the multiple second signals and the target light intensity data, thereby solving the problem of misjudgment of the infrared detection system caused by multiple second signals and further improving the detection accuracy of the infrared detection device.

[0106] Furthermore, the second preset time length here is determined based on the road type of the first target area. Before obtaining the first signal, the microprocessor obtains the road type and vehicle type of the first target area, where the road type includes one of a low-speed road, a medium-speed road and a high-speed road, and the vehicle type includes one of a small vehicle and a large vehicle; the microprocessor determines the second preset time length based on the road type and vehicle type of the first target area.

[0107] For example, if the infrared detection system is installed at the entrance of the residential area, the road type of the first target area obtained by the microprocessor is a low-speed road. The vehicle type in the first target area represents the most common vehicle in the first target area. If the vehicle type here is a small vehicle, the second preset time can be determined based on the average body length of the careful vehicle (usually 4-5m) and the average speed of the low-speed road (usually 20-40km / h). Considering that multiple vehicles passing continuously usually maintain a distance of 1-2 vehicles, it can be determined that the road type in the first target area is a low-speed road. Under the condition that the vehicle type is a small vehicle, the microprocessor can determine the corresponding second preset time to be 1-3s.

[0108] In a possible embodiment, after determining that there are multiple vehicles passing continuously in the first target area, the method also includes: determining target data from multiple light intensity data, the target data being data that is greater than all adjacent data after the multiple light intensity data are arranged in chronological order; and determining the number of vehicles passing continuously in the first target area based on the number of target data.

[0109] Specifically, after determining that there are a plurality of vehicles that continuously pass through the first target area, the microprocessor can further determine the specific number of the vehicles that continuously pass through according to the plurality of light intensity data.

[0110] The microprocessor determines the target data from the multiple illumination intensity data, and the target data is the data that is greater than all adjacent data after the multiple illumination intensity data are arranged in chronological order. Fig. 9 The target data is two upper vertices in the image corresponding to the multiple illumination intensity data corresponding to the multiple first signals. The illumination intensity corresponding to each vertex is the illumination intensity value measured by the photoresistor when the corresponding vehicle is at the closest distance to the infrared detection system.

[0111] At the same time, when multiple vehicles pass continuously, the last vehicle will not be disturbed by the lights of other vehicles when passing through the infrared detection system. Therefore, the number of vehicles that pass continuously in the first target area is the number of target data plus 1.

[0112] Furthermore, the microprocessor determines the number of vehicles that have continuously passed through the first target area according to the number of target data, sends the number of vehicles that have continuously passed through the first target area to the terminal device, and continuously obtains new light intensity data; if the number of target data in the multiple light intensity data changes, the new number of vehicles is determined and sent to the terminal device. The user can judge the identity of the vehicle according to the number of vehicles and whether an alarm is required. This further ensures the safety of the user.

[0113] By implementing the method in the above application embodiment, it can be seen that the accuracy of the infrared detection system is improved by judging whether the second signal of the infrared detector is a valid signal through the first signal of the photoresistor. After judging that the second signal is not a valid signal, judging whether there is a vehicle in the second target area and judging whether there are multiple vehicles passing through the first target area continuously further improves the accuracy of the infrared detection system.

[0114] Based on the description of the above configuration method embodiment, the present application also provides a second microprocessor 1000, which can be running on Figure 1 The first microprocessor 1011 is shown and is used to execute Figure 2 and Figure 5 See the method shown in Fig.10 , Fig.10 The schematic diagram of the structure of a second microprocessor provided in an embodiment of the present application is as follows. The second microprocessor 1000 includes:

[0115] An acquisition unit 1001 is used to acquire a first signal, where the first signal indicates that the photoresistor detects that there is an interfering light source in a first target area, and the first target area is an area within an effective detection range of the infrared detection system.

[0116] A second signal is acquired, where the second signal indicates that the infrared detector detects that there is a target infrared light source in the first target area.

[0117] The judging unit 1002 is configured to judge whether the second signal is a valid signal according to the first signal.

[0118] The determination unit 1003 is configured to determine that there is a vehicle in the first target area if the second signal is a valid signal.

[0119] In a possible embodiment, in terms of determining whether the second signal is a valid signal based on the first signal, the acquisition unit 1001 is further specifically used to: acquire a first moment when the first signal is received and a second moment when the second signal is received; the judgment unit 1002 is further specifically used to: if the first moment is not before the second moment, determine that the second signal is a valid signal; if the first moment is before the second moment, determine whether the first signal and the second signal are generated by the same light source; the determination unit 1003 is further specifically used to: if the first signal and the second signal are generated by the same light source, determine that the second signal is not a valid signal; if the first signal and the second signal are generated by different light sources, determine that the second signal is a valid signal.

[0120] In a possible embodiment, in terms of determining whether the first signal and the second signal are generated by the same light source, the determination unit 1002 is further specifically used to: calculate the reception time difference between the first signal and the second signal based on the first moment and the second moment; if the reception time difference is not within a preset time difference range, determine that the first signal and the second signal are not generated by the same light source; if the reception time difference is within the preset time difference range, determine that the first signal and the second signal are generated by the same light source.

[0121] In a possible embodiment, the microprocessor obtains signals from the photoresistor and the infrared detector at a preset frequency. Before determining that the first signal and the second signal are generated by the same light source, the acquisition unit 1001 is also specifically used to: determine multiple third moments before the first moment according to the preset frequency; the determination unit 1003 is also used to: if the third signal is obtained in multiple third moments, then determine that the first signal and the second signal are generated by different light sources, and the third signal is a representation that the infrared detector detects the presence of a target infrared light source in the first target area; if the third signal is not obtained in multiple third moments, then determine that the first signal and the second signal are generated by the same light source.

[0122] In a possible embodiment, the infrared detection system includes multiple photoresistors, and the multiple photoresistors are arranged in different directions; if the second signal is not a valid signal, the acquisition unit 1001 is also specifically used to: obtain multiple fourth moments, the fourth moment is the moment when any one of the multiple photoresistors detects the presence of an interfering light source in the first target area; determine the source direction of the interfering light source according to the multiple fourth moments; if the source direction of the interfering light source is the target direction, record the duration of the second signal according to the second moment of the second signal; if the duration of the second signal is greater than the first preset duration, it is determined that there is a vehicle in the second target area, and the second target area is an area outside the effective detection range of the infrared detector and adjacent to the first target area.

[0123] In a possible embodiment, if the second signal is not a valid signal, the determination unit 1003 is further specifically used to: if there are other second signals that are judged not to be valid signals within a second preset time period before the second moment, then mark the second signal as a continuous signal; if the number of second signals marked as continuous signals is greater than a preset number, obtain multiple first signals corresponding to the second signals marked as continuous signals; obtain multiple light intensity data corresponding to the multiple first signals corresponding to the second signals marked as continuous signals; calculate the difference rate between the multiple light intensity data and the target light intensity data; if the difference rate is less than the preset difference rate, determine that there are multiple vehicles passing continuously in the first target area.

[0124] In a possible embodiment, after determining that there are multiple vehicles passing continuously in the first target area, the method also includes: determining target data from multiple light intensity data, the target data being data that is greater than all adjacent data after the multiple light intensity data are arranged in chronological order; and determining the number of vehicles passing continuously in the first target area based on the number of target data.

[0125] Based on the description of the above method embodiment and device embodiment, please refer to Fig.11 , Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig.11 The electronic device 1100 shown (the electronic device 1100 may be a computer device, Figure 1 The first microprocessor 1011 shown includes a memory 1101, a processor 1102, a communication interface 1103 and a bus 1104. The memory 1101, the processor 1102 and the communication interface 1103 are connected to each other through the bus 1104.

[0126] The memory 1101 may be a read-only memory (ROM), a static storage device, a dynamic storage device or a random access memory (RAM).

[0127] The memory 1101 can store programs. When the program stored in the memory 1101 is executed by the processor 1102, the processor 1102 and the communication interface 1103 are used to execute the various steps of the vehicle detection method of the embodiment of the present application.

[0128] The processor 1102 can adopt a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), a graphics processing unit (GPU) or one or more integrated circuits to execute relevant programs to implement the functions required to be performed by the units in the electronic device 1100 of the embodiment of the present application, or to execute the vehicle detection method of the method embodiment of the present application.

[0129] The processor 1102 may also be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the vehicle detection method of the present application may be completed by an integrated logic circuit of hardware or software instructions in the processor 1102. The above-mentioned processor 1102 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in a decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 1101, and the processor 1102 reads the information in the memory 1101, and combines its hardware to complete the functions required to be performed by the units included in the electronic device 1100 of the embodiment of the present application, or executes the vehicle detection method of the method embodiment of the present application.

[0130] The communication interface 1103 uses a transceiver such as, but not limited to, a transceiver to implement communication between the electronic device 1100 and other devices or a communication network. For example, data can be acquired through the communication interface 1103 .

[0131] The bus 1104 may include a path for transmitting information between various components of the electronic device 1100 (eg, the memory 1101 , the processor 1102 , and the communication interface 1103 ).

[0132] It should be noted that although Fig.11 The electronic device 1100 shown only shows a memory 1101, a processor 1102, and a communication interface 1103. However, in the specific implementation process, those skilled in the art should understand that the electronic device 1100 also includes other devices necessary for normal operation. At the same time, according to specific needs, those skilled in the art should understand that the electronic device 1100 may also include hardware devices for implementing other additional functions. In addition, those skilled in the art should understand that the electronic device 1100 may also include only the devices necessary for implementing the embodiments of the present application, and does not necessarily include Fig.11 All devices shown in .

[0133] An embodiment of the present application further provides a chip, which includes a processor and a data interface. The processor reads instructions stored in a memory through the data interface to implement the vehicle detection method.

[0134] Optionally, as an implementation manner, the chip may further include a memory, in which instructions are stored, and the processor is used to execute the instructions stored in the memory. When the instructions are executed, the processor is used to execute the vehicle detection method.

[0135] An embodiment of the present application also provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is executed on a computer or a processor, the computer or the processor executes one or more steps in any of the above methods.

[0136] The embodiment of the present application further provides a computer program product including instructions. When the computer program product is executed on a computer or a processor, the computer or the processor executes one or more steps in any of the above methods.

[0137] Those skilled in the art will appreciate that the functions described in conjunction with the various illustrative logic blocks, modules, and algorithm steps disclosed herein can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions described in the various illustrative logic blocks, modules, and steps can be stored or transmitted as one or more instructions or codes on a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media, which corresponds to tangible media, such as data storage media, or includes any media that facilitates the transfer of computer programs from one place to another (e.g., based on a communication protocol). In this manner, computer-readable media may generally correspond to (1) non-temporary tangible computer-readable storage media, or (2) communication media, such as signals or carrier waves. Data storage media may be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, codes, and / or data structures for implementing the techniques described in this application. A computer program product may include a computer-readable medium.

[0138] As an example and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage, flash memory, or any other medium that can be used to store the desired program code in the form of instructions or data structures and can be accessed by a computer. Also, any connection is properly referred to as a computer-readable medium. For example, if instructions are transmitted from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio and microwave are included in the definition of media. However, it should be understood that the computer-readable storage media and data storage media do not include connections, carrier waves, signals or other temporary media, but are actually directed to non-temporary tangible storage media. As used herein, disks and optical disks include compact disks (CDs), laser optical disks, optical optical disks, digital versatile disks (DVDs), and Blu-ray disks, where disks typically reproduce data magnetically, while optical disks reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0139] Instructions may be executed by one or more processors, such as one or more digital signal processors (DSPs), general purpose microprocessors, application specific integrated circuits (ASICs), field programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuits. Thus, the term "processor" as used herein may refer to any of the aforementioned structures or any other structures suitable for implementing the techniques described herein. Additionally, in some aspects, the functions described by the various illustrative logic blocks, modules, and steps described herein may be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated in a combined codec. Moreover, the techniques may be fully implemented in one or more circuits or logic elements.

[0140] The techniques of the present application may be implemented in a variety of devices or apparatuses, including a wireless handset, an integrated circuit (IC), or a set of ICs (e.g., a chipset). Various components, modules, or units are described in the present application to emphasize the functional aspects of the device for performing the disclosed techniques, but they do not necessarily need to be implemented by different hardware units. In fact, as described above, the various units may be combined in an encoded hardware unit in conjunction with appropriate software and / or firmware, or provided by interoperating hardware units (including one or more processors as described above).

[0141] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the specific descriptions of the corresponding steps in the aforementioned method embodiments, and will not be repeated here.

[0142] It should be understood that in the description of the present application, unless otherwise specified, " / " indicates that the objects associated before and after are in an "or" relationship, for example, A / B can represent A or B; wherein A and B can be singular or plural. Also, in the description of the present application, unless otherwise specified, "multiple" refers to two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, wherein a, b, c can be single or multiple. In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second", etc. are used to distinguish the same items or similar items with substantially the same functions and effects. Those skilled in the art can understand that the words "first", "second", etc. do not limit the quantity and execution order, and the words "first", "second", etc. do not limit them to be necessarily different. Meanwhile, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete manner for ease of understanding.

[0143] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the division of the unit is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. The mutual coupling, direct coupling, or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0144] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0145] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a read-only memory (ROM), or a random access memory (RAM), or a magnetic medium, such as a floppy disk, a hard disk, a tape, a disk, or an optical medium, such as a digital versatile disc (DVD), or a semiconductor medium, such as a solid state disk (SSD), etc.

[0146] The above is only a specific implementation of the embodiment of the present application, but the protection scope of the embodiment of the present application is not limited thereto, and any changes or replacements within the technical scope disclosed in the embodiment of the present application should be included in the protection scope of the embodiment of the present application. Therefore, the protection scope of the embodiment of the present application should be based on the protection scope of the claims.

[0147] The device embodiments described above are merely illustrative, wherein the units and modules described as separate components may or may not be physically separated. In addition, some or all of the units and modules may be selected according to actual needs to achieve the purpose of the present embodiment. Those of ordinary skill in the art may understand and implement the present invention without creative effort.

[0148] The above is only a specific implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A vehicle detection method, characterized in that: A microprocessor is applied to an infrared detection system, wherein the infrared detection system further comprises a photoresistor and an infrared detector, and the infrared detection system is a lane alarm. The method comprises: Acquire a first signal, wherein the first signal indicates that the photoresistor detects that there is an interfering light source in a first target area, and the first target area is an area within an effective detection range of the infrared detection system; Acquire a second signal, where the second signal indicates that the infrared detector detects that there is a target infrared light source in the first target area; Determining whether the second signal is a valid signal according to the first signal specifically includes: obtaining a first moment when the first signal is received and a second moment when the second signal is received; if the first moment is not before the second moment, determining that the second signal is a valid signal; if the first moment is before the second moment, determining whether the first signal and the second signal are generated by the same light source; if the first signal and the second signal are generated by the same light source, the second signal is a false trigger signal caused by an interfering light source corresponding to the first signal, and determining that the second signal is not a valid signal; if the first signal and the second signal are generated by different light sources, determining that the second signal is a valid signal; If the second signal is a valid signal, it is determined that there is a vehicle in the first target area.

2. The method according to claim 1, characterized in that The determining whether the first signal and the second signal are generated by the same light source includes: Calculating a receiving time difference between the first signal and the second signal according to the first moment and the second moment; If the receiving time difference is not within the preset time difference range, determining that the first signal and the second signal are not generated by the same light source; If the receiving time difference is within a preset time difference range, it is determined that the first signal and the second signal are generated by the same light source.

3. The method according to claim 2, characterized in that The microprocessor obtains the signals of the photoresistor and the infrared detector at a preset frequency. Before determining that the first signal and the second signal are generated by the same light source, the method further includes: Determine a plurality of third moments before the first moment according to the preset frequency; If the third signal is obtained at the plurality of third moments, it is determined that the first signal and the second signal are generated by different light sources, and the third signal indicates that the infrared detector detects the presence of a target infrared light source in the first target area; If the third signal is not acquired at all of the plurality of third moments, it is determined that the first signal and the second signal are generated by the same light source.

4. The method according to any one of claims 1 to 3, characterized in that: The infrared detection system includes a plurality of photoresistors, and the plurality of photoresistors are arranged in different directions; if the second signal is not a valid signal, the method further includes: Acquire multiple fourth moments, where the fourth moment is the moment when any one of the multiple photoresistors detects that there is an interfering light source in the first target area; Determining a source direction of the interfering light source according to the multiple fourth moments; If the source direction of the interfering light source is the target direction, recording the duration of the second signal according to the second moment of the second signal; If the duration of the second signal is greater than the first preset duration, it is determined that there is a vehicle in the second target area, and the second target area is an area outside the effective detection range of the infrared detector and adjacent to the first target area.

5. The method according to any one of claims 1 to 3, characterized in that: If the second signal is not a valid signal, the method further includes: If there are other second signals that are determined not to be valid signals within a second preset time period before the second moment, marking the second signal as a continuous signal; If the number of the second signals marked as continuous signals is greater than a preset number, acquiring a plurality of first signals corresponding to the second signals marked as continuous signals; Acquire a plurality of light intensity data corresponding to a plurality of first signals corresponding to the second signal marked as a continuous signal; Calculating the difference rate between the plurality of illumination intensity data and the target illumination intensity data; If the difference rate is less than a preset difference rate, it is determined that there are a plurality of vehicles that continuously pass through the first target area.

6. The method according to claim 5, characterized in that After determining that there are a plurality of vehicles that continuously pass through the first target area, the method further includes: Determine target data from the plurality of illumination intensity data, the target data being data that is greater than all adjacent data after the plurality of illumination intensity data are arranged in chronological order; The number of vehicles that continuously pass through the first target area is determined according to the number of the target data.

7. A microprocessor, characterized in that: The microprocessor belongs to an infrared detection system, which also includes a photoresistor and an infrared detector. The infrared detection system is a lane alarm. The microprocessor includes: An acquisition unit is used to acquire a first signal, wherein the first signal indicates that the photoresistor detects that there is an interfering light source in a first target area, and the first target area is an area within an effective detection range of the infrared detection system; Acquire a second signal, where the second signal indicates that the infrared detector detects that there is a target infrared light source in the first target area; A judgment unit: used to judge whether the second signal is a valid signal according to the first signal, specifically comprising: obtaining a first moment when the first signal is received and a second moment when the second signal is received; if the first moment is not before the second moment, determining that the second signal is a valid signal; if the first moment is before the second moment, determining whether the first signal and the second signal are generated by the same light source; if the first signal and the second signal are generated by the same light source, the second signal is a false trigger signal caused by an interfering light source corresponding to the first signal, and determining that the second signal is not a valid signal; if the first signal and the second signal are generated by different light sources, determining that the second signal is a valid signal; A determination unit is configured to determine that there is a vehicle in the first target area if the second signal is a valid signal.

8. An electronic device, characterized in that: The method comprises a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the programs include instructions for executing the steps in the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Channel gate detection method, device and equipment and readable storage medium

    CN113627346A

  • High beam detection method and device and electronic equipment

    CN117746391A