A distributed configuration method and system

By introducing a simulation environment testing mechanism in the distributed configuration center, the problem of automatic configuration of data synchronization in different environments in the existing technology is solved, and the accuracy and efficiency of data synchronization are improved.

CN113778555BActive Publication Date: 2025-03-25BAIRONG ZHIXIN (BEIJING) TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111027267.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-02
Publication Date
2025-03-25
Estimated Expiration
2041-09-02

AI Technical Summary

Technical Problem

Due to functional limitations, distributed configuration centers in the prior art cannot automatically configure data synchronization of different environments, resulting in low efficiency and accuracy.

Method used

The configuration is pushed to a three-party interface or interface through the producer component, the configuration is updated based on the configuration center, and the configuration record is locked into the simulation environment for testing. The configuration is synchronized to the online environment and unlocked based on the test results.

Benefits of technology

The update configuration is tested using the simulation environment, and after success, it is automatically synchronized to the online environment, which improves the accuracy of data synchronization and realizes the technical effect of automatically configuring data synchronization in different environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113778555B_ABST
    Figure CN113778555B_ABST
Patent Text Reader

Abstract

The present invention provides a distributed configuration method and system, the method comprising: based on Publisher, obtaining a first third-party interface push API or a first SpeedUI interface; pushing the first third-party interface push API or the first SpeedUI interface to a configuration center for updating, obtaining a first newly added configuration record, wherein the configuration center is included in a simulation environment; locking the first newly added configuration record, and performing a simulation test to obtain a first test result; according to the first test result, synchronizing the first newly added configuration record to an online environment to obtain a first synchronization result; according to the first synchronization result, unlocking the first newly added configuration record, and updating it to a synchronization success state. The method solves the technical problem that various configuration centers in the prior art cannot realize automatic configuration of data synchronization in different environments due to their own functional limitations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field related to emerging software technology services, and in particular to a distributed configuration method and system. Background Art

[0002] With the development of Internet business and the upgrade of microservice architecture, the number of services and program configurations are increasing. The traditional configuration file method and database method can no longer meet the developers' requirements for configuration management, so a distributed configuration center is proposed for configuration management.

[0003] In the existing technology, open source distributed configuration center open source frameworks include Apollo, disconf, nacos, spring-cloud-config and other components. These components can provide basic configuration unified push functions, but in the face of data synchronization configuration in multiple different environments, a lot of manual operations are still required, and the efficiency and accuracy are relatively low.

[0004] However, the inventors of this application found that the above technology has at least the following technical problems in the process of implementing the technical solution of the invention in the embodiment of this application:

[0005] Due to the limitations of their own functions, various configuration centers in the prior art have the technical problem of being unable to achieve automatic configuration of data synchronization in different environments. Summary of the invention

[0006] The embodiments of the present application provide a distributed configuration method and system to solve the technical problem that various configuration centers in the prior art cannot realize automatic configuration of data synchronization in different environments due to their own functional limitations. The configuration is pushed to the third-party interface or interface through the producer component to update the configuration based on the configuration center, and the configuration record is locked and sent to the simulation environment for testing. Based on the test results, the configuration is synchronized to the online environment and unlocked. The updated configuration is first tested in the simulation environment, and automatically synchronized to the online environment after success, which improves the accuracy of data synchronization and achieves the technical effect of automatically configuring data synchronization in different environments.

[0007] In view of the above problems, an embodiment of the present application provides a distributed configuration method and system.

[0008] In a first aspect, an embodiment of the present application provides a distributed configuration method, wherein the method includes: based on Publisher, obtaining a first third-party interface push API or a first SpeedUI interface; pushing the first third-party interface pushapi or the first SpeedUI interface to a configuration center for updating, and obtaining a first newly added configuration record, wherein the configuration center is included in a simulation environment; locking the first newly added configuration record, and performing a simulation test to obtain a first test result; according to the first test result, synchronizing the first newly added configuration record to an online environment to obtain a first synchronization result; according to the first synchronization result, unlocking the first newly added configuration record, and updating it to a synchronization success status.

[0009] On the other hand, an embodiment of the present application provides a distributed configuration system, wherein the system includes: a first acquisition unit, the first acquisition unit is used to obtain a first third-party interface push API or a first SpeedUI interface based on Publisher; a second acquisition unit, the second acquisition unit is used to push the first third-party interface push API or the first SpeedUI interface to the configuration center for updating, and obtain a first newly added configuration record, wherein the configuration center is contained in a simulation environment; a third acquisition unit, the third acquisition unit is used to lock the first newly added configuration record, and perform a simulation test to obtain a first test result; a fourth acquisition unit, the fourth acquisition unit is used to synchronize the first newly added configuration record to the online environment according to the first test result, and obtain a first synchronization result; a first update unit, the first update unit is used to unlock the first newly added configuration record according to the first synchronization result, and update it to a synchronization success state.

[0010] In a third aspect, an embodiment of the present application provides a distributed configuration system, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the methods described in the first aspect when executing the program.

[0011] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:

[0012] Due to the adoption of a technical solution based on Publisher, the first third-party interface push API or the first SpeedUI interface is obtained; the first third-party interface push API or the first SpeedUI interface is pushed to the configuration center for updating, and the first newly added configuration record is obtained, wherein the configuration center is included in the simulation environment; the first newly added configuration record is locked, and a simulation test is performed to obtain a first test result; according to the first test result, the first newly added configuration record is synchronized to the online environment to obtain a first synchronization result; according to the first synchronization result, the first newly added configuration record is unlocked and updated to a synchronization success state, and the configuration is pushed to the third-party interface and interface through the producer component to update the configuration based on the configuration center, and the configuration record is locked and sent to the simulation environment for testing, and the configuration is synchronized to the online environment based on the test result and unlocked. The updated configuration is first tested using the simulation environment, and automatically synchronized to the online environment after success, which improves the accuracy of data synchronization and achieves the technical effect of automatically configuring data synchronization in different environments.

[0013] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 This is a schematic diagram of a distributed configuration method flow in an embodiment of the present application;

[0015] Figure 2 A schematic diagram of a method flow for implementing a monitoring configuration process according to an embodiment of the present application;

[0016] Figure 3 A flowchart of a method for monitoring content during a binding configuration process according to an embodiment of the present application;

[0017] Figure 4 This is a schematic diagram of a distributed configuration system structure according to an embodiment of the present application;

[0018] Figure 5 It is a schematic diagram of the structure of an exemplary electronic device according to an embodiment of the present application.

[0019] Explanation of the reference numerals: first obtaining unit 11 , second obtaining unit 12 , third obtaining unit 13 , fourth obtaining unit 14 , first updating unit 15 , electronic device 300 , memory 301 , processor 302 , communication interface 303 , bus architecture 304 . DETAILED DESCRIPTION

[0020] The embodiments of the present application provide a distributed configuration method and system to solve the technical problem that various configuration centers in the prior art cannot realize automatic configuration of data synchronization in different environments due to their own functional limitations. The configuration is pushed to the three-party interface and interface based on the configuration center through the producer component, and the configuration record is locked and sent to the simulation environment for testing. Based on the test results, the configuration is synchronized to the online environment and unlocked. The updated configuration is first tested in the simulation environment, and automatically synchronized to the online environment after success, which improves the accuracy of data synchronization and achieves the technical effect of automatically configuring data synchronization in different environments.

[0021] Application Overview

[0022] With the development of Internet business and the upgrade of microservice architecture, the number of services and program configurations are increasing. The traditional configuration file method and database method can no longer meet the requirements of developers for configuration management, so a distributed configuration center is proposed for configuration management. The open source frameworks of distributed configuration centers in the prior art include Apollo, disconf, nacos, spring-cloud-config and other components. These components can provide basic configuration unified push functions, but manual operation is still required for data synchronization configuration in multiple different environments, and the efficiency and accuracy are relatively low. However, due to the limitations of their own functions, various configuration centers in the prior art have the technical problem of being unable to realize automatic configuration of data synchronization in different environments.

[0023] In response to the above technical problems, the overall idea of ​​the technical solution provided by this application is as follows:

[0024] An embodiment of the present application provides a distributed configuration method, wherein the method includes: based on Publisher, obtaining a first third-party interface push API or a first SpeedUI interface; pushing the first third-party interface push API or the first SpeedUI interface to a configuration center for updating, and obtaining a first newly added configuration record, wherein the configuration center is included in a simulation environment; locking the first newly added configuration record, and performing a simulation test to obtain a first test result; according to the first test result, synchronizing the first newly added configuration record to an online environment to obtain a first synchronization result; according to the first synchronization result, unlocking the first newly added configuration record, and updating it to a synchronization success state.

[0025] After introducing the basic principles of the present application, various non-limiting implementation methods of the present application will be specifically described below in conjunction with the drawings in the specification.

[0026] Embodiment 1

[0027] like Figure 1 As shown, an embodiment of the present application provides a distributed configuration method, wherein the method includes:

[0028] S100: Based on the Publisher, obtain a first third-party interface push API or a first SpeedUI interface;

[0029] Specifically, the Publisher component refers to the producer component, which is responsible for calling the configuration data information and pushing it to the component that manages the update configuration; the first third-party interface push api refers to the component that pushes messages, which can push messages online and offline; the first SpeedUI interface is the user operation display interface of the component that manages the update configuration, and can also push configuration data information; the first third-party interface push api calls the update configuration center to specify the configuration in the form of an interface, and the first SpeedUI interface is modified directly through the interface of the configuration center. After the Publisher component produces the configuration data, it can choose to push the configuration data information to the component that manages the update configuration, thereby realizing the configuration update.

[0030] S200: Pushing the first third-party interface push API or the first SpeedUI interface to a configuration center for updating, and obtaining a first newly added configuration record, wherein the configuration center is included in a simulation environment;

[0031] S300: Locking the first newly added configuration record, and performing a simulation test to obtain a first test result;

[0032] Specifically, the configuration center refers to the control center that manages and regulates configuration updates, and is responsible for the core tasks of storage, update, and download of configuration data information; the simulation environment refers to the same environment as the real environment (i.e., the environment where the system that has been sold to customers is located, also known as the commercial environment), and all configurations, page displays, etc. should be the same as the simulated application environment currently used by the merchant; the first newly added configuration record refers to the configuration record information generated after the configuration center receives the configuration data information and updates each component according to the configuration data information. The first newly added configuration record is locked to prevent the Publisher component from repeatedly pushing configuration data, thereby overwriting the updated version, or configuring a non-specified version.

[0033] Furthermore, the first newly added configuration record is locked to prevent the Publisher component from repeatedly pushing configuration data, thereby overwriting the updated version or configuring a non-specified version; the first test result refers to matching the online environment that needs to be synchronized with the corresponding simulation environment after the first newly added configuration record is generated, and performing a configuration update test in the simulation environment based on the configuration data information to obtain the result; until the first test result shows that the test is successful in the simulation environment, it stops. By performing the test in the simulation environment and then synchronously updating the configuration to the corresponding actual environment, the success rate and efficiency of the configuration are improved, and the technical effect of data synchronization between different environments is achieved.

[0034] S400: Synchronize the first newly added configuration record to the online environment according to the first test result to obtain a first synchronization result;

[0035] S500: According to the first synchronization result, the first newly added configuration record is unlocked and updated to a synchronization success state.

[0036] Specifically, the online environment is a commercial environment corresponding to the simulation environment; the first synchronization result refers to the result obtained after the first test result is successful, after the configuration data information is called according to the configuration process in the simulation environment to synchronize the configuration to the online environment; further, if the first synchronization result shows that the online environment configuration is updated successfully, because it has been synchronized successfully, there is no need to push the configuration data information again, and there is no need to worry about the configuration data information being overwritten, then the first newly added configuration record is unlocked; at the same time, the update status is changed to the synchronization success status. The configuration center simulates the configuration in the simulation environment, and when the requirements are met, the configuration corresponding to the online environment is automatically updated, thereby achieving the technical effect of automatic data synchronization between different environments.

[0037] Furthermore, the method step S300 also includes:

[0038] S310: Determine whether the first test result is successful;

[0039] S320: If the first test result is unsuccessful, sending a first test failure email;

[0040] S330: unlocking the first newly added configuration record according to the first test failure email, and generating a first rollback instruction;

[0041] S340: Pushing the first third-party interface push API for a second time or editing the first SpeedUI interface for a second time according to the first rollback instruction;

[0042] S350: If the first test result is successful, obtain a list of application files to be synchronized, and synchronize the list to an online environment, wherein the list of application files to be synchronized includes the first newly added configuration record.

[0043] Specifically, the first test failure email refers to an instruction email sent to the configuration center when the first test result in the simulation environment fails; the first rollback instruction refers to that after the configuration center receives the first test failure email, it indicates that the application risk of this version of the configuration data information in the online environment is high, and it needs to be reconfigured back to the original version, then the first newly added configuration record is unlocked; after the first newly added configuration record is unlocked, the first third-party interface push API or the first SpeedUI interface can push the original version of the configuration data information to complete the rollback of the configuration data information version.

[0044] Furthermore, the application file list to be synchronized refers to a file list including the first newly added configuration record generated by the synchronization process in the simulation environment when the first test result is successful; the online environment is updated according to the configuration of the application file list to be synchronized to achieve the technical purpose of configuration synchronization in different environments. By judging the version rollback, when the first test result fails, the version can be rolled back to the previous version, avoiding business failures and ensuring the stability of the system.

[0045] Furthermore, the method step S400 also includes:

[0046] S410: Determine whether the first synchronization result is successful;

[0047] S420: If the first synchronization result fails, unlock the first newly added configuration record and generate a second rollback instruction;

[0048] S430: reconfigure the first third-party interface push API or the first SpeedUI interface according to the second rollback instruction, generate a second newly added configuration record, and perform a second configuration;

[0049] S440: If the first synchronization result is successful, perform an online program test on the first newly added configuration record to obtain a second test result;

[0050] S450: End a first configuration process according to the second test result, wherein the first configuration process corresponds to the first newly added configuration record.

[0051] Furthermore, the method step S450 further includes:

[0052] S451: Determine whether the second test result is successful;

[0053] S452: If the second test result is unsuccessful, generate a third rollback instruction;

[0054] S453: According to the third rollback instruction, the test failure result is rolled back to the application file list to be synchronized for secondary production;

[0055] S454: If the second test result is successful, end the first configuration process.

[0056] Specifically, after the first test result is successful, configuration synchronization is performed in the online environment based on the list of files to be synchronized by the application. The second rollback instruction refers to an instruction sent to the configuration center to reconfigure the first third-party interface push API or the first SpeedUI interface when the first synchronization result fails, and the first newly added configuration record is unlocked at the same time. When synchronization fails, the first third-party interface push API or the first SpeedUI interface is controlled to be reconfigured through the second rollback instruction, and synchronization is attempted again or rolled back to a specified historical version. Furthermore, the first third-party interface push API is reconfigured and the first SpeedUI interface is re-edited based on the information after successful configuration to conform to the current version information of the online environment, and the data generated during the configuration process of the first third-party interface push API or the first SpeedUI interface is stored through the second newly added configuration record.

[0057] Furthermore, the second test result refers to a test of the successfully synchronized online environment to determine whether it is stable; if the second test result shows that the online environment is relatively stable and no errors occur, the first configuration process is terminated and displayed as a successful synchronization status; if the second test result shows that the online environment is unstable and errors still occur, and the cause is unknown or difficult to correct, the third rollback instruction is sent to the configuration center to roll back the configuration of the online environment; the online environment can be selectively rolled back to a specified historical version based on the application file list to be synchronized.

[0058] The configuration information of historical versions synchronized with the online environment is stored through the list of files to be synchronized. When the configuration synchronization test result of the online environment fails, the configuration data information of the appropriate version can be customized and selected through the list of files to be synchronized, so that the stability of the online environment can be restored in time, thereby achieving the technical effect of recording the problematic versions and ensuring the stability of the system.

[0059] Further, such as Figure 2 As shown, the method further includes step S600:

[0060] S610: Push the first third-party interface push API or the first SpeedUI interface to the configuration center server core component SpeedServer, perform internal logic operations, and obtain the first newly added configuration record;

[0061] S620: Generate a first update instruction according to the first newly added configuration record;

[0062] S630: Update the zookeeper state according to the first update instruction and obtain a first configuration change notification;

[0063] S640: According to the first configuration change notification, configure the subscriber to obtain the first newly added configuration record.

[0064] Specifically, the internal logic operation refers to the process in which the configuration center receives the configuration information pushed by the first third-party interface pushhapi or the first SpeedUI interface for storage, and obtains the first newly added configuration record according to the process data required for the configuration update; the zookeeper component refers to notifying the client when a node changes (data changes, is deleted, sub-directory nodes are added or deleted) during the configuration process, monitoring how many nodes currently rely on the configuration, and preferably using an open source apache notification component; the first update instruction refers to an instruction to update the zookeeper component status information issued after obtaining the first newly added configuration record, ensuring that the zookeeper component is in working condition from the start of the update; the subscriber Subscriber refers to a component responsible for event monitoring, configuration information acquisition and feedback of the operation status of the subscription terminal; the first configuration change notification refers to an instruction sent to the subscriber Subscriber component after the zookeeper component status is updated; the first newly added configuration record refers to the subscriber Subscriber component retrieving and storing the content information of the configuration update after receiving the first configuration change notification, that is, the first newly added configuration record. After the configuration update starts, when data flows, the subscriber will register the subscriber component information of the subscriber to the zookeeper component at the beginning of startup, ensuring that the server can read through the zookeeper how many nodes currently depend on the configuration, thereby achieving the technical effect of monitoring the configuration update process.

[0065] Further, such as Figure 3 As shown, the method further includes step S700:

[0066] S710: Obtaining a first data flow start time;

[0067] S720: Obtain first subscriber information according to the first data flow start time;

[0068] S730: registering the first subscriber information to the zookeeper to obtain first node quantity information, wherein the first node has a first association with the first newly added configuration record;

[0069] S740: Obtain first impact information according to the first node quantity information, wherein the first impact information is the impact of the current project configuration on other projects.

[0070] Specifically, the first data flow start time refers to the time node when the configuration center starts to update the configuration for data flow after the subscriber obtains the first newly added configuration record; the first subscriber information refers to the identification data representing the subscriber component, preferably the device fingerprint; further, the first node quantity information refers to the number of nodes called by the configuration update read by the server through the zookeeper component after the subscriber component is registered with the zookeeper component according to the first subscriber information; the first association means that the first node quantity corresponds to the configuration data information, and the first newly added configuration record is the specific content of the configuration update, and the first node quantity is also a corresponding relationship with the first newly added configuration record; the first impact information refers to the impact of the current configuration update process on other projects based on the number of the first node, for example: the more the number of public nodes, the greater the impact. The subscriber will register the subscriber component information of the subscriber to the zookeeper component at the beginning of the startup, ensuring that the server can read how many nodes currently depend on the configuration through the zookeeper, thereby achieving the technical effect of monitoring the configuration update process.

[0071] In summary, the distributed configuration method and device provided by the embodiments of the present application have the following technical effects:

[0072] 1. Due to the adoption of a technical solution based on Publisher, the first third-party interface push API and the first SpeedUI interface are obtained; the first third-party interface push API or the first SpeedUI interface is pushed to the configuration center for updating, and the first newly added configuration record is obtained, wherein the configuration center is included in the simulation environment; the first newly added configuration record is locked, and a simulation test is performed to obtain a first test result; according to the first test result, the first newly added configuration record is synchronized to the online environment to obtain a first synchronization result; according to the first synchronization result, the first newly added configuration record is unlocked and updated to a synchronization success state, and the configuration is pushed to the third-party interface and interface based on the configuration center through the producer component to update the configuration, and the configuration record is locked and sent to the simulation environment for testing, and the configuration is synchronized to the online environment based on the test result and unlocked. The updated configuration is first tested using the simulation environment, and automatically synchronized to the online environment after success, which improves the accuracy of data synchronization and achieves the technical effect of automatically configuring data synchronization in different environments.

[0073] 2. The data synchronization of the online environment and the production environment is isolated and executed through the simulation environment to avoid online accidents. After the test results are qualified, automatic synchronization can be requested to ensure that the production environment is not affected.

[0074] 3. The subscriber will register the subscriber component information of the subscriber to the zookeeper component at the beginning of startup, ensuring that the server can read how many nodes currently depend on the configuration through the zookeeper, thereby achieving the technical effect of monitoring the configuration update process.

[0075] 4. Through the judgment of version rollback, when the first test result fails, the version can be rolled back to the previous version, avoiding business failures and ensuring the stability of the system.

[0076] 5. When the configuration synchronization test result of the online environment fails, the configuration data information of the appropriate version can be customized and selected through the list of files to be synchronized to roll back the version, so as to restore the stability of the online environment in time, achieve the technical effect of recording the problematic version and ensuring the stability of the system.

[0077] Embodiment 2

[0078] Based on the same inventive concept as a distributed configuration method in the aforementioned embodiment, Figure 4 As shown, an embodiment of the present application provides a distributed configuration system, wherein the system includes:

[0079] A first obtaining unit 11, wherein the first obtaining unit 11 is used to obtain a first third-party interface push API or a first SpeedUI interface based on Publisher;

[0080] A second obtaining unit 12, wherein the second obtaining unit 12 is used to push the first third-party interface push API or the first SpeedUI interface to a configuration center for updating, and obtain a first newly added configuration record, wherein the configuration center is included in a simulation environment;

[0081] A third obtaining unit 13, wherein the third obtaining unit 13 is used to lock the first newly added configuration record, and perform a simulation test to obtain a first test result;

[0082] A fourth obtaining unit 14, wherein the fourth obtaining unit 14 is used to synchronize the first newly added configuration record to the online environment according to the first test result to obtain a first synchronization result;

[0083] The first updating unit 15 is used to unlock the first newly added configuration record according to the first synchronization result, and update it to a synchronization success state.

[0084] Furthermore, the system also includes:

[0085] A first judging unit, the first judging unit is used to judge whether the first test result is successful;

[0086] A first sending unit, the first sending unit is used to send a first test failure email if the first test result is unsuccessful;

[0087] A first generating unit, the first generating unit being configured to unlock the first newly added configuration record according to the first test failure email, and generate a first rollback instruction;

[0088] A first editing unit, configured to perform a second push on the first third-party interface push API or perform a second edit on the first SpeedUI interface according to the first rollback instruction;

[0089] A fifth obtaining unit, wherein if the first test result is successful, the fifth obtaining unit is used to obtain a list of application files to be synchronized and synchronize it to an online environment, wherein the list of application files to be synchronized includes the first newly added configuration record.

[0090] Furthermore, the system also includes:

[0091] A second judgment unit, the second judgment unit is used to judge whether the first synchronization result is successful;

[0092] a second generating unit, wherein the second generating unit is configured to unlock the first newly added configuration record and generate a second rollback instruction if the first synchronization result fails;

[0093] a third generating unit, the third generating unit being used to reconfigure the first third-party interface push API or the first SpeedUI interface according to the second rollback instruction, and generate a second newly added configuration record for a second configuration;

[0094] a sixth obtaining unit, wherein if the first synchronization result is successful, the sixth obtaining unit is used to perform an online program test on the first newly added configuration record to obtain a second test result;

[0095] A first execution unit, wherein the first execution unit is used to end a first configuration process according to the second test result, wherein the first configuration process corresponds to the first newly added configuration record.

[0096] Furthermore, the system also includes:

[0097] A third judging unit, the third judging unit is used to judge whether the second test result is successful;

[0098] a fourth generating unit, the fourth generating unit being configured to generate a third rollback instruction if the second test result is unsuccessful;

[0099] A first production unit, the first production unit is used to roll back the test failure result to the application to-be-synchronized file list for secondary production according to the third rollback instruction;

[0100] The second execution unit is used to end the first configuration process if the second test result is successful.

[0101] Furthermore, the system also includes:

[0102] A seventh obtaining unit, the seventh obtaining unit is used to push the first third-party interface pushapi or the first SpeedUI interface to the configuration center server core component SpeedServer, perform internal logic operations, and obtain the first newly added configuration record;

[0103] a fifth generating unit, configured to generate a first update instruction according to the first newly added configuration record;

[0104] An eighth obtaining unit, wherein the eighth obtaining unit is used to update the zookeeper state according to the first update instruction and obtain a first configuration change notification;

[0105] The first configuration unit, the eighth configuration unit is used to configure the subscriber Subscriber to obtain the first newly added configuration record according to the first configuration change notification.

[0106] Furthermore, the system also includes:

[0107] A ninth obtaining unit, the ninth obtaining unit being used to obtain a first data flow start time;

[0108] a tenth obtaining unit, configured to obtain first subscriber information according to the first data flow start time;

[0109] an eleventh obtaining unit, the eleventh obtaining unit being configured to register the first subscriber information to the zookeeper, and obtain first node quantity information, wherein the first node has a first association with the first newly added configuration record;

