CN108121559B - Configuration file pushing method, server and storage medium - Google Patents
Configuration file pushing method, server and storage medium Download PDFInfo
- Publication number
- CN108121559B CN108121559B CN201711484455.5A CN201711484455A CN108121559B CN 108121559 B CN108121559 B CN 108121559B CN 201711484455 A CN201711484455 A CN 201711484455A CN 108121559 B CN108121559 B CN 108121559B
- Authority
- CN
- China
- Prior art keywords
- configuration file
- database
- application program
- server
- configuration
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 26
- 230000000694 effects Effects 0.000 abstract description 6
- 238000010586 diagram Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000000926 separation method Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 230000008094 contradictory effect Effects 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1458—Management of the backup or restore process
- G06F11/1464—Management of the backup or restore process for networked environments
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/18—File system types
- G06F16/182—Distributed file systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/30—Profiles
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/34—Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/55—Push-based network services
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Data Mining & Analysis (AREA)
- Quality & Reliability (AREA)
- Databases & Information Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a configuration file pushing method, a server and a storage medium, wherein an application program is separated from a configuration file corresponding to the application program, the configuration file is stored in a database of a configuration center of the application program, the configuration file of the application program is obtained from the database at intervals of a first preset time, the obtained configuration file is backed up in a local disk of the server running the configuration center, and the obtained configuration file is synchronously sent to a local cache file of a client running the application program; after receiving a request for acquiring the configuration file of the application program sent by a client, judging whether the database runs normally or not; if the database runs normally, the corresponding configuration file is obtained from the database and sent to the client, and if the database is down, the corresponding configuration file is obtained from a local disk of the server and sent to the client. The updating efficiency of the new version application program and the experience effect of the user are improved.
Description
Technical Field
The present invention relates to the field of application program development, and in particular, to a configuration file pushing method, a server, and a storage medium.
Background
After traditional application development is completed, the application is usually packaged and delivered together with its configuration file, and released to a client for operation. When a new version application program is released, the configuration parameters of the configuration files need to be manually modified in a configuration center (the configuration center is used for configuring parameters for the configuration files of the application program), and once the database of the configuration center is in downtime, the update of the new version configuration files fails, so that the update of the application program fails, the update efficiency of the new version application program is affected, and the experience effect of a user is seriously affected.
Disclosure of Invention
In view of this, the present invention provides a configuration file pushing method, a server and a storage medium, which can improve the update efficiency of the new version application program and the experience effect of the user.
Firstly, in order to achieve the above objective, the present invention provides a method for pushing a configuration file, which includes the following steps:
s1, separating an application program from a corresponding configuration file thereof, and storing the configuration file in a database of a configuration center of the application program;
s2, acquiring configuration files of the application program from the database at intervals of a first preset time according to a predetermined acquisition rule, and backing up the acquired configuration files in a local disk of a server running the configuration center;
s3, after receiving a request for acquiring the configuration file of the application program sent by the client, judging whether the database runs normally or not;
and S4, if the database runs normally, acquiring the configuration file of the application program from the database and sending the configuration file to the client, and if the database is down, acquiring the configuration file of the application program from a local disk of the server and sending the configuration file to the client.
Further, the predetermined acquisition rule includes:
judging whether the configuration file of the updated version of the application program exists in the database or not every first preset time, if so, acquiring the configuration file of the updated version, and if not, acquiring the configuration file of the existing version.
Further, the predetermined acquisition rule includes:
judging whether the configuration file of the updated version of the application program exists in the database or not every first preset time, if so, acquiring the configuration file of the updated version, and if not, acquiring the configuration file of the existing version.
Further, the step S2 further includes the following steps:
and synchronously sending the acquired configuration files to local cache files of all clients running the application program.
Further, in the step S3, the determining whether the database operates normally includes:
if the data is written into or read from the database successfully within the second preset time, the database is determined to run normally, and if the data is written into or read from the database within the second preset time, the database is determined to be down.
Further, in the step S4, the obtaining the new version of the configuration file from the local disk of the server and sending the new version of the configuration file to the client further includes:
if the new version of the configuration file is failed to be obtained from the local disk of the server within the third preset time, sending the server downtime information to the client, and prompting the user to obtain the corresponding configuration file from the local disk of the client.
In addition, in order to achieve the above object, the present invention also provides a server, the server including a memory, and a processor, the memory storing a profile pushing program, the profile pushing program implementing the following steps when executed by the processor:
a1, separating an application program from a corresponding configuration file thereof, and storing the configuration file in a database of a configuration center of the application program;
a2, acquiring configuration files of the application program from the database at intervals of a first preset time according to a predetermined acquisition rule, and backing up the acquired configuration files in a local disk of a server running the configuration center;
a3, after receiving a request for acquiring the configuration file of the application program sent by the client, judging whether the database runs normally or not;
and A4, if the database runs normally, acquiring the configuration file of the application program from the database and sending the configuration file to the client, and if the database is down, acquiring the configuration file of the application program from a local disk of the server and sending the configuration file to the client.
Further, the predetermined acquisition rule includes:
judging whether the configuration file of the updated version of the application program exists in the database or not every first preset time, if so, acquiring the configuration file of the updated version, and if not, acquiring the configuration file of the existing version.
Further, the step A2 further includes the following steps:
and synchronously sending the acquired configuration files to local cache files of all clients running the application program.
Further, in the step S3, the determining whether the database operates normally includes:
if the data is written into or read from the database successfully within the second preset time, the database is determined to run normally, and if the data is written into or read from the database within the second preset time, the database is determined to be down.
Further, to achieve the above object, the present invention also provides a computer-readable storage medium storing a profile pushing program executable by at least one processor to cause the at least one processor to perform the steps of the profile pushing method as described above.
Compared with the prior art, the configuration file pushing method, the server and the computer readable storage medium provided by the invention have the advantages that the application program is separated from the corresponding configuration file, the configuration file is stored in the database of the configuration center of the application program, the configuration file of the application program is acquired from the database every a first preset time, the acquired configuration file is backed up in the local disk of the server running the configuration center, and the acquired configuration file is synchronously transmitted to the local cache file of each client running the application program; after receiving a request for acquiring the configuration file of the application program sent by a client, judging whether the database runs normally or not; and if the database is down, acquiring the configuration file of the application program from a local disk of the server and pushing the configuration file to the client. The updating efficiency of the new version application program and the experience effect of the user are improved.
Drawings
FIG. 1 is a schematic diagram of an alternative hardware architecture of a server according to the present invention;
FIG. 2 is a schematic diagram of a configuration file pushing program in a preferred embodiment of the server according to the present invention;
FIG. 3 is a flowchart illustrating a configuration file pushing method according to a preferred embodiment of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that the description of "first", "second", etc. in this disclosure is for descriptive purposes only and is not to be construed as indicating or implying a relative importance or implying an indication of the number of technical features being indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be considered to be absent and not within the scope of protection claimed in the present invention.
Referring to fig. 1, a schematic diagram of an alternative hardware architecture of a server 1 according to the present invention is shown. In the present embodiment, the server 1 may include, but is not limited to, a memory 11, a processor 12, and a network interface 13, which may be communicatively connected to each other through a system bus 14. It is noted that fig. 1 only shows a server 1 with components 11-14, but it is understood that not all of the illustrated components are required to be implemented, and that more or fewer components may alternatively be implemented.
The memory 11 includes at least one type of readable storage medium including flash memory, hard disk, multimedia card, card memory (e.g., SD or DX memory, etc.), random Access Memory (RAM), static Random Access Memory (SRAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), programmable Read Only Memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of the server 1, such as a hard disk or a memory of the server 1. In other embodiments, the memory 11 may also be an external storage device of the server 1, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like, which are provided on the server 1. Of course, the memory 11 may also comprise both the internal storage unit of the server 1 and its external storage device. In this embodiment, the memory 11 is generally used to store an operating system and various application software installed on the server 1, such as a configuration file pushing program. Further, the memory 11 may be used to temporarily store various types of data that have been output or are to be output.
The network interface 13 may comprise a wireless network interface or a wired network interface, the network interface 13 typically being used to establish a communication connection between the server 1 and other electronic devices.
The system bus 14 is used to implement the communication connections between these components.
Fig. 2 only shows a server with components 11-14 and a profile pushing program supporting a greyscale mode, but it should be understood that not all shown components need to be implemented, and that more or fewer components may alternatively be implemented.
Optionally, the server 1 may further comprise a user interface, which may comprise a Display (Display), an input unit such as a Keyboard (Keyboard), and optionally a standard wired interface, a wireless interface.
Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like. The display may also be referred to as a display screen or a display unit, as appropriate, for displaying information processed in the social network-based user keyword extraction means and for displaying a visualized user interface.
Further, in one embodiment of the server 1 shown in fig. 1, the configuration file pushing program stored in the memory 11 is executed by the processor 12 to implement the following steps:
A. separating an application program from a corresponding configuration file thereof, and storing the configuration file in a database of a configuration center of the application program;
in this embodiment, an application program is separated from a configuration file corresponding to the application program, and the configuration file corresponding to the application program is stored in a database of a configuration center of the application program, when each application program has a new version, the configuration file corresponding to the new version is stored in the database of the configuration center, and each version of configuration file contains configuration information of a corresponding running environment, when the application program is released to each client running in different environments, each client in different environments needs to initiate a request for acquiring the corresponding configuration file to the configuration center.
In this embodiment, the configuration center includes an API end and a WEB end based on a master database and a slave database, where the WEB end and the API end both adopt a multi-node deployment mode, and each user may trigger an access instruction for accessing a database corresponding to a database website through the WEB end of the database by inputting an address of the database to be accessed in a browser address bar of each corresponding client.
B. Acquiring configuration files of the application program from the database at intervals of a first preset time according to a predetermined acquisition rule, and backing up the acquired configuration files in a local disk of a server running the configuration center;
in this embodiment, the configuration file pushing program stored in the memory 11 in the server 1 detects whether there is an updated version of configuration file in the database at intervals of a first preset time (for example, at intervals of 30 seconds), and after detecting that there is an updated version of configuration file, backs up the updated version of configuration file as the latest version of configuration file in the local disk of the server 1, or after not detecting the updated version of configuration file, acquires the existing version of configuration file and backs up the updated version of configuration file in the local disk of the server 1.
Further, in another embodiment, after detecting that the configuration file of the updated version is detected, the detected configuration file of the updated version is synchronously sent to the local cache file of each client running the application program, or after detecting that the configuration file of the updated version is not detected, the configuration file of the existing version is obtained and synchronously sent to the local cache file of each client running the application program.
C. After receiving a request for acquiring the configuration file of the application program sent by a client, judging whether the database runs normally or not;
in this embodiment, when a user needs to update the application program installed in a client (mobile terminal), or when the client installs and runs the application program, the server address of a configuration center corresponding to the running application program may be input into a browser address field of the client, so as to trigger an access instruction of a server corresponding to the running application program, and send a request for obtaining a configuration file corresponding to the application program to the server, and after receiving the request for obtaining the configuration file of the application program sent by the client, the server determines whether a database storing the configuration file of the application program is running normally.
Typically, the reasons for database downtime include that if the number of threads simultaneously requesting connection exceeds the maximum number of threads currently available in parallel in the thread pool, a downtime state may occur in the database when a thread is blocked or stopped, or when the database is connected by the driverManager or the data source, a subsequent process may be affected in an exception handling when the database is not connected, which may possibly result in data downtime.
In a specific implementation manner, determining whether the database operates normally includes: if the data is successfully written into or read from the database within a second preset time (for example, within 3 minutes), the database is determined to run normally, and if the data is not successfully written into or read from the database within the second preset time, the database is determined to be down.
D. And if the database is in normal operation, acquiring the configuration file of the application program from the database and sending the configuration file to the client, and if the database is down, acquiring the configuration file of the application program from a local disk of the server and sending the configuration file to the client.
Further, if the acquisition of the configuration file of the application program from the local disk of the server fails in the third preset time, sending the downtime information of the server to the client, and prompting the user to acquire the configuration file of the application program from the local disk of the client.
In general, a server may be caused by a system problem, a program application error, or insufficient machine configuration resources, and when the server is down, the server needs to be restarted, or the system security log of the server is checked to check the reason of the down, so that the corresponding configuration file cannot be obtained once the server is down.
According to the embodiment, the application program is separated from the corresponding configuration file, the configuration file is stored in the database of the configuration center of the application program, the configuration file of the application program is obtained from the database every first preset time, the obtained configuration file is backed up in a local disk of a server running the configuration center, and the obtained configuration file is synchronously sent to local cache files of all clients running the application program; after receiving a request for acquiring the configuration file of the application program sent by a client with identification information, judging whether the database runs normally or not; and if the database is in a down state, acquiring a corresponding configuration file from a local disk of the server and sending the corresponding configuration file to the client. The updating efficiency of the new version application program and the experience effect of the user are improved.
In addition, in other embodiments, the configuration file pushing program may be further divided into one or more program modules with different functions according to the functions implemented by the partial programs, where the one or more program modules are stored in the memory 11 and executed by one or more processors (in this embodiment, the processor 12), so as to implement the present invention.
For example, referring to fig. 2, a schematic program module of a profile pushing program in a preferred embodiment of the server of the present invention is shown. In this embodiment, the profile pushing program may be divided into a separation module 201, a backup module 202, a judgment module 203, and a transmission module 204. Wherein the program modules 201-204 perform functions or operational steps similar to those described above, and which are not described in detail herein, for example, wherein:
the separation module 201 is configured to separate an application program from a configuration file corresponding to the application program, and store the configuration file in a database of a configuration center of the application program;
the backup module 202 is configured to acquire a configuration file of the application program from the database at intervals of a first preset time according to a predetermined acquisition rule, and backup the acquired configuration file in a local disk of a server running the configuration center;
the judging module 203 is configured to judge whether the database operates normally after receiving a request for acquiring a configuration file of the application program sent by the client;
the sending module 204 is configured to obtain, if the database is running normally, a configuration file of the application program from the database and send the configuration file to the client, and if the database is down, obtain, from a local disk of the server, the configuration file of the application program and send the configuration file to the client.
In addition, the invention also provides a configuration file pushing method. Referring to fig. 3, a flowchart of a configuration file pushing method according to a preferred embodiment of the present invention is shown. The method may be performed by an apparatus, which may be implemented in software and/or hardware.
In this embodiment, the configuration file pushing method includes steps S301 to S304. Wherein,,
s301, separating an application program from a corresponding configuration file thereof, and storing the configuration file in a database of a configuration center of the application program;
in this embodiment, an application program is separated from a configuration file corresponding to the application program, and the configuration file corresponding to the application program is stored in a database of a configuration center of the application program, when each application program has a new version, the configuration file corresponding to the new version is stored in the database of the configuration center, and each version of configuration file contains configuration information of a corresponding running environment, when the application program is released to each client running in different environments, each client in different environments needs to initiate a request for acquiring the corresponding configuration file to the configuration center.
In this embodiment, the configuration center includes an API end and a WEB end based on a master database and a slave database, where the WEB end and the API end both adopt a multi-node deployment mode, and each user may trigger an access instruction for accessing a database corresponding to a database website through the WEB end of the database by inputting an address of the database to be accessed in a browser address bar of each corresponding client.
S302, acquiring configuration files of the application program from the database at intervals of a first preset time according to a predetermined acquisition rule, and backing up the acquired configuration files in a local disk of a server running the configuration center;
in this embodiment, the configuration file pushing program stored in the memory 11 in the server 1 detects whether there is an updated version of configuration file in the database at intervals of a first preset time (for example, at intervals of 30 seconds), and after detecting that there is an updated version of configuration file, backs up the updated version of configuration file as the latest version of configuration file in the local disk of the server 1, or after not detecting the updated version of configuration file, acquires the existing version of configuration file and backs up the updated version of configuration file in the local disk of the server 1.
Further, in another embodiment, after detecting that the configuration file of the updated version is detected, the detected configuration file of the updated version is synchronously sent to the local cache file of each client running the application program, or after detecting that the configuration file of the updated version is not detected, the configuration file of the existing version is obtained and synchronously sent to the local cache file of each client running the application program.
S303, after receiving a request for acquiring the configuration file of the application program sent by a client, judging whether the database runs normally or not;
in this embodiment, when a user needs to update the application program installed in a client (mobile terminal), or when the client installs and runs the application program, the server address of a configuration center corresponding to the running application program may be input into a browser address field of the client, so as to trigger an access instruction of a server corresponding to the running application program, and send a request for obtaining a configuration file corresponding to the application program to the server, and after receiving the request for obtaining the configuration file of the application program sent by the client, the server determines whether a database storing the configuration file of the application program is running normally.
Typically, the reasons for database downtime include that if the number of threads simultaneously requesting connection exceeds the maximum number of threads currently available in parallel in the thread pool, a downtime state may occur in the database when a thread is blocked or stopped, or when the database is connected by the driverManager or the data source, a subsequent process may be affected in an exception handling when the database is not connected, which may possibly result in data downtime.
In a specific implementation manner, determining whether the database operates normally includes: if the data is successfully written into or read from the database within a second preset time (for example, within 3 minutes), the database is determined to run normally, and if the data is not successfully written into or read from the database within the second preset time, the database is determined to be down.
And S304, if the database runs normally, acquiring the configuration file of the application program from the database and sending the configuration file to the client, and if the database is down, acquiring the configuration file of the application program from a local disk of the server and sending the configuration file to the client.
Further, if the acquisition of the configuration file of the application program from the local disk of the server fails in the third preset time, sending the downtime information of the server to the client, and prompting the user to acquire the configuration file of the application program from the local disk of the client.
In general, a server may be caused by a system problem, a program application error, or insufficient machine configuration resources, and when the server is down, the server needs to be restarted, or the system security log of the server is checked to check the reason of the down, so that the corresponding configuration file cannot be obtained once the server is down.
According to the embodiment, the application program is separated from the corresponding configuration file, the configuration file is stored in the database of the configuration center of the application program, the configuration file of the application program is obtained from the database every first preset time, the obtained configuration file is backed up in a local disk of a server running the configuration center, and the obtained configuration file is synchronously sent to local cache files of all clients running the application program; after receiving a request for acquiring the configuration file of the application program sent by a client with identification information, judging whether the database runs normally or not; and if the database is in a down state, acquiring the configuration file of the application program from a local disk of the server and sending the configuration file to the client. The updating efficiency of the new version application program and the experience effect of the user are improved.
Furthermore, the present invention also proposes a computer-readable storage medium storing a profile pushing program executable by at least one processor to cause the at least one processor to perform the steps of:
separating an application program from a corresponding configuration file thereof, and storing the configuration file in a database of a configuration center of the application program;
acquiring configuration files of the application program from the database at intervals of a first preset time according to a predetermined acquisition rule, and backing up the acquired configuration files in a local disk of a server running the configuration center;
after receiving a request for acquiring the configuration file of the application program sent by a client with identification information, judging whether the database runs normally or not;
and if the database is in normal operation, acquiring the configuration file of the application program from the database and sending the configuration file to the client, and if the database is down, acquiring the configuration file of the application program from a local disk of the server and sending the configuration file to the client.
The specific implementation process of the computer readable storage medium of the present invention is basically the same as that of the embodiments of the server and the configuration file pushing method, and is not described here.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.
Claims (8)
1. A method for pushing a configuration file, the method comprising the steps of:
s1, separating an application program from a corresponding configuration file thereof, and storing the configuration file in a database of a configuration center of the application program;
s2, acquiring configuration files of the application program from the database at intervals of a first preset time according to a predetermined acquisition rule, backing up the acquired configuration files in a local disk of a server running the configuration center, and synchronizing the acquired configuration files into local cache files of all clients running the application program;
s3, judging whether the database operates normally or not in a second preset time after receiving a request for acquiring the configuration file of the application program sent by the client, wherein the request for acquiring the configuration file is a request for each client to initiate to a configuration center under different operating environments;
and S4, if the database runs normally, acquiring the configuration file of the application program from the database and sending the configuration file to the client, if the database is down, acquiring the configuration file of the application program from the local disk of the server and sending the configuration file to the client, and if the configuration file of the application program fails to be acquired from the local disk of the server within a third preset time, sending the down information of the server to the client, and prompting a user to acquire the configuration file of the application program from the local disk of the client.
2. The profile pushing method of claim 1, wherein the predetermined acquisition rule comprises:
judging whether the configuration file of the updated version of the application program exists in the database or not every first preset time, if so, acquiring the configuration file of the updated version, and if not, acquiring the configuration file of the existing version.
3. The profile pushing method as claimed in claim 1, wherein in the step S3, the determining whether the database is operating normally includes:
if the data is written into or read from the database successfully within the second preset time, the database is determined to run normally, and if the data is written into or read from the database within the second preset time, the database is determined to be down.
4. The server is characterized by comprising a memory and a processor, wherein the memory stores a configuration file pushing program, and the configuration file pushing program is executed by the processor to realize the following steps:
a1, separating an application program from a corresponding configuration file thereof, and storing the configuration file in a database of a configuration center of the application program;
a2, acquiring configuration files of the application program from the database at intervals of a first preset time according to a predetermined acquisition rule, backing up the acquired configuration files in a local disk of a server running the configuration center, and synchronizing the acquired configuration files into local cache files of all clients running the application program;
a3, judging whether the database operates normally or not in a second preset time after receiving a request for acquiring the configuration file of the application program sent by the client, wherein the request for acquiring the corresponding configuration file is a request for each client to initiate to a configuration center under different operating environments;
and A4, if the database runs normally, acquiring the configuration file of the application program from the database and sending the configuration file to the client, if the database is down, acquiring the configuration file of the application program from a local disk of the server and sending the configuration file to the client, and if the configuration file of the application program fails to be acquired from the local disk of the server within a third preset time, sending the down information of the server to the client, and prompting a user to acquire the configuration file of the application program from the local disk of the client.
5. The server of claim 4, wherein the predetermined acquisition rules comprise:
judging whether the configuration file of the updated version of the application program exists in the database or not every first preset time, if so, acquiring the configuration file of the updated version, and if not, acquiring the configuration file of the existing version.
6. The server according to claim 4, wherein the step A2 further includes the steps of:
and synchronously sending the acquired configuration files to local cache files of all clients running the application program.
7. The server according to claim 4, wherein in the step A3, the determining whether the database is operating normally includes:
if the data is written into or read from the database successfully within the second preset time, the database is determined to run normally, and if the data is written into or read from the database within the second preset time, the database is determined to be down.
8. A computer-readable storage medium storing a profile pushing program executable by at least one processor to cause the at least one processor to perform the steps of the profile pushing method of any of claims 1-3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711484455.5A CN108121559B (en) | 2017-12-29 | 2017-12-29 | Configuration file pushing method, server and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711484455.5A CN108121559B (en) | 2017-12-29 | 2017-12-29 | Configuration file pushing method, server and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108121559A CN108121559A (en) | 2018-06-05 |
CN108121559B true CN108121559B (en) | 2023-06-23 |
Family
ID=62230692
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711484455.5A Active CN108121559B (en) | 2017-12-29 | 2017-12-29 | Configuration file pushing method, server and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108121559B (en) |
Families Citing this family (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109299064B (en) * | 2018-07-18 | 2024-02-09 | 平安科技(深圳)有限公司 | Database monitoring method and terminal equipment |
CN109656815B (en) * | 2018-11-27 | 2022-05-27 | 平安科技(深圳)有限公司 | Test statement writing method, device and medium with configuration file and electronic equipment |
CN109634682B (en) * | 2018-11-29 | 2022-02-15 | 恒生电子股份有限公司 | Configuration file updating method and device for application program |
CN109885320A (en) * | 2018-12-29 | 2019-06-14 | 深圳云天励飞技术有限公司 | A kind of update method of configuration information, device and electronic equipment |
CN109857837A (en) * | 2019-01-16 | 2019-06-07 | 苏宁易购集团股份有限公司 | A kind of dictionary loading method and device that can customize |
CN110099096B (en) * | 2019-03-12 | 2023-04-28 | 平安普惠企业管理有限公司 | Application program configuration method, device, computer equipment and storage medium |
CN110196725A (en) * | 2019-04-23 | 2019-09-03 | 平安科技(深圳)有限公司 | Configuration file management method, apparatus, computer equipment and storage medium |
CN110795117B (en) * | 2019-09-11 | 2024-06-28 | 中国平安财产保险股份有限公司 | Method, system, electronic device and storage medium for updating configuration file |
CN111030848B (en) * | 2019-11-20 | 2023-04-07 | 深圳创维-Rgb电子有限公司 | Automatic configuration method and device of electronic product and storage medium |
CN111580860A (en) * | 2020-05-13 | 2020-08-25 | 吕家明 | Automatic compatibility method and device for different versions of configuration files |
CN111858524A (en) * | 2020-07-27 | 2020-10-30 | 北京百川盈孚科技有限公司 | Data synchronization method and device |
CN113791816A (en) * | 2021-08-04 | 2021-12-14 | 惠州Tcl云创科技有限公司 | Configuration data management method and device, terminal equipment and storage medium |
CN114363001A (en) * | 2021-12-06 | 2022-04-15 | 国网安徽省电力有限公司超高压分公司 | Method, system and storage medium for client access limitation based on offline configuration |
CN115361279A (en) * | 2022-08-12 | 2022-11-18 | 广州博冠信息科技有限公司 | Configuration data updating method and device, electronic equipment and computer readable medium |
CN117193886B (en) * | 2023-11-06 | 2024-01-05 | 成都科江科技有限公司 | Dynamic loading method for configuration file of industrial control system |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101909087A (en) * | 2010-08-20 | 2010-12-08 | 北京联创信安科技有限公司 | Snapshot-based application server remote boot method |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5924102A (en) * | 1997-05-07 | 1999-07-13 | International Business Machines Corporation | System and method for managing critical files |
US8782662B2 (en) * | 2007-12-28 | 2014-07-15 | International Business Machines Corporation | Adaptive computer sequencing of actions |
US20120266078A1 (en) * | 2011-04-18 | 2012-10-18 | Prosoftnet Corporation | System and Method for Accessing and Displaying Remotely Backed Up Data by Deploying a Windows Desktop Style User Interface |
CN104063239B (en) * | 2013-03-22 | 2019-01-15 | 腾讯科技(深圳)有限公司 | Application program update method and server, the client of mobile terminal |
US9898372B2 (en) * | 2013-09-18 | 2018-02-20 | International Business Machines Corporation | Backing up a computer application |
CN106570007A (en) * | 2015-10-09 | 2017-04-19 | 阿里巴巴集团控股有限公司 | Method and equipment for data synchronization of distributed caching system |
CN106713391B (en) * | 2015-11-13 | 2019-12-27 | 北京新媒传信科技有限公司 | Session information sharing method and sharing system |
CN106603281A (en) * | 2016-12-07 | 2017-04-26 | 乐视控股(北京)有限公司 | Configuration file management method and system |
CN107483250A (en) * | 2017-08-21 | 2017-12-15 | 郑州云海信息技术有限公司 | Decentralized configuration management method, device and the system for realizing decentralized configuration management |
-
2017
- 2017-12-29 CN CN201711484455.5A patent/CN108121559B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101909087A (en) * | 2010-08-20 | 2010-12-08 | 北京联创信安科技有限公司 | Snapshot-based application server remote boot method |
Also Published As
Publication number | Publication date |
---|---|
CN108121559A (en) | 2018-06-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108121559B (en) | Configuration file pushing method, server and storage medium | |
US10127057B2 (en) | Method and apparatus for dynamically implementing application function | |
CN108847950B (en) | Electronic device, cloud system software automatic deployment method and storage medium | |
CN108388599B (en) | Electronic device, data migration and calling method and storage medium | |
CN102262574B (en) | Boot protecting method and device of operating system | |
CN108491301B (en) | Electronic device, abnormality early warning method based on redis and storage medium | |
US9594619B2 (en) | Robust hardware fault management system, method and framework for enterprise devices | |
WO2020010727A1 (en) | Application update method and device, and computer readable storage medium | |
US20190332776A1 (en) | Firmware map data | |
CN108170551B (en) | Crawler system based front-end and back-end error processing method, server and storage medium | |
CN106951284B (en) | User interface upgrading method and device based on android system application and intelligent terminal | |
CN108491466B (en) | Electronic device, access instruction information acquisition method, and storage medium | |
CN105867962A (en) | System upgrading method and device | |
CN112099825A (en) | Method, device and equipment for upgrading component and storage medium | |
CN109857579B (en) | Data processing method and related device | |
CN112559131A (en) | Method, device and equipment for updating container mirror image and computer readable storage medium | |
CN108196975B (en) | Data verification method and device based on multiple checksums and storage medium | |
CN112558982B (en) | Code detection method and device and computer equipment | |
CN110990033B (en) | Remote upgrading method and system | |
CN103309769A (en) | Operation system starting protection method and device | |
CN115113904A (en) | Firmware upgrading processing method and device, electronic equipment and storage medium | |
CN108021381A (en) | The upgrading method for one-chip computer and device of equipment | |
CN113504917A (en) | Method and medium for integrating big data components by Ambari big data platform | |
CN115543399A (en) | Software processing system, software processing method and device | |
CN114253906A (en) | Method and device for managing configuration file, configuration distribution system and storage medium |
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 | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20230526 Address after: 518000 Building 7 # -0204, Chuangwei Innovation Valley, No. 8 Tangtou No.1 Road, Tangtou Community, Shiyan Street, Bao'an District, Shenzhen City, Guangdong Province Applicant after: Shenzhen Shixin Information Technology Co.,Ltd. Address before: 400010 38 / F, 39 / F, unit 1, 99 Wuyi Road, Yuzhong District, Chongqing Applicant before: CHONGQING FINANCIAL ASSETS EXCHANGE Co.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |