WO2020134545A1 - Method for updating configuration, and related product - Google Patents

Method for updating configuration, and related product Download PDF

Info

Publication number
WO2020134545A1
WO2020134545A1 PCT/CN2019/114722 CN2019114722W WO2020134545A1 WO 2020134545 A1 WO2020134545 A1 WO 2020134545A1 CN 2019114722 W CN2019114722 W CN 2019114722W WO 2020134545 A1 WO2020134545 A1 WO 2020134545A1
Authority
WO
WIPO (PCT)
Prior art keywords
configuration
configuration information
service
client
sub
Prior art date
Application number
PCT/CN2019/114722
Other languages
French (fr)
Chinese (zh)
Inventor
李春林
蓝深
陈晓焱
孙道佼
钟斌
Original Assignee
深圳云天励飞技术有限公司
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 深圳云天励飞技术有限公司 filed Critical 深圳云天励飞技术有限公司
Publication of WO2020134545A1 publication Critical patent/WO2020134545A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Definitions

  • This application relates to the technical field of electronic devices, and in particular to a configuration update method and related products.
  • the traditional service update method of an application is to write configuration information into a configuration file and package it with the application.
  • a small number of configuration tools have appeared to achieve dynamic configuration, but it is difficult to meet user needs in real time.
  • the embodiments of the present application provide a configuration update method and related products, with a view to improving the real-time performance of service update by the configuration management system.
  • an embodiment of the present application provides a configuration update method, which is applied to a server of a configuration management system.
  • the configuration management system includes the server and multiple clients. Each client runs a target application.
  • the server includes an entrance sub-service, a management sub-service, and a configuration sub-service, and each client is communicatively connected to the configuration sub-service; the method includes:
  • the first configuration information When detecting the first configuration information to be pushed, the first configuration information is pushed to at least one client among the plurality of clients through the configuration sub-service, and the at least one client is unsuccessful
  • the server pulls the client of the first configuration information, and the first configuration information is used by the client to hot update the target application within the current startup cycle.
  • an embodiment of the present application provides a configuration update method, which is applied to a target client of a configuration management system.
  • the configuration management system includes the server and multiple clients, and the multiple clients include the A target client, the target client runs a target application, the server includes an entrance sub-service, a management sub-service, and a configuration sub-service, and each client is in communication connection with the configuration sub-service; the method include:
  • first configuration information pushed from the server where the first configuration information is sent by the server by performing the following operation: acquiring the first configuration information entered by the developer through the portal subservice, so The first configuration information is used to update the target application; and the first configuration information is published and persisted in the database through the management sub-service; and the configuration sub-service detects whether there is a pending in the database Pushed configuration information; and detecting the first configuration information to be pushed;
  • an embodiment of the present application provides a configuration update method, which is applied to a first client of a configuration management system.
  • the configuration management system includes the server and multiple clients, and the multiple clients include all The first client, the first client runs a target application, the server includes an entrance sub-service, a management sub-service, and a configuration sub-service, and each client is in communication connection with the configuration sub-service;
  • the method includes:
  • the sending time is determined by the first client according to application scenarios and business characteristics, or according to the time when the server pushes an update message, and the sending time Used to constrain the update delay of the target application program to be less than a preset duration
  • the configuration information pull response message carrying the first configuration information
  • an embodiment of the present application provides a configuration management system, including a server and multiple clients, each client running a target application, the server includes an entrance sub-service, a management sub-service, and a configuration sub-service , Each client is in communication connection with the configuration subservice;
  • the server is used to perform the steps in any method of the first aspect
  • the client among the plurality of clients is used to perform the steps as in the method of the second aspect or the third aspect.
  • an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be processed by the above
  • the above program includes instructions for performing the steps in any of the methods of the first, second, and third aspects of the embodiments of the present application.
  • an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program causes the computer to execute the first embodiment of the present application. 1. Part or all of the steps described in any of the methods of the second and third aspects.
  • an embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium that stores the computer program, and the computer program is operable to cause the computer to execute as implemented in the present application Examples of some or all of the steps described in any method of the second aspect.
  • the computer program product may be a software installation package.
  • the configuration management system based on the microservice architecture includes a server and a client, in which the server achieves configuration information acquisition and configuration through three sub-services: an entrance sub-service, a management sub-service, and a configuration sub-service.
  • Push because the service in the microservice architecture supports real-time communication, and the configuration subservice can detect the configuration information to be pushed in the database in real time, thereby reducing the consumption of configuration information from the input server to the client that has not pulled the configuration information.
  • FIG. 1 is a schematic structural diagram of a configuration management system provided by an embodiment of the present application.
  • FIG. 2a is a schematic flowchart of a configuration update method provided by an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of another configuration update method provided by an embodiment of the present application.
  • 5a is a schematic structural diagram of a server provided by an embodiment of the present application.
  • 5b is a schematic structural diagram of a target client provided by an embodiment of the present application.
  • 5c is a schematic structural diagram of a first client provided by an embodiment of the present application.
  • 6a is a block diagram of functional units of a configuration update apparatus provided by an embodiment of the present application.
  • 6b is a block diagram of functional units of a configuration update device provided by an embodiment of the present application.
  • Figure 6c is a block diagram of functional units of a configuration update device provided by an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of another configuration management system provided by an embodiment of the present application.
  • FIG. 1 is a schematic diagram of a system architecture of a configuration management system 100 provided by an embodiment of the present application.
  • the configuration management system 100 includes a server 110 and multiple clients 120.
  • the multiple clients 120 include Clients using different types of development languages, each client 120 runs a target application, and the server 110 includes an entry subservice PortalService 111.
  • AdminService 112 and ConfigService 113 each client and the ConfigService 113 communication connections; of which PortalService 111 is used to provide a configuration acquisition interface and a configuration push interface through the visual management interface. It serves the Client.
  • the visual operation adopts the front-end and back-end read-write separation mode.
  • the view layer is responsible for data rendering, and the background is responsible for logical processing and data processing.
  • AdminService 112 is used to provide a configuration management interface, a configuration modification publishing interface, and serves PortalService 111.
  • PortalService 111 is used to provide a visual management interface for configuration, you can get AdminService 112 service list, indirectly call ConfigService 113 services. Based on the above design, PortalService 111 configuration management provides the following functions: configuration filtering function, configuration one-key import and export, rollback, change record display, etc.
  • the AdminService 112 and the ConfigService 113 constitutes a microservice architecture, which uses a model view controller (Model View) Controller, MVC) design pattern, the model layer Model is used to represent the operation of business models and data objects, the view layer View is used for data rendering, and the controller Controller is to ensure the synchronization of M and V. Once M changes, V should be updated synchronously.
  • MVC model view controller
  • Each sub-service is a separate application, reducing coupling, making the configuration center more scalable and improving stability.
  • ConfigService 113 is a sub-service provider of the configuration management system, and is also set up as a registration center for microservices. Both are in the same process, which can simplify the operation difficulty.
  • Setting up ConfigService 113 is a registration center, providing annotations for easy implementation.
  • Another service provider AdminService 112 also registers the service instance to the registration center, provides the corresponding function, and finally passes the specific address of the registration center to the PortalService 111 as a startup parameter, making PortalService 111
  • This visual management service can manage all configurations.
  • the server 110 may use an independent server to centrally deploy PortalService 111, AdminService 112 and ConfigService 113. You can also use a distributed design mechanism to deploy PortalService on different devices through a distributed system. 111, AdminService 112 and ConfigService 113. Specifically, it can be flexibly set according to business requirements, and is not uniquely limited.
  • the client 120 can be deployed on a terminal device such as a mobile phone, and can be flexibly set according to business requirements.
  • FIG. 2a is a schematic flowchart of a configuration update method provided by an embodiment of the present application, which is applied to the server of the configuration management system shown in FIG. 1.
  • the configuration update method includes:
  • the server obtains first configuration information entered by a developer through the portal subservice, and the first configuration information is used to update the target application program;
  • the target application program includes various application programs, such as a video application program on a mobile phone side, a game application program, or a management application program on an enterprise side, etc., and the first configuration information may specifically be used to update a service of the target application program.
  • the server publishes and persists the first configuration information in the database through the management sub-service;
  • the server specifically sends an asynchronous message to the database of ConfigService through the management sub-service, prompting ConfigService to update the configuration.
  • the server detects whether there is configuration information to be pushed in the database through the configuration sub-service;
  • the server specifically detects whether there is an asynchronous message with updated configuration through the configuration sub-service to determine whether there is configuration information to be pushed.
  • the server pushes the first configuration information to at least one client among the multiple clients through the configuration sub-service.
  • One client is a client that does not pull the first configuration information from the server, and the first configuration information is used for the client to hot update the target application within the current startup cycle.
  • the at least one client may be a client determined by the server that has not yet obtained the first configuration information, or may be each client of the plurality of clients, that is, the server may Indifferently pushing the first configuration information to each client with the target application installed, it is also possible to determine the partial client that has not obtained the first configuration information and send the first configuration information to the partial client.
  • the specific implementation of the server to determine some clients that have not yet obtained the first configuration information may be: query a client that has pulled the first configuration information from the local end, and determine the multiple clients The clients other than the queried client are partial clients that have not obtained the first configuration information. or,
  • the specific implementation manner of the server determining that some clients have not obtained the first configuration information may also be: query the version number of the target application of each client, and associate the version number with the first configuration information The clients whose version numbers are inconsistent are determined to be partial clients that have not obtained the first configuration information. or,
  • the specific implementation manner of the server determining that some clients have not obtained the first configuration information may also be: acquiring a client that is not configured with a configuration information pull capability among the multiple clients; and determining the multiple clients
  • the clients other than the client obtained from the terminal are partial clients that have not obtained the first configuration information.
  • the configuration management system based on the microservice architecture includes a server and a client, in which the server achieves configuration information acquisition and configuration through three sub-services: an entrance sub-service, a management sub-service, and a configuration sub-service.
  • Push because the service in the microservice architecture supports real-time communication, and the configuration subservice can detect the configuration information to be pushed in the database in real time, thereby reducing the consumption of configuration information from the input server to the client that has not pulled the configuration information.
  • the method further includes: the server receives a configuration information pull request message from the first client through the configuration subservice, and the sending time of the configuration information pull request message is the The first client is determined according to application scenarios and business characteristics, or according to the time when the server pushes an update message, and the sending time is used to restrict the update delay of the target application to be less than a preset duration;
  • the configuration subservice sends a configuration information pull response message to the first client, where the configuration information pull response message carries the first configuration information, the configuration information pull response message is used to indicate The first client updates the target application in real time in the current startup cycle according to the first configuration information.
  • the first client may be a client provided with a fallback mechanism, and the client will periodically pull the latest configuration of the application from the server.
  • the preset duration may be an experience value, such as 1 hour and 1 day.
  • the implementation manner in which the first client determines the sending time according to the application scenario and service characteristics may be: the first client may determine the service type of the target application program and the application scenario to which it belongs, and obtain the application scenario Corresponding pull cycle set, query the pull cycle set with the service type, obtain the pull cycle corresponding to the service type, and determine the sending time according to the pull cycle, the pull cycle set includes Correspondence between service type and pull cycle. or,
  • the implementation manner of the first client determining the sending time according to application scenarios and service characteristics may also be: the implementation manner of the first client determining the sending time according to application scenarios and service characteristics may also be: the first client Determine the time of the last push update message received by the server, and determine the sending time according to the time.
  • the first client since the first client can actively pull the configuration information, it can avoid the failure of the active push mechanism of the server and cause the configuration not to update the client, thereby improving the accuracy and stability of application update.
  • the client can hot update the target application without restarting, which is more efficient.
  • the server acquiring the first configuration information entered by the developer through the portal sub-service includes: the server outputting a visual management interface through the portal sub-service, and the visual management interface includes Service list, configuration acquisition function, configuration push function, the service list includes applications installed on the client, the configuration acquisition function is used to display the published configuration information, and the configuration push function is used to publish the configuration information to be pushed ,
  • the service list is obtained from the configuration sub-service, and the configuration acquisition function and the configuration push function have a calling relationship with the configuration sub-service; receiving the application targeted by the developer through the visual management interface for the target application The first configuration information of the program.
  • FIG. 2b An example diagram of a visual management interface as shown in Figure 2b.
  • the interface includes functions such as service list, view instance, configuration management, rights management, version management, rollback, and configuration push.
  • the service list can display client installation s application. Developers click configuration management to achieve configuration acquisition, entry and other operations.
  • the server provides a visual management interface to enable developers to intuitively and conveniently perform unified configuration settings, improving the convenience and efficiency of configuration settings.
  • the server detects whether there is configuration information to be pushed in the database through the configuration sub-service, including: the server acquires a polling cycle, which is pre-developed by the developer Configured; detecting whether there is configuration information to be pushed in the database through the configuration sub-service according to the rotation training cycle.
  • the polling period may be 1 second, 2 seconds, 10 seconds, etc., which is not limited here.
  • the server polls the configuration information to be pushed through ConfigService, so that the configuration information to be pushed is detected and pushed to the client as soon as possible, improving configuration efficiency and real-time.
  • the server side pushing the first configuration information to at least one client among the plurality of clients through the configuration sub-service includes that: the server side uses the configuration sub-service Acquiring a long connection maintained between the local end and each client in at least one client of the plurality of clients; using the long connection through the configuration sub-service to send to each client in the at least one client The first configuration information.
  • the long connection may be HyperText Transfer Protocol (HyperText Transfer Protocol, HTTP) long connection.
  • HyperText Transfer Protocol HyperText Transfer Protocol, HTTP
  • the server is based on the long connection mechanism, so that the client can get the push of configuration updates as soon as possible, improving the real-time nature of service updates.
  • FIG. 3 is a schematic flowchart of a configuration update method provided by an embodiment of the present application, which is applied to the target client of the configuration management system shown in FIG. ,
  • the target client runs a target application, as shown in the figure, this configuration update method includes:
  • the target client receives first configuration information pushed from the server, where the first configuration information is sent by the server by performing the following operation: acquiring developer entry through the portal subservice The first configuration information of the first configuration information is used to update the target application; and the first configuration information is published and persisted in the database by the management sub-service; and detected by the configuration sub-service Whether there is configuration information to be pushed in the database; and the first configuration information to be pushed is detected;
  • the target client updates the target application in real time within the current startup period according to the first configuration information.
  • the configuration management system based on the microservice architecture includes a server and a client, in which the server achieves configuration information acquisition and configuration through three sub-services: an entrance sub-service, a management sub-service, and a configuration sub-service.
  • Push because the service in the microservice architecture supports real-time communication, and the configuration subservice can detect the configuration information to be pushed in the database in real time, thereby reducing the consumption of configuration information from the input server to the client that has not pulled the configuration information.
  • the target client receiving the first configuration information pushed from the server includes: the target client receives the push configuration sent by the server through a long connection with the server The first configuration information.
  • the long connection includes an HTTP long connection.
  • FIG. 4 is a schematic flowchart of a configuration update method provided by an embodiment of the present application.
  • the method is applied to a first client of a configuration management system.
  • the client runs a target application.
  • this configuration update method includes:
  • the first client determines a sending time of a configuration information pull request message.
  • the sending time is determined by the first client according to an application scenario and business characteristics, or is based on the server pushing an update message. Determined by time, the sending time is used to restrict the update delay of the target application to be less than a preset duration;
  • the first client sends a configuration information pull request message to the server at the sending time
  • the first client receives a configuration information pull response message from the server, and the configuration information pull response message carries the first configuration information;
  • the first client updates the target application in real time within the current startup period according to the first configuration information.
  • the configuration management system based on the microservice architecture includes a server and a client, in which the server achieves configuration information acquisition and configuration through three sub-services: an entrance sub-service, a management sub-service, and a configuration sub-service.
  • Push because the service in the microservice architecture supports real-time communication, and the configuration subservice can detect the configuration information to be pushed in the database in real time, thereby reducing the consumption of configuration information from the input server to the client that has not pulled the configuration information.
  • the first client determining the sending time of the configuration information pull request message includes: the first client may determine the service type and application scenario of the target application, and obtain the application A set of pull cycles corresponding to the scenario, querying the set of pull cycles with the service type, obtaining the pull cycle corresponding to the service type, determining the sending time according to the pull cycle, and the set of pull cycles Including the correspondence between service types and pull cycles.
  • the first client determining the sending time of the configuration information pull request message includes: the implementation manner in which the first client determines the sending time according to application scenarios and service characteristics may also be: The first client determines the time of the last push update message received by the server, and determines the sending time according to the time.
  • FIG. 5a is a schematic structural diagram of a server 5100 (first electronic device) provided by an embodiment of the present application, as shown in FIG.
  • the server 5100 includes an application processor 5110, a memory 5120, a communication interface 5130, and one or more programs 5121, wherein the one or more programs 5121 are stored in the above-mentioned memory 5120 and are configured by
  • the above application processor 5110 executes, and the one or more programs 5121 include instructions for performing the following steps;
  • the first configuration information When detecting the first configuration information to be pushed, the first configuration information is pushed to at least one client among the plurality of clients through the configuration sub-service, and the at least one client is unsuccessful
  • the server pulls the client of the first configuration information, and the first configuration information is used by the client to hot update the target application within the current startup cycle.
  • the configuration management system based on the microservice architecture includes a server and a client, in which the server achieves configuration information acquisition and configuration through three sub-services: an entrance sub-service, a management sub-service, and a configuration sub-service.
  • Push because the service in the microservice architecture supports real-time communication, and the configuration subservice can detect the configuration information to be pushed in the database in real time, thereby reducing the consumption of configuration information from the input server to the client that has not pulled the configuration information.
  • the program further includes instructions for performing the following operations: receiving a configuration information pull request message from the first client through the configuration subservice, and a sending time of the configuration information pull request message Is determined by the first client according to application scenarios and business characteristics, or according to the time when the server pushes an update message, and the sending time is used to restrict the update delay of the target application to be less than a preset Duration; and sending a configuration information pull response message to the first client through the configuration subservice, where the configuration information pull response message carries the first configuration information, the configuration information pull response message It is used to instruct the first client to update the target application in real time within the current startup period according to the first configuration information.
  • the at least one client includes a client among the multiple clients that has not yet pulled the first configuration information.
  • the at least one client includes the multiple clients.
  • the instructions in the program are specifically used to perform the following operations: output a visual management interface through the portal subservice
  • the visual management interface includes a service list, a configuration acquisition function, and a configuration push function.
  • the service list includes applications installed on the client.
  • the configuration acquisition function is used to display published configuration information.
  • the configuration push function is used To publish the configuration information to be pushed, the service list is obtained from the configuration subservice, the configuration acquisition function and the configuration push function have a calling relationship with the configuration subservice; and the developer receives the visual management The first configuration information for the target application program entered on the interface.
  • the instructions in the program are specifically used to perform the following operations: obtain a polling period; and follow The rotation training cycle detects whether there is configuration information to be pushed in the database through the configuration sub-service.
  • the polling period is pre-configured by the developer.
  • the instructions in the program are specifically used to perform the following operations : Obtaining a long-term connection maintained between the local end and each client in at least one client of the plurality of clients through the configuration sub-service; and using the long connection to the at least one through the configuration sub-service Each client in the client sends the first configuration information.
  • FIG. 5b is a schematic structural diagram of a target client 5200 (second electronic device) provided by an embodiment of the present application, such as As shown in the figure, the target client 5200 includes an application processor 5210, a memory 5220, a communication interface 5230, and one or more programs 5221, wherein the one or more programs 5221 are stored in the above-mentioned memory 5220 and are The configuration is executed by the application processor 5210 described above, and the one or more programs 5221 include instructions for performing the following steps;
  • first configuration information pushed from the server where the first configuration information is sent by the server by performing the following operation: acquiring the first configuration information entered by the developer through the portal subservice, so The first configuration information is used to update the target application; and the first configuration information is published and persisted in the database through the management sub-service; and the configuration sub-service detects whether there is a pending in the database Pushed configuration information; and detecting the first configuration information to be pushed;
  • the configuration management system based on the microservice architecture includes a server and a client, in which the server achieves configuration information acquisition and Push, because the service in the microservice architecture supports real-time communication, and the configuration subservice can detect the configuration information to be pushed in the database in real time, thereby reducing the consumption of configuration information from the input server to the client that has not pulled the configuration information.
  • the server achieves configuration information acquisition and Push
  • the configuration subservice can detect the configuration information to be pushed in the database in real time, thereby reducing the consumption of configuration information from the input server to the client that has not pulled the configuration information.
  • FIG. 5c is a schematic structural diagram of a first client 5300 (third electronic device) provided by an embodiment of the present application.
  • the first client 5300 includes an application processor 5310, a memory 5320, a communication interface 5330, and one or more programs 5321, wherein the one or more programs 5321 are stored in the memory 5320, And is configured to be executed by the above-mentioned application processor 5310, and the one or more programs 5321 include instructions for performing the following steps;
  • the sending time is determined by the first client according to application scenarios and business characteristics, or according to the time when the server pushes an update message, and the sending time Used to restrict the update delay of the target application program to be less than a preset duration;
  • the configuration information pull response message carrying the first configuration information
  • the configuration management system based on the microservice architecture includes a server and a client, in which the server achieves configuration information acquisition and configuration through three sub-services: an entrance sub-service, a management sub-service, and a configuration sub-service.
  • Push because the service in the microservice architecture supports real-time communication, and the configuration subservice can detect the configuration information to be pushed in the database in real time, thereby reducing the consumption of configuration information from the input server to the client that has not pulled the configuration information.
  • the electronic device includes a hardware structure and/or a software module corresponding to each function.
  • the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is performed by hardware or computer software driven hardware depends on the specific application of the technical solution and design constraints. Professional technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
  • the embodiments of the present application may divide the functional unit of the electronic device according to the above method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit.
  • the above integrated unit can be implemented in the form of hardware or software function unit. It should be noted that the division of the units in the embodiments of the present application is schematic, and is only a division of logical functions, and there may be other division manners in actual implementation.
  • FIG. 6a is a block diagram of functional units of the configuration updating apparatus 610 involved in the embodiment of the present application.
  • the configuration updating device 610 is applied to an electronic device, and the server includes a radar sensor.
  • the configuration updating device 610 includes a processing unit 611 and a communication unit 612, wherein,
  • the processing unit 611 is configured to obtain the first configuration information entered by the developer through the portal subservice through the communication unit 612, and the first configuration information is used to update the target application; and through the management
  • the sub-service publishes and persists the first configuration information in the database; and detects whether there is configuration information to be pushed in the database through the configuration sub-service; and when the first configuration information to be pushed is detected ,
  • the first configuration information is pushed to at least one of the multiple clients through the communication unit 613 through the configuration sub-service, the first configuration information is used for the client in the current startup cycle Internally update the target application.
  • the configuration updating device 610 further includes a memory 613, the processing unit 611 may be a processor, the communication unit 612 may be an internal or external communication port, and the storage unit 613 may be a memory.
  • the configuration management system based on the microservice architecture includes a server and a client, in which the server achieves configuration information acquisition and Push, because the service in the microservice architecture supports real-time communication, and the configuration subservice can detect the configuration information to be pushed in the database in real time, thereby reducing the consumption of configuration information from the input server to the client that has not pulled the configuration information.
  • the server achieves configuration information acquisition and Push
  • the configuration subservice can detect the configuration information to be pushed in the database in real time, thereby reducing the consumption of configuration information from the input server to the client that has not pulled the configuration information.
  • the processing unit 611 is further configured to: receive the configuration information pull request message from the first client through the configuration subservice, and the sending time of the configuration information pull request message is the first
  • a client is determined according to application scenarios and business characteristics, or according to the time when the server pushes an update message, and the sending time is used to restrict the update delay of the target application to be less than a preset duration; and
  • the configuration subservice sends a configuration information pull response message to the first client, where the configuration information pull response message carries the first configuration information, the configuration information pull response message is used to indicate The first client updates the target application in real time in the current startup cycle according to the first configuration information.
  • the at least one client includes a client among the multiple clients that has not yet pulled the first configuration information.
  • the at least one client includes the multiple clients.
  • the processing unit 611 is specifically configured to: output a visual management interface through the portal sub-service, and the visualization
  • the management interface includes a service list, a configuration acquisition function, and a configuration push function.
  • the service list includes applications installed on the client.
  • the configuration acquisition function is used to display the published configuration information.
  • the configuration push function is used to publish the configuration to be pushed.
  • Configuration information, the service list is obtained from the configuration sub-service, the configuration acquisition function and the configuration push function have a calling relationship with the configuration sub-service; and receive the input from the developer through the visual management interface
  • the first configuration information of the target application is specifically configured to: output a visual management interface through the portal sub-service, and the visualization
  • the management interface includes a service list, a configuration acquisition function, and a configuration push function.
  • the service list includes applications installed on the client.
  • the configuration acquisition function is used to display the published configuration information.
  • the configuration push function is used to publish the configuration to be pushed.
  • Configuration information, the service list is
  • the processing unit 611 is specifically configured to: obtain a polling period; and follow the polling period
  • the configuration sub-service detects whether there is configuration information to be pushed in the database.
  • the polling period is pre-configured by the developer.
  • the processing unit 611 is specifically configured to: Configuring the sub-service to obtain a long connection maintained between the local end and each client in at least one client of the plurality of clients; and using the long connection to the at least one client through the configuration sub-service Clients send the first configuration information.
  • FIG. 6b is a block diagram of the functional units of the configuration updating device 620 involved in the embodiment of the present application.
  • the configuration updating device 620 is applied to an electronic device, and the server includes a radar sensor.
  • the configuration updating device 620 includes a processing unit 621 and a communication unit 622, where,
  • the processing unit 621 is configured to receive the first configuration information pushed from the server through the communication unit 622, where the first configuration information is sent by the server by performing the following operations:
  • the entry sub-service obtains the first configuration information entered by the developer, and the first configuration information is used to update the target application; and the first configuration information is published and persisted in the database through the management sub-service; and Detecting whether there is configuration information to be pushed in the database through the configuration sub-service; and detecting the first configuration information to be pushed; and updating the target in real time in the current startup cycle according to the first configuration information application.
  • the configuration updating device 620 further includes a memory 623, the processing unit 621 may be a processor, the communication unit 622 may be an internal or external communication port, and the storage unit 623 may be a memory.
  • the configuration management system based on the microservice architecture includes a server and a client, in which the server achieves configuration information acquisition and configuration through three sub-services: an entrance sub-service, a management sub-service, and a configuration sub-service.
  • Push because the service in the microservice architecture supports real-time communication, and the configuration subservice can detect the configuration information to be pushed in the database in real time, thereby reducing the consumption of configuration information from the input server to the client that has not pulled the configuration information.
  • FIG. 6c is a block diagram of the functional units of the configuration updating device 630 involved in the embodiment of the present application.
  • the configuration updating device 630 is applied to an electronic device, and the server includes a radar sensor.
  • the configuration updating device 630 includes a processing unit 631 and a communication unit 632, wherein,
  • the processing unit 631 is configured to determine a sending time of a configuration information pull request message, the sending time is determined by the first client according to an application scenario and business characteristics, or is based on the server pushing an update message Determined by time, the sending time is used to restrict the update delay of the target application to be less than a preset duration; and sending the configuration information pull request message to the server through the communication unit 622 at the sending time; And receiving a configuration information pull response message from the server, the configuration information pull response message carrying the first configuration information; and updating the target application in real time in the current startup cycle according to the first configuration information program.
  • the configuration updating device 630 further includes a memory 633
  • the processing unit 631 may be a processor
  • the communication unit 632 may be an internal or external communication port
  • the storage unit 633 may be a memory.
  • the configuration management system based on the microservice architecture includes a server and a client, in which the server achieves configuration information acquisition and configuration through three sub-services: an entrance sub-service, a management sub-service, and a configuration sub-service.
  • Push because the service in the microservice architecture supports real-time communication, and the configuration subservice can detect the configuration information to be pushed in the database in real time, thereby reducing the consumption of configuration information from the input server to the client that has not pulled the configuration information.
  • the configuration management system 700 includes a server 710 and multiple clients 720, and each client 720 runs a target application program, and the service
  • the terminal includes an entrance sub-service PortalService711, a management sub-service AdminService712, and a configuration sub-service ConfigService713, and each client 720 is in communication connection with the configuration sub-service 713; wherein,
  • the server 710 is used to perform any step performed by the server in the foregoing embodiment
  • the clients in the plurality of clients 720 are used to perform the steps performed by the clients (including the target client and the first client) in the foregoing embodiment.
  • An embodiment of the present application further provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program causes the computer to perform part or all of the steps of any method described in the foregoing method embodiments ,
  • the above computer includes electronic equipment.
  • Embodiments of the present application also provide a computer program product, where the computer program product includes a non-transitory computer-readable storage medium that stores the computer program, and the computer program is operable to cause the computer to perform any of the methods described in the foregoing method embodiments Some or all steps of the method.
  • the computer program product may be a software installation package, and the computer includes an electronic device.

Abstract

A method for updating a configuration, and a related product, which are applied to a server of a configuration management system, wherein the configuration management system comprises the server and a plurality of clients. The method comprises: the server acquiring, by means of an entry sub-service, first configuration information entered by a developer, wherein the first configuration information is used for updating a target application program (S201); the server releasing, in a database, the first configuration information by means of a management sub-service, and making same persist (S202); the server detecting, by means of a configuration sub-service, whether configuration information to be pushed is present in the database (S203); and when first configuration information to be pushed is detected, the server pushing the first configuration information to at least one of the plurality of clients by means of the configuration sub-service (S204). The method is conducive to improving the real-time performance of the configuration management system carrying out service updating.

Description

配置更新方法及相关产品Configuration update method and related products 技术领域Technical field
本申请涉及电子设备技术领域,具体涉及一种配置更新方法及相关产品。 This application relates to the technical field of electronic devices, and in particular to a configuration update method and related products.
本申请要求于2018年12月29日提交中国专利局,申请号为201811640221.X、发明名称为“配置更新方法及相关产品”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires the priority of the Chinese patent application submitted to the China Patent Office on December 29, 2018, with the application number 201811640221.X and the invention titled "Configuration Update Method and Related Products", the entire contents of which are incorporated by reference in this application in.
背景技术Background technique
传统的应用程序的服务更新方式是将配置信息写入配置文件中,和应用程序一起打包,每次修改配置信息后的服务更新,都需要重新进行打包、停服更新,效率极低。近些年出现了少量配置工具实现了动态配置,但是实时性难以满足用户需求。The traditional service update method of an application is to write configuration information into a configuration file and package it with the application. Each time the service update after the configuration information is modified, it is necessary to repackage and stop the service update, which is extremely inefficient. In recent years, a small number of configuration tools have appeared to achieve dynamic configuration, but it is difficult to meet user needs in real time.
技术问题technical problem
在此处键入技术问题描述段落。Type the technical problem description paragraph here.
技术解决方案Technical solution
本申请实施例提供了一种配置更新方法及相关产品,以期提高配置管理系统进行服务更新的实时性。The embodiments of the present application provide a configuration update method and related products, with a view to improving the real-time performance of service update by the configuration management system.
第一方面,本申请实施例提供一种配置更新方法,应用于配置管理系统的服务端,所述配置管理系统包括所述服务端和多个客户端,每个客户端运行有目标应用程序,所述服务端包括入口子服务、管理子服务和配置子服务,所述每个客户端与所述配置子服务通信连接;所述方法包括:In a first aspect, an embodiment of the present application provides a configuration update method, which is applied to a server of a configuration management system. The configuration management system includes the server and multiple clients. Each client runs a target application. The server includes an entrance sub-service, a management sub-service, and a configuration sub-service, and each client is communicatively connected to the configuration sub-service; the method includes:
通过所述入口子服务获取开发人员录入的第一配置信息,所述第一配置信息用于更新所述目标应用程序;Acquiring the first configuration information entered by the developer through the portal sub-service, and the first configuration information is used to update the target application program;
通过所述管理子服务在数据库中发布和持久化所述第一配置信息;Publishing and persisting the first configuration information in the database through the management sub-service;
通过所述配置子服务检测所述数据库中是否存在待推送的配置信息;Detecting whether there is configuration information to be pushed in the database through the configuration sub-service;
在检测到待推送的所述第一配置信息时,通过所述配置子服务向所述多个客户端中的至少一个客户端推送所述第一配置信息,所述至少一个客户端为未从所述服务端拉取所述第一配置信息的客户端,所述第一配置信息用于所述客户端在当前启动周期内热更新所述目标应用程序。When detecting the first configuration information to be pushed, the first configuration information is pushed to at least one client among the plurality of clients through the configuration sub-service, and the at least one client is unsuccessful The server pulls the client of the first configuration information, and the first configuration information is used by the client to hot update the target application within the current startup cycle.
第二方面,本申请实施例提供一种配置更新方法,应用于配置管理系统的目标客户端,所述配置管理系统包括所述服务端和多个客户端,所述多个客户端包括所述目标客户端,所述目标客户端运行有目标应用程序,所述服务端包括入口子服务、管理子服务和配置子服务,所述每个客户端与所述配置子服务通信连接;所述方法包括:In a second aspect, an embodiment of the present application provides a configuration update method, which is applied to a target client of a configuration management system. The configuration management system includes the server and multiple clients, and the multiple clients include the A target client, the target client runs a target application, the server includes an entrance sub-service, a management sub-service, and a configuration sub-service, and each client is in communication connection with the configuration sub-service; the method include:
接收来自所述服务端推送的第一配置信息,其中,所述第一配置信息是所述服务端执行以下操作而发送的:通过所述入口子服务获取开发人员录入的第一配置信息,所述第一配置信息用于更新所述目标应用程序;以及通过所述管理子服务在数据库中发布和持久化所述第一配置信息;以及通过所述配置子服务检测所述数据库中是否存在待推送的配置信息;以及检测到待推送的所述第一配置信息;Receiving first configuration information pushed from the server, where the first configuration information is sent by the server by performing the following operation: acquiring the first configuration information entered by the developer through the portal subservice, so The first configuration information is used to update the target application; and the first configuration information is published and persisted in the database through the management sub-service; and the configuration sub-service detects whether there is a pending in the database Pushed configuration information; and detecting the first configuration information to be pushed;
根据所述第一配置信息在当前启动周期内实时更新所述目标应用程序。Update the target application in real time within the current startup cycle according to the first configuration information.
第三方面,本申请实施例提供一种配置更新方法,应用于配置管理系统的第一客户端,所述配置管理系统包括所述服务端和多个客户端,所述多个客户端包括所述第一客户端,所述第一客户端运行有目标应用程序,所述服务端包括入口子服务、管理子服务和配置子服务,所述每个客户端与所述配置子服务通信连接;所述方法包括:In a third aspect, an embodiment of the present application provides a configuration update method, which is applied to a first client of a configuration management system. The configuration management system includes the server and multiple clients, and the multiple clients include all The first client, the first client runs a target application, the server includes an entrance sub-service, a management sub-service, and a configuration sub-service, and each client is in communication connection with the configuration sub-service; The method includes:
确定配置信息拉取请求消息的发送时间,所述发送时间是所述第一客户端根据应用场景和业务特性确定的,或者是根据所述服务端推送更新消息的时间确定的,所述发送时间用于约束所述目标应用程序的更新延时小于预设时长;Determining the sending time of the configuration information pull request message, the sending time is determined by the first client according to application scenarios and business characteristics, or according to the time when the server pushes an update message, and the sending time Used to constrain the update delay of the target application program to be less than a preset duration
在所述发送时间向所述服务端发送配置信息拉取请求消息;Sending a configuration information pull request message to the server at the sending time;
接收来自所述服务端的配置信息拉取响应消息,所述配置信息拉取响应消息携带有所述第一配置信息;Receiving a configuration information pull response message from the server, the configuration information pull response message carrying the first configuration information;
根据所述第一配置信息在当前启动周期内实时更新所述目标应用程序。Update the target application in real time within the current startup cycle according to the first configuration information.
第四方面,本申请实施例提供一种配置管理系统,包括服务端和多个客户端,每个客户端运行有目标应用程序,所述服务端包括入口子服务、管理子服务和配置子服务,所述每个客户端与所述配置子服务通信连接;其中,According to a fourth aspect, an embodiment of the present application provides a configuration management system, including a server and multiple clients, each client running a target application, the server includes an entrance sub-service, a management sub-service, and a configuration sub-service , Each client is in communication connection with the configuration subservice; wherein,
所述服务端用于执行如第一方面任一项方法中的步骤;The server is used to perform the steps in any method of the first aspect;
所述多个客户端中的客户端用于执行如第二方面或第三方面方法中的步骤。The client among the plurality of clients is used to perform the steps as in the method of the second aspect or the third aspect.
第五方面,本申请实施例提供一种电子设备,包括处理器、存储器、通信接口以及一个或多个程序,其中,上述一个或多个程序被存储在上述存储器中,并且被配置由上述处理器执行,上述程序包括用于执行本申请实施例第一、第二、第三方面任一方法中的步骤的指令。According to a fifth aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be processed by the above The above program includes instructions for performing the steps in any of the methods of the first, second, and third aspects of the embodiments of the present application.
第六方面,本申请实施例提供了一种计算机可读存储介质,其中,上述计算机可读存储介质存储用于电子数据交换的计算机程序,其中,上述计算机程序使得计算机执行如本申请实施例第一、第二、第三方面任一方法中所描述的部分或全部步骤。According to a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program causes the computer to execute the first embodiment of the present application. 1. Part or all of the steps described in any of the methods of the second and third aspects.
第七方面,本申请实施例提供了一种计算机程序产品,其中,上述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,上述计算机程序可操作来使计算机执行如本申请实施例第二方面任一方法中所描述的部分或全部步骤。该计算机程序产品可以为一个软件安装包。In a seventh aspect, an embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium that stores the computer program, and the computer program is operable to cause the computer to execute as implemented in the present application Examples of some or all of the steps described in any method of the second aspect. The computer program product may be a software installation package.
可以看出,本申请实施例中,基于微服务架构的配置管理系统包括服务端和客户端,其中服务端通过入口子服务、管理子服务、配置子服务这三个子服务实现配置信息的获取与推送,由于微服务架构中的服务支持实时通信,且配置子服务能够实时检测到数据库中待推送的配置信息,从而能够减少配置信息从录入服务端到推送到未拉取配置信息的客户端的耗时,提高配置管理系统进行服务更新的实时性,提高配置信息的处理效率。It can be seen that, in the embodiment of the present application, the configuration management system based on the microservice architecture includes a server and a client, in which the server achieves configuration information acquisition and configuration through three sub-services: an entrance sub-service, a management sub-service, and a configuration sub-service. Push, because the service in the microservice architecture supports real-time communication, and the configuration subservice can detect the configuration information to be pushed in the database in real time, thereby reducing the consumption of configuration information from the input server to the client that has not pulled the configuration information. At the same time, improve the real-time nature of the service update of the configuration management system and improve the processing efficiency of configuration information.
有益效果Beneficial effect
在此处键入有益效果描述段落。Type a beneficial effect description paragraph here.
附图说明BRIEF DESCRIPTION
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly explain the embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present application. For those of ordinary skill in the art, without paying any creative labor, other drawings can be obtained based on these drawings.
图1是本申请实施例提供的一种配置管理系统的结构示意图;1 is a schematic structural diagram of a configuration management system provided by an embodiment of the present application;
图2a是本申请实施例提供的一种配置更新方法的流程示意图;2a is a schematic flowchart of a configuration update method provided by an embodiment of the present application;
图3是本申请实施例提供的另一种配置更新方法的流程示意图;3 is a schematic flowchart of another configuration update method provided by an embodiment of the present application;
图4是本申请实施例提供的另一种配置更新方法的流程示意图;4 is a schematic flowchart of another configuration update method provided by an embodiment of the present application;
图5a是本申请实施例提供的一种服务端的结构示意图;5a is a schematic structural diagram of a server provided by an embodiment of the present application;
图5b是本申请实施例提供的一种目标客户端的结构示意图;5b is a schematic structural diagram of a target client provided by an embodiment of the present application;
图5c是本申请实施例提供的一种第一客户端的结构示意图;5c is a schematic structural diagram of a first client provided by an embodiment of the present application;
图6a是本申请实施例提供的一种配置更新装置的功能单元组成框图;6a is a block diagram of functional units of a configuration update apparatus provided by an embodiment of the present application;
图6b是本申请实施例提供的一种配置更新装置的功能单元组成框图;6b is a block diagram of functional units of a configuration update device provided by an embodiment of the present application;
图6c是本申请实施例提供的一种配置更新装置的功能单元组成框图;Figure 6c is a block diagram of functional units of a configuration update device provided by an embodiment of the present application;
图7是本申请实施例提供的另一种配置管理系统的结构示意图。7 is a schematic structural diagram of another configuration management system provided by an embodiment of the present application.
本发明的最佳实施方式Best Mode of the Invention
在此处键入本发明的最佳实施方式描述段落。Type the description paragraph of the best mode of the present invention here.
本发明的实施方式Embodiments of the invention
下面对本申请实施例进行详细介绍。The following describes the embodiments of the present application in detail.
请参阅图1,图1是本申请实施例提供了一种配置管理系统100的系统架构示意图,该配置管理系统100包括服务端110和多个客户端120,所述多个客户端120中包括使用不同类型开发语言的客户端,每个客户端120运行有目标应用程序,所述服务端110包括入口子服务PortalService 111、管理子服务AdminService 112和配置子服务ConfigService 113,所述每个客户端与所述ConfigService 113通信连接;其中PortalService 111用于通过可视化管理界面提供配置获取接口、配置推送接口,服务于Client,可视化操作采用前后端读写分离模式,视图层负责数据渲染,后台负责逻辑处理和数据处理,用户完成权限认证之后被标记为合法用户,允许进入到可视化管理界面。AdminService 112用于提供配置管理接口、配置修改发布接口,服务于PortalService 111。PortalService 111用于提供配置的可视化管理界面,可以获取AdminService 112的服务列表,间接可调用ConfigService 113的服务。基于以上设计,PortalService 111的配置管理中提供以下功能:配置过滤筛选功能、配置的一键导入与导出、回滚、变更记录展示等。Please refer to FIG. 1. FIG. 1 is a schematic diagram of a system architecture of a configuration management system 100 provided by an embodiment of the present application. The configuration management system 100 includes a server 110 and multiple clients 120. The multiple clients 120 include Clients using different types of development languages, each client 120 runs a target application, and the server 110 includes an entry subservice PortalService 111. AdminService 112 and ConfigService 113, each client and the ConfigService 113 communication connections; of which PortalService 111 is used to provide a configuration acquisition interface and a configuration push interface through the visual management interface. It serves the Client. The visual operation adopts the front-end and back-end read-write separation mode. The view layer is responsible for data rendering, and the background is responsible for logical processing and data processing. Mark as a legal user and allow access to the visual management interface. AdminService 112 is used to provide a configuration management interface, a configuration modification publishing interface, and serves PortalService 111. PortalService 111 is used to provide a visual management interface for configuration, you can get AdminService 112 service list, indirectly call ConfigService 113 services. Based on the above design, PortalService 111 configuration management provides the following functions: configuration filtering function, configuration one-key import and export, rollback, change record display, etc.
所述PortalService 111、所述AdminService 112和所述ConfigService 113构成微服务架构,该微服务架构使用模型视图控制器(Model View Controller,MVC)设计模式,模型层Model用于表现业务模型和数据对象的操作,视图层View用于数据渲染,控制器Controller则是确保M和V的同步,一旦M改变,V应该同步更新。每个子服务都是一个单独的应用,降低耦合性,使配置中心更可扩展、提高稳定性。其次,使用服务注册与发现的机制,实现各个服务之间的通信。ConfigService 113即是配置管理系统的子服务提供者,也被设置为微服务的注册中心,二者处于同一个进程中,可以简化操作难度。设置ConfigService 113为注册中心,提供注解方式用于轻松实现。另一个服务提供者AdminService 112也注册服务实例到注册中心,提供对应的功能,最后将注册中心具体地址传递至PortalService 111中作为启动参数,使得PortalService 111这个可视化管理服务能够管理所有的配置。The PortalService 111. The AdminService 112 and the ConfigService 113 constitutes a microservice architecture, which uses a model view controller (Model View) Controller, MVC) design pattern, the model layer Model is used to represent the operation of business models and data objects, the view layer View is used for data rendering, and the controller Controller is to ensure the synchronization of M and V. Once M changes, V should be updated synchronously. Each sub-service is a separate application, reducing coupling, making the configuration center more scalable and improving stability. Second, use the mechanism of service registration and discovery to achieve communication between various services. ConfigService 113 is a sub-service provider of the configuration management system, and is also set up as a registration center for microservices. Both are in the same process, which can simplify the operation difficulty. Setting up ConfigService 113 is a registration center, providing annotations for easy implementation. Another service provider AdminService 112 also registers the service instance to the registration center, provides the corresponding function, and finally passes the specific address of the registration center to the PortalService 111 as a startup parameter, making PortalService 111 This visual management service can manage all configurations.
具体实现中,所述服务端110可以采用独立服务器集中部署PortalService 111、AdminService 112和ConfigService 113,也可以采用分布式设计机制,通过分布式系统分别在不同设备上部署PortalService 111、AdminService 112和ConfigService 113,具体可以根据业务需求进行灵活设置,不做唯一限定。所述客户端120可以部署在如手机等终端设备上,具体根据业务需求进行灵活设置。In a specific implementation, the server 110 may use an independent server to centrally deploy PortalService 111, AdminService 112 and ConfigService 113. You can also use a distributed design mechanism to deploy PortalService on different devices through a distributed system. 111, AdminService 112 and ConfigService 113. Specifically, it can be flexibly set according to business requirements, and is not uniquely limited. The client 120 can be deployed on a terminal device such as a mobile phone, and can be flexibly set according to business requirements.
请参阅图2a,图2a是本申请实施例提供了一种配置更新方法的流程示意图,应用于如图1所述的配置管理系统的服务端;如图所示,本配置更新方法包括:Please refer to FIG. 2a. FIG. 2a is a schematic flowchart of a configuration update method provided by an embodiment of the present application, which is applied to the server of the configuration management system shown in FIG. 1. As shown in the figure, the configuration update method includes:
S201,所述服务端通过所述入口子服务获取开发人员录入的第一配置信息,所述第一配置信息用于更新所述目标应用程序;S201. The server obtains first configuration information entered by a developer through the portal subservice, and the first configuration information is used to update the target application program;
其中,所述目标应用程序包括各种应用程序,如手机端的视频应用程序、游戏应用程序,或者是企业端的管理应用程序等,第一配置信息具体可以用于更新目标应用程序的某个服务。Wherein, the target application program includes various application programs, such as a video application program on a mobile phone side, a game application program, or a management application program on an enterprise side, etc., and the first configuration information may specifically be used to update a service of the target application program.
S202,所述服务端通过所述管理子服务在数据库中发布和持久化所述第一配置信息;S202, the server publishes and persists the first configuration information in the database through the management sub-service;
其中,服务端具体通过所述管理子服务发出异步消息到ConfigService的数据库中,提示ConfigService有配置进行了更新。Among them, the server specifically sends an asynchronous message to the database of ConfigService through the management sub-service, prompting ConfigService to update the configuration.
S203,所述服务端通过所述配置子服务检测所述数据库中是否存在待推送的配置信息;S203, the server detects whether there is configuration information to be pushed in the database through the configuration sub-service;
其中,所述服务端具体通过所述配置子服务检测是否有配置更新了的异步消息,以此来确定是否存在待推送的配置信息。Wherein, the server specifically detects whether there is an asynchronous message with updated configuration through the configuration sub-service to determine whether there is configuration information to be pushed.
S204,所述服务端在检测到待推送的所述第一配置信息时,通过所述配置子服务向所述多个客户端中的至少一个客户端推送所述第一配置信息,所述至少一个客户端为未从所述服务端拉取所述第一配置信息的客户端,所述第一配置信息用于所述客户端在当前启动周期内热更新所述目标应用程序。S204. When detecting the first configuration information to be pushed, the server pushes the first configuration information to at least one client among the multiple clients through the configuration sub-service. One client is a client that does not pull the first configuration information from the server, and the first configuration information is used for the client to hot update the target application within the current startup cycle.
其中,所述至少一个客户端可以是服务端确定的尚未获取到所述第一配置信息的客户端,也可以是所述多个客户端中的每个客户端,也就是说,服务端可以无差别的向每个安装有目标应用程序的客户端推送第一配置信息,也可以通过确定尚未获取到第一配置信息的部分客户端,并向该部分客户端发送第一配置信息。The at least one client may be a client determined by the server that has not yet obtained the first configuration information, or may be each client of the plurality of clients, that is, the server may Indifferently pushing the first configuration information to each client with the target application installed, it is also possible to determine the partial client that has not obtained the first configuration information and send the first configuration information to the partial client.
具体实现中,所述服务端确定尚未获取到第一配置信息的部分客户端的具体实现方式可以是:查询已经从本端拉取所述第一配置信息的客户端,确定所述多个客户端中除查询出的所述客户端之外的客户端为尚未获取到第一配置信息的部分客户端。或者,In a specific implementation, the specific implementation of the server to determine some clients that have not yet obtained the first configuration information may be: query a client that has pulled the first configuration information from the local end, and determine the multiple clients The clients other than the queried client are partial clients that have not obtained the first configuration information. or,
所述服务端确定尚未获取到第一配置信息的部分客户端的具体实现方式还可以是:查询所述每个客户端的所述目标应用程序的版本号,将版本号与所述第一配置信息关联的版本号不一致的客户端确定为尚未获取到第一配置信息的部分客户端。或者,The specific implementation manner of the server determining that some clients have not obtained the first configuration information may also be: query the version number of the target application of each client, and associate the version number with the first configuration information The clients whose version numbers are inconsistent are determined to be partial clients that have not obtained the first configuration information. or,
所述服务端确定尚未获取到第一配置信息的部分客户端的具体实现方式还可以是:获取所述多个客户端中有未配置有配置信息拉取能力的客户端;确定所述多个客户端中出获取的所述客户端之外的客户端为尚未获取到第一配置信息的部分客户端。The specific implementation manner of the server determining that some clients have not obtained the first configuration information may also be: acquiring a client that is not configured with a configuration information pull capability among the multiple clients; and determining the multiple clients The clients other than the client obtained from the terminal are partial clients that have not obtained the first configuration information.
可以看出,本申请实施例中,基于微服务架构的配置管理系统包括服务端和客户端,其中服务端通过入口子服务、管理子服务、配置子服务这三个子服务实现配置信息的获取与推送,由于微服务架构中的服务支持实时通信,且配置子服务能够实时检测到数据库中待推送的配置信息,从而能够减少配置信息从录入服务端到推送到未拉取配置信息的客户端的耗时提高配置管理系统进行服务更新的实时性,提高配置信息的处理效率。It can be seen that, in the embodiment of the present application, the configuration management system based on the microservice architecture includes a server and a client, in which the server achieves configuration information acquisition and configuration through three sub-services: an entrance sub-service, a management sub-service, and a configuration sub-service. Push, because the service in the microservice architecture supports real-time communication, and the configuration subservice can detect the configuration information to be pushed in the database in real time, thereby reducing the consumption of configuration information from the input server to the client that has not pulled the configuration information. To improve the real-time performance of service update by configuration management system and improve the processing efficiency of configuration information.
在一个可能的示例中,所述方法还包括:所述服务端通过所述配置子服务接收来自第一客户端的配置信息拉取请求消息,所述配置信息拉取请求消息的发送时间是所述第一客户端根据应用场景和业务特性确定的,或者是根据所述服务端推送更新消息的时间确定的,所述发送时间用于约束所述目标应用程序的更新延时小于预设时长;通过所述配置子服务向所述第一客户端发送配置信息拉取响应消息,所述配置信息拉取响应消息携带有所述第一配置信息的,所述配置信息拉取响应消息用于指示所述第一客户端根据所述第一配置信息在当前启动周期内实时更新所述目标应用程序。In a possible example, the method further includes: the server receives a configuration information pull request message from the first client through the configuration subservice, and the sending time of the configuration information pull request message is the The first client is determined according to application scenarios and business characteristics, or according to the time when the server pushes an update message, and the sending time is used to restrict the update delay of the target application to be less than a preset duration; The configuration subservice sends a configuration information pull response message to the first client, where the configuration information pull response message carries the first configuration information, the configuration information pull response message is used to indicate The first client updates the target application in real time in the current startup cycle according to the first configuration information.
其中,所述第一客户端可以是设置有回退fallback机制的客户端,该客户端会定时从服务端拉取应用的最新配置。所述预设时长可以是经验值,如1个小时、1天等。The first client may be a client provided with a fallback mechanism, and the client will periodically pull the latest configuration of the application from the server. The preset duration may be an experience value, such as 1 hour and 1 day.
具体实现中,所述第一客户端根据应用场景和业务特性确定发送时间的实现方式可以是:所述第一客户端可以确定目标应用程序的业务类型和所属的应用场景,获取所述应用场景对应的拉取周期集合,以所述业务类型查询所述拉取周期集合,获取所述业务类型对应的拉取周期,根据所述拉取周期确定所述发送时间,所述拉取周期集合包括业务类型和拉取周期之间的对应关系。或者,In a specific implementation, the implementation manner in which the first client determines the sending time according to the application scenario and service characteristics may be: the first client may determine the service type of the target application program and the application scenario to which it belongs, and obtain the application scenario Corresponding pull cycle set, query the pull cycle set with the service type, obtain the pull cycle corresponding to the service type, and determine the sending time according to the pull cycle, the pull cycle set includes Correspondence between service type and pull cycle. or,
所述第一客户端根据应用场景和业务特性确定发送时间的实现方式还可以是:所述第一客户端根据应用场景和业务特性确定发送时间的实现方式还可以是:所述第一客户端确定最近一次接收到的所述服务端的推送更新消息的时间,并根据该时间确定所述发送时间。The implementation manner of the first client determining the sending time according to application scenarios and service characteristics may also be: the implementation manner of the first client determining the sending time according to application scenarios and service characteristics may also be: the first client Determine the time of the last push update message received by the server, and determine the sending time according to the time.
可见,本示例中,由于第一客户端可以主动拉取配置信息,从而可以避免服务端的主动推送机制失效而导致配置不更新客户端,提高应用更新准确度和稳定性。此外,客户端可以热更新目标应用程序,无需重启,更加高效。It can be seen that in this example, since the first client can actively pull the configuration information, it can avoid the failure of the active push mechanism of the server and cause the configuration not to update the client, thereby improving the accuracy and stability of application update. In addition, the client can hot update the target application without restarting, which is more efficient.
在一个可能的示例中,所述服务端通过所述入口子服务获取开发人员录入的第一配置信息,包括:所述服务端通过所述入口子服务输出可视化管理界面,所述可视化管理界面包括服务列表、配置获取功能、配置推送功能,所述服务列表包括客户端安装的应用程序,所述配置获取功能用于显示已发布的配置信息,所述配置推送功能用于发布待推送的配置信息,所述服务列表是从所述配置子服务获取的,所述配置获取功能和配置推送功能与所述配置子服务存在调用关系;接收开发人员通过所述可视化管理界面录入的针对所述目标应用程序的第一配置信息。In a possible example, the server acquiring the first configuration information entered by the developer through the portal sub-service includes: the server outputting a visual management interface through the portal sub-service, and the visual management interface includes Service list, configuration acquisition function, configuration push function, the service list includes applications installed on the client, the configuration acquisition function is used to display the published configuration information, and the configuration push function is used to publish the configuration information to be pushed , The service list is obtained from the configuration sub-service, and the configuration acquisition function and the configuration push function have a calling relationship with the configuration sub-service; receiving the application targeted by the developer through the visual management interface for the target application The first configuration information of the program.
如图2b所示的一种可视化管理界面的示例图,该界面包括显示有服务列表、查看实例、配置管理、权限管理、版本管理、回滚、配置推送等功能,服务列表可以显示客户端安装的应用程序。开发人员点击配置管理可以实现配置获取、录入等操作。An example diagram of a visual management interface as shown in Figure 2b. The interface includes functions such as service list, view instance, configuration management, rights management, version management, rollback, and configuration push. The service list can display client installation s application. Developers click configuration management to achieve configuration acquisition, entry and other operations.
可见,本示例中,服务端通过提供可视化管理界面,使得开发人员可以直观、便捷的进行统一的配置设置,提高配置设置的便捷性和效率。It can be seen that in this example, the server provides a visual management interface to enable developers to intuitively and conveniently perform unified configuration settings, improving the convenience and efficiency of configuration settings.
在一个可能的示例中,所述服务端通过所述配置子服务检测所述数据库中是否存在待推送的配置信息,包括:所述服务端获取轮询周期,所述轮询周期为开发人员预先配置的;按照所述轮训周期通过所述配置子服务检测所述数据库中是否存在待推送的配置信息。In a possible example, the server detects whether there is configuration information to be pushed in the database through the configuration sub-service, including: the server acquires a polling cycle, which is pre-developed by the developer Configured; detecting whether there is configuration information to be pushed in the database through the configuration sub-service according to the rotation training cycle.
其中,所述轮询周期可以是1秒、2秒、10秒等,此处不做唯一限定。Wherein, the polling period may be 1 second, 2 seconds, 10 seconds, etc., which is not limited here.
可见,本示例中,服务端通过ConfigService轮询待推送的配置信息,使得待推送的配置信息尽早被检测到并推送给客户端,提高配置效率和实时性。It can be seen that in this example, the server polls the configuration information to be pushed through ConfigService, so that the configuration information to be pushed is detected and pushed to the client as soon as possible, improving configuration efficiency and real-time.
在一个可能的示例中,所述服务端通过所述配置子服务向所述多个客户端中的至少一个客户端推送所述第一配置信息,包括:所述服务端通过所述配置子服务获取本端与所述多个客户端中的至少一个客户端中每个客户端保持的长连接;通过所述配置子服务使用所述长连接向所述至少一个客户端中每个客户端发送所述第一配置信息。In a possible example, the server side pushing the first configuration information to at least one client among the plurality of clients through the configuration sub-service includes that: the server side uses the configuration sub-service Acquiring a long connection maintained between the local end and each client in at least one client of the plurality of clients; using the long connection through the configuration sub-service to send to each client in the at least one client The first configuration information.
其中,所述长连接可以是超文本传输协议(HyperText Transfer Protocol,HTTP)长连接。Wherein, the long connection may be HyperText Transfer Protocol (HyperText Transfer Protocol, HTTP) long connection.
可见,本示例中,服务端基于长连接机制,使得客户端能够尽早获得配置更新的推送,提高服务更新的实时性。It can be seen that in this example, the server is based on the long connection mechanism, so that the client can get the push of configuration updates as soon as possible, improving the real-time nature of service updates.
与上述图2a所示的实施例一致的,请参阅图3,图3是本申请实施例提供的一种配置更新方法的流程示意图,应用于如图1所述的配置管理系统的目标客户端,所述目标客户端运行有目标应用程序,如图所示,本配置更新方法包括:Consistent with the embodiment shown in FIG. 2a above, please refer to FIG. 3, which is a schematic flowchart of a configuration update method provided by an embodiment of the present application, which is applied to the target client of the configuration management system shown in FIG. , The target client runs a target application, as shown in the figure, this configuration update method includes:
S301,所述目标客户端接收来自所述服务端推送的第一配置信息,其中,所述第一配置信息是所述服务端执行以下操作而发送的:通过所述入口子服务获取开发人员录入的第一配置信息,所述第一配置信息用于更新所述目标应用程序;以及通过所述管理子服务在数据库中发布和持久化所述第一配置信息;以及通过所述配置子服务检测所述数据库中是否存在待推送的配置信息;以及检测到待推送的所述第一配置信息;S301. The target client receives first configuration information pushed from the server, where the first configuration information is sent by the server by performing the following operation: acquiring developer entry through the portal subservice The first configuration information of the first configuration information is used to update the target application; and the first configuration information is published and persisted in the database by the management sub-service; and detected by the configuration sub-service Whether there is configuration information to be pushed in the database; and the first configuration information to be pushed is detected;
S302,所述目标客户端根据所述第一配置信息在当前启动周期内实时更新所述目标应用程序。S302. The target client updates the target application in real time within the current startup period according to the first configuration information.
可以看出,本申请实施例中,基于微服务架构的配置管理系统包括服务端和客户端,其中服务端通过入口子服务、管理子服务、配置子服务这三个子服务实现配置信息的获取与推送,由于微服务架构中的服务支持实时通信,且配置子服务能够实时检测到数据库中待推送的配置信息,从而能够减少配置信息从录入服务端到推送到未拉取配置信息的客户端的耗时提高配置管理系统进行服务更新的实时性,提高配置信息的处理效率。It can be seen that, in the embodiment of the present application, the configuration management system based on the microservice architecture includes a server and a client, in which the server achieves configuration information acquisition and configuration through three sub-services: an entrance sub-service, a management sub-service, and a configuration sub-service. Push, because the service in the microservice architecture supports real-time communication, and the configuration subservice can detect the configuration information to be pushed in the database in real time, thereby reducing the consumption of configuration information from the input server to the client that has not pulled the configuration information. To improve the real-time performance of service update by configuration management system and improve the processing efficiency of configuration information.
在一个可能的示例中,所述目标客户端接收来自所述服务端推送的第一配置信息,包括:所述目标客户端通过与所述服务端保持的长连接接收来自所述服务端推送的第一配置信息。In a possible example, the target client receiving the first configuration information pushed from the server includes: the target client receives the push configuration sent by the server through a long connection with the server The first configuration information.
其中,所述长连接包括HTTP长连接。Wherein, the long connection includes an HTTP long connection.
与上述图2a所示的实施例一致的,请参阅图4,图4是本申请实施例提供的一种配置更新方法的流程示意图,应用于配置管理系统的第一客户端,所述第一客户端运行有目标应用程序,如图所示,本配置更新方法包括:Consistent with the embodiment shown in FIG. 2a above, please refer to FIG. 4, which is a schematic flowchart of a configuration update method provided by an embodiment of the present application. The method is applied to a first client of a configuration management system. The client runs a target application. As shown in the figure, this configuration update method includes:
S401,所述第一客户端确定配置信息拉取请求消息的发送时间,所述发送时间是所述第一客户端根据应用场景和业务特性确定的,或者是根据所述服务端推送更新消息的时间确定的,所述发送时间用于约束所述目标应用程序的更新延时小于预设时长;S401. The first client determines a sending time of a configuration information pull request message. The sending time is determined by the first client according to an application scenario and business characteristics, or is based on the server pushing an update message. Determined by time, the sending time is used to restrict the update delay of the target application to be less than a preset duration;
S402,所述第一客户端在所述发送时间向所述服务端发送配置信息拉取请求消息;S402, the first client sends a configuration information pull request message to the server at the sending time;
S403,所述第一客户端接收来自所述服务端的配置信息拉取响应消息,所述配置信息拉取响应消息携带有所述第一配置信息;S403, the first client receives a configuration information pull response message from the server, and the configuration information pull response message carries the first configuration information;
S404,所述第一客户端根据所述第一配置信息在当前启动周期内实时更新所述目标应用程序。S404. The first client updates the target application in real time within the current startup period according to the first configuration information.
可以看出,本申请实施例中,基于微服务架构的配置管理系统包括服务端和客户端,其中服务端通过入口子服务、管理子服务、配置子服务这三个子服务实现配置信息的获取与推送,由于微服务架构中的服务支持实时通信,且配置子服务能够实时检测到数据库中待推送的配置信息,从而能够减少配置信息从录入服务端到推送到未拉取配置信息的客户端的耗时提高配置管理系统进行服务更新的实时性,提高配置信息的处理效率。It can be seen that, in the embodiment of the present application, the configuration management system based on the microservice architecture includes a server and a client, in which the server achieves configuration information acquisition and configuration through three sub-services: an entrance sub-service, a management sub-service, and a configuration sub-service. Push, because the service in the microservice architecture supports real-time communication, and the configuration subservice can detect the configuration information to be pushed in the database in real time, thereby reducing the consumption of configuration information from the input server to the client that has not pulled the configuration information. To improve the real-time performance of service update by configuration management system and improve the processing efficiency of configuration information.
在一个可能的示例中,所述第一客户端确定配置信息拉取请求消息的发送时间,包括:所述第一客户端可以确定目标应用程序的业务类型和所属的应用场景,获取所述应用场景对应的拉取周期集合,以所述业务类型查询所述拉取周期集合,获取所述业务类型对应的拉取周期,根据所述拉取周期确定所述发送时间,所述拉取周期集合包括业务类型和拉取周期之间的对应关系。In a possible example, the first client determining the sending time of the configuration information pull request message includes: the first client may determine the service type and application scenario of the target application, and obtain the application A set of pull cycles corresponding to the scenario, querying the set of pull cycles with the service type, obtaining the pull cycle corresponding to the service type, determining the sending time according to the pull cycle, and the set of pull cycles Including the correspondence between service types and pull cycles.
在一个可能的示例中,所述第一客户端确定配置信息拉取请求消息的发送时间,包括:所述第一客户端根据应用场景和业务特性确定发送时间的实现方式还可以是:所述第一客户端确定最近一次接收到的所述服务端的推送更新消息的时间,并根据该时间确定所述发送时间。In a possible example, the first client determining the sending time of the configuration information pull request message includes: the implementation manner in which the first client determines the sending time according to application scenarios and service characteristics may also be: The first client determines the time of the last push update message received by the server, and determines the sending time according to the time.
与上述图2a、图3、图4所示的实施例一致的,请参阅图5a,图5a是本申请实施例提供的一种服务端5100(第一种电子设备)的结构示意图,如图所示,所述服务端5100包括应用处理器5110、存储器5120、通信接口5130以及一个或多个程序5121,其中,所述一个或多个程序5121被存储在上述存储器5120中,并且被配置由上述应用处理器5110执行,所述一个或多个程序5121包括用于执行以下步骤的指令;Consistent with the above embodiments shown in FIG. 2a, FIG. 3, and FIG. 4, please refer to FIG. 5a. FIG. 5a is a schematic structural diagram of a server 5100 (first electronic device) provided by an embodiment of the present application, as shown in FIG. As shown, the server 5100 includes an application processor 5110, a memory 5120, a communication interface 5130, and one or more programs 5121, wherein the one or more programs 5121 are stored in the above-mentioned memory 5120 and are configured by The above application processor 5110 executes, and the one or more programs 5121 include instructions for performing the following steps;
通过所述入口子服务获取开发人员录入的第一配置信息,所述第一配置信息用于更新所述目标应用程序;Acquiring the first configuration information entered by the developer through the portal sub-service, and the first configuration information is used to update the target application program;
通过所述管理子服务在数据库中发布和持久化所述第一配置信息;Publishing and persisting the first configuration information in the database through the management sub-service;
通过所述配置子服务检测所述数据库中是否存在待推送的配置信息;Detecting whether there is configuration information to be pushed in the database through the configuration sub-service;
在检测到待推送的所述第一配置信息时,通过所述配置子服务向所述多个客户端中的至少一个客户端推送所述第一配置信息,所述至少一个客户端为未从所述服务端拉取所述第一配置信息的客户端,所述第一配置信息用于所述客户端在当前启动周期内热更新所述目标应用程序。When detecting the first configuration information to be pushed, the first configuration information is pushed to at least one client among the plurality of clients through the configuration sub-service, and the at least one client is unsuccessful The server pulls the client of the first configuration information, and the first configuration information is used by the client to hot update the target application within the current startup cycle.
可以看出,本申请实施例中,基于微服务架构的配置管理系统包括服务端和客户端,其中服务端通过入口子服务、管理子服务、配置子服务这三个子服务实现配置信息的获取与推送,由于微服务架构中的服务支持实时通信,且配置子服务能够实时检测到数据库中待推送的配置信息,从而能够减少配置信息从录入服务端到推送到未拉取配置信息的客户端的耗时提高配置管理系统进行服务更新的实时性,提高配置信息的处理效率。It can be seen that, in the embodiment of the present application, the configuration management system based on the microservice architecture includes a server and a client, in which the server achieves configuration information acquisition and configuration through three sub-services: an entrance sub-service, a management sub-service, and a configuration sub-service. Push, because the service in the microservice architecture supports real-time communication, and the configuration subservice can detect the configuration information to be pushed in the database in real time, thereby reducing the consumption of configuration information from the input server to the client that has not pulled the configuration information. To improve the real-time performance of service update by configuration management system and improve the processing efficiency of configuration information.
在一个可能的示例中,所述程序还包括用于执行以下操作的指令:通过所述配置子服务接收来自第一客户端的配置信息拉取请求消息,所述配置信息拉取请求消息的发送时间是所述第一客户端根据应用场景和业务特性确定的,或者是根据所述服务端推送更新消息的时间确定的,所述发送时间用于约束所述目标应用程序的更新延时小于预设时长;以及通过所述配置子服务向所述第一客户端发送配置信息拉取响应消息,所述配置信息拉取响应消息携带有所述第一配置信息的,所述配置信息拉取响应消息用于指示所述第一客户端根据所述第一配置信息在当前启动周期内实时更新所述目标应用程序。In a possible example, the program further includes instructions for performing the following operations: receiving a configuration information pull request message from the first client through the configuration subservice, and a sending time of the configuration information pull request message Is determined by the first client according to application scenarios and business characteristics, or according to the time when the server pushes an update message, and the sending time is used to restrict the update delay of the target application to be less than a preset Duration; and sending a configuration information pull response message to the first client through the configuration subservice, where the configuration information pull response message carries the first configuration information, the configuration information pull response message It is used to instruct the first client to update the target application in real time within the current startup period according to the first configuration information.
在一个可能的示例中,所述至少一个客户端包括所述多个客户端中尚未拉取所述第一配置信息的客户端。In a possible example, the at least one client includes a client among the multiple clients that has not yet pulled the first configuration information.
在一个可能的示例中,所述至少一个客户端包括所述多个客户端。In one possible example, the at least one client includes the multiple clients.
在一个可能的示例中,在所述通过所述入口子服务获取开发人员录入的第一配置信息方面,所述程序中的指令具体用于执行以下操作:通过所述入口子服务输出可视化管理界面,所述可视化管理界面包括服务列表、配置获取功能、配置推送功能,所述服务列表包括客户端安装的应用程序,所述配置获取功能用于显示已发布的配置信息,所述配置推送功能用于发布待推送的配置信息,所述服务列表是从所述配置子服务获取的,所述配置获取功能和配置推送功能与所述配置子服务存在调用关系;以及接收开发人员通过所述可视化管理界面录入的针对所述目标应用程序的第一配置信息。In a possible example, in terms of obtaining the first configuration information entered by the developer through the portal subservice, the instructions in the program are specifically used to perform the following operations: output a visual management interface through the portal subservice The visual management interface includes a service list, a configuration acquisition function, and a configuration push function. The service list includes applications installed on the client. The configuration acquisition function is used to display published configuration information. The configuration push function is used To publish the configuration information to be pushed, the service list is obtained from the configuration subservice, the configuration acquisition function and the configuration push function have a calling relationship with the configuration subservice; and the developer receives the visual management The first configuration information for the target application program entered on the interface.
在一个可能的示例中,在所述通过所述配置子服务检测所述数据库中是否存在待推送的配置信息方面,所述程序中的指令具体用于执行以下操作:获取轮询周期;以及按照所述轮训周期通过所述配置子服务检测所述数据库中是否存在待推送的配置信息。In a possible example, in terms of detecting whether there is configuration information to be pushed in the database through the configuration sub-service, the instructions in the program are specifically used to perform the following operations: obtain a polling period; and follow The rotation training cycle detects whether there is configuration information to be pushed in the database through the configuration sub-service.
在一个可能的示例中,所述轮询周期为开发人员预先配置的。In a possible example, the polling period is pre-configured by the developer.
在一个可能的示例中,在所述通过所述配置子服务向所述多个客户端中的至少一个客户端推送所述第一配置信息方面,所述程序中的指令具体用于执行以下操作:通过所述配置子服务获取本端与所述多个客户端中的至少一个客户端中每个客户端保持的长连接;以及通过所述配置子服务使用所述长连接向所述至少一个客户端中每个客户端发送所述第一配置信息。In a possible example, in terms of pushing the first configuration information to at least one of the clients through the configuration sub-service, the instructions in the program are specifically used to perform the following operations : Obtaining a long-term connection maintained between the local end and each client in at least one client of the plurality of clients through the configuration sub-service; and using the long connection to the at least one through the configuration sub-service Each client in the client sends the first configuration information.
与上述图2a、图3、图4所示的实施例一致的,请参阅图5b,图5b是本申请实施例提供的一种目标客户端5200(第二种电子设备)的结构示意图,如图所示,所述目标客户端5200包括应用处理器5210、存储器5220、通信接口5230以及一个或多个程序5221,其中,所述一个或多个程序5221被存储在上述存储器5220中,并且被配置由上述应用处理器5210执行,所述一个或多个程序5221包括用于执行以下步骤的指令;Consistent with the above embodiments shown in FIG. 2a, FIG. 3, and FIG. 4, please refer to FIG. 5b. FIG. 5b is a schematic structural diagram of a target client 5200 (second electronic device) provided by an embodiment of the present application, such as As shown in the figure, the target client 5200 includes an application processor 5210, a memory 5220, a communication interface 5230, and one or more programs 5221, wherein the one or more programs 5221 are stored in the above-mentioned memory 5220 and are The configuration is executed by the application processor 5210 described above, and the one or more programs 5221 include instructions for performing the following steps;
接收来自所述服务端推送的第一配置信息,其中,所述第一配置信息是所述服务端执行以下操作而发送的:通过所述入口子服务获取开发人员录入的第一配置信息,所述第一配置信息用于更新所述目标应用程序;以及通过所述管理子服务在数据库中发布和持久化所述第一配置信息;以及通过所述配置子服务检测所述数据库中是否存在待推送的配置信息;以及检测到待推送的所述第一配置信息;Receiving first configuration information pushed from the server, where the first configuration information is sent by the server by performing the following operation: acquiring the first configuration information entered by the developer through the portal subservice, so The first configuration information is used to update the target application; and the first configuration information is published and persisted in the database through the management sub-service; and the configuration sub-service detects whether there is a pending in the database Pushed configuration information; and detecting the first configuration information to be pushed;
根据所述第一配置信息在当前启动周期内实时更新所述目标应用程序。Update the target application in real time within the current startup cycle according to the first configuration information.
可以看出,本申请实施例中,基于微服务架构的配置管理系统包括服务端和客户端,其中服务端通过入口子服务、管理子服务、配置子服务这三个子服务实现配置信息的获取与推送,由于微服务架构中的服务支持实时通信,且配置子服务能够实时检测到数据库中待推送的配置信息,从而能够减少配置信息从录入服务端到推送到未拉取配置信息的客户端的耗时提高配置管理系统进行服务更新的实时性,提高配置信息的处理效率。It can be seen that, in the embodiment of the present application, the configuration management system based on the microservice architecture includes a server and a client, in which the server achieves configuration information acquisition and Push, because the service in the microservice architecture supports real-time communication, and the configuration subservice can detect the configuration information to be pushed in the database in real time, thereby reducing the consumption of configuration information from the input server to the client that has not pulled the configuration information. To improve the real-time performance of service update by configuration management system and improve the processing efficiency of configuration information.
与上述图2a、图3、图4所示的实施例一致的,请参阅图5c,图5c是本申请实施例提供的一种第一客户端5300(第三种电子设备)的结构示意图,如图所示,所述第一客户端5300包括应用处理器5310、存储器5320、通信接口5330以及一个或多个程序5321,其中,所述一个或多个程序5321被存储在上述存储器5320中,并且被配置由上述应用处理器5310执行,所述一个或多个程序5321包括用于执行以下步骤的指令;Consistent with the above embodiments shown in FIG. 2a, FIG. 3, and FIG. 4, please refer to FIG. 5c, which is a schematic structural diagram of a first client 5300 (third electronic device) provided by an embodiment of the present application. As shown in the figure, the first client 5300 includes an application processor 5310, a memory 5320, a communication interface 5330, and one or more programs 5321, wherein the one or more programs 5321 are stored in the memory 5320, And is configured to be executed by the above-mentioned application processor 5310, and the one or more programs 5321 include instructions for performing the following steps;
确定配置信息拉取请求消息的发送时间,所述发送时间是所述第一客户端根据应用场景和业务特性确定的,或者是根据所述服务端推送更新消息的时间确定的,所述发送时间用于约束所述目标应用程序的更新延时小于预设时长;Determining the sending time of the configuration information pull request message, the sending time is determined by the first client according to application scenarios and business characteristics, or according to the time when the server pushes an update message, and the sending time Used to restrict the update delay of the target application program to be less than a preset duration;
在所述发送时间向所述服务端发送配置信息拉取请求消息;Sending a configuration information pull request message to the server at the sending time;
接收来自所述服务端的配置信息拉取响应消息,所述配置信息拉取响应消息携带有所述第一配置信息;Receiving a configuration information pull response message from the server, the configuration information pull response message carrying the first configuration information;
根据所述第一配置信息在当前启动周期内实时更新所述目标应用程序。Update the target application in real time within the current startup cycle according to the first configuration information.
可以看出,本申请实施例中,基于微服务架构的配置管理系统包括服务端和客户端,其中服务端通过入口子服务、管理子服务、配置子服务这三个子服务实现配置信息的获取与推送,由于微服务架构中的服务支持实时通信,且配置子服务能够实时检测到数据库中待推送的配置信息,从而能够减少配置信息从录入服务端到推送到未拉取配置信息的客户端的耗时提高配置管理系统进行服务更新的实时性,提高配置信息的处理效率。It can be seen that, in the embodiment of the present application, the configuration management system based on the microservice architecture includes a server and a client, in which the server achieves configuration information acquisition and configuration through three sub-services: an entrance sub-service, a management sub-service, and a configuration sub-service. Push, because the service in the microservice architecture supports real-time communication, and the configuration subservice can detect the configuration information to be pushed in the database in real time, thereby reducing the consumption of configuration information from the input server to the client that has not pulled the configuration information. To improve the real-time performance of service update by configuration management system and improve the processing efficiency of configuration information.
上述主要从方法侧执行过程的角度对本申请实施例的方案进行了介绍。可以理解的是,电子设备为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所提供的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。The above mainly introduces the solutions of the embodiments of the present application from the perspective of the execution process on the method side. It can be understood that, in order to realize the above-mentioned functions, the electronic device includes a hardware structure and/or a software module corresponding to each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of the examples described in the embodiments provided herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is performed by hardware or computer software driven hardware depends on the specific application of the technical solution and design constraints. Professional technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
本申请实施例可以根据上述方法示例对电子设备进行功能单元的划分,例如,可以对应各个功能划分各个功能单元,也可以将两个或两个以上的功能集成在一个处理单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiments of the present application may divide the functional unit of the electronic device according to the above method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or software function unit. It should be noted that the division of the units in the embodiments of the present application is schematic, and is only a division of logical functions, and there may be other division manners in actual implementation.
图6a是本申请实施例中所涉及的配置更新装置610的功能单元组成框图。该配置更新装置610应用于电子设备,所述服务端包括雷达传感器,该配置更新装置610包括处理单元611和通信单元612,其中,FIG. 6a is a block diagram of functional units of the configuration updating apparatus 610 involved in the embodiment of the present application. The configuration updating device 610 is applied to an electronic device, and the server includes a radar sensor. The configuration updating device 610 includes a processing unit 611 and a communication unit 612, wherein,
所述处理单元611,用于通过所述通信单元612通过所述入口子服务获取开发人员录入的第一配置信息,所述第一配置信息用于更新所述目标应用程序;以及通过所述管理子服务在数据库中发布和持久化所述第一配置信息;以及通过所述配置子服务检测所述数据库中是否存在待推送的配置信息;以及在检测到待推送的所述第一配置信息时,通过所述配置子服务通过所述通信单元613向所述多个客户端中的至少一个客户端推送所述第一配置信息,所述第一配置信息用于所述客户端在当前启动周期内热更新所述目标应用程序。The processing unit 611 is configured to obtain the first configuration information entered by the developer through the portal subservice through the communication unit 612, and the first configuration information is used to update the target application; and through the management The sub-service publishes and persists the first configuration information in the database; and detects whether there is configuration information to be pushed in the database through the configuration sub-service; and when the first configuration information to be pushed is detected , The first configuration information is pushed to at least one of the multiple clients through the communication unit 613 through the configuration sub-service, the first configuration information is used for the client in the current startup cycle Internally update the target application.
其中,所述配置更新装置610还包括存储器613,所述处理单元611可以是处理器,所述通信单元612可以是内部或外部通信端口,所述存储单元613可以是存储器。Wherein, the configuration updating device 610 further includes a memory 613, the processing unit 611 may be a processor, the communication unit 612 may be an internal or external communication port, and the storage unit 613 may be a memory.
可以看出,本申请实施例中,基于微服务架构的配置管理系统包括服务端和客户端,其中服务端通过入口子服务、管理子服务、配置子服务这三个子服务实现配置信息的获取与推送,由于微服务架构中的服务支持实时通信,且配置子服务能够实时检测到数据库中待推送的配置信息,从而能够减少配置信息从录入服务端到推送到未拉取配置信息的客户端的耗时提高配置管理系统进行服务更新的实时性,提高配置信息的处理效率。It can be seen that, in the embodiment of the present application, the configuration management system based on the microservice architecture includes a server and a client, in which the server achieves configuration information acquisition and Push, because the service in the microservice architecture supports real-time communication, and the configuration subservice can detect the configuration information to be pushed in the database in real time, thereby reducing the consumption of configuration information from the input server to the client that has not pulled the configuration information. To improve the real-time performance of service update by configuration management system and improve the processing efficiency of configuration information.
在一个可能的示例中,所述处理单元611还用于:通过所述配置子服务接收来自第一客户端的配置信息拉取请求消息,所述配置信息拉取请求消息的发送时间是所述第一客户端根据应用场景和业务特性确定的,或者是根据所述服务端推送更新消息的时间确定的,所述发送时间用于约束所述目标应用程序的更新延时小于预设时长;以及通过所述配置子服务向所述第一客户端发送配置信息拉取响应消息,所述配置信息拉取响应消息携带有所述第一配置信息的,所述配置信息拉取响应消息用于指示所述第一客户端根据所述第一配置信息在当前启动周期内实时更新所述目标应用程序。In a possible example, the processing unit 611 is further configured to: receive the configuration information pull request message from the first client through the configuration subservice, and the sending time of the configuration information pull request message is the first A client is determined according to application scenarios and business characteristics, or according to the time when the server pushes an update message, and the sending time is used to restrict the update delay of the target application to be less than a preset duration; and The configuration subservice sends a configuration information pull response message to the first client, where the configuration information pull response message carries the first configuration information, the configuration information pull response message is used to indicate The first client updates the target application in real time in the current startup cycle according to the first configuration information.
在一个可能的示例中,所述至少一个客户端包括所述多个客户端中尚未拉取所述第一配置信息的客户端。In a possible example, the at least one client includes a client among the multiple clients that has not yet pulled the first configuration information.
在一个可能的示例中,所述至少一个客户端包括所述多个客户端。In one possible example, the at least one client includes the multiple clients.
在一个可能的示例中,在所述通过所述入口子服务获取开发人员录入的第一配置信息方面,所述处理单元611具体用于:通过所述入口子服务输出可视化管理界面,所述可视化管理界面包括服务列表、配置获取功能、配置推送功能,所述服务列表包括客户端安装的应用程序,所述配置获取功能用于显示已发布的配置信息,所述配置推送功能用于发布待推送的配置信息,所述服务列表是从所述配置子服务获取的,所述配置获取功能和配置推送功能与所述配置子服务存在调用关系;以及接收开发人员通过所述可视化管理界面录入的针对所述目标应用程序的第一配置信息。In a possible example, in terms of acquiring the first configuration information entered by the developer through the portal sub-service, the processing unit 611 is specifically configured to: output a visual management interface through the portal sub-service, and the visualization The management interface includes a service list, a configuration acquisition function, and a configuration push function. The service list includes applications installed on the client. The configuration acquisition function is used to display the published configuration information. The configuration push function is used to publish the configuration to be pushed. Configuration information, the service list is obtained from the configuration sub-service, the configuration acquisition function and the configuration push function have a calling relationship with the configuration sub-service; and receive the input from the developer through the visual management interface The first configuration information of the target application.
在一个可能的示例中,在所述通过所述配置子服务检测所述数据库中是否存在待推送的配置信息方面,所述处理单元611具体用于:获取轮询周期;以及按照所述轮训周期通过所述配置子服务检测所述数据库中是否存在待推送的配置信息。In a possible example, in terms of detecting whether there is configuration information to be pushed in the database through the configuration sub-service, the processing unit 611 is specifically configured to: obtain a polling period; and follow the polling period The configuration sub-service detects whether there is configuration information to be pushed in the database.
在一个可能的示例中,所述轮询周期为开发人员预先配置的。In a possible example, the polling period is pre-configured by the developer.
在一个可能的示例中,在所述通过所述配置子服务向所述多个客户端中的至少一个客户端推送所述第一配置信息方面,所述处理单元611具体用于:通过所述配置子服务获取本端与所述多个客户端中的至少一个客户端中每个客户端保持的长连接;以及通过所述配置子服务使用所述长连接向所述至少一个客户端中每个客户端发送所述第一配置信息。In a possible example, in terms of pushing the first configuration information to at least one client among the multiple clients through the configuration sub-service, the processing unit 611 is specifically configured to: Configuring the sub-service to obtain a long connection maintained between the local end and each client in at least one client of the plurality of clients; and using the long connection to the at least one client through the configuration sub-service Clients send the first configuration information.
图6b是本申请实施例中所涉及的配置更新装置620的功能单元组成框图。该配置更新装置620应用于电子设备,所述服务端包括雷达传感器,该配置更新装置620包括处理单元621和通信单元622,其中,FIG. 6b is a block diagram of the functional units of the configuration updating device 620 involved in the embodiment of the present application. The configuration updating device 620 is applied to an electronic device, and the server includes a radar sensor. The configuration updating device 620 includes a processing unit 621 and a communication unit 622, where,
所述处理单元621,用于通过所述通信单元622接收来自所述服务端推送的第一配置信息,其中,所述第一配置信息是所述服务端执行以下操作而发送的:通过所述入口子服务获取开发人员录入的第一配置信息,所述第一配置信息用于更新所述目标应用程序;以及通过所述管理子服务在数据库中发布和持久化所述第一配置信息;以及通过所述配置子服务检测所述数据库中是否存在待推送的配置信息;以及检测到待推送的所述第一配置信息;以及根据所述第一配置信息在当前启动周期内实时更新所述目标应用程序。The processing unit 621 is configured to receive the first configuration information pushed from the server through the communication unit 622, where the first configuration information is sent by the server by performing the following operations: The entry sub-service obtains the first configuration information entered by the developer, and the first configuration information is used to update the target application; and the first configuration information is published and persisted in the database through the management sub-service; and Detecting whether there is configuration information to be pushed in the database through the configuration sub-service; and detecting the first configuration information to be pushed; and updating the target in real time in the current startup cycle according to the first configuration information application.
其中,所述配置更新装置620还包括存储器623,所述处理单元621可以是处理器,所述通信单元622可以是内部或外部通信端口,所述存储单元623可以是存储器。Wherein, the configuration updating device 620 further includes a memory 623, the processing unit 621 may be a processor, the communication unit 622 may be an internal or external communication port, and the storage unit 623 may be a memory.
可以看出,本申请实施例中,基于微服务架构的配置管理系统包括服务端和客户端,其中服务端通过入口子服务、管理子服务、配置子服务这三个子服务实现配置信息的获取与推送,由于微服务架构中的服务支持实时通信,且配置子服务能够实时检测到数据库中待推送的配置信息,从而能够减少配置信息从录入服务端到推送到未拉取配置信息的客户端的耗时提高配置管理系统进行服务更新的实时性,提高配置信息的处理效率。It can be seen that, in the embodiment of the present application, the configuration management system based on the microservice architecture includes a server and a client, in which the server achieves configuration information acquisition and configuration through three sub-services: an entrance sub-service, a management sub-service, and a configuration sub-service. Push, because the service in the microservice architecture supports real-time communication, and the configuration subservice can detect the configuration information to be pushed in the database in real time, thereby reducing the consumption of configuration information from the input server to the client that has not pulled the configuration information. To improve the real-time performance of service update by configuration management system and improve the processing efficiency of configuration information.
图6c是本申请实施例中所涉及的配置更新装置630的功能单元组成框图。该配置更新装置630应用于电子设备,所述服务端包括雷达传感器,该配置更新装置630包括处理单元631和通信单元632,其中,FIG. 6c is a block diagram of the functional units of the configuration updating device 630 involved in the embodiment of the present application. The configuration updating device 630 is applied to an electronic device, and the server includes a radar sensor. The configuration updating device 630 includes a processing unit 631 and a communication unit 632, wherein,
所述处理单元631,用于确定配置信息拉取请求消息的发送时间,所述发送时间是所述第一客户端根据应用场景和业务特性确定的,或者是根据所述服务端推送更新消息的时间确定的,所述发送时间用于约束所述目标应用程序的更新延时小于预设时长;以及在所述发送时间通过所述通信单元622向所述服务端发送配置信息拉取请求消息;以及接收来自所述服务端的配置信息拉取响应消息,所述配置信息拉取响应消息携带有所述第一配置信息;以及根据所述第一配置信息在当前启动周期内实时更新所述目标应用程序。The processing unit 631 is configured to determine a sending time of a configuration information pull request message, the sending time is determined by the first client according to an application scenario and business characteristics, or is based on the server pushing an update message Determined by time, the sending time is used to restrict the update delay of the target application to be less than a preset duration; and sending the configuration information pull request message to the server through the communication unit 622 at the sending time; And receiving a configuration information pull response message from the server, the configuration information pull response message carrying the first configuration information; and updating the target application in real time in the current startup cycle according to the first configuration information program.
其中,所述配置更新装置630还包括存储器633,所述处理单元631可以是处理器,所述通信单元632可以是内部或外部通信端口,所述存储单元633可以是存储器。Wherein, the configuration updating device 630 further includes a memory 633, the processing unit 631 may be a processor, the communication unit 632 may be an internal or external communication port, and the storage unit 633 may be a memory.
可以看出,本申请实施例中,基于微服务架构的配置管理系统包括服务端和客户端,其中服务端通过入口子服务、管理子服务、配置子服务这三个子服务实现配置信息的获取与推送,由于微服务架构中的服务支持实时通信,且配置子服务能够实时检测到数据库中待推送的配置信息,从而能够减少配置信息从录入服务端到推送到未拉取配置信息的客户端的耗时提高配置管理系统进行服务更新的实时性,提高配置信息的处理效率。It can be seen that, in the embodiment of the present application, the configuration management system based on the microservice architecture includes a server and a client, in which the server achieves configuration information acquisition and configuration through three sub-services: an entrance sub-service, a management sub-service, and a configuration sub-service. Push, because the service in the microservice architecture supports real-time communication, and the configuration subservice can detect the configuration information to be pushed in the database in real time, thereby reducing the consumption of configuration information from the input server to the client that has not pulled the configuration information. To improve the real-time performance of service update by configuration management system and improve the processing efficiency of configuration information.
图7是本申请实施例提供的一种配置管理系统700的系统架构示意图,该配置管理系统700包括服务端710和多个客户端720,每个客户端720运行有目标应用程序,所述服务端包括入口子服务PortalService711、管理子服务AdminService712和配置子服务ConfigService713,所述每个客户端720与所述配置子服务713通信连接;其中,7 is a schematic diagram of a system architecture of a configuration management system 700 provided by an embodiment of the present application. The configuration management system 700 includes a server 710 and multiple clients 720, and each client 720 runs a target application program, and the service The terminal includes an entrance sub-service PortalService711, a management sub-service AdminService712, and a configuration sub-service ConfigService713, and each client 720 is in communication connection with the configuration sub-service 713; wherein,
所述服务端710用于执行如上述实施例中的服务端所执行的任一步骤;The server 710 is used to perform any step performed by the server in the foregoing embodiment;
所述多个客户端720中的客户端用于执行如上述实施例中客户端(包括目标客户端和第一客户端)所执行的步骤。The clients in the plurality of clients 720 are used to perform the steps performed by the clients (including the target client and the first client) in the foregoing embodiment.
本申请实施例还提供一种计算机存储介质,其中,该计算机存储介质存储用于电子数据交换的计算机程序,该计算机程序使得计算机执行如上述方法实施例中记载的任一方法的部分或全部步骤,上述计算机包括电子设备。An embodiment of the present application further provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program causes the computer to perform part or all of the steps of any method described in the foregoing method embodiments , The above computer includes electronic equipment.
本申请实施例还提供一种计算机程序产品,上述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,上述计算机程序可操作来使计算机执行如上述方法实施例中记载的任一方法的部分或全部步骤。该计算机程序产品可以为一个软件安装包,上述计算机包括电子设备。Embodiments of the present application also provide a computer program product, where the computer program product includes a non-transitory computer-readable storage medium that stores the computer program, and the computer program is operable to cause the computer to perform any of the methods described in the foregoing method embodiments Some or all steps of the method. The computer program product may be a software installation package, and the computer includes an electronic device.
工业实用性Industrial applicability
在此处键入工业实用性描述段落。Type the paragraph describing the industrial applicability here.
序列表自由内容Sequence listing free content
在此处键入序列表自由内容描述段落。Type the sequence listing free content description paragraph here.

Claims (12)

  1. 一种配置更新方法,其特征在于,应用于配置管理系统的服务端,所述配置管理系统包括所述服务端和多个客户端,每个客户端运行有目标应用程序,所述服务端包括入口子服务、管理子服务和配置子服务,所述每个客户端与所述配置子服务通信连接;所述方法包括:A configuration update method is characterized in that it is applied to a server of a configuration management system. The configuration management system includes the server and a plurality of clients. Each client runs a target application. The server includes An entrance sub-service, a management sub-service and a configuration sub-service, each client is in communication connection with the configuration sub-service; the method includes:
    通过所述入口子服务获取开发人员录入的第一配置信息,所述第一配置信息用于更新所述目标应用程序;Acquiring the first configuration information entered by the developer through the portal sub-service, and the first configuration information is used to update the target application program;
    通过所述管理子服务在数据库中发布和持久化所述第一配置信息;Publishing and persisting the first configuration information in the database through the management sub-service;
    通过所述配置子服务检测所述数据库中是否存在待推送的配置信息;Detecting whether there is configuration information to be pushed in the database through the configuration sub-service;
    在检测到待推送的所述第一配置信息时,通过所述配置子服务向所述多个客户端中的至少一个客户端推送所述第一配置信息,所述至少一个客户端为未从所述服务端拉取所述第一配置信息的客户端,所述第一配置信息用于所述客户端在当前启动周期内热更新所述目标应用程序。When detecting the first configuration information to be pushed, the first configuration information is pushed to at least one client among the plurality of clients through the configuration sub-service, and the at least one client is unsuccessful The server pulls the client of the first configuration information, and the first configuration information is used by the client to hot update the target application within the current startup cycle.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    通过所述配置子服务接收来自第一客户端的配置信息拉取请求消息,所述配置信息拉取请求消息的发送时间是所述第一客户端根据应用场景和业务特性确定的,或者是根据所述服务端推送更新消息的时间确定的,所述发送时间用于约束所述目标应用程序的更新延时小于预设时长;Receiving the configuration information pull request message from the first client through the configuration subservice, the sending time of the configuration information pull request message is determined by the first client according to application scenarios and business characteristics, or according to The time when the server pushes the update message is determined, and the sending time is used to restrict the update delay of the target application program to be less than a preset duration;
    通过所述配置子服务向所述第一客户端发送配置信息拉取响应消息,所述配置信息拉取响应消息携带有所述第一配置信息的,所述配置信息拉取响应消息用于指示所述第一客户端根据所述第一配置信息在当前启动周期内实时更新所述目标应用程序。Sending a configuration information pull response message to the first client through the configuration subservice, where the configuration information pull response message carries the first configuration information, the configuration information pull response message is used to indicate The first client updates the target application in real time in the current startup cycle according to the first configuration information.
  3. 根据权利要求2所述的方法,其特征在于,所述至少一个客户端包括所述多个客户端中尚未拉取所述第一配置信息的客户端。The method according to claim 2, wherein the at least one client includes a client among the plurality of clients that has not yet pulled the first configuration information.
  4. 根据权利要求2所述的方法,其特征在于,所述至少一个客户端包括所述多个客户端。The method of claim 2, wherein the at least one client includes the plurality of clients.
  5. 根据权利要求1-4所述的方法,其特征在于,所述通过所述入口子服务获取开发人员录入的第一配置信息,包括:The method according to claims 1-4, wherein the acquiring the first configuration information entered by the developer through the portal sub-service includes:
    通过所述入口子服务输出可视化管理界面,所述可视化管理界面包括服务列表、配置获取功能、配置推送功能,所述服务列表包括客户端安装的应用程序,所述配置获取功能用于显示已发布的配置信息,所述配置推送功能用于发布待推送的配置信息,所述服务列表是从所述配置子服务获取的,所述配置获取功能和配置推送功能与所述配置子服务存在调用关系;A visual management interface is output through the portal sub-service, the visual management interface includes a service list, a configuration acquisition function, and a configuration push function, the service list includes an application program installed by the client, and the configuration acquisition function is used to display the published Configuration information, the configuration push function is used to publish configuration information to be pushed, the service list is obtained from the configuration subservice, and the configuration acquisition function and the configuration push function have a calling relationship with the configuration subservice ;
    接收开发人员通过所述可视化管理界面录入的针对所述目标应用程序的第一配置信息。Receive the first configuration information for the target application program entered by the developer through the visual management interface.
  6. 根据权利要求1-4任一项所述的方法,其特征在于,所述通过所述配置子服务检测所述数据库中是否存在待推送的配置信息,包括:The method according to any one of claims 1-4, wherein the detecting whether there is configuration information to be pushed in the database by the configuration sub-service includes:
    获取轮询周期,其中,所述轮询周期为开发人员预先配置的;Obtain the polling cycle, wherein the polling cycle is pre-configured by the developer;
    按照所述轮训周期通过所述配置子服务检测所述数据库中是否存在待推送的配置信息。Detecting whether there is configuration information to be pushed in the database through the configuration sub-service according to the rotation training cycle.
  7. 根据权利要求6所述的方法,其特征在于,所述通过所述配置子服务向所述多个客户端中的至少一个客户端推送所述第一配置信息,包括:The method according to claim 6, wherein the pushing the first configuration information to at least one client among the plurality of clients through the configuration sub-service includes:
    通过所述配置子服务获取本端与所述多个客户端中的至少一个客户端中每个客户端保持的长连接;Obtaining, through the configuration subservice, a long-term connection maintained between the local end and each client in at least one client among the multiple clients;
    通过所述配置子服务使用所述长连接向所述至少一个客户端中每个客户端发送所述第一配置信息。Sending the first configuration information to each of the at least one client by using the long connection through the configuration sub-service.
  8. 一种配置更新方法,其特征在于,应用于配置管理系统的目标客户端,所述配置管理系统包括所述服务端和多个客户端,所述多个客户端包括所述目标客户端,所述目标客户端运行有目标应用程序,所述服务端包括入口子服务、管理子服务和配置子服务,所述每个客户端与所述配置子服务通信连接;所述方法包括:A configuration update method is characterized in that it is applied to a target client of a configuration management system. The configuration management system includes the server and multiple clients. The multiple clients include the target client. The target client runs a target application, the server includes an entrance sub-service, a management sub-service, and a configuration sub-service, and each client is in communication connection with the configuration sub-service; the method includes:
    接收来自所述服务端推送的第一配置信息,其中,所述第一配置信息是所述服务端执行以下操作而发送的:通过所述入口子服务获取开发人员录入的第一配置信息,所述第一配置信息用于更新所述目标应用程序;以及通过所述管理子服务在数据库中发布和持久化所述第一配置信息;以及通过所述配置子服务检测所述数据库中是否存在待推送的配置信息;以及检测到待推送的所述第一配置信息;Receiving first configuration information pushed from the server, where the first configuration information is sent by the server by performing the following operation: acquiring the first configuration information entered by the developer through the portal subservice, so The first configuration information is used to update the target application; and the first configuration information is published and persisted in the database through the management sub-service; and the configuration sub-service detects whether there is a pending in the database Pushed configuration information; and detecting the first configuration information to be pushed;
    根据所述第一配置信息在当前启动周期内实时更新所述目标应用程序。Update the target application in real time within the current startup cycle according to the first configuration information.
  9. 一种配置更新方法,其特征在于,应用于配置管理系统的第一客户端,所述配置管理系统包括所述服务端和多个客户端,所述多个客户端包括所述第一客户端,所述第一客户端运行有目标应用程序,所述服务端包括入口子服务、管理子服务和配置子服务,所述每个客户端与所述配置子服务通信连接;所述方法包括:A configuration update method, characterized in that it is applied to a first client of a configuration management system, the configuration management system includes the server and multiple clients, and the multiple clients include the first client , The first client runs a target application, the server includes an entrance sub-service, a management sub-service, and a configuration sub-service, and each client is in communication connection with the configuration sub-service; the method includes:
    确定配置信息拉取请求消息的发送时间,所述发送时间是所述第一客户端根据应用场景和业务特性确定的,或者是根据所述服务端推送更新消息的时间确定的,所述发送时间用于约束所述目标应用程序的更新延时小于预设时长;Determining the sending time of the configuration information pull request message, the sending time is determined by the first client according to application scenarios and business characteristics, or according to the time when the server pushes an update message, and the sending time Used to constrain the update delay of the target application program to be less than a preset duration
    在所述发送时间向所述服务端发送配置信息拉取请求消息;Sending a configuration information pull request message to the server at the sending time;
    接收来自所述服务端的配置信息拉取响应消息,所述配置信息拉取响应消息携带有所述第一配置信息;Receiving a configuration information pull response message from the server, the configuration information pull response message carrying the first configuration information;
    根据所述第一配置信息在当前启动周期内实时更新所述目标应用程序。Update the target application in real time within the current startup cycle according to the first configuration information.
  10. 一种配置管理系统,其特征在于,包括服务端和多个客户端,每个客户端运行有目标应用程序,所述服务端包括入口子服务、管理子服务和配置子服务,所述每个客户端与所述配置子服务通信连接;其中,A configuration management system, characterized in that it includes a server and multiple clients, each client runs a target application, and the server includes an entrance sub-service, a management sub-service, and a configuration sub-service, each of which The client is in communication connection with the configuration sub-service; wherein,
    所述服务端用于执行如权利要求1-7任一项方法中的步骤;The server is used to perform the steps in any of claims 1-7;
    所述多个客户端中的客户端用于执行如权利要求8或权利要求9方法中的步骤。The client among the plurality of clients is used to perform the steps in the method of claim 8 or claim 9.
  11. 一种电子设备,其特征在于,包括处理器、存储器、通信接口,以及一个或多个程序,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,所述程序包括用于执行如权利要求1-9任一项所述的方法中的步骤的指令。An electronic device, characterized in that it includes a processor, a memory, a communication interface, and one or more programs, the one or more programs are stored in the memory, and are configured to be executed by the processor, The program includes instructions for performing the steps in the method of any one of claims 1-9.
  12. 一种计算机可读存储介质,其特征在于,存储用于电子数据交换的计算机程序,其中,所述计算机程序使得计算机执行如权利要求1-9任一项所述的方法。A computer-readable storage medium characterized by storing a computer program for electronic data exchange, wherein the computer program causes a computer to execute the method according to any one of claims 1-9.
