A method and system for secure backup of vehicle data, electronic device and medium
By segmenting vehicle data into time windows and using a grouping and scoring mechanism based on location and driving information, the problem of low efficiency in vehicle data backup under unstable network environments is solved, and an efficient and reliable distributed backup solution is achieved.
Patent Information
- Application Number
- CN202511622550.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-07
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2045-11-07
AI Technical Summary
Existing vehicle data backup solutions are inefficient in poor network environments, rely on fixed storage facilities or remote servers, and are difficult to adjust flexibly according to vehicle distribution, resulting in poor backup performance. In particular, the risk of data loss is high in urban road environments where the network is unstable.
By performing time window sharding on vehicle data, the location and driving information of candidate backup vehicles are obtained and grouped. Based on the inter-group distance, link quality, and storage capacity scores, a mapping table between data shards and backup groups is generated, and the target backup group is dynamically selected for storage.
It achieves a high backup success rate even in poor network conditions, makes full use of surrounding vehicle storage resources, and improves the reliability and efficiency of data backup.
Smart Images

Figure CN121070699B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, specifically to a secure backup method, system, electronic device, and medium for vehicle-mounted data. Background Technology
[0002] With the rapid development of intelligent connected vehicle technology, vehicles generate massive amounts of onboard data during daily driving. This data covers multiple aspects, including vehicle status information, environmental perception data, and driving behavior data, and has significant application value for improving driving safety, optimizing vehicle performance, and refining intelligent driving algorithms.
[0003] Currently, vehicle data backup primarily relies on the vehicle's own onboard storage devices or remote cloud servers. However, in practical applications, local storage faces limitations in storage capacity and a high risk of device damage. In the event of a vehicle accident or storage device failure, data is at risk of permanent loss. While cloud backup can provide large-capacity storage, it depends on a stable network connection. In areas with poor network signal or during network congestion, data transmission may be interrupted or fail. Especially in densely populated urban environments, despite the presence of numerous other vehicles, existing backup solutions do not fully utilize these vehicle resources, still relying on fixed storage facilities or remote servers. This often makes it difficult to flexibly adjust backup strategies based on the actual vehicle distribution, resulting in poor backup performance in poor network conditions and thus reducing the efficiency of secure vehicle data backup. Summary of the Invention
[0004] This application provides a method, system, electronic device, and medium for secure backup of vehicle data, which can improve the efficiency of secure backup of vehicle data.
[0005] Firstly, this application provides a method for securely backing up vehicle data, including:
[0006] Obtain the original vehicle data of the current vehicle, and divide the original vehicle data into multiple data slices according to a preset time window;
[0007] Obtain the location and driving information of candidate backup vehicles within a preset range, and divide the candidate backup vehicles into multiple backup groups based on the location and driving information;
[0008] The status of candidate backup vehicles in each backup group is detected, and the inter-group distance value, link quality value and storage capacity value of the candidate backup vehicles are obtained. Based on the inter-group distance value, the link quality value and the storage capacity value, a group-level score of the corresponding backup group is generated.
[0009] According to the timestamps of the data shards and the group-level scores of the backup groups, a mapping relationship table between the data shards and the backup groups is generated;
[0010] According to the mapping relationship table, a target backup group is selected, and each data shard is sent to a candidate backup vehicle in the target backup group for backup storage.
[0011] By adopting the above technical solution, firstly, the original vehicle-mounted data is subjected to time window slicing processing, and continuous data flow is converted into discrete data shards, which facilitates subsequent distributed backup; secondly, the candidate backup vehicles are grouped by obtaining the position information and driving information of the candidate backup vehicles, and the backup groups are scored based on multi-dimensional indexes such as inter-group distance value, link quality value and storage capacity value, so that the backup capabilities of the backup groups can be comprehensively evaluated; then, a mapping relationship is established according to the time characteristics of the data shards and the group-level scores of the backup groups, so as to select the optimal backup group combination for data in different time periods; finally, the data shards are sent to the candidate backup vehicles in the target backup group for storage. This distributed backup scheme based on the Internet of Vehicles environment fully utilizes the storage resources of surrounding vehicles, and through multi-dimensional evaluation and dynamic scheduling mechanism, the reliability of backup is improved while ensuring the efficiency of data transmission, so that a high backup success rate can be maintained even in poor network environment, thereby effectively improving the safety backup efficiency of vehicle-mounted data.
[0012] Optionally, the data amount of the original vehicle-mounted data in a preset collection period is obtained, the original vehicle-mounted data including vehicle driving data, vehicle-mounted sensor data and vehicle-mounted camera data; it is determined whether the data amount is greater than a preset storage threshold; if the data amount is greater than the preset storage threshold, a reduction ratio of the time window is determined according to the ratio of the data amount to the preset storage threshold, and the time length of the preset time window is reduced by the reduction ratio to obtain a target time window; if the data amount is not greater than the preset storage threshold, the preset time window is set as the target time window; the original vehicle-mounted data is subjected to time sequence slicing according to the target time window, a plurality of data shards are obtained, and each data shard is added with a timestamp identifier and a shard serial number.
[0013] Optionally, according to the position information of the candidate backup vehicles, relative distances between the candidate backup vehicles are calculated; each candidate backup vehicle is preliminarily grouped based on a preset distance threshold; driving directions and driving speeds in corresponding driving information of the candidate backup vehicles in each preliminary group are obtained; if the included angle of the driving directions of the candidate backup vehicles in the same preliminary group is less than a preset angle threshold and the difference of the driving speeds is less than a preset speed threshold, the preliminary group is determined as a backup group; if the included angle of the driving directions of the candidate backup vehicles in the same preliminary group is greater than or equal to the preset angle threshold or the difference of the driving speeds is greater than or equal to the preset speed threshold, average relative distances of each candidate backup vehicle in the preliminary group and other candidate backup vehicles in the group are calculated, and the candidate backup vehicles with the average relative distances less than a secondary distance threshold are divided into the same backup group, wherein the secondary distance threshold is less than the preset distance threshold.
[0014] Optionally, for each candidate backup vehicle, a vehicle coordinate system is established with the current candidate backup vehicle as a reference point; position coordinates of each candidate backup vehicle are obtained in the vehicle coordinate system; the vehicle coordinate system is divided into a plurality of sector regions; relative distances of each candidate backup vehicle and the current vehicle are calculated; the candidate backup vehicles located in the same sector region and with the relative distances less than the preset distance threshold are divided into the same preliminary group.
[0015] Optionally, a mean value and a variance of inter-group distance values of the candidate backup vehicles in the backup group are calculated according to the component distance values, to obtain distance characteristic values; a communication stability and a link bandwidth utilization rate of the backup group are calculated based on the link quality values, to obtain link characteristic values; residual storage capacities of the candidate backup vehicles in the backup group are obtained, and a storage occupancy rate is calculated as a storage characteristic value according to the residual storage capacity values and the storage capacity values; the distance characteristic values, the link characteristic values and the storage characteristic values are weighted to obtain a group-level score of the corresponding backup group.
[0016] Optionally, time stamps and data types of each data fragment are obtained, and a priority corresponding to the data type of each data fragment is determined according to a preset priority mapping table; each backup group is sorted according to the group-level score, and a sorting result is divided into target backup groups of different backup levels; the priority of the data fragment is matched and mapped with the level of the target backup group; when a data storage amount of the target backup group reaches a preset storage upper limit, the data fragment to be mapped is mapped to a target backup group of a next backup level; a mapping relationship table containing a data fragment number, a priority identifier, a target backup group number and a time stamp is generated.
[0017] Optionally, the target backup group corresponding to each data shard is obtained according to the mapping relationship table, and the online state of a candidate backup vehicle in the target backup group is detected; when it is detected that there is an offline candidate backup vehicle in the target backup group, the online candidate backup vehicle with the highest group-level score in a preset range of the candidate backup vehicle is selected for replacement; each data shard is encrypted, and a backup timestamp and a check code are written in the data shard; the encrypted data shard is sent to the candidate backup vehicle of the corresponding target backup group, and storage confirmation information returned by the candidate backup vehicle is received; after the storage confirmation information is received, the backup state identifier in the mapping relationship table is updated.
[0018] In a second aspect of the present application, a secure backup system for vehicle data is provided, and the system comprises:
[0019] A data acquisition module is configured to acquire original vehicle data of a current vehicle, and perform sharding on the original vehicle data according to a preset time window to obtain a plurality of data shards.
[0020] A backup group division module is configured to acquire position information and driving information of candidate backup vehicles in a preset range, and divide the candidate backup vehicles into a plurality of backup groups based on the position information and the driving information.
[0021] A group-level score determination module is configured to perform state detection on the candidate backup vehicles in each backup group, acquire an inter-group distance value, a link quality value and a storage capacity value of the candidate backup vehicles, and generate a group-level score of the corresponding backup group according to the inter-group distance value, the link quality value and the storage capacity value.
[0022] A backup storage module is configured to generate a mapping relationship table between data shards and backup groups according to a timestamp of each data shard and a group-level score of each backup group, select a target backup group based on the mapping relationship table, and send each data shard to a candidate backup vehicle in the target backup group for backup storage.
[0023] In a third aspect of the present application, an electronic device is provided, which comprises a memory, a processor and a program stored in the memory and executable on the processor. The program can be loaded and executed by the processor to implement a secure backup method for vehicle data.
[0024] In a fourth aspect of the present application, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the processor implements a secure backup method for vehicle data.
[0025] In summary, the one or more technical solutions provided by the present application have at least the following technical effects or advantages:
[0026] By adopting the technical scheme, firstly, the original vehicle-mounted data is subjected to time window fragmentation processing, and continuous data flow is converted into discrete data fragments, so as to facilitate subsequent distributed backup; secondly, the candidate backup vehicles are grouped by obtaining the position information and driving information of the candidate backup vehicles, and the backup groups are scored based on multi-dimensional indexes such as inter-group distance values, link quality values and storage capacity values, so as to comprehensively evaluate the backup capabilities of the backup groups; then, a mapping relationship is established according to the time characteristics of the data fragments and the group-level scores of the backup groups, and the optimal backup groups are selected for the data of different time periods; finally, the data fragments are sent to the candidate backup vehicles in the target backup groups for storage. The distributed backup scheme based on the vehicle networking environment fully utilizes the storage resources of the surrounding vehicles, and through the multi-dimensional evaluation and dynamic scheduling mechanism, the reliability of the backup is improved while the data transmission efficiency is ensured, and even in the case of poor network environment, the backup success rate can also be maintained at a high level, thereby effectively improving the safety backup efficiency of the vehicle-mounted data. BRIEF DESCRIPTION OF DRAWINGS
[0027] Figure 1 is a flow diagram of a safety backup method for vehicle-mounted data provided by an embodiment of the present application;
[0028] Figure 2 is a structural diagram of a safety backup system for vehicle-mounted data provided by an embodiment of the present application;
[0029] Figure 3 is a structural diagram of an electronic device provided by an embodiment of the present application.
[0030] Explanation of reference signs: 300, electronic device; 301, processor; 302, communication bus; 303, user interface; 304, network interface; 305, memory. DETAILED DESCRIPTION
[0031] In order for those skilled in the art to better understand the technical solutions in the specification, the technical solutions in the specification will be clearly and completely described below in combination with the drawings in the embodiments of the specification. Obviously, the described embodiments are only some of the embodiments of the present application, not all the embodiments.
[0032] In the description of the embodiments of the present application, the words such as "for example" or "for instance" are used to represent an example, illustration or description. Any embodiment or design scheme described as "for example" or "for instance" in the embodiments of the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. Rather, the words such as "for example" or "for instance" are intended to present the relevant concept in a specific manner.
[0033] In the description of the embodiments of this application, the term "multiple" means two or more. For example, multiple systems means two or more systems, and multiple screen terminals means two or more screen terminals. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0034] This application provides a method for securely backing up vehicle data. In one embodiment, please refer to... Figure 1 , Figure 1 This is a flowchart illustrating a secure backup method for vehicle data provided in an embodiment of this application. This method can be implemented using a computer program, which can be integrated into an application or run as a standalone utility application. The method can also be implemented using a microcontroller and can run on a secure backup system for vehicle data based on the von Neumann architecture. Specifically, the method may include the following steps:
[0035] Step 101: Obtain the original vehicle data of the current vehicle, and divide the original vehicle data into multiple data slices according to the preset time window.
[0036] Raw vehicle data refers to various types of raw data generated during actual vehicle operation. This mainly includes driving data reflecting the vehicle's operating status (such as speed, direction, and acceleration), sensor data from various vehicle sensors (such as temperature, pressure, and distance data), and video image data captured by vehicle cameras. This data comprehensively records the vehicle's operating status, surrounding environmental information, and driving behavior characteristics, and has significant analytical value for vehicle safety operation, fault diagnosis, and intelligent driving.
[0037] A preset time window refers to a pre-defined fixed time interval used as a baseline unit for time-series segmentation of continuous raw vehicle data. This time window can be flexibly set according to actual application needs, for example, it can be set to different lengths such as 5 minutes or 10 minutes. Setting the preset time window requires comprehensive consideration of multiple factors such as data generation rate, storage efficiency, and backup performance, ensuring both the integrity of data fragments and that the fragment size is suitable for subsequent transmission and storage.
[0038] Data slicing refers to a subset of data obtained by slicing the original vehicle data according to a preset time window. Each data slice contains complete vehicle data records generated within the corresponding time window, and is assigned a unique timestamp identifier and slice number to mark the generation time of the data and the slice order. As a basic unit of data backup, the size and organization of data slicing directly affect the subsequent data transmission efficiency and storage reliability, and is an important basis for realizing distributed backup.
[0039] Specifically, first, the original vehicle data generated during the driving process of the current vehicle is obtained. The original vehicle data includes but is not limited to vehicle driving data, vehicle sensor data, and vehicle camera data, etc. Considering the continuity of vehicle data and the large amount of data, the original vehicle data needs to be reasonably sliced to facilitate subsequent distributed backup storage. Specifically, a fixed time window can be preset, for example, the time window can be set to 5 minutes, 10 minutes, etc. Time slicing of the original vehicle data is performed based on the preset time window. By slicing the original data, continuous large-scale data can be divided into multiple relatively independent data slicing units. This slicing method not only maintains the time sequence correlation of the data, but also facilitates flexible data distribution and storage. In addition, the data slicing method can improve the efficiency of data transmission and storage, reduce the load of single data processing, and provide a basis for subsequent differentiated backup strategies. When data loss or damage occurs, slicing storage can minimize the scope of data loss and improve data recovery efficiency. This time window-based data slicing method can ensure data integrity while achieving efficient management and reliable backup of data.
[0040] On the basis of the above embodiment, as an optional embodiment, in step 101, the original vehicle data is sliced according to a preset time window to obtain a plurality of data slices. This step can also include the following steps:
[0041] Step 201: Obtain the data amount of the original vehicle data within a preset collection period. The original vehicle data includes vehicle driving data, vehicle sensor data, and vehicle camera data.
[0042] Specifically, first, the actual data amount of the original vehicle data in a preset collection period (e.g., 1 hour) needs to be obtained. The system will count the total amount of vehicle driving data (including motion parameters such as speed, steering angle, braking, etc.), vehicle sensor data (including various environmental perception data and vehicle state data), and vehicle camera data (including video stream data of the surrounding environment) generated in the collection period. This data amount counting is of great significance for subsequent reasonable planning of data slice size, because the data generation rate in different scenarios can be significantly different. For example, when driving in urban roads, the data amount of cameras and sensors is usually significantly higher than that in highway scenarios due to the complex environment.
[0043] Step 202: Determine whether the data amount is greater than the preset storage threshold; if the data amount is greater than the preset storage threshold, determine the reduction ratio of the time window according to the ratio of the data amount to the preset storage threshold, and reduce the time length of the preset time window by the reduction ratio to obtain the target time window; if the data amount is not greater than the preset storage threshold, set the preset time window as the target time window.
[0044] Specifically, after obtaining the data amount, the system compares it with the pre-set storage threshold (e.g., set to 500 MB). When the statistical data amount exceeds the storage threshold, it indicates that the current data generation rate is high, and the preset time window needs to be dynamically adjusted. The specific adjustment method is to calculate the ratio of the data amount to the storage threshold (e.g., if the data amount is 750 MB, the ratio is 1.5), and use the ratio as the reduction ratio to reduce the preset time window (e.g., originally set to 10 minutes) accordingly (in this example, it is reduced to 6.67 minutes), thereby obtaining a smaller target time window. This dynamic adjustment mechanism can ensure that in the case of a sharp increase in data amount, the size of a single data slice is controlled by reducing the time window, avoiding the impact on transmission efficiency due to excessively large slices. Conversely, if the data amount does not exceed the storage threshold, the preset time window is directly used as the target time window without adjustment.
[0045] Step 203: Time series slicing of the original vehicle data according to the target time window to obtain multiple data slices, and adding timestamp identifiers and slice sequence numbers to each data slice.
[0046] Specifically, the system performs time-series fragmentation of the raw vehicle data according to a defined target time window. In practice, the continuous data stream is divided according to the length of the target time window, with each time window constituting an independent data fragment. To facilitate subsequent data management and backup recovery, the system adds a timestamp (precisely recording the start time of the fragment's data) and an incrementing fragment number to each data fragment. This fragmentation method with time-series identifiers not only ensures data integrity and orderliness but also provides important reference for subsequent differentiated backup strategies. Through this adaptive fragmentation mechanism, while ensuring a moderate data fragment size, the efficiency of data transmission and storage can be improved, laying the foundation for reliable distributed backup.
[0047] Step 102: Obtain the location and driving information of candidate backup vehicles within a preset range, and divide the candidate backup vehicles into multiple backup groups based on the location and driving information.
[0048] Candidate backup vehicles refer to other vehicles within the current vehicle's preset communication range (e.g., a 500-meter radius) that possess data storage capabilities and can communicate via the vehicle-to-everything (V2X) network. These vehicles need to have basic storage hardware and data processing capabilities, be able to receive and store data from other vehicles, and provide data backhaul services as needed. As potential nodes in the distributed storage network, candidate backup vehicles constitute the foundational resource pool of the entire backup system.
[0049] Location information refers to the spatial position parameters of candidate backup vehicles in the road environment, mainly including the real-time latitude and longitude coordinates of the vehicles. This location information can be obtained through the vehicle-mounted GPS positioning system and is used to calculate the relative distances and spatial distribution relationships between vehicles, serving as an important basis for dividing backup groups. Accurate location information helps assess the feasibility and stability of data transmission.
[0050] Driving information refers to a set of parameters describing the motion state of candidate backup vehicles, mainly including the vehicle's direction of travel (heading angle) and speed. This information reflects the vehicle's motion trend and can be used to predict the continuity and stability of inter-vehicle connections. Analysis of driving information helps group vehicles with similar motion characteristics into the same backup group, thereby improving the reliability of data transmission.
[0051] A backup group refers to a set of candidate backup vehicles that share similar motion characteristics and stable connectivity, grouped based on location and driving information. Each backup group serves as a relatively independent backup unit, with its member vehicles jointly undertaking data backup tasks. The division of backup groups requires ensuring good network connectivity stability and data transmission reliability among the vehicles within the group; it is the basic organizational unit for achieving efficient distributed backup.
[0052] Specifically, when performing distributed backup of vehicle data, to fully utilize the storage resources of surrounding vehicles and ensure backup reliability, it is necessary to first identify available candidate backup vehicles within a preset range (e.g., a communication coverage radius of 500 meters) of the current vehicle. The system obtains the real-time location information (including latitude and longitude coordinates) and driving information (including driving direction and speed) of these candidate backup vehicles through the vehicle-to-everything (V2X) communication module. Considering the dynamic changes in network topology caused by vehicle mobility, candidate backup vehicles with similar motion characteristics need to be grouped into the same backup group to improve data transmission stability and backup reliability. This grouping method based on location and driving characteristics ensures that vehicles within the same backup group have relatively stable network connections, reducing the risk of data transmission interruption caused by vehicle movement. Reasonable backup group division can improve the success rate of data backup, provide a basis for subsequent differentiated backup strategies, and achieve balanced utilization of backup resources, improving the robustness of the entire backup system. This dynamic backup group division mechanism can adapt to the complex and ever-changing V2X environment, providing an important guarantee for achieving efficient and reliable data backup.
[0053] Based on the above embodiments, as an optional embodiment, step 102, which involves dividing candidate backup vehicles into multiple backup groups based on location information and driving information, may further include the following steps:
[0054] Step 301: Calculate the relative distance between multiple candidate backup vehicles based on their location information; and preliminarily group each candidate backup vehicle based on a preset distance threshold.
[0055] Specifically, to ensure the stability of the backup group and the reliability of data transmission, the system employs a multi-level screening method to group candidate backup vehicles. First, based on the vehicle's location information, the system calculates the relative distances between all candidate backup vehicles. By comparing these relative distances with a preset distance threshold (e.g., set to 100 meters), vehicles with relative distances less than this threshold are grouped into the same initial group. This distance-based initial grouping ensures that vehicles within the group have a relatively good foundation for communication quality.
[0056] Based on the above embodiments, as an optional embodiment, step 301, which involves initially grouping each candidate backup vehicle based on a preset distance threshold, may further include the following steps:
[0057] Step 311: For each candidate backup vehicle, establish a vehicle coordinate system using the current candidate backup vehicle as a reference point; obtain the position coordinates of each candidate backup vehicle in the vehicle coordinate system.
[0058] Specifically, during the initial grouping of candidate backup vehicles, the system employs a sector-based spatial partitioning method to more accurately describe the spatial distribution relationships between vehicles and achieve efficient grouping. In practice, each candidate backup vehicle is first used as a reference point to establish a local vehicle coordinate system with that vehicle as the origin. The vertical axis aligns with the vehicle's forward direction, and the horizontal axis is perpendicular to the direction of travel. Within this coordinate system, the GPS latitude and longitude information of other candidate backup vehicles is converted into two-dimensional planar coordinates relative to the reference vehicle through coordinate transformation. This transformation more intuitively reflects the relative positional relationships between vehicles.
[0059] Step 321: Divide the vehicle coordinate system into multiple sector regions; calculate the relative distance between each candidate backup vehicle and the current vehicle.
[0060] Specifically, after establishing the vehicle coordinate system, the system divides the planar space of the coordinate system into multiple sector regions. For example, a 360-degree range can be divided into eight equal sector regions, each covering an angle range of 45 degrees. This sector division method takes into account the directionality of vehicle communication characteristics, which helps to classify vehicles with similar spatial distribution features. At the same time, the system calculates the Euclidean distance between each candidate backup vehicle and the current reference vehicle, as an important reference indicator for evaluating the quality of inter-vehicle communication.
[0061] Step 331: Divide candidate backup vehicles located in the same sector area and whose relative distance is less than a preset distance threshold into the same preliminary group.
[0062] Specifically, based on the results of sector-based region division and distance calculation, the system performs initial grouping of candidate backup vehicles. Specifically, candidate backup vehicles located within the same sector and whose relative distance to the reference vehicle is less than a preset distance threshold (e.g., 100 meters) are grouped into the same initial group. This spatial location-based grouping method not only considers distance constraints between vehicles but also ensures the spatial clustering of vehicles within a group through sector-based region division, which is beneficial for improving the efficiency and reliability of subsequent data transmission. This grouping mechanism, combining sector-based regions and distance thresholds, can quickly identify vehicle sets with good communication conditions, laying the foundation for subsequent refined grouping based on motion characteristics, while also improving the computational efficiency and accuracy of the grouping process.
[0063] Step 302: Obtain the driving direction and driving speed from the driving information of the candidate backup vehicles in each preliminary group; if the angle between the driving directions of the candidate backup vehicles in the same preliminary group is less than a preset angle threshold and the difference in driving speed is less than a preset speed threshold, then the preliminary group is determined as a backup group.
[0064] Specifically, after initial grouping, the system further analyzes the motion characteristics of vehicles within each initial group. Specifically, it acquires the driving direction and speed information of each vehicle within the group, and calculates the angle between driving directions and the speed difference between any two vehicles. If the angle between the driving directions of all vehicles in a certain initial group is less than a preset angle threshold (e.g., set to 30 degrees), and the speed difference between any two vehicles is less than a preset speed threshold (e.g., set to 20 km / h), it indicates that the vehicles in that group have a relatively consistent motion trend, and this initial group can be directly identified as a formal backup group. This motion characteristic-based screening ensures that the relative positional relationships of vehicles within the backup group remain stable over a certain period of time.
[0065] Step 303: If the angle between the driving directions of the candidate backup vehicles in the same initial group is greater than or equal to a preset angle threshold, or the difference in driving speed is greater than or equal to a preset speed threshold, then calculate the average relative distance between each candidate backup vehicle in the initial group and other candidate backup vehicles in the group, and classify the candidate backup vehicles whose average relative distance is less than the secondary distance threshold into the same backup group, wherein the secondary distance threshold is less than the preset distance threshold.
[0066] Specifically, when there are significant differences in the motion characteristics of vehicles in the initial group (i.e., the angle of travel direction exceeds a preset angle threshold or the speed difference exceeds a preset speed threshold), the system will activate a more refined grouping mechanism. This involves calculating the average relative distance between each vehicle in the initial group and all other vehicles in the group, and introducing a secondary distance threshold (e.g., set to 60 meters) that is less than a preset distance threshold. Vehicles with an average relative distance less than the secondary distance threshold are then reassigned to the same backup group. This secondary grouping based on stricter distance constraints can ensure data transmission reliability by narrowing the spatial distribution range of vehicles within a group when there are significant differences in motion characteristics. This multi-layered dynamic grouping mechanism ensures the stability of backup groups while providing flexible organizational adjustment capabilities, better adapting to the complex and ever-changing vehicle-to-everything (V2X) environment and providing a reliable network foundation for subsequent data backup transmission.
[0067] Step 103: Perform status detection on the candidate backup vehicles in each backup group, obtain the inter-group distance value, link quality value and storage capacity value of the candidate backup vehicles, and generate the group-level score of the corresponding backup group based on the inter-group distance value, link quality value and storage capacity value.
[0068] The inter-group distance value refers to the set of relative distance parameters between candidate backup vehicles within a backup group, including real-time distance data between any two vehicles within the group. This distance data reflects the spatial distribution characteristics of the backup group and the stability of the positional relationships between vehicles, and is an important indicator for evaluating data transmission reliability. By calculating the mean and variance of the distances between vehicles within the group, the inter-group distance value can quantitatively describe the spatial clustering and stability of the backup group.
[0069] Link quality refers to the performance parameters of the communication link between vehicles within a backup group, mainly including technical indicators such as signal strength, communication latency, data transmission rate, and bit error rate. These parameters comprehensively reflect the stability and reliability of communication between vehicles, directly affecting the transmission effectiveness of data backup. Link quality is assessed by real-time monitoring of communication status to evaluate the communication stability and link bandwidth utilization efficiency of the backup group.
[0070] The storage capacity value refers to the amount of storage space currently available for data backup in each candidate backup vehicle within the backup group. This value includes the total storage capacity of the vehicles and the currently used storage, and is used to assess the storage resource status of the backup group. The storage capacity value reflects the data storage capacity and resource utilization efficiency of the backup group by calculating storage space occupancy and availability.
[0071] Group-level scoring is a comprehensive performance evaluation index for backup groups, calculated through weighted averages of multiple parameters such as inter-group distance, link quality, and storage capacity. This score reflects the overall capability of a backup group in performing data backup tasks and serves as a crucial basis for backup task allocation decisions. By appropriately setting the weights of various parameters, group-level scoring achieves a quantitative assessment of backup group performance, enabling the optimization of data backup scheduling strategies.
[0072] Specifically, after completing the partitioning of backup groups, the system needs to conduct comprehensive status checks on the candidate backup vehicles within each backup group to evaluate the data storage capacity and communication reliability of each group. Specifically, the system first checks the inter-group distance between vehicles within the group, evaluating the spatial distribution characteristics of the vehicles by calculating the relative distances between each pair of vehicles. Simultaneously, it monitors the communication link quality between vehicles, including link quality parameters such as signal strength and bit error rate. Furthermore, it obtains the currently available storage capacity of each candidate backup vehicle. Based on this status check data, the system uses a comprehensive scoring mechanism to generate a group-level score for the backup groups. During the scoring process, the inter-group distance reflects the spatial stability of the backup group, the link quality value reflects the reliability of data transmission, and the storage capacity value indicates the storage potential of the backup group. Through this multi-dimensional status check and scoring mechanism, the backup capabilities of each backup group can be comprehensively evaluated, providing a scientific basis for subsequent data sharding allocation, thereby ensuring the efficiency and reliability of data backup. This backup group evaluation method based on group-level scoring can effectively identify the most suitable vehicle combinations for data backup, improving the performance and availability of the entire backup system.
[0073] Based on the above embodiments, as an optional embodiment, step 103, which generates a group-level score for the corresponding backup group based on the inter-group distance value, link quality value, and storage capacity value, may further include the following steps:
[0074] Step 401: Calculate the mean and variance of the inter-group distance values of candidate backup vehicles within the backup group based on the component distance values to obtain the distance feature values.
[0075] Specifically, when calculating the distance features between backup groups, the system first constructs an n×n distance matrix D (where n is the number of candidate backup vehicles in the group). Each element dij in the matrix represents the Euclidean distance (in meters) between the i-th and j-th vehicles. Based on this matrix, the mean distance between groups, μd = ∑dij / [n(n-1)], is calculated, where n(n-1) is the number of all possible vehicle pairs within the group. Simultaneously, the standard deviation σd = √(∑(dij-μd)² / [n(n-1)]) is calculated to measure the dispersion of the distance distribution. The final distance feature value is expressed as Fd = α·(1 / μd) + β·(1 / σd²), where the weighting coefficients α and β are set according to the actual scenario. For example, in urban road environments, α = 0.6 and β = 0.4 can be set, and in highway environments, α = 0.4 and β = 0.6 can be set. For example, when there are 5 vehicles in the backup group, if μd = 80 meters and σd = 15 meters are calculated, then in an urban road scenario, Fd = 0.6 × (1 / 80) + 0.4 × (1 / 225) ≈ 0.009. The system also sets a threshold range [Fmin, Fmax] for the distance feature values. When the calculation result exceeds the range, it is truncated to ensure the rationality of the score.
[0076] Step 402: Calculate the communication stability and link bandwidth utilization of the backup group based on the link quality value to obtain the link characteristic value.
[0077] Specifically, during link quality assessment, the system uses a fixed sampling period of 100ms to acquire link status data from 100 sampling points within a 10-second assessment window. For each sampling point i, the following parameters are recorded: signal strength Si (range -100dBm to -30dBm), real-time transmission rate Ri (in Mbps), packet loss rate Pi (range 0 to 1), and channel quality index CQIi (range 1 to 15). Communication stability is calculated as Cs = 1 - ∑(|Si + 1 - Si| / |Si|) / T, where T is the total number of sampling points; bandwidth utilization is calculated as Bu = Ra / Rt, where Ra = ∑Ri / T is the average actual transmission rate, and Rt is the theoretical bandwidth limit (e.g., 54Mbps). Link characteristic values are expressed as Fl = γ·Cs + δ·Bu, with weighting coefficients set to γ = 0.7 and δ = 0.3. For example, if a backup group has Cs=0.92 (indicating small signal strength fluctuations) and Bu=0.75 (indicating high bandwidth utilization efficiency), then Fl=0.7×0.92+0.3×0.75=0.869. The system also considers packet loss rate thresholds (e.g., Pi>0.1) and CQI thresholds (e.g., CQIi<8), and applies corresponding penalties to feature values when these thresholds are exceeded.
[0078] Step 403: Obtain the remaining storage capacity of the candidate backup vehicles in the backup group, and calculate the storage occupancy rate as the storage feature value based on the remaining storage capacity value and the storage capacity value; perform weighted calculation on the distance feature value, link feature value and storage feature value to obtain the group-level score of the corresponding backup group.
[0079] Specifically, when calculating storage characteristics and the final score, the system first obtains the storage parameters of each candidate backup vehicle: total capacity Ci (e.g., 128GB), used capacity Ui (e.g., 75GB), remaining capacity Ri = Ci - Ui (e.g., 53GB), write speed Wi (e.g., 100MB / s), and read speed Ri (e.g., 150MB / s). The average storage utilization rate of the group is calculated as So = ∑(Ui / Ci) / n, and the storage characteristic value is Fs = 1 - So. Storage performance correction factors Kw = ∑Wi / Wmax and Kr = ∑Ri / Rmax are introduced, where Wmax and Rmax are the preset maximum write and read speeds. The corrected storage characteristic value is Fs' = Fs × (0.6 × Kw + 0.4 × Kr). The final group-level score is calculated using the formula: Score = wd·Fd + wl·Fl + ws·Fs'. The weighting coefficients are dynamically adjusted based on the application scenario: high-speed mobile scenario (wd=0.5, wl=0.3, ws=0.2), big data backup scenario (wd=0.2, wl=0.3, ws=0.5), and normal scenario (wd=0.3, wl=0.4, ws=0.3). For example, if a backup group's feature values in a normal scenario are Fd=0.009, Fl=0.869, and Fs'=0.65, then the final score is Score = 0.3×0.009 + 0.4×0.869 + 0.3×0.65 = 0.5527. The system also sets a valid score range [Smin, Smax]; scores exceeding this range will be truncated.
[0080] Step 104: Generate a mapping table between data shards and backup groups based on the timestamps of each data shard and the group-level scores of each backup group.
[0081] The mapping table is a dynamically maintained data structure used to record and manage the correspondence between data shards and backup groups.
[0082] Specifically, after data sharding and backup group scoring, the system needs to establish a mapping relationship between data shards and backup groups to achieve efficient and reliable data backup. Specifically, the system first obtains the timestamp information for each data shard, which records the specific time the data was generated, reflecting its timeliness and importance. Simultaneously, it obtains the previously calculated group-level scores for each backup group, which reflect the overall backup capability of the backup group. Based on this information, the system establishes a mapping table between data shards and backup groups using an intelligent matching algorithm. This mapping table contains key information such as the data shard number, timestamp, corresponding backup group number, and group-level score, and is dynamically updated based on real-time status. This mapping mechanism based on time characteristics and performance scores ensures that data shards with higher importance are assigned to backup groups with better performance, thereby improving the reliability and efficiency of data backup. At the same time, the establishment of the mapping table also provides an important basis for subsequent data recovery and management, enabling quick location and access to backup data and improving the overall operating efficiency of the system. Through this flexible mapping strategy, the system can achieve reasonable allocation and efficient utilization of data backup resources.
[0083] Based on the above embodiments, as an optional embodiment, step 104: generating a mapping table between data shards and backup groups according to the timestamps of each data shard and the group-level scores of each backup group, this step may further include the following steps:
[0084] Step 501: Obtain the timestamp and data type of each data shard, and determine the priority corresponding to the data type of each data shard according to the preset priority mapping table.
[0085] Specifically, in the process of mapping data shards to backup groups, the system first determines the priority of the data shards. Specifically, the system obtains the timestamp (accurate to milliseconds) and data type identifier for each data shard. Data types include vehicle motion status data (TYPE_MOTION), environmental perception data (TYPE_SENSOR), and vehicle camera data (TYPE_VIDEO). The system maintains a preset priority mapping table (Priority_Map), which defines the basic priorities for different data types (e.g., TYPE_MOTION → P1, TYPE_SENSOR → P2, TYPE_VIDEO → P3). By querying the priority mapping table and combining the difference between the data generation time and the current time, the actual priority of each data shard is determined using the priority calculation formula P=Pbase×(1-λ×ΔT), where Pbase is the basic priority value (levels 1-5), λ is the time decay factor (e.g., 0.1 / hour), and ΔT is the time difference (hours). This dynamic priority determination mechanism ensures the order of importance of data backups.
[0086] Step 502: Sort each backup group according to the group-level score, and divide the sorting results into target backup groups of different backup levels.
[0087] Specifically, in the backup group tiering process, the system sorts all backup groups in descending order based on a calculated group-level score. The sorted backup groups are then divided into different backup levels according to their score ranges: scores in the range [0.8, 1.0] are classified as L1 (primary backup level), [0.6, 0.8) as L2 (secondary backup), and [0.4, 0.6) as L3 (normal backup). Each backup level can contain multiple target backup groups. The system sets expected storage capacity quotas for each backup level, such as 50% for L1, 30% for L2, and 20% for L3. This tiering mechanism ensures the rational allocation of backup resources.
[0088] Step 503: Match and map the priority of the data shards with the level of the target backup group; when the data storage volume of the target backup group reaches the preset storage limit, map the data shards to be mapped to the target backup group of the next backup level.
[0089] Specifically, during mapping matching, the system employs a priority-based mapping relationship between backup levels: P1-level data is preferentially mapped to L1-level backup groups, P2-level data is preferentially mapped to L2-level backup groups, and so on. The system monitors the data storage volume (Storage_Used) and preset storage limit (Storage_Limit, such as 80% of the average remaining storage space within the group) of each target backup group in real time. When a backup group's Storage_Used reaches Storage_Limit, the system automatically redirects subsequent data fragments to other backup groups at the same level; if all backup groups at the same level have reached their storage limits, the data fragments are mapped to backup groups at the next lower backup level. For example, when an L1-level backup group is saturated, P1-level data that should have been mapped to that level will be mapped to an L2-level backup group. This dynamic adjustment mechanism ensures the continuous execution of backup tasks.
[0090] Step 504: Generate a mapping table containing data shard numbers, priority identifiers, target backup group numbers, and timestamps.
[0091] Specifically, the system generates a standard-format mapping table (Mapping_Table). Each record in this table contains fields such as: data slice ID (e.g., "SLICE_20230615_001"), priority level (P1-P5), target backup group ID (e.g., "BG_001"), and timestamp (e.g., "2023-06-15 10:30:45.123"). Simultaneously, the system generates a checksum for each mapping record for data integrity verification and sets a status flag (Status_Flag) to track backup execution status. The mapping table uses a key-value pair storage structure, supporting fast retrieval and update operations, facilitating subsequent backup management and data recovery. This structured mapping record mechanism provides reliable data indexing and management capabilities for the entire backup system.
[0092] Step 105: Select the target backup group based on the mapping table, and send each data fragment to the candidate backup vehicle in the target backup group for backup storage.
[0093] The target backup group refers to the set of backup vehicles selected for storing specific data fragments after system evaluation and screening.
[0094] Specifically, after generating the mapping table, the system needs to perform actual data backup operations to ensure that data fragments are reliably stored in appropriate backup vehicles. Based on the correspondence recorded in the mapping table, the system first determines the target backup group for each data fragment and monitors the online and storage status of candidate backup vehicles within the target backup group in real time. When an offline vehicle or storage anomaly is detected in the target backup group, the system dynamically replaces it with another online vehicle with the highest group-level score within a preset range, ensuring the continuity of the backup operation. Before data transmission, the system encrypts the data fragments and embeds backup timestamps and checksums to enhance data security and traceability. Subsequently, the system sends the encrypted data fragments to the candidate backup vehicles in the target backup group through the vehicle network communication interface and requests the receiving vehicle to return storage confirmation information. Upon receiving the storage confirmation information, the system promptly updates the backup status identifier of the corresponding data fragment in the mapping table, completing a full backup operation. This intelligent backup mechanism based on mapping not only ensures the reliability and security of data backup but also improves the fault tolerance and operational efficiency of the backup system through dynamic strategy adjustment.
[0095] Based on the above embodiments, as an optional embodiment, step 105: selecting a target backup group based on the mapping relationship table and sending each data fragment to the candidate backup vehicles in the target backup group for backup storage, may further include the following steps:
[0096] Step 601: Obtain the target backup group corresponding to each data shard according to the mapping relationship table, and check the online status of the candidate backup vehicles in the target backup group.
[0097] Specifically, before data transmission, the system first performs secure encryption on each data slice. The system employs the AES-256 encryption algorithm, using a preset key (Encryption_Key) to encrypt the data content, generating an encrypted data block (Encrypted_Data). Based on the encrypted data, the system generates a backup timestamp (Backup_Timestamp, accurate to milliseconds) containing the current time, and calculates a checksum on the original data content using the SHA-256 algorithm. The system packages the encrypted data, timestamp, and checksum into a standard format data package (Data_Package). The data package header includes metadata information such as the data slice number (Slice_ID), package size (Package_Size), and encryption algorithm identifier (Encryption_Type). This encryption and integrity protection mechanism ensures the security and verifiability of the backup data.
[0098] Step 602: When an offline candidate backup vehicle is detected in the target backup group, select the online candidate backup vehicle with the highest group-level score from the preset range of candidate backup vehicles and replace it.
[0099] Specifically, when the system detects an offline vehicle in the target backup group, it initiates a backup vehicle replacement mechanism. The system first searches for available candidate backup vehicles within a preset range (e.g., a communication radius of 300 meters) of the offline vehicle. For each searched vehicle, the system obtains its latest group-level score (Group_Score), storage capacity (Storage_Capacity), and communication quality (Link_Quality). Among vehicles meeting basic conditions (e.g., sufficient storage space and satisfactory communication quality), the vehicle with the highest group-level score is selected as the replacement node. The system then updates the vehicle list of the target backup group, marking the offline vehicle as replaced (Status_Replaced) and adding the information of the newly selected vehicle to the list. Simultaneously, the system updates the backup location information (Backup_Location) of the relevant data shards in the mapping table, ensuring that subsequent backup operations can accurately locate the target storage node. This dynamic backup node replacement mechanism effectively improves the reliability and fault tolerance of the backup system, ensuring that data backup operations can be executed continuously and stably.
[0100] Step 603: Encrypt each data shard and write the backup timestamp and verification code into the data shard.
[0101] Specifically, each data slice is first securely encrypted. The system employs the AES-256 encryption algorithm, using a preset key (Encryption_Key) to encrypt the data content, generating an encrypted data block (Encrypted_Data). Based on the encrypted data, the system generates a backup timestamp (Backup_Timestamp, accurate to milliseconds) containing the current time, and calculates a checksum on the original data content using the SHA-256 algorithm. The system packages the encrypted data, timestamp, and checksum into a standard format data package (Data_Package). The data package header contains metadata information such as the data slice number (Slice_ID), package size (Package_Size), and encryption algorithm identifier (Encryption_Type). This encryption and integrity protection mechanism ensures the security and verifiability of the backup data.
[0102] Step 604: Send the encrypted data fragments to the candidate backup vehicles of the corresponding target backup group, and receive the storage confirmation information returned by the candidate backup vehicles; after receiving the storage confirmation information, update the backup status identifier in the mapping table.
[0103] Specifically, during the data transmission and confirmation phase, the system sends packaged data fragments to candidate backup vehicles in the target backup group via a reliable data transmission protocol (such as MQTT). The system employs a block-based transmission strategy, dividing large data fragments into fixed-size transmission blocks (e.g., 1MB / block), each with a sequence number (Block_Sequence) and verification information. Upon receiving the data, the receiving vehicle first verifies data integrity, calculates the checksum of the received data, and compares it with the original checksum. After successful verification, the receiving vehicle stores the data in its local storage system and generates storage confirmation information (Storage_Confirmation), which includes the data fragment number, storage time, and storage location (Storage_Location). When the source vehicle receives the storage confirmation information, it immediately updates the backup status identifier (Backup_Status) of the corresponding data fragment in the mapping table, changing the status from "Backing up" (STATUS_BACKING) to "Backup Completed" (STATUS_COMPLETED). Simultaneously, the system records the backup completion time (Complete_Time) and storage location information for subsequent data management and recovery. This data transmission and status update strategy based on an acknowledgment mechanism ensures the reliability and traceability of the backup process, providing strong protection for the secure storage of data.
[0104] Reference Figure 2 This application provides a secure backup system for vehicle data, comprising: a data acquisition module, a backup group division module, a group-level scoring determination module, and a backup storage module, wherein:
[0105] The data acquisition module is used to acquire the original vehicle data of the current vehicle, and to divide the original vehicle data into multiple data slices according to a preset time window.
[0106] The backup group division module is used to obtain the location and driving information of candidate backup vehicles within a preset range, and divide the candidate backup vehicles into multiple backup groups based on the location and driving information.
[0107] The group-level scoring determination module is used to perform status detection on candidate backup vehicles in each backup group, obtain the inter-group distance value, link quality value and storage capacity value of the candidate backup vehicles, and generate the corresponding group-level score of the backup group based on the inter-group distance value, link quality value and storage capacity value;
[0108] The backup storage module is used to generate a mapping table between data shards and backup groups based on the timestamps of each data shard and the group-level score of each backup group; select the target backup group based on the mapping table, and send each data shard to the candidate backup vehicle in the target backup group for backup storage.
[0109] Based on the above embodiments, the data acquisition module is further configured to acquire the amount of raw vehicle data within a preset acquisition period. The raw vehicle data includes vehicle driving data, vehicle sensor data, and vehicle camera data. The module determines whether the amount of data exceeds a preset storage threshold. If the amount of data exceeds the preset storage threshold, it determines the reduction ratio of the time window based on the ratio of the amount of data to the preset storage threshold, and reduces the length of the preset time window according to the reduction ratio to obtain a target time window. If the amount of data does not exceed the preset storage threshold, the preset time window is set as the target time window. The module performs time-series segmentation of the raw vehicle data according to the target time window to obtain multiple data segments, and adds a timestamp identifier and segment number to each data segment.
[0110] Based on the above embodiments, the backup group division module is further configured to calculate the relative distance between multiple candidate backup vehicles according to the location information of the candidate backup vehicles; perform preliminary grouping of each candidate backup vehicle based on a preset distance threshold; obtain the driving direction and driving speed in the driving information corresponding to the candidate backup vehicles in each preliminary group; if the angle between the driving directions of the candidate backup vehicles in the same preliminary group is less than a preset angle threshold and the difference in driving speed is less than a preset speed threshold, then the preliminary group is determined as a backup group; if the angle between the driving directions of the candidate backup vehicles in the same preliminary group is greater than or equal to a preset angle threshold, or the difference in driving speed is greater than or equal to a preset speed threshold, then the average relative distance between each candidate backup vehicle in the preliminary group and other candidate backup vehicles in the group is calculated, and the candidate backup vehicles whose average relative distance is less than a secondary distance threshold are divided into the same backup group, wherein the secondary distance threshold is less than the preset distance threshold.
[0111] Based on the above embodiments, the backup group division module is also used to establish a vehicle coordinate system for each candidate backup vehicle, taking the current candidate backup vehicle as a reference point; obtain the position coordinates of each candidate backup vehicle in the vehicle coordinate system; divide the vehicle coordinate system into multiple sector areas; calculate the relative distance between each candidate backup vehicle and the current vehicle; and divide the candidate backup vehicles located in the same sector area and whose relative distance is less than a preset distance threshold into the same preliminary group.
[0112] Based on the above embodiments, the group-level scoring determination module is also used to calculate the mean and variance of the inter-group distance values of candidate backup vehicles within the backup group based on the component distance values to obtain distance feature values; calculate the communication stability and link bandwidth utilization of the backup group based on the link quality values to obtain link feature values; obtain the remaining storage capacity of candidate backup vehicles within the backup group, and calculate the storage occupancy rate as a storage feature value based on the remaining storage capacity value and the storage capacity value; and perform weighted calculation on the distance feature value, link feature value, and storage feature value to obtain the group-level score of the corresponding backup group.
[0113] Based on the above embodiments, the backup storage module is also used to obtain the timestamp and data type of each data fragment, determine the priority corresponding to the data type of each data fragment according to a preset priority mapping table; sort each backup group according to the group-level score, and divide the sorting results into target backup groups of different backup levels; match and map the priority of the data fragments with the level of the target backup group; when the data storage volume of the target backup group reaches the preset storage limit, map the data fragment to be mapped to the target backup group of the next backup level; and generate a mapping table containing data fragment number, priority identifier, target backup group number and timestamp.
[0114] Based on the above embodiments, the backup storage module is further configured to obtain the target backup group corresponding to each data shard according to the mapping relationship table, and detect the online status of candidate backup vehicles within the target backup group; when an offline candidate backup vehicle is detected within the target backup group, the online candidate backup vehicle with the highest group-level score is selected from the preset range of candidate backup vehicles for replacement; each data shard is encrypted, and a backup timestamp and verification code are written into the data shard; the encrypted data shard is sent to the candidate backup vehicle of the corresponding target backup group, and the storage confirmation information returned by the candidate backup vehicle is received; after receiving the storage confirmation information, the backup status identifier in the mapping relationship table is updated.
[0115] It should be noted that the above embodiments of the apparatus are only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0116] This application also discloses an electronic device. (See reference...) Figure 3 , Figure 3 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application. The electronic device 300 may include: at least one processor 301, at least one network interface 304, a user interface 303, a memory 305, and at least one communication bus 302.
[0117] The communication bus 302 is used to enable communication between these components.
[0118] The user interface 303 may include a display interface and a camera interface. Optionally, the user interface 303 may also include a standard wired interface and a wireless interface.
[0119] The network interface 304 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0120] The processor 301 may include one or more processing cores. The processor 301 connects to various parts of the server using various interfaces and lines, and performs various server functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 305, and by calling data stored in the memory 305. Optionally, the processor 301 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 301 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface graphics, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 301 and may be implemented as a separate chip.
[0121] The memory 305 may include random access memory (RAM) or read-only memory. Optionally, the memory 305 may include a non-transitory computer-readable storage medium. The memory 305 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 305 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 305 may also be at least one storage device located remotely from the aforementioned processor 301. (Refer to...) Figure 3 The memory 305, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an application program for a secure backup method of vehicle data.
[0122] exist Figure 3 In the illustrated electronic device 300, the user interface 303 is mainly used to provide an input interface for the user and to acquire user input data; while the processor 301 can be used to call an application program storing a secure backup method for vehicle data in the memory 305. When executed by one or more processors 301, the electronic device 300 performs one or more methods as described in the above embodiments. It should be noted that, for the foregoing method embodiments, for the sake of simplicity, they are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, because according to this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0123] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0124] In the various embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some service interface; the indirect coupling or communication connection between apparatuses or units may be electrical or other forms.
[0125] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0126] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0127] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, portable hard drives, magnetic disks, or optical disks.
[0128] The above are merely exemplary embodiments of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Other embodiments of this disclosure will be readily apparent to those skilled in the art upon consideration of the specification and practical disclosure.
[0129] This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described in this disclosure. The specification and embodiments are to be considered exemplary only.
Claims
1. A method for secure backup of vehicle-mounted data, characterized in that, include: Obtain the original vehicle data of the current vehicle, and divide the original vehicle data into multiple data slices according to a preset time window; Obtain the location and driving information of candidate backup vehicles within a preset range, and divide the candidate backup vehicles into multiple backup groups based on the location and driving information; Status detection is performed on the candidate backup vehicles in each backup group to obtain the inter-group distance value, link quality value, and storage capacity value of the candidate backup vehicles. A group-level score for the corresponding backup group is generated based on the inter-group distance value, the link quality value, and the storage capacity value. The inter-group distance value refers to the set of relative distance parameters between each candidate backup vehicle in the backup group, including real-time distance data between any two vehicles in the group. The link quality value refers to the communication link performance parameters between vehicles in the backup group. The storage capacity value includes the total storage capacity of each candidate backup vehicle in the backup group. Based on the timestamps of each data shard and the group-level scores of each backup group, a mapping table between data shards and backup groups is generated. Based on the mapping table, a target backup group is selected, and each data fragment is sent to the candidate backup vehicle in the target backup group for backup storage. The process of dividing the candidate backup vehicles into multiple backup groups based on the location information and the driving information includes: Based on the location information of the candidate backup vehicles, the relative distance between multiple candidate backup vehicles is calculated; The candidate backup vehicles are initially grouped based on a preset distance threshold. Obtain the driving direction and speed from the driving information of the candidate backup vehicles in each of the preliminary groups; If the angle between the driving directions of the candidate backup vehicles in the same preliminary group is less than a preset angle threshold and the difference in driving speed is less than a preset speed threshold, then the preliminary group is determined as a backup group. If the angle between the driving directions of the candidate backup vehicles in the same initial group is greater than or equal to the preset angle threshold, or the difference in driving speed is greater than or equal to the preset speed threshold, then the average relative distance between each candidate backup vehicle in the initial group and other candidate backup vehicles in the group is calculated, and candidate backup vehicles whose average relative distance is less than the secondary distance threshold are divided into the same backup group, wherein the secondary distance threshold is less than the preset distance threshold.
2. The secure backup method for vehicle data according to claim 1, characterized in that, The original vehicle data is segmented according to a preset time window to obtain multiple data segments, including: Acquire the amount of raw vehicle data within a preset collection period. The raw vehicle data includes vehicle driving data, vehicle sensor data, and vehicle camera data. Determine whether the amount of data exceeds a preset storage threshold; If the amount of data is greater than the preset storage threshold, then the reduction ratio of the time window is determined according to the ratio of the amount of data to the preset storage threshold, and the time length of the preset time window is reduced according to the reduction ratio to obtain the target time window; If the amount of data is not greater than the preset storage threshold, then the preset time window is set as the target time window; The original vehicle data is time-series segmented according to the target time window to obtain multiple data segments, and a timestamp identifier and segment number are added to each data segment.
3. The secure backup method for vehicle data according to claim 1, characterized in that, The preliminary grouping of the candidate backup vehicles based on a preset distance threshold includes: For each of the candidate backup vehicles, a vehicle coordinate system is established using the current candidate backup vehicle as a reference point; Obtain the position coordinates of each of the candidate backup vehicles in the vehicle coordinate system; The vehicle coordinate system is divided into multiple sector regions; Calculate the relative distance between each of the candidate backup vehicles and the current vehicle; Candidate backup vehicles located within the same sector area and with a relative distance less than the preset distance threshold are divided into the same initial group.
4. The secure backup method for vehicle data according to claim 1, characterized in that, The process of generating a group-level score for the corresponding backup group based on the inter-group distance value, the link quality value, and the storage capacity value includes: The mean and variance of the inter-group distance values of candidate backup vehicles within the backup group are calculated based on the inter-group distance values to obtain the distance feature values; Based on the link quality value, the communication stability and link bandwidth utilization of the backup group are calculated to obtain the link characteristic value; Obtain the remaining storage capacity of candidate backup vehicles within the backup group, and calculate the storage occupancy rate as a storage characteristic value based on the value of the remaining storage capacity and the storage capacity value. The distance feature value, the link feature value, and the storage feature value are weighted and calculated to obtain the group-level score of the corresponding backup group.
5. The secure backup method for vehicle data according to claim 1, characterized in that, The step of generating a mapping table between data shards and backup groups based on the timestamps of each data shard and the group-level scores of each backup group includes: Obtain the timestamp and data type of each data segment, and determine the priority corresponding to the data type of each data segment according to the preset priority mapping table; The backup groups are sorted according to the group-level scores, and the sorting results are divided into target backup groups of different backup levels. The priority of the data shards is matched and mapped to the level of the target backup group; When the data storage volume of the target backup group reaches the preset storage limit, the data fragments to be mapped will be mapped to the target backup group of the next backup level; Generate a mapping table containing data shard numbers, priority identifiers, target backup group numbers, and timestamps.
6. The secure backup method for vehicle data according to claim 1, characterized in that, The step of selecting a target backup group based on the mapping table and sending each data fragment to the candidate backup vehicles in the target backup group for backup storage includes: According to the mapping table, obtain the target backup group corresponding to each data shard, and detect the online status of the candidate backup vehicles in the target backup group; When an offline candidate backup vehicle is detected in the target backup group, the online candidate backup vehicle with the highest group-level score is selected from the preset range of candidate backup vehicles and replaced. Each data fragment is encrypted, and a backup timestamp and verification code are written into the data fragment. The encrypted data fragments are sent to the candidate backup vehicles of the corresponding target backup group, and the storage confirmation information returned by the candidate backup vehicles is received. Upon receiving the storage confirmation information, the backup status identifier in the mapping table is updated.
7. A secure backup system for vehicle-mounted data, characterized in that, The system includes: The data acquisition module is used to acquire the original vehicle data of the current vehicle, and to divide the original vehicle data into multiple data slices according to a preset time window. The backup group division module is used to obtain the location information and driving information of candidate backup vehicles within a preset range, and divide the candidate backup vehicles into multiple backup groups based on the location information and the driving information. The group-level scoring determination module is used to perform status detection on candidate backup vehicles in each backup group, obtain the inter-group distance value, link quality value, and storage capacity value of the candidate backup vehicles, and generate a group-level score for the corresponding backup group based on the inter-group distance value, the link quality value, and the storage capacity value. The inter-group distance value refers to the set of relative distance parameters between each candidate backup vehicle in the backup group, including real-time distance data between any two vehicles in the group. The link quality value refers to the communication link performance parameters between vehicles in the backup group. The storage capacity value includes the total storage capacity of each candidate backup vehicle in the backup group. The backup storage module is used to generate a mapping table between data fragments and backup groups based on the timestamps of each data fragment and the group-level score of each backup group; select a target backup group based on the mapping table; and send each data fragment to the candidate backup vehicle in the target backup group for backup storage. The process of dividing the candidate backup vehicles into multiple backup groups based on the location information and the driving information includes: Based on the location information of the candidate backup vehicles, the relative distance between multiple candidate backup vehicles is calculated; The candidate backup vehicles are initially grouped based on a preset distance threshold. Obtain the driving direction and speed from the driving information of the candidate backup vehicles in each of the preliminary groups; If the angle between the driving directions of the candidate backup vehicles in the same preliminary group is less than a preset angle threshold and the difference in driving speed is less than a preset speed threshold, then the preliminary group is determined as a backup group. If the angle between the driving directions of the candidate backup vehicles in the same initial group is greater than or equal to the preset angle threshold, or the difference in driving speed is greater than or equal to the preset speed threshold, then the average relative distance between each candidate backup vehicle in the initial group and other candidate backup vehicles in the group is calculated, and candidate backup vehicles whose average relative distance is less than the secondary distance threshold are divided into the same backup group, wherein the secondary distance threshold is less than the preset distance threshold.
8. An electronic device, characterized in that, The device includes a processor, a memory, a user interface, and a network interface. The memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to cause the electronic device to perform the secure backup method for vehicle data as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed, perform the secure backup method for vehicle data as described in any one of claims 1-6.
Citation Information
Patent Citations
In-vehicle device, communication method, and in-vehicle device program
JP2023125202A
Vehicle incident data recovery of distributed vehicle event data
US20250016143A1