[0110] A twelfth obtaining unit is used to obtain first impact information according to the first node quantity information, wherein the first impact information is the impact of the current project configuration on other projects.

[0111] Exemplary Electronic Devices

[0112] Reference below Figure 5 To describe the electronic device of the embodiment of the present application,

[0113] Based on the same inventive concept as a distributed configuration method in the aforementioned embodiment, the embodiment of the present application further provides a distributed configuration system, comprising: a processor, the processor is coupled to a memory, the memory is used to store a program, when the program is executed by the processor, the system executes the method described in any one of the first aspects

[0114] The electronic device 300 includes: a processor 302, a communication interface 303, and a memory 301. Optionally, the electronic device 300 may also include a bus architecture 304. The communication interface 303, the processor 302, and the memory 301 may be interconnected via the bus architecture 304; the bus architecture 304 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus architecture 304 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0115] The processor 302 may be a CPU, a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of the program of the present application.

[0116] The communication interface 303 uses any transceiver-like system for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), wired access networks, etc.

[0117] The memory 301 may be a ROM or other type of static storage device that can store static information and instructions, a RAM or other type of dynamic storage device that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may exist independently and be connected to the processor via the bus architecture 304. The memory may also be integrated with the processor.

[0118] The memory 301 is used to store computer-executable instructions for executing the solution of the present application, and the execution is controlled by the processor 302. The processor 302 is used to execute the computer-executable instructions stored in the memory 301, thereby realizing a distributed configuration method provided in the above embodiment of the present application.

[0119] Optionally, the computer-executable instructions in the embodiments of the present application may also be referred to as application code, which is not specifically limited in the embodiments of the present application.

[0120] The embodiment of the present application provides a distributed configuration method, wherein the method includes: based on Publisher, obtaining a first third-party interface push API or a first SpeedUI interface; pushing the first third-party interface push API or the first SpeedUI interface to the configuration center for updating, obtaining a first newly added configuration record, wherein the configuration center is included in a simulation environment; locking the first newly added configuration record, and performing a simulation test to obtain a first test result; according to the first test result, synchronizing the first newly added configuration record to the online environment to obtain a first synchronization result; according to the first synchronization result, unlocking the first newly added configuration record and updating it to a synchronization success state. The configuration is pushed to the third-party interface and interface through the producer component to update the configuration based on the configuration center, and the configuration record is locked and sent into the simulation environment for testing, and the configuration is synchronized to the online environment and unlocked based on the test result. The updated configuration is first tested using the simulation environment, and automatically synchronized to the online environment after success, which improves the accuracy of data synchronization and achieves the technical effect of automatically configuring data synchronization in different environments.

[0121] Those of ordinary skill in the art will appreciate that the various digital numbers such as the first and second involved in the present application are only for the convenience of description, and are not used to limit the scope of the embodiments of the present application, nor do they represent the order of precedence. "And / or" describes the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one" refers to one or more. At least two refers to two or more. "At least one", "any one" or similar expressions refer to any combination of these items, including any combination of single items (individuals) or plural items (individuals). For example, at least one item (individual, kind) of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0122] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable systems. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server, data center, etc. that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.

[0123] The various illustrative logic units and circuits described in the embodiments of the present application can be implemented or operated by a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic system, a discrete gate or transistor logic, a discrete hardware component, or the design of any combination of the above functions. The general-purpose processor can be a microprocessor, and optionally, the general-purpose processor can also be any traditional processor, controller, microcontroller or state machine. The processor can also be implemented by a combination of a computing system, such as a digital signal processor and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a digital signal processor core, or any other similar configuration to implement.

[0124] The steps of the method or algorithm described in the embodiments of the present application can be directly embedded in hardware, a software unit executed by a processor, or a combination of the two. The software unit can be stored in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium in the art. Exemplarily, the storage medium can be connected to the processor so that the processor can read information from the storage medium and can write information to the storage medium. Optionally, the storage medium can also be integrated into the processor. The processor and the storage medium can be arranged in an ASIC, and the ASIC can be arranged in a terminal. Optionally, the processor and the storage medium can also be arranged in different components in the terminal. These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are performed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0125] Although the present application has been described in conjunction with specific features and embodiments thereof, it is obvious that various modifications and combinations may be made thereto without departing from the spirit and scope of the present application. Accordingly, this specification and the drawings are merely exemplary illustrations of the present application as defined by the appended claims, and are deemed to have covered any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, a person skilled in the art may make various modifications and variations to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include these modifications and variations.

