CN-121996279-A - Configuration file upgrading method
Abstract
The invention provides a method for upgrading a configuration file, which comprises the step S01 of backing up original counter software data. And S02, installing the counter software with the appointed version. And S03, restoring to the position of the current counter software configuration item through the configuration item. Step S04, upgrading adopts inter-version increment upgrading. Step S05, executing a preprocessing script for incremental upgrades among each version. And S06, changing configuration items by using the field-specific format file. Step S07, executing the process flow of the upgrade ending, entering step S05, completing the execution, entering the next increment upgrade, and repeating the iteration until all increment updating and updating are completed. The invention can automatically upgrade configuration under the upgrade of the cross-multi-version complex condition, and ensures the normal operation of software and the inheritance of characteristic configuration items. Configuration change is only needed when the configuration is changed, so that upgrade logic is prevented from being written between each version and the version upgrade black hole is avoided.
Inventors
- Qin Diexuan
- Hu Diefan
Assignees
- 南京艾科朗克信息科技有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20241107
Claims (7)
- 1. The method for upgrading the configuration file is characterized by comprising the following steps of: step S01, original counter software data are backed up; step S02, installing counter software of a designated version; step S03, restoring the configuration item in the step S01 to the position of the current counter software configuration item; Step S04, starting an upgrading step, wherein the upgrading adopts inter-version increment upgrading; Step S05, for incremental upgrade among each version, executing a preprocessing script, and performing specific processing when the configuration item has specific condition processing; step S06, carrying out configuration change, and carrying out change of configuration items by using a field-specific format file; Step S07, executing the process flow of the upgrade ending, entering step S05, completing the execution, entering the next increment upgrade, and repeating the iteration until all increment updating and updating are completed.
- 2. The method for upgrading a configuration file according to claim 1, wherein in step S03, the backed-up configuration item in step S01 is restored to the current installation directory.
- 3. The method for upgrading a configuration file according to claim 1, wherein in step S04, incremental updating is adopted, and a change description configuration file is added each time the configuration changes, and an inverse change description file of the next large version of the upgrade is synchronously constructed when the patch version configuration changes.
- 4. The method for upgrading a configuration file according to claim 1, wherein in step S06, the configuration change method is that the configuration is described by a customized in-domain dedicated file format, wherein the file format comprises addition, deletion and modification of configuration items in the configuration file.
- 5. The method for upgrading a configuration file according to claim 4, wherein the specific method in step S06 is to create the file if there is an addition of the file by parsing the incremental upgrade configuration, or delete the file if there is a deletion of the file content, delete the specified item of the specified location according to the description if there is a deletion of the file content, modify the specified configuration item of the specified location if there is a modification, not modify the configuration item during the upgrade, and add the item to the specified location according to the description if there is an addition of the counter software configuration item.
- 6. The method for upgrading a configuration file according to claim 5, wherein the adding operation is performed first when the configuration item is added.
- 7. The method for upgrading a configuration file according to claim 5, wherein if a configuration item of the new operation exists in the backup, reading the backup configuration item to update a value of the configuration of the new operation.
Description
Configuration file upgrading method Technical Field The invention belongs to the field of general software, and is currently applied to a futures counter software upgrading process. Relates to a method for upgrading a configuration file. Background In the process of software version iteration, a large number of customized configuration items exist due to higher customization degree of counter software, and a large number of configuration changes can exist when the upgrade version span is larger. The manual modification of the configuration items may have the possibility of missing and incorrect modifications, with a certain probability of error in the case of a large number of upgrades, resulting in counter anomalies affecting the transaction. Disclosure of Invention 1. The technical problems to be solved are as follows: during the version iteration of the software, there are a large number of custom configuration items, and there is a possibility that manual modification of the configuration items may be missed and erroneously modified. 2. The technical scheme is as follows: in order to solve the above problems, the present invention provides a method for upgrading a configuration file, comprising the following steps: And step S01, backing up original counter software data. And S02, installing the counter software with the appointed version. Step S03, restoring the configuration item in the step S01 to the position of the current counter software configuration item. Step S04, starting an upgrading step, wherein the upgrading adopts inter-version increment upgrading. And step S05, executing a preprocessing script for incremental upgrade among each version, and performing specific processing when the configuration item has specific conditional processing. And S06, carrying out configuration change, and carrying out change of configuration items by using the field-specific format file. Step S07, executing the process flow of the upgrade ending, entering step S05, completing the execution, entering the next increment upgrade, and repeating the iteration until all increment updating and updating are completed. In the step S03, the specific method is that the backed-up configuration items in the step S01 are restored to the current installation catalog. In step S04, incremental updating is adopted, and a change description configuration file is added each time the configuration changes, and simultaneously, an inverse change description file of the next large version is synchronously constructed and upgraded when the patch version configuration changes. In step S06, the configuration change method is that the configuration is described by a customized in-domain special file format, wherein the file format comprises the addition, deletion and modification of the file and the addition, deletion and modification of the configuration items in the configuration file. The specific method of the step S06 is that the file is created if the increment upgrading configuration is analyzed, if the increment of the file exists, the file is deleted, if the increment of the file exists, the designated item of the designated position is deleted according to the description, if the increment of the file exists, the designated configuration item of the designated position is modified if the modification exists, the configuration item is not modified in the upgrading process, and if the increment of the counter software configuration item exists, the new item is added to the designated position according to the description. When the configuration item is newly added, the new operation is executed. If the configuration item of the new operation exists in the backup, reading the backup configuration item to update the value of the configuration of the new operation. 3. The beneficial effects are that: The invention discloses a method for upgrading a configuration file, which can automatically upgrade configuration under the upgrade of cross-multi-version complex conditions, avoid operation abnormality caused by manual configuration modification, avoid the problem of losing a characteristic configuration item caused by simple configuration item coverage, and ensure the normal operation of software and inheritance of the characteristic configuration item. Meanwhile, incremental updating is used, namely configuration change is only needed when the configuration change is carried out, so that writing of upgrading logic between each version is avoided, and version upgrading black holes are formed. Drawings Fig. 1 is a flow chart of the present invention. Detailed Description The invention will now be described in detail with reference to the drawings and examples. As shown in FIG. 1, the method for upgrading the configuration file is characterized by comprising the following steps: And step S01, backing up original counter software data. And S02, installing the counter software with the appointed version. Step S03, restoring the configurat