CN113885957A - Configuration file processing method, terminal device, server and storage medium - Google Patents
Configuration file processing method, terminal device, server and storage medium Download PDFInfo
- Publication number
- CN113885957A CN113885957A CN202111156650.1A CN202111156650A CN113885957A CN 113885957 A CN113885957 A CN 113885957A CN 202111156650 A CN202111156650 A CN 202111156650A CN 113885957 A CN113885957 A CN 113885957A
- Authority
- CN
- China
- Prior art keywords
- configuration file
- server
- cloud
- cloud configuration
- changed
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 20
- 238000000034 method Methods 0.000 claims description 36
- 238000012545 processing Methods 0.000 claims description 21
- 238000001514 detection method Methods 0.000 claims description 5
- 238000010586 diagram Methods 0.000 description 8
- 238000004891 communication Methods 0.000 description 6
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000004590 computer program Methods 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
- G06F9/4451—User profiles; Roaming
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a processing method of a configuration file, a terminal device, a server and a storage medium, wherein the processing method of the configuration file comprises the following steps: if the local configuration file is detected to be changed, sending request information to a server, wherein if the server receives the request information, sending a cloud configuration file to the terminal equipment; and receiving the cloud configuration file, and covering the changed local configuration file by using the cloud configuration file so as to restore the local configuration file to a state before changing. The invention aims to solve the problem that the configuration file is damaged when being maliciously changed.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method for processing a configuration file, a terminal device, a server, and a storage medium.
Background
A Configuration File (Configuration File) is a computer File that is used to configure parameters for a computer program and to initialize the parameters of a terminal device such as a computer, and is essentially a File that contains information required to successfully operate the program, which is structured in a specific manner. The configuration file is not hard-coded in the program, but can be configured arbitrarily by the user, and the configuration file is usually stored in a plain text file locally in the terminal device, and the user can change the parameter configuration of the terminal device by changing the locally stored configuration file and then loading the changed configuration file. However, since the configuration file can be changed at will, when the configuration file is maliciously changed, it may cause damage to the business system.
Disclosure of Invention
The invention mainly aims to provide a configuration file processing method, terminal equipment, a server and a storage medium, and aims to solve the problem that a service system is damaged when a configuration file is maliciously changed.
In order to achieve the above object, the present invention provides a method for processing a configuration file, where the method for processing a configuration file includes:
if the local configuration file is detected to be changed, sending request information to a server, wherein if the server receives the request information, sending a cloud configuration file to the terminal equipment;
and receiving the cloud configuration file, and covering the changed local configuration file by using the cloud configuration file so as to restore the local configuration file to a state before changing.
Optionally, if it is detected that the local configuration file is changed, sending request information to a server, where before the step of sending the cloud configuration file to the terminal device, if the server receives the request information, the method further includes:
receiving a file change command;
if the file change command is a cloud configuration file change command, acquiring the cloud configuration file from the server;
changing the cloud configuration file;
sending the changed cloud configuration file to the server, wherein if the server receives the changed cloud configuration file, the changed cloud configuration file is used for covering the cloud configuration file;
and if the file change command is a local configuration file change command, executing the step of sending request information to a server if the local configuration file is detected to be changed, wherein if the server receives the request information, the step of sending a cloud configuration file to the terminal equipment.
Optionally, the sending the changed cloud configuration file to the server, wherein if the server receives the changed cloud configuration file, after the step of covering the cloud configuration file with the changed cloud configuration file, the method further includes:
and if an updating command of the configuration file is received, acquiring the cloud configuration file from a server, and covering the local configuration file with the cloud configuration file.
Optionally, after the step of changing the cloud configuration file, the method further includes:
acquiring change information of the cloud configuration file, wherein the change information comprises at least one of change time, change content and version information of the cloud configuration file;
and updating the change log of the cloud configuration file according to the change information.
Optionally, the method for processing the configuration file includes:
receiving request information sent by terminal equipment;
acquiring a cloud configuration file according to the request information;
and sending the cloud configuration file to the terminal equipment, wherein if the terminal equipment receives the cloud configuration file, the changed local configuration file is covered by the cloud configuration file.
Optionally, the step of obtaining the cloud configuration file according to the request information includes:
and acquiring the cloud configuration file from a data center of the server according to the request information, wherein the data center is a file server or an open source middleware.
Optionally, the method for processing the configuration file further includes:
if the cloud configuration file is detected to be updated, generating an updating command of the cloud configuration file;
and sending the update command to the terminal equipment, wherein if the terminal equipment receives the update command, the cloud configuration file is obtained from the server, and the local configuration file is covered by the cloud configuration file.
In addition, to achieve the above object, the present invention further provides a terminal device, including:
the detection module is used for sending request information to a server if the local configuration file is detected to be changed, wherein the server sends a cloud configuration file to the terminal equipment when receiving the request information;
and the coverage module is used for receiving the cloud configuration file and covering the changed local configuration file by using the cloud configuration file so as to restore the local configuration file to a state before changing.
In addition, in order to achieve the above object, the present invention further provides a terminal device, where the terminal device includes a memory, a processor, and a processing program of a configuration file stored in the memory and executable on the processor, and the processing program of the configuration file implements the steps of the configuration file processing method as described above when executed by the processor.
In addition, to achieve the above object, the present invention further provides a server, including:
the receiving module is used for receiving request information sent by the terminal equipment;
the acquisition module is used for acquiring a cloud configuration file according to the request information;
and the sending module is used for sending the cloud configuration file to the terminal equipment, wherein if the terminal equipment receives the cloud configuration file, the changed local configuration file is covered by the cloud configuration file.
In addition, in order to achieve the above object, the present invention further provides a server, where the server includes a memory, a processor, and a processing program of a configuration file stored in the memory and executable on the processor, and the processing program of the configuration file implements the steps of the configuration file processing method as described above when executed by the processor.
Furthermore, to achieve the above object, the present invention also provides a computer readable storage medium, which stores thereon a processing program of a configuration file, the processing program of the configuration file, when executed by a processor, implementing the steps of the processing method of the configuration file as described above.
The invention provides a processing method of a configuration file, a terminal device, a server and a storage medium, wherein the terminal device sends request information to the server if detecting that a local configuration file is changed, wherein if the server receives the request information, the server sends a cloud configuration file to the terminal device; and receiving the cloud configuration file, and covering the changed local configuration file with the cloud configuration file so as to restore the local configuration file to a state before changing. Therefore, even if the configuration file stored locally on the terminal equipment is maliciously changed, the normal and reliable configuration file can be timely acquired from the server to cover the configuration file which is maliciously changed locally, so that the reliability of the configuration file stored locally on the terminal equipment is ensured, the service system is prevented from being damaged due to the fact that the configuration file is maliciously changed, and the problem that the service system is damaged when the configuration file is maliciously changed is effectively solved.
Drawings
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Fig. 1 is a schematic diagram of a hardware architecture of a terminal device/server according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart diagram illustrating a first embodiment of a method for processing a configuration file according to the present invention;
FIG. 3 is a flowchart illustrating a second embodiment of a method for processing a configuration file according to the present invention;
FIG. 4 is a flowchart illustrating a method for processing a configuration file according to a third embodiment of the present invention;
FIG. 5 is a schematic diagram of a configuration file processing system according to an embodiment of the present invention;
fig. 6 is a schematic block diagram of a terminal device according to an embodiment of the present invention;
fig. 7 is a schematic block diagram of a server according to an embodiment of the present invention.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As an implementation solution, referring to fig. 1, fig. 1 may be a schematic diagram of a hardware architecture of a terminal device according to an embodiment of the present invention, as shown in fig. 1, the terminal device may include a processor 101, for example, a CPU, a memory 102, and a communication bus 103, where the communication bus 103 is used to implement connection communication between these modules.
The memory 102 may be a high-speed RAM memory or a non-volatile memory (e.g., a disk memory). As shown in fig. 1, a processing program of a configuration file may be included in a memory 102 as a readable storage medium; and the processor 101 may be configured to invoke a handler of the configuration file stored in the memory 102 and perform the following operations:
if the local configuration file is detected to be changed, sending request information to a server, wherein if the server receives the request information, sending a cloud configuration file to the terminal equipment;
and receiving the cloud configuration file, and covering the changed local configuration file by using the cloud configuration file so as to restore the local configuration file to a state before changing.
Further, the processor 101 may be configured to invoke a handler of the configuration file stored in the memory 102 and perform the following operations:
receiving a file change command;
if the file change command is a cloud configuration file change command, acquiring the cloud configuration file from the server;
changing the cloud configuration file;
sending the changed cloud configuration file to the server, wherein if the server receives the changed cloud configuration file, the changed cloud configuration file is used for covering the cloud configuration file;
and if the file change command is a local configuration file change command, executing the step of sending request information to a server if the local configuration file is detected to be changed, wherein if the server receives the request information, sending a cloud configuration file to the terminal equipment.
Further, the processor 101 may be configured to invoke a handler of the configuration file stored in the memory 102 and perform the following operations:
and if an updating command of the configuration file is received, acquiring the cloud configuration file from a server, and covering the local configuration file with the cloud configuration file.
Further, the processor 101 may be configured to invoke a handler of the configuration file stored in the memory 102 and perform the following operations:
acquiring change information of the cloud configuration file, wherein the change information comprises at least one of change time, change content and version information of the cloud configuration file;
and updating the change log of the cloud configuration file according to the change information.
As an implementation solution, referring to fig. 1, fig. 1 may be a schematic diagram of a hardware architecture of a server according to an embodiment of the present invention, as shown in fig. 1, the server may include a processor 101, for example, a CPU, a memory 102, and a communication bus 103, where the communication bus 103 is used for implementing connection communication between these modules.
The memory 102 may be a high-speed RAM memory or a non-volatile memory (e.g., a disk memory). As shown in fig. 1, a processing program of a configuration file may be included in a memory 102 as a readable storage medium; and the processor 101 may be configured to invoke a handler of the configuration file stored in the memory 102 and perform the following operations:
receiving request information sent by terminal equipment;
acquiring a cloud configuration file according to the request information;
and sending the cloud configuration file to the terminal equipment, wherein if the terminal equipment receives the cloud configuration file, the changed local configuration file is covered by the cloud configuration file.
Further, the processor 101 may be configured to invoke a handler of the configuration file stored in the memory 102 and perform the following operations:
and acquiring the cloud configuration file from a data center of the server according to the request information, wherein the data center is a file server or an open source middleware.
Further, the processor 101 may be configured to invoke a handler of the configuration file stored in the memory 102 and perform the following operations:
if the cloud configuration file is detected to be updated, generating an updating command of the cloud configuration file;
and sending the update command to the terminal equipment, wherein if the terminal equipment receives the update command, the cloud configuration file is obtained from the server, and the local configuration file is covered by the cloud configuration file.
Referring to fig. 2, fig. 2 is a schematic flow chart of a method for processing a configuration file according to a first embodiment of the present invention, where the method for processing the configuration file includes the following steps:
step S10, if the local configuration file is detected to be changed, request information is sent to a server, wherein if the server receives the request information, a cloud configuration file is sent to the terminal device;
in this embodiment, an execution main body of the processing method of the configuration file is a terminal device, optionally, the terminal device may be a fixed terminal such as a desktop computer, or may also be a mobile terminal such as a laptop, a tablet computer, a smart phone, and the like, in other embodiments, the terminal device may be determined according to actual needs, and this embodiment does not limit this.
The terminal device stores a Configuration File (Configuration File), which is a computer File that is used to configure parameters for a computer program and to initialize the parameters of the terminal device, and the Configuration File is essentially a File that contains information required for successful operation of the program, and the information is configured in a specific manner. The configuration file is not hard-coded in the program, but can be configured arbitrarily by the user, and the configuration file is usually stored in a plain text file locally in the terminal device, and the user can change the parameter configuration of the terminal device by changing the locally stored configuration file and then loading the changed configuration file.
In this embodiment, the terminal device may detect whether a local configuration file is changed, where the local configuration file is a configuration file stored in a local plain text file of the terminal device; detecting whether the local configuration file is changed refers to detecting whether the local configuration file has operations of modification or deletion.
Optionally, the terminal device may set a listening event for the local configuration file to detect whether the local configuration file is changed in real time, and the terminal device may detect whether the local configuration file is changed in real time or at regular time by listening to the client Agent. The monitoring object of the Agent can be added in a mode of configuring parameters or configuration files by the Agent.
Optionally, if the Agent detects whether the local configuration file is changed at regular time, the terminal device may detect whether the local configuration file is changed at preset time intervals through the Agent, where the preset time intervals may be configured according to actual needs, and may generally support detection at the minute level, which is not limited in this embodiment.
In this embodiment, if the terminal device detects that the local configuration file is changed, the terminal device may obtain the cloud configuration file from the server, where the cloud configuration file is the same as the local configuration file before the change, and the cloud configuration file is a normally usable and reliable configuration file.
Optionally, the terminal device may acquire the cloud configuration file from a data center of the server if detecting that the local configuration file is changed. The server is deployed with a data center for storing a cloud configuration File, the data center may be a File server (File server), and the data center may also be an open source middleware, such as an ETCD.
Optionally, if the terminal device detects that the local configuration file is changed, the terminal device may obtain the cloud configuration file from a third-party independent server, where the third-party independent server may be a file server, or a common server deployed with an open source middleware, or a cloud server stored with the cloud configuration file.
Step S20, receiving the cloud configuration file, and covering the changed local configuration file with the cloud configuration file, so as to restore the local configuration file to a state before changing.
In this embodiment, the terminal device receives a cloud configuration file sent by the server, and after the terminal device obtains the cloud configuration file, the terminal device covers the modified local configuration file with the cloud configuration file, where the modified local configuration file is a local configuration file that is originally stored in a local plain text file of the terminal device and is modified and is replaced with the cloud configuration file, the modified local configuration file is deleted, the modified local configuration file does not exist in the local plain text file of the terminal device any more, and the cloud configuration file is used as a new local configuration file, that is, the local configuration file is restored to a state before modification.
Optionally, after the terminal device covers the changed local configuration file with the cloud configuration file, the cloud configuration file is loaded to update the parameter configuration of the terminal device.
In the technical scheme provided by this embodiment, if the terminal device detects that the local configuration file is changed, request information is sent to the server, wherein if the server receives the request information, the cloud configuration file is sent to the terminal device; and receiving the cloud configuration file, and covering the changed local configuration file with the cloud configuration file so as to restore the local configuration file to a state before changing. Therefore, even if the configuration file stored locally is maliciously changed, the normal and reliable configuration file can be timely acquired from the server to cover the configuration file which is maliciously changed locally, so that the reliability of the configuration file stored locally is ensured, the service system is prevented from being damaged due to the fact that the configuration file is maliciously changed, and the problem that the service system is damaged when the configuration file is maliciously changed is effectively solved.
Referring to fig. 3, fig. 3 is a flowchart illustrating a second embodiment of the method for processing a configuration file according to the present invention, where based on the first embodiment, the step of S10 further includes, before the step of:
step S30, receiving a file change command;
step S40, if the file change command is a cloud configuration file change command, acquiring the cloud configuration file from the server;
in this embodiment, if the terminal device detects that the local configuration file is changed, before the step of sending the request information to the server, the file change command is received, and if the file change command is the cloud configuration file change command, it indicates that the configuration file stored in the terminal device needs to be changed due to normal business requirements, the terminal device may obtain the cloud configuration file from the server, so as to change the cloud configuration file through the terminal device, and the specific process of obtaining the cloud configuration file from the server by the terminal device may refer to the content of the first embodiment, which is not described herein again.
Step S50, changing the cloud configuration file;
and after the terminal equipment acquires the cloud configuration file, the cloud configuration file is changed, and the changed cloud configuration file is a configuration file meeting the normal business requirements.
Optionally, after the terminal device acquires the cloud configuration file, the acquired cloud configuration file may be changed through a Web page at the front end.
Optionally, after the terminal device obtains the cloud configuration file, the cloud configuration file may be changed through a management control platform of the terminal device.
Step S60, sending the changed cloud configuration file to the server, wherein if the server receives the changed cloud configuration file, the changed cloud configuration file is used to cover the cloud configuration file;
and after the terminal equipment obtains the changed configuration file, sending the changed configuration file to the server, and if the server receives the changed cloud configuration file, covering the cloud configuration file stored in the server before by using the changed cloud configuration file.
Optionally, after the terminal device changes the cloud configuration file, change information of the cloud configuration file may be acquired, where the change information includes at least one of change time, change content, and version information of the cloud configuration file, and a change log of the cloud configuration file is updated according to the change information. Through change log record high in the clouds configuration file's change information, can trace to the change operation of high in the clouds configuration file for the change operation of high in the clouds configuration file is more normal, and is traceable, makes things convenient for new person to maintain, reduces the fortune maintenance cost.
Optionally, the terminal device sends the modified configuration file to the server, after the server uses the modified cloud configuration file to cover the cloud configuration file stored in the server before, the server may send an update command of the configuration file to the terminal device, and if the terminal device receives the update command of the configuration file, the server obtains the cloud configuration file from the server, covers the local configuration file with the cloud configuration file, and loads the cloud configuration file. This ensures that the configuration file stored in the terminal device is the latest configuration file.
It can be understood that, if the file change command is a local configuration file change command, the step of sending the request information to the server if the local configuration file is detected to be changed is executed, where if the server receives the request information, the step of sending the cloud configuration file to the terminal device may specifically refer to the contents of the first embodiment, and this embodiment is not described herein again.
In the technical scheme provided by this embodiment, the terminal device changes the cloud configuration file by acquiring the cloud configuration file from the server, sends the changed cloud configuration file to the server, and covers the cloud configuration file stored in the server before with the changed cloud configuration file if the server receives the changed cloud configuration file. The scheme can realize normal change operation when the local configuration file needs to be changed due to service requirements.
Referring to fig. 4, fig. 4 is a schematic flowchart illustrating a processing method of a configuration file according to a third embodiment of the present invention, where the processing method of the configuration file includes:
step S70, receiving request information sent by the terminal equipment;
in this embodiment, an execution main body of the method for processing the configuration file is a server, if the terminal device detects that the local configuration file is changed, request information of the cloud configuration file is generated and sent to the server, and the server receives the request information of the cloud configuration file sent by the terminal device.
Step S80, acquiring a cloud configuration file according to the request information;
and after the server acquires the request information of the cloud configuration file, acquiring the cloud configuration file according to the request information.
Optionally, the server may obtain the cloud configuration file from a data center of the server according to the request information, where the server is deployed with the data center for storing the cloud configuration file, the data center may be a file server, and the data center may also be an open-source middleware, such as an ETCD.
Optionally, if the server is a third-party independent server, the server may obtain the cloud configuration File from the storage space, where the third-party independent server may be a File server (File server), or a general server deployed with open source middleware, or a cloud server stored with the cloud configuration File.
Step S90, sending the cloud configuration file to the terminal device, wherein if the terminal device receives the cloud configuration file, the modified local configuration file is covered by the cloud configuration file.
The server sends the cloud configuration file to the terminal device after acquiring the cloud configuration file, and if the terminal device receives the cloud configuration file, the modified local configuration file is covered by the cloud configuration file.
Optionally, if the local configuration file stored in the terminal device needs to be changed according to normal service requirements, the terminal device may obtain the cloud configuration file from the server, change the cloud configuration file through the terminal device, and send the changed configuration file to the server, the server covers the cloud configuration file stored in the server before using the changed configuration file, if the server detects that the cloud configuration file is updated, an update command of the cloud configuration file is generated, the update command is sent to the terminal device, if the terminal device receives the update command, the cloud configuration file is obtained from the server, and the local configuration file is covered by the cloud configuration file.
In the technical scheme provided by this embodiment, the server obtains the cloud configuration file according to the request information by receiving the request information sent by the terminal device, and sends the cloud configuration file to the terminal device, wherein if the terminal device receives the cloud configuration file, the changed local configuration file is covered by the cloud configuration file. Even if the configuration file stored locally on the terminal device is maliciously changed, the normal and reliable configuration file can be timely obtained from the server to cover the configuration file which is maliciously changed locally, so that the reliability of the configuration file stored locally on the terminal device is guaranteed, the service system is prevented from being damaged due to the fact that the configuration file is maliciously changed, and the problem that the service system is damaged when the configuration file is maliciously changed is effectively solved.
In order to more clearly describe the technical solution of the present invention, the technical solution of the present invention is described below by a specific example.
Referring to fig. 5, fig. 5 is a schematic diagram of a configuration file processing system according to an embodiment of the present invention. As shown in fig. 5, the terminal device detects whether the monitored local configuration File is changed in real time or at regular time by monitoring the client Agent, acquires the cloud configuration File from a File server (File server) deployed in the server if the local configuration File is changed, and after acquiring the cloud configuration File, the terminal device covers the changed local configuration File with the cloud configuration File, and loads a cloud configuration File process.
The terminal equipment can obtain a cloud configuration file in the server, the obtained cloud configuration file is changed through a Web webpage, the changed cloud configuration file is sent to the server, the server covers the cloud configuration file stored by the server before with the changed cloud configuration file, an updating command of the configuration file is generated, the updating command is sent to the terminal equipment, the terminal equipment obtains the cloud configuration file from the server after obtaining the updating command, and the local configuration file stored locally is covered by the cloud configuration file.
Therefore, even if the configuration file stored locally is maliciously changed, the normal and reliable configuration file can be timely acquired from the server to cover the configuration file which is maliciously changed locally, so that the reliability of the configuration file stored locally is ensured, the service system is prevented from being damaged due to the fact that the configuration file is maliciously changed, and the problem that the service system is damaged when the configuration file is maliciously changed is effectively solved.
Based on the foregoing embodiment, referring to fig. 6, the present invention further provides a terminal device, where the terminal device includes:
the detection module 100 is configured to send request information to a server if it is detected that a local configuration file is changed, wherein if the server receives the request information, the detection module sends a cloud configuration file to the terminal device;
the overlay module 200 is configured to receive the cloud configuration file, and overlay the local configuration file after the change with the cloud configuration file, so that the local configuration file is restored to a state before the change.
Based on the foregoing embodiments, the present invention further provides a terminal device, where the terminal device may include a memory, a processor, and a processing program of a configuration file stored in the memory and executable on the processor, and when the processor executes the processing program of the configuration file, the steps of the configuration file processing method according to any one of the foregoing embodiments are implemented.
Based on the foregoing embodiment, referring to fig. 7, the present invention further provides a server, where the server includes:
a receiving module 300, configured to receive request information sent by a terminal device;
an obtaining module 400, configured to obtain a cloud configuration file according to the request information;
a sending module 500, configured to send the cloud configuration file to the terminal device, where if the terminal device receives the cloud configuration file, the changed local configuration file is covered by the cloud configuration file.
Based on the foregoing embodiments, the present invention further provides a server, where the server may include a memory, a processor, and a processing program of a configuration file stored in the memory and executable on the processor, and when the processor executes the processing program of the configuration file, the steps of the configuration file processing method according to any one of the foregoing embodiments are implemented.
Based on the foregoing embodiments, the present invention further provides a computer-readable storage medium, on which a processing program of a configuration file is stored, and when the processing program of the configuration file is executed by a processor, the steps of the method for processing the configuration file according to any one of the foregoing embodiments are implemented.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (12)
1. A processing method of a configuration file is applied to a terminal device, and comprises the following steps:
if the local configuration file is detected to be changed, sending request information to a server, wherein if the server receives the request information, sending a cloud configuration file to the terminal equipment;
and receiving the cloud configuration file, and covering the changed local configuration file by using the cloud configuration file so as to restore the local configuration file to a state before changing.
2. The method for processing the configuration file according to claim 1, wherein if it is detected that the local configuration file is changed, sending a request message to a server, wherein, before the step of sending the cloud configuration file to the terminal device if the server receives the request message, the method further comprises:
receiving a file change command;
if the file change command is a cloud configuration file change command, acquiring the cloud configuration file from the server;
changing the cloud configuration file;
sending the changed cloud configuration file to the server, wherein if the server receives the changed cloud configuration file, the changed cloud configuration file is used for covering the cloud configuration file;
and if the file change command is a local configuration file change command, executing the step of sending request information to a server if the local configuration file is detected to be changed, wherein if the server receives the request information, the step of sending a cloud configuration file to the terminal equipment.
3. The method for processing the configuration file according to claim 2, wherein the sending the changed cloud configuration file to the server, wherein if the server receives the changed cloud configuration file, after the step of overwriting the cloud configuration file with the changed cloud configuration file, the method further comprises:
and if an updating command of the configuration file is received, acquiring the cloud configuration file from a server, and covering the local configuration file with the cloud configuration file.
4. The method for processing the configuration file according to claim 2, wherein after the step of changing the cloud configuration file, the method further comprises:
acquiring change information of the cloud configuration file, wherein the change information comprises at least one of change time, change content and version information of the cloud configuration file;
and updating the change log of the cloud configuration file according to the change information.
5. A processing method of a configuration file is applied to a server, and the processing method of the configuration file comprises the following steps:
receiving request information sent by terminal equipment;
acquiring a cloud configuration file according to the request information;
and sending the cloud configuration file to the terminal equipment, wherein if the terminal equipment receives the cloud configuration file, the changed local configuration file is covered by the cloud configuration file.
6. The method for processing the configuration file according to claim 5, wherein the step of obtaining the cloud configuration file according to the request information comprises:
and acquiring the cloud configuration file from a data center of the server according to the request information, wherein the data center is a file server or an open source middleware.
7. The method for processing the configuration file according to claim 5, wherein the method for processing the configuration file further comprises:
if the cloud configuration file is detected to be updated, generating an updating command of the cloud configuration file;
and sending the update command to the terminal equipment, wherein if the terminal equipment receives the update command, the cloud configuration file is obtained from the server, and the local configuration file is covered by the cloud configuration file.
8. A terminal device, characterized in that the terminal device comprises:
the detection module is used for sending request information to a server if the local configuration file is detected to be changed, wherein the server sends a cloud configuration file to the terminal equipment if the request information is received;
and the coverage module is used for receiving the cloud configuration file and covering the changed local configuration file by using the cloud configuration file so as to restore the local configuration file to a state before changing.
9. A terminal device, characterized in that the terminal device comprises a memory, a processor and a processing program of a configuration file stored on the memory and executable on the processor, the processing program of the configuration file realizing the steps of the processing method of the configuration file according to any one of claims 1 to 4 when executed by the processor.
10. A server, characterized in that the server comprises:
the receiving module is used for receiving request information sent by the terminal equipment;
the acquisition module is used for acquiring a cloud configuration file according to the request information;
and the sending module is used for sending the cloud configuration file to the terminal equipment, wherein if the terminal equipment receives the cloud configuration file, the changed local configuration file is covered by the cloud configuration file.
11. A server, characterized in that the server comprises a memory, a processor and a processing program of a configuration file stored on the memory and executable on the processor, the processing program of the configuration file realizing the steps of the processing method of the configuration file according to any one of claims 5 to 7 when executed by the processor.
12. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a processing program of a configuration file, which when executed by a processor implements the steps of the processing method of a configuration file according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111156650.1A CN113885957B (en) | 2021-09-28 | 2021-09-28 | Processing method of configuration file, terminal equipment, server and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111156650.1A CN113885957B (en) | 2021-09-28 | 2021-09-28 | Processing method of configuration file, terminal equipment, server and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113885957A true CN113885957A (en) | 2022-01-04 |
CN113885957B CN113885957B (en) | 2024-05-28 |
Family
ID=79004644
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111156650.1A Active CN113885957B (en) | 2021-09-28 | 2021-09-28 | Processing method of configuration file, terminal equipment, server and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113885957B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114726722A (en) * | 2022-03-30 | 2022-07-08 | 深圳市国电科技通信有限公司 | Edge cloud collaborative baseline verification and configuration updating method, system and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104301142A (en) * | 2014-10-13 | 2015-01-21 | 杭州华三通信技术有限公司 | Backup method and device for configuration files |
CN108319466A (en) * | 2017-12-15 | 2018-07-24 | 北京先进数通信息技术股份公司 | A kind of restoration methods and device of configuration information |
US20190245929A1 (en) * | 2018-02-06 | 2019-08-08 | Citrix Systems, Inc. | Computing system providing cloud-based user profile management for virtual sessions and related methods |
CN112948020A (en) * | 2021-03-18 | 2021-06-11 | 海南视联通信技术有限公司 | Configuration file processing method and device |
CN113204378A (en) * | 2021-04-21 | 2021-08-03 | 深圳市广和通无线股份有限公司 | Configuration file state synchronization method, device, terminal, server and storage medium |
CN113220342A (en) * | 2021-05-31 | 2021-08-06 | 挂号网(杭州)科技有限公司 | Centralized configuration method and device, electronic equipment and storage medium |
CN113312072A (en) * | 2021-06-11 | 2021-08-27 | 北京百度网讯科技有限公司 | Configuration file updating method and device, electronic equipment and medium |
-
2021
- 2021-09-28 CN CN202111156650.1A patent/CN113885957B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104301142A (en) * | 2014-10-13 | 2015-01-21 | 杭州华三通信技术有限公司 | Backup method and device for configuration files |
CN108319466A (en) * | 2017-12-15 | 2018-07-24 | 北京先进数通信息技术股份公司 | A kind of restoration methods and device of configuration information |
US20190245929A1 (en) * | 2018-02-06 | 2019-08-08 | Citrix Systems, Inc. | Computing system providing cloud-based user profile management for virtual sessions and related methods |
CN112948020A (en) * | 2021-03-18 | 2021-06-11 | 海南视联通信技术有限公司 | Configuration file processing method and device |
CN113204378A (en) * | 2021-04-21 | 2021-08-03 | 深圳市广和通无线股份有限公司 | Configuration file state synchronization method, device, terminal, server and storage medium |
CN113220342A (en) * | 2021-05-31 | 2021-08-06 | 挂号网(杭州)科技有限公司 | Centralized configuration method and device, electronic equipment and storage medium |
CN113312072A (en) * | 2021-06-11 | 2021-08-27 | 北京百度网讯科技有限公司 | Configuration file updating method and device, electronic equipment and medium |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114726722A (en) * | 2022-03-30 | 2022-07-08 | 深圳市国电科技通信有限公司 | Edge cloud collaborative baseline verification and configuration updating method, system and storage medium |
CN114726722B (en) * | 2022-03-30 | 2023-10-27 | 深圳市国电科技通信有限公司 | Bian Yun collaborative baseline checking and configuration updating method, system and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN113885957B (en) | 2024-05-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108108181B (en) | Function updating method and device of application program and computer readable storage medium | |
CN108170740B (en) | Data migration method, system and computer readable storage medium | |
US8055496B2 (en) | Ensuring product correctness in a multilingual environment | |
CN104866391B (en) | A kind of end message backup method and device based on increment information system | |
CN113900834B (en) | Data processing method, device, equipment and storage medium based on Internet of things technology | |
CN113626286A (en) | Multi-cluster instance processing method and device, electronic equipment and storage medium | |
EP3635547A1 (en) | Systems and methods for preventing service disruption during software updates | |
CN112583630B (en) | Device management method, device, system, device and storage medium | |
US20190391803A1 (en) | Application hot deploy method to guarentee application version consistency and computer program stored in computer readable medium therfor | |
CN113885957B (en) | Processing method of configuration file, terminal equipment, server and storage medium | |
CN113434180B (en) | Data processing method and device for application, server and storage medium | |
CN113138768B (en) | Application package generation method and device, electronic equipment and readable storage medium | |
CN111240998B (en) | Test case processing method and device | |
CN111930565B (en) | Process fault self-healing method, device and equipment for components in distributed management system | |
CN104573496A (en) | Method and device for inhibiting starting items from starting | |
CN111158747A (en) | APP prompt message dynamic configuration method, system, computer equipment and storage medium | |
CN107085514B (en) | Shared library upgrading method and device | |
CN114443065A (en) | Platform deployment method, platform deployment device, electronic equipment and storage medium | |
CN115269252A (en) | Application program fault processing method, device, equipment and storage medium | |
CN111625256B (en) | Application program upgrading method, system, equipment and computer storage medium | |
CN113608831A (en) | Plug-in instance management method, system, storage medium and equipment | |
CN112416698B (en) | Expansion method and device of monitoring system, storage medium and electronic equipment | |
US10489148B1 (en) | Unnecessary resource recognition and release plan in application hot deploy on distributed system | |
CN109660585B (en) | Method, device, equipment and storage medium for calling AOP enhanced object service | |
CN106713453B (en) | Application information monitoring method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |