Configuration file synchronization method and computing device

By automatically comparing the MD5 values ​​of the target software and the current configuration file, efficient and accurate synchronization of the configuration file is achieved, and the synchronization problem caused by manual inspection in the existing technology is solved.

CN116360840BActive Publication Date: 2025-08-19XFUSION DIGITAL TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202310119934.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-15
Publication Date
2025-08-19
Estimated Expiration
2043-02-15

AI Technical Summary

Technical Problem

In the prior art, the accuracy and efficiency of configuration file synchronization are low, and the difference items need to be checked manually one by one, which is prone to problems such as missing synchronization and missync.

Method used

By obtaining the initial source configuration file of the target software and the MD5 value of the current source configuration file, the MD5 value is automatically compared to determine whether the configuration file is modified, and automatically synchronize the unmodified configuration files to reduce manual intervention.

Benefits of technology

Improve the accuracy and efficiency of configuration file synchronization, avoid missed synchronization and wrong synchronization, and simplify the operation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116360840B_ABST
    Figure CN116360840B_ABST
Patent Text Reader

Abstract

The present application provides a configuration file synchronization method and computing device, which relate to the field of computing. In this method, different MD5 values are generated based on different file contents. When it is necessary to synchronize the configuration files of the target software, the initial MD5 value of the initial source configuration file of the target software and the current MD5 value of the current source configuration file are automatically obtained, and by comparing whether the initial MD5 value and the current MD5 value are the same, it is automatically determined whether the current source configuration file of the target software has been modified. If the initial MD5 value of the initial source configuration file and the current MD5 value of the current source configuration file are different, it means that the current source configuration file has been modified relative to the initial source configuration file, and the current source configuration file of the target software is automatically synchronized to the device where the second operating system is located. Since the entire synchronization process of the current source configuration file of the target software is automatically implemented without manual participation, it can effectively improve the efficiency and accuracy of configuration file synchronization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computing, and in particular to a configuration file synchronization method and computing device. Background Art

[0002] The operating system is the most fundamental system software on a computing device. Over time, the old operating system may need to be replaced due to reasons such as system updates stopping. At this point, the software running on the old operating system typically needs to be synchronized to the new one. After synchronizing the software, the software configuration files also need to be synchronized.

[0003] In the related art, when synchronizing configuration files, the difference between the two configuration files (i.e., the configuration file of the software in the old operating system and the configuration file of the software in the new operating system) is usually manually checked one by one to determine which differences need to be synchronized. This synchronization method not only has low synchronization accuracy, but also very low synchronization efficiency. Summary of the Invention

[0004] The embodiments of the present application provide a configuration file synchronization method and a computing device, which help to improve the synchronization efficiency and accuracy of configuration files.

[0005] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:

[0006] In a first aspect, a configuration file synchronization method is provided, the method comprising: obtaining an initial MD5 value of an initial source configuration file of a target software and a current MD5 value of a current source configuration file; wherein the initial source configuration file is a configuration file obtained by installing the target software based on a first operating system; the current source configuration file is a configuration file used when running the target software based on the first operating system; the name of the initial source configuration file is the same as the name of the current source configuration file; if the initial MD5 value of the initial source configuration file and the current MD5 value of the current source configuration file are different, synchronizing the current source configuration file of the target software to a device where a second operating system is located.

[0007] In this solution, based on the principle of generating MD5 values, that is, different MD5 values are generated based on different file contents, when the configuration file of the target software needs to be synchronized, the initial MD5 value of the initial source configuration file of the target software and the current MD5 value of the current source configuration file are automatically obtained. By checking whether the initial MD5 value of the initial source configuration file and the current MD5 value of the current source configuration file are the same, it is automatically determined whether the current source configuration file of the target software has been modified. If the initial MD5 value of the initial source configuration file and the current MD5 value of the current source configuration file are different, it means that the current source configuration file has been modified relative to the initial source configuration file, and the current source configuration file of the target software is automatically synchronized to the device where the second operating system is located. Since the entire synchronization process of the current source configuration file of the target software is automatically implemented without manual intervention, it can effectively improve the efficiency and accuracy of configuration file synchronization.

[0008] In one possible implementation, the method further includes: determining a synchronization strategy for the current source configuration file based on whether an initial MD5 value of the initial source configuration file and a current MD5 value of the current source configuration file are the same; the synchronization strategy includes synchronizing the current source configuration file or not synchronizing the current source configuration file; if the synchronization strategy is to synchronize the current source configuration file, synchronizing the source configuration file to the device where the second operating system is located.

[0009] In this implementation method, the synchronization strategy of the current source configuration file is determined based on whether the current MD5 value of the current source configuration file is the same as the initial MD5 value of the initial source configuration file. If the synchronization strategy is to synchronize the current source configuration file, the current source configuration file is synchronized to the device where the second operating system is located. In this way, the user can understand the synchronization status of the current source configuration file of the target software based on the synchronization strategy, which is helpful for the user's usage experience.

[0010] In another possible implementation, the synchronization strategy of the current source configuration file is determined based on whether the initial MD5 value of the initial source configuration file and the current MD5 value of the current source configuration file are the same, including: if the initial MD5 value of the initial source configuration file and the current MD5 value of the current source configuration file are different, determining that the synchronization strategy of the current source configuration file is to synchronize the current source configuration file; if the initial MD5 value of the initial source configuration file and the current MD5 value of the current source configuration file are the same, determining that the synchronization strategy of the current source configuration file is not to synchronize the current source configuration file.

[0011] In this implementation, if the initial MD5 value of the initial source configuration file and the current MD5 value of the current source configuration file are different, the synchronization strategy is determined to be synchronization; if they are the same, the synchronization strategy is determined to be non-synchronization. This helps to avoid synchronizing the current source configuration file when the current source configuration file has not been modified. In other words, it avoids synchronizing the current source configuration file when it is not necessary, which helps to improve the accuracy and efficiency of configuration file synchronization.

[0012] In another possible implementation, the synchronization strategy of the current source configuration file is determined based on whether the initial MD5 value of the initial source configuration file and the current MD5 value of the current source configuration file are the same, including: determining the target JS (javascript object notation, JSON) object notation file based on whether the initial MD5 value of the initial source configuration file and the current MD5 value of the current source configuration file are the same; the target JSON file includes the synchronization strategy.

[0013] In this implementation, the synchronization strategy of the current source configuration file is determined by generating a target JSON file and setting the target JSON file to include a synchronization strategy. This not only makes the implementation logic simple, but also makes the implementation process simple and convenient.

[0014] In another possible implementation, the initial MD5 value of the initial source configuration file of the target software and the current MD5 value of the current source configuration file are stored via the original JSON file of the target software.

[0015] In this implementation, the initial MD5 value of the initial source configuration file and the current MD5 value of the current source configuration file are stored in the original JSON file, which not only makes the implementation logic simple but also makes the implementation process simple and convenient.

[0016] In another possible implementation, obtaining the initial MD5 value of the initial source configuration file of the target software and the current MD5 value of the current source configuration file includes: sending a first acquisition request to the original computing device; the first acquisition request is used to request to obtain the source configuration file information of the target software, the source configuration file information of the target software includes the initial MD5 value of the initial source configuration file and the current MD5 value of the current source configuration file; receiving the source configuration file information of the target software returned by the original computing device.

[0017] In this implementation, the current MD5 value and the initial MD5 value are obtained by sending the first acquisition request to the original computing device, which helps to improve the accuracy of the current MD5 value and the initial MD5 value.

[0018] In another possible implementation, the source configuration file information of the target software also includes: at least one of the software name of the target software installed based on the first operating system, the version number of the target software, the name of the initial source configuration file, the name of the current source configuration file, and the content of the current source configuration file.

[0019] In this implementation, by setting the source configuration file information of the target software to also include: the software name of the target software, the version number of the target software, the name of the initial source configuration file, the name of the current source configuration file and the content of the current source configuration file, etc., it helps to improve the accuracy of synchronization.

[0020] In another possible implementation, the source configuration file information of the target software is stored via an original JSON file.

[0021] In this implementation, the information of the source configuration file of the target software is stored in the original JSON file, which not only makes the implementation logic simple but also makes the implementation process simple and convenient.

[0022] In another possible implementation, before obtaining the initial MD5 value of the initial source configuration file of the target software and the current MD5 value of the current source configuration file, the method further includes: obtaining the file identifier of the destination configuration file of the target software; the destination configuration file is the configuration file obtained by installing the target software based on the second operating system, and the name of the destination configuration file is the same as the name of the current source configuration file; determining whether the identifier of the destination configuration file indicates that the update operation of the destination configuration file includes a first operation; the first operation includes using the destination configuration file after the target software is updated to overwrite the destination configuration file before the target software is updated; if the file identifier of the destination configuration file of the target software does not indicate that the update operation of the destination configuration file includes the first operation, obtaining the initial MD5 value of the initial source configuration file of the target software and the current MD5 value of the current source configuration file.

[0023] In this implementation, by setting the file identifier not indicating that the update operation of the target configuration file includes the first operation, the initial MD5 value of the initial source configuration file of the target software and the current MD5 value of the current source configuration file are obtained. This can reduce the number of configuration files to be synchronized and improve the synchronization efficiency of the configuration files while ensuring the normal operation of the target software based on the second operating system.

[0024] In another possible implementation, synchronizing the current source configuration file of the target software to the device where the second operating system is located includes: obtaining the initial MD5 value of the configuration file; determining the synchronization operation type of the current source configuration file based on the initial MD5 value of the destination configuration file and the initial MD5 value of the initial source configuration file; the synchronization operation type includes the current source configuration file overwriting the destination configuration file or saving the current source configuration file and the destination configuration file; based on the synchronization operation type, synchronizing the current source configuration file to the device where the second operating system is located.

[0025] In this implementation, when synchronizing the current source configuration file to the device where the second operating system is located, it is determined whether the target software is updated by determining whether the initial MD5 value of the initial source configuration file of the target software is the same as the destination MD5 value of the target software, thereby determining the synchronization operation type of the current source configuration file, including whether the current source configuration file overwrites the destination configuration file or saves the current source configuration file and the destination configuration file, and based on the synchronization operation type, the current source configuration file is synchronized with the device where the second operating system is located first. In this way, after the current source configuration file is synchronized to the device where the second operating system is located, it helps to ensure that the version of the configuration file on the device where the second operating system is located matches the version of the target software, thereby helping to improve the reliability and stability of the target software running on the device where the second operating system is located.

