File updating method and apparatus in redundant environment, electronic device, and storage medium

By sending requests from the module to the main module to obtain update files in a redundant environment, the problem of cumbersome file synchronization operations and low reliability in the prior art is solved, and the automatic update and rapid loading of the slave module files are realized, which improves the reliability and efficiency of the redundant environment.

WO2025107623A1PCT designated stage expired Publication Date: 2025-05-30NR ELECTRIC CO LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/101216
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-11-22
Filing Date
2024-06-25
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

The prior art has problems such as cumbersome operation, low reliability, long loading and slow file performance when synchronizing files in redundant environments.

Method used

A file update method in a redundant environment is proposed. By sending a request to the main module when the slave module meets the verification update conditions, obtaining and updating the files, ensuring the consistency between the slave module file and the main module file, thereby achieving automatic update and rapid effect.

Benefits of technology

It realizes automatic update and rapid loading of files from modules, improving the reliability and efficiency of redundant environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024101216_30052025_PF_FP_ABST
    Figure CN2024101216_30052025_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a file updating method and apparatus in a redundant environment, an electronic device, and a storage medium. The redundant environment in the method may comprise a master module and a slave module having a master-slave relationship, and the method is applied to the slave module. The method may comprise: on the basis of the consistency between master module file information and slave module file information, the slave module determines whether a slave module file needs to be updated; then the slave module acquires an update file from the master module, and generates updated slave module file information; and upon determining that the slave module file information is consistent with the master module file information, the slave module performs update on the basis of the updated file.
Need to check novelty before this filing date? Find Prior Art

Description

File updating method, device, electronic device and storage medium in redundant environment

[0001] Related applications

