Data backup method and device, electronic equipment and storage medium
By detecting the backup situation in the vehicle system and generating backup instructions, dynamic data backup between vehicle systems is realized, which solves the problem of affecting vehicle operation stability in the existing technology and improves the system failover capability and operational reliability. .
Patent Information
- Application Number
- CN202310334007.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-30
- Publication Date
- 2024-10-01
AI Technical Summary
Existing technology is difficult to realize dynamic data backup between vehicle systems, which affects the stability of vehicle operation. If the vehicle system fails, it cannot be switched in time, affecting the smooth operation of the vehicle.
By detecting the backup status of the target service on multiple systems, the backup information is generated, and the value of the data to be backed up is calculated. If the value is greater than the preset threshold, a backup instruction is generated to instruct another system to perform data backup to ensure that the data is dynamic between different systems. synchronous.
It realizes dynamic data backup between vehicle systems, improves the operational stability of vehicles and vehicle systems, ensures timely switching and continued operation in the event of system failure, and reduces the probability of service unavailability.
Smart Images

Figure CN118733332A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a data backup method, device, electronic device and storage medium. Background Art
[0002] With the development of intelligent vehicles, deploying multiple vehicle systems in vehicles has become a research focus. If any vehicle system fails, it will affect the operation of the vehicle. Therefore, it is crucial to back up the data in the vehicle system to ensure the smooth operation of the vehicle.
[0003] At present, business services are mostly deployed on different vehicle systems during the development phase. Once the business services are compiled and packaged and flashed to the hardware, they can no longer be dynamically adjusted according to the backup status of the vehicle system. If the current vehicle system fails, the vehicle system switch will fail due to the lack of timely data backup, which can easily affect the stability of operation between the vehicle and the vehicle system. Summary of the invention
[0004] In order to solve the above technical problems, the present disclosure provides a data backup method, device, electronic device and storage medium, which can perform dynamic data backup according to the backup status of each system, so that other subsequent systems can also ensure the smooth operation of the vehicle based on the backup data, thereby improving the stability of operation between the vehicle and the vehicle system.
[0005] In a first aspect, an embodiment of the present disclosure provides a data backup method, the method comprising:
[0006] Detecting the backup status of the target service on the first system and generating first backup information;
[0007] Acquire second backup information of the target service on a second system, wherein the first system and the second system deploy the same partial service, and the partial service includes the target service;
[0008] Calculate a first value related to the target service data to be backed up according to the first backup information and the second backup information;
[0009] If the first value is greater than a first preset threshold, a backup instruction is generated and sent to the second system, where the backup instruction is used to instruct the second system to back up data of the target service.
[0010] Optionally, the partial service also includes a backup service, and the backup service is used to detect the backup status of the corresponding system.
[0011] Optionally, the detecting the backup status of the target service on the first system and generating first backup information includes:
[0012] Using the backup service deployed in the first system as a primary backup service;
[0013] The primary backup service detects a first quantity of application data of the target service backed up on the first system, and generates first backup information based on the first quantity.
[0014] Optionally, the obtaining second backup information of the target service on the second system includes:
[0015] Sending notification information to the second system that the backup service deployed in the second system is used as a secondary backup service, so that the second system detects a second amount of application data of the target service backed up on the second system through the secondary backup service, and generates second backup information based on the second amount;
[0016] The second backup information sent by the slave backup service is received by the primary backup service, and the slave backup service and the primary backup service are connected and communicated with each other via Ethernet.
[0017] Optionally, the calculating a first value related to the target service data to be backed up according to the first backup information and the second backup information includes:
[0018] Compare the first backup information with the second backup information to obtain a second value;
[0019] If the second value is greater than a second preset threshold, determining a calculation time of the second value;
[0020] Starting from the calculation time, the average of all second values calculated within a preset time is counted to obtain the first value related to the target service data to be backed up.
[0021] In a second aspect, an embodiment of the present disclosure provides a data backup method, the method comprising:
[0022] Detecting the backup status of the target service on the second system to generate second backup information, and sending the second backup information to the first system, wherein the first system and the second system are deployed with the same partial services, and the partial services include the target service;
[0023] Receive a backup instruction sent by the first system, and perform data backup on the target service based on the backup instruction, so that the first system detects the first backup information generated by the backup status of the target service on the first system, and calculates a first value related to the data to be backed up of the target service based on the first backup information and the second backup information, wherein the backup instruction is generated by the first system when the first value is greater than a first preset threshold.
[0024] Optionally, the target service is in an enabled state in the first system, and the target service is in a disabled state in the second system.
[0025] Optionally, after backing up data of the target service based on the backup instruction, the method includes:
[0026] After the second system completes data backup of the target service, receiving a state switching instruction for the target service sent by the first system;
[0027] In response to the state switching instruction, switching the state of the target service to an enabled state, so that the target service runs on the second system based on the backed-up data;
[0028] The first system is notified to switch the state of the target service to a disabled state.
[0029] Optionally, after backing up the data of the target service based on the backup instruction, the method further includes:
[0030] During the data backup process, real-time detection of the backup status of the target service generates updated second backup information, and the updated second backup information is sent to the first system, so that the first system recalculates the first value according to the updated second backup information and the first backup information;
[0031] An end instruction sent by the first system is received, and data backup of the target service is ended based on the end instruction, wherein the end instruction is generated by the first system when a recalculated first value is less than the first preset threshold.
[0032] In a third aspect, an embodiment of the present disclosure provides a data backup device, the device comprising:
[0033] A first detection module, used to detect the backup status of the target service on the first system and generate first backup information;
[0034] An acquisition module, configured to acquire second backup information of the target service on a second system, wherein the first system and the second system are deployed with the same partial service, and the partial service includes the target service;
[0035] a calculation module, configured to calculate a first value related to the target service data to be backed up according to the first backup information and the second backup information;
[0036] A generation module is used to generate a backup instruction and send it to the second system if the first value is greater than a first preset threshold value, wherein the backup instruction is used to instruct the second system to perform data backup on the target service.
[0037] In a fourth aspect, an embodiment of the present disclosure provides a data backup device, the device comprising:
[0038] A second detection module is configured to detect the backup status of the target service on the second system to generate second backup information, and send the second backup information to the first system, so that the first system detects the first backup information generated by the backup status of the target service on the first system, and calculates a first value related to the target service data to be backed up according to the first backup information and the second backup information, wherein the first system and the second system deploy the same partial services, and the partial services include the target service;
[0039] A receiving module is used to receive a backup instruction sent by the first system, and perform data backup on the target service based on the backup instruction, wherein the backup instruction is generated by the first system when the first value is greater than a first preset threshold.
[0040] In a fifth aspect, an embodiment of the present disclosure provides an electronic device, including:
[0041] Memory;
[0042] Processor; and
[0043] Computer programs;
[0044] The computer program is stored in the memory and is configured to be executed by the processor to implement the data backup method as described above.
[0045] In a sixth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the data backup method as described above when the computer program is executed by a processor.
[0046] The embodiment of the present disclosure provides a data backup method, including: detecting the backup status of the target service on the first system, generating first backup information; obtaining second backup information of the target service on the second system, wherein the first system and the second system deploy the same partial services, and the partial services include the target service; calculating a first value related to the target service data to be backed up based on the first backup information and the second backup information; if the first value is greater than a first preset threshold, generating a backup instruction and sending it to the second system, the backup instruction is used to instruct the second system to perform data backup on the target service. The method provided by the present disclosure can perform dynamic data backup according to the backup status of each system for the target service. If the currently used system fails later, other systems can also ensure that the vehicle continues to operate based on the backup data, further improving the stability of operation between the vehicle and the vehicle system. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0048] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0049] Figure 1 A flowchart of a data backup method provided by an embodiment of the present disclosure;
[0050] Figure 2 A schematic diagram of a vehicle system provided by an embodiment of the present disclosure;
[0051] Figure 3 A flowchart of another data backup method provided by an embodiment of the present disclosure;
[0052] Figure 4 A schematic diagram of the structure of a data backup device provided by an embodiment of the present disclosure;
[0053] Figure 5 A schematic diagram of the structure of another data backup device provided by an embodiment of the present disclosure;
[0054] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0055] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0056] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0057] Before describing the data backup method provided by the present disclosure, the key terms involved are explained first, including:
[0058] Android Automotive (AAutomotive): is an Android system for cars based on the Android platform.
[0059] System On Chip (SOC): refers to the packaging method in which the CPU, GPU, etc. are packaged in one chip, and is used to refer to the core computing chip of the car computer.
[0060] Multi-SOC car computer: A car computer system that includes multiple SOCs can solve the problem of insufficient computing power of a single SOC.
[0061] Multi-AAutomotive car system: Multi-SOC car system is installed with multi-AAutomotive OS intelligent car system.
[0062] Services and applications: A synonym for business components based on the AAutomotive OS process.
[0063] At present, it is a relatively rare architectural solution to use multiple systems for redundant backup on smart car computers. There is no unified redundant backup method between existing vehicles and car systems. Most of the time, business services are allocated to the car system during the development phase. The business service will run on a fixed car system. Once compiled and packaged, it can no longer be dynamically adjusted according to the backup situation on the system after being flashed to the hardware. It can only be backed up according to the preset fixed data backup method, which has poor flexibility. If the currently used car system fails and the preset fixed data backup method has not yet performed data backup, and the data backup method cannot be changed, then other backup car systems will not be able to continue to run based on the backup data, resulting in failure of car system switching, which seriously affects the stable operation of the vehicle.
[0064] In response to the above technical problems, the embodiments of the present disclosure provide a data backup method to solve the redundant backup problem among multiple vehicle systems. The method is applied to the first system among multiple vehicle systems, where the first system is the vehicle system currently used by the vehicle. The first system will dynamically adjust other spare vehicle systems (second systems) to perform data backup for the target service in real time according to the backup status of each system for the target service, thereby improving the backup efficiency. At the same time, it is also convenient for the target service to be subsequently adjusted to run on different vehicle systems. The target service on other spare vehicle systems can be operated according to the timely backed up data, thereby ensuring the stability of operation between the vehicle and the vehicle system. This dynamic backup method can also reduce the load to a certain extent, improve the computing power utilization efficiency of the multi-system intelligent vehicle machine, and reduce the hardware cost of the multi-system intelligent vehicle machine.
[0065] Figure 1 A flow chart of a data backup method provided for an embodiment of the present disclosure. Specifically, in a feasible application scenario, vehicle A includes multiple vehicle systems, and the multiple vehicle systems include a first system and a second system. The first system is the system currently used by vehicle A (current system), and the second system is a backup system. The first system notifies the second system to dynamically perform data backup based on the backup status of each system, wherein the first system and the second system can run in a server, and the server can be a local server, such as a controller or a main controller in a vehicle system. In another feasible application scenario, vehicle A includes a first system, and vehicle B includes a second system. The first system and the second system communicate, and the first system notifies the second system to dynamically perform data backup based on the backup status of each system. The following embodiments take the first feasible application scenario as an example, and the data backup method is applied to the first system in vehicle A, specifically including the following. Figure 1 The following steps S110 to S140 are shown:
[0066] The first system and the second system are deployed with the same partial services, the partial services include the target service and a backup service, and the backup service is used to detect the backup status of the corresponding system.
[0067] It is understandable that multiple AAutomotive OS systems are deployed on public vehicles, and the multiple AAutomotive OS systems include a first system and a second system. An Ethernet connection is established between the two systems using a static address (IP), and the static address can be understood as a fixed IP address. A portion of the same services and applications are deployed in both the first system and the second system, which are called redundant backup services and applications, wherein the applications are used to implement different service functions, so it can be understood that the same partial services are deployed in the first system and the second system. Specifically, the first system and the second system are both deployed with a large number of services of various types, and there are at least some of the same services in a large number of services, and the functions implemented by at least some of the services on different systems are the same. The same partial services include target services, and the target service in the second system can be regarded as a backup service for the target service in the first system. The same partial services also include and backup services, that is, redundant backup services (hereinafter referred to as backup services) are deployed in both the first system and the second system. The backup service can detect the backup status of the current system and manage the activation of the same partial services deployed on other systems, and the activation status includes the startup and prohibition of services.
[0068] For example, see Figure 2 , Figure 2 A schematic diagram of a vehicle system provided in an embodiment of the present disclosure is shown. Figure 2 The vehicle system shown includes a first system and a second system. The first system and the second system are connected and communicated via Ethernet. The first system and the second system are deployed with at least some of the same services, such as services 1 to 4 selected by rectangular boxes in the first system and the second system. Service 1 can be a backup service, and the target service can be at least one of services 2 to 4. The following embodiment is described by taking service 2 as the target service. Secondly, in addition to deploying at least some of the same services in the first system and the second system, the first system is also deployed with services 5 and 6, and the second system is also deployed with services 7 and 8. The specific service deployment of each system is not described in detail here.
[0069] Optionally, the target service is in an enabled state in the first system, and the target service is in a disabled state in the second system.
[0070] It can be understood that the first system is the current system of the vehicle, so some of the same services are all enabled in the first system and disabled in the second system, and the activation status of other different services deployed in the first system and the second system is not limited.
[0071] S110: Detect the backup status of the target service on the first system and generate first backup information.
[0072] It can be understood that the first system detects the backup status of the target service on the first system by itself and generates first backup information. The first backup information includes the backup value of the application data of the target system on the first system. The application data can be fixed data and dynamic data. The backup value refers to the number of application data backups on the first system when the target system is running on all vehicle systems. For example, the backup value of the application data on the first system is 10, which means that the first system stores a total of 10 copies of the application data, and the content of each copy of the application data is generated when the target service is running on different systems in chronological order, and is not completely the same. For example, the 10th copy of application data is the latest application data when the target service is running on the first system.
[0073] Optionally, the generation of the first backup information in S110 is specifically implemented through the following steps:
[0074] The backup service deployed in the first system is used as a primary backup service; a first quantity of application data of the target service backed up on the first system is detected through the primary backup service, and first backup information is generated based on the first quantity.
[0075] It can be understood that the backup service deployed in the first system and the backup service deployed in the second system confirm the master-slave relationship through an active election method, with the first system as the master system and other systems as slave systems. The master system can be understood as the current system, and then the backup service deployed in the first system is used as the master backup service, and the backup service deployed in the second system is used as the slave backup service. The master backup service is also used to manage other slave backup services. Subsequently, the first system detects the backup status of the target service on the first system through the master backup service. The backup status specifically refers to the first number of backups of the target service's application on the first system. The first number is also the backup value. Subsequently, based on the backup number of the target service, the first backup information is generated.
[0076] S120: Obtain second backup information of the target service on the second system.
[0077] It can be understood that, based on the above S110, the second backup information of the target service on the second system is obtained through Ethernet, and the second backup information includes the backup value of the target service on the second system.
[0078] Optionally, the above S120 obtains the second backup information, which is specifically implemented by the following steps:
[0079] Sending notification information to the second system to use the backup service deployed therein as a slave backup service, so that the second system detects the second amount of application data of the target service backed up on the second system through the slave backup service, and generates second backup information based on the second amount; receiving the second backup information sent by the slave backup service through the master backup service, and the slave backup service and the master backup service establish a connection and communicate through Ethernet.
[0080] It can be understood that after the backup service deployed in the second system is used as a slave backup service, a query request for the backup status of the target service is sent to the slave backup service in the second system through the master backup service, so that the second system detects the second amount of application data of the target service backed up on the second system through the slave backup service, and generates second backup information based on the second amount. Subsequently, the slave backup service sends the second backup information to the master backup service through Ethernet, and the master backup service receives the second backup information.
[0081] S130. Calculate a first value related to the target service data to be backed up according to the first backup information and the second backup information.
[0082] It is understandable that, based on the above S120, the first system or the main backup service compares the first backup information with the second backup information to calculate the first value related to the current data to be backed up of the target service. It is understandable that when the target service is running in the first system, the application data stored in the first system in real time is the backup data of the target service in the first system. Therefore, when each system detects the backup status of the target service, the backup value in the first backup information must be greater than or equal to the backup value in the second backup information, that is, the backup data stored by the system that enables the target service must be earlier than and more than the backup data stored by the system that disables the target service.
[0083] Optionally, the above S130 calculates the first value, which is specifically implemented by the following steps:
[0084] Compare the first backup information and the second backup information to obtain a second value; if the second value is greater than a second preset threshold, determine the calculation time of the second value; starting from the calculation time, count the average of all second values calculated within the preset time to obtain the first value related to the target service data to be backed up.
[0085] It is understandable that the backup value in the first backup information is recorded as x, and the backup value in the second backup information is recorded as y. The backup value x and the backup value y are compared to obtain a second value. Specifically, the difference between the backup value x and the backup value y can be calculated. The second value is also the difference, which is recorded as δ. For the target service: δ = xy. Then, the relationship between the second value and the second preset threshold is determined. If the second value is less than or equal to the second preset threshold, the backup status of the target service continues to be detected. This situation may be that the second system has just completed or has already performed data backup, and the backup value in the second backup information is close to the backup value in the first backup information. If the second value is greater than the second preset threshold, redundant backup is triggered, and the calculation time of the second value is determined. The calculation time refers to the time when the calculation of the second value begins. Then, starting from the calculation time, the average of all second values calculated within the preset time is counted to obtain the first value, which is the average. For example, if the calculation time is 20s and the preset time is 10s, a second value will be calculated every second, and the average of the second values per second, that is, the average of 10 second values in the time period of 20s to 30s is calculated to obtain the first value.
[0086] S140: If the first value is greater than a first preset threshold, generate a backup instruction and send it to the second system.
[0087] The backup instruction is used to instruct the second system to perform data backup on the target service.
[0088] It can be understood that, based on the above S130, the relationship between the first numerical value and the first preset threshold is determined. If the first numerical value is less than or equal to the first preset threshold, the backup status of the target service continues to be monitored in real time; if the first numerical value is greater than the first preset threshold, the target service deployed therein is put into a pre-backup state, and the generated backup instruction is sent to the second system. The backup instruction is used to instruct the second system to perform data backup on the target service. Specifically, after receiving the backup instruction, the second system also puts the target service deployed therein into a pre-backup state. After feeding back to the first system that it has entered the pre-backup state, it starts to perform data backup on the target service. Data backup refers to receiving and storing application data of the target data transmitted by the first system. The pre-backup state refers to receiving a backup signal to prepare to start backup.
[0089] It is understandable that for each system, the backup service deployed on it monitors the backup status of each service in real time. Therefore, the current system can promptly notify the backup system to perform backup according to the backup status of each service in each backup system, that is, dynamically perform data backup of each service according to the backup status of each service in each backup system. For example, through real-time monitoring, it is determined that service 1 on system 3 needs to perform data backup, service 2 on system 3 does not need to perform data backup, and service 2 on system 4 needs to perform data backup. In other words, the time for data backup of different services on different systems is different, which is dynamically adjusted according to the backup status of each service.
[0090] The embodiment of the present disclosure provides a data backup method, including: detecting the backup status of the target service on the first system, generating first backup information; obtaining second backup information of the target service on the second system, wherein the first system and the second system deploy the same partial services, and the partial services include the target service; calculating the first value related to the target service data to be backed up according to the first backup information and the second backup information; if the first value is greater than the first preset threshold, sending the generated backup instruction to the second system, the backup instruction is used to instruct the second system to perform data backup on the target service. The method provided by the present disclosure can perform dynamic data backup according to the backup status of each system for the target service. The dynamic backup method is more flexible, and can also avoid the problem of unbalanced or even excessive load caused by performing data backup of different systems and services at the same time, effectively improving the computing power utilization efficiency of multiple systems, and if the current system fails later, other systems can also continue to operate based on the backup data, reducing the probability of service unavailability, and further improving the stability of operation between vehicles and vehicle systems.
[0091] Based on the above embodiments, Figure 3 A flow chart of another data backup method provided in an embodiment of the present disclosure is applied to the second system in the above-mentioned vehicle A. The second system may also be run in a server. The server may be a local server, such as a controller or a main controller in a vehicle system. Specifically, Figure 3 The following steps shown implement S310 to S320:
[0092] S310, detecting the backup status of the target service on the second system to generate second backup information, and sending the second backup information to the first system, so that the first system detects the first backup information generated by the backup status of the target service on the first system, and calculates a first value related to the data to be backed up of the target service based on the first backup information and the second backup information.
[0093] The first system and the second system deploy the same partial services, and the partial services include the target service and the backup service.
[0094] It is understandable that after the second system receives the detection notification for the target service sent by the first system, it generates second backup information by detecting the backup status of the target service on the second system from the backup service, and then sends the second backup information to the primary backup service in the first system from the backup service. Alternatively, after the second system detects the backup status of the target service in real time / periodic from the backup service, it sends the generated second backup information to the first system, and other possible detection methods of the second system are not limited here. The process of the first system calculating the first data based on the backup information refers to the above embodiment and is not repeated here.
[0095] S320: Receive a backup instruction sent by the first system, and perform data backing up on the target service based on the backup instruction.
[0096] The backup instruction is generated by the first system when the first value is greater than a first preset threshold.
[0097] It can be understood that based on the above S310, the second system receives the backup instruction sent by the primary backup service from the backup service, and based on the backup instruction, puts the target service deployed therein into the pre-backup state, and after feedback to the primary backup service that the target service has entered the pre-backup state, starts to back up data for the target service.
[0098] Optionally, the second system will continuously monitor the backup status during the process of backing up the target service. Specifically:
[0099] During the data backup process, the backup status of the target service is detected in real time to generate updated second backup information, and the updated second backup information is sent to the first system so that the first system recalculates the first value based on the updated second backup information and the first backup information; an end instruction sent by the first system is received, and the data backup of the target service is ended based on the end instruction, and the end instruction is generated by the first system when the recalculated first value is less than the first preset threshold.
[0100] It is understandable that after the second system starts to back up the data of the target service, it will continue to detect the backup status of the target service and generate updated second backup information. The backup value in the second backup information generated at this time will also increase with the data backup, and the difference between the backup values in the first backup information and the second backup information will also decrease accordingly. With the real-time monitoring of the backup status of the second system by the primary backup service, that is, the first system will receive the second backup information in real time to monitor the backup status of the second system. When it is determined that the difference (the second value) is less than the first preset threshold, an end instruction is generated and sent to the second system. Based on the end instruction, the second system will exit the pre-backup state of the target service and stop backing up the data of the target service, completing a dynamic backup of the second system.
[0101] Optionally, the target service is in an enabled state in the first system, and the target service is in a disabled state in the second system.
[0102] Optionally, after backing up data of the target service based on the backup instruction, the method includes:
[0103] After the second system completes the data backup of the target service, it receives a state switching instruction for the target service sent by the first system; in response to the state switching instruction, it switches the state of the target service to an enabled state so that the target service runs on the second system based on the backed up data; and it notifies the first system to switch the state of the target service to a disabled state.
[0104] It is understandable that after the second system completes the data backup of the target service, if the first system fails or the target service deployed on the first system fails, a state switching instruction for the target service is sent to the second system, that is, according to the operation status of each system, the target service is dynamically adjusted to run on different systems. In response to the state switching instruction, the second system adjusts the operating state of the target service deployed thereon to an enabled state, which means running the target service so that the target service continues to run on the second system based on the backed-up data. Subsequently, the first system is notified to switch the state of the target service deployed thereon to a disabled state, which means stopping operation, and the target service deployed on the second system will subsequently provide support for vehicle operation.
[0105] The embodiment of the present disclosure provides a data backup method, which is applied to the second system, including: detecting the backup status of the target service on the second system to generate second backup information, and sending the second backup information to the first system, wherein the first system and the second system are deployed with the same partial services, and the partial services include the target service; receiving the backup instruction sent by the first system, and performing data backup on the target service based on the backup instruction, wherein the backup instruction is generated by the first system based on the first backup information and the second backup information of the detected target service. The method provided by the present disclosure, as the first system of the current system, will count the backup status of the target service in other backup systems (second systems) in real time, and the second system will start the data backup of the target service based on the backup instruction issued by the first system. The backup method is relatively flexible, which is convenient for the target service on the second system to continue to run stably after the subsequent failure of the first system, effectively improving the robustness of the service in the multi-system intelligent vehicle machine, reducing the probability of service unavailability, and also providing support for dynamic redundant backup between multiple systems.
[0106] Figure 4 The data backup device provided by the embodiment of the present disclosure can execute the processing flow provided by the above data backup method embodiment and be applied to the above first system, such as Figure 4 As shown, the data backup device 400 includes a first detection module 410, an acquisition module 420, a calculation module 430 and a generation module 440, wherein:
[0107] A first detection module 410, configured to detect the backup status of the target service on the first system and generate first backup information;
[0108] An acquisition module 420 is configured to acquire second backup information of the target service on a second system, wherein the first system and the second system are deployed with the same partial service, and the partial service includes the target service;
[0109] A calculation module 430, configured to calculate a first value related to the target service data to be backed up according to the first backup information and the second backup information;
[0110] The generating module 440 is configured to generate a backup instruction and send it to the second system if the first value is greater than a first preset threshold value, wherein the backup instruction is used to instruct the second system to perform a data backup on the target service.
[0111] Optionally, the partial services in the device 400 also include a backup service, and the backup service is used to detect the backup status of the corresponding system.
[0112] Optionally, the first detection module 410 is used to:
[0113] Using the backup service deployed in the first system as a primary backup service;
[0114] The primary backup service detects a first quantity of application data of the target service backed up on the first system, and generates first backup information based on the first quantity.
[0115] Optionally, the acquisition module 420 is used to:
[0116] Sending notification information to the second system that the backup service deployed in the second system is used as a secondary backup service, so that the second system detects a second amount of application data of the target service backed up on the second system through the secondary backup service, and generates second backup information based on the second amount;
[0117] The second backup information sent by the slave backup service is received by the primary backup service, and the slave backup service and the primary backup service are connected and communicated with each other via Ethernet.
[0118] Optionally, the calculation module 430 is used to:
[0119] Compare the first backup information with the second backup information to obtain a second value;
[0120] If the second value is greater than a second preset threshold, determining a calculation time of the second value;
[0121] Starting from the calculation time, the average of all second values calculated within a preset time is counted to obtain the first value related to the target service data to be backed up.
[0122] Figure 4 The data backup device of the illustrated embodiment can be used to execute the technical solution of the above-mentioned method embodiment, and its implementation principle and technical effect are similar and will not be described in detail here.
[0123] Figure 5 The data backup device provided by the embodiment of the present disclosure can execute the processing flow provided by the above data backup method embodiment and be applied to the above second system, such as Figure 5 As shown, the data backup device 500 includes a second detection module 510 and a receiving module 520, wherein:
[0124] A second detection module 510 is configured to detect the backup status of the target service on the second system to generate second backup information, and send the second backup information to the first system, so that the first system detects the first backup information generated by the backup status of the target service on the first system, and calculates a first value related to the target service data to be backed up according to the first backup information and the second backup information, wherein the first system and the second system deploy the same partial services, and the partial services include the target service;
[0125] The receiving module 520 is used to receive the backup instruction sent by the first system, and perform data backup on the target service based on the backup instruction, wherein the backup instruction is generated by the first system when the first value is greater than a first preset threshold.
[0126] Optionally, the target service in the device 500 is in an enabled state in the first system, and the target service is in a disabled state in the second system.
[0127] Optionally, the device 500 is further used for:
[0128] After the second system completes data backup of the target service, receiving a state switching instruction for the target service sent by the first system;
[0129] In response to the state switching instruction, switching the state of the target service to an enabled state, so that the target service runs on the second system based on the backed-up data;
[0130] The first system is notified to switch the state of the target service to a disabled state.
[0131] Optionally, the device 500 is further used for:
[0132] During the data backup process, real-time detection of the backup status of the target service generates updated second backup information, and the updated second backup information is sent to the first system, so that the first system recalculates the first value according to the updated second backup information and the first backup information;
[0133] An end instruction sent by the first system is received, and data backup of the target service is ended based on the end instruction, wherein the end instruction is generated by the first system when a recalculated first value is less than the first preset threshold.
[0134] Figure 5 The data backup device of the illustrated embodiment can be used to execute the technical solution of the above-mentioned method embodiment, and its implementation principle and technical effect are similar and will not be described in detail here.
[0135] Figure 6 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 6 , which shows a schematic diagram of the structure of an electronic device 600 suitable for implementing the embodiment of the present disclosure. The electronic device 600 in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), wearable electronic devices, etc., and fixed terminals such as digital TVs, desktop computers, smart home devices, etc. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0136] like Figure 6 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 to a random access memory (RAM) 603 to implement the data backup method of the embodiment described in the present disclosure. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0137] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0138] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart, thereby implementing the data backup method as described above. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0139] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0140] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0141] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0142] Optionally, when the above one or more programs are executed by the electronic device, the electronic device may also execute other steps described in the above embodiments.
[0143] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0144] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0145] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0146] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0147] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0148] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or gateway that includes a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also includes elements inherent to such process, method, article or gateway. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or gateway that includes the elements.
[0149] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A data backup method, characterized in that: The method comprises: Detecting the backup status of the target service on the first system and generating first backup information; Acquire second backup information of the target service on the second system, wherein the target service is deployed on the first system and the second system; Calculate a first value related to the target service data to be backed up according to the first backup information and the second backup information; If the first value is greater than a first preset threshold, a backup instruction is generated and sent to the second system, where the backup instruction is used to instruct the second system to back up data of the target service.
2. The method according to claim 1, characterized in that A backup service is also deployed on the first system and the second system, and the backup service is used to detect the backup status of the corresponding system. The backup status of the target service on the first system is detected to generate first backup information, including: Using the backup service deployed in the first system as a primary backup service; The primary backup service detects a first quantity of application data of the target service backed up on the first system, and generates first backup information based on the first quantity.
3. The method according to claim 2, characterized in that The obtaining the second backup information of the target service on the second system includes: Sending notification information to the second system that the backup service deployed in the second system is used as a secondary backup service, so that the second system detects a second amount of application data of the target service backed up on the second system through the secondary backup service, and generates second backup information based on the second amount; The second backup information sent by the slave backup service is received by the primary backup service, and the slave backup service and the primary backup service are connected and communicated with each other via Ethernet.
4. The method according to claim 1, characterized in that: The calculating a first value related to the target service data to be backed up according to the first backup information and the second backup information includes: Compare the first backup information with the second backup information to obtain a second value; If the second value is greater than a second preset threshold, determining a calculation time of the second value; Starting from the calculation time, the average of all second values calculated within a preset time is counted to obtain the first value related to the target service data to be backed up.
5. A data backup method, characterized in that: The method comprises: Detecting the backup status of the target service on the second system to generate second backup information, and sending the second backup information to the first system, so that the first system detects the first backup information generated by the backup status of the target service on the first system, and calculates a first value related to the target service data to be backed up according to the first backup information and the second backup information, wherein the target service is deployed on the first system and the second system; A backup instruction sent by the first system is received, and data of the target service is backed up based on the backup instruction, wherein the backup instruction is generated by the first system when the first value is greater than a first preset threshold.
6. The method according to claim 5, characterized in that The target service is in an enabled state in the first system, and the target service is in a disabled state in the second system. After backing up data of the target service based on the backup instruction, the method includes: After the second system completes data backup of the target service, receiving a state switching instruction for the target service sent by the first system; In response to the state switching instruction, switching the state of the target service to an enabled state, so that the target service runs on the second system based on the backed-up data; The first system is notified to switch the state of the target service to a disabled state.
7. The method according to claim 5, characterized in that After backing up the data of the target service based on the backup instruction, the method further includes: During the data backup process, real-time detection of the backup status of the target service generates updated second backup information, and the updated second backup information is sent to the first system, so that the first system recalculates the first value according to the updated second backup information and the first backup information; An end instruction sent by the first system is received, and data backup of the target service is ended based on the end instruction, wherein the end instruction is generated by the first system when a recalculated first value is less than the first preset threshold.
8. A data backup device, characterized in that: The device comprises: A first detection module, used to detect the backup status of the target service on the first system and generate first backup information; an acquisition module, configured to acquire second backup information of the target service on a second system, wherein the target service is deployed on the first system and the second system; a calculation module, configured to calculate a first value related to the target service data to be backed up according to the first backup information and the second backup information; A generation module is used to generate a backup instruction and send it to the second system if the first value is greater than a first preset threshold value, wherein the backup instruction is used to instruct the second system to perform data backup on the target service.
9. A data backup device, characterized in that: The device comprises: a second detection module, configured to detect a backup situation of a target service on the second system to generate second backup information, and send the second backup information to the first system, so that the first system detects the first backup information generated by the backup situation of the target service on the first system, and calculates a first value related to the data to be backed up of the target service according to the first backup information and the second backup information, wherein the target service is deployed on the first system and the second system; A receiving module is used to receive a backup instruction sent by the first system, and perform data backup on the target service based on the backup instruction, wherein the backup instruction is generated by the first system when the first value is greater than a first preset threshold.
10. An electronic device, characterized in that: include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and is configured to be executed by the processor to implement the data backup method as claimed in any one of claims 1 to 7.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the data backup method according to any one of claims 1 to 7 are implemented.
