Data synchronization method and device, terminal equipment and storage medium
By acquiring data from different sources in intelligent driving data processing, performing position retrieval and adaptive normalization, the problem of different data frequencies is solved, the time alignment and frequency uniformity of data are realized, and the accuracy and efficiency of data processing are improved.
Patent Information
- Application Number
- CN202411680614.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-02-28
AI Technical Summary
How to ensure the frequency uniformity of intelligent driving data from different sources so that it can be correctly summarized and aligned when processing offline.
By obtaining intelligent driving data from different sources, it is stored in the data dictionary, and location search is performed to obtain the location index of the data. Based on this index, the data is adaptively normalized to ensure the uniform frequency of the data.
Time alignment and frequency uniformity of data from different sources are realized, ensuring the accuracy and efficiency of data processing, and is suitable for the unified processing of intelligent driving data sets.
Smart Images

Figure CN119537359A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a data synchronization method, apparatus, terminal device and storage medium. Background Art
[0002] Intelligent driving data is generally stored in the form of ros (robot operating system) package messages, where data from different types of sources are distinguished in the form of topics, and each topic will contain the time when the topic was sent and the message corresponding to that time. Topic messages from different sources have different sending times and sending frequencies. When processing data offline, topic data from different sources need to be aggregated when processing data at the same time, which requires processing message data of different frequencies and aligning them in time. Adaptive frequency unification of data from different sources is an important prerequisite for ensuring the unification of intelligent driving data sets. Summary of the invention
[0003] The main purpose of this application is to provide a data synchronization method, apparatus, terminal device and storage medium, aiming to solve the technical problem of how to ensure the frequency uniformity of intelligent driving data from different sources.
[0004] To achieve the above objectives, the present application proposes a data synchronization method, which includes:
[0005] Obtain intelligent driving data from different sources;
[0006] storing the intelligent driving data from different sources in a data dictionary in chronological order;
[0007] Performing a position search on the intelligent driving data in the data dictionary to obtain a position index of the intelligent driving data;
[0008] Based on the position index of the intelligent driving data, the intelligent driving data is adaptively normalized to obtain intelligent driving data with uniform frequency.
[0009] In one embodiment, the step of acquiring intelligent driving data from different sources includes:
[0010] Get the robot operating system ros package related to intelligent driving;
[0011] Parse the ros package to obtain intelligent driving data from different sources.
[0012] In one embodiment, the data dictionary includes a data information list, and the step of performing position retrieval on the intelligent driving data in the data dictionary to obtain the position index of the intelligent driving data includes:
[0013] In the data dictionary, the intelligent driving data is positionally retrieved from the starting position index of the data information list to obtain the position index of the intelligent driving data that meets the preset conditions.
[0014] In one embodiment, before the step of performing position retrieval of the intelligent driving data from the starting position index of the data information list in the data dictionary to obtain the position index of the intelligent driving data that meets the preset conditions, the step further includes:
[0015] Define the data information list corresponding to the intelligent driving data from different sources in the data dictionary;
[0016] Based on the data information list, a corresponding position index and index list are defined.
[0017] In one embodiment, the step of performing position retrieval on the intelligent driving data from the starting position index of the data information list in the data dictionary to obtain the position index of the intelligent driving data that meets the preset conditions includes:
[0018] In the data dictionary, the intelligent driving data is retrieved from the starting position index of the data information list, and the data information at each position index of the data information list is obtained respectively;
[0019] For the data information at each location index, determine whether the time corresponding to the data information at the current location index is less than or equal to the current timestamp, and whether the time corresponding to the data information at the next location index is greater than the current timestamp;
[0020] If the time corresponding to the data information on the current position index is less than or equal to the current timestamp and the time corresponding to the data information on the next position index is greater than the current timestamp, the data information on the current position index is determined to be the data information aligned with the current timestamp, and the current position index is used as the position index of the intelligent driving data that meets the preset conditions.
[0021] In one embodiment, after the step of performing position retrieval of the intelligent driving data from the starting position index of the data information list in the data dictionary to obtain the position index of the intelligent driving data that meets the preset conditions, the step further includes:
[0022] The starting position index is updated to the position index of the intelligent driving data that meets the preset condition, and the position index of the intelligent driving data that meets the preset condition is added to the index list.
[0023] In one embodiment, the step of performing adaptive normalization processing on the intelligent driving data based on the position index of the intelligent driving data to obtain intelligent driving data with uniform frequency includes:
[0024] Based on the location index of the intelligent driving data, confirm the timestamp corresponding to the intelligent driving data;
[0025] Subtract the timestamp corresponding to the last smart driving data from the timestamp corresponding to the first smart driving data in the data information list to obtain the duration of the smart driving data;
[0026] Dividing the duration of the intelligent driving data by the total number of intelligent driving data in the data information list to obtain a time interval of the intelligent driving data;
[0027] Based on the time interval of the intelligent driving data, a frequency corresponding to the intelligent driving data is calculated;
[0028] Dividing the frequencies corresponding to the intelligent driving data into different gears;
[0029] Select the corresponding thinning or interpolation method to process the intelligent driving data of different gear frequencies to obtain intelligent driving data with uniform frequency.
[0030] In addition, to achieve the above purpose, the present application also proposes a data synchronization device, the data synchronization device comprising:
[0031] An acquisition module is used to acquire intelligent driving data from different sources;
[0032] A storage module, used for storing the intelligent driving data from different sources in a data dictionary in chronological order;
[0033] A retrieval module, used to perform a position search on the intelligent driving data in the data dictionary to obtain a position index of the intelligent driving data;
[0034] A processing module is used to perform adaptive normalization processing on the intelligent driving data based on the position index of the intelligent driving data to obtain intelligent driving data with uniform frequency.
[0035] In addition, to achieve the above-mentioned purpose, the present application also proposes a data synchronization terminal device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the data synchronization method described above.
[0036] In addition, to achieve the above objectives, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the data synchronization method described above are implemented.
[0037] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the data synchronization method described above are implemented.
[0038] The embodiment of the present application proposes a data synchronization method, including obtaining intelligent driving data from different sources; storing the intelligent driving data from different sources in a data dictionary in chronological order; performing position retrieval on the intelligent driving data in the data dictionary to obtain the position index of the intelligent driving data; and performing adaptive normalization processing on the intelligent driving data based on the position index of the intelligent driving data to obtain intelligent driving data with uniform frequency. This solution can achieve time alignment of data from different data sources by performing position retrieval on different types of data, ensuring that the relative time relationship and time order of the data remain unchanged even after the frequency of the data is adjusted, and by adaptively processing data with different frequencies, adjusting the update frequency of all data streams, so that all data with different frequencies reach a common frequency standard. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0041] Figure 1 A flowchart of the first embodiment of the data synchronization method of the present application is provided;
[0042] Figure 2 A flowchart of the second embodiment of the data synchronization method of the present application is provided;
[0043] Figure 3 A flowchart of the third embodiment of the data synchronization method of the present application is provided;
[0044] Figure 4 This is a schematic diagram of the module structure of the data synchronization device according to an embodiment of the present application;
[0045] Figure 5 A schematic diagram of the device structure of the hardware operating environment involved in the data synchronization method in the embodiment of the present application.
[0046] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0047] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0048] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0049] The main solution of the embodiment of the present application is: storing different types of data in a data dictionary; performing position retrieval on the data in the data dictionary to obtain a position index of the data; and based on the position index of the data, performing adaptive normalization processing on the data to obtain data with uniform frequency.
[0050] Intelligent driving data is generally stored in the form of ros package messages, where data from different types of sources are distinguished in the form of topics. Each topic will contain the time when the topic was sent and the message corresponding to that time. Topic messages from different sources have different sending times and sending frequencies. When processing data offline, topic data from different sources needs to be aggregated when processing data at the same time. This requires processing message data of different frequencies and aligning them in time. Adaptive frequency unification of data from different sources is an important prerequisite for ensuring the unification of intelligent driving data sets.
[0051] The present application provides a solution. Through position retrieval, the system can accurately align different types of data. Even if the frequency of these data is adjusted to a unified standard, it can ensure precise alignment on the time axis, thereby improving the accuracy and reliability of data fusion. Through adaptive normalization processing, data of different frequencies are converted to a unified standard.
[0052] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, etc. The following takes a personal computer as an example to illustrate this embodiment and the following embodiments.
[0053] Based on this, the present application embodiment provides a data synchronization method, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the data synchronization method of the present application.
[0054] In this embodiment, the data synchronization method includes steps S10 to S40:
[0055] Step S10, acquiring intelligent driving data from different sources;
[0056] It should be noted that, since intelligent driving data is generally stored in the form of ROS package messages, in which data from different types of sources are distinguished in the form of topics, this embodiment is illustrated by using topic data. Topic data refers to the message content exchanged between different nodes through the ROS topic communication mechanism.
[0057] In addition, it should be noted that the topic data usually contains a timestamp, that is, the time of issuance and the message corresponding to the time, which is used to indicate the generation time or collection time of the intelligent driving data.
[0058] In a feasible embodiment method, step S10 may include steps S11 to S12:
[0059] Step S11, obtaining a robot operating system ros package related to intelligent driving;
[0060] It should be noted that in the field of intelligent driving, ROS (robot operating system) is a very popular framework for developing robot software systems, including self-driving cars.
[0061] You can find the installation guide for installing the ros package for different operating systems in the official documentation, and install the ros package according to the installation guide.
[0062] Step S12, parsing the ros package to obtain intelligent driving data from different sources.
[0063] The topic data in the ROS system can carry messages from different sources, including different types of intelligent driving data and intelligent driving data of different frequencies. First, you need to set up the ROS node to subscribe to the corresponding topics. You can create a subscriber by writing code, which will listen to the specified topic and receive messages sent by the publisher.
[0064] When the ros node receives the message, it will parse it. Among them, ros messages have a specific format, which are usually defined in .msg files, which describe the data type and structure contained in the message.
[0065] And when parsing the ros package, the data dictionary can save the specified topic data and make adaptive adjustments to the specified topic data. That is, when the specified topic data does not exist, the list of the corresponding topic data is empty.
[0066] Step S20, storing the different types of data in the data dictionary in chronological order.
[0067] It should be noted that the data dictionary is a key-value data structure that allows access to the corresponding value through a unique key. In this embodiment, the key value is the name of the topic data, and the value is a list used to store the message data of the topic data at different times. In the data dictionary, multiple lists for storing information related to intelligent driving data can be defined, including data information lists, index lists, etc.
[0068] In this embodiment, first, a data dictionary for storing topic data from different sources is defined, and the data dictionary can be represented by topic_info. Topic_info is used to store detailed information of topic data.
[0069] Since topic data includes the time when it was issued, after obtaining topic data from different sources, different types of topic data can be stored in the corresponding positions of the data dictionary topic_info according to the order of each issuance time. And for the topic data at each moment, the corresponding time and message data of the topic data are stored as a whole instrument in the list of the data dictionary topic_info. That is, after parsing the ros package, the data dictionary will record all the data of different topics, and each topic data saves the specific information of the topic data in chronological order.
[0070] Step S30, performing a position search on the intelligent driving data in the data dictionary to obtain a position index of the intelligent driving data;
[0071] It should be noted that location indexes allow users or applications to quickly access data elements by the physical or logical location of the data.
[0072] In this embodiment, it is assumed that the extracted data dictionary topic_info contains four types of topic data: prediction_object, used to store the specific information of other vehicles; rc_localmap, used to store the specific information of the map; ego_tf_relative, used to store the specific information of the own vehicle; fsm_state: used to store the specific information of the driving status (here four topics are taken as an example, and any specified topic can be included in the actual operation), among which prediction_objects is the main alignment topic, that is, the time of the topic is the main alignment object.
[0073] In a feasible implementation, step S30 may include step S31:
[0074] Step S31: In the data dictionary, position retrieval is performed on the intelligent driving data from the starting position index of the data information list to obtain the position index of the intelligent driving data that meets the preset conditions.
[0075] By taking the starting search position in the predefined data information list and searching the topic data in the data dictionary from the starting search position, a position index that meets the preset conditions can be obtained.
[0076] Further, in another feasible implementation manner, step S31 may include steps A1 to A3:
[0077] Step A1, in the data dictionary, starting from the starting position index of the data information list, positionally search the intelligent driving data, and respectively obtain the data information at each position index of the data information list;
[0078] It should be noted that in the data dictionary, intelligent driving data usually exists in the form of a data information list, and each element represents data information at a time point. This data information list is sorted by timestamp, and the earliest record is located at the beginning of the data information list.
[0079] Therefore, it is necessary to start from the beginning of the data information list, that is, to start the search from the earliest data record. The purpose of this step is to traverse the entire data information list until the intelligent driving data associated with the current timestamp is found.
[0080] Step A2, for the data information at each location index, determine whether the time corresponding to the data information at the current location index is less than or equal to the current timestamp, and whether the time corresponding to the data information at the next location index is greater than the current timestamp;
[0081] For example, for a list map_info storing map information in chronological order, the starting search position index is taken as max(0, map_important_index), that is, the larger value of 0 and map_important_index, and map_info is searched from the starting search position index to obtain the position index map_index that meets the preset conditions.
[0082] Specifically, determine whether the time corresponding to the topic information at the current position index (map_index) in the map_info list is less than or equal to the current timestamp (curr_timestamp), and whether the time corresponding to the topic information at the next position index (map_index+1) is greater than the current timestamp.
[0083] Similarly, for the list loc_info storing the vehicle information in chronological order, the starting search position index is taken as max(0, loc_important_index), that is, the larger value of 0 and loc_important_index, and loc_info is searched from the starting search position index to obtain the position index local_index that satisfies the following conditions.
[0084] Specifically, it is determined whether the corresponding time of the topic information at the current index position (local_index) in the loc_info list is less than or equal to the current timestamp, and whether the corresponding time of the topic information at the next position index (local_index+1) is greater than the current timestamp.
[0085] Similarly, for the list fsm_info storing driving status information in chronological order, the starting search position index is taken as max(0, fsm_important_index), that is, the larger value of 0 and fsm_important_index, and fsm_info is searched from the starting search position index to obtain the position index fsm_index that meets the following conditions.
[0086] Specifically, determine whether the time corresponding to the topic information at the fsm_index index position in the fsm_info list is less than or equal to the current timestamp, and whether the time corresponding to the topic information at the next position index (fsm_index+1) is greater than the current timestamp.
[0087] Step A3: If the time corresponding to the data information on the current position index is less than or equal to the current timestamp and the time corresponding to the data information on the next position index is greater than the current timestamp, then the data information on the current position index is determined to be the data information aligned with the current timestamp, and the current position index is used as the position index of the intelligent driving data that meets the preset conditions.
[0088] If the verification in step A2 is successful, then the current position index corresponding to the data information list is the position index that meets the preset conditions, that is, the data information closest to the current timestamp and whose time information does not exceed it is found.
[0089] For example, if the time corresponding to the topic information at the current location index (map_index) in the map_info list is less than or equal to the current timestamp (curr_timestamp), and the time corresponding to the topic information at the next location index (map_index+1) is greater than the current timestamp, then the topic information at the current location index in the map_info list is the map information aligned with the current timestamp.
[0090] Similarly, if the corresponding time of the topic information at the current index position (local_index) in the loc_info list is less than or equal to the current timestamp, and the corresponding time of the topic information at the next position index (local_index+1) is greater than the current timestamp, then the topic information at the current index position in the loc_info list is the vehicle information aligned with the current timestamp.
[0091] Similarly, if the corresponding time of the topic information at the current index position (fsm_index) of the fsm_info list is less than or equal to the current timestamp, and the corresponding time of the topic information at the next position index (fsm_index+1) is greater than curr_timestamp, then the topic information at the current index position of the fsm_info list is the driving status information aligned with the current timestamp.
[0092] Through the above steps, the time alignment of different types of data can be effectively achieved to ensure the accuracy and timeliness of data processing.
[0093] Step S40: Based on the position index of the intelligent driving data, the intelligent driving data is adaptively normalized to obtain intelligent driving data with uniform frequency.
[0094] It should be noted that adaptive normalization processing is intended to adjust the distribution or scale of data to meet specific standards or requirements.
[0095] Since the intelligent driving data collected are from different sources, the sampling frequencies of their topics are different. For example, the topic frequency of the intelligent driving data collected for testing is relatively high, while the intelligent driving data collected for mass production will be downsampled to save data transmission traffic overhead. At this time, the topic frequency of the collected intelligent driving data will be reduced. Therefore, step S30 needs to be executed to ensure the uniformity of the overall intelligent driving data.
[0096] In a feasible implementation, step S40 may include steps S41 to S46:
[0097] Step S41, confirming the timestamp corresponding to the data based on the location index of the data;
[0098] Since in this embodiment, prediction_objects is used as the main alignment topic data, and the time of the topic data is used as the main alignment object, it can be determined that the data information list (pre_info) corresponding to prediction_objects stores the timestamp and specific information corresponding to the prediction_object of the main alignment topic data.
[0099] Step S42, subtracting the timestamp corresponding to the first intelligent driving data from the timestamp corresponding to the last intelligent driving data in the data information list to obtain the duration of the intelligent driving data;
[0100] Then, find the timestamp of the first topic data (recorded as start_time) and the timestamp of the last topic data (recorded as end_time) in pre_info, and then calculate the difference between the two, pred_data_time, which is the duration of the intelligent driving data.
[0101] Step S43, dividing the duration of the intelligent driving data by the total number of intelligent driving data in the data information list to obtain a time interval of the intelligent driving data;
[0102] Next, divide pred_data_time by the total number of data in the pre_info list (minus 1, because it is the time interval from the first to the second to last element), and get the time interval between each data point, pred_data_interval_ms, in milliseconds (ms). It should be emphasized that it is assumed here that the data is uniformly sampled, that is, the time interval between each data point is equal.
[0103] Step S44, calculating the frequency corresponding to the intelligent driving data based on the time interval of the intelligent driving data;
[0104] Finally, divide pred_data_interval_ms by 1000 (the factor for converting milliseconds to seconds) to get the frequency of the main alignment topic (pred_data_frequency) in Hertz (Hz).
[0105] Step S45, dividing the frequencies corresponding to the intelligent driving data into different gears;
[0106] According to the calculated pred_data_frequency, it is divided into different gears. For example, different frequency intervals can be set, such as <1Hz, 1-10Hz>, 10Hz, etc., and each interval corresponds to a different data processing strategy.
[0107] Step S46, selecting a corresponding thinning or interpolation method to process the intelligent driving data of different gear frequencies to obtain intelligent driving data with a uniform frequency.
[0108] For data of different gears, choose the corresponding thinning or interpolation method. Among them, the thinning or interpolation operation is performed on the pre-defined attention index list (consider_index). For example, for data obtained by high-frequency sampling, the pre-defined attention index list consider_index can be uniformly extracted, and the interval is determined by the gear; for data obtained by low-frequency sampling, the pre-defined attention index list consider_index can be completed by complex interpolation operations.
[0109] Through the above steps, by calculating and grading the frequency of intelligent driving data, combined with appropriate thinning or interpolation processing, the efficiency and accuracy of intelligent driving data processing can be effectively improved to meet the needs of different application scenarios.
[0110] Through the above-mentioned embodiment method, by acquiring intelligent driving data from different sources; storing the intelligent driving data from different sources in a data dictionary in chronological order; performing position retrieval on the intelligent driving data in the data dictionary to obtain the position index of the intelligent driving data; based on the position index of the intelligent driving data, performing adaptive normalization processing on the intelligent driving data to obtain intelligent driving data with uniform frequency. This solution can achieve time alignment of data from different data sources by performing position retrieval on different types of data, ensuring that the relative time relationship and time order of the data remain unchanged even after the frequency of the data is adjusted, and by adaptively processing data with different frequencies, adjusting the update frequency of all data streams, so that all data with different frequencies reach a common frequency standard.
[0111] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 2 Before step 31, the data synchronization method further includes steps B1 to B2:
[0112] Step B1, defining a data information list corresponding to intelligent driving data from different sources in a data dictionary;
[0113] In this embodiment, pre_info can be defined as an information list corresponding to prediction_objects in the dictionary topic_info, map_info can be defined as an information list corresponding to rc_localmap in the dictionary topic_info, loc_info can be defined as an information list corresponding to ego_tf_relative in the dictionary topic_info, and fsm_info can be defined as an information list corresponding to fsm_state in the dictionary topic_info.
[0114] The pre_info list will contain all data information related to the prediction_objects topic, including the time when the data was released and the specific information content. This usually involves extracting all values with the key prediction_objects from the topic_info dictionary, which are lists of data points accumulated over time.
[0115] The map_info list is used to store information related to the rc_localmap topic and is constructed by getting the value of the corresponding key from the topic_info dictionary.
[0116] The loc_info list collects all information related to the ego_tf_relative topic, and similarly, this information is extracted from the topic_info dictionary.
[0117] The fsm_info list contains all data information of the fsm_state topic, which is also obtained by querying the topic_info dictionary.
[0118] Step B2: Based on the data information list, define the corresponding position index and index list.
[0119] Define map_important_index as the position index of the map_info list, initialized to -1, loc_important_index as the position index of the loc_inf list, initialized to -1, and fsm_important_index as the position index of the fsm_info list, initialized to -1.
[0120] Define a consider_index list to save the aligned topic information. Each element is a list that records the topic information associated with different topics at the alignment time. Define a temporary index list (index_temp) to record the position index information of each associated topic in its own list when the time is aligned.
[0121] Through the above-mentioned embodiment method, by defining information lists of different types of data and establishing an index mechanism based on these lists, efficient management and fast access to data can be achieved, which is an indispensable part of data processing and analysis.
[0122] Based on the first embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those in the first and second embodiments can be referred to the above description, and will not be described in detail later. Figure 3 After step 31, the data synchronization method further includes step C1:
[0123] Step C1, updating the starting position index to the position index of the data satisfying the preset condition, and adding the position index of the data satisfying the preset condition to the index list.
[0124] After the location index of the data meeting the preset condition is obtained through step S31, the starting search position taken out from the corresponding data information list can be updated to the location index of the data meeting the preset condition, and the updated location index is added to the predefined temporary index list.
[0125] For example, update map_important_index to map_index and add map_index to the index_temp list. Similarly, update loc_important_index to local_index and add local_index to the index_temp list. Similarly, update fsm_important_index to fsm_index and add fsm_index to the temporary index list.
[0126] In this way, the specific index position of each topic aligned at the current moment can be obtained in the temporary index list, and the relevant information of the corresponding topic can be obtained through the index position. The temporary index list represents the specific position index information of the topic alignment at each moment.
[0127] Since the focus index list is used to store the specific location index information of each topic time alignment at different times, the temporary index list is added to the focus index list to indicate the specific location index information of each topic alignment at the current time.
[0128] Through the above-mentioned embodiment method, by updating the starting position index and adding it to the index list, it can be ensured that all data streams or data sets are correctly aligned on the time axis, thereby improving the accuracy and efficiency of data processing.
[0129] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the data synchronization method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0130] This application also provides a data synchronization device, please refer to Figure 4 , the data synchronization device comprises:
[0131] An acquisition module 10 is used to acquire intelligent driving data from different sources;
[0132] A storage module 20, for storing intelligent driving data from different sources in a data dictionary in chronological order;
[0133] A retrieval module 30, configured to perform a position search on the intelligent driving data in the data dictionary to obtain a position index of the intelligent driving data;
[0134] The processing module 40 is used to perform adaptive normalization processing on the intelligent driving data based on the position index of the intelligent driving data to obtain intelligent driving data with uniform frequency.
[0135] The data synchronization device provided by the present application adopts the data synchronization method in the above embodiment, which can solve the technical problem of how to ensure the uniformity of the frequency of data from different sources. Compared with the prior art, the beneficial effects of the data synchronization device provided by the present application are the same as the beneficial effects of the data synchronization method provided by the above embodiment, and the other technical features in the data synchronization device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0136] The present application provides a data synchronization terminal device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the data synchronization method in the above-mentioned embodiment one.
[0137] Reference below Figure 5, which shows a schematic diagram of the structure of a data synchronization terminal device suitable for implementing an embodiment of the present application. The data synchronization terminal device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The data synchronization terminal device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0138] like Figure 5 As shown, the data synchronization terminal device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the data synchronization terminal device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the data synchronization terminal device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a data synchronization terminal device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided instead.
[0139] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0140] The data synchronization terminal device provided by the present application adopts the data synchronization method in the above embodiment, which can solve the technical problem of how to ensure the uniformity of the frequency of data from different sources. Compared with the prior art, the beneficial effects of the data synchronization terminal device provided by the present application are the same as the beneficial effects of the data synchronization method provided by the above embodiment, and the other technical features in the data synchronization terminal device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0141] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0142] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0143] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the data synchronization method in the above-mentioned embodiment.
[0144] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0145] The computer-readable storage medium may be included in the data synchronization terminal device; or may exist independently without being assembled into the data synchronization terminal device.
[0146] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the data synchronization terminal device, the data synchronization terminal device:
[0147] Obtain intelligent driving data from different sources;
[0148] The intelligent driving data from different sources are stored in a data dictionary in chronological order;
[0149] Performing a position search on the intelligent driving data in the data dictionary to obtain a position index of the intelligent driving data;
[0150] Based on the position index of the intelligent driving data, the intelligent driving data is adaptively normalized to obtain intelligent driving data with uniform frequency.
[0151] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0152] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0153] The modules involved in the embodiments of the present application may be implemented by software or hardware, wherein the name of the module does not limit the unit itself in some cases.
[0154] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned data synchronization method, and can solve the technical problem of how to ensure the frequency uniformity of data from different sources. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the data synchronization method provided in the above-mentioned embodiment, and will not be elaborated here.
[0155] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned data synchronization method when executed by a processor.
[0156] The computer program product provided by this application can solve the technical problem of how to ensure the frequency uniformity of data from different sources. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the data synchronization method provided by the above embodiment, which will not be repeated here.
[0157] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A data synchronization method, characterized in that: The method comprises: Obtain intelligent driving data from different sources; storing the intelligent driving data from different sources in a data dictionary in chronological order; Performing a position search on the intelligent driving data in the data dictionary to obtain a position index of the intelligent driving data; Based on the position index of the intelligent driving data, the intelligent driving data is adaptively normalized to obtain intelligent driving data with uniform frequency.
2. The method according to claim 1, characterized in that The step of obtaining intelligent driving data from different sources includes: Get the robot operating system ros package related to intelligent driving; Parse the ros package to obtain intelligent driving data from different sources.
3. The method according to claim 1, characterized in that The data dictionary includes a data information list, and the step of performing position retrieval on the intelligent driving data in the data dictionary to obtain the position index of the intelligent driving data includes: In the data dictionary, the intelligent driving data is positionally retrieved from the starting position index of the data information list to obtain the position index of the intelligent driving data that meets the preset conditions.
4. The method according to claim 3, characterized in that Before the step of performing position retrieval on the intelligent driving data from the starting position index of the data information list in the data dictionary to obtain the position index of the intelligent driving data that meets the preset conditions, the method further includes: Define the data information list corresponding to the intelligent driving data from different sources in the data dictionary; Based on the data information list, a corresponding position index and index list are defined.
5. The method according to any one of claims 3 to 4, characterized in that: The step of performing position retrieval on the intelligent driving data from the starting position index of the data information list in the data dictionary to obtain the position index of the intelligent driving data that meets the preset conditions comprises: In the data dictionary, the intelligent driving data is retrieved from the starting position index of the data information list, and the data information at each position index of the data information list is obtained respectively; For the data information at each location index, determine whether the time corresponding to the data information at the current location index is less than or equal to the current timestamp, and whether the time corresponding to the data information at the next location index is greater than the current timestamp; If the time corresponding to the data information on the current position index is less than or equal to the current timestamp and the time corresponding to the data information on the next position index is greater than the current timestamp, the data information on the current position index is determined to be the data information aligned with the current timestamp, and the current position index is used as the position index of the intelligent driving data that meets the preset conditions.
6. The method according to claim 4, characterized in that After the step of performing position retrieval on the intelligent driving data from the starting position index of the data information list in the data dictionary to obtain the position index of the intelligent driving data that meets the preset conditions, the method further includes: The starting position index is updated to the position index of the intelligent driving data that meets the preset condition, and the position index of the intelligent driving data that meets the preset condition is added to the index list.
7. The method according to claim 1, characterized in that The step of performing adaptive normalization processing on the intelligent driving data based on the position index of the intelligent driving data to obtain intelligent driving data with uniform frequency includes: Based on the location index of the intelligent driving data, confirm the timestamp corresponding to the intelligent driving data; Subtract the timestamp corresponding to the last smart driving data from the timestamp corresponding to the first smart driving data in the data information list to obtain the duration of the smart driving data; Dividing the duration of the intelligent driving data by the total number of intelligent driving data in the data information list to obtain a time interval of the intelligent driving data; Based on the time interval of the intelligent driving data, a frequency corresponding to the intelligent driving data is calculated; Dividing the frequencies corresponding to the intelligent driving data into different gears; Select the corresponding thinning or interpolation method to process the intelligent driving data of different gear frequencies to obtain intelligent driving data with uniform frequency.
8. A data synchronization device, characterized in that: The device comprises: An acquisition module is used to acquire intelligent driving data from different sources; A storage module, used for storing the intelligent driving data from different sources in a data dictionary in chronological order; A retrieval module, used to perform a position search on the intelligent driving data in the data dictionary to obtain a position index of the intelligent driving data; A processing module is used to perform adaptive normalization processing on the intelligent driving data based on the position index of the intelligent driving data to obtain intelligent driving data with uniform frequency.
9. A data synchronization terminal device, characterized in that: The data synchronization terminal device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the data synchronization method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the data synchronization method according to any one of claims 1 to 7 are implemented.