CN112527357A - Service hot loading updating method and device, computer equipment and storage medium - Google Patents

Service hot loading updating method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN112527357A
CN112527357A CN202011468220.9A CN202011468220A CN112527357A CN 112527357 A CN112527357 A CN 112527357A CN 202011468220 A CN202011468220 A CN 202011468220A CN 112527357 A CN112527357 A CN 112527357A
Authority
CN
China
Prior art keywords
configuration file
update
target service
updating
instruction
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.)
Pending
Application number
CN202011468220.9A
Other languages
Chinese (zh)
Inventor
秦佳文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN202011468220.9A priority Critical patent/CN112527357A/en
Publication of CN112527357A publication Critical patent/CN112527357A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Transfer Between Computers (AREA)
  • Stored Programmes (AREA)

Abstract

The application relates to the technical field of big data, in particular to a method and a device for updating service hot loading, computer equipment and a storage medium. The method comprises the following steps: receiving a starting instruction of a target service; according to the starting instruction, acquiring a static configuration file configured in the mirror image, and starting a target service based on the static configuration file; detecting whether an update instruction for a target service is received; and when the update instruction is detected, acquiring an update configuration file which is configured outside the mirror image and corresponds to the target service, and updating the target service based on the update configuration file. By adopting the method, the service hot loading updating efficiency can be improved. In addition, the invention also relates to a block chain technology, and the starting instruction, the static configuration file, the updating instruction and the updating configuration file can be stored in the block chain.

Description

