Multi-master control data storage and interaction method and device, equipment and medium

Through the multi-main data storage and interaction method, the problem of insufficient reliability of low-cost microcontroller units in data storage and interaction is solved, data consistency and security are achieved, and the stability and fault tolerance of the system are improved.

CN120215827APending Publication Date: 2025-06-27SHENZHEN EMEET TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Low-cost microcontroller units have insufficient reliability in data storage and interaction, which makes it difficult to implement data loss, overwrite and complex error handling mechanisms.

Method used

The multi-master data storage and interaction method is adopted to read and verify the configuration verification value of the storage area, identify valid data and synchronize the data between the main storage area and the backup storage area to ensure the consistency and security of the data.

Benefits of technology

It improves the reliability of data storage and interaction, ensures the consistency and synchronization of data between different storage areas, enhances the stability and fault tolerance of the system, and reduces development costs and labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120215827A_ABST
    Figure CN120215827A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-master-control data storage and interaction method and device, equipment and a medium, and relates to the technical field of data storage, and the method comprises the steps: reading preset configuration check values corresponding to a plurality of storage areas in a first master control processor; checking whether the storage verification value in each storage area is consistent with the corresponding configuration verification value or not to obtain a corresponding verification result; effective data are determined according to verification results of all the storage areas, the corresponding storage areas are updated according to the effective data, the effective data are updated to a preset global configuration array of the first main control processor, all the storage areas comprise a main storage area and a backup storage area, and the first main control processor is in communication connection with the second main control processor. According to the invention, the reliability of the storage and interaction technology of the low-cost microcontroller unit is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of data storage, and particularly to a multi-master data storage and interaction method, device, equipment, and medium. Background Art

[0002] In modern electronic devices and embedded systems, the microcontroller unit is a core component, and its performance and storage capacity are crucial to the device functions. Due to cost and resource limitations during design, many low-cost microcontroller units have obvious technical bottlenecks in data storage and interaction. On the one hand, the data storage limitations are significant. The memory is small, making it difficult to meet the growing data storage requirements. When processing complex data, data loss or overwriting is likely to occur, affecting the system stability and reliability. On the other hand, the code volume is limited, and the memory and computing power are insufficient, resulting in difficulties for developers to add complex error handling mechanisms or data backup schemes. The code storage space is scarce, and it is difficult to implement efficient data processing and management strategies. In addition, low-cost microcontroller units lack a data double-backup mechanism. In case of anomalies (such as power failures, hardware errors, etc.), the stored data may not be recoverable, leading to irreversible data loss, directly affecting the device functions, usage value, and reliability. With the popularization of smart devices and the expansion of application fields, the market has put forward higher requirements for the data storage and interaction capabilities of microcontroller units. The reliability of the existing storage and interaction technologies of low-cost microcontroller units is insufficient to adapt to this trend, restricting their promotion and application in high-performance application fields. Summary of the Invention

[0003] The main purpose of this application is to provide a multi-master data storage and interaction method, device, equipment, and medium, aiming to improve the reliability of the storage and interaction technologies of low-cost microcontroller units.

[0004] To achieve the above purpose, this application proposes a multi-master data storage and interaction method, including:

[0005] Reading the configuration check values corresponding to multiple storage areas in a preset first master processor;

[0006] Checking whether the storage check values in each storage area are consistent with the corresponding configuration check values to obtain the corresponding check results;

[0007] Determining valid data according to the check results of each storage area, updating the valid data to the corresponding storage area, and updating the valid data to the global configuration array of the preset first master processor, where each storage area includes a main storage area and a backup storage area, and the first master processor is communicatively connected to the second master processor.

[0008] In one embodiment, the step of checking whether the storage check values in each storage area are consistent with the corresponding configuration check values to obtain the corresponding check results includes:

[0009] If the storage verification value in the storage area is consistent with the corresponding configuration verification value, determine whether there is a newly added saved configuration item in the operating area of the first main control processor;

[0010] If there is a newly added saved configuration item in the operating area, update the default value of the saved configuration item to the storage area and determine that the verification result of the storage area is verification successful.

[0011] In one embodiment, the step of checking whether the storage verification value in each storage area is consistent with the corresponding configuration verification value to obtain the corresponding verification results respectively includes:

[0012] If the storage verification value in the storage area is inconsistent with the corresponding configuration verification value, determine that the verification result of the storage area is verification failed.

[0013] In one embodiment, the step of determining valid data according to the verification results of each storage area and updating to the corresponding storage area according to the valid data includes:

[0014] If the verification result of the main storage area is successful and the verification result of the backup storage area is failed, determine the data in the main storage area as valid data;

[0015] Update the backup storage area according to the valid data.

[0016] In one embodiment, the step of determining valid data according to the verification results of each storage area and updating to the corresponding storage area according to the valid data further includes:

[0017] If the verification result of the main storage area is failed and the verification result of the backup storage area is successful, determine the data in the backup storage area as valid data;

[0018] Update the main storage area according to the valid data.

[0019] In one embodiment, the step of determining valid data according to the verification results of each storage area and updating to the corresponding storage area according to the valid data further includes:

[0020] If the verification result of the main storage area is successful and the verification result of the backup storage area is successful, check whether the storage verification value of the main storage area is consistent with the storage verification value of the backup storage area;

[0021] If the storage verification value of the main storage area is consistent with the storage verification value of the backup storage area, determine the data in the main storage area as valid data and update the valid data to the global configuration array;

[0022] If the storage verification value of the main storage area is inconsistent with the storage verification value of the backup storage area, determine the data in the main storage area as valid data and update the backup storage area according to the valid data.

[0023] In one embodiment, the multi-master data storage and interaction method further includes:

[0024] If the verification result of the main storage area is failed and the verification result of the backup storage area is failed, then determine the preset global default data as the valid data;

[0025] Update the valid data to the global configuration array.

[0026] In addition, to achieve the above object, the present application also proposes a multi-master data storage and interaction device, and the multi-master data storage and interaction device includes:

[0027] A reading module, configured to read the configuration verification values corresponding to multiple storage areas in a preset first master processor;

[0028] A verification module, configured to check whether the storage verification values in each storage area are consistent with the corresponding configuration verification values, and obtain the corresponding verification results respectively;

[0029] A data update module, configured to determine the valid data according to the verification results of each storage area, update the valid data to the corresponding storage area, and update the valid data to the global configuration array of the preset first master processor, where each storage area includes a main storage area and a backup storage area, and the first master processor is communicatively connected to the second master processor.

[0030] In addition, to achieve the above object, the present application also proposes a multi-master data storage and interaction device, and the device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the multi-master data storage and interaction method as described above.

[0031] In addition, to achieve the above object, the present application also proposes a medium, the medium is a computer-readable storage medium, and a computer program is stored on the medium, and when the computer program is executed by a processor, it implements the steps of the multi-master data storage and interaction method as described above.

[0032] In addition, to achieve the above object, the present application also provides a product, the product is a computer program product, the computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps of the multi-master data storage and interaction method as described above.

[0033] One or more technical solutions proposed by the present application have at least the following technical effects:

[0034] This application reads the configuration verification values corresponding to multiple storage areas in a preset first main control processor. Through this operation, a benchmark can be provided for subsequent data verification to ensure the accuracy and integrity of the data. It checks whether the storage verification values in each storage area are consistent with the corresponding configuration verification values to obtain the corresponding verification results. This process can effectively identify whether there are errors or losses in the data in the storage area and ensure the reliability of the data. According to the verification results of each storage area, valid data is determined, updated to the corresponding storage area, and the valid data is updated to the global configuration array of the preset first main control processor and synchronized to the second main control processor as needed. Among them, each storage area includes a main storage area and a backup storage area, and the first main control processor is communicatively connected to the second main control processor. This series of operations can not only ensure the consistency and synchronization of data between different storage areas, but also improve the security and fault tolerance of data through the backup storage area. At the same time, it simplifies the data management process, reduces the development cost and labor cost, improves the overall performance and stability of the system, effectively solves the technical bottleneck problems of low-cost microcontroller units in data storage and interaction, better meets the requirements of complex application scenarios for data storage and interaction, and improves the reliability of low-cost microcontroller units in data storage and interaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The accompanying drawings herein are incorporated into and constitute a part of this specification, showing embodiments consistent with the present application and, together with the specification, are used to explain the principles of the present application.

[0036] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the accompanying drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0037] Figure 1 It is a schematic flowchart of the first embodiment of the multi-master data storage and interaction method of the present application;

[0038] Figure 2 It is a flowchart of the implementation of the multi-master data storage and interaction method of the present application;

[0039] Figure 3 It is a data read flowchart of the multi-master data storage and interaction method of the present application;

[0040] Figure 4 It is a data write flowchart of the multi-master data storage and interaction method of the present application;

[0041] Figure 5 It is a full flowchart of the multi-master data storage and interaction method of the present application;

[0042] Figure 6 It is a schematic diagram of the module structure of the multi-master data storage and interaction device according to an embodiment of the present application;

[0043] Figure 7 It is a schematic diagram of the device structure of the hardware operating environment involved in the multi-master data storage and interaction method according to an embodiment of the present application.

[0044] The implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. Specific embodiments

[0045] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0046] In order to better understand the technical solutions of the present application, the following will be described in detail with reference to the accompanying drawings of the specification and specific embodiments.

[0047] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device, a terminal system, etc. that can implement the above functions. The following takes the system as an example to illustrate this embodiment and the following embodiments.

[0048] Based on this, this embodiment provides a multi-master data storage and interaction method, referring to Figure 1 , Figure 1 It is a schematic flowchart of the multi-master data storage and interaction method of the present application. The multi-master data storage and interaction method includes steps S10 to S30:

[0049] Step S10, read the configuration check values corresponding to multiple storage areas in the preset first master processor;

[0050] Step S20, check whether the storage check values in each storage area are consistent with the corresponding configuration check values to obtain the corresponding check results;

[0051] Step S30, determine the valid data according to the check results of each storage area, update the valid data to the corresponding storage area, and update the valid data to the global configuration array of the preset first master processor. Each storage area includes a main storage area and a backup storage area, and the first master processor is communicatively connected to the second master processor.

[0052] It should be noted that in this embodiment, the first main control processor refers to one of the main processor units in the system. It contains multiple storage areas, and each storage area is preset with a configuration verification value for verifying the integrity of the stored data. These configuration verification values are set for each storage area during the initialization phase to ensure that the data has not been tampered with or damaged. The storage verification value is a value calculated by a specific algorithm based on the actual data stored in the storage area and is used to compare with the configuration verification value to determine the validity of the data. The second main control processor is another processor unit responsible for receiving the valid data from the first main control processor. If the second main control processor needs to update the configuration data, it can be synchronized to the global configuration array of the first main control through the connection with the first main control. The global configuration array is a place where system parameters are centrally stored and allows external applications to read the data therein.

[0053] First, when the system is powered on, the first main control processor reads the preset configuration verification values from its multiple storage areas. These storage areas include the main storage area and the backup storage area, and each storage area has a storage verification value calculated based on its internal data. Next, for each storage area, the system checks whether the storage verification value matches the preset configuration verification value. This process compares the two values through a preset comparison algorithm to obtain the verification result. If the two are consistent, the data in that storage area is considered valid; otherwise, there may be problems. Subsequently, the system determines which data is valid based on the verification results of each storage area and updates these valid data to the global configuration array of the first main control processor. If status synchronization is required, it can be synchronized to the second main control processor through a serial port connection at this time, and the valid data is also updated to the corresponding storage area. For example, the valid data obtained from the main storage area is updated to the backup storage area, and the valid data obtained from the backup storage area is updated to the main storage area.

[0054] Exemplarily, referring to Figure 2 , Figure 2This is the implementation flowchart of the multi-master data storage and interaction method of this application. The user operates through the host computer on the PC (Personal Computer) side, clicks the corresponding function button, and sends a status setting instruction to the device. The request is transmitted to the first master processor at the device end through USB (Universal Serial Bus) connection. Ensure that the USB connection is normal to ensure the accurate transmission of data requests. After receiving the configuration request, the first master processor updates the global configuration array in the first master and forwards the request to the second master processor through the serial port as needed. The serial communication method effectively guarantees the reliable transmission of data. The first master processor parses the received request and stores the specified data in its internal storage area in a double-backup manner according to the processing logic of this embodiment. After the storage is completed, the first master processor returns the stored data to the second master processor for further processing through the serial port as needed to ensure the integrity of the data during the transmission process. The first master processor uses the private stream protocol to transmit the data to the PC-side host computer software being monitored.

[0055] Exemplarily, referring to Figure 3 , when performing a write operation, the system will obtain the configuration items of the first master processor and perform processing of writing to the main storage area and the backup storage area in the data storage module according to the content of the configuration items. Referring to Figure 4 , when performing a read operation, the system will obtain the configuration items of the first master processor and perform processing of reading the global configuration array in the data storage module according to the content of the configuration items.

[0056] This embodiment can be further optimized by introducing a real-time monitoring mechanism to dynamically adjust the verification frequency of the storage area, especially increasing the verification times before and after performing critical tasks to ensure the security and reliability of the data. For example, in an industrial automation scenario, when the device is about to perform an important operation, automatically increase the data verification frequency to ensure the integrity and accuracy of the data during the operation. In addition, machine learning algorithms can be used to analyze historical verification results, predict possible problems, and take measures in advance to avoid data loss. This method not only enhances the adaptability of the system but also improves the flexibility and response speed of data processing.

[0057] This embodiment reads the configuration verification values corresponding to multiple storage areas in a preset first main control processor; through this operation, a benchmark can be provided for subsequent data verification to ensure the accuracy and integrity of the data; it checks whether the storage verification values in each storage area are consistent with the corresponding configuration verification values to obtain the corresponding verification results; this process can effectively identify whether there are errors or losses in the data in the storage area to ensure the reliability of the data; based on the verification results of each storage area, valid data is determined, updated to the corresponding storage area, and the valid data is updated to the global configuration array of the preset first main control processor. Among them, each storage area includes a main storage area and a backup storage area, and the first main control processor is communicatively connected to the second main control processor; this series of operations can not only ensure the consistency and synchronization of data between different storage areas, but also improve the security and fault tolerance of the data through the backup storage area. At the same time, it simplifies the data management process, reduces the development cost and labor cost, improves the overall performance and stability of the system, effectively solves the technical bottleneck problems of low-cost microcontroller units in data storage and interaction, better meets the requirements of complex application scenarios for data storage and interaction, and improves the reliability of low-cost microcontroller units in data storage and interaction.

[0058] Based on Embodiment 1 of the present application, in Embodiment 2 of the present application, the same or similar content as that in the above Embodiment 1 can be referred to the above introduction and will not be elaborated hereinafter. On this basis, the steps of Step S20 further include steps A11 to A12:

[0059] Step A11, if the storage verification value in the storage area is consistent with the corresponding configuration verification value, then determine whether there is a newly added saved configuration item in the operation area of the first main control processor;

[0060] Step A12, if there is a newly added saved configuration item in the operation area, then update the default value of the saved configuration item to the storage area and confirm that the verification result of the storage area is a successful verification.

[0061] It should be noted that in this embodiment, the storage verification value is a value corresponding to the data actually saved in the storage area, which is used to compare with the configuration verification value calculated by a certain agreed rule for the preset configuration item to determine the validity of the data. The configuration verification value is a value set for each storage area in the initialization stage to ensure that the data has not been tampered with or damaged. The newly added saved configuration item refers to the new configuration items added by the user or the system according to needs during the operation of the system, and these configuration items usually have default values. If the storage verification value is consistent with the configuration verification value, it indicates that the data in the storage area has not been damaged, and it can be further checked whether there are new configuration items that need to be updated.

[0062] The system checks whether the stored verification value in the storage area is consistent with the configured verification value. This process is completed by comparing the two values through a specific algorithm to obtain the verification result. If the two are consistent, the data in the storage area is considered valid and not tampered with. Next, the system determines whether there are new saved configuration items in the operating area of the first master processor. If there are new configuration items, the system updates the default values of these configuration items to the storage area and confirms that the verification result of the storage area is successful. For example, in the initialization stage, the global configuration array a and the backup parameter array b have been set up. When new configuration items are detected, the system writes the default values of these configuration items into the corresponding arrays to ensure that the latest state of the system is saved. This process not only ensures the integrity and consistency of the data but also enables the system to adapt to changing requirements.

[0063] Furthermore, this embodiment can be optimized by introducing an intelligent prediction mechanism. Using historical data and machine learning algorithms to analyze which configuration items are more likely to be frequently modified or added, and preparing the corresponding default values in advance to improve the response speed and efficiency of the system. For example, in a smart home scenario, when the device recognizes that the user is accustomed to adding new sensor configurations, the system can pre-load the relevant default configuration items to reduce the real-time processing time. In addition, distributed storage technology can also be considered to disperse the configuration items across multiple nodes to enhance the fault tolerance and data security of the system.

[0064] This embodiment ensures the validity and integrity of the data by checking the consistency between the stored verification value and the configured verification value in the storage area. On this basis, it further checks and updates the newly added saved configuration items, enabling the system to dynamically adapt to new requirements and improving flexibility and response speed.

[0065] In a feasible implementation manner, the steps of step S20 further include step A21:

[0066] Step A21, if the stored verification value in the storage area is inconsistent with the corresponding configured verification value, determine that the verification result of the storage area is a verification failure.

[0067] It should be noted that when the stored verification value is inconsistent with the configured verification value, it indicates that there may be problems with the data in the storage area, such as data loss, damage, or illegal modification.

[0068] First, the system calculates the storage check value of the data in the storage area and compares it with the preset configuration check value. If the two values do not match, the system determines that the check result of the storage area is a failure. This means that the data in the storage area may have been damaged or unauthorized changes have occurred. For example, during the data synchronization process of the first main control processor, if the storage check value of a certain storage area fails to match the configuration check value, it indicates that there may be data anomalies or other problems. At this time, the system will not use the data in this storage area for any further operations, but mark this area as a check failure state. This step is crucial for ensuring the stability of the system and the reliability of the data, as it can prevent system failures or incorrect results caused by using unreliable or damaged data.

