Configuration information management method, system and device, electronic equipment and medium

By setting a backup policy between the first processing device and the second processing device, backing up the configuration information in DataFlash, the problem of easy loss of configuration data is solved, and the stability and data security of the system are improved.

CN119597355APending Publication Date: 2025-03-11CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411624001.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

Configuration data stored in DataFlash in the prior art is easily lost and difficult to remediate, resulting in the security of configuration information being unable to be guaranteed.

Method used

By setting a backup policy between the first processing device and the second processing device, obtaining the configuration information to be stored and updating the backup flag bit, backing up the configuration information with the backup flag bit as the status to be backup to the second processing device, and using the backup flag to achieve the backup effect of the configuration information.

Benefits of technology

It effectively solves the problem that is difficult to remedy after the configuration information is lost, improves the system's operating stability and data security, and ensures the integrity and reliability of the configuration information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119597355A_ABST
    Figure CN119597355A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of vehicle configuration, and provides a configuration information management method, system and device, electronic equipment and a medium. The method comprises the steps that under the condition that configuration information to be stored is obtained, the configuration information to be stored serves as configuration information to be stored, and a backup flag bit corresponding to the configuration information is updated; and when it is monitored that the backup flag bit in the to-be-backed-up state exists, configuration information corresponding to the to-be-backed-up state is sent to the second processing device, so that the second processing device backs up the configuration information, and the backup flag bit corresponding to the configuration information is updated. According to the scheme, the configuration information is backed up in advance, and once the configuration information is lost due to errors, the configuration information in the second processing equipment can be called as backup update, so that the operation stability and the data security of the system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of vehicle configuration technology, and in particular to a configuration information management method, system, device, electronic device and medium. Background Art

[0002] Before leaving the factory, important configuration information will be written into the processor, which covers vehicle configuration, security authentication, fingerprint information, configuration code, and bootloader upgrade information. The writing of these configuration information can ensure the normal operation of the processor and the safety performance of the car. Configuration information is usually written into the processor in the form of a data identifier (DID), usually stored in the data flash DataFlash on the microcontroller unit (MCU) side, and uniformly managed by the Nvm non-volatile storage module on the MCU side.

[0003] The data in DataFlash may be lost when encountering static electricity, program error, power failure, etc. The built-in DataFlash storage performance of MCUs from different manufacturers varies, which further increases the uncertainty of data loss. When the data in DataFlash is lost, it cannot be remedied by remote upgrade, so the security of the configuration information cannot be guaranteed.

[0004] Therefore, how to provide a solution to the above technical problems is a problem that those skilled in the art need to solve. Summary of the invention

[0005] In view of this, embodiments of the present application provide a configuration information management method, system, device, electronic device, and medium to solve the problem in the prior art that configuration data stored in DataFlash is easily lost and difficult to remedy.

[0006] According to a first aspect of an embodiment of the present application, a configuration information management method is provided, which is applied to a first processing device, including:

[0007] When the configuration information to be stored is obtained, the configuration information to be stored is stored as the configuration information, and a backup flag corresponding to the configuration information is updated;

[0008] When the backup flag of the to-be-backed-up state is detected, the configuration information corresponding to the to-be-backed-up state is sent to the second processing device, so that the second processing device backs up the configuration information and updates the backup flag corresponding to the configuration information.

[0009] A second aspect of an embodiment of the present application provides a configuration information management system, including a first processing device and a second processing device;

[0010] The first processing device is used to execute the above method;

[0011] The second processing device is used to connect with the first processing device and respond to the first processing device.

[0012] According to a third aspect of an embodiment of the present application, a configuration information management device is provided, including:

[0013] A storage module, used for storing the configuration information to be stored as configuration information when the configuration information to be stored is obtained, and updating a backup flag corresponding to the configuration information;

[0014] The backup module is used to send the configuration information corresponding to the to-be-backed-up state to the second processing device when detecting the existence of the backup flag in the to-be-backed-up state, so that the second processing device backs up the configuration information and updates the backup flag corresponding to the configuration information.

[0015] According to a fourth aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0016] According to a fifth aspect of an embodiment of the present application, a readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0017] Compared with the prior art, the beneficial effects of the embodiments of the present application include at least the following: the embodiments of the present application will obtain the configuration information to be stored and update the backup flag, back up the configuration information with the backup flag in the to-be-backed-up state to the second processing device and then update the backup flag, and use the backup flag to achieve the backup effect of the configuration information. The present solution sets up a complete configuration information management, backs up the configuration information in advance, and once the configuration information is lost due to an error, the configuration information in the second processing device can be retrieved as a backup update, which effectively solves the problem that the original configuration information is difficult to remedy after it is lost, and improves the system's operating stability and data security. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0019] Figure 1 It is a schematic diagram of an application scenario of an embodiment of the present application;

[0020] Figure 2 It is a flowchart of a configuration information management method provided in an embodiment of the present application;

[0021] Figure 3 It is a flowchart of a specific configuration information management method provided in an embodiment of the present application;

[0022] Figure 4 It is a structural diagram of a configuration information management device provided in an embodiment of the present application;

[0023] Figure 5 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0024] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0025] A configuration information management method, system, device, electronic device, and medium according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.

[0026] Before leaving the factory, important configuration information will be written into the processor of the car or the car's processor. The writing of this configuration information can ensure the normal operation of the processor and the safety performance of the car. The configuration information is usually stored in the data flash DataFlash on the MCU side. The data in DataFlash may be lost when encountering static electricity, program runaway, power failure, etc. The built-in DataFlash storage performance of MCUs from different manufacturers varies, which exacerbates the uncertainty of data loss. When the data in DataFlash is lost, it cannot be remedied by remote upgrade, so the security of the configuration information cannot be guaranteed at present.

[0027] In this embodiment, when a hardware defect of DataFlash is known, a backup strategy is set between the first processing device and the second processing device, so that the configuration information in the first processing device and the second processing device are configured to be the same; if the configuration information in the first processing device is lost or erroneous, it can also be remedied by the configuration information in the second processing device, thereby improving the security of the configuration information and further improving the operating stability of the system.

[0028] Figure 1 1 is a schematic diagram of an application scenario of an embodiment of the present application. The application scenario may include a first processing device 101 and a second processing device 102. The first processing device 101 and the second processing device 102 are both hardware, which are electronic devices that process computing tasks based on internal programs. The first processing device 101 and the second processing device 102 are both provided with input / output ports for communicating with external devices and sending and receiving information. The first processing device 101 and the second processing device 102 can be connected and communicated with each other through the input / output ports.

[0029] Figure 2 It is a flowchart of a configuration information management method provided in an embodiment of the present application. Figure 2 The management method can be Figure 1 The first processing device performs Figure 2 As shown, the management method includes:

[0030] S201: When the configuration information to be stored is obtained, the configuration information to be stored is stored as the configuration information, and a backup flag corresponding to the configuration information is updated;

[0031] S202: When a backup flag in a to-be-backed-up state is detected, configuration information corresponding to the to-be-backed-up state is sent to a second processing device, so that the second processing device backs up the configuration information and updates the backup flag corresponding to the configuration information.

[0032] It is understandable that the first processing device or the second processing device in this embodiment can be implemented by an MCU, and the configuration information is stored in the DataFlash inside the MCU. The first processing device or the second processing device can also be implemented by a microprocessor unit (Micro Processing Unit, MPU). In addition, the first processing device and the second processing device can also be implemented by other types of processors, which are not limited here.

[0033] It can be understood that the backup flag is used to indicate whether the corresponding configuration information needs to be sent to another processor. In this embodiment, there are two channels for obtaining the configuration information to be stored. One is that it is sent from an external interface to the first processing device, and the first processing device stores the configuration information to be stored. At this time, the second processing device has not received the configuration information to be stored, so it is necessary to update the backup flag of this part of the configuration information to be stored to the state to be backed up to trigger the backup operation; the other is that it is sent from the second processing device to the first processing device, and the first processing device stores the configuration information to be stored. At this time, the second processing device has completed the backup of this part of the configuration information, so the first processing device sets the backup flag of this part of the configuration information to the backed up state, indicating that the backup has been completed.

[0034] Therefore, in some specific embodiments, the method for updating the backup flag includes:

[0035] When the configuration information to be stored is sent by the external interface, the backup flag is updated to the state to be backed up;

[0036] When the configuration information to be stored is sent by the second processing device, the backup flag is updated to a backed-up state.

[0037] It can be understood that the first processing device sends the configuration information corresponding to the state to be backed up to the second processing device, and the second processing device performs the backup operation according to the received configuration information, that is, stores it locally and marks the backup flag of this part of the configuration information as completed backup. If the configuration information is sent when the second processing device is not working normally, the second processing device cannot complete the backup operation. To ensure the reliable execution of the backup operation, the first processing device sends the configuration information to the second processing device, usually after confirming that the second processing device has completed power-on and the communication handshake is successful. Therefore, in some specific embodiments, the process of sending the configuration information corresponding to the state to be backed up to the second processing device includes:

[0038] When the communication handshake with the second processing device is successful, the configuration information corresponding to the state to be backed up is sent to the second processing device.

[0039] Furthermore, after completing the backup operation, the second processing device may return a backup completion message to the first processing device to inform the first processing device that the part of the configuration information has been backed up. The first processing device may confirm whether the backup is successful based on whether the backup completion message has timed out. If it has timed out, it is considered that the backup has failed and the action of sending the configuration information to the second processing device needs to be executed again. Therefore, in some specific embodiments, the process of updating the backup flag corresponding to the configuration information includes:

[0040] When the backup completion information is obtained within the preset waiting time, the backup flag corresponding to the configuration information is updated; the backup completion information is sent by the second processing device when the action of backing up the configuration information is completed;

[0041] After sending the configuration information corresponding to the state to be backed up to the second processing device, the method further includes:

[0042] If the backup completion information is not obtained within the preset waiting time, the process returns to executing the action of sending the configuration information corresponding to the state to be backed up to the second processing device.

[0043] It is understandable that the first processing device will use configuration information during normal operation. In order to ensure the validity of the configuration information, the configuration information can be verified before using it. The verification range can be part of the configuration information or all of the configuration information. Usually, more important and higher-level configuration information is selected for verification. The specific verification is determined according to the actual situation. The verification object is recorded as the target configuration information. When the target configuration information is stored, the verification is performed to generate the initial first verification result and the verification code flag. When the first processing device uses the configuration information, the target configuration information is verified, and the second verification result obtained is compared with the verification code flag to see if they are consistent. In fact, it is to determine whether the target configuration information has changed. If it has changed, it is necessary to obtain new backup configuration information from the second processing device to replace the target configuration information currently stored in the first processing device. Therefore, in some embodiments, the process of updating the backup flag corresponding to the configuration information also includes:

[0044] In the case where the configuration information to be stored includes the target configuration information, verifying the target configuration information to obtain a first verification result, and updating a corresponding verification code flag bit based on the first verification result;

[0045] Accordingly, the management method may also include:

[0046] When a verification instruction corresponding to the target configuration information is obtained, the target configuration information is verified to obtain a second verification result;

[0047] When the second verification result does not match the verification code flag, the corresponding backup configuration information in the second processing device is obtained and written.

