Data acquisition method based on Internet of Things technology

By employing protocol parsing, weighted fusion, and anomaly detection technologies, the compatibility and reliability issues of data acquisition from heterogeneous parking lot devices were resolved, achieving data standardization and integrity, and improving the reliability and operational efficiency of the data acquisition system.

CN120849347AInactive Publication Date: 2025-10-28JIANGSU SHENGDA INTELLIGENT TECH INFORMATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510974302.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-15
Publication Date
2025-10-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing parking lot data collection solutions suffer from poor equipment compatibility, inconsistent data standards, and strong network dependence, resulting in complex data collection system integration and insufficient reliability. In particular, data loss, false alarms, or missed alarms are prone to occur when the network is unstable.

Method used

A protocol parsing engine is used to uniformly parse heterogeneous devices and convert them into JSON format data. The parking space status is verified by a weighted fusion method, anomalies are detected by an isolated forest algorithm, and abnormal data is corrected by a long short-term memory network model. A fault-tolerant acquisition mechanism is built to achieve data standardization and reliability.

Benefits of technology

It achieves automatic adaptation of protocols for various heterogeneous devices and standardization of data formats, improves data availability and consistency, enhances the accuracy and reliability of parking space status judgment, provides the ability to intelligently detect and diagnose equipment faults, and ensures the integrity and reliability of parking lot data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120849347A_ABST
    Figure CN120849347A_ABST
Patent Text Reader

Abstract

The invention discloses a data acquisition method based on the Internet of Things technology, and relates to the technical field of data acquisition, and the method comprises the steps: obtaining a preliminary heterogeneous data set, and carrying out the standardization of the preliminary heterogeneous data set, and obtaining a standardized parking lot state data set; the occupancy states recognized by the geomagnetic sensor and the camera of the same parking space are compared, and if the occupancy states are inconsistent, a final parking space state result is determined based on historical accuracy; according to the final parking space state result, an abnormal parking space is recognized by applying an abnormal detection algorithm, the abnormal type and severity are evaluated, and an evaluation record of the equipment working state is formed; activating a fault-tolerant processing mechanism according to the evaluation record of the working state of the equipment, compensating the parking space state of the abnormal parking space, and constructing a complete parking lot state data set; the timeliness score of the complete parking lot state data set is calculated, if the timeliness score does not meet the timeliness requirement, the record is updated, final parking lot state data is generated, and reliable collection of parking lot data under the large-scale parking lot scene is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data acquisition technology, and in particular to a data acquisition method based on Internet of Things (IoT) technology. Background Technology

[0002] With the accelerating pace of urbanization, parking management in large buildings and industrial parks has become an important component of smart city construction. The deep application of IoT technology in parking scenarios is of decisive significance for alleviating urban parking problems and improving space utilization efficiency.

[0003] Current parking lot data collection solutions generally suffer from poor equipment compatibility, inconsistent data standards, and strong network dependence. Traditional solutions are often designed for single-vendor equipment, making it difficult to adapt to the real-world needs of deploying equipment from multiple brands. Furthermore, existing systems are prone to data loss when facing network fluctuations and lack effective data verification mechanisms, resulting in insufficient reliability of the collected information.

[0004] In practical deployments, parking lot environments utilize a variety of devices, including geomagnetic sensors, camera recognition terminals, and parking guidance displays, each employing different communication protocols and data formats. This heterogeneity in device protocols drastically increases the integration complexity of the data acquisition system. When the system cannot effectively handle multiple protocols, inconsistencies in data formats inevitably arise, making it difficult to uniformly process and analyze information such as parking space status and device operating parameters from different devices. This inconsistency further exacerbates reliability challenges during data acquisition, especially in unstable network environments. Systems lacking effective caching mechanisms and verification methods are highly susceptible to data loss, false alarms, or missed alarms.

[0005] Therefore, how to build an IoT data acquisition method that can automatically adapt to heterogeneous device protocols, achieve standardized data format processing, and has fault-tolerant acquisition and multi-source verification capabilities has become a key issue in solving the integration of devices and reliable data acquisition in large parking scenarios. Summary of the Invention

[0006] This application aims to at least partially address one of the technical problems in related technologies. To this end, one objective of this application is to propose a data acquisition method based on Internet of Things (IoT) technology, enabling reliable data acquisition from parking lots in large-scale parking scenarios.

[0007] One aspect of this application provides a data acquisition method based on Internet of Things (IoT) technology, comprising:

[0008] Step S100: Obtain a preliminary heterogeneous data set from the sensor devices in the parking lot, and standardize it to obtain a standardized parking lot status dataset;

[0009] Step S200: Compare the occupancy status identified by the geomagnetic sensor and camera for the same parking space. If the occupancy status is inconsistent, determine the final parking space status result based on the historical accuracy.

[0010] Step S300: Based on the final parking space status result, apply an anomaly detection algorithm to identify abnormal parking spaces, assess the anomaly type and severity, and generate an assessment record of the equipment's working status.

[0011] Step S400: Activate the fault tolerance mechanism based on the equipment working status evaluation record, compensate for the parking space status of abnormal parking spaces, and construct a complete parking lot status dataset.

[0012] Step S500: Calculate the timeliness score of the complete parking lot status dataset. If the timeliness score does not meet the timeliness requirements, update the records and generate the final parking lot status data.