[0069] This embodiment can be further optimized by introducing intelligent data analysis technology. Using historical check data, the system can predict which storage areas are more likely to have check failures and take preventive measures in advance, such as increasing redundant backups or adjusting the data update strategy. For example, in an industrial automation environment, the data of certain key sensors needs to be highly reliable. The system can perform additional checks and backups on this data to ensure that the production process is not affected even in case of unexpected situations. In addition, by adopting distributed storage and multi-path transmission technologies, the security and stability of data transmission can be enhanced, reducing data check failures caused by single-point failures.

[0070] Through the consistency check of the storage check value and the configuration check value in the storage area, this embodiment can timely detect and mark the problematic data storage areas, avoiding the risk of using unreliable data. This method significantly improves the stability of the system and the reliability of the data, reducing system failures caused by data damage or loss.

[0071] Based on Embodiment 1 or Embodiment 2 of the present application, in Embodiment 3 of the present application, the same or similar content as that in Embodiment 1 or Embodiment 2 above can be referred to the above introduction and will not be elaborated hereinafter. The steps of Step S30 further include steps B11 to B12:

[0072] Step B11, if the check result of the main storage area is successful and the check result of the backup storage area is a failure, then determine the data in the main storage area as valid data;

[0073] Step B12, update the backup storage area according to the valid data.

[0074] It should be noted that if the check result of the main storage area shows success while the check result of the backup storage area shows failure, it is considered that the data in the main storage area is valid, and these valid data need to be updated to the backup storage area and the global configuration array to ensure data consistency and integrity.

[0075] The system checks the verification results of the primary storage area and the backup storage area. If the verification result of the primary storage area is successful, it indicates that the data in this area is intact and can be trusted. On the contrary, if the verification result of the backup storage area is failed, it means that the backup data may be damaged or there are errors. In this case, the system determines the data in the primary storage area as valid data. Next, the system performs a data update operation to synchronize this valid data to the backup storage area to ensure that the backup data is repaired and updated. At the same time, this valid data will also be written into the global configuration array of the first master processor so that external applications can obtain the latest and reliable data by accessing the global configuration array.

[0076] Furthermore, this embodiment can be further optimized by introducing an automatic data repair mechanism. When it is detected that the verification of the backup storage area fails, not only the data is updated, but also the cause of the verification failure can be analyzed, and measures can be taken to prevent similar problems from occurring again. In addition, the distributed ledger technology is adopted to record each data update and verification situation, enhancing data transparency and traceability.

[0077] This embodiment effectively identifies the valid data by comparing the verification results of the primary storage area and the backup storage area, and updates it to the backup storage area and the global configuration array in a timely manner, ensuring data consistency and integrity. By utilizing the dual-backup mechanism, the stability of the system and the security of the data are enhanced.

[0078] In a feasible implementation manner, the steps of step S30 further include steps B21 to B22:

[0079] Step B21, if the verification result of the primary storage area is failed and the verification result of the backup storage area is successful, then determine the data in the backup storage area as valid data;

[0080] Step B22, update the primary storage area according to the valid data.

[0081] It should be noted that in this embodiment, if the verification result of the primary storage area shows failure while the verification result of the backup storage area shows success, it is considered that the data in the backup storage area is valid, and these valid data need to be updated to the primary storage area and the global configuration array to ensure data consistency and integrity.

[0082] If the verification result of the main storage area fails, it indicates that the data in this area may be incorrect or have been tampered with; while the verification result of the backup storage area is successful, it indicates that the backup data is intact and can be trusted. In this case, the system will confirm the data in the backup storage area as valid data. Next, the system performs a data update operation to synchronize this valid data to the main storage area to repair possible data problems. At the same time, this valid data will also be written into the global configuration array of the first main control processor so that external applications can access the latest and reliable data. This process utilizes a dual-backup mechanism to ensure that even when a problem occurs in one storage area, it can be quickly restored and data consistency can be maintained.

[0083] In this embodiment, by comparing the verification results of the main storage area and the backup storage area, valid data is effectively identified and updated to the main storage area and the global configuration array in a timely manner, ensuring data consistency and integrity.

[0084] In a feasible implementation manner, the multi-main-control data storage and interaction method further includes steps B31 to B32:

[0085] Step B31, if the verification result of the main storage area fails and the verification result of the backup storage area fails, then determine the preset global default data as valid data;

[0086] Step B32, update the valid data to the global configuration array.

[0087] It should be noted that the global default data is a set of standard data preset during system initialization and is used as a safety net for the system when the data in all storage areas is unavailable. If the verification results of both the main storage area and the backup storage area fail, it is considered that the data in both these storage areas has problems, and at this time, the global default data needs to be used as valid data.