[0026] Another possible implementation method is to determine the synchronization operation type of the initial source configuration file based on the initial MD5 value of the destination configuration file and the initial MD5 value of the initial source configuration file, including: if the initial MD5 value of the initial source configuration file and the initial MD5 value of the destination configuration file are the same, the synchronization operation type is that the current source configuration file overwrites the destination configuration file; if the current MD5 value of the current source configuration file and the initial MD5 value of the destination configuration file are different, save the current source configuration file and the destination configuration file.

[0027] In this implementation, if the initial MD5 value of the target configuration file is different from the initial MD5 value of the original source configuration file, indicating that the target software has been updated, the synchronization operation type is to save the current source configuration file and the target configuration file. This helps to retain the new version of the target configuration file for the device where the second operating system is located, so that when the target software fails, the cause of the failure can be determined through different versions of the configuration files, and the failure can be eliminated. If they are the same, indicating that the target software has not been updated, the synchronization operation type is to overwrite the target configuration file with the current source configuration file. In this way, when the target software has not been updated, the source configuration file can be used to overwrite the target configuration file, thereby reducing the storage space occupied by the device where the second operating system is located due to the storage of duplicate configuration files.

[0028] In another possible implementation, the current source configuration file of the target software is synchronized to the device where the second operating system is located, including: obtaining the initial MD5 value of the destination configuration file of the target software; and depending on whether the initial MD5 value of the destination configuration file is the same as the initial MD5 value of the initial source configuration file, overwriting the destination configuration file with the current source configuration file, or saving the current source configuration file and the destination configuration file.

[0029] Another possible implementation method is to prevent the current source configuration file from overwriting the destination configuration file or to save the current source configuration file and the destination configuration file based on whether the initial MD5 value of the destination configuration file is the same as the initial MD5 value of the initial source configuration file, including: determining the synchronization operation type of the current source configuration file based on whether the initial MD5 value of the destination configuration file is the same as the initial MD5 value of the initial source configuration file; the synchronization operation type includes whether the current source configuration file overwrites the destination configuration file or saves the current source configuration file and the destination configuration file; based on the synchronization operation type of the current source configuration file, causing the current source configuration file to overwrite the destination configuration file, or saving the current source configuration file and the destination configuration file.

[0030] In this implementation, the synchronization operation type of the current source configuration file is determined by whether the initial MD5 value of the target configuration file is the same as the initial MD5 value of the initial source configuration file. Then, based on the synchronization operation type, the current source configuration file overwrites the target configuration file, or the current source configuration file does not overwrite the target configuration file. In this way, the user can understand the details of the configuration file on the device where the second operating system is located based on the synchronization operation type, such as whether it is overwritten, etc., which helps the user experience.

[0031] In another possible implementation, the synchronization operation type of the current source configuration file is determined based on whether the initial MD5 value of the destination configuration file is the same as the initial MD5 value of the initial source configuration file, including: if the initial MD5 value of the destination configuration file is different from the initial MD5 value of the initial source configuration file, determining that the synchronization operation type of the current source configuration file is to save the current source configuration file and the destination configuration file; if the initial MD5 value of the destination configuration file is the same as the initial MD5 value of the initial source configuration file, determining that the synchronization operation type of the current source configuration file is to overwrite the destination configuration file with the source configuration file.

[0032] In another possible implementation, the synchronization operation type of the current source configuration file is determined based on whether the initial MD5 value of the destination configuration file is the same as the initial MD5 value of the initial source configuration file, including: determining the target JSON file based on whether the initial MD5 value of the destination configuration file is the same as the initial MD5 value of the initial source configuration file; the target JSON file includes the synchronization operation type.

[0033] In this implementation, by generating a target JSON file and setting the target JSON file to include a synchronization operation type, the synchronization operation type of the current source configuration file is determined. This not only has simple implementation logic but also a simple and convenient implementation process.

[0034] In another possible implementation, the initial MD5 value of the target configuration file of the target software is stored in the target JSON file of the target software.

[0035] In this implementation, the initial MD5 value of the destination configuration file is stored in the destination JSON file, which not only makes the implementation logic simple but also makes the implementation process simple and convenient.

[0036] In another possible implementation, obtaining the initial MD5 value of the target configuration file of the target software includes: sending a second acquisition request to the target computing device; the second acquisition request is used to request to obtain the target configuration file information of the target software, the target configuration file information of the target software includes the initial MD5 value of the target configuration file; receiving the target configuration file information of the target software returned by the target computing device.

[0037] In this implementation, the initial MD5 value is obtained by sending an acquisition request to the target computing device, which helps to improve the accuracy of the initial MD5 value.

[0038] In another possible implementation, the target software's destination configuration file information further includes: at least one of the target software's software name, the target software's version number, the destination configuration file's file identifier, the destination configuration file's name, and the destination configuration file's content.

[0039] In this implementation, the information of the destination configuration file of the target software is set to also include: the software name of the target software installed based on the second operating system, the version number of the target software, the file identifier of the destination configuration file, the name of the destination configuration file and the content of the destination configuration file, etc., which helps to provide synchronization accuracy.

[0040] In another possible implementation, the target configuration file information of the target software is stored via a target JSON file.

[0041] In this implementation, the information of the target configuration file of the target software is stored in the target JSON file, which not only simplifies the implementation logic but also makes the implementation process simple and convenient.

[0042] In another possible implementation, if the synchronization operation type is to save the current source configuration file and the destination configuration file, based on the synchronization operation type, before synchronizing the current source configuration file to the device where the second operating system is located, the method also includes: based on the update operation corresponding to the destination configuration file indicated by the file identifier of the destination configuration file, modifying the name of the current source configuration file or the destination configuration file, so that the device where the second operating system is located saves the current source configuration file and the destination configuration file at the same time.

[0043] In this implementation, if the synchronization operation type is to save the current source configuration file and the destination configuration file, the update operation corresponding to the file identifier of the destination configuration file of the target software is used to determine whether to modify the name of the current source configuration file or the name of the destination configuration file, so that the device where the second operating system is located saves the current source configuration file and the destination configuration file, and avoids the current source configuration file overwriting the destination configuration file. This helps to ensure that after synchronizing the current source configuration file, the name of the destination configuration file of the target software on the device where the second operating system is located matches the update policy of the second operating system for the target software, such as retaining the name of the destination configuration file of the new version of the target software or including the name of the destination configuration file of the old version of the target software, thereby helping to ensure the operating stability of the target software.

[0044] In another possible implementation, based on the update operation corresponding to the destination configuration file indicated by the file identifier of the destination configuration file, the name of the current source configuration file or the destination configuration file is modified, including: determining the configuration file modification method based on the update operation corresponding to the destination configuration file indicated by the file identifier of the destination configuration file; the configuration file modification method includes modifying the name of the current source configuration file or modifying the name of the destination configuration file; according to the configuration file modification method, modifying the name of the current source configuration file or modifying the name of the destination configuration file.

[0045] In this implementation, the configuration file modification method is determined based on the file identifier of the destination configuration file, and then based on the modification method, it is determined whether to modify the name of the current source configuration file or the name of the destination configuration file. In this way, the user can understand the specific situation of the configuration file on the device where the second operating system is located based on the configuration file modification method, which is helpful for the user's usage experience.

[0046] In another possible implementation, based on the update operation of the destination configuration file indicated by the file identifier of the destination configuration file, the name of the current source configuration file or the destination configuration file is modified, including: if the file identifier of the destination configuration file indicates that the update operation corresponding to the destination configuration file is the second operation, the name of the current source configuration file is modified; the second operation includes modifying the name of the destination configuration file before the target software is updated; if the file identifier of the destination configuration file indicates that the update operation corresponding to the destination configuration file is the third operation, the name of the destination source configuration file is modified; the third operation includes modifying the name of the destination configuration file after the target software is updated.

[0047] In this implementation, the update operation for the target configuration file is to modify the name of the target configuration file before the target software is updated. This means that when the target software is updated based on the second operating system, the name of the new version of the configuration file is retained. Therefore, when synchronizing the current source configuration file, modifying the name of the current source configuration file helps ensure that after synchronizing the current source configuration file to the device running the second operating system, the device running the second operating system retains the name of the new version of the configuration file.

[0048] Conversely, the update operation for the destination configuration file modifies the name of the updated destination configuration file. This means that when updating the target software based on the second operating system, the name of the old configuration file is retained. Therefore, when synchronizing the current source configuration file, modifying the name of the destination configuration file helps ensure that the device running the second operating system retains the name of the old configuration file after synchronizing the current source configuration file to the device running the second operating system.

[0049] In another possible implementation, the file identifier of the destination configuration file indicates that the update operation corresponding to the destination configuration file is the second operation, including: if the file identifier of the destination configuration file includes %config, then the update operation corresponding to the destination configuration file is the second operation.

[0050] In another possible implementation, the file identifier of the destination configuration file indicates that the update operation corresponding to the destination configuration file is the third operation, including: if the file identifier of the destination configuration file includes %config(noreplace), then the update operation corresponding to the destination configuration file is the third operation.

[0051] In another possible implementation, determining a modification method of the synchronization operation according to a file identifier of a destination configuration file includes: determining a target JSON file according to the file identifier of the destination configuration file; the target JSON file includes a configuration file modification method.

[0052] In this implementation, by generating a target JSON file and setting the target JSON file to include a configuration file modification method, the configuration file modification method is determined. This not only has simple implementation logic but also a simple and convenient implementation process.

[0053] In another possible implementation, the synchronization result of the current source configuration file of the target software is displayed; the synchronization result includes synchronization success or synchronization failure.

[0054] In this implementation, by displaying the synchronization results of the current source configuration file of the target software, the user can understand the synchronization status of the configuration file of the target software, and thus determine whether manual synchronization is required to ensure that the target software can run normally on the second operating system, thereby helping to ensure the normal operation of the business.

[0055] In another possible implementation, before obtaining the initial message digest algorithm MD5 value of the initial source configuration file of the target software and the current MD5 value of the current source configuration file, the method further includes: determining the target software from at least one software in response to a target operation; wherein the target operation is used to indicate that the target software is determined as the software of the configuration file to be synchronized.

[0056] In this implementation, when synchronizing software configuration files, target software is determined from at least one software in response to a user's target operation. This not only helps control the scope of software for which configuration files are synchronized, but also helps increase the necessity of configuration file synchronization.