[0013] The specific method for obtaining a preliminary heterogeneous data set from the sensor devices in the parking lot and standardizing it to obtain a standardized parking lot status dataset is as follows: The original communication protocol types and data packet structures are obtained from the in-park magnetic sensors, camera recognition terminals, and parking space guidance displays. A protocol parsing engine is used to uniformly parse different communication protocols, extracting device status information and parking space occupancy data to form a preliminary heterogeneous data set. The device status information includes device parameters, device ID, device operating status, and communication protocol. The parking space occupancy data includes parking space number, occupancy status, and corresponding timestamp. Field content of the device status information and parking space occupancy data is extracted from the preliminary heterogeneous data set to obtain a basic data group. Based on the basic data group, the extracted field content is converted into a unified JSON format data structure. If there are missing fields in the standardized data framework, they are supplemented through device parameter log records to determine if the field completeness meets the standard. If the field completeness meets the standard, the numerical range is verified, and the occupancy status and timestamp are obtained to determine if their values ​​are within a reasonable range. A standardized parking lot status dataset is constructed based on the verified basic data group.

[0014] The method for determining the final parking space status result is as follows:

[0015] Step S210: Obtain the parking space occupancy status by using a geomagnetic sensor and a camera to initially collect and record the occupancy status of the same parking space from two different data sources;

[0016] Step S220: Compare the occupancy status of parking spaces detected by the geomagnetic sensor and identified by the camera one by one to determine whether they are consistent;

[0017] Step S230: If the comparison results show that the two occupancy states are inconsistent, then obtain the historical accuracy rates of the geomagnetic sensor and camera recognition from the device database, and determine the confidence values ​​of the geomagnetic sensor detection and camera recognition respectively.

[0018] Step S240: For the confidence values, a weighted fusion method is used to calculate the combined confidence values ​​identified by the geomagnetic sensor and the camera, and a comprehensive confidence result is obtained.

[0019] Step S250: Based on the comprehensive confidence results, correct the occupancy status of parking spaces with inconsistent occupancy statuses to determine the final parking space status results;

[0020] The method for obtaining the evaluation record of the equipment's operating status is as follows:

[0021] Step S310: By obtaining real-time equipment status information from the parking space status monitoring system and combining it with the stored historical equipment status information, an initial dataset is formed, the data is initially integrated, and a structured set of status information is obtained.

[0022] Step S320: Based on the structured state information set, extract the current equipment parameters, and use the isolated forest algorithm to identify potential abnormal parking spaces by comparing and analyzing the equipment parameters with historical equipment parameters.

[0023] Step S330: Analyze the correlation between abnormal parking spaces and sensor failures, communication interruptions, and data mutations. If the deviation between the abnormal parking space and the historical equipment parameters is greater than or equal to the preset deviation threshold, it is marked as a suspected sensor failure, and a preliminary anomaly classification result is obtained.

[0024] Step S340: Based on the preliminary anomaly classification results, obtain the feature values ​​of the abnormal parking spaces, and match the feature values ​​with the communication interruption pattern. If the feature values ​​match the preset communication interruption characteristics, they are classified as communication interruption types, and the anomaly type classification is determined.

[0025] Step S350: Based on the anomaly type classification, statistically analyze the occurrence frequency and duration of each type of anomaly, assess the severity of the anomaly based on the occurrence frequency and duration, and obtain the anomaly impact level;

[0026] Step S360: Based on the level of impact of the anomaly and combined with the historical records of the equipment's operating status, analyze the stability of the current equipment parameters, determine the overall trend of the equipment's operating status, and generate an evaluation record;

[0027] The specific method for identifying potential abnormal parking spaces using the isolated forest algorithm is as follows:

[0028] Step S321: Clean and normalize the equipment parameters and historical equipment parameters to remove noise and outliers, and construct the original dataset;

[0029] Step S322: Set the number of trees and the number of subsamples for the isolated forest, randomly select samples from the original dataset, and construct an isolated tree; repeat this process to generate an isolated forest.

[0030] Step S323: For each sample x in the original dataset, calculate its average path length in each isolated tree. The path length is defined as the number of edges required to reach sample x from the root node.

[0031] Step S324: Calculate the anomaly score of sample x based on the average path length;

[0032] Step S325: Set an anomaly threshold. Mark the sample with an anomaly score greater than the anomaly threshold as an abnormal parking space and mark the corresponding parking space as an abnormal parking space.

[0033] The specific method for analyzing the correlation between abnormal parking spaces and sensor failures, communication interruptions, and data mutations is as follows: For each abnormal parking space, extract the corresponding abnormal features; calculate the correlation coefficient matrix between the abnormal features and sensor failures, communication interruptions, and data mutations, wherein the correlation coefficient matrix is ​​composed of the correlation coefficients between each abnormal feature and sensor failures, communication interruptions, and data mutations; based on the correlation coefficient matrix, identify the correlation between abnormal parking spaces and various types of faults, wherein the faults include sensor failures, communication interruptions, and data mutations.

[0034] The method for constructing the complete parking lot status dataset is as follows:

[0035] Step S410: If an abnormal parking space is detected, the fault tolerance mechanism is triggered to obtain the parking space occupancy data of adjacent parking spaces and calculate the preliminary corrected parking space status.

[0036] Step S420: Based on the preliminary corrected parking space status and combined with time series data, use a long short-term memory network model to predict the parking space status of the current abnormal parking spaces and determine the parking space status after further correction.

[0037] Step S430: Based on the further corrected parking space status, construct a complete parking lot status dataset;

[0038] The method for calculating the preliminary corrected parking space status is as follows: obtain the set of adjacent parking spaces and their parking space occupancy data; for each adjacent parking space, calculate its occupancy rate, which is the proportion of occupied time to total time; calculate the occupancy rate of abnormal parking spaces based on the occupancy rates of adjacent parking spaces; calculate the average occupancy rate of all adjacent parking spaces to obtain the average occupancy rate of adjacent parking spaces; if the average occupancy rate of adjacent parking spaces is greater than 50%, the abnormal parking space is considered to be occupied; if the average occupancy rate of adjacent parking spaces is less than or equal to 50%, the abnormal parking space is considered to be vacant, thus obtaining the preliminary corrected parking space status.