[0088] The system will verify the main storage area and the backup storage area, calculate their respective storage verification values and compare them with the preset configuration verification values. If both verification results fail, it indicates that the data in these two storage areas may be incorrect or have been tampered with. In this case, the system will confirm the preset global default data as valid data. These global default data are usually set during the system initialization phase and stored in the global configuration array. Next, the system performs a data update operation to write this valid data into the global configuration array to ensure that even when the data in both the main storage area and the backup storage area is unavailable, the system can still operate normally and provide services.

[0089] Furthermore, this embodiment can be optimized by introducing a dynamic data recovery mechanism. When it is detected that all storage area verifications fail, not only the global default data is used, but also an optimal alternative data set can be automatically generated in combination with historical data and user habits. In addition, the distributed storage technology is adopted to disperse the key data among multiple nodes, enhancing the fault tolerance and data security of the system and reducing the risk brought by single point of failure.

[0090] This embodiment utilizes the preset default data to ensure that the system still has basic functions in extreme cases and avoids complete system failure due to data loss.

[0091] In a feasible implementation manner, the steps of step S30 further include steps B41 to B43:

[0092] Step B41, if the verification result of the main storage area is successful and the verification result of the backup storage area is successful, then verify whether the storage verification value of the main storage area is consistent with the storage verification value of the backup storage area;

[0093] Step B42, if the storage verification value of the main storage area is consistent with the storage verification value of the backup storage area, then determine the data in the main storage area as valid data and update the valid data to the global configuration array;

[0094] Step B43, if the storage verification value of the main storage area is inconsistent with the storage verification value of the backup storage area, then determine the data in the main storage area as valid data and update the backup storage area according to the valid data.

[0095] It should be noted that if the verification results of both the main storage area and the backup storage area are successful, then further check whether the storage verification values of these two storage areas are consistent to ensure that the data completely matches. If the two are consistent, then confirm the data in the main storage area as valid data; if they are inconsistent, still use the data in the main storage area as the standard and perform necessary update operations.

[0096] If the verification results of both are successful, it indicates that the data in both storage areas is intact. Next, the system will further compare the storage verification values of the main storage area and the backup storage area. If these two storage verification values are consistent, it means that the data in the main storage area and the backup storage area is exactly the same. At this time, the data in the main storage area is confirmed as valid data and these valid data are updated to the global configuration array. If the storage verification values are inconsistent, although the verification results of both storage areas are successful, in order to ensure data consistency, the system still regards the data in the main storage area as valid data and updates it to the global configuration array and the backup storage area to repair possible differences. This process ensures data consistency and reliability and prevents problems caused by data asynchronization.

[0097] Furthermore, this embodiment can be optimized by introducing an intelligent synchronization mechanism. When detecting inconsistent storage check values, not only update the data, but also analyze the reasons for the differences and take preventive measures to avoid similar situations from occurring again.

[0098] By comparing the verification results of the main storage area and the backup storage area and the storage check values, this embodiment effectively identifies valid data and updates it to the global configuration array and the backup storage area in a timely manner, ensuring data consistency and integrity, reducing the risks brought by data inconsistency, and improving user experience and trust.

[0099] Exemplarily, referring to Figure 5 , Figure 5 is the full flow chart of this application. After the device is started, operations are performed on the main storage area and the backup storage area simultaneously. Read the configuration check value of the main storage area in the preset first main control processor. Read the configuration check value of the backup storage area in the preset first main control processor. For each storage area, check whether the storage check value in the storage area is consistent with the corresponding configuration check value to obtain a verification result. If the configuration check value is inconsistent with the storage check value, the verification fails directly. If they are consistent, determine whether there are new saved configuration items. If there are new saved configuration items, update the saved configuration items to the storage area and continue the verification. If there are no new saved configuration items, determine that the verification is successful.

[0100] If the verifications of both the main storage area and the backup storage area fail, update the global default array to the global configuration array. If only one storage area verification fails, update the data of that storage area as valid data to the global configuration array and the other storage area. If the verifications of both the main storage area and the backup storage area are successful, further compare whether the storage check values of the main storage area and the backup storage area are consistent. If they are consistent, determine the data in the main storage area as valid data and update it to the global configuration array. If they are inconsistent, determine the data in the main storage area as valid data and update it to the global configuration array and the backup storage area.

[0101] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the multi-master data storage and interaction method of this application. Based on this technical concept, more forms of simple transformations are within the protection scope of this application.

[0102] This application also provides a multi-master data storage and interaction device. Please refer to Figure 6 , the multi-master data storage and interaction device includes:

[0103] A reading module 10, configured to read the configuration check values corresponding to multiple storage areas in a preset first main control processor;

[0104] The verification module 20 is used to check whether the stored verification values in each storage area are consistent with the corresponding configured verification values, and obtain the corresponding verification results respectively;

[0105] The data update module 30 is used to determine valid data according to the verification results of each storage area, update the valid data to the corresponding storage area, and update the valid data to the global configuration array of the preset first main control processor. Each storage area includes a main storage area and a backup storage area, and the first main control processor is communicatively connected to the second main control processor.

[0106] The multi-master data storage and interaction device provided by this application adopts the multi-master data storage and interaction method in the above embodiment, and can improve the reliability of the storage and interaction technology of low-cost microcontroller units. Compared with the prior art, the beneficial effects of the multi-master data storage and interaction device provided by this application are the same as those of the multi-master data storage and interaction method provided by the above embodiment, and other technical features in the multi-master data storage and interaction device are the same as the features disclosed in the above embodiment method, and will not be elaborated here.

[0107] This application provides a multi-master data storage and interaction device. The multi-master data storage and interaction device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the multi-master data storage and interaction method in the first embodiment above.

[0108] Refer to the following Figure 7 , which shows a schematic structural diagram of a multi-master data storage and interaction device suitable for implementing the embodiments of this application. The multi-master data storage and interaction device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistant), PADs (Portable Application Description: tablet computers), PMPs (Portable Media Player: portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The multi-master data storage and interaction device shown is only an example and should not impose any limitation on the functions and usage scope of the embodiments of this application.

[0109] As Figure 7As shown, the multi-master data storage and interaction device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which may perform various appropriate actions and processes according to the program stored in the read-only memory 1002 or the program loaded from the storage device 1003 into the random access memory 1004. In the random access memory 1004, various programs and data required for the operation of the xxx device are also stored. The processing device 1001, the read-only memory 1002, and the random access memory 1004 are connected to each other through a bus 1005. The input / output interface 1006 is also connected to the bus. Generally, the following systems may be connected to the input / output interface 1006 and also to the bus. Generally, the following systems may be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the multi-master data storage and interaction device to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows a multi-master data storage and interaction device with various systems, it should be understood that it is not required to implement or have all the shown systems. More or fewer systems may be implemented or had alternatively.

[0110] Specifically, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart may be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program codes for executing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from the network through the communication device, or installed from the storage device 1003, or installed from the read-only memory 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiments disclosed in the present application are executed.

[0111] The multi-master data storage and interaction device provided by the present application adopts the multi-master data storage and interaction method in the above embodiments, and can improve the reliability of the low-cost microcontroller unit storage and interaction technology. Compared with the prior art, the beneficial effects of the multi-master data storage and interaction device provided by the present application are the same as those of the multi-master data storage and interaction method provided by the above embodiments, and other technical features in the multi-master data storage and interaction device are the same as the features disclosed in the method of the previous embodiment, and will not be elaborated here.

[0112] It should be understood that each part disclosed in this application can be implemented by hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in a suitable manner in any one or more embodiments or examples.

[0113] The above are only the specific embodiments of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application, and all should be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

[0114] This application provides a medium, which is a computer-readable storage medium with computer-readable program instructions (i.e., computer programs) stored thereon. The computer-readable program instructions are used to execute the multi-master data storage and interaction method in the above embodiments.

[0115] The computer-readable storage medium provided in this application can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or flash memory, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or combined with an instruction execution system or device. The program code contained on the computer-readable storage medium can be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0116] The above computer-readable storage medium can be included in the multi-master data storage and interaction device; or it can exist separately without being assembled into the multi-master data storage and interaction device.

[0117] The above computer-readable storage medium carries one or more programs. When the above one or more programs are executed by the multi-master data storage and interaction device, the multi-master data storage and interaction device is caused to:

[0118] Read the configuration verification values corresponding to multiple storage areas in the preset first main control processor respectively;

[0119] Check whether the storage verification values in each storage area are consistent with the corresponding configuration verification values to obtain the corresponding verification results respectively;

[0120] Determine the valid data according to the verification results of each storage area, update it to the corresponding storage area according to the valid data, and update the valid data to the global configuration array of the preset first main control processor, where each storage area includes a main storage area and a backup storage area, and the first main control processor is communicatively connected to the second main control processor.

[0121] Computer program code for performing the operations of the present application can be written in one or more programming languages or combinations thereof. The above-mentioned programming languages include object-oriented programming languages - such as Java, Smalltalk, C++, and also include conventional procedural programming languages - such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network - including a local area network (LAN: Local Area Network) or a wide area network (WAN: Wide Area Network), or it can be connected to an external computer (for example, by connecting through an Internet service provider using the Internet).

[0122] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of the code, and this module, program segment, or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0123] The modules involved in the embodiments of the present application can be implemented in software or in hardware. Among them, the name of the module does not constitute a limitation on the unit itself in some cases.