PCT/CN2019/114722 2018-12-29 2019-10-31 Method for updating configuration, and related product WO2020134545A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811640221.X 2018-12-29
CN201811640221.XA CN109857427A (en) 2018-12-29 2018-12-29 Configure update method and Related product

Publications (1)

Publication Number Publication Date
WO2020134545A1 true WO2020134545A1 (en) 2020-07-02

Family

ID=66893255

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/114722 WO2020134545A1 (en) 2018-12-29 2019-10-31 Method for updating configuration, and related product

Country Status (2)

Country Link
CN (1) CN109857427A (en)
WO (1) WO2020134545A1 (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109857427A (en) * 2018-12-29 2019-06-07 深圳云天励飞技术有限公司 Configure update method and Related product
CN110413427B (en) * 2019-07-31 2022-03-22 中国工商银行股份有限公司 Subscription data pulling method, device, equipment and storage medium
CN110825459B (en) * 2019-11-08 2023-11-03 深圳前海环融联易信息科技服务有限公司 Enumeration constant hot loading method, device, computer equipment and storage medium
CN112882741A (en) * 2019-11-29 2021-06-01 北京沃东天骏信息技术有限公司 Application management system and method
CN110958150B (en) * 2019-12-10 2022-08-05 深圳前海环融联易信息科技服务有限公司 Management method and device for dynamic service configuration
CN111064747B (en) * 2019-12-30 2022-07-08 奇安信科技集团股份有限公司 Information processing method and system, server, electronic device, medium, and product
CN111314118B (en) * 2020-01-19 2023-04-07 中移(杭州)信息技术有限公司 Data management method and device, electronic equipment and storage medium
CN111399822B (en) * 2020-03-17 2023-08-08 深圳市炎华信息技术有限公司 Micro-service development method, device, equipment and computer storage medium
US11252025B2 (en) * 2020-04-16 2022-02-15 Juniper Networks, Inc. Model driven configuration management for microservices
CN111736883A (en) * 2020-05-11 2020-10-02 山东浪潮通软信息科技有限公司 Computer management system hot upgrading method and device based on data delay upgrading
CN112882738A (en) * 2021-03-22 2021-06-01 亿企赢网络科技有限公司 Configuration information updating method and device under micro-service architecture and electronic equipment
CN115914329A (en) * 2021-09-28 2023-04-04 中国联合网络通信集团有限公司 Information pushing method and device, electronic equipment and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104639374A (en) * 2015-03-03 2015-05-20 上海瀚银信息技术有限公司 Application program deployment management system
CN106506227A (en) * 2016-11-29 2017-03-15 深圳天珑无线科技有限公司 Config update method and config update device
CN107239296A (en) * 2016-03-29 2017-10-10 百度在线网络技术(北京)有限公司 The update method and device of application program
CN107608689A (en) * 2017-08-07 2018-01-19 阿里巴巴集团控股有限公司 The update method of application program, device and electronic equipment in client
CN108874426A (en) * 2018-06-28 2018-11-23 武汉斗鱼网络科技有限公司 Application program updating method and device and readable storage medium
CN109857427A (en) * 2018-12-29 2019-06-07 深圳云天励飞技术有限公司 Configure update method and Related product

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102255752B (en) * 2011-06-30 2014-08-06 北京新媒传信科技有限公司 Configuration management system and method of server cluster
CN103489115B (en) * 2012-06-11 2017-04-19 联想(北京)有限公司 Electronic equipment customization method, server and client
US10044561B2 (en) * 2015-09-14 2018-08-07 Payoda Inc. Application provisioning system for requesting configuration updates for application objects across data centers
CN107154922A (en) * 2016-03-04 2017-09-12 北京京东尚科信息技术有限公司 Configuration management system and configuring management method
CN107844343B (en) * 2017-11-24 2021-01-26 税友软件集团股份有限公司 Upgrading system and method for complex server application system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104639374A (en) * 2015-03-03 2015-05-20 上海瀚银信息技术有限公司 Application program deployment management system
CN107239296A (en) * 2016-03-29 2017-10-10 百度在线网络技术(北京)有限公司 The update method and device of application program
CN106506227A (en) * 2016-11-29 2017-03-15 深圳天珑无线科技有限公司 Config update method and config update device
CN107608689A (en) * 2017-08-07 2018-01-19 阿里巴巴集团控股有限公司 The update method of application program, device and electronic equipment in client
CN108874426A (en) * 2018-06-28 2018-11-23 武汉斗鱼网络科技有限公司 Application program updating method and device and readable storage medium
CN109857427A (en) * 2018-12-29 2019-06-07 深圳云天励飞技术有限公司 Configure update method and Related product

Also Published As

Publication number Publication date
CN109857427A (en) 2019-06-07

Similar Documents

Publication Publication Date Title
WO2020134545A1 (en) Method for updating configuration, and related product
WO2019237586A1 (en) Method and apparatus for managing scheduled tasks, computer device and storage medium
TWI579765B (en) Offline transmission and display methods, devices and systems for offline data
JP5753629B2 (en) Method, device and system for managing mobile broadband devices
WO2021151312A1 (en) Method for determining inter-service dependency, and related apparatus
WO2021051747A1 (en) Data update method, system and device, electronic device, and computer storage medium
US10404568B2 (en) Agent manager for distributed transaction monitoring system
TWI716822B (en) Method and device for correcting transaction causality, and electronic equipment
US10887181B2 (en) Out-of-band service discovery for peripheral devices
WO2021244644A1 (en) Method for dynamically integrating application, and software system and machine therefor
CN109885347B (en) Method, device, terminal, system and storage medium for acquiring configuration data
CN110933188A (en) Remote service calling method, system, server and storage medium
WO2021093674A1 (en) Bi node execution method in workflow system, apparatus, device, and computer readable storage medium
CN110113430B (en) Communication method between mobile phone and raspberry pie based on cloud database
CN110730197B (en) Service discovery method and system
WO2019109922A1 (en) Resource processing method and system, storage medium and electronic device
US11177977B2 (en) Method and system for GRE tunnel control based on client activity detection
CN108282374B (en) Method, system and readable storage medium for configuring NCSI network card
CN114461371B (en) Method, device, equipment and medium for optimizing interruption of server system
CN113553206B (en) Data event execution method and device, electronic equipment and computer readable medium
JP6285579B2 (en) Long polling processing method and system, and recording medium
CN115629909A (en) Service data processing method and device, electronic equipment and storage medium
WO2021078176A1 (en) Storage process running method and apparatus, database system, and storage medium
CN114185804A (en) Interface testing method and device and terminal equipment
CN111679850B (en) Application program hot update processing method, device and system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19904142

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19904142

Country of ref document: EP

Kind code of ref document: A1