Data storage method and device of roadside system, server and storage medium
By associating and storing the original data collected by sensors and the result data calculated by the roadside unit in the roadside system, and using the timestamp index list to achieve data correlation, the problem of difficulty in data correlation in the existing technology is solved, and the efficiency of data utilization is improved. and system performance.
Patent Information
- Application Number
- CN202310890746.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-19
- Publication Date
- 2025-01-21
AI Technical Summary
The data of existing roadside systems are usually stored separately and it is difficult to reflect the correlation between the data.
By obtaining the multi -frame raw data collected by each sensor, each frame of data is associated with the corresponding timestamp of the data and received the index list sent by the road side unit to store these index lists to realize the storage of data.
Realize the association storage of road system data, which can find other data associated with specific data through timestamp, thereby improving the efficiency of data utilization and system performance.
Smart Images

Figure CN119336925A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle-road collaboration technology, and in particular to a data storage method, device, server and storage medium for a roadside system. Background Art
[0002] As an important component in the field of vehicle-road cooperative technology, the roadside system plays an important role in various application scenarios. As the upstream output of the entire system, the data of the roadside system always affects the performance of the system. For example, the sensors such as lidar, camera, and millimeter-wave radar of the roadside system always output various raw data. The roadside unit can output the corresponding result data based on the data calculation of various raw data. How to store these raw data and result data has become an important indicator for measuring the performance of the roadside system. At present, various types of data in the roadside system are usually saved separately and independently, and it is difficult to reflect the correlation between the data. Summary of the invention
[0003] In view of this, an embodiment of the present application provides a data storage method, device, server and storage medium for a roadside system, which can reflect the correlation between various types of data when storing various types of data of the roadside system.
[0004] A first aspect of an embodiment of the present application provides a data storage method for a roadside system, including:
[0005] Acquire multiple frames of raw data collected by various sensors of the roadside system;
[0006] Each frame of raw data is stored in association with its corresponding timestamp;
[0007] Receiving multiple groups of index lists sent by a roadside unit of a roadside system; wherein each group of index lists contains timestamps corresponding to various data involved in a single-frame data processing process completed by the roadside unit, and each data includes a frame of raw data collected by each sensor and a frame of result data calculated by the roadside unit;
[0008] Stores multiple sets of index lists.
[0009] In the embodiment of the present application, after collecting their own raw data, each sensor of the roadside system will send their own raw data to the roadside unit and the server for data storage; after receiving the raw data of each sensor, the server will associate and store each frame of raw data with the corresponding timestamp; after receiving the raw data of each sensor, the roadside unit will perform a single-frame data processing process, and each data involved in the data processing process includes a frame of raw data collected by each sensor and a frame of result data calculated by the roadside unit. The roadside unit will construct a set of index lists with the timestamps corresponding to each data involved in each data processing process, and send these index lists to the server; finally, the server receives and stores these index lists. Through such a setting, the raw data of each sensor and the result data calculated by the roadside unit can be associated through the index list stored in the server. For example, the corresponding index list can be found according to the timestamp of a certain raw data, and the timestamps of other raw data and result data recorded in the index list can be used to determine other raw data and result data associated with the raw data, that is, the association between various types of data can be reflected.
[0010] In one implementation of the embodiment of the present application, each sensor includes at least one laser radar, one laser radar among the at least one laser radar serves as a main sensor, and each sensor except the main sensor among the sensors serves as a secondary sensor. When performing each data processing process, the roadside unit uses a frame of raw data collected by the main sensor as a reference, and determines the corresponding frame of raw data collected by each secondary sensor through a timestamp alignment algorithm.
[0011] In an implementation manner of the embodiment of the present application, storing multiple groups of index lists may include:
[0012] Encapsulate all index lists whose corresponding data processing processes in the multiple groups of index lists have completion times within the same preset time length into one index file;
[0013] Stores the encapsulated index files.
[0014] In an implementation of the embodiment of the present application, the method may further include:
[0015] Receiving multiple frames of result data sent by the roadside unit;
[0016] Each frame of result data is stored in association with its corresponding timestamp.
[0017] Furthermore, the method may also include:
[0018] When an original data query request carrying target result data is received, searching for a first index list corresponding to the target result data from the plurality of index lists according to the timestamp of the target result data;
[0019] According to the timestamps corresponding to the original data included in the first index list, original data corresponding to the target result data are searched from the multiple frames of original data.
[0020] Furthermore, the method may also include:
[0021] When a result data query request carrying target original data is received, searching for a second index list corresponding to the target original data from the plurality of index lists according to the timestamp of the target original data;
[0022] According to the timestamps corresponding to the result data included in the second index list, the result data corresponding to the target original data is searched from the multiple frames of result data.
[0023] In an implementation of the embodiment of the present application, storing each frame of raw data in association with its corresponding timestamp may include:
[0024] For each frame of raw data, a storage path of the raw data is determined according to the type and timestamp of the raw data, and the raw data is stored in the storage path.
[0025] In an implementation of the embodiment of the present application, the acquiring of multiple frames of raw data collected by various sensors of the roadside system may include:
[0026] Receive multiple frames of raw data sent by each sensor through streaming or UDP transmission.
[0027] A second aspect of an embodiment of the present application provides a data storage device of a roadside system, including:
[0028] A raw data acquisition module, used to acquire multiple frames of raw data collected by various sensors of the roadside system;
[0029] A raw data storage module, used for storing each frame of raw data in association with its corresponding timestamp;
[0030] An index list receiving module is used to receive multiple groups of index lists sent by a roadside unit of a roadside system; wherein each group of index lists contains timestamps corresponding to various data involved in a single-frame data processing process completed by the roadside unit, and each data includes a frame of raw data collected by each sensor and a frame of result data calculated by the roadside unit;
[0031] The index list storage module is used to store multiple groups of index lists.
[0032] A third aspect of an embodiment of the present application provides a server, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the data storage method for the roadside system provided in the first aspect of the embodiment of the present application is implemented.
[0033] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the data storage method of the roadside system provided in the first aspect of the embodiment of the present application.
[0034] A fifth aspect of an embodiment of the present application provides a computer program product. When the computer program product runs on a server, the server executes the data storage method of the roadside system provided in the first aspect of the embodiment of the present application.
[0035] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 This is a flow chart of a data storage method for a roadside system provided in an embodiment of the present application;
[0037] Figure 2 This is a schematic diagram of a storage process of a data storage method for a roadside system provided in an embodiment of the present application;
[0038] Figure 3 It is a schematic diagram of a data storage structure provided by a data storage server provided in an embodiment of the present application;
[0039] Figure 4 It is a structural schematic diagram of a data storage device of a roadside system provided in an embodiment of the present application;
[0040] Figure 5 It is a schematic diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0041] In the following description, for the purpose of illustration rather than limitation, specific details such as specific system structures, technologies, etc. are proposed, so as to thoroughly understand the embodiments of the present application. However, it should be clear to those skilled in the art that the present application can also be implemented in other embodiments without these specific details. In other cases, the detailed description of well-known systems, devices, circuits and methods is omitted to prevent unnecessary details from hindering the description of the present application. In addition, in the description of the present application specification and the attached claims, the terms "first", "second", "third" etc. are only used to distinguish the description, and cannot be interpreted as indicating or suggesting relative importance.
[0042] The roadside system mainly includes roadside units and various sensors such as lidar, cameras, millimeter-wave radars, etc. Each sensor will send the collected raw data to the roadside unit, and the roadside unit will calculate the corresponding result data. These raw data and result data play an important role in the vehicle-road collaborative scenario. However, at present, various types of data in the roadside system are usually stored separately and independently, and it is difficult to reflect the correlation between the data. To address this problem, the embodiments of the present application provide a data storage method, device, server and storage medium for a roadside system, which can reflect the correlation between various types of data when storing various types of data in the roadside system. For more specific technical implementation details of the embodiments of the present application, please refer to the method embodiments described below.
[0043] It should be understood that the execution subjects of the various method embodiments of the present application are various types of terminal devices or servers, such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, desktop computers, laptops, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA), large-screen TVs, etc. The embodiments of the present application do not impose any restrictions on the specific types of the terminal devices and servers.
[0044] See also Figure 1 , shows a data storage method of a roadside system provided by an embodiment of the present application, including:
[0045] 101. Acquire multiple frames of raw data collected by various sensors of the roadside system;
[0046] It should be understood that the execution entity of the embodiment of the present application may be a data storage server, which may be connected to the roadside unit and various sensors of the roadside system in a wireless or wired manner.
[0047] First, multiple frames of raw data collected by various sensors of the roadside system are obtained. The roadside system may include various types of sensors such as lidar, camera, and millimeter wave radar, and the number of each type of sensor may also be one or more. The embodiment of the present application does not impose any restrictions on the type and number of sensors included in the roadside system. In actual operation, the various sensors of the roadside system can be jointly calibrated, specifically including time calibration and space calibration, wherein time calibration can adopt methods such as NTP timing and satellite timing, and space calibration can adopt methods such as target calibration, and finally a sensor system aligned in time and space is obtained. After each sensor collects its own raw data, it will send the raw data to the roadside unit and the server respectively. The raw data here can be point cloud or image data, and each frame of raw data contains its own corresponding timestamp to indicate the data collection time.
[0048] In an implementation of the embodiment of the present application, the acquiring of multiple frames of raw data collected by various sensors of the roadside system may include:
[0049] Receive multiple frames of raw data sent by each sensor through streaming or UDP transmission.
[0050] The server can establish a connection with various sensors such as cameras and lidars through streaming or UDP transmission, so as to receive the raw data sent by each sensor. The received multiple frames of raw data can be stored in the corresponding data queue in the form of frames for subsequent data preservation.
[0051] 102. Store each frame of raw data in association with its corresponding timestamp;
[0052] After receiving multiple frames of raw data collected by each sensor, the server will associate and store each frame of raw data with its corresponding timestamp. Here, the main work is to store the acquired raw data according to the set storage path. At the same time, an index cache can be established for each frame of raw data to find the storage path of the corresponding frame. In addition, when storing raw data, a multi-threaded approach can be used. The data storage process of each thread does not affect each other, thereby improving data storage efficiency; moreover, each thread can also cache the corresponding storage path to the service for index function query.
[0053] In an implementation of the embodiment of the present application, storing each frame of raw data in association with its corresponding timestamp may include:
[0054] For each frame of raw data, a storage path of the raw data is determined according to the type and timestamp of the raw data, and the raw data is stored in the storage path.
[0055] In specific operations, the server can generate a mapping relationship between the timestamp and the storage path and cache it, so that the corresponding storage path can be determined according to the timestamp of a frame of raw data, so that the raw data of the frame can be stored in the storage path. In addition, different types of raw data may also need to be stored separately, that is, the storage path is also related to the type of raw data. For example, assuming that the raw data contains video data and point cloud data, since the video data is an rtsp code stream, the PI frame decoding operation needs to be performed before batch processing, while the point cloud data does not need to perform the decoding operation. In order to facilitate data acquisition and use, the video data and point cloud data need to be stored separately, that is, different storage paths (folders) are set. In actual operation, different type folders can be set according to different data types, such as image folders and point cloud folders, and then multiple time folders are set in each type folder according to different time periods (year, month, day, etc.), such as folder 23-05-01 (indicating data on May 1, 2023), 23-05-02 (indicating data on May 2, 2023)... and so on. After obtaining a frame of raw data from a sensor, the corresponding type folder can be determined according to its data type, and then the corresponding time folder can be determined according to its acquisition timestamp, so that the frame of raw data can be stored in the corresponding time folder under the corresponding type folder.
[0056] 103. Receive multiple groups of index lists sent by a roadside unit of the roadside system; wherein each group of index lists contains timestamps corresponding to various data involved in a single-frame data processing process completed by the roadside unit, and each data includes a frame of raw data collected by each sensor and a frame of result data calculated by the roadside unit;
[0057] On the other hand, after receiving the raw data sent by each sensor, the roadside unit will perform data processing in the form of a single frame based on the raw data, thereby obtaining result data frame by frame. For example, assuming that each sensor includes camera A and laser radar B, the roadside unit will receive multiple frames of image data from camera A and multiple frames of point cloud data from laser radar B. When the roadside unit performs data processing, it will select a frame of point cloud data and a corresponding frame of image data according to the timestamp of each frame of data for calculation to obtain a corresponding frame of result data. The frame of point cloud data, the frame of image data and the frame of result data all have their own corresponding timestamps. Obviously, each time the roadside unit completes a single-frame data processing process, a frame of result data will be generated, that is, if the single-frame data processing process is completed n times, n frames of result data will be generated, and these result data can be sent to the server for storage. In addition, the roadside unit will also integrate the timestamps corresponding to each data involved in each data processing process into a set of index lists, that is, n data processing processes will generate n groups of index lists. Assume that at a certain moment, the roadside unit uses point cloud L x and image I x Calculate the test result D x , where point cloud L x The corresponding timestamp is T L , image I x The corresponding timestamp is T I , test result D x The corresponding timestamp is T D , then the integrated set of index lists can be written as:
[0058] Index=[T L ,T I ,T D ]
[0059] It should be noted that due to T L is the point cloud L x The timestamp of acquisition, T I is image I x The timestamp of acquisition, T D is the timestamp of the RSU calculation, so T L , T I , T D In addition, the above example is only the simplest form. In the actual calculation process of the roadside unit, raw data such as accelerometer data, inertial sensor data, other image data, and other point cloud data may also be involved, and the resulting data may not only be D x , the timestamps corresponding to all the original data and all the result data involved in each single-frame calculation are integrated into a set of index lists.
[0060] In one implementation of the embodiment of the present application, each sensor includes at least one laser radar, one laser radar among the at least one laser radar serves as a main sensor, and each sensor except the main sensor among the sensors serves as a secondary sensor. When performing each data processing process, the roadside unit uses a frame of raw data collected by the main sensor as a reference, and determines the corresponding frame of raw data collected by each secondary sensor through a timestamp alignment algorithm.
[0061] Since the timestamps of the raw data collected by different sensors are different, the roadside unit needs to use a certain time matching algorithm (such as timestamp alignment algorithm, etc.) to determine the frames of raw data selected for the current calculation when performing calculations. Now take the lidar and camera as examples for explanation. The common operating frequency of the lidar is 10Hz, that is, 100ms to receive a frame of raw data; the common operating frequency of the camera is 10-25Hz. When the camera frequency is set to 15Hz, an average of 67ms is received for a frame of raw data. When the lidar and camera data are received, they will be accompanied by timestamp information, recorded as T_lidar and T_camera respectively. At the same time, each lidar and each camera in the roadside unit will have a data queue, which is responsible for caching the raw data received by this sensor. The matching logic of the timestamp alignment algorithm is: when a frame of lidar data is received, traverse the data queue of each camera to find a frame of raw data that meets min(T_camera-T_lidar). In general, a certain laser radar is used as the main sensor, and other sensors except the main sensor (such as other laser radars, cameras, accelerometers, etc.) are used as secondary sensors. A frame of raw data collected by the main sensor is used as the benchmark data, and a frame of raw data closest to the timestamp of the benchmark data is found for each secondary sensor.
[0062] The following is an example of an actual index list:
[0063]
[0064] In this example, the roadside unit uses a sensor layout of one laser radar plus two cameras. Therefore, "camera" stores the timestamp and data path of one frame of raw data from two cameras, and "lidar" stores the timestamp and data path of one frame of raw data from a laser radar. "camera" and "lidar" can be called upstream heterogeneous sensor data, while "resPath" is downstream result-level data, which is also a frame of result data calculated by the roadside unit, and it also contains the corresponding timestamp and data path. "stationId" indicates the roadside unit number. Since the same server can access multiple roadside units of multiple roadside systems, each roadside unit can be numbered separately to distinguish them. "timeStamp" is the result data timestamp accurate to milliseconds.
[0065] All index lists generated by the roadside unit will be sent to the server. After receiving the index lists sent by the roadside unit, the server can store these index lists in a set manner so as to use these index lists to perform operations such as querying related data in the future.
[0066] 104. Store multiple groups of index lists.
[0067] The server may store all index lists sent by the roadside unit in a set manner. In an implementation of the embodiment of the present application, storing multiple groups of index lists may include:
[0068] (1) encapsulating all index lists whose corresponding data processing processes in the plurality of index lists have completion times within the same preset time length into one index file;
[0069] (2) Store the encapsulated index files.
[0070] For the convenience of storage, the server can first encapsulate all index lists in multiple groups of index lists whose corresponding data processing processes have completion times within the same preset time length into an index file, and then store the encapsulated index files. For example, the time length can be set to 1 hour, that is, n groups of index lists corresponding to n data processing processes with completion times within the same hour are all encapsulated into one index file, and the index file can be named with the name of the corresponding hour, for example, 23-05-24-08-09, which can represent an index file encapsulated from all index lists obtained between 8 am and 9 am on May 24, 2023. In addition, when storing these index files, corresponding index folders can also be created according to the date for storage. For example, all index files on May 24, 2023 can be stored in the index folder of 23-05-24, and so on.
[0071] In an implementation of the embodiment of the present application, the method may further include:
[0072] (1) receiving multiple frames of result data sent by a roadside unit;
[0073] (2) Each frame of result data is associated and stored with its corresponding timestamp.
[0074] The roadside unit generates a frame of result data in each single-frame data processing process, and these result data are sent to the server for storage. Specifically, after receiving multiple frames of result data sent by the roadside unit, the server will associate each frame of result data with its corresponding timestamp and store it. The specific data storage method is similar to the original data. It can also create a corresponding result data folder according to the date, and then store each frame of result data in the corresponding result data folder according to the timestamp.
[0075] The following are examples of the storage formats of raw data and result data:
[0076] Point cloud (one file per minute): number of packets (2B) + header length (4B) + content length (4B) + header information (8B) + content information (1350B) = 1366B;
[0077] Video (one file per minute): header length (4B) + content length (4B) + header information (8B) + content information (XXXB);
[0078] Result data: Each line is a JSON string, and the internal fields correspond to the data types in the result data, such as: number of cameras, camera timestamp list, frame ID, fusion target information, etc.
[0079] Furthermore, the method may also include:
[0080] (1) when an original data query request carrying target result data is received, searching for a first index list corresponding to the target result data from the plurality of index lists according to the timestamp of the target result data;
[0081] (2) According to the timestamp corresponding to the original data contained in the first index list, searching for the original data corresponding to the target result data from the multiple frames of original data.
[0082] From the above description, it can be known that the server stores a large amount of raw data, result data, and index lists. Users can query the relevance of data through the server. For example, when a user wants to obtain raw data associated with a target result data, he can issue a raw data query request, which carries the target result data and the corresponding timestamp. After receiving the request, the server can find the index list corresponding to the target result data from all stored index lists according to the timestamp of the target result data, and represent it with the first index list. For example, assuming the timestamp of the target result data is T D , then search for the timestamp T D The index list is used as the first index list. After finding the first index list, the original data associated with the target result data can be found from all the stored original data according to the timestamps corresponding to the original data contained in the first index list. For example, assuming that the timestamp corresponding to the original data contained in the first index list is T L and T I , you can find the timestamp T L The original data and timestamp are T I The two original data are associated with the target result data, that is, the roadside unit calculates the target result data based on the two original data.
[0083] Furthermore, the method may also include:
[0084] (1) when a result data query request carrying target original data is received, searching for a second index list corresponding to the target original data from the plurality of index lists according to the timestamp of the target original data;
[0085] (2) According to the timestamp corresponding to the result data contained in the second index list, the result data corresponding to the target original data is searched from the multiple frames of result data.
[0086] In another implementation, when a user wants to obtain result data associated with a target original data, a result data query request may be issued, which carries the target original data and the corresponding timestamp. After receiving the request, the server may find the index list corresponding to the target original data from all stored index lists according to the timestamp of the target original data, and represent it with a second index list. For example, assuming the timestamp of the target original data is T L , then search for the timestamp T LThe index list of the target original data is used as the second index list. After finding the second index list, the result data associated with the target original data can be found from all the stored result data according to the timestamps corresponding to the result data contained in the second index list. For example, assuming that the timestamp corresponding to the result data contained in the second index list is T D , you can find the timestamp T D The result data is associated with the target original data, that is, the roadside unit calculates the result data according to the target original data. In addition, other original data associated with the target original data can also be found according to the second index list, such as the timestamp T L of raw data, etc.
[0087] In the embodiment of the present application, after collecting their own raw data, each sensor of the roadside system will send their own raw data to the roadside unit and the server for data storage; after receiving the raw data of each sensor, the server will associate and store each frame of raw data with the corresponding timestamp; after receiving the raw data of each sensor, the roadside unit will perform a single-frame data processing process, and each data involved in the data processing process includes a frame of raw data collected by each sensor and a frame of result data calculated by the roadside unit. The roadside unit will construct a set of index lists with the timestamps corresponding to each data involved in each data processing process, and send these index lists to the server; finally, the server receives and stores these index lists. Through such a setting, the raw data of each sensor and the result data calculated by the roadside unit can be associated through the index list stored in the server. For example, the corresponding index list can be found according to the timestamp of a certain raw data, and the timestamps of other raw data and result data recorded in the index list can be used to determine other raw data and result data associated with the raw data, that is, the association between various types of data can be reflected.
[0088] To facilitate understanding of the data storage method of the roadside system provided in the embodiment of the present application, actual application scenarios are listed below.
[0089] like Figure 2 The figure is a schematic diagram of a storage process of a data storage method of a roadside system provided in an embodiment of the present application. Figure 2 In the process, the raw data collected by each sensor is sent to the roadside unit and the data storage server respectively. After the roadside unit calculates the result data (with timestamp) based on the raw data and integrates the index list, it will send both the result data and the index list to the data storage server. The data storage server includes multiple functional modules such as data acquisition module, data storage module, data cache and data index module.
[0090] Among them, the data acquisition module is mainly responsible for receiving the raw data sent by each sensor. It can use technologies such as redis, kafka and http streaming to store the acquired raw data in the form of frames into the corresponding queue for the data storage module to perform related processing.
[0091] The data storage module is mainly responsible for storing the acquired data according to the set storage path, and at the same time establishing an index cache for each frame of data for the data index module to find the absolute path of the corresponding frame. The storage of each data in the data storage module can be carried out in a multi-threaded form, and the data in each thread does not affect each other. At the same time, each thread caches the stored file path to the service for the data index module to query.
[0092] The data cache is mainly responsible for mapping and caching the acquired data according to each base station (one base station can be regarded as a roadside system), each frame (timestamp) and its storage path after storage, providing data path support for the data index module.
[0093] The data index module is mainly responsible for receiving the result data and the index list after time matching from the roadside unit, storing the obtained result data according to the configuration items of the configuration file, and binding the result data of each stage with the upstream original data according to the index list to save the index relationship between them. In addition, the generation of each index file in the data index module can be carried out in a multi-threaded form, obtaining the storage path of the corresponding frame data from the data cache, generating the corresponding index file and storing it.
[0094] like Figure 3 FIG. 1 is a schematic diagram of a data storage structure provided by a data storage server provided in an embodiment of the present application. The data storage structure includes a point cloud folder, an image folder, an index folder, a single base station result folder, and a global result folder.
[0095] The point cloud folder is responsible for storing the original point cloud collected by the LiDAR. The folder is divided into multiple subfolders according to the data collection date (for example, 230524 represents May 24, 2023). Each subfolder is responsible for storing the binary point cloud collected on the corresponding date. For example, assuming that the original point cloud is collected once a minute and the data storage server is connected to 12 base stations (i.e., 12 roadside systems), then a subfolder contains 60 (minutes) * 24 (hours) * 12 (number of base stations) = 17280 point cloud files.
[0096] The image folder is responsible for storing the original images collected by the camera. The folder is also divided into multiple subfolders according to the data collection date. Each subfolder is responsible for storing the binary PI frame images collected on the corresponding date. For example, assuming that the original image is collected once a minute, a subfolder contains 60 (minutes) * 24 (hours) * 12 (number of base stations) = 17280 image files.
[0097] The index folder is responsible for storing index files in hours (each index file contains multiple index lists). The folder is divided into multiple subfolders according to the date of index file acquisition, and each subfolder is responsible for storing the index files acquired on the corresponding date. For example, assuming that the index file is acquired once an hour, a subfolder contains 24 (hours) * (12 + 1) = 312 index files, where 12 represents the number of base stations and 1 represents the entire domain (the sum of 12 base stations).
[0098] The single base station result folder is responsible for storing the result data of a single base station. The folder is also divided into multiple subfolders according to the data acquisition date. Each subfolder is responsible for storing the json format result data acquired on the corresponding date. For example, assuming that the result data is acquired once a minute, a subfolder contains 60 (minutes) * 24 (hours) * 12 (number of base stations) = 17280 json files.
[0099] The global result folder is responsible for storing the global result data, that is, integrating the result data of 12 base stations. The folder is also divided into multiple subfolders according to the data acquisition date. The subfolder of each date is divided into 12 subfolders according to the base station number. Each subfolder is responsible for storing the json format result data obtained by the corresponding base station on the corresponding date. For example, assuming that the result data is obtained once a minute, a subfolder contains 60 (minutes) * 24 (hours) = 1440 json files.
[0100] In summary, the embodiment of the present application can well reflect the correlation between various types of data by storing the original data, result data and index list on the server at the same time, and this correlation has a wide range of uses. For example, the data usage of the roadside unit at each moment can be reproduced by using this correlation for subsequent operations by the user.
[0101] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0102] The above mainly describes a data storage method for a roadside system. The following will describe a data storage device for a roadside system.
[0103] See also Figure 4 , an embodiment of a data storage device of a roadside system in an embodiment of the present application includes:
[0104] The raw data acquisition module 401 is used to acquire multiple frames of raw data collected by various sensors of the roadside system;
[0105] The original data storage module 402 is used to store each frame of original data in association with its corresponding timestamp;
[0106] The index list receiving module 403 is used to receive multiple groups of index lists sent by the roadside unit of the roadside system; wherein each group of index lists contains timestamps corresponding to various data involved in the process of the roadside unit completing a single frame of data processing, and each data includes a frame of raw data collected by each sensor and a frame of result data calculated by the roadside unit;
[0107] The index list storage module 404 is used to store multiple groups of index lists.
[0108] In one implementation of the embodiment of the present application, the index list storage module may include:
[0109] An index file encapsulation unit, used for encapsulating all index lists whose completion times of the data processing processes corresponding to the plurality of groups of index lists are within the same preset time length into one index file;
[0110] The index file storage unit is used to store the encapsulated index files.
[0111] In an implementation of the embodiment of the present application, the data storage device of the roadside system may further include:
[0112] A result data acquisition module, used for receiving multiple frames of result data sent by the roadside unit;
[0113] The result data storage module is used to store the result data of each frame in association with the corresponding timestamps.
[0114] Furthermore, the data storage device of the roadside system may also include:
[0115] A first index list search module is used to search for a first index list corresponding to the target result data from the multiple groups of index lists according to the timestamp of the target result data when an original data query request carrying the target result data is received;
[0116] The associated original data search module is used to search for original data corresponding to the target result data from the multiple frames of original data according to the timestamp corresponding to the original data included in the first index list.
[0117] Furthermore, the data storage device of the roadside system may also include:
[0118] A second index list search module is used to search for a second index list corresponding to the target original data from the multiple groups of index lists according to the timestamp of the target original data when a result data query request carrying the target original data is received;
[0119] An associated result data search module is used to search for result data corresponding to the target original data from the multiple frames of result data according to the timestamp corresponding to the result data contained in the second index list.
[0120] In an implementation of the embodiment of the present application, the original data storage module may include:
[0121] The raw data storage unit is used to determine the storage path of the raw data according to the type and time stamp of the raw data for each frame of the raw data, and store the raw data in the storage path.
[0122] In one implementation of the embodiment of the present application, the original data acquisition module may include:
[0123] The raw data acquisition unit is used to receive the multiple frames of raw data sent by each sensor by means of streaming or UDP transmission.
[0124] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the data storage method of the roadside system as represented by any of the above embodiments is implemented.
[0125] An embodiment of the present application also provides a computer program product. When the computer program product is run on a server, the server executes the data storage method of the roadside system represented by any of the above embodiments.
[0126] Figure 5 Schematic diagram of a server provided by an embodiment of the present application. Figure 5 As shown, the server 5 of this embodiment includes: a processor 50, a memory 51, and a computer program 52 stored in the memory 51 and executable on the processor 50. When the processor 50 executes the computer program 52, the steps in the embodiments of the data storage method for each roadside system described above are implemented, for example Figure 1Alternatively, when the processor 50 executes the computer program 52, the functions of each module / unit in the above-mentioned device embodiments are realized, for example, Figure 4 Functions of modules 401 to 404 are shown.
[0127] The computer program 52 may be divided into one or more modules / units, which are stored in the memory 51 and executed by the processor 50 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 52 in the server 5.
[0128] The processor 50 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0129] The memory 51 may be an internal storage unit of the server 5, such as a hard disk or memory of the server 5. The memory 51 may also be an external storage device of the server 5, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the server 5. Further, the memory 51 may also include both an internal storage unit of the server 5 and an external storage device. The memory 51 is used to store the computer program and other programs and data required by the server. The memory 51 may also be used to temporarily store data that has been output or is to be output.
[0130] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0131] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0132] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0133] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0134] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0135] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present application.
[0136] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0137] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0138] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A data storage method for a roadside system, characterized in that: include: Acquire multiple frames of raw data collected by various sensors of the roadside system; The raw data of each frame is stored in association with the timestamp corresponding to each frame; Receiving multiple groups of index lists sent by the roadside unit of the roadside system; wherein each group of the index lists contains timestamps corresponding to various data involved in a single-frame data processing process completed by the roadside unit, and the various data include a frame of raw data collected by each sensor and a frame of result data calculated by the roadside unit; The multiple groups of index lists are stored.
2. The method according to claim 1, characterized in that Each of the sensors includes at least one laser radar, one of the at least one laser radar serves as a main sensor, and each of the sensors except the main sensor serves as a secondary sensor. The roadside unit uses a frame of raw data collected by the main sensor as a reference when performing each data processing process, and determines the corresponding frame of raw data collected by each secondary sensor through a timestamp alignment algorithm.
3. The method according to claim 1, characterized in that The storing of the plurality of groups of index lists comprises: Encapsulate all index lists corresponding to the data processing processes in the multiple groups of index lists within the same preset time period into one index file; The index files obtained by packaging are stored.
4. The method according to claim 1, characterized in that Also includes: Receiving multiple frames of result data sent by the roadside unit; The result data of each frame is respectively associated with the corresponding timestamp and stored.
5. The method according to claim 4, characterized in that Also includes: When an original data query request carrying target result data is received, searching for a first index list corresponding to the target result data from the plurality of groups of index lists according to the timestamp of the target result data; According to the timestamps corresponding to the original data included in the first index list, original data corresponding to the target result data are searched from the multiple frames of original data.
6. The method according to claim 4, characterized in that Also includes: When a result data query request carrying target original data is received, searching for a second index list corresponding to the target original data from the plurality of groups of index lists according to the timestamp of the target original data; According to the timestamp corresponding to the result data included in the second index list, the result data corresponding to the target original data is searched from the multiple frames of result data.
7. The method according to claim 1, characterized in that The storing of each frame of the original data in association with the timestamps corresponding to the frames respectively includes: For each frame of the original data, a storage path of the original data is determined according to the type and timestamp of the original data, and the original data is stored in the storage path.
8. The method according to any one of claims 1 to 7, characterized in that The obtaining of multiple frames of raw data collected by various sensors of the roadside system includes: The multiple frames of raw data sent by the sensors are received by streaming or UDP transmission.
9. A data storage device for a roadside system, characterized in that: include: A raw data acquisition module, used to acquire multiple frames of raw data collected by various sensors of the roadside system; A raw data storage module, used for storing each frame of raw data in association with a corresponding timestamp; An index list receiving module, configured to receive a plurality of groups of index lists sent by a roadside unit of the roadside system; wherein each group of the index lists comprises timestamps corresponding to various data involved in a single-frame data processing process completed by the roadside unit, wherein the various data comprises a frame of raw data collected by each sensor and a frame of result data calculated by the roadside unit; The index list storage module is used to store the multiple groups of index lists.
10. A server comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the data storage method for the roadside system according to any one of claims 1 to 8 is implemented.
11. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the data storage method for the roadside system according to any one of claims 1 to 8 is implemented.