[0039] The method for determining the further corrected parking space status is as follows: For abnormal parking spaces, collect their historical parking space occupancy data, arrange their occupancy status in chronological order to form a time series, divide the time series into fixed-length time windows, and each time window represents a historical occupancy pattern; use an LSTM model to further correct the parking space status of abnormal parking spaces, take the time series of historical parking space occupancy data of abnormal parking spaces as the input of the LSTM model, and predict the parking space status of abnormal parking spaces at the current moment as the further corrected parking space status;

[0040] The specific method for generating the final parking lot status data is as follows:

[0041] Step S510: Based on the complete parking lot status dataset, for each record, extract its timestamp, calculate the difference between the timestamp of the record and the previous record. If the difference between the timestamps is greater than or equal to the update frequency threshold, it is considered to not meet the timeliness requirements, and the data update process is triggered.

[0042] Step S520: For each record that needs to be updated, obtain the latest parking space status value from the real-time data source, replace the original parking space status with the latest parking space status value, and obtain the final parking lot status data.

[0043] One aspect of this application provides a data acquisition system based on Internet of Things (IoT) technology, comprising:

[0044] The standardized data acquisition module is used to acquire a preliminary heterogeneous data set from the sensor devices in the parking lot, and to standardize it to obtain a standardized parking lot status dataset.

[0045] The parking space status determination module is used to compare the occupancy status identified by the geomagnetic sensor and camera for the same parking space. If the occupancy status is inconsistent, the final parking space status result is determined based on the historical accuracy.

[0046] The equipment status assessment module is used to identify abnormal parking spaces by applying anomaly detection algorithms to the final parking space status results, assess the type and severity of the anomalies, and generate an assessment record of the equipment's working status.

[0047] The complete data construction module is used to activate the fault tolerance processing mechanism based on the evaluation records of equipment working status, compensate for the parking space status of abnormal parking spaces, and construct a complete parking lot status dataset.

[0048] The final record update module is used to calculate the timeliness score of the complete parking lot status dataset. If the timeliness score does not meet the timeliness requirements, the record is updated to generate the final parking lot status data.

[0049] The data acquisition method based on Internet of Things (IoT) technology proposed in this application has the following advantages over existing technologies:

[0050] This application uses a protocol parsing engine to uniformly parse different communication protocols, extract key information, and transform heterogeneous data into standardized JSON format data through data format conversion and field integrity verification. This achieves automatic adaptation of various heterogeneous device protocols and standardized data format processing, improving data availability and consistency.

[0051] This application identifies inconsistencies in parking space status through multi-source comparison, and then uses a weighted fusion method to determine the overall reliability based on the historical accuracy of the equipment, thereby correcting the parking space status. This achieves multi-source data verification and fusion of parking space status, improving the accuracy and reliability of status judgment.

[0052] This application employs the isolated forest algorithm to detect anomalies in parking space occupancy data. Correlation analysis is used to determine the association between anomalies and equipment failure types. The severity is assessed based on the frequency and duration of anomalies. This solves the problem of difficulty in timely detection and location of outliers and faults in parking space status data. It enables intelligent detection and diagnosis of parking space anomalies, provides decision support for equipment operation and maintenance, and improves the reliability and operating efficiency of the system.

[0053] This application uses the occupancy rate of adjacent parking spaces and time series models to predict the status of abnormal parking spaces. Through data repair and compensation, a complete dataset is constructed, and a fault-tolerant data collection mechanism is provided that can automatically repair abnormal data and provide reliable data support for parking operations. Attached Figure Description

[0054] Figure 1 A flowchart of a data acquisition method based on Internet of Things (IoT) technology is provided for this application;

[0055] Figure 2 Flowchart of the method for determining the final parking space status result provided in this application;

[0056] Figure 3 Flowchart of the method for obtaining the assessment record of the equipment's working status provided in this application;

[0057] Figure 4 A functional block diagram of a data acquisition system based on Internet of Things (IoT) technology is provided for this application. Detailed Implementation

[0058] To better understand this application, various aspects of this application will be described in more detail with reference to the accompanying drawings. It should be understood that these detailed descriptions are merely illustrative of exemplary embodiments of this application and are not intended to limit the scope of this application in any way. Throughout the specification, the same reference numerals refer to the same elements. The expression "and / or" includes any and all combinations of one or more of the associated listed items.

[0059] In the accompanying drawings, the size, dimensions, and shapes of the elements have been slightly adjusted for ease of illustration. The drawings are for illustrative purposes only and are not strictly to scale. As used herein, the terms “approximately,” “about,” and similar terms are used to indicate approximation, not degree, and are intended to illustrate inherent deviations in measured or calculated values ​​that will be recognized by one of ordinary skill in the art. Furthermore, the order in which the steps are described in this application does not necessarily indicate the order in which these steps occur in actual operation, unless otherwise expressly defined or deduced from the context.

[0060] It should also be understood that expressions such as "comprising," "including," "having," "containing," and / or "comprising" are open-ended rather than closed-ended expressions in this specification, indicating the presence of the stated features, elements, and / or components, but not excluding the presence of one or more other features, elements, components, and / or combinations thereof. Furthermore, when expressions such as "at least one of..." appear after a list of listed features, they modify the entire list of features, not just individual elements in the list. Additionally, when describing embodiments of this application, the word "may" is used to mean "one or more embodiments of this application." And the term "exemplary" is intended to refer to examples or illustrations.

[0061] Unless otherwise specified, all terms used herein (including engineering and technical terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that, unless expressly stated herein, terms defined in common dictionaries shall be interpreted as having the meaning consistent with their meaning in the context of the relevant art, and not as having an idealized or overly formalized meaning.

[0062] It should be noted that, where there is no conflict, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0063] Example 1

[0064] like Figure 1 As shown, this application provides a data acquisition method based on Internet of Things (IoT) technology, comprising:

[0065] Step S100: Obtain a preliminary heterogeneous data set from the sensor devices in the parking lot, and standardize it to obtain a standardized parking lot status dataset;

[0066] The method for obtaining the preliminary heterogeneous data set is as follows: The original communication protocol type and data packet structure are obtained from the parking lot's ground magnetic sensors, camera recognition terminals, and parking space guidance displays. A protocol parsing engine is used to uniformly parse different communication protocols, extracting device status information and parking space occupancy data to form the preliminary heterogeneous data set. The device status information includes device parameters, device ID, device operating status, and communication protocol. The parking space occupancy data includes parking space number, occupancy status, and corresponding timestamp.

[0067] For example, the communication protocols include ModBus, MQTT, and HTTP;

[0068] The method for obtaining the standardized parking lot status dataset is as follows: obtain equipment status information and parking space occupancy data from the initial heterogeneous data set, apply the data format standardization method to convert the equipment status information and parking space occupancy data into a unified JSON format data structure, and at the same time verify the integrity of the fields and the rationality of the numerical range to construct a standardized parking lot status dataset.

[0069] Specifically, the method for obtaining the standardized parking lot status dataset is as follows: Extract the field content of equipment status information and parking space occupancy data from the initial heterogeneous data set to obtain a basic data set; based on the basic data set, convert the extracted field content into a unified JSON format data structure; if there are missing fields in the standardized data framework, supplement them using equipment parameter log records, and determine whether the field completeness meets the standard; if the field completeness meets the standard, verify the numerical range, obtain the occupancy status and timestamp, and determine whether the values ​​are within a reasonable range; construct a standardized parking lot status dataset based on the verified basic data set.

[0070] For example, in the process of acquiring and uniformly parsing data from geomagnetic sensors, camera recognition terminals, and parking guidance displays in a parking lot, the original communication protocol type and data packet structure are first obtained through the device communication interface. For instance, the geomagnetic sensor uses the ModBus protocol, and the data packet structure is: start bit 0x01, function code 0x03, register address 0x0001, data length 0x0002, and data value 0x0001 indicates that the parking space is occupied, while 0x0000 indicates that it is free. The camera terminal uses the HTTP protocol, and the data packet is in JSON format, containing a status field with a value of 1 indicating that a vehicle has been identified, and 0 indicating that no vehicle is detected. The display uses the MQTT protocol, and the data packet subject is / parking / display, with the load being the occupancy percentage. Next, the protocol parsing engine is used to uniformly parse different protocols. For the ModBus protocol, the parsing engine reads function code 0x03 and extracts register data. If the data value is greater than 0, it is determined to be occupied. The occupancy rate is calculated by dividing the number of occupied sensors by the total number. For example, if 6 out of 10 sensors are occupied, the occupancy rate is 60%. For the HTTP protocol, the JSON field status is parsed to count the number of cameras with a status of 1. For example, if 3 out of 5 cameras have a status of 1, the occupancy rate is 60%. For the MQTT protocol, the payload data is parsed to directly obtain the occupancy rate value, and the data from the three devices is integrated through a weighted average algorithm. Subsequently, device status information and parking space occupancy data are extracted to form a heterogeneous data set. The working status of the geomagnetic sensor is detected by ModBus heartbeat packets; if there is no response for 5 consecutive seconds, it is marked as offline. The working status of the camera is analyzed by HTTP response codes; 200 is normal, and anything other than 200 is marked as abnormal. The working status of the display screen is confirmed by MQTT subscription; if the subscription fails, it is marked as faulty. Finally, all device working status and occupancy data are stored in a unified format, such as an XML structure, containing fields such as device ID, status value, and occupancy rate. Data is synchronized by timestamps to ensure data consistency.

[0071] Step S200: Compare the occupancy status identified by the geomagnetic sensor and camera for the same parking space. If the occupancy status is inconsistent, determine the final parking space status result based on the historical accuracy.

[0072] like Figure 2 As shown, the method for determining the final parking space status result is as follows:

[0073] Step S210: Obtain the parking space occupancy status by using a geomagnetic sensor and a camera to initially collect and record the occupancy status of the same parking space from two different data sources;

[0074] Step S220: Compare the occupancy status of parking spaces detected by the geomagnetic sensor and identified by the camera one by one to determine whether they are consistent;

[0075] Step S230: If the comparison results show that the two occupancy states are inconsistent, then obtain the historical accuracy rates of the geomagnetic sensor and camera recognition from the device database, and determine the confidence values ​​of the geomagnetic sensor detection and camera recognition respectively.

[0076] The formula for calculating the confidence value detected by the geomagnetic sensor is as follows: Where a is the historical accuracy rate of the geomagnetic sensor, c is the historical accuracy rate of the camera recognition, and w mag This represents the confidence level value detected by the geomagnetic sensor.

[0077] The formula for calculating the confidence value of the camera recognition is as follows:

[0078] Step S240: For the confidence values, a weighted fusion method is used to calculate the combined confidence values ​​identified by the geomagnetic sensor and the camera, and a comprehensive confidence result is obtained.

[0079] The formula for calculating the overall confidence level is: s fusion =w mag ×s mag +w cam ×s cam , where s fusion To synthesize the confidence results, s mag s cam These are the parking space occupancy status detected by electromagnetic sensors and the parking space occupancy status identified by cameras, respectively.

[0080] Step S250: Based on the comprehensive confidence results, correct the occupancy status of parking spaces with inconsistent occupancy statuses to determine the final parking space status results;

[0081] The specific method for correcting the occupancy status of parking spaces with inconsistent occupancy status based on the comprehensive confidence result is as follows: if the comprehensive confidence result is greater than or equal to 0.5, the final parking space status result is determined to be occupied; otherwise, it is vacant.

[0082] Furthermore, based on the final parking space status results, the records in the parking lot status database are updated, and the relevant data fields are adjusted synchronously.

[0083] Furthermore, the updated parking lot status database information is obtained, and a second verification is performed on parking spaces in abnormal states. A logical judgment method is used, and if there are still differences in the second verification, they are recorded as data to be processed, thus obtaining the final consistent state.

[0084] For example, based on a standardized parking lot status dataset, the system first cross-validates the results of geomagnetic sensor detection and camera recognition for the same parking space using a multi-source data verification method. Assuming parking space number A001, the geomagnetic sensor detects "occupied" at a certain moment, while the camera recognition shows "vacant." The system automatically compares the parking space occupancy status from the two data sources, finds inconsistencies, and triggers further fusion processing. Next, the system uses a confidence-weighted fusion method based on the historical accuracy of the devices to determine the final parking space status. Specifically, the system assumes the historical accuracy of the geomagnetic sensor is 0.85, and the historical accuracy of the camera is 0.75. These accuracy data are derived from statistical comparisons of device detection results and actual status over the past month. The system calculates the confidence weight of the geomagnetic sensor based on its accuracy. And the confidence weight of the camera The system then assigns a value of 1 to the "occupied" status of the geomagnetic sensor and a value of 0 to the "idle" status of the camera. The final state value is calculated by weighting: 0.531 × 1 + 0.469 × 0 = 0.531. Since the result is greater than 0.5, the system determines the final parking space status as "occupied." The analysis shows that the geomagnetic sensor, due to its high historical accuracy, carries a higher weight in this fusion process, but camera data also provides auxiliary reference, ensuring the reliability of the result. Based on the above algorithm and numerical analysis, the system automatically completes the entire process from data verification to state fusion, ensuring the accuracy of parking space status determination.

[0085] Step S300: Based on the final parking space status result, apply an anomaly detection algorithm to identify abnormal parking spaces, assess the anomaly type and severity, and generate an assessment record of the equipment's working status.

[0086] The abnormal phenomena include sensor failure, communication interruption, and data mutation.

[0087] like Figure 3 As shown, the method for obtaining the evaluation record of the device's working status is as follows:

[0088] Step S310: By obtaining real-time equipment status information from the parking space status monitoring system and combining it with the stored historical equipment status information, an initial dataset is formed, the data is initially integrated, and a structured set of status information is obtained.

[0089] Step S320: Based on the structured state information set, extract the current equipment parameters, and use the isolated forest algorithm to identify potential abnormal parking spaces by comparing and analyzing the equipment parameters with historical equipment parameters.

[0090] The specific method for identifying potential abnormal parking spaces using the isolated forest algorithm is as follows:

[0091] Step S321: Clean and normalize the equipment parameters and historical equipment parameters to remove noise and outliers, and construct the original dataset;

[0092] Step S322: Set the number of trees and the number of subsamples for the isolated forest, randomly select samples from the original dataset, and construct an isolated tree; repeat this process to generate an isolated forest.

[0093] Step S323: For each sample x in the original dataset, calculate its average path length in each isolated tree. The path length is defined as the number of edges required to reach sample x from the root node.

[0094] The number of subsamples can be represented as n samples That is, the number of samples randomly selected from the original dataset each time;

[0095] The formula for calculating the average path length is: Among them, h i (x) represents the path length of sample x in the i-th isolated tree, n trees This refers to the number of trees in an isolated forest.

[0096] Step S324: Calculate the anomaly score of sample x based on the average path length;

[0097] The formula for calculating the anomaly score of sample x is: Where c(n) is the normalization factor for the average path length;

[0098] The normalization factor is usually taken as Where H(.) is the harmonic number, and n represents the number of samples in the original dataset;

[0099] Step S325: Set an anomaly threshold. For samples with an anomaly score greater than the anomaly threshold, mark them as abnormal parking spaces. Preferably, the anomaly threshold is 0.6.

[0100] Step S330: Analyze the correlation between abnormal parking spaces and sensor failures, communication interruptions, and data mutations. If the deviation between the abnormal parking space and the historical equipment parameters is greater than or equal to the preset deviation threshold, it is marked as a suspected sensor failure, and a preliminary anomaly classification result is obtained.

[0101] The specific method for analyzing the correlation between abnormal parking spaces and sensor failures, communication interruptions, and data mutations is as follows: For each abnormal parking space, extract the corresponding abnormal features; calculate the correlation coefficient matrix between the abnormal features and sensor failures, communication interruptions, and data mutations, wherein the correlation coefficient matrix is ​​composed of the correlation coefficients between each abnormal feature and sensor failures, communication interruptions, and data mutations; based on the correlation coefficient matrix, identify the correlation between abnormal parking spaces and various types of faults, wherein the faults include sensor failures, communication interruptions, and data mutations.

[0102] The relevant features include, but are not limited to, the timestamp of the anomaly, the duration, the anomaly type, and the anomaly magnitude;

[0103] For example, the Pearson correlation coefficient is used to calculate the correlation coefficient between abnormal features and sensor failures; for instance, if the correlation coefficient between the abnormal amplitude of abnormal parking spaces and sensor failures is very high, it indicates that abnormal parking spaces with large abnormal amplitudes are likely related to sensor failures.

[0104] The formula for calculating the correlation coefficient is: Among them, a m f represents the magnitude of the anomaly in the m-th abnormal parking space. m This indicates whether the sensor corresponding to the m-th abnormal parking space is malfunctioning. and These are the average values ​​of the abnormal amplitude and the fault markers, respectively.

[0105] Step S340: Based on the preliminary anomaly classification results, obtain the feature values ​​of the abnormal parking spaces, and match the feature values ​​with the communication interruption pattern. If the feature values ​​match the preset communication interruption characteristics, they are classified as communication interruption types, and the anomaly type classification is determined.