[0057] In a second aspect, a configuration file synchronization device is provided, the device comprising: a functional unit for executing any one of the methods provided in the first aspect, wherein the actions executed by each functional unit are implemented by hardware or by hardware executing corresponding software implementations. For example, the configuration file synchronization device may comprise: a processing unit and a synchronization unit; the processing unit is configured to obtain an initial MD5 value of an initial source configuration file of the target software and a current MD5 value of a current source configuration file; wherein the initial source configuration file is a configuration file obtained by installing the target software based on a first operating system; the current source configuration file is a configuration file used when running the target software based on the first operating system; the name of the initial source configuration file is the same as the name of the current source configuration file; and the synchronization unit is configured to synchronize the current source configuration file of the target software to the device where the second operating system is located if the initial MD5 value of the initial source configuration file and the current MD5 value of the current source configuration file are different.

[0058] According to a third aspect, a configuration file synchronization system is provided, which is used to obtain the initial MD5 value of the initial source configuration file of the target software and the current MD5 value of the current source configuration file; wherein the initial source configuration file is the configuration file obtained by installing the target software based on the first operating system; the current source configuration file is the configuration file used when running the target software based on the first operating system; the name of the initial source configuration file is the same as the name of the current source configuration file; if the initial MD5 value of the initial source configuration file and the current MD5 value of the current source configuration file are different, the current source configuration file of the target software is synchronized to the device where the second operating system is located.

[0059] It should be noted that, in the third aspect, the configuration file synchronization system can also be used to execute any possible implementation of the first aspect.

[0060] In a fourth aspect, a system migration device is provided, which is used to obtain the initial MD5 value of the initial source configuration file of the target software and the current MD5 value of the current source configuration file; wherein the initial source configuration file is the configuration file obtained by installing the target software based on the first operating system; the current source configuration file is the configuration file used when running the target software based on the first operating system; the name of the initial source configuration file is the same as the name of the current source configuration file; if the initial MD5 value of the initial source configuration file and the current MD5 value of the current source configuration file are different, the current source configuration file of the target software is synchronized to the device where the second operating system is located.

[0061] Optionally, the system migration apparatus is further configured to: send an installation file of the second operating system to the destination computing device, and control the destination computing device to install the second operating system based on the installation file of the second operating system.

[0062] Optionally, the system migration apparatus is further configured to: control the destination computing device to install the target software.

[0063] It should be noted that in the fourth aspect, the system migration device can also be used to execute any possible implementation method of the first aspect mentioned above.

[0064] In a fifth aspect, a computing device is provided, comprising: a processor and a memory, wherein the processor is connected to the memory. The memory is used to store computer-executable instructions, and the processor executes the computer-executable instructions stored in the memory, thereby implementing any one of the methods provided in the first aspect.

[0065] In a sixth aspect, a chip is provided, comprising: a processor and an interface circuit; the interface circuit is configured to receive code instructions and transmit them to the processor; and the processor is configured to run the code instructions to execute any one of the methods provided in the first aspect above.

[0066] In a seventh aspect, a computer-readable storage medium is provided, which stores computer execution instructions. When the computer execution instructions are run on a computer, the computer executes any one of the methods provided in the first aspect above.

[0067] In an eighth aspect, a computer program product is provided, comprising computer execution instructions, which, when executed on a computer, enable the computer to execute any one of the methods provided in the first aspect.

[0068] Among them, the technical effects brought about by any implementation method in the second to eighth aspects can refer to the technical effects brought about by different implementation methods in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] Figure 1 A system architecture diagram provided for an embodiment of the present application;

[0070] Figure 2 Another system architecture diagram provided for an embodiment of the present application;

[0071] Figure 3 Another system architecture diagram provided for an embodiment of the present application;

[0072] Figure 4 A schematic diagram of a synchronization system provided in an embodiment of the present application;

[0073] Figure 5 A flowchart of a configuration file synchronization method provided in an embodiment of the present application;

[0074] Figure 6 A schematic diagram of the synchronization principle of the current source configuration file of a target software provided in an embodiment of the present application;

[0075] Figure 7 A flowchart of another configuration file synchronization method provided in an embodiment of the present application;

[0076] Figure 8 A schematic diagram of synchronization of a current source configuration file of another target software provided in an embodiment of the present application;

[0077] Figure 9 A flowchart of another configuration file synchronization method provided in an embodiment of the present application;

[0078] Figure 10 A schematic diagram of synchronization of a current source configuration file of another target software provided in an embodiment of the present application;

[0079] Figure 11 A flowchart of another configuration file synchronization method provided in an embodiment of the present application;

[0080] Figure 12 A schematic diagram of a configuration file synchronization device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0081] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0082] In the description of this application, unless otherwise specified, " / " indicates that the objects associated before and after are in an "or" relationship, for example, A / B can represent A or B; "and / or" in this application is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural.

[0083] Furthermore, in the description of this application, unless otherwise specified, "plurality" means two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or plural.

[0084] In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit differences. At the same time, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or design schemes. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way for easy understanding.

[0085] The following is a brief introduction to the relevant terms involved in the embodiments of this application.

[0086] Red Hat Package Manager (PRM) is used to install, uninstall, upgrade, verify, and manage software. It creates a unified database file that records detailed software information and can automatically analyze dependencies.

[0087] Message-Digest Algorithm 5 (MD5) is a widely used cryptographic hash function that produces a 128-bit (16-byte) hash value. In practice, a unique MD5 value can be generated based on the file's content. This MD5 value acts as a unique identification number (ID) for the file. In other words, files with different contents will have different MD5 values.

[0088] The community enterprise operating system (CentOS) is a free, open source operating system that can be redeveloped.

[0089] The following is an illustrative introduction to the application scenarios of the embodiments of the present application.

[0090] The operating system is the most fundamental system software in computing devices. During the use of computing devices, older operating systems may need to be replaced due to reasons such as system update discontinuation. For example, CentOS is about to stop updating. This will lead to problems such as stagnant system product evolution and unresolved security vulnerabilities. This will pose serious security risks to application systems deployed on existing computing devices, resulting in significant system security and business continuity risks for users, and even significant financial losses. Therefore, replacing CentOS with another operating system is imperative.

[0091] After replacing an old system, the software in the old operating system typically needs to be synchronized to the new operating system. After completing the software synchronization operation, the software configuration files also need to be synchronized. In related art, when synchronizing configuration files, the differences between the two configuration files (the configuration files of the software in the old operating system and the configuration files of the software in the new operating system) are usually manually checked one by one to determine which differences need to be synchronized.

[0092] This synchronization method places very high demands on the operator's professional expertise, requiring them to be familiar with the configuration files of all software in the operating system, making it very difficult to implement in practice. Furthermore, if a configuration file contains a discrepancy and the operator is familiar with it, the synchronization will proceed correctly. However, if the operator is unfamiliar with the discrepancy, synchronization may not proceed, resulting in missed synchronization of the discrepancy. Furthermore, due to operator inadvertent synchronization, it is possible that a discrepancy in the configuration file that should not be synchronized will be synchronized, resulting in incorrect synchronization of the discrepancy. Therefore, this synchronization method not only has low synchronization accuracy but also very low synchronization efficiency.

[0093] In view of this, an embodiment of the present application provides a configuration file synchronization method based on the generation principle of MD5 values, that is, different file contents will generate different MD5 values. When the configuration file of the target software needs to be synchronized, the initial MD5 value of the initial source configuration file of the target software and the current MD5 value of the current source configuration file are automatically obtained, and the initial MD5 value of the initial source configuration file and the current MD5 value of the current source configuration file are automatically determined by whether the initial MD5 value of the initial source configuration file and the current MD5 value of the current source configuration file are the same. If the initial MD5 value of the initial source configuration file and the current MD5 value of the current source configuration file are not the same, it means that the current source configuration file has been modified relative to the initial source configuration file, and the current source configuration file of the target software is automatically synchronized to the device where the second operating system is located. Since the entire synchronization process of the current source configuration file of the target software is automatically implemented without manual participation, it can effectively improve the efficiency and accuracy of configuration file synchronization.

[0094] In addition, since the entire current source configuration file is sent to the device where the second operating system is located when the synchronization operation is performed on the current source configuration file, problems such as missed synchronization difference items and wrong synchronization difference items existing in related technologies can be avoided.

[0095] The following is an exemplary introduction to the system architecture of the embodiment of the present application.

[0096] like Figure 1 The figure shows a system architecture diagram provided in an embodiment of the present application.

[0097] The system architecture includes a migration computing device, an original computing device and a destination computing device. The migration computing device is connected to the original computing device and the destination computing device respectively.

[0098] In some embodiments, the migration computing device, the original computing device, and the destination computing device may be terminal devices or network devices.

[0099] Among them, the terminal device can be referred to as: terminal, user equipment (UE), terminal device, access terminal, user unit, user station, mobile station, remote station, remote terminal, mobile device, user terminal, wireless communication device, user agent or user device, etc. The terminal device can specifically be a mobile phone, augmented reality (AR) device, virtual reality (VR) device, tablet computer, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), etc. The network device can specifically be a server, etc. The server can be a physical or logical server, or it can be two or more physical or logical servers that share different responsibilities and work together to realize the various functions of the server.

[0100] In this system architecture, a first operating system (ie, an old operating system) and multiple software are installed on the original computing device. The original computing device can run a target task based on the first operating system and the multiple software.

[0101] It should be noted that the embodiment of the present application does not limit the type of target task. For example, the target task may be data collection, data storage, etc.

[0102] Due to some reasons, the first operating system is no longer suitable for use. For example, the first operating system will stop updating. The user installs a second operating system (i.e., a new operating system) and multiple software on the target computing device so that the target computing device can run the target task based on the second operating system and multiple software.

[0103] The names of the multiple software on the original computing device are the same as the names of the multiple software on the destination computing device.

[0104] It should be noted that Figure 1 In the system architecture shown, the solution in the embodiment of the present application is executed by the migration computing device. In addition, this method of performing system migration on different devices can also be called remote migration.

[0105] like Figure 2 As shown, it is another system architecture diagram provided in an embodiment of the present application.

[0106] The system architecture includes a migration computing device and an original computing device. The migration computing device is connected to the original computing device.

[0107] In this system architecture, a first operating system and multiple software are installed on the original computing device, and the original computing device can run the target task based on the first operating system and multiple software.

[0108] When the first operating system is no longer suitable for use, the user reinstalls the second operating system and multiple software on the original computing device, so that the original computing device can run the target task based on the second operating system and multiple software.

[0109] It should be noted that Figure 2 In the system architecture shown, the solution of the embodiment of the present application is executed by the migration computing device. In addition, this method of performing system migration on the same computing device can also be called local migration.