Claims

1. A distributed configuration method, wherein: The method comprises: Based on Publisher, obtain the first third-party push API or the first SpeedUI interface; Pushing the first third-party interface push API or the first SpeedUI interface to a configuration center for updating to obtain a first newly added configuration record, wherein the configuration center is included in a simulation environment; The first newly added configuration record is locked, and a corresponding simulation environment is matched according to an online environment that needs to be synchronously configured, and a configuration update test is performed in the simulation environment according to the configuration data information to obtain a first test result; According to the first test result, synchronizing the first newly added configuration record to the online environment corresponding to the simulation environment to obtain a first synchronization result; According to the first synchronization result, the first newly added configuration record is unlocked and updated to a synchronization success state.

2. The method of claim 1, wherein: The method further comprises: Determine whether the first test result is successful; If the first test result is unsuccessful, send a first test failure email; According to the first test failure email, unlock the first newly added configuration record and generate a first rollback instruction; According to the first rollback instruction, the first third-party interface push API is pushed a second time or the first SpeedUI interface is edited a second time; If the first test result is successful, a list of application files to be synchronized is obtained and synchronized to an online environment, wherein the list of application files to be synchronized includes the first newly added configuration record.

3. The method of claim 2, wherein: The method further comprises: Determine whether the first synchronization result is successful; If the first synchronization result fails, unlocking the first newly added configuration record and generating a second rollback instruction; According to the second rollback instruction, reconfigure the first third-party interface push API or the first SpeedUI interface, generate a second newly added configuration record, and perform a second configuration; If the first synchronization result is successful, performing an online program test on the first newly added configuration record to obtain a second test result; According to the second test result, a first configuration process is terminated, wherein the first configuration process corresponds to the first newly added configuration record.

4. The method of claim 3, wherein: The method further comprises: Determining whether the second test result is successful; If the second test result is unsuccessful, generating a third rollback instruction; According to the third rollback instruction, the test failure result is rolled back to the application file list to be synchronized for secondary production; If the second test result is successful, the first configuration process ends.

5. The method of claim 1, wherein: The method further comprises: Pushing the first third-party interface push API or the first SpeedUI interface to the configuration center server core component SpeedServer, performing internal logic operations, and obtaining the first newly added configuration record; Generate a first update instruction according to the first newly added configuration record; According to the first update instruction, update the zookeeper status and obtain a first configuration change notification; According to the first configuration change notification, the subscriber is configured to obtain the first newly added configuration record.

6. The method of claim 5, wherein: The method further comprises: Obtaining a first data flow start time; Obtaining first subscriber information according to the first data flow start time; Register the first subscriber information to the zookeeper to obtain first node quantity information, wherein the first node has a first association with the first newly added configuration record; First impact information is obtained according to the first node quantity information, wherein the first impact information is the impact of the current project configuration on other projects.

7. A distributed configuration system, wherein: The system comprises: A first obtaining unit, wherein the first obtaining unit is used to obtain a first third-party interface push API or a first SpeedUI interface based on Publisher; A second obtaining unit, wherein the second obtaining unit is used to push the first third-party interface push API or the first SpeedUI interface to a configuration center for updating, and obtain a first newly added configuration record, wherein the configuration center is included in a simulation environment; A third obtaining unit, the third obtaining unit is used to lock the first newly added configuration record, match the online environment that needs to be synchronously configured to the corresponding simulation environment, and perform a configuration update test in the simulation environment according to the configuration data information to obtain a first test result; A fourth obtaining unit, the fourth obtaining unit being used to synchronize the first newly added configuration record to the online environment corresponding to the simulation environment according to the first test result, to obtain a first synchronization result; The first updating unit is used to unlock the first newly added configuration record according to the first synchronization result, and update it to a synchronization success state.

8. A distributed configuration system, comprising: A processor, the processor is coupled to a memory, the memory is used to store a program, when the program is executed by the processor, the system is enabled to perform the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Updating method and system of configuring information

    CN103220163A

  • Real-time synchronization method and real-time synchronization system for configuration file applied to high-availability system

    CN104486319A

  • Shared configuration resource implementation method for cloud native service in Kubernetes environment

    CN112783654A