[0106] The method for obtaining the feature values ​​of the abnormal parking spaces is as follows: clustering is performed on the preliminary abnormal classification results using a clustering algorithm to aggregate similar abnormal parking spaces into one category. For each abnormal parking space category, its feature values ​​are extracted. The feature values ​​may include: abnormal type, mean and standard deviation of abnormal amplitude, and mean and standard deviation of abnormal duration.

[0107] Step S350: Based on the anomaly type classification, statistically analyze the occurrence frequency and duration of each type of anomaly, assess the severity of the anomaly based on the occurrence frequency and duration, and obtain the anomaly impact level;

[0108] The frequency of occurrence of each type of abnormality is the ratio between the number of occurrences of each type of abnormality and the total number of abnormalities.

[0109] For example, the frequency of occurrence is divided into three levels: low, medium, and high, and the duration is divided into three levels: short, medium, and long. A 3×3 severity matrix is ​​constructed. The corresponding severity is found in the severity matrix according to the frequency and duration of the anomaly. The highest level of severity for each type is taken to obtain the anomaly impact level.

[0110] The severity matrix is ​​shown in Table 1.

[0111] Table 1 - Severity Matrix

[0112] short time medium time Long time low frequency slight generally serious medium frequency generally serious Very serious High frequency serious Very serious Extremely serious

[0113] Step S360: Based on the level of impact of the anomaly and combined with the historical records of the equipment's operating status, analyze the stability of the current equipment parameters, determine the overall trend of the equipment's operating status, and generate an evaluation record;

[0114] Specifically, the method for generating the evaluation record is as follows: based on the comparison between current equipment parameters and historical equipment parameters, the stability of equipment parameters is evaluated using a moving average; combined with the historical records of equipment operating status, a time series prediction model is used to predict the overall trend of equipment operating status; the current anomaly impact level, the historical records of equipment operating status, the stability of equipment parameters, and the overall trend of equipment operating status are integrated to generate the evaluation record.

[0115] The time series prediction model uses an LSTM model;

[0116] Furthermore, the equipment health status assessment records are stored in the system for subsequent analysis and retrieval, completing the entire anomaly detection and assessment process.

[0117] Step S400: Activate the fault tolerance mechanism based on the equipment working status evaluation record, compensate for the parking space status of abnormal parking spaces, and construct a complete parking lot status dataset.

[0118] The method for constructing the complete parking lot status dataset is as follows:

[0119] Step S410: If an abnormal parking space is detected, the fault tolerance mechanism is triggered to obtain the parking space occupancy data of adjacent parking spaces and calculate the preliminary corrected parking space status.

[0120] The method for calculating the preliminary corrected parking space status is as follows: obtain the set of adjacent parking spaces and their parking space occupancy data; for each adjacent parking space, calculate its occupancy rate, which is the proportion of occupied time to total time; calculate the occupancy rate of abnormal parking spaces based on the occupancy rates of adjacent parking spaces; calculate the average occupancy rate of all adjacent parking spaces to obtain the average occupancy rate of adjacent parking spaces; if the average occupancy rate of adjacent parking spaces is greater than 50%, the abnormal parking space is considered to be occupied; if the average occupancy rate of adjacent parking spaces is less than or equal to 50%, the abnormal parking space is considered to be vacant, thus obtaining the preliminary corrected parking space status.

[0121] The occupancy rate p of the abnormal parking spaces A The calculation formula is: Where |N(A)| represents the number of adjacent parking spaces, N(A) represents the set of adjacent parking spaces, A represents the abnormal parking space, r represents the adjacent parking spaces of the abnormal parking space, and p r This indicates the occupancy rate of the adjacent parking space r;

[0122] Step S420: Based on the preliminary corrected parking space status and combined with time series data, use a long short-term memory network model to predict the parking space status of the current abnormal parking spaces and determine the parking space status after further correction.

[0123] The method for determining the further corrected parking space status is as follows: For abnormal parking spaces, collect their historical parking space occupancy data, arrange their occupancy status in chronological order to form a time series, divide the time series into fixed-length time windows, and each time window represents a historical occupancy pattern; use an LSTM model to further correct the parking space status of abnormal parking spaces, take the time series of historical parking space occupancy data of abnormal parking spaces as the input of the LSTM model, and predict the parking space status of abnormal parking spaces at the current moment as the further corrected parking space status;

[0124] The most similar historical occupancy pattern can be measured by the distance between the current parking space status and the historical occupancy pattern.

[0125] Preferably, the fixed length of the time window is 24 hours, which reflects the typical occupancy pattern of parking spaces within a specific time period.

[0126] Step S430: Based on the further corrected parking space status, construct a complete parking lot status dataset;

[0127] Optionally, for the further corrected parking space status, obtain the associated data collected by different devices, and use data fusion technology to weight the multi-source information to obtain the fused parking space status information; if the fused parking space status information deviates significantly from the historical occupancy pattern, then call the neighboring parking space data again for verification to determine whether the final parking space status is reasonable; based on the verified final parking space status, construct a complete parking lot status dataset and store it in the database for subsequent query and analysis.

[0128] Step S500: Calculate the timeliness score of the complete parking lot status dataset. If the timeliness score does not meet the timeliness requirements, update the records and generate the final parking lot status data.

[0129] The specific method for generating the final parking lot status data is as follows:

[0130] Step S510: Based on the complete parking lot status dataset, for each record, extract its timestamp, calculate the difference between the timestamp of the record and the previous record. If the difference between the timestamps is greater than or equal to the update frequency threshold, it is considered to not meet the timeliness requirements, and the data update process is triggered.

[0131] Step S520: For each record that needs to be updated, obtain the latest parking space status value from the real-time data source, replace the original parking space status with the latest parking space status value, and obtain the final parking lot status data.

[0132] Furthermore, based on the final parking lot status data that meets the timeliness requirements, the network connection status is monitored in real time. If the network latency exceeds the dynamic threshold based on the historical average or the packet loss rate is higher than the reasonable range within the preset period, the local caching mechanism is activated to store the data in the temporary database of the edge computing node, and a data synchronization plan is formulated after the network is restored.

[0133] Furthermore, by combining network connection status monitoring results and final parking lot status data, an adaptive transmission scheduling method is used to dynamically adjust transmission batches based on the priority order of real-time status updates, equipment alarm information, statistical analysis data, and current network bandwidth conditions, ensuring that data is stably and reliably uploaded to the cloud platform.

[0134] The technical solution of this application effectively solves the problem of integrating heterogeneous devices and reliably collecting data in a large parking lot environment through a series of technical means such as protocol adaptation, data standardization, multi-source verification, anomaly detection, fault-tolerant acquisition, and real-time updates.

[0135] Example 2

[0136] like Figure 4 As shown, a data acquisition system based on Internet of Things (IoT) technology provided in this application includes:

[0137] The standardized data acquisition module is used to acquire a preliminary heterogeneous data set from the sensor devices in the parking lot, and to standardize it to obtain a standardized parking lot status dataset.

[0138] The parking space status determination module is used to compare the occupancy status identified by the geomagnetic sensor and camera for the same parking space. If the occupancy status is inconsistent, the final parking space status result is determined based on the historical accuracy.

[0139] The equipment status assessment module is used to identify abnormal parking spaces by applying anomaly detection algorithms to the final parking space status results, assess the type and severity of the anomalies, and generate an assessment record of the equipment's working status.

[0140] The complete data construction module is used to activate the fault tolerance processing mechanism based on the evaluation records of equipment working status, compensate for the parking space status of abnormal parking spaces, and construct a complete parking lot status dataset.

[0141] The final record update module is used to calculate the timeliness score of the complete parking lot status dataset. If the timeliness score does not meet the timeliness requirements, the record is updated to generate the final parking lot status data.

[0142] In addition, the parts of the technical solutions provided in the embodiments of this application that are consistent with the implementation principles of the corresponding technical solutions in the prior art have not been described in detail, so as to avoid excessive elaboration.

[0143] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the invention. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A data acquisition method based on Internet of Things (IoT) technology, characterized in that, include: A preliminary heterogeneous data set is obtained from the sensor devices in the parking lot, and then standardized to obtain a standardized parking lot status dataset. The occupancy status of the same parking space is compared with that identified by the geomagnetic sensor and the camera. If the occupancy status is inconsistent, the final parking space status result is determined based on the historical accuracy. Based on the final parking space status results, anomaly detection algorithms are applied to identify abnormal parking spaces, assess the type and severity of anomalies, and generate an assessment record of the equipment's working status. The fault tolerance mechanism is activated based on the equipment working status assessment records to compensate for the parking space status of abnormal parking spaces and construct a complete parking lot status dataset. Calculate the timeliness score of the complete parking lot status dataset. If the timeliness score does not meet the timeliness requirements, update the records and generate the final parking lot status data.

2. The data acquisition method based on Internet of Things (IoT) technology as described in claim 1, characterized in that, The specific method for obtaining a preliminary heterogeneous data set from the sensor devices in the parking lot and standardizing it to obtain a standardized parking lot status dataset is as follows: The original communication protocol types and data packet structures are obtained from the ground magnetic sensors, camera recognition terminals, and parking space guidance displays in the parking lot. A protocol parsing engine is used to uniformly parse different communication protocols, extracting device status information and parking space occupancy data to form a preliminary heterogeneous data set. The device status information includes device parameters, device ID, device operating status, and communication protocol. The parking space occupancy data includes parking space number, occupancy status, and corresponding timestamp. Extract the field content of equipment status information and parking space occupancy data from the initial heterogeneous data set to obtain the basic data group; Based on the basic data set, the extracted field content is converted into a unified JSON format data structure. If there are missing fields in the standardized data framework, they are supplemented by logging the device parameters to determine whether the field completeness meets the standard. If the field completeness meets the standard, the numerical range is validated, the occupancy status and timestamp are obtained, and it is determined whether the value is within a reasonable range. Based on the validated basic data set, a standardized parking lot status dataset is constructed.

3. The data acquisition method based on Internet of Things (IoT) technology as described in claim 2, characterized in that, The method for determining the final parking space status result is as follows: The occupancy status of parking spaces is obtained by identifying the occupancy status of the same parking space using geomagnetic sensors and cameras. The occupancy status of the same parking space is initially collected and recorded from two different data sources. The occupancy status of parking spaces detected by geomagnetic sensors and identified by cameras is compared one by one to determine whether they are consistent; If the comparison results show that the two occupancy states are inconsistent, the historical accuracy rates of geomagnetic sensor and camera recognition are obtained from the device database, and the confidence values ​​of geomagnetic sensor detection and camera recognition are determined respectively. For the confidence scores, a weighted fusion method is used to calculate the combined confidence scores from the geomagnetic sensor and the camera. Based on the overall confidence level, the occupancy status of parking spaces with inconsistent occupancy status is corrected to determine the final parking space status result.