[0110] like Figure 3 , which is another system architecture diagram of an embodiment of the present application.

[0111] The system architecture includes an original computing device and a destination computing device. The original computing device and the destination computing device are connected.

[0112] For details about the source and destination computing devices, please refer to the above Figure 1 The system architecture shown is not described here in detail.

[0113] exist Figure 3 In the system architecture shown, the embodiments of the present application are executed by the destination computing device or the original computing device.

[0114] like Figure 4 FIG2 is a schematic diagram of a synchronization system according to an embodiment of the present application. The synchronization system includes functional modules for executing the embodiment of the present application.

[0115] based on Figure 1 、 Figure 2 Based on the system architecture shown, the actions performed by each functional module of the synchronization system can be realized by migrating computing devices. Figure 3 In the system architecture shown, the actions performed by the various functional modules of the synchronization system can be implemented by the destination computing device or the original computing device.

[0116] Below, Figure 1 Taking the system architecture shown in FIG. 1 as an example, the various functional modules of the synchronization system are introduced exemplarily.

[0117] See also Figure 4 ,The synchronization system includes an acquisition module, a comparison module and a synchronization module.

[0118] The acquisition module is used to obtain source configuration file information from the original computing device and obtain destination configuration file information from the destination computing device, so as to store the obtained configuration file information in the migration database of the migration computing device.

[0119] In some embodiments, the acquisition module can also be used to obtain the initial MD5 value of the initial source configuration file of the target software and the current MD5 value of the current source configuration file from the migration database, and save the initial MD5 value of the initial source configuration file and the current MD5 value of the current source configuration file in the original JSON file of the target software, as well as obtain the initial MD5 value of the destination configuration file of the target software and the file identifier of the destination configuration file from the migration database, and save the initial MD5 value of the destination configuration file and the file identifier of the destination configuration file in the destination JSON file of the target software.

[0120] It should be noted that in the embodiment of the present application, the initial source configuration file refers to the file obtained by installing the target software based on the first operating system, and the current source configuration file is the configuration file used when running the target software based on the first operating system. The name of the initial source configuration file is the same as the name of the current source configuration file.

[0121] The target configuration file is the file generated by installing the target software on a second operating system. The name of the current source configuration file for a piece of software is the same as the name of the target configuration file for that software. In other words, the current source configuration file and the target configuration file are identically named configuration files for the same software, but based on different operating systems. These two names are defined to distinguish the operating systems to which the configuration files correspond.

[0122] The comparison module is used to perform comparison operations, determine synchronization strategies, determine synchronization operation types, etc. For example, the comparison operation includes comparing the initial MD5 value of the initial source configuration file with the current MD5 value of the current source configuration file, and the initial MD5 value of the target configuration file with the initial MD5 value of the initial source configuration file.

[0123] Exemplarily, the comparison module may perform a comparison operation by reading an original JSON file and a target JSON file, and generate a target JSON file including a synchronization strategy to determine the synchronization strategy.

[0124] The synchronization module is used to perform synchronization operations, such as synchronizing the current source configuration file of the target software to the device where the second operating system is located.

[0125] In some embodiments, the migration computing device communicates with the original computing device and the destination computing device via a secure shell (SSH) protocol, which helps to improve the security when obtaining configuration file information.

[0126] It should be noted that the system architecture and application scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the evolution of the system architecture and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0127] For ease of understanding, the following is an exemplary introduction to the configuration file synchronization method provided by this application with reference to the accompanying drawings. Figures 1 to 3 The system architecture shown is composed of Figure 4 The various modules in the synchronous system shown are executed.

[0128] It needs to be explained that, Figure 1 Taking the system architecture shown as an example, the embodiments of the present application are exemplarily introduced.

[0129] The following embodiments of this application will be divided into four parts to exemplarily introduce the solution of the configuration file synchronization method.

[0130] Part I: Combining Figures 5 and 6 A method for synchronizing software configuration files is introduced. The method determines the synchronization process of the current source configuration file of the target software based on the initial MD5 value of the initial source configuration file of the target software and the current MD5 value of the current source configuration file.

[0131] Part II, Combination Figures 7 and 8 This paper introduces another method for synchronizing software configuration files. This synchronization method, when performing a synchronization operation on the current source configuration file of the target software, determines whether the current source configuration file of the target software overwrites the target configuration file of the target software based on the initial MD5 value of the initial source configuration file of the target software and the MD5 value of the target configuration file.

[0132] Part III: Combination Figures 9 and 10 This paper introduces another method for synchronizing software configuration files. This method, when performing a synchronization operation on the current source configuration file of the target software, determines to modify the name of the current source configuration file or the name of the destination configuration file based on the file identifier of the target software's destination configuration file, so that the device hosting the second operating system can simultaneously save the current source configuration file and the destination configuration file.

[0133] Part 4: Combination Figure 11 Another synchronization method for software configuration files is described below. This synchronization method determines the synchronization process of the current source configuration file of the target software based on the initial MD5 value of the initial source configuration file of the target software and the MD5 value of the target configuration file.

[0134] It should be noted that the fourth part may not depend on the first part, the second part and the third part. In other words, the fourth part may be implemented independently.

[0135] Figure 5 This is a flow chart of a configuration file synchronization method according to an exemplary embodiment. Exemplarily, the method includes S501-S508.

[0136] In some embodiments, the original computing device has multiple software programs installed based on a first operating system, for example, the multiple software programs may include wget, etc. Based on this, the migration computing device sends an installation program for a second operating system to the destination computing device, and after controlling the destination computing device to install the second operating system, continues to control the destination computing device to install the multiple software programs based on the second operating system.

[0137] It should be noted that, hereinafter, only the target software among the multiple software is taken as an example to exemplify the method for synchronizing the configuration files of the software.

[0138] In some embodiments, the target software is any one of the plurality of software. In this way, the configuration files of each software in the first operating system can be automatically synchronized, which helps to improve the coverage of the configuration file synchronization.

[0139] In some other embodiments, before executing S501 , the configuration file synchronization method further includes: determining target software from at least one software in response to a target operation; the target operation is used to indicate that the target software is determined as the software whose configuration file is to be synchronized.

[0140] Exemplarily, the migration computing device displays software information for multiple software programs. The user performs a target operation on the migration computing device to instruct the migration computing device to identify target software from the multiple software programs as software for which a configuration file is to be synchronized. For example, the migration computing device may whitelist the target software. In response to the target operation, the migration computing device determines the target software from the multiple software programs.

[0141] It is understood that the user can determine the target software based on the type of target business run by the second operating system. For example, if the target business is data storage, the user can select the software required for information storage as the target software. This helps the target business run by the second operating system to run normally.

[0142] On this basis, before executing S501, the configuration file synchronization method may further include: determining a target software from the at least one software, wherein the target software may be any one of the at least one software.

[0143] Since the target software is the software that needs to be synchronized with the configuration file specified by the user, this not only helps to control the scope of the software that needs to be synchronized with the configuration file, but also helps to increase the necessity of the configuration file synchronization.

[0144] Optionally, S501: obtain a file identifier of a destination configuration file of the target software.

[0145] The target configuration file is a file obtained by installing the target software based on the second operating system. The file identifier of the target configuration file is used to indicate the update operation corresponding to the target configuration file.

[0146] It should be noted that multiple configuration files can be obtained by installing the target software based on the second operating system, and the target configuration file is any one of the multiple configuration files.

[0147] Based on the second operating system, the update operation of the target configuration file includes a first operation, a second operation, or a third operation.

[0148] Among them, the first operation includes using the target configuration file after the target software is updated to overwrite the target configuration file before the target software is updated, the second operation includes modifying the name of the target configuration file before the target software is updated, and the third operation includes modifying the name of the target configuration file after the target software is updated.

[0149] As shown in Table 1, it is a correspondence table between the file identifier of the configuration file and the update operation based on the second operating system.

[0150] Table 1

[0151]

[0152]

[0153] It is understandable that when the target software is updated based on the second operating system, a target configuration file is regenerated. The regenerated target configuration file is the target configuration file after the target software is updated, and can also be called a new version configuration file. In contrast, the target configuration file before the target software is updated can also be called an old file.

[0154] Based on Table 1, it can be understood that if the file identifier of the destination configuration file does not include %config or the file identifier of the destination configuration file is the default content, the update operation of the destination configuration file is indicated as the first operation. Based on this, when the target software is updated based on the second operating system, regardless of whether the old version configuration file has been modified by the user, the updated destination configuration file is directly used to overwrite the pre-update destination configuration file (i.e., the new version configuration file overwrites the old version configuration file).

[0155] It should be noted that the second operation and the third operation will be described in subsequent embodiments and will not be repeated here.

[0156] S502: Determine whether the file identifier of the destination configuration file indicates that the update operation of the destination configuration file includes a first operation.

[0157] If the determination result is yes, then the process ends; if the determination result is no, then S503 is executed.

[0158] like Figure 6 As shown, it is a synchronization schematic diagram of the current source configuration file of the target software.

[0159] Alternatively, see Figure 6 If the file identifier indicates that the update operation corresponding to the target configuration file includes the first operation, the process ends, that is, the migration computing device does not synchronize the current source configuration file of the target software to the device where the second operating system is located.

[0160] It should be noted that when the target software is installed based on the first operating system, multiple configuration files may be obtained, and the name of the current source configuration file is the same as the name of the destination configuration file.

[0161] In this embodiment, since the update operation corresponding to the target configuration file includes the first operation, the target software installed based on the second operating system uses the configuration file obtained when the latest version of the target software is installed (see Table 1 for details). In other words, after the target software is updated, the configuration file of the old version of the target software modified by the user will not continue to be used. Based on this, even if the current source configuration file of the target software is synchronized to the device where the second operating system is located, after the target software is updated based on the second operating system, the current source configuration file of the target software will not continue to be used. In other words, even if the current source configuration file is not synchronized, the target software will not be applied to the device where the second operating system is located. Therefore, by setting the file identifier to indicate that the update operation corresponding to the target configuration file does not include the first operation, the migration computing device obtains the initial MD5 value of the initial source configuration file of the target software and the current MD5 value of the current source configuration file, and when the file identifier indicates that the update operation corresponding to the target configuration file includes the first operation, the current source configuration file of the target software is not synchronized. In this way, it is helpful to reduce the number of configuration files to be synchronized and improve the synchronization efficiency of the configuration files while ensuring the normal operation of the target software based on the second operating system.

[0162] S503: The device obtains the initial MD5 value of the initial source configuration file of the target software and the current MD5 value of the current source configuration file.