Service hot loading updating method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for updating service hot loading, a computer device, and a storage medium.
Background
Due to the characteristic that the static configuration file is not stopped and restarted, the static configuration file can complete real-time configuration change and service control in running service, and the flexibility in an effective production environment is greatly improved.
In a conventional manner, for example, in spring closed docker plug-in automation deployment, a static configuration file is packaged into a docker image and is deployed.
However, because the static configuration files packed into the mirror image cannot be updated and replaced, when the service hot-loading update is performed, the mirror image needs to be packed again, which wastes a large amount of manpower and material resources, and thus the service hot-loading update efficiency is low.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a service hot-load update method, an apparatus, a computer device, and a storage medium, which can improve service hot-load update efficiency.
A method of servicing a hot load update, the method comprising:
receiving a starting instruction of a target service;
according to the starting instruction, acquiring a static configuration file configured in the mirror image, and starting a target service based on the static configuration file;
detecting whether an update instruction for a target service is received;
and when the update instruction is detected, acquiring an update configuration file which is configured outside the mirror image and corresponds to the target service, and updating the target service based on the update configuration file.
In one embodiment, before receiving the starting instruction of the target service, the method further includes:
acquiring a static configuration file compiled in advance;
acquiring the completion time of compiling the static configuration file;
and taking the completion time as the version information of the static configuration file, and packaging and sending the version information and the static configuration file to the mirror image.
In one embodiment, after starting the target service based on the static configuration file, the method further includes:
receiving an updating and selecting instruction of a terminal to a target service;
acquiring configuration data corresponding to the target service according to the updating selection instruction, and receiving the updating of the configuration data by the terminal to obtain updated configuration data;
receiving an update completion instruction sent by the terminal, wherein the update completion instruction is generated based on triggering of an update completion control on a terminal interface of the terminal;
and generating an updating configuration file according to the updated configuration data based on the updating completion instruction, and generating an updating instruction.
In one embodiment, the receiving terminal updates the selection instruction of the target service, including:
registering a target service into a service subscription system, and subscribing the update of the target service by a terminal;
receiving an updating selection instruction sent by a service subscription system, wherein the updating selection instruction is generated when the service subscription system receives the terminal to update and select the target service, and the updating and selecting of the terminal on the target service comprises selecting and updating at least one of a service identifier, a service configuration and a service environment through a terminal management page.
In one embodiment, before generating the updated configuration file according to the updated configuration data, the method further includes:
acquiring the updating completion time of the updated configuration data;
generating an updated configuration file according to the updated configuration data, comprising:
and taking the update completion time as updated version information, and generating an updated configuration file based on the updated version information and the updated configuration data.
In one embodiment, before obtaining an update configuration file configured outside the mirror image and corresponding to a target service, and updating the target service based on the update configuration file, the method further includes:
acquiring version information of the static configuration file and updated version information;
judging whether the version of the updated configuration file is higher than that of the static configuration file or not according to the version information;
and when the version of the update configuration file is determined to be higher than the version of the static configuration file, continuously acquiring the update configuration file of the corresponding target service configured outside the mirror image, and updating the target service based on the update configuration file.
In one embodiment, the method further includes:
uploading at least one of the starting instruction, the static configuration file, the updating instruction and the updating configuration file to the block chain node for storage.
A service hot load update apparatus, the apparatus comprising:
the starting instruction receiving module is used for receiving a starting instruction of the target service;
the target service starting module is used for acquiring a static configuration file configured in the mirror image according to the starting instruction and starting the target service based on the static configuration file;
the detection module is used for detecting whether an update instruction for the target service is received or not;
and the hot loading updating module is used for acquiring an updating configuration file which is configured outside the mirror image and corresponds to the target service when the updating instruction is detected, and updating the target service based on the updating configuration file.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the method of any of the above embodiments when the processor executes the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any of the embodiments described above
According to the service hot-loading updating method, the service hot-loading updating device, the computer equipment and the storage medium, the static configuration file configured in the mirror image is obtained according to the starting instruction by receiving the starting instruction of the target service, the target service is started based on the static configuration file, whether the updating instruction of the target service is received or not is detected, when the updating instruction is detected, the updating configuration file configured outside the mirror image and corresponding to the target service is obtained, and the target service is updated based on the updating configuration file. Therefore, when the hot loading updating is carried out on the service in the service starting operation process, the updating configuration file outside the mirror image can be obtained, the hot loading updating of the target service is carried out, and compared with the method of carrying out the packing of the mirror image again and loading the configuration file in the mirror image, the method and the device can reduce the data processing process, improve the data processing efficiency and further improve the efficiency of the hot loading updating of the service.
Drawings
FIG. 1 is a diagram illustrating an example of an application scenario for a service hot load update method;
FIG. 2 is a flow diagram that illustrates a method for servicing a hot load update in one embodiment;
FIG. 3 is a flowchart illustrating a method for servicing a hot load update in accordance with another embodiment;
FIG. 4 is a flowchart illustrating the step of receiving an update select instruction according to one embodiment;
FIG. 5 is a block diagram of a service hot load update apparatus in one embodiment;
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The service hot loading updating method provided by the application can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The terminal 102 may generate a start instruction for the target service based on the trigger of the user on the target service displayed on the terminal interface, and after receiving the start instruction, the server 104 acquires the static configuration file configured in the mirror image according to the start instruction, and starts the target service based on the static configuration file. Further, the server 104 may detect whether an update instruction for the target service is received, and when the update instruction is detected, obtain an update configuration file of the corresponding target service configured outside the mirror image, and update the target service based on the update configuration file. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented by an independent server or a server cluster formed by a plurality of servers.
In one embodiment, as shown in fig. 2, a method for updating service hot load is provided, which is described by taking the method as an example applied to the server in fig. 1, and includes the following steps:
step S202, receiving a starting instruction of the target service.
The starting instruction is generated by the terminal based on the user trigger and is used for starting the selected target service, and the starting instruction may carry a service identifier of the target service, such as a service name, a service number, or a service id (identity document).
In this embodiment, the target service may refer to a service in each business system or an application system, and may be, for example, a Redis cache service or a micro service.
In this embodiment, after the development department completes the development work of the target service and issues the target service, the server may trigger the execution of the target service based on a trigger instruction of the application system to the target service or a trigger instruction based on the terminal, for example, for the micro service, the micro service a may trigger the execution based on the call of the micro service B.
Step S204, according to the starting instruction, the static configuration file configured in the mirror image is obtained, and the target service is started based on the static configuration file.
The static configuration file is a file compiled and generated by a service development department when developing a service, and the static configuration file may include a plurality of configuration items for starting the target service, such as a start condition and a stop condition.
In this embodiment, the static configuration files in the images cannot be changed and updated, for example, a Java service development framework developed based on spring-closed-configuration cannot be used to update and change the packaged static configuration files in the respective docker images.
In this embodiment, when the server receives the start instruction for the first time and starts the target service, the server may start the target service by loading the static configuration file configured in the image and by reading the configuration items in the static configuration file. For example, as described above with reference to microservice a calling microservice B, the server may trigger loading of a static configuration file for microservice B configured in the image based on the calling of microservice a, and then start microservice B.
Step S206 detects whether an update instruction for the target service is received.
The update instruction refers to an instruction for performing service update on the service being started, and may include, but is not limited to, updating a service name, a method included in the service, or contents such as a service address. Those skilled in the art will appreciate that in some embodiments, updating may also include deleting or adding, which is not limited in this application.
The update configuration file refers to a configuration file for performing hot-load update on a service, and the update configuration file may include configuration data for deleting, newly adding, or changing a target service.
In this embodiment, the user may trigger the update operation through the terminal, and generate an update instruction based on the update operation performed on the terminal, so as to update the target service.
Specifically, the server may monitor the target service in real time, obtain an update configuration file configured outside the mirror image when monitoring an update instruction for updating the target service, and update the target service based on the update configuration file.
Step S208, when the update instruction is detected, acquiring an update configuration file of the corresponding target service configured outside the mirror image, and updating the target service based on the update configuration file.
In this embodiment, after acquiring the update configuration file, the server may perform hot-load update on the target service in the starting process by loading the configuration item in the update configuration file.
In the service hot-loading updating method, a starting instruction for a target service is received, a static configuration file configured in a mirror image is obtained according to the starting instruction, the target service is started based on the static configuration file, whether an updating instruction for the target service is received or not is detected, an updating configuration file configured outside the mirror image and corresponding to the target service is obtained when the updating instruction is detected, and the target service is updated based on the updating configuration file. Therefore, when the hot loading updating is carried out on the service in the service starting operation process, the updating configuration file outside the mirror image can be obtained, the hot loading updating of the target service is carried out, and compared with the method of carrying out the packing of the mirror image again and loading the configuration file in the mirror image, the method and the device can reduce the data processing process, improve the data processing efficiency and further improve the efficiency of the hot loading updating of the service.
In one embodiment, before receiving the start instruction of the target service, the method may further include: acquiring a static configuration file compiled in advance; acquiring the completion time of compiling the static configuration file; and taking the completion time as the version information of the static configuration file, and packaging and sending the version information and the static configuration file to the mirror image.
The completion time refers to the time for developing and compiling the static configuration file, or the time for developing and compiling the configuration data forming the static configuration file.
In this embodiment, the server may obtain, from the database or the system cache, the static configuration file that is developed and pre-compiled by the terminal, and correspondingly obtain the compilation completion time of the configuration file.
Further, the server may use the obtained completion time as version information of the static configuration file, and package and send the version information and the static configuration file to the mirror image at the same time, for example, the server may package using soldier compilation and the like. Specifically, when the server is compiled and packaged by a soldier, the GIT command can be executed through compiling the preposed script, the GIT submission time when the static configuration file is compiled is written into the static configuration file as a version number, and meanwhile, the GIT submission time is packaged into a docker mirror image.
In the embodiment, the completion time of compiling the static configuration file is used as the version information, and the version information is packaged and sent to the mirror image, so that the version of the configuration file can be determined according to the compiling completion time, the configuration file with the latest version can be loaded by the server according to the compiling completion time, and the accuracy of determining the version and the stability of running of the system service are improved.
In one embodiment, referring to fig. 3, after starting the target service based on the static configuration file, the method may further include:
step S302, receiving an update selection instruction of the terminal to the target service.
The updating and selecting instruction refers to an instruction generated after a user selects the service identifier, the service configuration and the service environment displayed on the terminal interface and determines to update the target service.
In this embodiment, for the same service system or a plurality of service systems, there are a plurality of corresponding services, and the server may control each service through a plurality of locations such as a service identifier, a service configuration, and a service environment by developing a terminal interface.
In this embodiment, a user determines to update a target service through selection of a service identifier, a service configuration, a service environment, and the like displayed on a terminal interface, and generates an update selection instruction corresponding to the target service.
Step S304, according to the updating selection instruction, obtaining the configuration data corresponding to the target service, and receiving the updating of the terminal to the configuration data to obtain the updated configuration data.
Specifically, after receiving the update selection instruction, the server may obtain configuration data corresponding to the target service, and then send the configuration data to the terminal for display.
In this embodiment, the user performs an update operation through the terminal, so that the server can update the configuration data according to the update operation, and obtain the updated configuration data after the update is completed.
And step S306, receiving an update completion instruction sent by the terminal, wherein the update completion instruction is generated based on the triggering of an update completion control on a terminal interface of the terminal.
In this embodiment, after the user completes the update operation, the update completion instruction may be generated by triggering an update completion control on the terminal interface.
Step S308, based on the update completion instruction, generating an update configuration file according to the updated configuration data, and generating an update instruction.
In this embodiment, after receiving the update completion instruction, the server may generate an update configuration file according to the updated configuration data. Specifically, the server may obtain the updated configuration data, and encrypt, compress, and package the updated configuration data to obtain the updated configuration file.
In this embodiment, the server obtains the updated configuration file according to the updated configuration data and packages and generates the updated configuration file outside the image, that is, the process of generating the updated configuration file is not the process of packaging and sending the static configuration file to the image as described above, so that the updated configuration file outside the image is readable and changeable.
In this embodiment, after the server generates the update configuration file, an update instruction of the target service may also be generated, so that the server updates the target service.
In one embodiment, referring to fig. 4, the receiving of the update selection instruction to the target service by the terminal may include:
step S402, registering the target service into the service subscription system, and subscribing the update of the target service by the terminal.
Specifically, after the server starts the target service, the server may register the target service in the service subscription system, for example, in Redis, and subscribe to the update of the target service by the service subscription system terminal. For example, after registering a target service to the Redis, the server may subscribe to a channel in the Redis, where the channel is updated by the target service, and when the terminal updates the target service, the server may receive an update selection instruction initiated by the Redis, that is, an update selection instruction sent by the service subscription system.
Step S404, receiving an update selection instruction sent by the service subscription system, wherein the update selection instruction is generated when the service subscription system receives the terminal to update and select the target service, and the updating and selecting of the terminal for the target service comprises selecting and updating at least one of the service identification, the service configuration and the service environment through a terminal management page.
In this embodiment, after the server starts the target service through the static configuration file, the started target service and a terminal management page for operating the target service may be displayed through the terminal interface.
Further, the user may determine to update the target service by selecting at least one of a service identifier, a service configuration, and a service environment on a terminal management page displayed on the terminal interface, so as to generate a corresponding update selection instruction.
In the embodiment, the target service is registered to the service subscription system, and then the update selection instruction sent by the service subscription system is received, so that the update of the terminal to the target service can be monitored by the service subscription system, the target service can be updated in time based on the update selection instruction, and the update efficiency of the target service is improved.
In one embodiment, before generating the updated configuration file according to the updated configuration data, the method may further include: and acquiring the update completion time of the updated configuration data.
The update completion time refers to the trigger time for triggering the update completion control on the terminal management page after the user completes the update operation on the configuration data through the terminal management page.
In this embodiment, when the terminal generates the update completion instruction according to the trigger of the user on the update completion control, the terminal may correspondingly obtain the trigger time of the user on the update completion control, and send the trigger time and the update completion instruction to the server.
In this embodiment, generating the update configuration file according to the updated configuration data may include: and taking the update completion time as updated version information, and generating an updated configuration file based on the updated version information and the updated configuration data.
In this embodiment, after acquiring the trigger time, the server may use the trigger time as version information, and generate an updated configuration file based on the updated configuration data.
Specifically, the server may package the trigger time and the updated configuration data together to generate an update configuration file having the update completion time as version information.
As will be appreciated by those skilled in the art, the packaging of the update profile is performed off-image, and the generated update profile is an off-image profile, as opposed to a static profile within an image.
In one embodiment, before obtaining an update configuration file of a corresponding target service configured outside the mirror image and updating the target service based on the update configuration file, the method may further include: acquiring version information of the static configuration file and updated version information; judging whether the version of the updated configuration file is higher than that of the static configuration file or not according to the version information; and when the version of the update configuration file is determined to be higher than the version of the static configuration file, continuously acquiring the update configuration file of the corresponding target service configured outside the mirror image, and updating the target service based on the update configuration file.
In this embodiment, after the server generates the update configuration file, for the server, a plurality of configuration files may be used to start the target service, that is, the static configuration file in the image and the update configuration file outside the image. At this time, when the server performs hot-load update on the target service, it needs to determine a configuration file for updating the target service from a static configuration file in the image and an update configuration file outside the image.
Specifically, the server may compare version information of the in-image static configuration file with version information of the out-image update configuration file, and when it is determined that the version of the update configuration file is higher than the version of the static configuration file, obtain the update configuration file, where the update configuration file is loaded, and implement hot-loading update on the target service.
In this embodiment, the server compares the version information of the in-image static configuration file and the version information of the out-image update configuration file, which may be time of different version information, and determines which configuration file has a higher version according to the time. For example, the version of the configuration file that is closer in time to the current time is higher, and the version of the configuration file that is further away from the current time is lower, and then the update is performed according to the determined configuration file.
In the above embodiment, the update completion time is packaged into the update configuration file as version information, then the version comparison is performed according to the static configuration file and the version information of the update configuration file, and when it is determined that the version of the update configuration file is higher than the version of the static configuration file, the update configuration file is acquired, so that the latest version of the configuration file corresponding to the target service can be determined in the time dimension, and the update accuracy of the target service is improved.
In one embodiment, the method may further include: uploading at least one of the starting instruction, the static configuration file, the updating instruction and the updating configuration file to the block chain node for storage.
The blockchain refers to a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A Block chain (Block chain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data Block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next Block.
Specifically, the blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
In this embodiment, the server may upload and store one or more data of the start instruction, the static configuration file, the update instruction, and the update configuration file in a node of the blockchain, so as to ensure privacy and security of the data.
In the above embodiment, at least one of the start instruction, the static configuration file, the update instruction, and the update configuration file is uploaded to the block chain and stored in the node of the block chain, so that privacy of data stored in the node of the block chain can be guaranteed, and security of the data can be improved.
It should be understood that, although the steps in the flowcharts of fig. 2 to 4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-4 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 5, there is provided a service hot-load update apparatus, including: a start instruction receiving module 100, a target service starting module 200, a detection module 300, and a hot load update module 400, wherein:
the starting instruction receiving module 100 is configured to receive a starting instruction for a target service.
And the target service starting module 200 is configured to obtain the static configuration file configured in the image according to the starting instruction, and start the target service based on the static configuration file.
The detecting module 300 is configured to detect whether an update instruction for the target service is received.
The hot-loading update module 400 is configured to, when an update instruction is detected, obtain an update configuration file of a corresponding target service configured outside the mirror image, and update the target service based on the update configuration file.
In one embodiment, the apparatus may further include:
and the static configuration file acquisition module is used for acquiring the static configuration file compiled in advance before receiving a starting instruction of the target service.
And the completion time acquisition module is used for acquiring the completion time of the compiling of the static configuration file.
And the packaging module is used for taking the completion time as the version information of the static configuration file, packaging the version information and the static configuration file and sending the packaged version information and the static configuration file to the mirror image.
In one embodiment, the apparatus may further include:
and the updating selection instruction receiving module is used for receiving an updating selection instruction of the terminal to the target service after the target service is started based on the static configuration file.
And the configuration data updating module is used for acquiring the configuration data corresponding to the target service according to the updating selection instruction, and receiving the updating of the terminal on the configuration data to obtain the updated configuration data.
And the updating completion instruction receiving module is used for receiving an updating completion instruction sent by the terminal, and the updating completion instruction is generated based on the triggering of an updating completion control on a terminal interface of the terminal.
And the update configuration file generation module is used for generating an update configuration file according to the updated configuration data and generating an update instruction based on the update completion instruction.
In one embodiment, the update selection instruction receiving module may include:
and the registration and subscription submodule is used for registering the target service in the service subscription system and subscribing the update of the terminal to the target service.
And the update selection instruction receiving submodule is used for receiving an update selection instruction sent by the service subscription system, the update selection instruction is generated when the service subscription system receives the update selection of the terminal to the target service, and the update selection of the terminal to the target service comprises the selection and update of at least one of a service identifier, service configuration and service environment through a terminal management page.
In one embodiment, the apparatus may further include:
and the update completion time acquisition module is used for acquiring the update completion time of the updated configuration data before generating the update configuration file according to the updated configuration data.
In this embodiment, the update configuration file generation module is further configured to use the update completion time as updated version information, and generate the update configuration file based on the updated version information and the updated configuration data.
In one embodiment, the apparatus may further include:
and the version information acquisition module is used for acquiring the update configuration file which is configured outside the mirror image and corresponds to the target service, and acquiring the version information of the static configuration file and the updated version information before the target service is updated based on the update configuration file.
The version judging module is used for judging whether the version of the updated configuration file is higher than that of the static configuration file or not according to the version information; and when the version of the update configuration file is determined to be higher than the version of the static configuration file, continuously acquiring the update configuration file of the corresponding target service configured outside the mirror image, and updating the target service based on the update configuration file.
In one embodiment, the apparatus may further include:
and the storage module is used for uploading at least one of the starting instruction, the static configuration file, the updating instruction and the updating configuration file to the block chain node for storage.
For specific limitations of the service hot-loading updating apparatus, reference may be made to the above limitations of the service hot-loading updating method, which are not described herein again. The various modules in the service hot load update apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing data such as a starting instruction, a static configuration file, an updating instruction, an updating configuration file and the like. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a service hot load update method.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is provided a computer device comprising a memory storing a computer program and a processor implementing the following steps when the processor executes the computer program: receiving a starting instruction of a target service; according to the starting instruction, acquiring a static configuration file configured in the mirror image, and starting a target service based on the static configuration file; detecting whether an update instruction for a target service is received; and when the update instruction is detected, acquiring an update configuration file which is configured outside the mirror image and corresponds to the target service, and updating the target service based on the update configuration file.
In one embodiment, before the processor executes the computer program to receive the starting instruction of the target service, the following steps can be further implemented: acquiring a static configuration file compiled in advance; acquiring the completion time of compiling the static configuration file; and taking the completion time as the version information of the static configuration file, and packaging and sending the version information and the static configuration file to the mirror image.
In one embodiment, after the processor executes the computer program to start the target service based on the static configuration file, the following steps may be further implemented: receiving an updating and selecting instruction of a terminal to a target service; acquiring configuration data corresponding to the target service according to the updating selection instruction, and receiving the updating of the configuration data by the terminal to obtain updated configuration data; receiving an update completion instruction sent by the terminal, wherein the update completion instruction is generated based on triggering of an update completion control on a terminal interface of the terminal; and generating an updating configuration file according to the updated configuration data based on the updating completion instruction, and generating an updating instruction.
In one embodiment, the processor, when executing the computer program, implements an update selection instruction of the target service by the receiving terminal, and may include: registering a target service into a service subscription system, and subscribing the update of the target service by a terminal; receiving an updating selection instruction sent by a service subscription system, wherein the updating selection instruction is generated when the service subscription system receives the terminal to update and select the target service, and the updating and selecting of the terminal on the target service comprises selecting and updating at least one of a service identifier, a service configuration and a service environment through a terminal management page.
In one embodiment, before the processor executes the computer program to generate the updated configuration file according to the updated configuration data, the following steps may be further implemented: and acquiring the update completion time of the updated configuration data.
In this embodiment, when the processor executes the computer program, generating an updated configuration file according to the updated configuration data may include: and taking the update completion time as updated version information, and generating an updated configuration file based on the updated version information and the updated configuration data.
In one embodiment, before the processor executes the computer program to obtain the update configuration file of the corresponding target service configured outside the image and update the target service based on the update configuration file, the following steps may be further implemented: acquiring version information of the static configuration file and updated version information; judging whether the version of the updated configuration file is higher than that of the static configuration file or not according to the version information; and when the version of the update configuration file is determined to be higher than the version of the static configuration file, continuously acquiring the update configuration file of the corresponding target service configured outside the mirror image, and updating the target service based on the update configuration file.
In one embodiment, the processor, when executing the computer program, may further implement the following steps: uploading at least one of the starting instruction, the static configuration file, the updating instruction and the updating configuration file to the block chain node for storage.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: receiving a starting instruction of a target service; according to the starting instruction, acquiring a static configuration file configured in the mirror image, and starting a target service based on the static configuration file; detecting whether an update instruction for a target service is received; and when the update instruction is detected, acquiring an update configuration file which is configured outside the mirror image and corresponds to the target service, and updating the target service based on the update configuration file.
In one embodiment, before the computer program is executed by the processor to receive the starting instruction of the target service, the following steps can be further implemented: acquiring a static configuration file compiled in advance; acquiring the completion time of compiling the static configuration file; and taking the completion time as the version information of the static configuration file, and packaging and sending the version information and the static configuration file to the mirror image.
In one embodiment, after the computer program is executed by the processor to start the target service based on the static configuration file, the following steps may be further implemented: receiving an updating and selecting instruction of a terminal to a target service; acquiring configuration data corresponding to the target service according to the updating selection instruction, and receiving the updating of the configuration data by the terminal to obtain updated configuration data; receiving an update completion instruction sent by the terminal, wherein the update completion instruction is generated based on triggering of an update completion control on a terminal interface of the terminal; and generating an updating configuration file according to the updated configuration data based on the updating completion instruction, and generating an updating instruction.
In one embodiment, the computer program, when executed by the processor, implements the update selection instruction of the target service by the receiving terminal, and may include: registering a target service into a service subscription system, and subscribing the update of the target service by a terminal; receiving an updating selection instruction sent by a service subscription system, wherein the updating selection instruction is generated when the service subscription system receives the terminal to update and select the target service, and the updating and selecting of the terminal on the target service comprises selecting and updating at least one of a service identifier, a service configuration and a service environment through a terminal management page.
In one embodiment, before the computer program is executed by the processor to generate the updated configuration file according to the updated configuration data, the following steps may be further implemented: and acquiring the update completion time of the updated configuration data.
In this embodiment, the computer program, when executed by the processor, for generating an updated configuration file according to the updated configuration data, may include: and taking the update completion time as updated version information, and generating an updated configuration file based on the updated version information and the updated configuration data.
In one embodiment, before the computer program is executed by the processor to obtain an update configuration file of a corresponding target service configured outside the image and update the target service based on the update configuration file, the following steps may be further implemented: acquiring version information of the static configuration file and updated version information; judging whether the version of the updated configuration file is higher than that of the static configuration file or not according to the version information; and when the version of the update configuration file is determined to be higher than the version of the static configuration file, continuously acquiring the update configuration file of the corresponding target service configured outside the mirror image, and updating the target service based on the update configuration file.
In one embodiment, the computer program when executed by the processor may further implement the steps of: uploading at least one of the starting instruction, the static configuration file, the updating instruction and the updating configuration file to the block chain node for storage.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method for service hot load update, the method comprising:
receiving a starting instruction of a target service;
acquiring a static configuration file configured in a mirror image according to the starting instruction, and starting the target service based on the static configuration file;
detecting whether an update instruction for the target service is received;
and when the updating instruction is detected, acquiring an updating configuration file which is configured outside the mirror image and corresponds to the target service, and updating the target service based on the updating configuration file.
2. The method of claim 1, wherein before receiving the start instruction for the target service, the method further comprises:
acquiring a static configuration file compiled in advance;
acquiring the completion time of compiling the static configuration file;
and taking the completion time as the version information of the static configuration file, and packaging and sending the version information and the static configuration file to the mirror image.
3. The method of claim 1, wherein after the starting the target service based on the static configuration file, further comprising:
receiving an updating and selecting instruction of the terminal to the target service;
acquiring configuration data corresponding to the target service according to the updating selection instruction, and receiving the updating of the configuration data by the terminal to obtain updated configuration data;
receiving an update completion instruction sent by the terminal, wherein the update completion instruction is generated based on triggering of an update completion control on a terminal interface of the terminal;
and generating an updating configuration file according to the updated configuration data based on the updating completion instruction, and generating the updating instruction.
4. The method of claim 3, wherein the updating selection instruction of the target service by the receiving terminal comprises:
registering the target service to a service subscription system, and subscribing the update of the target service by the terminal;
receiving an update selection instruction sent by the service subscription system, wherein the update selection instruction is generated when the service subscription system receives the update selection of the terminal on the target service, and the update selection of the terminal on the target service comprises selecting and updating at least one of a service identifier, a service configuration and a service environment through a terminal management page.
5. The method of claim 3, before generating an updated configuration file according to the updated configuration data, further comprising:
acquiring the updating completion time of the updated configuration data;
generating an update configuration file according to the updated configuration data includes:
and taking the update completion time as updated version information, and generating an update configuration file based on the updated version information and the updated configuration data.
6. The method of claim 5, wherein before obtaining the update profile corresponding to the target service configured outside the mirror image and updating the target service based on the update profile, the method further comprises:
acquiring version information of the static configuration file and the updated version information;
judging whether the version of the updated configuration file is higher than that of the static configuration file or not according to the version information;
and when the version of the update configuration file is determined to be higher than the version of the static configuration file, continuously acquiring the update configuration file which is configured outside the mirror image and corresponds to the target service, and updating the target service based on the update configuration file.
7. The method according to any one of claims 1 to 6, further comprising:
uploading at least one of the starting instruction, the static configuration file, the updating instruction and the updating configuration file to a block chain node for storage.
8. A service hot load update apparatus, the apparatus comprising:
the starting instruction receiving module is used for receiving a starting instruction of the target service;
the target service starting module is used for acquiring a static configuration file configured in the mirror image according to the starting instruction and starting the target service based on the static configuration file;
the detection module is used for detecting whether an update instruction for the target service is received or not;
and the hot loading updating module is used for acquiring an updating configuration file which is configured outside the mirror image and corresponds to the target service when the updating instruction is detected, and updating the target service based on the updating configuration file.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor when executing the computer program implements the steps of the method of any one of claims 1 to 6 or 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6 or 7.
CN202011468220.9A 2020-12-14 2020-12-14 Service hot loading updating method and device, computer equipment and storage medium Pending CN112527357A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011468220.9A CN112527357A (en) 2020-12-14 2020-12-14 Service hot loading updating method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011468220.9A CN112527357A (en) 2020-12-14 2020-12-14 Service hot loading updating method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112527357A true CN112527357A (en) 2021-03-19

Family

ID=74999624

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011468220.9A Pending CN112527357A (en) 2020-12-14 2020-12-14 Service hot loading updating method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112527357A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113179183A (en) * 2021-04-29 2021-07-27 杭州迪普科技股份有限公司 Service switch state control device and method
CN114237754A (en) * 2021-12-20 2022-03-25 中国平安财产保险股份有限公司 Data loading method and device, electronic equipment and storage medium
CN114465887A (en) * 2021-12-23 2022-05-10 杭州溪塔科技有限公司 Method and device for block chain configuration management based on git
WO2024114125A1 (en) * 2022-11-30 2024-06-06 华为云计算技术有限公司 Method, apparatus and system for updating configuration information, and storage medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040044999A1 (en) * 2002-08-30 2004-03-04 Gibson Mason C. Subscription-based program module installation and update system and method
CN106789249A (en) * 2016-12-22 2017-05-31 北京五八信息技术有限公司 Hot update method, client and server
CN108304201A (en) * 2017-09-14 2018-07-20 腾讯科技(深圳)有限公司 Object updating method, device and equipment
CN108563461A (en) * 2018-03-20 2018-09-21 聚好看科技股份有限公司 A kind of method, apparatus and system for extracting configuration file from mirror image
CN108600282A (en) * 2017-11-30 2018-09-28 深圳市牛鼎丰科技有限公司 Micro services dissemination method, device, storage medium and computer equipment
CN110413346A (en) * 2019-07-30 2019-11-05 中国工商银行股份有限公司 A kind of parameter updating method and device
CN110780888A (en) * 2019-10-09 2020-02-11 北京市天元网络技术股份有限公司 Method for deploying cloud database
CN110780914A (en) * 2018-07-31 2020-02-11 中国移动通信集团浙江有限公司 Service publishing method and device
CN111352635A (en) * 2019-04-16 2020-06-30 深圳市鸿合创新信息技术有限责任公司 Method and device for deploying micro-service and electronic equipment
CN111427600A (en) * 2020-03-20 2020-07-17 成都千立网络科技有限公司 Docker-based platform system deployment and upgrade method and system
CN111552496A (en) * 2020-05-07 2020-08-18 上海道客网络科技有限公司 System and method for realizing seamless upgrade of sidecar based on temporary container addition

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040044999A1 (en) * 2002-08-30 2004-03-04 Gibson Mason C. Subscription-based program module installation and update system and method
CN106789249A (en) * 2016-12-22 2017-05-31 北京五八信息技术有限公司 Hot update method, client and server
CN108304201A (en) * 2017-09-14 2018-07-20 腾讯科技(深圳)有限公司 Object updating method, device and equipment
CN108600282A (en) * 2017-11-30 2018-09-28 深圳市牛鼎丰科技有限公司 Micro services dissemination method, device, storage medium and computer equipment
CN108563461A (en) * 2018-03-20 2018-09-21 聚好看科技股份有限公司 A kind of method, apparatus and system for extracting configuration file from mirror image
CN110780914A (en) * 2018-07-31 2020-02-11 中国移动通信集团浙江有限公司 Service publishing method and device
CN111352635A (en) * 2019-04-16 2020-06-30 深圳市鸿合创新信息技术有限责任公司 Method and device for deploying micro-service and electronic equipment
CN110413346A (en) * 2019-07-30 2019-11-05 中国工商银行股份有限公司 A kind of parameter updating method and device
CN110780888A (en) * 2019-10-09 2020-02-11 北京市天元网络技术股份有限公司 Method for deploying cloud database
CN111427600A (en) * 2020-03-20 2020-07-17 成都千立网络科技有限公司 Docker-based platform system deployment and upgrade method and system
CN111552496A (en) * 2020-05-07 2020-08-18 上海道客网络科技有限公司 System and method for realizing seamless upgrade of sidecar based on temporary container addition

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113179183A (en) * 2021-04-29 2021-07-27 杭州迪普科技股份有限公司 Service switch state control device and method
CN114237754A (en) * 2021-12-20 2022-03-25 中国平安财产保险股份有限公司 Data loading method and device, electronic equipment and storage medium
CN114237754B (en) * 2021-12-20 2024-06-07 中国平安财产保险股份有限公司 Data loading method and device, electronic equipment and storage medium
CN114465887A (en) * 2021-12-23 2022-05-10 杭州溪塔科技有限公司 Method and device for block chain configuration management based on git
CN114465887B (en) * 2021-12-23 2024-01-23 杭州溪塔科技有限公司 Block chain configuration management method and device based on git
WO2024114125A1 (en) * 2022-11-30 2024-06-06 华为云计算技术有限公司 Method, apparatus and system for updating configuration information, and storage medium

Similar Documents

Publication Publication Date Title
CN110008118B (en) Page data testing method and device, computer equipment and storage medium
CN112527357A (en) Service hot loading updating method and device, computer equipment and storage medium
CN108573371B (en) Data approval method, device, computer equipment and storage medium
CN110209652B (en) Data table migration method, device, computer equipment and storage medium
CN109474578B (en) Message checking method, device, computer equipment and storage medium
CN109039751B (en) Method, device, computer equipment and storage medium for configuring route
CN109726134B (en) Interface test method and system
CN109144487B (en) Method, device, computer equipment and storage medium for developing business of parts
CN110633160A (en) Interface calling method and device, computer equipment and storage medium
WO2020233092A1 (en) Smart contract calling method and apparatus, device, and storage medium
CN111563365B (en) Method and device for processing modification information of test standard worksheet and computer equipment
CN110866198A (en) Static resource caching method, system, device, computer equipment and storage medium
CN111324905A (en) Image data labeling method and device, computer equipment and storage medium
CN110531984B (en) Code compiling method, device, system, computer equipment and storage medium
CN112099972A (en) Office file processing method, device, equipment and storage medium based on RPA robot
CN111309379A (en) Project generation method and device, computer equipment and storage medium
CN112380130A (en) Application testing method and device based on call dependency relationship
CN110599267A (en) Electronic invoice billing method and device, computer readable storage medium and computer equipment
CN112882769A (en) Skill pack data processing method, skill pack data processing device, computer equipment and storage medium
CN113515322B (en) Application program loading method and device, computer equipment and readable storage medium
CN108389124B (en) Data processing method, data processing device, computer equipment and storage medium
CN111209061A (en) Method and device for filling in user information, computer equipment and storage medium
CN112433925A (en) Log generation method and device based on artificial intelligence, computer equipment and medium
CN111552989A (en) Service data processing method, device, equipment and storage medium based on block chain
CN116560621A (en) Baseboard management controller chip adapting method, system, equipment and 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