A road data multi-level data synchronization method
By calculating the changing characteristics and importance of road data and optimizing the data storage sequence, the problem of delay and inconsistency in the data synchronization process is solved, and timely processing of key data and system stability are achieved.
Patent Information
- Application Number
- CN202410634547.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-21
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-05-21
AI Technical Summary
There are delays and inconsistencies in the existing multi-level data synchronization process of road data, which makes it impossible to flexibly adjust data collection, resulting in the inability to process important data in a timely manner and affecting processing efficiency.
By obtaining the component time series of road data, dividing local segments, constructing a plane coordinate system, calculating change characteristics, abnormality degree, horizontal and vertical importance, determining data priority, and optimizing the data storage sequence.
It improves the accuracy and sensitivity of data processing, ensures priority transmission of key data, and improves system stability and data processing efficiency.
Smart Images

Figure CN118312571B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a method for synchronizing multi-level road data. Background Art
[0002] With the rapid development of intelligent transportation technology, the demand for real-time and accuracy of road data is becoming increasingly urgent. However, there are some challenges in the current multi-level data synchronization process. Usually, data collection relies on fixed time intervals or triggers of specific events. Although this method is simple, it cannot be flexibly adjusted according to actual data changes. Therefore, delays and inconsistencies often occur in the collection, storage and processing of road data. When the storage of important road data is delayed and unimportant road data is stored in the database first, it may not be possible to ensure that the important road data is processed in time, which will affect the data processing efficiency during the multi-level data synchronization of road data. Summary of the invention
[0003] The invention provides a road data multi-level data synchronization method to solve the existing problems.
[0004] A road data multi-level data synchronization method of the present invention adopts the following technical solution:
[0005] An embodiment of the present invention provides a method for synchronizing multi-level road data, the method comprising the following steps:
[0006] Acquire several component time series of road data; divide each component time series into several local segments;
[0007] Any two local segments in each component time series are grouped into a control group, and a plane coordinate system corresponding to each control group is constructed; the change characteristics of each component time series are obtained according to the slope of the line connecting adjacent data points on the plane coordinate system and the number of the same component data in each local segment in the control group; the abnormality degree of the road data is obtained according to the change characteristics of each component time series;
[0008] According to the abnormal degree of road data and the quantity difference of the same component data in each component time series and each local segment, the lateral importance of each component data in each component time series is obtained; according to the difference between the lateral importance of each component data in different component time series, the longitudinal importance of each component data in each component time series is obtained;
[0009] According to the lateral importance and longitudinal importance of each component data in each component time series, the importance of each component data in each component time series is obtained; according to the importance of each component data in each component time series, the priority of each component time series is obtained; according to the priority of each component time series, the data storage of the road data during the synchronization process is completed.
[0010] Preferably, the step of dividing each component time series into a plurality of local segments comprises the following specific steps:
[0011] Each component time series is equally divided into L local segments, where L is the preset number of segments.
[0012] Preferably, the construction of the plane coordinate system corresponding to each control group includes the following specific steps:
[0013] In the In the x-th control group corresponding to the component time series, the component data of the first local segment is used as the horizontal axis and the component data of the second local segment is used as the vertical axis to construct the plane coordinate system of the x-th control group.
[0014] Preferably, the step of obtaining the variation characteristics of each component time series according to the slope of the line connecting adjacent data points on the plane coordinate system and the number of identical component data in each local segment in the control group comprises the following specific steps:
[0015] In the In the plane coordinate system of the x-th control group corresponding to the component time series, the slopes of the lines connecting two adjacent data points are counted in sequence to obtain the slope sequence corresponding to the x-th control group;
[0016] The calculation method for obtaining the change characteristics of each component time series according to the slope sequence corresponding to the x-th control group and the number of the same component data in each local segment of the control group is as follows:
[0017]
[0018] Where: Represents the changing characteristics of the rth component time series; is the number of control groups of the rth component time series; represents the number of component data in each local segment in the x-th control group of the r-th component time series; represents the number of component data with the same value as the i-th component data in the first local segment of the x-th control group of the r-th component time series; represents the number of component data with the same value as the i-th component data in the second local segment of the x-th control group of the r-th component time series; represents the number of slopes in the slope sequence of the xth control group of the rth component time series; represents the vth slope in the slope sequence of the xth control group of the rth component time series; represents the v+1th slope in the slope sequence of the xth control group of the rth component time series; Indicates taking the absolute value; Represents a logarithmic function with a natural constant as base.
[0019] Preferably, the step of obtaining the abnormality degree of the road data according to the change characteristics of each component time series comprises the following specific steps:
[0020] The mean of the change characteristics of all component time series is recorded as the abnormality degree of the road data.
[0021] Preferably, the lateral importance of each component data in each component time series is obtained according to the abnormality degree of the road data and the quantity difference of the same component data in each component time series and each local segment, including the calculation formula as follows:
[0022]
[0023] Where: Indicates the horizontal importance of the yth component data in the rth component time series; represents the number of local segments in the rth component time series; Indicates the number of component data in the rth component time series that has the same value as the yth component data; represents the number of component data in the jth local segment of the rth component time series sequence that has the same value as the yth component data in the rth component time series sequence; Indicates a preset constant; Indicates the degree of abnormality of road data; exp[ ] represents an exponential function with a natural constant as the base.
[0024] Preferably, the vertical importance of each component data in each component time series is obtained according to the difference between the horizontal importance of each component data in different component time series, including the following calculation formula:
[0025]
[0026] Where: represents the longitudinal importance of the yth component data in the rth component time series; D represents the total number of other component time series except the rth component time series of road data; Indicates the horizontal importance of the yth component data in the rth component time series; represents the lateral importance of the yth component data in the cth component time series except the rth component time series of the road data; exp[ ] represents an exponential function with a natural constant as the base; Indicates taking the absolute value.
[0027] Preferably, the importance of each component data in each component time series is obtained according to the horizontal importance and the vertical importance of each component data in each component time series, and the calculation formula included is as follows:
[0028]
[0029] Where: Indicates the importance of the yth component data in the rth component time series; Indicates the vertical importance of the yth component data in the rth component time series; Represents the horizontal importance of the yth component data in the rth component time series.
[0030] Preferably, the step of obtaining the priority of each component time series according to the importance of each component data in each component time series includes the following specific steps:
[0031] The average value of the importance of all component data in each component time series is recorded as the priority of each component time series.
[0032] Preferably, the data storage of the road data during the synchronization process is completed according to the priority of each component time series, and the specific steps include the following:
[0033] According to the priority of all component time series, each component time series is stored in the database in descending order.
[0034] The beneficial effects of the technical solution of the present invention are:
[0035] By obtaining the change characteristics of the component time series sequence by taking the differences of the local segments of the road data component time series sequence, the change characteristics of the road data can be captured more accurately, thereby improving the accuracy and sensitivity of anomaly detection; by obtaining the abnormality degree of road data and the importance of component data, the abnormality degree and importance of road data are quantified, which helps to timely discover and handle abnormal situations and improve the stability and reliability of the system; according to the importance of component data, the priority is obtained, the transmission and storage order of road data is reasonably arranged, the data synchronization process is optimized, and the priority transmission of key data is ensured to improve data processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0037] Figure 1 The present invention is a flowchart of the steps of a method for synchronizing multi-level road data. DETAILED DESCRIPTION
[0038] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of a road data multi-level data synchronization method proposed by the present invention, its specific implementation, structure, features and effects, in conjunction with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0039] 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.
[0040] The specific scheme of the multi-level data synchronization method for road data provided by the present invention is described in detail below with reference to the accompanying drawings.
[0041] See also Figure 1 , which shows a flowchart of a method for synchronizing multi-level data of road data provided by an embodiment of the present invention, the method comprising the following steps:
[0042] Step S001: Acquire several component time series of road data; divide each component time series into several local segments.
[0043] Acquire several component time series of road data, and divide each component time series into L local segments. L is the preset number of segments. In this embodiment, L=8, and other embodiments may adopt other values according to specific circumstances, which are not specifically limited in this embodiment.
[0044] It should be noted that: in this embodiment, road data is collected by placing multiple sensors on both sides of a section of road, where the multiple sensors are speed sensors, temperature and humidity sensors, and strain sensors. Therefore, the component time series sequences in this embodiment are speed data time series sequence, strain data time series sequence, temperature data time series sequence, and humidity data time series sequence, respectively. The data is collected once every 12 hours, and the data in each time series sequence is normalized and rounded to one decimal place. This is used as an example for description.
[0045] Step S002: any two local segments in each component time series sequence form a group of control groups, and construct a plane coordinate system corresponding to each control group; according to the slope of the line connecting adjacent data points on the plane coordinate system and the number of identical component data in each local segment in the control group, obtain the change characteristics of each component time series sequence; according to the change characteristics of each component time series sequence, obtain the abnormality degree of the road data.
[0046] For each data type obtained, evaluate its importance to the normal operation of the system. Among them, abnormal data indicates that there may be problems or potential risks in the system. Therefore, during the data synchronization process, the synchronization priority of different data types can be set. If abnormal component data is detected, you can choose to transmit this data immediately without waiting for the synchronization of other data. In this way, abnormal situations can be handled in a timely manner to ensure the normal operation of the system. Abnormal data often performs prominently, which is different from the regular performance of normal data and has a large difference compared with it. Therefore, the degree of abnormality of road data is obtained by analyzing the similarity of any two local segments of the component time series of road data.
[0047] This embodiment is based on As an example, in the In the component time series, any two local segments are combined into a control group to obtain several control groups. The number of control groups corresponding to the component time series is . In the x-th control group, the component data of the first local segment is used as the horizontal axis, and the component data of the second local segment is used as the vertical axis to construct the plane coordinate system of the x-th control group. In the plane coordinate system of the x-th control group, the slopes of the lines connecting two adjacent data points are counted in sequence to obtain the slope sequence corresponding to the x-th control group. In the x-th control group, the coordinate system is obtained by drawing a QQ graph through the qqplot() function of the R language. This process is a well-known technology and will not be described in detail in this embodiment.
[0048] This embodiment obtains the abnormality degree of road data based on the change characteristics of the component time series, and provides a calculation method for obtaining the change characteristics of the component time series:
[0049]
[0050] Where: Represents the changing characteristics of the rth component time series; is the number of control groups of the rth component time series; represents the number of component data in each local segment in the x-th control group of the r-th component time series; represents the number of component data with the same value as the i-th component data in the first local segment of the x-th control group of the r-th component time series; represents the number of component data with the same value as the i-th component data in the second local segment of the x-th control group of the r-th component time series; represents the number of slopes in the slope sequence of the xth control group of the rth component time series; represents the vth slope in the slope sequence of the xth control group of the rth component time series; represents the v+1th slope in the slope sequence of the xth control group of the rth component time series; Indicates taking the absolute value; Represents a logarithmic function with a natural constant as base.
[0051] The abnormality of the road data is further obtained based on the number and change characteristics of the component data. The calculation method is as follows:
[0052]
[0053] Where: Indicates the degree of abnormality of road data; Represents the number of component time series of road data; Represents the changing characteristics of the rth component time series.
[0054] It should be noted that in the above calculation formula, is the relative entropy value between two adjacent local segments, that is, how much information difference will be generated when two local segments are replaced. The smaller the value, the less information difference between the two local segments, and the higher the similarity between the two local segments. It represents the average value of the similarity between any two local segments among all local segments. The smaller the average value, the higher the similarity between all local segments, which means that the component time series has a strong periodicity. It indicates the closeness of the data values in any two local segments. The smaller the average value, the closer the data fitting curve in the QQ graph is to a straight line. Indicates the changing characteristics of the component time series.
[0055] It represents the average value of the time series variation characteristics of all components of the road data. The larger the average value, the more likely there is abnormal component data in the component data, that is, the greater the abnormality of the road data.
[0056] At this point, the abnormality level of the road data is obtained.
[0057] Step S003: According to the abnormality of the road data and the quantitative difference of the same component data in each component time series sequence and each local segment, the lateral importance of each component data in each component time series sequence is obtained; according to the difference between the lateral importance of each component data in different component time series sequences, the longitudinal importance of each component data in each component time series sequence is obtained.
[0058] When analyzing road data, it is usually assumed that each component time series has maximum non-Gaussianity. However, when there are abnormal data, some component data may cause the component time series to show a certain degree of Gaussianity. These component data considered abnormal may contain more important information in the multi-level data synchronization process of road data. Therefore, the greater the difference between any component data in the component time series and the other component data, the greater the degree of abnormality of the component data, and the more attention should be paid to the component data and considered first.
[0059] This embodiment analyzes the abnormality of the component data by the number of local segments of the component time series and the number of occurrences of the corresponding values of the component data to obtain the horizontal and vertical importance of the component data, and provides a method for calculating the horizontal importance:
[0060]
[0061] Where: Indicates the horizontal importance of the yth component data in the rth component time series; represents the number of local segments in the rth component time series; Indicates the number of component data in the rth component time series that has the same value as the yth component data; represents the number of component data in the jth local segment of the rth component time series sequence that has the same value as the yth component data in the rth component time series sequence; represents a preset constant. In this embodiment, =0.1 as an example; Indicates the degree of abnormality of road data; exp[ ] represents an exponential function with a natural constant as the base.
[0062] It should be noted that the calculation formula The distribution characteristics of the yth component data of the rth component time series of the road data. The closer the value is to 0, the more it indicates that the yth component data is unevenly distributed in all local segments, that is, this type of component data only exists in individual local segments or a single local segment; in order to prevent the situation in which the overall product is 0 during the calculation process, a non-zero constant is added Corrective logic; It indicates the abnormality of the yth component data. The higher the product, the higher the horizontal importance of the yth component data in the rth component time series.
[0063] The calculation method for obtaining the vertical importance based on the horizontal importance and the number of component data is:
[0064]
[0065] Where: represents the longitudinal importance of the yth component data in the rth component time series; D represents the total number of other component time series except the rth component time series of road data; Indicates the horizontal importance of the yth component data in the rth component time series; represents the lateral importance of the yth component data in the cth component time series except the rth component time series of the road data; exp[ ] represents an exponential function with a natural constant as the base; Indicates taking the absolute value.
[0066] In this calculation formula It represents the product of the yth component data in the rth component time series and the average value of the abnormality of the yth component data in other component data. The larger the product is, the higher the vertical importance of the yth component data is.
[0067] Step S004: According to the lateral importance and longitudinal importance of each component data in each component time series, the importance of each component data in each component time series is obtained; according to the importance of each component data in each component time series, the priority of each component time series is obtained; according to the priority of each component time series, the data storage of the road data during the synchronization process is completed.
[0068] Abnormal component data in monitoring data often represents important warning information. Therefore, during the data transmission process, these abnormal component data need to be given a higher priority in order to respond in time and obtain special situation information.
[0069] This embodiment determines the priority of component data transmission according to the horizontal and vertical importance of the component data, and provides a calculation method as follows:
[0070]
[0071] Where: Indicates the importance of the yth component data in the rth component time series; Indicates the vertical importance of the yth component data in the rth component time series; Represents the horizontal importance of the yth component data in the rth component time series.
[0072] In the above formula, Indicates the importance of the yth component data in the rth component time series of the road data. The larger the value, the higher the transmission priority of the yth component data in the component.
[0073] At this point, the importance of the yth component data in any component time series of the road data is obtained.
[0074] Similarly, the importance of any component data in any component time series of the road data is obtained.
[0075] The average value of the importance of all component data in each component time series is recorded as the priority of each component time series; according to the priority of all component time series, each component time series is stored in the database in descending order to complete the data synchronization process.
[0076] It should be noted that during the multi-level road data synchronization process, data delays and inconsistencies often occur, resulting in unimportant road data being stored in the database first, thus affecting the timely processing of important road data. In order to ensure the timeliness and accuracy of important data, this embodiment adopts a strategy of processing important data first and processing secondary data later, ensuring that important data is processed first during the synchronization process.
[0077] So far, the present invention is completed.
[0078] 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 protection scope of the present invention.
Claims
1. A method for synchronizing multi-level road data, characterized in that: The method comprises the following steps: Acquire several component time series of road data; divide each component time series into several local segments; Any two local segments in each component time series are grouped into a control group, and a plane coordinate system corresponding to each control group is constructed; the change characteristics of each component time series are obtained according to the slope of the line connecting adjacent data points on the plane coordinate system and the number of the same component data in each local segment in the control group; the abnormality degree of the road data is obtained according to the change characteristics of each component time series; According to the abnormal degree of road data and the quantity difference of the same component data in each component time series and each local segment, the lateral importance of each component data in each component time series is obtained; according to the difference between the lateral importance of each component data in different component time series, the longitudinal importance of each component data in each component time series is obtained; According to the lateral importance and longitudinal importance of each component data in each component time series, the importance of each component data in each component time series is obtained; according to the importance of each component data in each component time series, the priority of each component time series is obtained; according to the priority of each component time series, the data storage of the road data in the synchronization process is completed; The step of obtaining the variation characteristics of each component time series according to the slope of the line connecting adjacent data points on the plane coordinate system and the number of the same component data in each local segment in the control group includes the following specific steps: In the In the plane coordinate system of the x-th control group corresponding to the component time series, the slopes of the lines connecting two adjacent data points are counted in sequence to obtain the slope sequence corresponding to the x-th control group; The calculation method for obtaining the change characteristics of each component time series according to the slope sequence corresponding to the x-th control group and the number of the same component data in each local segment of the control group is as follows: Where: Represents the changing characteristics of the rth component time series; is the number of control groups of the rth component time series; represents the number of component data in each local segment in the x-th control group of the r-th component time series; represents the number of component data with the same value as the i-th component data in the first local segment of the x-th control group of the r-th component time series; represents the number of component data with the same value as the i-th component data in the second local segment of the x-th control group of the r-th component time series; represents the number of slopes in the slope sequence of the xth control group of the rth component time series; represents the vth slope in the slope sequence of the xth control group of the rth component time series; represents the v+1th slope in the slope sequence of the xth control group of the rth component time series; Indicates taking the absolute value; Represents a logarithmic function with a natural constant as base.
2. A road data multi-level data synchronization method according to claim 1, characterized in that: The specific steps of dividing each component time series into a number of local segments are as follows: Each component time series is equally divided into L local segments, where L is the preset number of segments.
3. A road data multi-level data synchronization method according to claim 1, characterized in that: The specific steps of constructing the plane coordinate system corresponding to each control group are as follows: In the In the x-th control group corresponding to the component time series, the component data of the first local segment is used as the horizontal axis and the component data of the second local segment is used as the vertical axis to construct the plane coordinate system of the x-th control group.
4. A road data multi-level data synchronization method according to claim 1, characterized in that: The specific steps of obtaining the abnormality degree of the road data according to the change characteristics of each component time series are as follows: The mean of the change characteristics of all component time series is recorded as the abnormality degree of the road data.
5. A road data multi-level data synchronization method according to claim 1, characterized in that: According to the abnormal degree of the road data and the quantity difference of the same component data in each component time series and each local segment, the lateral importance of each component data in each component time series is obtained, and the calculation formula included is as follows: Where: Indicates the horizontal importance of the yth component data in the rth component time series; represents the number of local segments in the rth component time series; Indicates the number of component data in the rth component time series that has the same value as the yth component data; represents the number of component data in the jth local segment of the rth component time series sequence that has the same value as the yth component data in the rth component time series sequence; Indicates a preset constant; Indicates the degree of abnormality of road data; exp[ ] represents an exponential function with a natural constant as the base.
6. A road data multi-level data synchronization method according to claim 1, characterized in that: The longitudinal importance of each component data in each component time series is obtained according to the difference between the transverse importance of each component data in different component time series, and the calculation formula included is as follows: Where: represents the longitudinal importance of the yth component data in the rth component time series; D represents the total number of other component time series except the rth component time series of road data; Indicates the horizontal importance of the yth component data in the rth component time series; represents the lateral importance of the yth component data in the cth component time series except the rth component time series of the road data; exp[ ] represents an exponential function with a natural constant as the base; Indicates taking the absolute value.
7. A road data multi-level data synchronization method according to claim 1, characterized in that: The importance of each component data in each component time series is obtained according to the horizontal importance and the vertical importance of each component data in each component time series, and the calculation formula included is as follows: Where: Indicates the importance of the yth component data in the rth component time series; Indicates the vertical importance of the yth component data in the rth component time series; Represents the horizontal importance of the yth component data in the rth component time series.
8. A road data multi-level data synchronization method according to claim 1, characterized in that: The step of obtaining the priority of each component time series according to the importance of each component data in each component time series includes the following specific steps: The average value of the importance of all component data in each component time series is recorded as the priority of each component time series.
9. A road data multi-level data synchronization method according to claim 8, characterized in that: The data storage of the road data in the synchronization process is completed according to the priority of each component time series, and the specific steps include the following: According to the priority of all component time series, each component time series is stored in the database in descending order.