[0163] It is understood that the initial source configuration file is the file obtained when the target software is installed based on the first operating system, and the current source configuration file is the file currently used when the target software is run based on the first operating system. The name of the initial source configuration file is the same as the name of the current source configuration file.

[0164] In some embodiments, the content of the current source configuration file is the same as the content of the initial source configuration file, that is, the user has not modified the initial source configuration file. In other embodiments, the content of the current source configuration file is different from the content of the initial source configuration file, that is, the user has modified the initial source configuration file, and the current source configuration file is a configuration file obtained after modifying the initial source configuration file.

[0165] The initial MD5 value of the initial source configuration file is an MD5 value determined based on the content of the initial source configuration file, and the current MD5 value of the current source configuration file is an MD5 value determined based on the content of the current source configuration file.

[0166] Based on the MD5 value generation principle, if the original source configuration file has been modified, the current MD5 value of the current source configuration file will be different from the initial MD5 value of the original source configuration file. If the original source configuration file has not been modified, the current MD5 value of the current source configuration file will be the same as the initial MD5 value of the original source configuration file.

[0167] In some embodiments, the migration computing device obtains the current MD5 value of the current source configuration file of the target software and the initial MD5 value of the initial source configuration file from the original computing device.

[0168] In some other embodiments, the migration computing device stores the current MD5 value of the current source configuration file of the target software and the initial MD5 value of the initial source configuration file. The migration computing device obtains the current MD5 value of the current source configuration file of the target software and the initial MD5 value of the initial source configuration file from the local cache.

[0169] It is understandable that the current MD5 value of the current source configuration file of the target software and the initial MD5 value of the initial source configuration file stored in the migration computing device are obtained in advance by the migration computing device from the original computing device.

[0170] The following describes, through steps 1 and 2, a process in which the migration computing device obtains the current MD5 value of the current source configuration file and the initial MD5 value of the initial source configuration file of the target software from the original computing device.

[0171] Step 1: Send a first acquisition request to the original computing device to request the source configuration file information of the target software.

[0172] The source configuration file information of the target software includes the current MD5 value of the current source configuration file and the initial MD5 value of the initial source configuration file.

[0173] In some embodiments, the current MD5 value of the current source configuration file of the target software is obtained from the first operating system. The initial MD5 value of the initial source configuration file of the target software is obtained from the RPM database of the first operating system. Optionally, the source configuration file information of the target software also includes: at least one of the software name of the target software, the version number of the target software, the name of the initial source configuration file, the name of the current source configuration file, and the content of the current source configuration file.

[0174] In this embodiment, the source configuration file information of the target software is set to also include the software name of the target software, the version number of the target software, the name of the initial source configuration file, the name of the current source configuration file, etc. Since the name of the current source configuration file of the target software is the same as the name of the destination configuration file of the target software, when synchronizing the current source configuration file of the target software, the location of the destination configuration file of the target software on the device where the second operating system is located (i.e., the destination computing device) can be determined based on the software name of the target software, the name of the current source configuration file, etc., which helps to improve the accuracy and efficiency of configuration file synchronization.

[0175] In addition, by setting the source configuration file information of the target software to include the content of the current source configuration file of the target software, when synchronizing the current source configuration file of the target software, the synchronization operation can be performed based on the content of the current source configuration file, and there is no need to obtain the content of the current source configuration file from the original computing device, which helps to improve the synchronization efficiency.

[0176] In some embodiments, the first acquisition request includes a first acquisition instruction for obtaining an initial MD5 value of an initial source configuration file of the target software. Exemplarily, the first acquisition instruction may include: rpm -q --qf "[%-15{=FILEMD5S}%-36{FILENAMES}\n]" wget | grep / etc / wgetrc.

[0177] In some embodiments, the first acquisition request includes a second acquisition instruction, and the second acquisition instruction is used to obtain the current MD5 value of the current source configuration file of the target software. Exemplarily, the second acquisition instruction may include: sha256sum / etc / wgetrc.

[0178] Step 2: Receive the source configuration file information of the target software returned by the original computing device.

[0179] In some embodiments, the migration computing device receives a software list returned by the original computing device. The software list includes the target software. Displaying the target software through the software list is simple and convenient, and helps improve the accuracy of determining the target software.

[0180] In some embodiments, the migration computing device receives a list of target software configuration files returned by the original computing device. The list of target software configuration files includes multiple configuration files for the target software, including the current source configuration file. Thus, representing multiple configuration files for a piece of software through the list of configuration files helps improve the accuracy of determining multiple configuration files for a piece of software.

[0181] In other words, the migration computing device obtains the source configuration file information of the target software by receiving the software list and the configuration file list of the target software.

[0182] In some embodiments, the migration computing device is deployed with a migration database. After acquiring the source configuration file information of the target software, the migration computing device stores the source configuration file information of the target software in the migration database.

[0183] Based on this, S503 may include: the migration computing device obtains the current MD5 value of the current source configuration file of the target software and the initial MD5 value of the initial source configuration file from the migration database.

[0184] Exemplarily, the migration computing device obtains the target software's configuration file list from the migration database through "rpm-qc target software's software name", thereby obtaining the target software's source configuration file information, such as the initial MD5 value, the current MD5 value, and the like.

[0185] In other embodiments, after receiving the source configuration file information of the target software returned by the original computing device, the migration computing device saves the source configuration file information of the target software in the original JSON file. This not only meets the requirements logically but also is simple to implement.

[0186] Based on this, S503 may include: the migration computing device obtains the current MD5 value of the current source configuration file of the target software and the initial MD5 value of the initial source configuration file from the original JSON file.

[0187] For example, the original JSON file may include the following content:

[0188]

[0189] In the above original JSON file, "src_os_pkg": "wget" is used to indicate the name of the target software installed based on the first operating system, and "1.14-18.el7.x86_64" is used to indicate the version number of the target software installed based on the first operating system. "children" is used to indicate the configuration file subitems of the target software. "src_os_config_file": " / etc / wegtrc" is used to indicate the name of the current source configuration file of the target software. "src_file_content": "file content" is used to indicate the content of the current source configuration file of the target software. "src_os_org_md5": "md51" is used to indicate the initial MD5 value of the initial source configuration file of the target software. "src_os_cur_md5": "md52" is used to indicate the current MD5 value of the current source configuration file of the target software.

[0190] It should be noted that the source configuration file information of the target software can also be stored through XML files, and this application does not impose any restrictions on the storage format.

[0191] It should be noted that if the system migration method is local migration, then steps 1 and 2 above should be performed before installing the second operating system. If the system migration method is remote migration, then steps 1 and 2 above can be performed before installing the second operating system, or they can also be performed after installing the second operating system. This embodiment of the application does not limit this.

[0192] Optionally, the configuration file synchronization method may further include: the migration computing device determines a target JSON file based on whether an initial MD5 value of the initial source configuration file and a current MD5 value of the current source configuration file are the same; the target JSON file includes a synchronization policy.

[0193] For example, the target JSON file may include the following content:

[0194]

[0195]

[0196] In the target JSON file above, "target_os_pkg": "wget" indicates the name of the target software installed on the second operating system, "1.20.3-3.fos22.x86_64" indicates the version number of the target software installed on the second operating system. "target_os_config_file": " / etc / wegtrc" indicates the name of the target software's destination configuration file. "target_file_content": "file content" indicates the contents of the target software's destination configuration file. "conclusion": "sync policy" indicates the synchronization policy for the target software's current source configuration file.

[0197] It should be noted that how to obtain the target configuration file information of the target software, such as the name of the target software installed based on the second operating system, the version number of the target software, the name of the target configuration file of the target software, the content of the target configuration file of the target software, etc., will be explained in the second part of the embodiment of this application. Please refer to S1-S2 in S705 for details, and no further details will be given here.

[0198] S504: Determine whether the current MD5 value of the current source configuration file is the same as the initial MD5 value of the initial source configuration file.

[0199] If the determination result is yes, then S505 is executed or the process ends (ie, the current source configuration file is not synchronized to the device where the second operating system is located). If the determination result is no, then S506 is executed.

[0200] See also Figure 6 If the result of the determination is yes, it means that the original source configuration file of the target software has not been modified, and the current source configuration file of the target software does not need to be synchronized to the device where the second operating system is located. Therefore, the migration computing device can execute S505 or end.

[0201] On the other hand, if the determination result is negative, it indicates that the original source configuration file of the target software has been modified. In this case, the modified current source configuration file should be synchronized to the device where the second operating system is located to ensure that the second operating system can run the target software according to the modified current source configuration file. Therefore, the migration computing device should execute S506.

[0202] Optionally, S505: Determine that the synchronization policy of the current source configuration file is not to synchronize the current source configuration file.

[0203] In some embodiments, if the migration computing device determines that the synchronization policy for the target software's current source configuration file is "no synchronization," the migration computing device does not synchronize the target software's current source configuration file. In other words, the migration computing device does not synchronize the target software's current source configuration file with the device hosting the second operating system.

[0204] Optionally, S506: Determine that the synchronization strategy of the current source configuration file is to synchronize the current source configuration file.

[0205] In some embodiments, if the migration computing device determines that the synchronization policy of the current source configuration file of the target software is synchronization, the migration computing device needs to perform a synchronization operation on the current source configuration file of the target software. In other words, the migration computing device synchronizes the current source configuration file of the target software to the device where the second operating system is located.

[0206] It should be noted that S504-S505 can be executed before the second operating system is installed, or can be executed after the second operating system is installed, and this embodiment of the present application does not limit this.

[0207] It is understandable that S506 is an optional step. In other words, if the determination result of S504 is no, the migration computing device may not execute S506 and directly execute S507.

[0208] S507: If the current MD5 value of the current source configuration file is the same as the initial MD5 value of the initial source configuration file, synchronize the current source configuration file of the target software to the device where the second operating system is located.

[0209] In some implementations, the migration computing device sends the current source configuration file of the target software to the device where the second operating system is located, so as to synchronize the contents of the current source configuration file of the target software to the second operating system.

[0210] In one example, the current source configuration file of the target software may be obtained by the migration computing device from the device where the first operating system resides. In another example, the current source configuration file of the target software may be generated based on the contents of the target software's source configuration file obtained by the migration computing device from the first operating system.

[0211] In the above embodiment, based on the principle of generating MD5 values, that is, different MD5 values are generated based on different file contents, when the configuration file of the target software needs to be synchronized, the initial MD5 value of the initial source configuration file of the target software and the current MD5 value of the current source configuration file are automatically obtained. Then, by determining whether the initial MD5 value of the initial source configuration file and the current MD5 value of the current source configuration file are the same, it is automatically determined whether the current source configuration file of the target software has been modified. If the initial MD5 value of the initial source configuration file and the current MD5 value of the current source configuration file are different, it means that the current source configuration file has been modified relative to the initial source configuration file, and the current source configuration file of the target software is automatically synchronized to the device where the second operating system is located. Since the entire synchronization process of the current source configuration file of the target software is automatically implemented without manual intervention, the efficiency and accuracy of configuration file synchronization can be effectively improved.

[0212] S508: Display the synchronization result of the current source configuration file of the target software.

[0213] The synchronization result includes synchronization success or synchronization failure.

[0214] Optionally, the synchronization result includes the synchronization policy, which helps the user to have a more comprehensive understanding of the synchronization status of the target software.

[0215] In this embodiment, by displaying the synchronization results of the current source configuration file of the target software, it helps the user understand the synchronization status of the configuration file of the target software, and thus determine whether manual synchronization is required to ensure that the target software can run normally on the second operating system, thereby helping to ensure the normal operation of the business.

[0216] The above is the first part of the embodiment of this application. Figures 7 and 8 , introduces the second part of the embodiment of this application.

[0217] Figure 7 FIG2 is a flow chart of another configuration file synchronization method according to an exemplary embodiment.

[0218] S701-S703: See above S501-S503.

[0219] Optionally, S704: based on the current MD5 value of the current source configuration file of the target software being the same as the initial MD5 value of the initial source configuration file, determining that the synchronization strategy for the current source configuration file is to synchronize the current source configuration file.

[0220] It should be noted that the implementation principle of S704 refers to the above S504 and S506 and will not be repeated here.

[0221] It is understandable that S704 is an optional step. That is, after the migration computer determines that the current MD5 value of the current source configuration file of the target software is the same as the initial MD5 value of the initial source configuration file, S704 can be skipped and S705 can be executed directly.

[0222] S705: Obtain the initial MD5 value of the target configuration file of the target software.

[0223] It is understandable that the target configuration file obtained when the target software is installed based on the second operating system is the initial target configuration file. The initial MD5 value of the target configuration file is an MD5 value determined based on the content of the initial target configuration file.

[0224] In some embodiments, the migration computing device obtains an initial MD5 value of a destination configuration file of the target software from the destination computing device.

[0225] In some other embodiments, the migration computing device stores the initial MD5 value of the target configuration file of the target software, and the migration computing device obtains the initial MD5 value of the target configuration file of the target software from a local cache.

[0226] It can be understood that the initial MD5 value of the destination configuration file of the target software stored in the migration computing device is obtained in advance by the migration computing device from the destination computing device.

[0227] The following describes, through S1 to S2, a process in which the migration computing device obtains the initial MD5 value of the target configuration file of the target software from the target computing device.

[0228] S1: Send a second acquisition request to the target computing device to request to obtain target configuration file information of the target software.

[0229] The target configuration file information of the target software includes the initial MD5 value of the target configuration file.

[0230] In some embodiments, the initial MD5 value of the destination configuration file is obtained from the RPM database of the second operating system.

[0231] Optionally, the destination configuration file information of the target software further includes: at least one of the software name of the target software, the version number of the target software, the file identifier of the destination configuration file, the name of the destination configuration file, and the content of the destination configuration file.

[0232] It should be noted that other relevant descriptions of S1, such as the content included in the target software's destination configuration file information, the instructions included in the second acquisition request, etc., can refer to step 1 in the above S503. The principles of the two are the same and will not be repeated here.

[0233] S2: Receive the destination configuration file information of the destination software returned by the destination computing device.

[0234] In some embodiments, after receiving the destination configuration file information of the target software, the migration computing device saves the destination configuration file information of the target software in a destination JSON file.

[0235] For example, the target JSON file may include the following content:

[0236]

[0237]

[0238] In the above target JSON file, "target_os_pkg": "wget" is used to indicate the name of the target software installed based on the second operating system, and "1.20.3-3.fos22.x86_64" is used to indicate the version number of the target software installed based on the second operating system. "children" is used to indicate the configuration file child items of the target software. "target_os_config_file": " / etc / wegtrc" is used to indicate the name of the target software's destination configuration file. "target_file_content": "file content" is used to indicate the content of the target software's destination configuration file. "target_file_md5": "md5" is used to indicate the initial MD5 value of the target software's destination configuration file.

[0239] Since the version number of the target software installed based on the first operating system is "1.14-18.el7.x86_64", and the version number of the target software installed based on the second operating system is "1.20.3-3.fos22.x86_64", it can be seen that the target software has been updated.

[0240] It should be noted that other relevant instructions of S2, such as the content returned by the destination computer received by the migration computing device, the storage method of the destination configuration file information of multiple software, etc., can refer to step 2 in the above S503. The principles of the two are the same and will not be repeated here.

[0241] Optionally, the configuration file synchronization method may further include: determining the target JSON file according to whether the initial MD5 value of the destination configuration file is the same as the initial MD5 value of the source configuration file.

[0242] The target JSON file includes the synchronization operation type of the source configuration file.

[0243] For example, the target JSON file may include the following content:

[0244]

[0245] In the above target JSON file, "conclusion": "Sync operation type" is used to indicate the synchronization operation type of the current source configuration file of the target software.

[0246] S706: Determine whether the initial MD5 value of the destination configuration file is the same as the initial MD5 value of the original source configuration file.

[0247] If the determination result is yes, then execute S707. If the determination result is no, then execute S709.

[0248] It is understandable that the initial MD5 value of the original source configuration file was generated earlier than the initial MD5 value of the destination configuration file. Therefore, if the two are different, the version of the target software installed on the first operating system is different from the version of the target software installed on the second operating system. In other words, the target software has been updated, and the version of the target software installed on the second operating system is higher than the version of the target software installed on the first operating system.

[0249] like Figure 8 As shown, another synchronization schematic diagram of the current source configuration file of the target software.

[0250] See also Figure 8 If the result is yes, it means that the target software has not been updated, that is, the version of the target software in the second operating system is the same as the version of the target software in the first operating system. Based on this, the synchronization operation type can be determined as the current source configuration file overwriting the target configuration file (i.e., S707). This helps to avoid storing duplicate configuration files on the device where the second operating system is located, which would occupy storage space.

[0251] On the contrary, if the determination result is no, it means that the target software has been updated, that is, the version of the target software in the second operating system is different from the version of the target software in the first operating system, and the version of the target software in the second operating system is higher than the version of the target software in the first operating system. Based on this, it can be determined that the synchronization operation type is to save the current source configuration file and the destination configuration file (i.e., S709), that is, the current source configuration file does not overwrite the destination configuration file, so that two different versions of the configuration files of the target software are saved on the device where the second operating system is located at the same time. In this way, when the target software fails, the cause of the failure can be determined by comparing the two different versions of the configuration files, thereby troubleshooting the problem. For example, the difference items in the two different versions of the configuration files can be compared, and the difference items can be synchronized as needed, so that the correct difference items can be used when running the target software based on the second operating system, thereby troubleshooting the problem.

[0252] Optionally, S707: Determine that the synchronization operation type of the current source configuration file is that the current source configuration file overwrites the target configuration file.

[0253] It is understandable that when the synchronization operation type is that the current source configuration file overwrites the target configuration file, after synchronizing the current source configuration file to the device where the second operating system is located, the device where the second operating system is located only includes the current source configuration file of the target software.

[0254] It should be noted that S707 is an optional step. That is, if the judgment result of S706 is yes, the migration computing device can skip S707 and directly execute S708.

[0255] S708: Synchronize the current source configuration file to the device where the second operating system is located, and make the current source configuration file overwrite the destination configuration file.

[0256] In some embodiments, based on the synchronization operation type being that the current source configuration file overwrites the destination configuration file, when the migration computing device directly sends the current source configuration file to the device running the second operating system, the second operating system device, upon receiving the current source configuration file, stores the current source configuration file in the same folder as the destination configuration file. Because the current source configuration file has the same name as the destination configuration file, the current source configuration file overwrites the destination configuration file. In other words, the device running the second operating system retains only the current source configuration file.

[0257] Optionally, S709: determining that the synchronization operation type of the current source configuration file is saving the current source configuration file and the destination configuration file.

[0258] It can be understood that the synchronization operation type is to save the current source configuration file and the destination configuration file, that is, when the current source configuration file does not overwrite the destination configuration file, after sending the current source configuration file to the device where the second operating system is located, the device where the second operating system is located simultaneously saves the current source configuration file and the destination configuration file of the target software.

[0259] It should be noted that S709 is an optional step. That is, if the judgment result of S706 is no, the migration computing device can skip S709 and directly execute S710.

[0260] S710: Synchronize the current source configuration file to the device where the second operating system is located, and enable the device where the second operating system is located to save the current source configuration file and the destination configuration file at the same time.

[0261] In some embodiments, based on the synchronization operation type of saving the current source configuration file and the destination configuration file, the migration computing device can modify the name of the current source configuration file or the name of the destination configuration file, and then synchronize the current source configuration file to the device where the second operating system is located. In this way, the previous source configuration file will not overwrite the destination configuration file, and the device where the second operating system is located will save the current source configuration file and the destination configuration file at the same time.

[0262] In the above embodiment, when it is necessary to synchronize the current source configuration file to the device where the second operating system is located, it is determined whether the target software is updated by checking whether the initial MD5 value of the initial source configuration file of the target software is the same as the destination MD5 value of the target software, thereby determining the synchronization operation type of the current source configuration file, including whether the current source configuration file overwrites the destination configuration file or saves the current source configuration file and the destination configuration file, and based on the synchronization operation type, the current source configuration file is first synchronized with the device where the second operating system is located. In this way, after the current source configuration file is synchronized to the device where the second operating system is located, the destination configuration file obtained when the new version of the target software is installed based on the second operating system can be retained, which helps to ensure that the version of the configuration file on the device where the second operating system is located matches the version of the target software, thereby helping to improve the reliability and stability of the target software running on the device where the second operating system is located.

[0263] S711: See above S508.

[0264] The above is the second part of the embodiment of this application. Figures 9 and 10 , introduces the third part of the embodiments of this application.

[0265] Figure 9 FIG. 1 is a flow chart of another configuration file synchronization method according to an exemplary embodiment. Exemplarily, the method includes S901 to S912.

[0266] S901-S905: See above S701-S705.