[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on November 22, 2023, with application number 2023115682483 and application name “File update method, device and electronic device in a redundant environment”, the entire contents of which are incorporated by reference into this application. Technical Field

[0003] The present application relates to the field of file updating, and in particular to a file updating method, device, electronic device, and storage medium in a redundant environment. Background Art

[0004] In the field of industrial control, redundant devices are widely used to ensure the stability and reliability of the system. The inventors of this application found that the two common file synchronization strategies in the redundant environment have shortcomings, including

[0005] (1) Manual update between master and slave modules. This method uses manual operation to keep the files of the master and slave modules synchronized, but has the disadvantages of cumbersome operation and low reliability of the redundant system.

[0006] (2) The master and slave modules automatically synchronize the file data in the memory, and the loading and taking effect of the files that need to be restarted are manually performed. This method has the disadvantages of a long loading and taking effect time, slow file taking effect, and a limited number of automatically updated files.

[0007] Summary of the Invention

[0008] Each exemplary embodiment of the present application provides a file updating method, device, electronic device, and storage medium in a redundant environment.

[0009] According to the first aspect of the present application, a file update method in a redundant environment is proposed. The redundant environment in the method may include a master module and a slave module having a master-slave relationship. The method is applied to the slave module and may include the following steps: when the slave module meets the verification update conditions, sending an information acquisition request to the master module; receiving the master module file information sent by the master module; when the master module file information and the first slave module file information are inconsistent, sending a file acquisition request to the master module; receiving an update file set sent by the master module; obtaining the second slave module file information based on the update file set; when the master module file information and the second slave module information are consistent, updating according to the update file set.

[0010] According to the above-described embodiment, in the method proposed in this application, the slave module determines whether the slave module file needs to be updated based on the consistency of the master module file information and the slave module file information. The slave module then obtains the update file from the master module and generates updated slave module file information. After determining that the slave module file information is consistent with the master module file information, the slave module is updated according to the updated file. The method proposed in this application enables the slave module to use the master module as a data source, automatically update files, and load them into effect, ensuring the security and efficiency of slave module file updates, thereby ensuring the reliability of the redundant environment.

[0011] According to some embodiments, verifying the update condition may include: the slave module is in a power-on startup phase; or the slave module receives a file change signal sent by the master module.

[0012] According to the above embodiment, the method of the present application sets the verification and update conditions to when the slave module is in the power-on startup phase or when the slave module receives a file change signal from the master module. The power-on startup phase of the slave module includes the case where a new slave module is added to the redundant environment and the case where the redundant environment is restarted. The verification and update conditions of the present application can cover all situations where the slave module needs to be updated, ensuring the reliability of the update.

[0013] According to some embodiments, the method of the first aspect of the present application may also include: when the main module file information and the first slave module file information are consistent, filtering out the invalid files in the existing files of the slave module as a second file set; loading the files in the second file set to complete the file update.

[0014] According to the above implementation, the method proposed in this application verifies the consistency of the main module file information and the slave module file information when the verification update conditions are met, and loads the invalid files in the slave module file when there is consistency, thereby ensuring the correct effectiveness of files that require restart to take effect.

[0015] According to the second aspect of the present application, a file update device in a redundant environment is proposed, which may include: a sending module, which can be configured to send an information acquisition request to the main module when the verification update conditions are met, and send a file acquisition request to the main module when the main module file information and the first slave module file information are inconsistent; a receiving module, which can be configured to receive the main module file information sent by the main module, and receive the update file set sent by the main module; a processing module, which can be configured to obtain the second slave module file information according to the update file set, and update according to the update file set when the main module file information and the second slave module information are consistent.

[0016] According to the third aspect of the present application, a file update system in a redundant environment is proposed, which may include: a main module, which can be configured to receive information acquisition requests and file acquisition requests sent by a slave module, and send the main module file information and update file set to the slave module; the slave module can be configured to execute the method described in the first aspect of the present application.

[0017] According to the fourth aspect of the present application, an electronic device is proposed, which may include: a processor; and a memory storing a computer program, wherein when the computer program is executed by the processor, the processor executes the method described in the first aspect of the present application.

[0018] According to the fifth aspect of the present application, a non-transitory computer-readable storage medium is proposed, on which computer-readable instructions are stored. When the instructions are executed by a processor, the processor executes the method described in the first aspect of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. 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 exceeding the scope of protection required by this application.

[0020] FIG1 is a schematic structural diagram of a file update system 1000 in a redundant environment of the present application;

[0021] FIG2 is a schematic diagram of the steps of a file updating method 2000 in a redundant environment of the present application;

[0022] FIG3 is a schematic diagram of step S106-A in the method 2000 of the present application;

[0023] FIG4 is a schematic diagram of step S106-B in the method 2000 of the present application;

[0024] FIG5 is a schematic diagram of the steps of a file updating method 3000 in a redundant environment of the present application;

[0025] FIG6 is a schematic structural diagram of a file updating device 4000 in a redundant environment of the present application;

[0026] FIG7 is a schematic diagram of a specific embodiment 5000 of a file updating method in a redundant environment of the present application;

[0027] FIG8 is a structural diagram of an electronic device of the present application.

[0028] Description of the accompanying drawings: File update system in a redundant environment-1000; master module-101; slave module-102; File update device in a redundant environment-4000; receiving module-401; processing module-402; sending module-403; embodiment-5000; master module-501; slave module-502. DETAILED DESCRIPTION

[0029] Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein. Rather, these examples are provided so that this application will be thorough and complete and will fully convey the concepts of the example embodiments to those skilled in the art. Identical reference numerals in the figures represent identical or similar parts, and thus a repeated description thereof will be omitted.

[0030] The described features, structures or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of these specific details, or other modes, components, materials, devices or the like may be employed. In these cases, well-known structures, methods, devices, implementations, materials or operations will not be shown or described in detail.

[0031] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, while others may be combined or partially combined. Therefore, the actual execution order may vary depending on the actual situation.

[0032] The terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish between different objects, not to describe a particular order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.

[0033] Those skilled in the art will understand that the drawings are merely schematic diagrams of example embodiments, and the modules or processes in the drawings are not necessarily necessary for implementing the present application, and therefore cannot be used to limit the scope of protection of the present application.

[0034] The following describes an apparatus embodiment of the present application, which can be used to perform the method embodiment of the present application. For details not disclosed in the apparatus embodiment of the present application, reference can be made to the method embodiment of the present application.

[0035] FIG1 is a schematic diagram of the structure of a file update system 1000 in a redundant environment of the present application. As shown in FIG1 , the system 1000 includes a master module 101 and a slave module 102 .

[0036] In some specific embodiments, system 1000 is used in a Safety Instrumented System (SIS) to improve the system's hardware fault tolerance and ensure that a single failure does not result in a loss of SIS safety functions. In some specific embodiments, the types of files loaded and validated in master module 101 and slave module 102 include files requiring a restart to take effect and files requiring no restart to take effect. Files requiring a restart to take effect require a system power cycle after storage to load and take effect. Files requiring no restart to take effect can be directly loaded and validated after storage.

[0037] In some specific embodiments, in system 1000, the files in master module 101 and slave module 102 must remain consistent. In system 1000, master module 101 and slave module 102 can communicate data, such as exchanging messages or files. Optionally, master module 101 and slave module 102 communicate data via a wired backplane base. In some specific embodiments, master module 101 and slave module 102 communicate data via a wireless communication module.

[0038] Fig. 2 is a schematic diagram of steps of a file updating method 2000 in a redundant environment of the present application. As shown in Fig. 2 , the method 2000 includes steps S201 to S206.

[0039] In some specific embodiments, in step S201, when the verification update condition is met, the file update device in the redundant environment (such as the slave module in the redundant environment, which is described below using the slave module as an example) sends an information acquisition request to the master module.

[0040] In some specific embodiments, in step S201, verifying the update condition includes verifying that the slave module is in the power-on startup phase. In some specific embodiments, the slave module being in the power-on startup phase includes the slave module being newly added to a redundant environment, the slave module not containing any files, and in this case, the slave module needs to synchronize files with the master module. In some specific embodiments, the slave module being in the power-on startup phase includes the master-slave module in the redundant environment being restarted, and in this case, the slave module contains files that have been stored but not yet loaded and validated, and in this case, the slave module needs to synchronize files with the master module again to ensure the validity of the slave module update.

[0041] In some embodiments, in step S201, verifying the update condition includes receiving a file change signal from the master module. In some embodiments, the file change signal indicates that a file in the master module in the redundant environment has changed, and the slave module needs to synchronize files with the master module.

[0042] In some specific embodiments, in step S201, the slave module meets the verification and update conditions, and sends an information acquisition request to the master module to obtain the master module file information in the master module.

[0043] In step S202, the slave module receives the master module file information sent by the master module. In some specific embodiments, the master module file information in step S202 includes file identification information of the file in the master module, such as a file check code.

[0044] In step S203, when the file information of the master module is inconsistent with the file information of the first slave module, the slave module sends a file acquisition request to the master module.

[0045] In some specific embodiments, in step S203, if the master module file information and the first slave module file information are inconsistent, indicating that there is a difference between the existing file in the slave module and the file in the master module, the slave module then sends a file acquisition request to the master module to obtain the file to be updated in the slave module. Optionally, the master module file information and the slave module file information include a file checksum.

[0046] In step S204, the slave module receives the update file set sent by the master module.

[0047] In some specific embodiments, in step S204, the update file set includes files that need to be updated from the module. Optionally, the files in the update file set include files that require a reboot to take effect and / or files that can take effect without a reboot.

[0048] In step S205, the slave module obtains second slave module file information based on the update file set. In some specific embodiments, after receiving the update file set sent by the master module, the slave module obtains the second slave module file information based on all files included in the slave module itself (including files in the newly received update file set).

[0049] In step S206, when the master module file information and the second slave module file information are consistent, the slave module is updated according to the update file set. In some specific embodiments, in step S206, the master module file information and the second slave module file information are consistent, indicating that the files in the updated slave module and the files in the master module have completed file synchronization, but at this time, the files in the update file set of the slave module have not yet been loaded and taken effect. In some specific embodiments, in step S206, the slave module confirms that the second slave module file information is consistent with the master module file information, and then updates according to the update file set.

[0050] In some specific embodiments, in step S206, if the update file set contains files that require a reboot to take effect, the slave module filters the update file set to contain files that can take effect without a reboot, forming a first file set. The files in the first file set are then loaded, and the slave module is restarted. In some specific embodiments, in step S206, if the update file set contains no files that require a reboot to take effect, the slave module loads the files in the update file set to complete the file update.

[0051] In the method proposed in this application, the slave module determines whether the slave module file needs to be updated based on the consistency of the master module file information and the slave module file information. The slave module then obtains the updated file from the master module and generates updated slave module file information. After determining that the slave module file information is consistent with the master module file information, the slave module is updated according to the updated file. The method proposed in this application enables the slave module to use the master module as a data source, automatically update files, and load them into effect, ensuring the security and efficiency of slave module file updates, thereby ensuring the reliability of the redundant environment.

[0052] Fig. 3 is a schematic diagram of step S206-A in the method 2000 of the present application. As shown in Fig. 3, step S206-A includes steps S601 and S602.

[0053] In step S601, the slave module determines whether there is a file in the update file set that requires a reboot to take effect. In some specific embodiments, in step S601, the slave module determines for each file in the update file set, based on the file content, whether the file is a file that can take effect without a reboot or a file that requires a reboot to take effect.

[0054] In step S602, if there are no files in the update file set that require a reboot to take effect, the files in the update file set are loaded from the module to complete the file update. In some specific embodiments, in step S602, all files in the update file set are files that can take effect without a reboot, in which case the files in the update file set are loaded from the module to complete the file update.

[0055] Figure 4 is a schematic diagram of step S206-B in the method 2000 of the present application. As shown in Figure 4, step S206-B includes steps S611 to S613, wherein step S611 is the same as step S601 in Figure 3 and will not be repeated here.

[0056] In step S612, if the update file set includes files that require a reboot to take effect, the slave module filters the update file set to a first file set that can take effect without a reboot. In some specific embodiments, in step S612, the update file set includes files that require a reboot to take effect and files that can take effect without a reboot. In this case, the slave module filters the files that can take effect without a reboot to form the first file set, thereby completing the update of the files that can take effect without a reboot.

[0057] In step S613, the slave module loads the files in the first file set and restarts the slave module. In some specific embodiments, in step S613, the slave module loads the files in the first file set to complete the file update that can take effect without restarting. In some specific embodiments, in step S613, after loading the files in the first file set, the file update is not complete, and in this case, the slave module needs to be restarted to complete the update of the files in the file set that require restart to take effect.

[0058] Figure 5 is a schematic diagram of the steps of the file update method 3000 in a redundant environment of the present application. As shown in Figure 5, the method 3000 includes steps S301 to S308, wherein steps S301 to S306 are the same as steps S201 to S206 of the method 2000 in Figure 2, and are not repeated here.

[0059] In step S307, if the master module file information and the first slave module file information are consistent, the slave module selects ineffective files from the existing files of the slave module as the second file set. In some specific embodiments, in step S307, if the master module file information and the first slave module file information are consistent, it means that the slave module is neither newly added to the redundant environment nor has just received the file update signal from the master module. In other words, the verification update condition satisfied by the slave module at this time is that the slave module has just completed a restart.

[0060] In some specific embodiments, in step S307, the slave module has just completed a reboot, and before the reboot, the slave module included files that had been stored but not updated, i.e., files that require a reboot to take effect. In some specific embodiments, in step S307, the slave module filters the existing files for files that have not taken effect, and uses them as a second file set, wherein the second file set includes files that had been stored but not updated by the slave module before the reboot.

[0061] In step S308, files in the second file set are loaded from the module to complete the file update. In some specific embodiments, in step S308, loading the files in the second file set from the module completes the update of files that require a restart to take effect. Since updates to files that require no restart to take effect have already been completed before the restart, all file updates are completed in step S308.

[0062] FIG6 is a schematic diagram of the structure of a file updating device 4000 in a redundant environment of the present application. As shown in FIG6 , the device 4000 includes a receiving module 401 , a processing module 402 and a sending module 403 .

[0063] In some specific embodiments, when the verification update condition is met, the sending module 403 sends an information acquisition request to the main module.

[0064] In some specific embodiments, verifying the update condition includes the slave module being in the power-on startup phase. In some specific embodiments, the slave module being in the power-on startup phase includes the slave module being newly added to a redundant environment, the slave module not containing any files, and in this case, the slave module needs to synchronize files with the master module. In some specific embodiments, the slave module being in the power-on startup phase includes the master-slave module in the redundant environment being restarted, and in this case, the slave module contains files that have been stored but not loaded and are effective, and in this case, the slave module needs to synchronize files with the master module again to ensure the validity of the slave module update.

[0065] In some embodiments, verifying the update condition includes receiving a file change signal from the master module. In some embodiments, the file change signal indicates that a file of the master module in the redundant environment has changed, and the slave module needs to synchronize files with the master module.

[0066] In some specific embodiments, if the slave module meets the verification and update conditions, the sending module 403 sends an information acquisition request to the master module to obtain the master module file information in the master module.

[0067] In some specific embodiments, the receiving module 401 receives the main module file information sent by the main module. In some specific embodiments, the main module file information includes file identification information of the file in the main module, such as a checksum of the file.

[0068] In some specific embodiments, when the file information of the master module is inconsistent with the file information of the first slave module, the sending module 403 sends a file acquisition request to the master module.

[0069] In some specific embodiments, the master module file information and the first slave module file information are inconsistent, indicating that there is a difference between the existing file in the slave module and the file in the master module. In this case, the sending module 403 sends a file acquisition request to the master module to obtain the file that needs to be updated in the slave module. Optionally, the master module file information and the slave module file information include a file checksum.

[0070] In some specific embodiments, the receiving module 401 receives the update file set sent by the main module.

[0071] In some specific embodiments, the update file set includes files that need to be updated from the module. Optionally, the files in the update file set include files that require a reboot to take effect and / or files that can take effect without a reboot.

[0072] In some specific embodiments, the processing module 402 obtains the second slave module file information based on the update file set. In some specific embodiments, after the receiving module 401 receives the update file set sent by the master module, the processing module 402 obtains the second slave module file information based on all files included in the slave module itself (including files in the newly received update file set).

[0073] In some specific embodiments, when the master module file information and the second slave module file information are consistent, the processing module 402 performs an update according to the update file set. In some specific embodiments, the master module file information and the second slave module file information are consistent, indicating that the files in the updated slave module and the files in the master module have completed file synchronization, but at this time, the files in the update file set of the slave module have not yet been loaded and taken effect. In some specific embodiments, the processing module 402 confirms that the second slave module file information is consistent with the master module file information, and then performs an update according to the update file set.

[0074] In some specific embodiments, if the update file set contains files that require a reboot to take effect, processing module 402 selects files from the update file set that can take effect without a reboot to form a first file set, then loads the files from the first file set and restarts the slave module. In some specific embodiments, if the update file set does not contain files that require a reboot to take effect, processing module 402 loads the files from the update file set to complete the file update.

[0075] FIG7 is a schematic diagram of a specific embodiment 5000 of the file update method in a redundant environment of the present application. As shown in FIG7 , the embodiment 5000 includes a master module 501 and a slave module 502 .

[0076] In the embodiment 5000 shown in FIG7 , the files in the master module 501 have changed, including updating the original file 1 to file 1′ and adding file 4, wherein file 1′ is a file that can take effect without restarting, and file 4 is a file that needs to be restarted to take effect. The master module 501 sends a file update signal to the slave module 502. After receiving the file update signal, the slave module 502 sends an information acquisition request to the master module 501. In response to the information acquisition request, the master module 501 sends the master module file information to the slave module 501. In the embodiment 5000, the master module file information in the master module 501 includes {(file 1′: no restart required), (file 2: restart required), (file 3: no restart required), (file 4: restart required)}.

[0077] In embodiment 5000, the first slave module file information in slave module 502 includes {(file 1: no restart required), (file 2: restart required), (file 3: no restart required)}. Slave module 502 compares the master module file information with the first slave module file information and finds that the two are inconsistent. Slave module 502 sends a file acquisition request to master module 501. In embodiment 5000, the file acquisition request includes the inconsistent portion of the master module file information and the first slave module file information, namely {(file 1': no ​​restart required), (file 4: restart required)}. In response to the file acquisition request, master module 501 sends file 1' and file 4 to slave module 502. Slave module 502 forms an updated file set with the received file 1' and file 4.

[0078] The slave module 502 determines the second slave module file information as follows based on the update file set: {(file 1′: no restart required), (file 2: restart required), (file 3: no restart required), (file 4: restart required). In embodiment 5000, the second slave module file information is consistent with the master module file information, and the slave module 502 is updated based on the update file set.

[0079] In embodiment 5000, module 502 determines that there are files in the update file set that require a reboot to take effect, and selects files in the update file that can take effect without a reboot, namely file 1'. In embodiment 5000, module 502 loads file 1' and reboots.

[0080] After slave module 502 completes its reboot, the verification and update conditions for the slave module during the power-on startup phase are met. Slave module 502 then begins a file update, retrieving the master module file information for master module 501. At this point, the first slave module file information, i.e., the information about the files currently included in slave module 502, is consistent with the master module file information. In embodiment 5000, slave module 502 filters out the inactive file, i.e., file 4, from the existing files in the slave module, and loads file 4, completing the file update.

[0081] FIG8 is a block diagram of an electronic device provided by the present application, including a processor and a memory. The memory stores computer instructions, which, when executed by the processor, cause the processor to execute the computer instructions to implement the method and detailed solution shown in FIG2.

[0082] It should be understood that the above-described device embodiments are merely illustrative, and the devices disclosed herein may also be implemented in other ways. For example, the division of units / modules described in the above-described embodiments is merely a logical functional division, and actual implementations may employ alternative divisions. For example, multiple units, modules, or components may be combined or integrated into another system, or some features may be omitted or not implemented.

[0083] In addition, unless otherwise specified, the functional units / modules in the various embodiments of the present invention may be integrated into a single unit / module, each unit / module may exist physically separately, or two or more units / modules may be integrated together. The aforementioned integrated units / modules may be implemented in the form of hardware or software program modules.

[0084] If the integrated unit / module is implemented in hardware, the hardware may be a digital circuit, an analog circuit, or the like. The physical implementation of the hardware structure includes, but is not limited to, transistors, memristors, and the like. Unless otherwise specified, the processor or chip may be any appropriate hardware processor, such as a CPU, GPU, FPGA, DSP, and ASIC. Unless otherwise specified, the on-chip cache, off-chip memory, and storage may be any appropriate magnetic storage medium or magneto-optical storage medium, such as resistive random access memory (RRAM), dynamic random access memory (DRAM), static random access memory (SRAM), enhanced dynamic random access memory (EDRAM), high-bandwidth memory (HBM), hybrid memory cube (HMC), and the like.

[0085] If the integrated unit / module is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions for enabling a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned memory includes: various media that can store program codes, such as a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0086] An embodiment of the present application further provides a non-transitory computer storage medium storing a computer program. When the computer program is executed by multiple processors, the processors execute the method and detailed solution shown in FIG. 2 .

[0087] The embodiments of the present application are described in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only configured to help understand the method and core ideas of the present application. At the same time, changes or modifications made by those skilled in the art based on the ideas of the present application, the specific implementation methods and the scope of application of the present application, all fall within the scope of protection of the present application. In summary, the contents of this specification should not be understood as limiting the present application.

Claims

1. A file update method in a redundant environment, wherein the redundant environment includes a master module and a slave module in a master-slave relationship, and the method is applied to the slave module, comprising: When the slave module meets the verification and update conditions, sending an information acquisition request to the master module; Receiving main module file information sent by the main module; When the file information of the master module is inconsistent with the file information of the first slave module, sending a file acquisition request to the master module; Receiving an update file set sent by the main module; Obtaining second slave module file information according to the update file set; When the master module file information is consistent with the second slave module file information, updating is performed according to the update file set.

2. The method of claim 1, wherein: The verification update conditions include: The slave module is in the power-on startup phase; or The slave module receives a file change signal sent by the master module.

3. The method of claim 2, wherein: The updating according to the update file set comprises: Determine whether there is a file in the update file set that requires restart to take effect; In the case that there is no file in the update file set that requires restart to take effect, the files in the update file set are loaded to complete the file update.

4. The method of claim 2, wherein: The updating according to the update file set further comprises: If there are files in the update file set that require restart to take effect, select a first file set in the update file set that can take effect without restarting; Load the files in the first file set and restart the slave module.

5. The method of claim 4, wherein: Also includes: When the file information of the master module is consistent with the file information of the first slave module, filtering ineffective files in the existing files of the slave module as the second file set; The files in the second file set are loaded to complete the file update.

6. The method according to any one of claims 1 to 5, wherein: The master module file information and the slave module file information include a file check code.

7. A file updating device in a redundant environment, wherein: include: A sending module, configured to send an information acquisition request to the master module when the verification update condition is met, and to send a file acquisition request to the master module when the file information of the master module and the file information of the first slave module are inconsistent; A receiving module, configured to receive the main module file information sent by the main module, and receive the update file set sent by the main module; The processing module is configured to obtain the second slave module file information according to the update file set, and update according to the update file set when the master module file information is consistent with the second slave module information.

8. A file update system in a redundant environment, wherein: include: The main module is configured to receive information acquisition requests and file acquisition requests sent by the slave module, The master module file information and update file set are sent to the slave module; A slave module is configured to execute the method according to any one of claims 1-6.

9. An electronic device, wherein: include: processor; A memory storing a computer program, which, when executed by the processor, causes the processor to execute the method according to any one of claims 1 to 6.

10. A non-transitory computer-readable storage medium, wherein: Computer-readable instructions are stored thereon, and when the instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1-6.

Citation Information

Patent Citations

  • File synchronization system and method

    CN108228733A

  • File updating method, device and system, storage medium and display box

    CN112114836A

  • File system implementation method and device

    CN114238221A

  • Information updating method and device, equipment and storage medium

    CN114356368A

  • File synchronization system

    JP2006106941A