[0124] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above multi-master data storage and interaction method, and can improve the reliability of the storage and interaction technology of low-cost microcontroller units. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as those of the multi-master data storage and interaction method provided by the above embodiments, and will not be elaborated here.

[0125] The present application also provides a product, which is a computer program product, including a computer program. When the computer program is executed by a processor, it implements the steps of the multi-master data storage and interaction method as described above.

[0126] The computer program product provided by the present application can improve the reliability of the storage and interaction technology of low-cost microcontroller units. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as those of the multi-master data storage and interaction method provided by the above embodiments, and will not be elaborated here.

[0127] The above are only some embodiments of the present application, and do not limit the patent scope of the present application. All equivalent structural transformations made under the technical concept of the present application by using the content of the specification and drawings of the present application, or directly / indirectly applied to other related technical fields are included in the patent protection scope of the present application.

Claims

1. A multi-master data storage and interaction method, characterized in that: The multi-master data storage and interaction method comprises: Reading configuration check values ​​corresponding to a plurality of storage areas in a preset first master control processor; Check whether the storage check value in each storage area is consistent with the corresponding configuration check value, and obtain the corresponding check results respectively; Valid data is determined based on the verification results of each storage area, updated to the corresponding storage area based on the valid data, and the valid data is updated to the global configuration array of the preset first master processor, wherein each storage area includes a main storage area and a backup storage area, and the first master processor is communicatively connected with the second master processor.

2. The multi-master data storage and interaction method according to claim 1, characterized in that: The step of checking whether the storage check value in each storage area is consistent with the corresponding configuration check value to obtain the corresponding check results comprises: If the storage check value in the storage area is consistent with the corresponding configuration check value, determining whether there is a newly added saved configuration item in the running area of ​​the first master control processor; If there is a newly added saved configuration item in the running area, the default value of the saved configuration item is updated to the storage area, and the verification result of the storage area is determined to be successful.

3. The multi-master data storage and interaction method according to claim 1, characterized in that: The step of checking whether the storage check value in each storage area is consistent with the corresponding configuration check value to obtain the corresponding check results comprises: If the storage check value in the storage area is inconsistent with the corresponding configuration check value, it is determined that the check result of the storage area is a check failure.

4. The multi-master data storage and interaction method according to claim 1, characterized in that: The step of determining valid data according to the verification result of each storage area and updating the valid data to the corresponding storage area includes: If the verification result of the primary storage area is successful and the verification result of the backup storage area is failed, determining the data in the primary storage area as valid data; The backup storage area is updated according to the valid data.

5. The multi-master data storage and interaction method according to claim 4, characterized in that: The step of determining valid data according to the verification result of each storage area and updating the valid data to the corresponding storage area according to the valid data also includes: If the verification result of the primary storage area is failure and the verification result of the backup storage area is success, determining the data in the backup storage area as valid data; The main storage area is updated according to the valid data.

6. The multi-master data storage and interaction method according to claim 5, characterized in that: The step of determining valid data according to the verification result of each storage area and updating the valid data to the corresponding storage area according to the valid data also includes: If the verification result of the primary storage area is successful and the verification result of the backup storage area is successful, verifying whether the storage verification value of the primary storage area is consistent with the storage verification value of the backup storage area; If the storage check value of the primary storage area is consistent with the storage check value of the backup storage area, the data in the primary storage area is determined as valid data, and the valid data is updated to the global configuration array; If the storage check value of the main storage area is inconsistent with the storage check value of the backup storage area, the data in the main storage area is determined as valid data, and the backup storage area is updated according to the valid data.

7. The multi-master data storage and interaction method according to any one of claims 1 to 6, characterized in that: The multi-master data storage and interaction method further includes: If the verification result of the primary storage area is failure and the verification result of the backup storage area is failure, determining the preset global default data as valid data; The valid data is updated into the global configuration array.

8. A multi-master data storage and interaction device, characterized in that: The multi-master data storage and interaction device comprises: A reading module, used for reading configuration check values ​​respectively corresponding to a plurality of storage areas in a preset first master control processor; A verification module, used to check whether the storage verification value in each storage area is consistent with the corresponding configuration verification value, and obtain the corresponding verification results; A data update module is used to determine valid data based on the verification results of each storage area, update the corresponding storage area based on the valid data, and update the valid data to the global configuration array of the preset first master processor, wherein each storage area includes a main storage area and a backup storage area, and the first master processor is communicatively connected with the second master processor.

9. A multi-master data storage and interaction device, characterized in that: The multi-master data storage and interaction device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the multi-master data storage and interaction method as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the multi-master data storage and interaction method according to any one of claims 1 to 7.