[0267] Optionally, S906: based on the difference between the initial MD5 value of the destination configuration file and the initial MD5 value of the original source configuration file, determine that the synchronization operation type of the current source configuration file is to save the current source configuration file and the destination configuration file.

[0268] It should be noted that the implementation principle of S906 refers to the above S706 and S709 and will not be repeated here.

[0269] It is understandable that S906 is an optional step. That is, after the migration computing device determines that the initial MD5 value of the destination configuration file of the target software is the same as the initial MD5 value of the initial source configuration file, S906 can be skipped and S907 can be directly executed.

[0270] Optionally, the configuration file synchronization method further includes: determining a target JSON file according to the file identifier of the target configuration file, wherein the target JSON file includes a configuration file modification method.

[0271] In some embodiments, if the file identifier indicates that the name of the destination configuration file before the target software is updated is to be modified, the configuration file modification method is to modify the name of the current source configuration file. If the file identifier indicates that the name of the destination configuration file after the target software is updated is to be modified, the configuration file modification method is to modify the name of the destination configuration file. In other words, the configuration file modification method includes modifying the name of the current source configuration file or modifying the name of the destination configuration file.

[0272] For example, the target JSON file may include the following content:

[0273]

[0274] In the above target JSON file, "conclusion": "Configuration file modification method" is used to indicate that the configuration file modification method includes modifying the name of the current source configuration file or modifying the name of the destination configuration file.

[0275] Optionally, the configuration file synchronization method includes: the migration computing device responds to the synchronization operation type of the current source configuration file being to save the current source configuration file and the destination configuration file, and based on the update operation corresponding to the destination configuration file indicated by the file identifier of the destination configuration file, modifies the name of the current source configuration file or the name of the destination configuration file.

[0276] In some embodiments, based on the update operation corresponding to the destination configuration file indicated by the file identifier of the destination configuration file, the name of the current source configuration file or the name of the destination configuration file is modified, including the following S907-S911.

[0277] S907: Determine whether the update operation corresponding to the target configuration file indicated by the file identifier includes the second operation or the third operation.

[0278] If the determination result is that the second operation is included, S908 is executed; if the determination result is that the third operation is included, S910 is executed.

[0279] The second operation includes modifying the name of the target configuration file before the target software is updated. The third operation includes modifying the name of the target configuration file after the target software is updated.

[0280] Exemplarily, if the file identifier of the destination configuration file includes %config, this indicates that the update operation for the destination configuration file is the second operation. Based on this, when updating the target software based on the second operating system, the name of the destination configuration file before the target software update is modified to prevent the pre-update destination configuration file from being overwritten by the updated destination configuration file. In other words, when the target software is updated based on the second operating system, the name of the new version of the destination configuration file is retained.

[0281] like Figure 10 As shown, it is another synchronization schematic diagram of the current source configuration file of the target software.

[0282] See also Figure 10 Since the version of the target software installed by the first operating system is lower than the version of the target software installed based on the second operating system, and the file identifier indicates the second operation, it means that when the target software is updated based on the second operating system, the name of the destination configuration file before the target software is updated is modified. On this basis, the configuration file modification method is determined to be to modify the name of the current source configuration file of the target software (i.e., S908), thereby ensuring that after synchronizing the current source configuration file, the name of the destination configuration file of the target software on the device where the second operating system is located matches the usage policy of the target software by the second operating system, that is, the name of the new version of the destination configuration file is retained, which helps to ensure the operational stability of the target software.

[0283] Exemplarily, if the file identifier of the destination configuration file includes %config(noreplace), this indicates that the update operation for the destination configuration file is the third operation. Based on this, when updating the target software based on the second operating system, the name of the updated destination configuration file of the target software is modified to prevent the updated destination configuration file from overwriting the pre-update destination configuration file. In other words, when the target software is updated based on the second operating system, the name of the old version of the destination configuration file is retained.

[0284] See also Figure 10 Since the version of the target software installed by the first operating system is lower than the version of the target software installed based on the second operating system, and the file identifier indicates the third operation, it means that when the target software is updated based on the second operating system, the name of the updated destination configuration file of the target software is modified. On this basis, the configuration file modification method is determined to be to modify the name of the current source configuration file of the target software (i.e., S908), thereby ensuring that after synchronizing the current source configuration file, the name of the destination configuration file of the target software on the device where the second operating system is located matches the usage policy of the target software by the second operating system, that is, the name of the old version of the destination configuration file is retained, which helps to ensure the operational stability of the target software.

[0285] In some embodiments, the target configuration file information of the target software includes a file identifier of the target configuration file, which is obtained from an RPM database of the device where the second operating system is located.

[0286] Based on this, the second acquisition request also includes a third acquisition instruction. Exemplarily, the third acquisition instruction may include: rpm -q --qf "[%-15{=FILEFLAGS}%-36{FILENAMES}\n]" wget | grep / etc / wgetrc Based on this third acquisition instruction, the destination computing device returns the following: return value: 17 / etc / wgetrc . That is, the file identifier of the destination configuration file is 17.

[0287] The migration computing device stores an RPM enumeration type, which includes upgrade strategies indicated by different file identifiers. Based on the RPM enumeration type, it can be determined that the upgrade strategy corresponding to 17 is "=(1<<0)|(1<<4), %config(noreplace)", that is, the destination configuration file is not overwritten.

[0288] For example, the enumeration type of RPM may include the following:

[0289]

[0290] In the RPM enumeration type above, "<<" is a left shift operator. Exported file attributes is used to specify the exported file attributes. "ie rpmtag_fileflags" is the file identifier of the RPM configuration file. "enumrpmfileattrs_e" is used to enumerate the attributes of the RPM configuration file.

[0291] Optionally, S908: determining that the configuration file modification method is to modify the name of the current source configuration file of the target software.

[0292] It is understandable that S908 is an optional step. That is, if the migration computing device determines that the file identifier indicates that the update operation corresponding to the destination configuration file includes the second operation, the migration computing device can directly skip S908 and directly execute S909.

[0293] S909: Modify the name of the current source configuration file of the target software, and synchronize the current source configuration file to the device where the second operating system is located.

[0294] In one example, the migration computing device may modify the name of the current source configuration file to "*.rpmsave" and send the renamed source configuration file to the device where the second operating system is located.

[0295] Optionally, S910: Determine that the configuration file modification method is to modify the name of a target configuration file of the target software.

[0296] It is understandable that S910 is an optional step. That is, if the migration computing device determines that the file identifier indicates that the update operation corresponding to the target configuration file includes the third operation, the migration computing device can directly skip S910 and directly execute S911.

[0297] S911: Modify the name of the destination configuration file of the target software, and synchronize the source configuration file to the device where the second operating system is located.

[0298] In one example, the migration computing device sends a modification instruction to the destination computing device to instruct the destination computing device to modify the name of the destination configuration file. For example, the name of the destination configuration file can be modified to "*.rpmnew". After that, the migration computing device sends the current source configuration file with the unchanged name to the device where the second operating system is located.

[0299] In the above embodiment, when synchronizing the current source configuration file, the name of the current source configuration file or the name of the destination configuration file is determined to be modified through the update operation corresponding to the destination configuration file of the target software, so that the device where the second operating system is located can save the current source configuration file and the destination configuration file at the same time. This helps to ensure that after synchronizing the current source configuration file, the name of the destination configuration file of the target software on the device where the second operating system is located matches the update policy of the second operating system for the target software, such as retaining the name of the destination configuration file of the new version of the target software or including the name of the destination configuration file of the old version of the target software, thereby helping to ensure the operating stability of the target software.

[0300] S912: See above S711.

[0301] The above is the third part of the embodiment of this application. Figure 11 , introduces the fourth part of the embodiment of this application.

[0302] Figure 11 FIG1 is a flow chart of another configuration file synchronization method according to an exemplary embodiment.

[0303] Optionally, S1101-S1102: see above S701-S702.

[0304] S1103: Obtain the initial MD5 value of the destination configuration file and the initial MD5 value of the initial source configuration file of the target software.

[0305] It should be noted that the implementation process of "determining the initial MD5 value of the destination configuration file of the target software" in S1103 can be referred to S705 above, and the implementation process of "determining the initial MD5 value of the initial source configuration file of the target software" can be referred to S703 above, which will not be repeated here.

[0306] S1104-S1109: See S706-S711.

[0307] In the above embodiment, whether the target software is updated is determined by whether the initial MD5 value of the initial source configuration file of the target software is the same as the destination MD5 value of the target software, and thus whether the current source configuration file covers the destination configuration file is determined on the basis of synchronizing the current source configuration file. In this way, after the device where the second operating system is located synchronizes the current source configuration file, the destination configuration file obtained when the new version of the target software is installed based on the second operating system can be retained, which helps to improve the reliability and stability of the target software running on the device where the second operating system is located.

[0308] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to realize the above functions, the configuration file synchronization device includes a hardware structure and / or software module corresponding to the execution of each function. It should be easy for those skilled in the art to realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0309] In the embodiments of the present application, the configuration file synchronization device can be divided into functional modules according to the above method. For example, the configuration file synchronization device can include functional modules corresponding to the functional divisions, or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or software functional modules. It should be noted that the division of modules in the embodiments of the present application is schematic and is only a logical functional division. In actual implementation, other division methods may be used.

[0310] For example, Figure 12A possible structural diagram of the data processing device involved in the above embodiment (denoted as configuration file synchronization device 1200) is shown. The configuration file synchronization device 1200 includes a processing unit 1201 and a synchronization unit 1202. The processing unit 1201 is used to obtain the initial MD5 value of the initial source configuration file of the target software and the current MD5 value of the current source configuration file; wherein the initial source configuration file is the configuration file obtained by installing the target software based on the first operating system; the current source configuration file is the configuration file used when running the target software based on the first operating system; the name of the initial source configuration file is the same as the name of the current source configuration file. For example, Figure 5 As shown in S503, Figure 7 S703 shown, and Figure 9 S903 shown. Synchronization unit 1202 is used to synchronize the current source configuration file of the target software to the device where the second operating system is located if the initial MD5 value of the initial source configuration file is different from the current MD5 value of the current source configuration file. For example, Figure 5 S504-S507 shown, Figure 7 S704 shown, Figure 9 S904 shown.

[0311] Optionally, the processing unit 1201 is specifically used to: obtain the file identifier of the destination configuration file of the target software; the destination configuration file is the configuration file obtained by installing the target software based on the second operating system, and the name of the destination configuration file is the same as the name of the current source configuration file; determine whether the identifier of the destination configuration file indicates that the update operation of the destination configuration file includes a first operation; the first operation includes using the destination configuration file after the target software is updated to overwrite the destination configuration file before the target software is updated; if the identifier of the destination configuration file does not indicate that the update operation of the destination configuration file includes the first operation, obtain the initial MD5 value of the initial source configuration file of the target software and the current MD5 value of the current source configuration file.