4. The data acquisition method based on Internet of Things (IoT) technology as described in claim 3, characterized in that, The method for obtaining the evaluation record of the equipment's operating status is as follows: By acquiring real-time equipment status information from the parking space status monitoring system and combining it with stored historical equipment status information, an initial dataset is formed, and preliminary data integration is completed to obtain a structured set of status information. Based on the structured state information set, the current equipment parameters are extracted. By comparing and analyzing the equipment parameters with historical equipment parameters, the isolated forest algorithm is used to identify potential abnormal parking spaces. The correlation between abnormal parking spaces and sensor failures, communication interruptions, and data mutations is analyzed. If the deviation between the abnormal parking space and the historical equipment parameters is greater than or equal to the preset deviation threshold, it is marked as a suspected sensor failure, and a preliminary anomaly classification result is obtained. Based on the preliminary anomaly classification results, the feature values ​​of the abnormal parking spaces are obtained. The feature values ​​are matched with the communication interruption pattern. If the feature values ​​match the preset communication interruption characteristics, they are classified as communication interruption types, and the anomaly type classification is determined. Based on the classification of anomalies, the frequency and duration of each type of anomaly are statistically analyzed, and the severity of the anomaly is assessed based on the frequency and duration to obtain the anomaly impact level. Based on the level of impact of the anomaly and combined with the historical records of the equipment's operating status, the stability of the current equipment parameters is analyzed, the overall trend of the equipment's operating status is judged, and an evaluation record is generated.

5. The data acquisition method based on Internet of Things (IoT) technology as described in claim 4, characterized in that, The specific method for identifying potential abnormal parking spaces using the isolated forest algorithm is as follows: The equipment parameters and historical equipment parameters are cleaned and normalized to remove noise and outliers, and the original dataset is constructed. Set the number of trees and the number of subsamples for the isolated forest, randomly select samples from the original dataset, and construct an isolated tree; repeat this process to generate an isolated forest. For each sample x in the original dataset, calculate its average path length in each isolated tree. The path length is defined as the number of edges required to reach sample x from the root node. The anomaly score of sample x is calculated based on the average path length; Set an anomaly threshold. For samples with an anomaly score greater than the anomaly threshold, mark them as abnormal parking spaces and mark the corresponding parking spaces as abnormal parking spaces.

6. The data acquisition method based on Internet of Things (IoT) technology as described in claim 5, characterized in that, The specific method for analyzing the correlation between abnormal parking spaces and sensor failures, communication interruptions, and data mutations is as follows: For each abnormal parking space, extract the corresponding abnormal features; calculate the correlation coefficient matrix between the abnormal features and sensor failures, communication interruptions, and data mutations, wherein the correlation coefficient matrix is ​​composed of the correlation coefficients between each abnormal feature and sensor failures, communication interruptions, and data mutations; based on the correlation coefficient matrix, identify the correlation between abnormal parking spaces and various types of faults, wherein the faults include sensor failures, communication interruptions, and data mutations.

7. A data acquisition method based on Internet of Things (IoT) technology as described in claim 6, characterized in that, The method for constructing the complete parking lot status dataset is as follows: If an abnormal parking space is detected, the fault tolerance mechanism is triggered to obtain the parking space occupancy data of adjacent parking spaces and calculate the initial corrected parking space status. The method for calculating the preliminary corrected parking space status is as follows: obtain the set of adjacent parking spaces and their parking space occupancy data; for each adjacent parking space, calculate its occupancy rate, which is the proportion of occupied time to total time; calculate the occupancy rate of abnormal parking spaces based on the occupancy rates of adjacent parking spaces; calculate the average occupancy rate of all adjacent parking spaces to obtain the average occupancy rate of adjacent parking spaces; if the average occupancy rate of adjacent parking spaces is greater than 50%, the abnormal parking space is considered to be occupied; if the average occupancy rate of adjacent parking spaces is less than or equal to 50%, the abnormal parking space is considered to be vacant, thus obtaining the preliminary corrected parking space status. Based on the preliminary revised parking space status, combined with time series data, a long short-term memory network model is used to predict the parking space status of the current abnormal parking spaces and determine the parking space status after further revision. Based on the further revised parking space status, construct a complete parking lot status dataset.

8. The data acquisition method based on Internet of Things technology as described in claim 7, characterized in that, The method for determining the further corrected parking space status is as follows: For abnormal parking spaces, collect their historical parking space occupancy data, arrange their occupancy status in chronological order to form a time series, divide the time series into fixed-length time windows, and each time window represents a historical occupancy pattern; use an LSTM model to further correct the parking space status of abnormal parking spaces, take the time series of historical parking space occupancy data of abnormal parking spaces as the input of the LSTM model, and predict the parking space status of abnormal parking spaces at the current moment as the further corrected parking space status.

9. A data acquisition method based on Internet of Things (IoT) technology as described in claim 8, characterized in that, The specific method for generating the final parking lot status data is as follows: Based on the complete parking lot status dataset, for each record, its timestamp is extracted, and the difference between the timestamp of the record and the previous record is calculated. If the difference between the timestamps is greater than or equal to the update frequency threshold, it is considered to be non-timeliness requirement, and the data update process is triggered. For each record that needs to be updated, the latest parking space status value is obtained from the real-time data source, and the original parking space status is replaced with the latest parking space status value to obtain the final parking lot status data.

10. A data acquisition system based on Internet of Things (IoT) technology, implemented according to any one of claims 1-9, characterized in that, include: The standardized data acquisition module is used to acquire a preliminary heterogeneous data set from the sensor devices in the parking lot, and to standardize it to obtain a standardized parking lot status dataset. The parking space status determination module is used to compare the occupancy status identified by the geomagnetic sensor and camera for the same parking space. If the occupancy status is inconsistent, the final parking space status result is determined based on the historical accuracy. The equipment status assessment module is used to identify abnormal parking spaces by applying anomaly detection algorithms to the final parking space status results, assess the type and severity of the anomalies, and generate an assessment record of the equipment's working status. The complete data construction module is used to activate the fault tolerance processing mechanism based on the evaluation records of equipment working status, compensate for the parking space status of abnormal parking spaces, and construct a complete parking lot status dataset. The final record update module is used to calculate the timeliness score of the complete parking lot status dataset. If the timeliness score does not meet the timeliness requirements, the record is updated to generate the final parking lot status data.