A geomagnetic detection method and system for parking vehicles
By decomposing and weighting the geomagnetic signal, the problem of magnetic field disturbance and interference in geomagnetic sensors in dense areas of vehicles is solved, and a more accurate detection of vehicle status in parking spaces is achieved.
Patent Information
- Application Number
- CN202510837566.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2045-06-23
AI Technical Summary
In dense vehicle parking lots or roadside parking areas, existing geomagnetic sensors are susceptible to magnetic field disturbances and interference from changes in vehicle states in adjacent parking spaces, resulting in misdetection.
By decomposing the geomagnetic signal into several geomagnetic signal components, the magnetic field disturbance influencing factors caused by changes in vehicle state on adjacent parking spaces are analyzed, and the reconstruction weight of each geomagnetic signal component is determined based on the similarity and distance of the signal components, and the weighting and reconstruction are carried out to obtain the updated geomagnetic signal and reduce interference in adjacent parking spaces.
It improves the accuracy of vehicle status detection in parking spaces, reduces the magnetic field disturbance caused by changes in vehicle status of adjacent parking spaces, and ensures the accuracy of geomagnetic detection.
Smart Images

Figure CN120356344B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a method and system for geomagnetic detection of parking spaces and vehicles. Background Art
[0002] Outdoor parking space detection often uses geomagnetic detection technology. The core principle of geomagnetic detection is that vehicles disturb the Earth's magnetic field. Geomagnetic sensors detect this disturbance to determine whether a vehicle is parked in a parking space. Specifically, when a vehicle enters or parks in a parking space, its metal structure changes the intensity of the local geomagnetic field, and geomagnetic sensors can detect this change.
[0003] Existing problem: Since geomagnetic sensors are highly sensitive to magnetic fields when detecting vehicles, in densely populated parking lots or roadside parking areas, where multiple parking spaces are close together, the entry or exit of a vehicle in one parking space will cause significant magnetic field disturbances to the geomagnetic sensors in adjacent parking spaces. Due to the presence of magnetic field interference, the geomagnetic sensor may mistakenly interpret the magnetic field changes in the adjacent parking space as the vehicle status in the current parking space, resulting in false detections. Summary of the Invention
[0004] The present invention provides a method and system for geomagnetic detection of parking vehicles to solve the existing problems.
[0005] The present invention provides a method and system for geomagnetic detection of parking spaces and vehicles using the following technical solutions:
[0006] An embodiment of the present invention provides a method for geomagnetic detection of a parking space vehicle, the method comprising the following steps:
[0007] Obtaining the geomagnetic signal, geomagnetic background value, and distance between parking spaces for each parking space in the parking lot; the horizontal axis of the geomagnetic signal is time, and the vertical axis is geomagnetic field strength;
[0008] Decompose the geomagnetic signal of each parking space into several geomagnetic signal components; mark any parking space as the main parking space; and determine the magnetic field disturbance influence factor caused by the change in vehicle status in the adjacent parking spaces of the main parking space based on the comparison between all geomagnetic signal components corresponding to the main parking space;
[0009] Based on the similarity between all geomagnetic signal components corresponding to the main parking space and adjacent parking spaces, the distance between the parking spaces, and the magnetic field disturbance influence factor caused by the change in the state of vehicles in the adjacent parking spaces of the main parking space, the degree of influence of each geomagnetic signal component corresponding to the main parking space on the parking space status judgment is determined;
[0010] The reconstruction weight of each geomagnetic signal component corresponding to the main parking space is determined based on the degree of its contribution to the parking space status judgment. For the main parking space, all geomagnetic signal components are weightedly reconstructed based on the reconstruction weight of each geomagnetic signal component to obtain an updated geomagnetic signal. The status of the vehicle in the parking space is determined based on the difference between the updated geomagnetic signal and the geomagnetic background value.
[0011] Furthermore, the determination of the magnetic field disturbance influence factor caused by the change in the state of the vehicle in the adjacent parking space of the main parking space includes the following specific steps:
[0012] Preset the window length H, in any geomagnetic signal component, with any moment as the center, form a window of length H, obtain the normalized value of the variance of the geomagnetic field intensity at all moments in the window, as the high-frequency disturbance value at any moment, record the moment when the high-frequency disturbance value is greater than the preset disturbance threshold as the high-frequency disturbance moment, and record the moment when the high-frequency disturbance value is less than or equal to the preset disturbance threshold as the low-frequency stable moment, assign a label of 1 to the high-frequency disturbance moment, and assign a label of 0 to the low-frequency stable moment, forming a 01 sequence in chronological order;
[0013] In the 01 sequence corresponding to all geomagnetic signal components of the main parking space, obtain the number of 1s at the same moment and the component set consisting of the geomagnetic signal components corresponding to all 1s at the same moment, and construct a quantity sequence based on the number of 1s at all moments in chronological order;
[0014] Determine the complexity of the component type of each non-zero quantity value according to the component set of all moments corresponding to each non-zero quantity value in the quantity sequence;
[0015] According to the number of non-zero numerical values in the numerical sequence and the complexity of the component types of each non-zero numerical value, the influence factor of the magnetic field disturbance caused by the state change of the vehicle in the adjacent parking space of the main parking space is determined.
[0016] Furthermore, the method of determining the complexity of the component type of each non-zero quantity value according to the component set at all moments corresponding to each non-zero quantity value in the quantity sequence includes the following specific steps:
[0017] In the component set of all moments corresponding to the i-th non-zero quantity value in the quantity sequence, count the number of types of different geomagnetic signal components , then count the number of each geomagnetic signal component and take the maximum value of all geomagnetic signal components and minimum value ;
[0018] Get the maximum value The inverse proportional normalized value of is recorded as the first quantized value, and the minimum value is obtained. The normalized value is recorded as the second quantization value to obtain the number of types Subtract the difference of the i-th non-zero quantity value and record it as the first difference. The normalized value of the product of the mean of the first quantization value and the second quantization value and the first difference is recorded as the component type complexity of the i-th non-zero quantity value in the quantity sequence.
[0019] Furthermore, the method of determining the magnetic field disturbance influence factor caused by the change in the state of the vehicle in the adjacent parking space of the main parking space based on the number of non-zero numerical values in the numerical sequence and the complexity of the component type of each non-zero numerical value includes the following specific steps:
[0020] Obtain the ratio of the number of all non-zero quantity values in the quantity sequence to the length of the quantity sequence, recorded as the first ratio; obtain the ratio of the number of the i-th non-zero quantity value in the quantity sequence to the length of the quantity sequence, recorded as the second ratio; record the product of the component type complexity of the i-th non-zero quantity value in the quantity sequence, the i-th non-zero quantity value, and the second ratio as the first product of the i-th non-zero quantity value in the quantity sequence; obtain the product of the sum of the first products of all non-zero quantity values in the quantity sequence and the first ratio, recorded as the magnetic field disturbance influence factor caused by the change in the state of the vehicle in the adjacent parking space of the main parking space.
[0021] Furthermore, the step of determining the effect of each geomagnetic signal component corresponding to the main parking space on the parking space status judgment includes the following specific steps:
[0022] A threshold M of parking spaces is preset, and the first M parking spaces closest to the main parking space are obtained and recorded as adjacent parking spaces;
[0023] Among all the geomagnetic signal components of the main parking space and all adjacent parking spaces, the inverse proportional value of the Pearson correlation coefficient between any two geomagnetic signal components is used as the clustering distance to cluster all the geomagnetic signal components to obtain several clusters;
[0024] Obtain the energy value of each geomagnetic signal component at different frequencies, and take the sum of the energy values at all frequencies as the total energy value of each geomagnetic signal component;
[0025] In the xth cluster, obtain the parking space corresponding to the geomagnetic signal component with the largest total energy value, record it as the generated parking space of the xth cluster, and determine the credibility of the generated parking space of the xth cluster based on the total energy value of the geomagnetic signal component and the distance between the parking space corresponding to the geomagnetic signal component and the generated parking space of the xth cluster;
[0026] The degree of influence of the jth geomagnetic signal component on the parking space status judgment is determined based on the credibility of the parking space generated by the cluster in which the jth geomagnetic signal component corresponding to the main parking space is located, the total energy value of the jth geomagnetic signal component, and the magnetic field disturbance influence factor caused by the change in the vehicle status of the adjacent parking spaces of the main parking space.
[0027] Furthermore, the reliability of the parking space generated by the x-th cluster is determined based on the total energy value of the geomagnetic signal component and the distance between the parking space corresponding to the geomagnetic signal component and the parking space generated by the x-th cluster, including the following specific steps:
[0028] In the x-th cluster, the total energy values of all geomagnetic signal components are arranged from large to small to obtain a total energy value sequence. In the total energy value sequence, the distance between the parking space corresponding to the geomagnetic signal component corresponding to each total energy value and the parking space generated by the x-th cluster is obtained to obtain a distance sequence;
[0029] Obtain the inverse proportional value of the Pearson correlation coefficient between the total energy value sequence and the distance sequence of the x-th cluster, then obtain the mean of the Pearson correlation coefficients between all arbitrary two geomagnetic signal components in the x-th cluster, and record the normalized value of the product of the inverse proportional value and the mean as the credibility of the generated parking space of the x-th cluster.
[0030] Furthermore, the method of determining the extent to which the jth geomagnetic signal component affects the parking space status judgment based on the credibility of the parking space generated by the cluster in which the jth geomagnetic signal component corresponding to the main parking space is located, the total energy value of the jth geomagnetic signal component, and the magnetic field disturbance influence factor caused by the change in the vehicle status in the adjacent parking spaces of the main parking space, includes the following specific steps:
[0031] For the j-th geomagnetic signal component corresponding to the main parking space, obtain the normalized value of the product of the credibility of the parking space generated by the cluster in which the j-th geomagnetic signal component is located and the total energy value of the j-th geomagnetic signal component, and record it as the first normalized value. The normalized value of the product of the first normalized value and the magnetic field disturbance influence factor caused by the change in the state of the vehicle in the adjacent parking space of the main parking space is recorded as the parking space state judgment adjustment coefficient;
[0032] If the parking space in the cluster where the j-th geomagnetic signal component corresponding to the main parking space is located is the main parking space, then the sum of the preset constant and the parking space status judgment adjustment coefficient is recorded as the degree of effect of the j-th geomagnetic signal component on the parking space status judgment;
[0033] If the parking space in the cluster where the j-th geomagnetic signal component corresponding to the main parking space is located is not the main parking space, the difference between the preset constant and the parking space status judgment adjustment coefficient is recorded as the degree of effect of the j-th geomagnetic signal component on the parking space status judgment.
[0034] Furthermore, the step of determining the reconstruction weight of each geomagnetic signal component corresponding to the primary parking space includes the following specific steps:
[0035] Obtain the sum of the degrees of effect of all geomagnetic signal components corresponding to the main parking space on the parking space status judgment, and record the ratio of the degree of effect of the j-th geomagnetic signal component corresponding to the main parking space on the parking space status judgment to the sum as the reconstruction weight of the j-th geomagnetic signal component corresponding to the main parking space.
[0036] Furthermore, the method of determining the state of the vehicle in the parking space according to the difference between the updated geomagnetic signal and the geomagnetic background value includes the following specific steps:
[0037] When the difference between the geomagnetic field strength at the current moment and the geomagnetic background value of the main parking space in the updated geomagnetic signal of the main parking space is greater than the preset state judgment threshold, the state of the main parking space at the current moment is determined to be occupied;
[0038] When the difference between the geomagnetic field strength at the current moment in the updated geomagnetic signal of the main parking space and the geomagnetic background value of the main parking space is less than or equal to the preset state judgment threshold, the state of the main parking space at the current moment is determined to be vacant.
[0039] The present invention also proposes a geomagnetic detection system for parking vehicles, including a memory, a processor, and a computer program stored in the memory and runnable on the processor. The processor executes the computer program stored in the memory to implement the steps of the aforementioned method for geomagnetic detection of parking vehicles.
[0040] The beneficial effects of the technical solution of the present invention are:
[0041] In an embodiment of the present invention, the geomagnetic signal of each parking space in the parking lot is obtained, and the geomagnetic signal of each parking space is decomposed into several geomagnetic signal components. Any parking space is recorded as the main parking space, and based on the comparison between all the geomagnetic signal components corresponding to the main parking space, the influence factor of the magnetic field disturbance caused by the change of the vehicle status in the adjacent parking spaces of the main parking space is determined. In this way, the size of the magnetic field disturbance caused by the change of the vehicle status in the adjacent parking spaces present in the geomagnetic signal of the main parking space is determined, so as to ensure the effect of subsequently reducing the interference of the adjacent parking spaces. Combined with the similarity between all geomagnetic signal components corresponding to the main parking space and the adjacent parking spaces and the distance between the parking spaces, the degree of influence of each geomagnetic signal component corresponding to the main parking space on the parking space status judgment is determined, thereby determining the reconstruction weight of each geomagnetic signal component corresponding to the main parking space, and performing weighted reconstruction on all geomagnetic signal components of the main parking space to obtain an updated geomagnetic signal, thereby giving the geomagnetic signal component corresponding to the magnetic field disturbance caused by the change of the vehicle state in the main parking space a larger reconstruction weight, and giving the geomagnetic signal component corresponding to the magnetic field disturbance caused by the change of the vehicle state in the adjacent parking space a smaller reconstruction weight, so as to reduce the interference of the magnetic field disturbance caused by the change of the vehicle state in the adjacent parking space, and highlight the magnetic field disturbance information caused by the change of the vehicle state in the main parking space, thereby obtaining an accurate parking space vehicle status. So far, the present invention obtains an updated geomagnetic signal through weighted reconstruction to reduce the interference of the magnetic field disturbance caused by the change of the vehicle state in the adjacent parking space, and ensure the accuracy of geomagnetic detection of parking space vehicles. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0043] Figure 1 This is a flow chart of the steps of a method for geomagnetic detection of a parking space vehicle according to the present invention;
[0044] Figure 2 Schematic diagram of the geomagnetic sensor installed at each parking space;
[0045] Figure 3 Schematic diagram of the 01 sequence corresponding to all geomagnetic signal components of the main parking space. DETAILED DESCRIPTION
[0046] To further illustrate the technical means and effectiveness of the present invention in achieving its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, describes in detail a method and system for geomagnetic detection of parking vehicles according to the present invention, including its specific implementation, structure, features, and effectiveness. In the following description, references to "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
[0047] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0048] The following describes in detail a method and system for geomagnetic detection of parking spaces and vehicles provided by the present invention with reference to the accompanying drawings.
[0049] See also Figure 1 , which shows a flowchart of a method for geomagnetic detection of a parking space vehicle provided by one embodiment of the present invention, the method comprising the following steps:
[0050] Step S001: Acquire the geomagnetic signal, geomagnetic background value, and distance between parking spaces of each parking space in the parking lot; the horizontal axis of the geomagnetic signal is time, and the vertical axis is geomagnetic field intensity.
[0051] In any parking lot, a geomagnetic sensor is used to collect real-time geomagnetic signals at each parking space. The horizontal axis of the geomagnetic signal represents time, and the vertical axis represents geomagnetic field strength. The acquisition frequency is 1 Hz, and the acquisition period is the last 5 minutes before the current time. This is used as an example. The location coordinates of the geomagnetic sensor at each parking space are obtained using the Global Positioning System (GPS). The distance between the location coordinates of the geomagnetic sensors at the parking spaces is used as the distance between the parking spaces.
[0052] It should be noted that: when there is no vehicle in the parking space, the geomagnetic sensor will record a baseline value, namely the geomagnetic background value. This geomagnetic background value represents the strength of the earth's magnetic field when there is no car. In this embodiment, the baseline value of each parking space when there is no car will be continuously obtained, and the baseline value will be continuously updated, thereby adapting to environmental changes and improving the accuracy of detection. When a vehicle enters or exits a parking space, its metal structure will disturb the earth's magnetic field, causing the geomagnetic sensor to detect changes in the magnetic field strength. The geomagnetic sensor converts the detected magnetic field changes into electrical signals and sends them to the main controller or communication module, and then uploads them to the back-end management platform via a wireless network. The back-end management platform determines whether the parking space is occupied based on the feedback signal and updates the parking space status information. That is, by comparing the measured value and the baseline value, it is determined whether the parking space is occupied. Finally, the user can obtain parking space status information, such as the number of vacant parking spaces and their locations, through mobile phone APP or LED display screens and other devices. Schematic diagram of the geomagnetic sensor installed at each parking space, as shown Figure 2 shown.
[0053] Step S002: Decompose the geomagnetic signal of each parking space into several geomagnetic signal components; mark any parking space as the main parking space; and determine the magnetic field disturbance influence factor caused by the change in vehicle status in the adjacent parking spaces of the main parking space based on the comparison between all geomagnetic signal components corresponding to the main parking space.
[0054] It should be noted that in densely populated parking lots or roadside parking areas, where multiple parking spaces are close together, the entry or exit of a vehicle in one parking space can significantly disturb the geomagnetic sensors in adjacent spaces. This means that the geomagnetic signal from a geomagnetic sensor in one parking space may be superimposed with the magnetic field disturbance caused by changes in the state of vehicles in adjacent parking spaces. When a vehicle enters or exits a parking space, its metal structure generates instantaneous, high-frequency disturbances in the Earth's magnetic field. This disturbance manifests as sudden changes and peaks in the geomagnetic signal, which are typically most pronounced when a vehicle approaches or leaves the geomagnetic sensor. The background signal from the geomagnetic sensor itself is a low-frequency, stable signal when no vehicle is present. When a vehicle is completely parked in a parking space, its disturbance of the geomagnetic field stabilizes, and the signal detected by the geomagnetic sensor enters a stable, low-frequency state. Therefore, in this embodiment, the geomagnetic signal is first decomposed to obtain the magnetic field disturbance signal components caused by the changes in the status of vehicles in a certain parking space and its surrounding parking spaces, and further divide the significant magnetic field disturbance time periods from each magnetic field disturbance signal component, that is, each component corresponds to the time period of vehicles entering and exiting the parking space, so as to determine the magnetic field disturbance influence factor caused by the changes in the status of vehicles in the adjacent parking spaces of each parking space.
[0055] Preferably, in one embodiment of the present invention, the method for obtaining the magnetic field disturbance influence factor caused by the state change of the vehicle in the adjacent parking space of the main parking space includes:
[0056] The two-dimensional empirical mode decomposition method is used to decompose the geomagnetic signal of each parking space into several geomagnetic signal components.
[0057] Two-dimensional empirical mode decomposition (BEMD) is an analytical method for processing nonlinear and nonstationary signals. It decomposes complex signals into several intrinsic mode functions (IMFs) arranged from high to low frequency and a residual component (Residue, Res). This is a well-known technique, and the specific method will not be described here.
[0058] The preset window length H is 5, and this is used as an example for description.
[0059] In any geomagnetic signal component, a window of duration H is formed with any moment as the center, and the normalized value of the variance of the geomagnetic field intensity at all moments in the window is obtained as the high-frequency disturbance value at that moment.
[0060] In this embodiment, the minimum-maximum normalization method is used to normalize the variance of the geomagnetic field intensity at all times within the window. This is a well-known technology and the specific method will not be introduced here.
[0061] The preset disturbance threshold is 0.6, which is used as an example for description.
[0062] In any geomagnetic signal component, the moment when the high-frequency disturbance value is greater than the preset disturbance threshold is recorded as the high-frequency disturbance moment, and the moment when the high-frequency disturbance value is less than or equal to the preset disturbance threshold is recorded as the low-frequency stable moment. The label assigned to the high-frequency disturbance moment is 1, and the label assigned to the low-frequency stable moment is 0, forming a 01 sequence in chronological order.
[0063] Mark any parking space as the main parking space.
[0064] In the 01 sequence corresponding to all geomagnetic signal components of the main parking space, the number of 1s at the same moment and the component set consisting of the geomagnetic signal components corresponding to all 1s at the same moment are obtained. In chronological order, a quantity sequence is formed using the number of 1s at all moments.
[0065] In the component set of all moments corresponding to the i-th non-zero quantity value in the quantity sequence, count the number of types of different geomagnetic signal components , then count the number of each geomagnetic signal component and take the maximum value of all geomagnetic signal components and minimum value .
[0066] What needs to be explained is: the schematic diagram of the 01 sequence corresponding to all the geomagnetic signal components of the main parking space is as follows: Figure 3 As shown, Figure 3 MIF1, MIF2, MIF3, MIF4 and MIF5 are five geomagnetic signal components arranged from high frequency to low frequency obtained by decomposing the geomagnetic signal of the main parking space. Figure 3 The number of 1s in the first moment is 2, and the component set composed of the geomagnetic signal components corresponding to all 1s in the first moment is {IMF1, IMF3}. In chronological order, the number of 1s at all moments constitutes the quantity sequence {2, 2, 4, 3, 1, 2, 3, 3}. If the i-th non-zero quantity value is 2, the component set of all moments corresponding to the i-th non-zero quantity value in the quantity sequence is {{IMF1, IMF3}, {IMF1, IMF3}, {IMF2, IMF4}}. is 4, is 2, 1. In the quantity sequence, each value represents the number of high-frequency disturbances superimposed on different parking spaces at the corresponding moment. The greater the number of superimposed high-frequency disturbances, the more important it is to highlight the component corresponding to the primary parking space and suppress the interference components corresponding to adjacent parking spaces. If the value is 0, it means there is no high-frequency disturbance at the primary parking space at that moment.
[0067] Get the maximum value The inverse proportional normalized value of is recorded as the first quantized value, and the minimum value is obtained. The normalized value of is recorded as the second quantization value to obtain the number of types Subtract the difference of the i-th non-zero quantity value, record it as the first difference, and multiply the mean of the first quantized value and the second quantized value by the first difference The normalized value of , recorded as the component type complexity of the i-th non-zero quantity value in the quantity sequence.
[0068] It should be noted that: in this embodiment, As the maximum The inverse normalized value of As the minimum The normalized value of is the number of occurrences of the i-th non-zero quantity value in the quantity sequence, As a product The normalized value of is a linear normalization function used to normalize data values to between 0 and 1. This is described as an example. When the first difference is larger, it means that there are only two high-frequency disturbances superimposed at different times. The more complex the source of the high-frequency disturbance is, the more a better signal interference removal effect is needed. The maximum value is The smaller the minimum The larger it is, the more each geomagnetic signal component appears in the component set of all moments corresponding to the i-th non-zero value, that is, the more complex the superposition of high-frequency disturbances is. Therefore, the first difference is adjusted by the mean of the first quantization value and the second quantization value to obtain the complexity of the component type of the i-th non-zero value.
[0069] Get the ratio of the number of all non-zero quantity values in the quantity sequence to the length of the quantity sequence, record it as the first ratio, get the ratio of the number of the i-th non-zero quantity value in the quantity sequence to the length of the quantity sequence, record it as the second ratio, and calculate the complexity of the component type of the i-th non-zero quantity value in the quantity sequence, the i-th non-zero quantity value and the product of the second ratio, recorded as the first product of the i-th non-zero quantity value in the quantity sequence, obtain the product of the sum of the first products of all non-zero quantity values in the quantity sequence and the first ratio, and record it as the magnetic field disturbance influence factor caused by the change of the vehicle state in the adjacent parking space of the main parking space.
[0070] It should be noted that: the larger the first ratio is, the more high-frequency disturbances there are in the geomagnetic signal; the larger the non-zero value is, the more high-frequency disturbances are superimposed at the same time; the larger the second ratio is, the more high-frequency disturbances are superimposed at the same time. The more times high-frequency disturbances are superimposed, and the more complex the component types are, the greater the complexity of the component types under this number of high-frequency disturbance superpositions, that is, the greater the influence of the magnetic field disturbance caused by the change of vehicle status in the adjacent parking spaces, and the more it is necessary to highlight the component corresponding to the main parking space and suppress the interference component corresponding to the adjacent parking spaces.
[0071] Step S003: Based on the similarity between all geomagnetic signal components corresponding to the main parking space and adjacent parking spaces and the distance between the parking spaces, combined with the magnetic field disturbance influence factor caused by the change in the vehicle status in the adjacent parking spaces of the main parking space, the degree of influence of each geomagnetic signal component corresponding to the main parking space on the parking space status judgment is determined.
[0072] It should be noted that the above analysis is the impact of the magnetic field disturbance caused by the change in the state of the vehicle in the adjacent parking space superimposed on the geomagnetic signal of the main parking space. Further analysis is needed to determine the possibility that each geomagnetic signal component is a magnetic field disturbance component caused by the change in the state of the vehicle in the adjacent parking space, as well as the superimposed interference effect on the geomagnetic signal of the main parking space, so as to reduce the impact of the magnetic field disturbance caused by the change in the state of the vehicle in the adjacent parking space. That is, in the process of component reconstruction, the component with larger superimposed interference is given a smaller weight to highlight the component corresponding to the main parking space.
[0073] Preferably, in one embodiment of the present invention, a method for obtaining the degree of effect of each geomagnetic signal component corresponding to the main parking space on the parking space status judgment includes:
[0074] The preset parking space number threshold M is 10, and this is used as an example for description.
[0075] Get the first M parking spaces closest to the main parking space and record them as adjacent parking spaces.
[0076] Among all the geomagnetic signal components of the main parking space and all adjacent parking spaces, the inverse proportional value of the Pearson correlation coefficient between any two geomagnetic signal components is used as the clustering distance. The K-means clustering algorithm is used to cluster all the geomagnetic signal components to obtain several clusters.
[0077] It should be noted that the Pearson correlation coefficient and the K-means clustering algorithm are both well-known technologies, and the specific methods will not be introduced here. The value range of the Pearson correlation coefficient is between -1 and 1. Therefore, in this embodiment, the difference between 1 and the Pearson correlation coefficient is used as the inverse proportional value of the Pearson correlation coefficient, and this is used as an example for description. Since the Pearson correlation coefficient is related to the trend of the data and has nothing to do with the absolute size of the data, the data change trends of each component in the cluster are similar, while the difference in data size is unknown. When the geomagnetic sensor detects a vehicle, its signal strength is closely related to the distance between the vehicle and the sensor. As the distance increases, the signal energy decays rapidly, resulting in a decrease in the signal energy of high-frequency disturbances.
[0078] The fast Fourier transform is used to obtain the energy value of each geomagnetic signal component at different frequencies, and the sum of the energy values at all frequencies is taken as the total energy value of each geomagnetic signal component.
[0079] Among them, fast Fourier transform is a well-known technology, and the specific method will not be introduced here.
[0080] In the x-th cluster, the parking space corresponding to the geomagnetic signal component with the largest total energy value is obtained and recorded as the generating parking space of the x-th cluster.
[0081] It should be noted that the geomagnetic signal components in this cluster are generated by the parking space in which it is generated. These components are then picked up by the geomagnetic sensors of neighboring parking spaces, causing interference to those spaces. While BEMD is a powerful signal decomposition tool, it cannot guarantee the complete and accurate decomposition of all overlapping interference in all cases. Therefore, further analysis is required to determine whether the signal components in the clusters are geomagnetic disturbances caused by changes in the status of vehicles in the same parking space, as detected by different geomagnetic sensors. This is to determine the credibility of the parking spaces generated by each cluster.
[0082] In the xth cluster, the total energy values of all geomagnetic signal components are arranged from largest to smallest to obtain a total energy value sequence. In the total energy value sequence, the distance between the parking space corresponding to each geomagnetic signal component with the corresponding total energy value and the parking space generating the xth cluster is obtained to obtain a distance sequence. The distance between the same parking space is 0.
[0083] Get the inverse proportional value of the Pearson correlation coefficient of the total energy value sequence and the distance sequence of the x-th cluster, and then get the mean of the Pearson correlation coefficient between all two arbitrary geomagnetic signal components in the x-th cluster, and multiply the inverse proportional value by the mean. The normalized value of is recorded as the credibility of the parking space generated by the x-th cluster.
[0084] It should be noted that: in this embodiment, the difference between 1 and the Pearson correlation coefficient is still used as the inverse proportional value of the Pearson correlation coefficient. As a product The normalized value of is a linear normalization function used to normalize data values to between 0 and 1. The closer the Pearson correlation coefficient between the total energy value sequence and the distance sequence is to -1, the more reliable the generated parking space in the x-th cluster is. The larger the mean, the more similar the changing trends of the geomagnetic signal components in the clusters are. In other words, it is more likely that the geomagnetic disturbances collected by different geomagnetic sensors for the same parking space are detected. Therefore, the mean is used as the adjustment value for the inverse proportional value to obtain the reliability of the generated parking space.
[0085] For the j-th geomagnetic signal component corresponding to the main parking space, obtain the normalized value of the product of the credibility of the parking space generated by the cluster in which the j-th geomagnetic signal component is located and the total energy value of the j-th geomagnetic signal component, which is recorded as the first normalized value. The normalized value of the product of the first normalized value and the magnetic field disturbance influence factor caused by the change in the vehicle status in the adjacent parking space of the main parking space is recorded as the parking space status judgment adjustment coefficient.
[0086] The preset constant is 1, and this is used as an example for description.
[0087] If the parking space generated by the cluster in which the j-th geomagnetic signal component corresponding to the main parking space is located is the main parking space, the sum of the preset constant and the parking space status judgment adjustment coefficient is recorded as the degree of effect of the j-th geomagnetic signal component on the parking space status judgment.
[0088] If the parking space in the cluster where the j-th geomagnetic signal component corresponding to the main parking space is located is not the main parking space, the difference between the preset constant and the parking space status judgment adjustment coefficient is recorded as the degree of effect of the j-th geomagnetic signal component on the parking space status judgment.
[0089] What needs to be explained is that: when the parking space of the cluster in which the j-th geomagnetic signal component corresponding to the main parking space is located is the main parking space, the greater the influence factor of the magnetic field disturbance caused by the change in the state of the vehicle in the adjacent parking space of the main parking space is, the more necessary it is to highlight the component corresponding to the main parking space. The greater the credibility of the parking space generated by the cluster in which the j-th geomagnetic signal component is located, the more likely the j-th geomagnetic signal component is to be the magnetic field disturbance caused by the change in the state of the vehicle in the main parking space. At this time, the greater the total energy value of the j-th geomagnetic signal component is, the greater the energy in the j-th geomagnetic signal component is, and the more necessary it is to highlight this component during reconstruction. Therefore, the sum of the preset constant and the parking space state judgment adjustment coefficient is used as the degree of influence of the j-th geomagnetic signal component on the parking space state judgment. When the parking space generated by the cluster where the j-th geomagnetic signal component corresponding to the main parking space is located is not the main parking space, the greater the influence factor of the magnetic field disturbance caused by the change in the state of the vehicle in the adjacent parking space of the main parking space, the more it is necessary to suppress the interference component corresponding to the adjacent parking space. The greater the credibility of the parking space generated by the cluster where the j-th geomagnetic signal component is located, the more likely the j-th geomagnetic signal component is to be the magnetic field disturbance caused by the change in the state of the vehicle in the adjacent parking space of the main parking space. At this time, the greater the total energy value of the j-th geomagnetic signal component, the greater the interference of the adjacent parking space. Therefore, the difference between the preset constant and the parking space state judgment adjustment coefficient is used as the degree of influence of the j-th geomagnetic signal component on the parking space state judgment.
[0090] According to the above method, the effect of each geomagnetic signal component corresponding to the main parking space on the parking space state judgment is obtained.
[0091] Step S004: Determine the reconstruction weight of each geomagnetic signal component corresponding to the main parking space based on the degree of effect of each geomagnetic signal component corresponding to the main parking space on the parking space status judgment; for the main parking space, perform weighted reconstruction on all geomagnetic signal components based on the reconstruction weight of each geomagnetic signal component to obtain an updated geomagnetic signal; determine the status of the vehicle in the parking space based on the difference between the updated geomagnetic signal and the geomagnetic background value.
[0092] Preferably, in one embodiment of the present invention, the method for obtaining the parking space vehicle status includes:
[0093] Obtain the sum of the degrees of effect of all geomagnetic signal components corresponding to the main parking space on the parking space status judgment, and record the ratio of the degree of effect of the j-th geomagnetic signal component corresponding to the main parking space on the parking space status judgment to the sum as the reconstruction weight of the j-th geomagnetic signal component corresponding to the main parking space.
[0094] For the main parking space, all geomagnetic signal components are weighted reconstructed according to the reconstruction weight of each geomagnetic signal component to obtain an updated geomagnetic signal.
[0095] It should be noted that the reconstruction process is a key step in the two-dimensional empirical mode decomposition method. Its core idea is to recombine all the decomposed IMFs and residual components to achieve a signal as close to the original signal as possible. In this embodiment, by assigning reconstruction weights, the updated geomagnetic signal reduces the interference of magnetic field disturbances caused by changes in the status of vehicles in adjacent parking spaces and highlights the magnetic field disturbance information caused by changes in the status of vehicles in the main parking space.
[0096] The preset status judgment threshold is 20, and this is used as an example for description.
[0097] When the difference between the geomagnetic field strength at the current moment in the updated geomagnetic signal of the main parking space and the geomagnetic background value of the main parking space is greater than the preset state judgment threshold, the state of the main parking space at the current moment is determined to be occupied.
[0098] When the difference between the geomagnetic field strength at the current moment in the updated geomagnetic signal of the main parking space and the geomagnetic background value of the main parking space is less than or equal to the preset state judgment threshold, the state of the main parking space at the current moment is determined to be vacant.
[0099] In this way, the status information of each parking space in the parking lot at every moment can be obtained, so that users can obtain parking space status information, such as the number of vacant parking spaces and their locations, through mobile phone APPs and LED display screens and other devices.
[0100] The present invention also provides a geomagnetic detection system for parking vehicles, comprising a memory, a processor, and a computer program stored in the memory and runnable on the processor. The processor executes the computer program stored in the memory to implement the steps of the aforementioned method for geomagnetic detection of parking vehicles.
[0101] So far, the present invention is completed.
[0102] In summary, in an embodiment of the present invention, the geomagnetic signal of each parking space in the parking lot is obtained, the geomagnetic signal of each parking space is decomposed into several geomagnetic signal components, and any parking space is recorded as the main parking space. According to the comparison between all the geomagnetic signal components corresponding to the main parking space, the magnetic field disturbance influence factor caused by the change of the vehicle state in the adjacent parking space of the main parking space is determined. Combined with the similarity between all the geomagnetic signal components corresponding to the main parking space and the adjacent parking space and the distance between the parking spaces, the degree of effect of each geomagnetic signal component corresponding to the main parking space on the parking space state judgment is determined, thereby determining the reconstruction weight of each geomagnetic signal component corresponding to the main parking space, performing weighted reconstruction on all the geomagnetic signal components of the main parking space, and obtaining an updated geomagnetic signal to determine the state of the vehicle in the parking space. The present invention obtains an updated geomagnetic signal through weighted reconstruction to reduce the interference of the magnetic field disturbance caused by the change of the vehicle state in the adjacent parking space, thereby ensuring the accuracy of geomagnetic detection of the vehicle in the parking space.
[0103] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for geomagnetic detection of parking vehicles, characterized in that: The method comprises the following steps: Obtaining the geomagnetic signal, geomagnetic background value, and distance between parking spaces for each parking space in the parking lot; the horizontal axis of the geomagnetic signal is time, and the vertical axis is geomagnetic field strength; Decompose the geomagnetic signal of each parking space into several geomagnetic signal components; mark any parking space as the main parking space; and determine the magnetic field disturbance influence factor caused by the change in vehicle status in the adjacent parking spaces of the main parking space based on the comparison between all geomagnetic signal components corresponding to the main parking space; Based on the similarity between all geomagnetic signal components corresponding to the main parking space and adjacent parking spaces, the distance between the parking spaces, and the magnetic field disturbance influence factor caused by the change in the state of vehicles in the adjacent parking spaces of the main parking space, the degree of influence of each geomagnetic signal component corresponding to the main parking space on the parking space status judgment is determined; The reconstruction weight of each geomagnetic signal component corresponding to the main parking space is determined based on the degree of its contribution to the parking space status judgment. For the main parking space, all geomagnetic signal components are weightedly reconstructed based on the reconstruction weight of each geomagnetic signal component to obtain an updated geomagnetic signal. The status of the vehicle in the parking space is determined based on the difference between the updated geomagnetic signal and the geomagnetic background value.
2. The method for geomagnetic detection of parking spaces and vehicles according to claim 1, characterized in that: The specific steps of determining the magnetic field disturbance influence factor caused by the change in the state of the vehicle in the adjacent parking space of the main parking space are as follows: Preset the window length H, in any geomagnetic signal component, with any moment as the center, form a window of length H, obtain the normalized value of the variance of the geomagnetic field intensity at all moments in the window, as the high-frequency disturbance value at any moment, record the moment when the high-frequency disturbance value is greater than the preset disturbance threshold as the high-frequency disturbance moment, and record the moment when the high-frequency disturbance value is less than or equal to the preset disturbance threshold as the low-frequency stable moment, assign a label of 1 to the high-frequency disturbance moment, and assign a label of 0 to the low-frequency stable moment, forming a 01 sequence in chronological order; In the 01 sequence corresponding to all geomagnetic signal components of the main parking space, obtain the number of 1s at the same moment and the component set consisting of the geomagnetic signal components corresponding to all 1s at the same moment, and construct a quantity sequence based on the number of 1s at all moments in chronological order; Determine the complexity of the component type of each non-zero quantity value according to the component set of all moments corresponding to each non-zero quantity value in the quantity sequence; According to the number of non-zero numerical values in the numerical sequence and the complexity of the component types of each non-zero numerical value, the influence factor of the magnetic field disturbance caused by the state change of the vehicle in the adjacent parking space of the main parking space is determined.
3. The method for geomagnetic detection of parking spaces and vehicles according to claim 2, characterized in that: The specific steps of determining the complexity of the component type of each non-zero quantity value according to the component set of all moments corresponding to each non-zero quantity value in the quantity sequence include the following: In the component set of all moments corresponding to the i-th non-zero quantity value in the quantity sequence, count the number of types of different geomagnetic signal components , then count the number of each geomagnetic signal component and take the maximum value of all geomagnetic signal components and minimum value ; Get the maximum value The inverse proportional normalized value of is recorded as the first quantized value, and the minimum value is obtained. The normalized value of is recorded as the second quantization value, and the number of types is obtained. Subtract the difference of the i-th non-zero quantity value and record it as the first difference. The normalized value of the product of the mean of the first quantization value and the second quantization value and the first difference is recorded as the component type complexity of the i-th non-zero quantity value in the quantity sequence.
4. The method for geomagnetic detection of parking spaces and vehicles according to claim 2, characterized in that: The method of determining the magnetic field disturbance influence factor caused by the change in the state of the vehicle in the adjacent parking space of the main parking space based on the number of non-zero numerical values in the numerical sequence and the complexity of the component types of each non-zero numerical value includes the following specific steps: Obtain the ratio of the number of all non-zero quantity values in the quantity sequence to the length of the quantity sequence, recorded as the first ratio; obtain the ratio of the number of the i-th non-zero quantity value in the quantity sequence to the length of the quantity sequence, recorded as the second ratio; record the product of the component type complexity of the i-th non-zero quantity value in the quantity sequence, the i-th non-zero quantity value, and the second ratio as the first product of the i-th non-zero quantity value in the quantity sequence; obtain the product of the sum of the first products of all non-zero quantity values in the quantity sequence and the first ratio, recorded as the magnetic field disturbance influence factor caused by the change in the state of the vehicle in the adjacent parking space of the main parking space.
5. The method for geomagnetic detection of parking spaces and vehicles according to claim 1, characterized in that: The specific steps of determining the effect of each geomagnetic signal component corresponding to the main parking space on the parking space status judgment include the following: A threshold M of parking spaces is preset, and the first M parking spaces closest to the main parking space are obtained and recorded as adjacent parking spaces; Among all the geomagnetic signal components of the main parking space and all adjacent parking spaces, the inverse proportional value of the Pearson correlation coefficient between any two geomagnetic signal components is used as the clustering distance to cluster all the geomagnetic signal components to obtain several clusters; Obtain the energy value of each geomagnetic signal component at different frequencies, and take the sum of the energy values at all frequencies as the total energy value of each geomagnetic signal component; In the xth cluster, obtain the parking space corresponding to the geomagnetic signal component with the largest total energy value, record it as the generated parking space of the xth cluster, and determine the credibility of the generated parking space of the xth cluster based on the total energy value of the geomagnetic signal component and the distance between the parking space corresponding to the geomagnetic signal component and the generated parking space of the xth cluster; The degree of influence of the jth geomagnetic signal component on the parking space status judgment is determined based on the credibility of the parking space generated by the cluster in which the jth geomagnetic signal component corresponding to the main parking space is located, the total energy value of the jth geomagnetic signal component, and the magnetic field disturbance influence factor caused by the change in the vehicle status of the adjacent parking spaces of the main parking space.
6. The method for geomagnetic detection of parking spaces and vehicles according to claim 5, characterized in that: The process of determining the credibility of the parking space generated by the xth cluster according to the total energy value of the geomagnetic signal component and the distance between the parking space corresponding to the geomagnetic signal component and the parking space generated by the xth cluster includes the following specific steps: In the x-th cluster, the total energy values of all geomagnetic signal components are arranged from large to small to obtain a total energy value sequence. In the total energy value sequence, the distance between the parking space corresponding to the geomagnetic signal component corresponding to each total energy value and the parking space generated by the x-th cluster is obtained to obtain a distance sequence; Obtain the inverse proportional value of the Pearson correlation coefficient between the total energy value sequence and the distance sequence of the x-th cluster, then obtain the mean of the Pearson correlation coefficients between all arbitrary two geomagnetic signal components in the x-th cluster, and record the normalized value of the product of the inverse proportional value and the mean as the credibility of the generated parking space of the x-th cluster.
7. The method for geomagnetic detection of parking spaces and vehicles according to claim 5, characterized in that: The method of determining the degree of effect of the jth geomagnetic signal component on the parking space status judgment based on the credibility of the parking space generated by the cluster in which the jth geomagnetic signal component corresponding to the main parking space is located, the total energy value of the jth geomagnetic signal component, and the magnetic field disturbance influence factor caused by the change in the state of the vehicle in the adjacent parking space of the main parking space includes the following specific steps: For the j-th geomagnetic signal component corresponding to the main parking space, obtain the normalized value of the product of the credibility of the parking space generated by the cluster in which the j-th geomagnetic signal component is located and the total energy value of the j-th geomagnetic signal component, and record it as the first normalized value. The normalized value of the product of the first normalized value and the magnetic field disturbance influence factor caused by the change in the state of the vehicle in the adjacent parking space of the main parking space is recorded as the parking space state judgment adjustment coefficient; If the parking space in the cluster where the j-th geomagnetic signal component corresponding to the main parking space is located is the main parking space, then the sum of the preset constant and the parking space status judgment adjustment coefficient is recorded as the degree of effect of the j-th geomagnetic signal component on the parking space status judgment; If the parking space in the cluster where the j-th geomagnetic signal component corresponding to the main parking space is located is not the main parking space, the difference between the preset constant and the parking space status judgment adjustment coefficient is recorded as the degree of effect of the j-th geomagnetic signal component on the parking space status judgment.
8. The method for geomagnetic detection of parking spaces and vehicles according to claim 1, characterized in that: The specific steps of determining the reconstruction weight of each geomagnetic signal component corresponding to the main parking space include the following: Obtain the sum of the degrees of effect of all geomagnetic signal components corresponding to the main parking space on the parking space status judgment, and record the ratio of the degree of effect of the j-th geomagnetic signal component corresponding to the main parking space on the parking space status judgment to the sum as the reconstruction weight of the j-th geomagnetic signal component corresponding to the main parking space.
9. The method for geomagnetic detection of parking spaces and vehicles according to claim 1, characterized in that: The specific steps of determining the state of the vehicle in the parking space according to the difference between the updated geomagnetic signal and the geomagnetic background value are as follows: When the difference between the geomagnetic field strength at the current moment and the geomagnetic background value of the main parking space in the updated geomagnetic signal of the main parking space is greater than the preset state judgment threshold, the state of the main parking space at the current moment is determined to be occupied; When the difference between the geomagnetic field strength at the current moment in the updated geomagnetic signal of the main parking space and the geomagnetic background value of the main parking space is less than or equal to the preset state judgment threshold, the state of the main parking space at the current moment is determined to be vacant.
10. A geomagnetic detection system for parking vehicles, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is executed by a processor, the steps of the method for geomagnetic detection of a parking space vehicle as described in any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Parking space detection method and device, and terminal equipment
CN109272772A
Geomagnetic map and construction method and device thereof
CN112444253A