[0312] Optionally, the synchronization unit 1202 is specifically used to: obtain the initial MD5 value of the configuration file; determine the synchronization operation type of the current source configuration file based on the initial MD5 value of the destination configuration file and the initial MD5 value of the initial source configuration file; the synchronization operation type includes the current source configuration file overwriting the destination configuration file or saving the current source configuration file and the destination configuration file; based on the synchronization operation type, synchronize the current source configuration file to the device where the second operating system is located.

[0313] Optionally, the synchronization unit 1202 is specifically used to: if the initial MD5 value of the initial source configuration file and the initial MD5 value of the destination configuration file are the same, the synchronization operation type is that the current source configuration file overwrites the destination configuration file; if the current MD5 value of the current source configuration file and the initial MD5 value of the destination configuration file are different, save the current source configuration file and the destination configuration file.

[0314] Optionally, if the synchronization operation type is to save the current source configuration file and the destination configuration file, the synchronization unit 1202 is specifically configured to modify the name of the current source configuration file or the destination configuration file based on the update operation corresponding to the destination configuration file indicated by the file identifier of the destination configuration file.

[0315] Optionally, the synchronization unit 1202 is also used to: if the file identifier of the destination configuration file indicates that the update operation corresponding to the destination configuration file is the second operation, modify the name of the current source configuration file; the second operation includes modifying the name of the destination configuration file before the target software is updated; if the file identifier of the destination configuration file indicates that the update operation corresponding to the destination configuration file is the third operation, modify the name of the destination source configuration file; the third operation includes modifying the name of the destination configuration file after the target software is updated.

[0316] Optionally, the file identifier of the destination configuration file indicates that the update operation corresponding to the destination configuration file is the second operation, including: if the file identifier of the destination configuration file includes %config, then the update operation corresponding to the destination configuration file is the second operation; and / or the file identifier of the destination configuration file indicates that the update operation corresponding to the destination configuration file is the third operation, including: if the file identifier of the destination configuration file includes %config(noreplace), then the update operation corresponding to the destination configuration file is the third operation.

[0317] Optionally, the configuration file synchronization apparatus 1200 further includes a display unit 1203. The display unit 1203 is configured to display the synchronization result of the current source configuration file of the target software; the synchronization result includes synchronization success or synchronization failure.

[0318] Optionally, the processing unit 1201 is further configured to: determine target software from at least one software in response to a target operation; wherein the target operation is used to indicate that the target software is determined as the software whose configuration file is to be synchronized.

[0319] For detailed descriptions of the above optional methods, please refer to the aforementioned method embodiments, which will not be repeated here. In addition, the explanations and beneficial effects of any of the above-mentioned configuration file synchronization devices 1200 can be referred to the corresponding method embodiments, which will not be repeated here.

[0320] The present application also provides a computing device, which includes a processor and a memory, the processor being connected to the memory, the memory storing computer-executable instructions, and the processor implementing the data processing method in the above embodiment when executing the computer-executable instructions. The present application does not impose any restrictions on the specific form of the computing device. For example, the computing device can be a terminal device or a network device. The terminal device can be referred to as: terminal, user equipment (UE), terminal device, access terminal, user unit, user station, mobile station, remote station, remote terminal, mobile device, user terminal, wireless communication device, user agent or user device, etc. The terminal device can be a mobile phone, augmented reality (AR) device, virtual reality (VR) device, tablet computer, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), etc. The network device can be a server, etc. The server can be a physical or logical server, or two or more physical or logical servers sharing different responsibilities and cooperating with each other to implement the various functions of the server.

[0321] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is run on a computer, the computer is caused to execute the method executed by any one of the computing devices provided above.

[0322] For explanations of the relevant contents and descriptions of the beneficial effects of any of the computer-readable storage media provided above, reference may be made to the corresponding embodiments described above, and no further details will be given here.

[0323] The embodiment of the present application also provides a chip. The chip integrates a control circuit and one or more ports for implementing the functions of the above-mentioned computing device. Optionally, the functions supported by the chip can be referred to above and will not be repeated here. A person of ordinary skill in the art will understand that all or part of the steps of implementing the above-mentioned embodiment can be completed by instructing the relevant hardware through a program. The program can be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a random access memory, etc. The above-mentioned processing unit or processor can be a central processing unit, a general-purpose processor, an application specific integrated circuit (ASIC), a microprocessor (digital signal processor, DSP), a field programmable gate array (FPGA) or other programmable logic device, transistor logic device, hardware component or any combination thereof.

[0324] The present application also provides a computer program product comprising instructions, which, when executed on a computer, causes the computer to perform any of the methods in the above embodiments. The computer program product comprises one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated therein. The available media may be magnetic media (e.g., floppy disk, hard disk, tape), optical media (e.g., DVD), or semiconductor media (e.g., SSD).

[0325] It should be noted that the above-mentioned devices for storing computer instructions or computer programs provided in the embodiments of the present application, such as but not limited to the above-mentioned memories, computer-readable storage media and communication chips, etc., are all non-transitory.

[0326] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more media that can be integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).

[0327] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art can understand and implement other changes to the disclosed embodiments by reviewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple situations. A single processor or other unit can implement several functions listed in the claims. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.

[0328] Although the present application has been described with reference to specific features and embodiments thereof, it will be apparent that various modifications and combinations may be made thereto without departing from the spirit and scope of the present application. Accordingly, this specification and the drawings are merely illustrative of the present application as defined by the appended claims and are deemed to cover any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, those skilled in the art may make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, the present application is intended to include such modifications and variations as fall within the scope of the claims of the present application and their equivalents.

Claims

1. A configuration file synchronization method, characterized in that: A first operating system is deployed on an original computing device, a second operating system is deployed on a destination computing device, target software installed based on the first operating system is also deployed on the original computing device, and the target software installed based on the second operating system is also deployed on the destination computing device, and the first operating system and the second operating system are different operating systems; Alternatively, a first operating system and a second operating system are deployed on an original computing device, the target software installed based on the first operating system is also deployed on the original device, and the target software installed based on the second operating system is also deployed on the original device, and the first operating system and the second operating system are different operating systems. The method includes: Obtaining a file identifier of a destination configuration file of the target software; the destination configuration file is a configuration file obtained by installing the target software based on the second operating system; Determining whether the identifier of the target configuration file indicates that the update operation of the target configuration file includes a first operation; the first operation includes using the target configuration file after the target software is updated to overwrite the target configuration file before the target software is updated; If the identifier of the target configuration file does not indicate that the update operation of the target configuration file includes the first operation, obtaining an initial MD5 value of an initial source configuration file of the target software and a current MD5 value of a current source configuration file; The initial source configuration file is a configuration file obtained by installing the target software based on the first operating system; the current source configuration file is a configuration file used when running the target software based on the first operating system; the name of the initial source configuration file is the same as the name of the current source configuration file, and the name of the current source configuration file is the same as the name of the destination configuration file; If the initial MD5 value of the initial source configuration file is different from the current MD5 value of the current source configuration file, obtaining the initial MD5 value of the destination configuration file; Determining a synchronization operation type of the current source configuration file based on an initial MD5 value of the destination configuration file and an initial MD5 value of the initial source configuration file; the synchronization operation type includes the current source configuration file overwriting the destination configuration file or saving the current source configuration file and the destination configuration file; Based on the synchronization operation type, the current source configuration file is synchronized to the device where the second operating system is located.

2. The method according to claim 1, characterized in that The determining the synchronization operation type of the initial source configuration file according to the initial MD5 value of the destination configuration file and the initial MD5 value of the initial source configuration file includes: If the initial MD5 value of the initial source configuration file is the same as the initial MD5 value of the target configuration file, the synchronization operation type is that the current source configuration file overwrites the target configuration file; If the current MD5 value of the current source configuration file is different from the initial MD5 value of the destination configuration file, the current source configuration file and the destination configuration file are saved.

3. The method according to claim 1 or 2, characterized in that If the synchronization operation type is to save the current source configuration file and the destination configuration file, before synchronizing the current source configuration file to the device where the second operating system is located based on the synchronization operation type, the method further includes: Based on the update operation corresponding to the destination configuration file indicated by the file identifier of the destination configuration file, the name of the current source configuration file or the name of the destination configuration file is modified.

4. The method according to claim 3, characterized in that The updating operation of the destination configuration file indicated by the file identifier of the destination configuration file, modifying the name of the current source configuration file or the destination configuration file, includes: If the file identifier of the target configuration file indicates that the update operation corresponding to the target configuration file is the second operation, modifying the name of the current source configuration file; the second operation includes modifying the name of the target configuration file before the target software is updated; If the file identifier of the destination configuration file indicates that the update operation corresponding to the destination configuration file is the third operation, modify the name of the destination source configuration file; the third operation includes modifying the name of the destination configuration file after the target software is updated.

5. The method according to claim 4, characterized in that The file identifier of the destination configuration file indicates that the update operation corresponding to the destination configuration file is the second operation, including: if the file identifier of the destination configuration file includes %config, then the update operation corresponding to the destination configuration file is the second operation; and / or The file identifier of the destination configuration file indicates that the update operation corresponding to the destination configuration file is the third operation, including: if the file identifier of the destination configuration file includes %config (noreplace), then the update operation corresponding to the destination configuration file is the third operation.

6. The method according to claim 1 or 2, characterized in that The method further comprises: The synchronization result of the current source configuration file is displayed; wherein the synchronization result includes synchronization success or synchronization failure.

7. The method according to claim 1 or 2, characterized in that Before obtaining the initial MD5 value of the initial source configuration file and the current MD5 value of the current source configuration file of the target software, the method further includes: The target software is determined from at least one software in response to a target operation; wherein the target operation is used to indicate that the target software is determined as the software whose configuration file is to be synchronized.

8. A computing device, characterized in that include: processor and memory; The processor is electrically connected to the memory; The memory is used to store computer-executable instructions, and the processor executes the computer-executable instructions stored in the memory to enable the computing device to implement the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Automatic removing method and device of system configuration items

    CN102369713A

  • Method and system for game numerical synchronization

    CN109062592A

  • File synchronization method and terminal device

    CN109189749A

  • Configuration file detection method, system and equipment based on software monitoring and medium

    CN109766235A