[0048] It is understandable that in addition to verifying and obtaining the verification result, it is also possible to directly analyze whether there is an abnormality in the target configuration information, such as an abnormal character string. If there is an abnormality, it is also considered that the current target configuration information cannot be used directly, and it is necessary to obtain backup configuration information from the second processing device to replace the target configuration information. Therefore, in some specific embodiments, the management method may also include:

[0049] When the verification instruction corresponding to the target configuration information is obtained, if the target configuration information is abnormal, the corresponding backup configuration information in the second processing device is obtained and written.

[0050] It can be understood that the verification instructions here include verification instructions actively sent by the user interaction device to the first processing device, and also include verification instructions actively generated by the first processing device during operation. Usually, during the working cycle of the first processing device, some important configuration information needs to be verified. Therefore, after the first processing device is powered on, it can actively generate a verification instruction to verify the important configuration information.

[0051] The method of the embodiment of the present application will obtain the configuration information to be stored and update the backup flag, back up the configuration information with the backup flag in the to-be-backed-up state to the second processing device and then update the backup flag, and use the backup flag to achieve the backup effect of the configuration information. This scheme sets up a complete configuration information management, and backs up the configuration information in advance. Once the configuration information is lost due to an error, the configuration information in the second processing device can be retrieved as a backup update, which effectively solves the problem that the original configuration information is difficult to remedy after it is lost, and improves the operating stability and data security of the system.

[0052] According to the above description, the first processing device and the second processing device have similar processing ideas on storage and backup of configuration information, and the first processing device can also verify the configuration information and update it based on the configuration information in the second processing device. Therefore, in an exemplary embodiment, a specific configuration information management method performed by the first processing device may include:

[0053] When the configuration information to be stored sent by the external interface is obtained, the configuration information to be stored is stored as configuration information in the local storage area, the corresponding check code flag is updated based on the configuration information to be stored, and the local backup flag corresponding to the configuration information to be stored is updated to a state to be backed up;

[0054] In the case where a local backup flag in a state to be backed up is detected, the configuration information corresponding to the state to be backed up is sent to the second processing device, so that the second processing device backs up the configuration information and returns backup completion information when the backup is completed. In the case where the backup completion information is obtained, the local backup flag corresponding to the backup completion information is updated to a backed up state;

[0055] In the case of obtaining the configuration information to be backed up sent by the second processing device, performing a local backup operation, the local backup operation comprising: backing up the configuration information to be backed up as configuration information to a local storage area, updating a corresponding check code flag bit based on the configuration information to be backed up, and updating a local backup flag bit corresponding to the configuration information to be backed up to a backed up state;

[0056] In the case of obtaining a verification instruction corresponding to the target configuration information, a verification operation is performed, the verification operation including: determining the target configuration information in the configuration information of the local storage area based on the verification instruction, determining that the verification is passed when the target configuration information is consistent with the corresponding verification code flag, and outputting verification pass information; in the case that the target configuration information is inconsistent with the corresponding verification code flag, determining that the verification is not passed, obtaining the target configuration information through the second processing device, performing a local backup operation on the target configuration information as the configuration information to be backed up, and outputting verification pass information.

[0057] It is understandable that the first processing device and the second processing device can communicate with each other, and the communication basis can be used for bidirectional backup and verification backup of configuration information when it is stored. Here, the backup flag is marked as a local backup flag to further emphasize the meaning of local storage and backup to another processing device.

[0058] In a two-way backup, the external device can send the latest version of the configuration information to be stored to the first processing device through an external interface. The first processing device stores the configuration information to be stored in its own local storage area and sends it to the second processing device, so that the second processing device backs up the information to be stored. The external device can also send the latest version of the configuration information to be stored to the second processing device. The second processing device stores the configuration information to be stored in its own local storage area and sends it to the first processing device, so that the first processing device backs up the configuration information. During the backup process, the local backup flag is used as the basis for whether the configuration information needs to be backed up. The configuration information is stored in the local storage area and the check code flag is updated at the same time. The check code flag is used to check whether the configuration information has changed. According to the preset setting, the configuration information within the preset check range, such as the target configuration information, is provided with a check code flag. Other configuration information outside the preset check range does not need to set the check code flag. When updating and using the check code flag, only the configuration information with the check code flag set in advance is used. Other configuration information does not involve the update and use of the check code flag.

[0059] Verification backup is based on the premise that reliable configuration information exists in the second processing device after two-way backup. Verification analysis is performed on the target configuration information in the first processing device. The analysis result includes whether the target configuration information matches the corresponding verification code flag. If they match, the verification passes. If they do not match, the verification fails, proving that the current configuration information is erroneous or damaged. Relevant configuration information without errors or omissions is obtained from the second processing device to replace the local configuration information with errors or omissions, thereby improving the reliability of the configuration information.

[0060] The first processing device may be implemented by an MCU, in which case its local storage area is implemented by the DataFlash inside the MCU, and the second processing device may be implemented by an MPU. In addition, the first processing device and the second processing device may also be implemented by other types of processors, which are not limited here.

[0061] It can be understood that the relevant status of the storage action of the configuration information can be identified by the local backup flag: if the local backup flag is in the to-be-backed-up state, it means that the corresponding configuration information is currently only stored in the local storage area of ​​the first processing device and has not been backed up to the second processing device, and the corresponding configuration information should be sent to the second processing device for backup; if the local backup flag is in the backed-up state, it means that the corresponding configuration information is not only stored in the local storage area of ​​the first processing device, but also backed up to the second processing device.

[0062] It is understandable that each time the configuration information within the preset verification range is stored in the local storage area, the check code flag must be updated, specifically, the check code corresponding to the current configuration information is written into the check code flag. The check code here is used to indicate complete configuration information. When the check instruction is obtained later, the check operation can be performed, and the corresponding configuration information is analyzed by the check code to see if it is damaged. Specifically, the analysis principle of the check operation can use the Cyclic Redundancy Check (CRC) algorithm, and the check code is the CRC code of the corresponding configuration information. In addition to CRC, other algorithms can also be used to calculate the check code and implement the verification of the configuration information, which can be set according to actual needs.

[0063] It can be understood that if the configuration information is obtained through the external interface, the first processing device is the first storage object of the configuration information, and the configuration information has not yet been written to the second processing device. Therefore, the configuration information obtained from the external interface is called the configuration information to be stored. At this time, the first processing device stores the configuration information to be stored in the local storage area, updates the corresponding check code flag according to the specific data of the configuration information to be stored, and updates the local backup flag to the state to be backed up;

[0064] If it is detected that there is configuration information in the local storage area that is in a state to be backed up, the configuration information will be sent to the second processing device, and the second processing device will back up the configuration information and return backup completion information when the backup is completed; if backup completion information is received, it means that the corresponding configuration information has been backed up on the second processing device, and the corresponding local backup flag will be updated to the backed up state.

[0065] It can be understood that if the configuration information is obtained through the second processing device, the second processing device is the first storage object of the configuration information, and the configuration information has been stored in the second processing device. The second processing device sends the configuration information to the first processing device, expecting the first processing device to back up the configuration information, so the configuration information is called configuration information to be backed up, and the first processing device backs up by performing a local backup operation. The local backup operation specifically includes: storing the configuration information to be backed up in the local storage area, updating the corresponding verification code flag according to the specific data of the configuration information to be backed up, and because the configuration information to be backed up is sent from the second processing device, it means that the second processing device has stored the configuration information, so after the configuration information to be backed up in the first processing device is stored, the local backup flag is directly updated to the backed up state. After completing the local operation, the first processing device can also return a backup completion message to the second processing device to inform the second processing device that the corresponding configuration information has been backed up.

[0066] It can be understood that the verification instruction is used to trigger the verification operation and check whether the configuration information is wrong. The verification instruction may be an instruction generated when the first processing device performs a self-check on the configuration information after power-on, or it may be generated when the first processing device performs a self-check on the configuration information before reading the configuration information. The specific method of obtaining or generating the verification instruction can be set according to actual needs and is not limited here.

[0067] When the verification instruction is obtained, a verification operation is performed to verify whether the current verification code flag is consistent with the target configuration information. If they are consistent, the verification is passed and verification pass information is output. If they are not consistent, the verification fails. The backed up target configuration information is obtained through the second processing device and a local backup operation is performed. For the target configuration information that has just completed the local backup operation, the verification code flag is updated during the local backup operation. The target configuration information at the current moment is consistent with the verification code flag, and it is considered that the verification is passed, and the verification pass information can be directly output.

[0068] It can be understood that the configuration information to be stored, the configuration information to be backed up, and the target configuration information mentioned above all belong to subsets of the configuration information. Among them, the configuration information to be stored and the configuration information to be backed up can be an addition or replacement of the configuration information stored in the local storage area. The corresponding storage operation of the addition is a continuation, and the corresponding storage operation of the replacement is an overwrite. The specific operation needs to be determined according to the substantive content of the configuration information to be stored and the configuration information to be backed up. Among them, the target configuration information can be a relatively critical and important part of the configuration information. Only using part of the configuration information as the target configuration information for verification operation can improve the verification efficiency of the configuration information.

[0069] The method of the embodiment of the present application stores the configuration information to be stored sent by the external interface in the local storage area, and uses the local backup flag to achieve the backup effect of backing up the configuration information in the local storage area to the second processing device and storing the configuration information to be backed up sent by the second processing device locally. The present scheme also verifies whether the target configuration information in the local storage area is consistent with the verification code flag based on the verification instruction, and obtains reliable configuration information from the second processing device again in the event of inconsistency. The present scheme sets up a complete configuration information management, and performs double backup of the configuration information in advance. Once the configuration information is lost due to an error, the configuration information in the second processing device is retrieved as a backup update, which effectively solves the problem that the original configuration information is difficult to remedy after it is lost, and improves the system's operating stability and data security.

[0070] In some embodiments, considering that the power-on states of the first processing device and the second processing device are not synchronized, in order to improve the backup efficiency, it is possible to first check whether the communication state with the second processing device is normal. The normal communication state can be determined by successful communication handshake. At this time, the process of sending the configuration information corresponding to the state to be backed up to the second processing device includes:

[0071] When the communication handshake with the second processing device is successful, the configuration information corresponding to the state to be backed up is sent to the second processing device.

[0072] It can be understood that the communication handshake refers to the process of establishing a link and writing communication parameters between two communication devices before actual communication. The first processing device and the second processing device can communicate through the Remote Procedure Call (RPC) technology. In RPC communication, the specific steps of the communication handshake may include establishing a network connection, protocol confirmation, identity authentication, parameter writing, function negotiation, and synchronization. If the communication handshake is successful, the first processing device and the second processing device can start actual communication, and one end successfully sends information to the other end. If the handshake fails, there is no actual communication and the information cannot be sent successfully. Therefore, the action of sending the configuration information corresponding to the state to be backed up to the second processing device is only performed when the communication handshake is successful. If the communication handshake fails, the action is not performed, but the communication handshake is tried again, and the action is performed again when the communication handshake is successful.

[0073] Furthermore, in order to improve the success rate of sending configuration information, an effective preset waiting time can be set for the backup completion information, and the preset waiting time can be set to 5s or other time. The backup completion information is the response of the second processing device to the sending of the configuration information. Once the backup completion information is not received after the timeout, it is considered that the backup of the configuration information has failed, and the configuration information needs to be sent to the second processing device again to make the second processing device back up the configuration information. At this time, after sending the configuration information corresponding to the state to be backed up to the second processing device, it also includes:

[0074] If the backup completion information is not obtained within the preset waiting time, the process returns to executing the action of sending the configuration information corresponding to the state to be backed up to the second processing device.

[0075] It can be understood that the preset waiting time is the basis for judging the timeout of each sending action, and the previous sending action will not affect the judgment of whether the current sending has timed out. Therefore, each time the action of sending the configuration information corresponding to the backup state to the second processing device is executed, the preset waiting time is cleared and restarted.

[0076] Furthermore, for the same configuration information, if the backup completion information is not received within the time limit, the configuration information can be sent repeatedly, and the maximum number of repeated sending times can be set. When the number of repeated sending times reaches the maximum number and the backup completion information is not received within the preset waiting time, the sending of the configuration information to the second processing device is suspended, and the sending action is executed after the next power-on or after re-confirmation of the success of the communication handshake.

[0077] In some embodiments, in addition to analyzing whether the verification operation of the target configuration information is consistent with the corresponding verification code flag, it is also possible to analyze whether there is an abnormality in the specific string of the target configuration information. The abnormality is proposed relative to the normal requirements of the string. If the current string does not meet the normal requirements, the string is considered abnormal. For example, when the normal requirement of the string of a certain target configuration information is that the string only includes at least one of numbers and letters, once other content besides numbers and letters appears in the string, the string is considered to be abnormal. The normal requirement of the string may also be that the string includes numbers, letters and symbols. Once any of the numbers, letters or symbols is missing in the string, or other content besides numbers, letters and symbols appears in the string, the string can be considered to be abnormal. The normal requirements of the string can be specifically set according to the actual situation, and are not limited here. At this time, after determining the target configuration information in the configuration information of the local storage area based on the verification instruction, it also includes:

[0078] In the case where there is an abnormality in the character string of the target configuration information, determining that the verification fails, and performing an action of acquiring the target configuration information through the second processing device;

[0079] When there is no abnormality in the character string of the target configuration information, an action is performed when the target configuration information matches or does not match the corresponding check code flag.

[0080] In some embodiments, the first processing device may also obtain a read instruction to read the configuration information in the local storage area. Before reading, a verification instruction may be first generated to perform a verification operation. If the verification passes, the corresponding configuration information is output to the sender of the read instruction. Therefore, the method of this embodiment may also include:

[0081] In the case of obtaining a read instruction corresponding to the configuration information to be read, determining a corresponding verification instruction based on the read instruction, and performing a verification operation;

[0082] When verification pass information is obtained, the corresponding configuration information to be read is determined in the configuration information of the local storage area based on the read instruction and output.

[0083] Specifically, the read instruction may be sent by an external device to the first processing device through an external interface. The external device includes a diagnostic device Diag Client, such as a diagnostic instrument or a host computer. The corresponding configuration information is diagnosis-related configuration information. Usually, the diagnosis-related configuration information is in the form of a diagnostic data identifier. In this case, the read instruction includes a diagnostic request sent by the diagnostic device through an external interface. The configuration information to be read corresponding to the diagnostic request is a diagnostic data identifier.

[0084] In an exemplary embodiment, the first processing device is specifically an MCU, the second processing device is specifically a CPU, and the configuration information is configuration information related to automobile diagnosis, such as configuration information of TBOX, which can support dual-channel UDS diagnosis, namely, receiving UDS diagnosis requests via the CAN bus on the MCU side and receiving UDS diagnosis requests based on DOIP communication from the Ethernet on the MPU side. At this time, the process of bidirectional backup of configuration information can be as follows: Figure 3 Specifically, the process of backing up the MCU storage configuration information to the MPU includes:

[0085] 11. The external device sends the configuration information to be stored of the UDS protocol to the MCU through the CAN bus;

[0086] 12. The MCU obtains the configuration information to be stored, stores it in its own local storage area DataFlash, and updates the checksum flag and local backup flag accordingly;

[0087] 13. MCU sends the configuration information to be backed up to MPU;

[0088] 14. MPU obtains configuration information, backs up the configuration information to its own local storage area sqlite database, and returns backup completion information when the backup is completed;

[0089] 15. The MCU receives the backup completion information and updates the local backup flag.

[0090] Among them, Dcm in autosar Cp in MCU can continuously implement steps 11, 12, 13 and 15, wherein step 11 obtains the configuration information to be stored from the CANTp module, executes the corresponding write operation function to implement steps 12, 13 and 15, and in step 12, the write operation function controls the NVM module to write the configuration information to be stored into DataFlash, and then determines whether to execute step 13 by judging whether the RPC communication handshake is successful or not. If the handshake is successful, steps 13 and 15 are executed.

[0091] Since the system startup speeds of MCU and MPU are inconsistent, usually MCU starts faster and MPU starts slower, the actions of MCU storing the configuration information to be stored in the local storage area and sending it to MPU may not be able to be performed synchronously, so the local backup flag decouples the temporal continuity of steps 12 and 13 above, providing support for asynchronous backup. Specifically, for example, the MCU may store multiple configuration information while the MPU has not yet started, and there may be a situation where the MPU will not start successfully in this power-on cycle. In step 12, the MCU sets the local backup flag of the configuration information to the state to be backed up, and waits until the next power-on cycle to execute step 13.

[0092] It is understandable that, in addition to the write function, there is another task thread in the MCU that continuously monitors whether there is configuration information to be backed up, and executes step 13.

[0093] It is understandable that, considering the importance of some configuration information, when executing step 13 through Rpc, the MCU will start a software timer with a period of a preset waiting time, such as 5s. After the MCU sends the configuration information to the MPU, if no response (backup completion information) is received within 5s, step 13 will be repeated and the configuration information will be continuously retransmitted until a response is received.

[0094] After the MPU receives the configuration information sent by the MCU through Rpc, it will call the write interface of the sqlite database, write the corresponding DID to the corresponding location for storage, complete the backup, and return the backup completion information.

[0095] Similarly, the process of backing up the MPU storage configuration information to the MCU includes:

[0096] 21. The external device sends the configuration information to be stored of the UDS protocol to the MPU via Ethernet;

[0097] 22. The MPU stores the configuration information to be stored in its own local storage area sqlite database and updates the local backup flag;

[0098] 23. The MPU sends the configuration information of the backup state to the MCU;

[0099] 24. MCU obtains the configuration information, backs up the configuration information to its own local storage area DataFlash, and updates the checksum flag and local backup flag accordingly, and returns the backup completion information when the backup is completed;

[0100] 25. The MPU receives the backup completion information and updates the local backup flag.

[0101] It is understandable that before step 22, after the Doip server of the MPU receives the complete configuration information to be stored, it will call back the data receiving function provided by the UDS application layer to obtain the configuration information to be stored.

[0102] Normally, when the MPU is started and can normally receive the configuration information to be stored sent by the external device, the MCU has already started and is working. The MPU directly executes steps 22 and 23. Step 22 writes the configuration information to be stored into the sqlite database for storage and updates the local backup flag to the state to be backed up. Then, by judging the Rpc communication handshake success mark between the MCU and the MPU, it is determined whether to immediately send the configuration information to be backed up to the MCU for backup. If the handshake is successful, step 23 is executed immediately. Otherwise, wait for the handshake to succeed before synchronizing to the MCU.

[0103] Considering that the MPU may obtain multiple configuration information in a short period of time, and the MPU has uncertain factors such as abnormal power failure, the local backup flag on the MPU side will be used to trigger step 23. The specific task thread in the MPU periodically queries whether there is a local backup flag in the state to be backed up. If so, the 5s timer is started, and the corresponding configuration information is sent to the MCU through Rpc. After receiving the backup completion information from the MCU within 5s, the timer is turned off and the corresponding local backup flag is modified to the backed up state.

[0104] In step 24, the MCU obtains the configuration information sent by the MPU, directly calls the receiving callback function provided by the CanTp module, and passes the configuration information in UDS format to the Dcm module. The Dcm module writes the configuration information to the DataFlash of the MCU through the Nvm module, completes the backup of the configuration information, and returns the backup completion information.

[0105] It can be understood that, for the first processing device and the second processing device, a local storage area is provided inside each of them for storing configuration information and corresponding flag bits. It should be noted that each flag is used to identify the status of the configuration information in the local storage area of ​​the device where it is located, and has nothing to do with external configuration information.

[0106] It can be understood that for each configuration information, the corresponding flag data structure in the first processing device, in addition to the verification code flag and the local backup flag, may also include any one of the configuration code flag, the verification result flag, and the backup timeout flag. At this time, the flag data structure in the first processing device can be defined according to Table 1 below.

[0107] Table 1 Flag data structure in the first processing device

[0108] length name meaning 2byte DIDNum Configuration code flag 1byte UpdateFlag Local backup flag 4byte CheckSum Check code flag 1byte CheckResut Verification result flag 4byte TimerCnt Backup timeout flag

[0109] The configuration code flag bit DIDNum is the DID number. Each configuration information in the form of a data identifier has its own corresponding DID number, for example: the DID number for storing the VIN code is 0Xf190.

[0110] The local backup flag UpdateFlag is the backup flag. 1 indicates that the configuration information needs to be backed up to the MPU, and 0 indicates that it does not need to be backed up. When an external device sends an update to a certain configuration information to the MCU, the MCU replaces the original configuration information based on the configuration information and sets the UpdateFlag corresponding to the configuration information to 1. The UpdateFlag is not updated to 0 until the configuration information is backed up to the MPU.

[0111] The checksum flag bit CheckSum, the CRC32 checksum of the configuration information, is the checksum value calculated by the MCU when obtaining the configuration information sent by the external device. Taking the configuration information of TBOX as an example, at the beginning of each working cycle of TBOX, the MCU will generate a check instruction, and perform a check operation on some important configuration information related to the local TBOX as the target configuration information. If the CRC32 calculated value of the target configuration information is not equal to the CheckSum recorded in the data structure, it is considered that the target configuration information does not match the checksum, and the check fails, then the CheckResult of the configuration information will be set to 1, indicating that the check fails and data synchronization from the MPU is required.

[0112] CheckResult flag, 1 means check failed, 0 means check passed. In addition to the CRC32 check failed above, it will be set to 1, and some specific configuration information can also be used for basic judgment, such as: 0xF190 storing Vin code, the content of this DID is a string of numbers and letters, so when the content of this DID contains non-numbers and letters, it is judged that the DID data is abnormal, and the CheckResult of this DID will also be set to 1, which needs to be synchronized from the MPU.

[0113] The backup timeout flag TimerCnt, when Rpc successfully establishes communication, MCU determines whether the configuration information needs to be backed up to the MPU through the CheckResult of the data structure. If CheckResult is 1, the TimerCnt software timer will be turned on, the countdown period is 5s, and the configuration information to be backed up will be sent to the MPU through Rpc. When the MPU receives the configuration information, it will first write the configuration information to the SQLite database prepared in advance. If the write is successful, the backup completion information will be sent to the MCU, the MCU will stop the timer, and the CheckResult will be set to 0. If the MPU fails to write, feedback to the MCU backup failure information, or the MCU timer times out without receiving feedback from the MPU, the timer will be reset and the configuration information will be retransmitted to the MPU until the backup completion information is received.

[0114] Similarly, since the configuration information is verified on the first processing device side, the flag data structure in the second processing device usually includes a local backup flag, and may also include a configuration code flag and a timeout backup flag, the definition and working principle of which are the same as those in the first processing device.

[0115] In some embodiments, the configuration information may include configuration information in the form of a data identifier DID of the TBOX. By managing the DID data of the TBOX, problems such as the vehicle system being unable to access the Internet or be remotely controlled due to the loss of DID data in the vehicle-mounted TBOX can be solved.

[0116] It is understandable that the specific types of the first processing device and the second processing device, the specific settings of the local storage areas in the first processing device and the second processing device, the specific content of each type of configuration information, the specific execution of the sending action, the backup action and the verification action can all be set and adjusted according to actual conditions and user needs, and are not limited here.

[0117] The method of the embodiment of the present application stores the configuration information to be stored sent by the external interface in the local storage area, and uses the local backup flag to achieve the backup effect of backing up the configuration information in the local storage area to the second processing device and storing the configuration information to be backed up sent by the second processing device locally. The present scheme also verifies whether the target configuration information in the local storage area is consistent with the verification code flag based on the verification instruction, and obtains reliable configuration information from the second processing device again in the event of inconsistency. The present scheme sets up a complete configuration information management, and performs double backup of the configuration information in advance. Once the configuration information is lost due to an error, the configuration information in the second processing device is retrieved as a backup update, which effectively solves the problem that the original configuration information is difficult to remedy after it is lost, and improves the system's operating stability and data security.

[0118] It can be understood that the first processing device and the second processing device work in coordination with each other. Accordingly, the configuration information management method executed by the second processing device may include:

[0119] When the configuration information to be stored sent by the external interface is obtained, the configuration information to be stored is stored as configuration information in the local storage area, and the local backup flag corresponding to the configuration information to be stored is updated to a state to be backed up;

[0120] In the case where a local backup flag in a to-be-backed-up state is detected, an off-site backup operation is performed, the off-site backup operation comprising: sending configuration information corresponding to the to-be-backed-up state to the first processing device, so that the first processing device backs up the configuration information and returns backup completion information when the backup is completed, and in the case where the backup completion information is obtained, updating the local backup flag corresponding to the backup completion information to a backed-up state;

[0121] When the configuration information to be backed up sent by the first processing device is obtained, the configuration information to be backed up is backed up as configuration information to the local storage area, and the local backup flag corresponding to the configuration information to be backed up is updated to a backed up state;

[0122] In case of obtaining a backup request corresponding to the target configuration information sent by the first processing device, the target configuration information is determined in the configuration information of the local storage area, and a remote backup operation is performed based on the target configuration information.

[0123] It is understandable that this management method cooperates with the management method performed by the first processing device mentioned above. Similarly, the second processing device is connected to the external device through an external interface and can obtain the configuration information to be stored. The second processing device is connected to the first processing device and implements the above steps by obtaining and sending and receiving information. The backup request is a request sent to the second processing device when the first processing device performs a verification operation and finds that the verification of the target configuration information fails. Based on the backup request, the first processing device obtains the corresponding configuration information through the second processing device.

[0124] Furthermore, to improve the reliability of information transmission and reception, the action after obtaining the information sent by the first processing device is usually performed when the communication handshake with the first processing device is successful.

[0125] Furthermore, in order to improve the backup success rate of configuration information, a timeout repeated sending mechanism can be set, that is, if the backup completion information is not obtained within the preset waiting time, the action of sending the configuration information corresponding to the state to be backed up to the first processing device is returned.

[0126] The method of the embodiment of the present application stores the configuration information to be stored sent by the external interface in the local storage area, and uses the local backup flag to achieve the backup effect of backing up the configuration information in the local storage area to the first processing device and storing the configuration information to be backed up sent by the first processing device locally. The present solution also sends the target configuration information to the first processing device based on the backup request sent by the first processing device. The present solution sets up a complete configuration information management and performs double backup of the configuration information in advance. Once the configuration information in the first processing device is lost due to an error, a backup request can be sent to the second processing device to update the configuration information, which effectively solves the problem that the original configuration information is difficult to remedy after it is lost, and improves the operating stability and data security of the system.

[0127] All the above optional technical solutions can be combined in any way to form optional embodiments of the present application, and will not be described in detail here. It should be understood that the size of the sequence number of each step in the above embodiment does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.

[0128] Accordingly, the present application discloses a configuration information management system, including a first processing device and a second processing device;

[0129] The first processing device is used to perform any of the above methods;

[0130] The second processing device is used to connect with the first processing device and respond to the first processing device.

[0131] The details of the operations of the first processing device and the second processing device may refer to the specific description of the configuration information management method in the above embodiment, and will not be repeated here.

[0132] Among them, the management system of configuration information in this embodiment has the same technical effect as the management method of configuration information in the above embodiment, which will not be repeated here.

[0133] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0134] Figure 4 Schematic diagram of a configuration information management device provided in an embodiment of the present application. Figure 4 As shown, the management device includes:

[0135] The storage module 401 is used to store the configuration information to be stored as the configuration information when the configuration information to be stored is obtained, and update the backup flag corresponding to the configuration information;

[0136] The backup module 402 is used to send the configuration information corresponding to the to-be-backed-up state to the second processing device when detecting the existence of the backup flag in the to-be-backed-up state, so that the second processing device backs up the configuration information and updates the backup flag corresponding to the configuration information.

[0137] The device of the embodiment of the present application will obtain the configuration information to be stored and update the backup flag, back up the configuration information with the backup flag in the to-be-backed-up state to the second processing device and then update the backup flag, and use the backup flag to achieve the backup effect of the configuration information. This scheme sets up a complete configuration information management, and backs up the configuration information in advance. Once the configuration information is lost due to an error, the configuration information in the second processing device can be retrieved as a backup update, which effectively solves the problem that the original configuration information is difficult to remedy after it is lost, and improves the system's operating stability and data security.

[0138] In an exemplary embodiment, the storage module is further configured to:

[0139] In the case where the configuration information to be stored includes the target configuration information, verifying the target configuration information to obtain a first verification result, and updating a corresponding verification code flag bit based on the first verification result;

[0140] When a verification instruction corresponding to the target configuration information is obtained, the target configuration information is verified to obtain a second verification result;

[0141] When the second verification result does not match the verification code flag, the corresponding backup configuration information in the second processing device is obtained and written.

[0142] In an exemplary embodiment, the storage module is further configured to:

[0143] When the verification instruction corresponding to the target configuration information is obtained, if the target configuration information is abnormal, the corresponding backup configuration information in the second processing device is obtained and written.

[0144] In an exemplary embodiment, the method for updating the backup flag includes:

[0145] When the configuration information to be stored is sent by the external interface, the backup flag is updated to the state to be backed up;

[0146] When the configuration information to be stored is sent by the second processing device, the backup flag is updated to a backed-up state.

[0147] In an exemplary embodiment, the backup module is specifically used for:

[0148] When the communication handshake with the second processing device is successful, the configuration information corresponding to the state to be backed up is sent to the second processing device.

[0149] In an exemplary embodiment, the backup module is specifically used for:

[0150] When the backup completion information is obtained within the preset waiting time, the backup flag corresponding to the configuration information is updated; the backup completion information is sent by the second processing device when the action of backing up the configuration information is completed;

[0151] If the backup completion information is not obtained within the preset waiting time, the process returns to executing the action of sending the configuration information corresponding to the state to be backed up to the second processing device.

[0152] Figure 5 Schematic diagram of an electronic device 5 provided in an embodiment of the present application. Figure 5 As shown, the electronic device 5 of this embodiment includes: a processor 501, a memory 502, and a computer program 503 stored in the memory 502 and executable on the processor 501. When the processor 501 executes the computer program 503, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 501 executes the computer program 503, the functions of the modules / units in the above-mentioned device embodiments are implemented.

[0153] The electronic device 5 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 5 may include, but is not limited to, a processor 501 and a memory 502. Those skilled in the art will appreciate that Figure 5 The electronic device 5 is merely an example and does not limit the electronic device 5 , and may include more or less components than those shown in the figure, or different components.

[0154] The processor 501 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0155] The memory 502 may be an internal storage unit of the electronic device 5, for example, a hard disk or memory of the electronic device 5. The memory 502 may also be an external storage device of the electronic device 5, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 5. The memory 502 may also include both an internal storage unit of the electronic device 5 and an external storage device. The memory 502 is used to store computer programs and other programs and data required by the electronic device.

[0156] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments 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 above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.

[0157] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium, such as a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, which may be in source code form, object code form, executable file or some intermediate form. The readable storage medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0158] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for managing configuration information, characterized in that: Applicable to the first processing device, comprising: When the configuration information to be stored is obtained, the configuration information to be stored is stored as the configuration information, and a backup flag corresponding to the configuration information is updated; When the backup flag in the to-be-backed-up state is detected, the configuration information corresponding to the to-be-backed-up state is sent to a second processing device, so that the second processing device backs up the configuration information and updates the backup flag corresponding to the configuration information.

2. The method according to claim 1, characterized in that The process of updating the backup flag bit corresponding to the configuration information further includes: In a case where the configuration information to be stored includes target configuration information, verifying the target configuration information to obtain a first verification result, and updating a corresponding verification code flag bit based on the first verification result; The method further comprises: When a verification instruction corresponding to the target configuration information is obtained, verifying the target configuration information to obtain a second verification result; When the second verification result does not match the verification code flag, the corresponding backup configuration information in the second processing device is obtained and written.

3. The method according to claim 2, characterized in that The method further comprises: In the case where a verification instruction corresponding to the target configuration information is obtained, if the target configuration information is abnormal, the corresponding backup configuration information in the second processing device is obtained and written.

4. The method according to claim 1, characterized in that The method for updating the backup flag bit includes: In the case where the configuration information to be stored is sent by an external interface, the backup flag is updated to a state to be backed up; In the case where the configuration information to be stored is sent by the second processing device, the backup flag is updated to a backed-up state.

5. The method according to claim 1, characterized in that The process of sending the configuration information corresponding to the to-be-backed-up state to a second processing device includes: When the communication handshake with the second processing device is successful, the configuration information corresponding to the to-be-backed-up state is sent to the second processing device.

6. The method according to any one of claims 1 to 5, characterized in that: The process of updating the backup flag bit corresponding to the configuration information includes: When the backup completion information is obtained within the preset waiting time, the backup flag corresponding to the configuration information is updated; the backup completion information is sent by the second processing device when the action of backing up the configuration information is completed; After sending the configuration information corresponding to the state to be backed up to the second processing device, the method further includes: In the case that the backup completion information is not obtained within the preset waiting time, the process returns to executing the action of sending the configuration information corresponding to the to-be-backed-up state to the second processing device.

7. A configuration information management system, characterized in that: including a first processing device and a second processing device; The first processing device is used to perform the method according to any one of claims 1 to 6; The second processing device is used to connect to the first processing device and respond to the first processing device.

8. A configuration information management device, characterized in that: include: A storage module, configured to, when the configuration information to be stored is obtained, store the configuration information to be stored as configuration information and update a backup flag corresponding to the configuration information; The backup module is used to send the configuration information corresponding to the to-be-backed-up state to the second processing device when the backup flag is detected to enable the second processing device to back up the configuration information and update the backup flag corresponding to the configuration information.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.