Application configuration method and related device

By introducing shared storage in the configuration center and separating the configuration request and configuration file pulling processes, the problems of low performance, poor availability and insufficient scalability in existing technologies are solved, and efficient application configuration and rapid response are achieved.

CN120687110APending Publication Date: 2025-09-23MASHANG CONSUMER FINANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510567587.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-09-23

AI Technical Summary

Technical Problem

The existing application configuration process based on the configuration center has problems such as low performance, poor availability, poor scalability and slow configuration response.

Method used

By introducing shared storage and transforming the interaction between the configuration server and the file repository, the full-link synchronization request is divided into two stages: the first stage pulls the configuration file from the file repository and writes it to the shared storage, and the second stage directly obtains and returns the application configuration file from the shared storage.

Benefits of technology

It improves application configuration performance, enhances the availability of configuration services, alleviates access pressure on file repositories, and supports rapid capacity expansion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120687110A_ABST
    Figure CN120687110A_ABST
Patent Text Reader

Abstract

The invention discloses an application configuration method and a related device. The application configuration method and the related device are used for improving application configuration performance, capacity expansion capability, availability, configuration response speed and the like. The application configuration method is applied to a configuration server, and comprises the following steps: in response to a configuration request of a first application, determining a first configuration file corresponding to the first application from configuration files stored in a shared memory; the shared memory is used for storing a changed second configuration file in a file warehouse, and the file warehouse comprises configuration files corresponding to different applications; and sending the first configuration file to the first application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an application configuration method and related devices. Background Art

[0002] A configuration center is a component in the software architecture that centrally manages application configuration information. Its primary purpose is to separate configuration information from application code, allowing configuration to be managed and updated independently of the application without requiring application redeployment.

[0003] Currently, the application configuration process based on the configuration center has problems such as low performance, poor availability, poor scalability, and slow configuration response. Summary of the Invention

[0004] The purpose of the embodiments of the present application is to provide an application configuration method and related devices for improving application configuration performance, scalability, availability, and configuration response speed.

[0005] In order to achieve the above objectives, the embodiments of the present application adopt the following technical solutions: In a first aspect, an embodiment of the present application provides an application configuration method, applied to a configuration server, comprising: In response to a configuration request of a first application, determining a first configuration file corresponding to the first application from configuration files stored in a shared memory; the shared memory is used to store a changed second configuration file in a file repository, the file repository including configuration files corresponding to different applications; Send the first configuration file to the first application.

[0006] In a second aspect, an embodiment of the present application provides an application configuration device, which is applied to a configuration server, including: a first acquisition module configured to determine, in response to a configuration request of a first application, a first configuration file corresponding to the first application from configuration files stored in a shared memory; the shared memory is configured to store a changed second configuration file in a file repository, the file repository including configuration files corresponding to different applications; A sending module is used to send the first configuration file to the first application.

[0007] In a third aspect, an embodiment of the present application provides an electronic device, including: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the application configuration method provided in the first aspect.

[0008] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which, when the instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute the application configuration method provided in the first aspect.

[0009] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable a computer to execute some or all of the steps in the application configuration method provided in the first aspect.

[0010] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects: By introducing a shared memory and remodeling the interaction process between the configuration server and the file repository, the full-link synchronization request is divided into two sections. In the first section, the configuration server pulls the changed second configuration file from the file repository and writes the second configuration file into the shared memory; in the second section, upon receiving the configuration request from the first application, the configuration server directly obtains the first configuration file corresponding to the first application from the configuration file stored in the shared memory, and returns the first configuration file to the first application for the first application to perform configuration updates. On the one hand, the decoupling of the response process to the configuration request and the process of pulling the latest configuration file is achieved. Not only does the process of pulling the latest configuration file not block configuration requests sent to other applications, thereby improving application configuration performance, but also the configuration server does not care whether the configuration file in the file repository has changed when responding to the configuration request of the first application. Even if the file repository encounters a network failure or downtime, it can still provide configuration services normally, thereby improving the availability of the configuration service. On the other hand, since the configuration files pulled by the configuration server are stored in the shared memory, these configuration files can be shared by multiple configuration servers. This not only eliminates the need for other configuration servers to access the file repository, effectively alleviating the access pressure on the file repository and improving the configuration response speed, but also when additional configuration servers are needed to achieve capacity expansion, the newly added configuration servers can obtain configuration files from the shared storage, eliminating the need to clone all configuration files in the file repository to the local machine at startup, thereby enabling the configuration server to quickly expand capacity to meet business needs. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 A schematic diagram of the architecture of an application configuration system provided for one embodiment of the present application; Figure 2 A flowchart of an application configuration method provided in one embodiment of the present application; Figure 3 A flowchart of an application configuration method provided in another embodiment of the present application; Figure 4 A flowchart of an application configuration method provided in yet another embodiment of the present application; Figure 5 A schematic diagram of the structure of an application configuration device provided in one embodiment of the present application; Figure 6 A schematic structural diagram of an electronic device provided in accordance with an embodiment of the present application. DETAILED DESCRIPTION

[0012] To make the purpose, technical solutions, and advantages of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the specific embodiments of this application and the corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0013] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, and this is merely a way of distinguishing the objects of the same attributes when describing them in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0014] Key terms explained: gitRepo: A file version management repository based on the gitlab component.

[0015] clone: ​​Download a copy of the remote repository's file data to the local computer through the git protocol.

[0016] As mentioned above, the current application configuration process based on the configuration center suffers from problems such as low performance and poor scalability. Improving application configuration performance and scalability has become a hot research topic.

[0017] The inventors conducted extensive research on the current application configuration process based on the configuration center and found that: On the one hand, every time the configuration server receives a configuration request from an application, it needs to check whether the configuration file in the file repository has been updated. If so, it needs to pull the changed content and return it to the application only after pulling the latest configuration file. This process blocks configuration requests from other applications, resulting in reduced application configuration performance. In addition, the configuration server's frequent access to the file repository puts a huge pressure on the file repository, resulting in slow configuration response.

[0018] On the other hand, since the configuration server pulls the configuration file directly from the file repository, and the process of pulling the latest configuration file is highly coupled with the process of responding to the application's configuration request, once the file repository encounters a network failure or downtime, the configuration server will time out and report an error when detecting the latest configuration file, resulting in an abnormal response to the application's configuration request and configuration service unavailability, which will seriously reduce the availability of the configuration service.

[0019] On the other hand, when the configuration server starts, it sends a clone command to the file repository, pulling all configuration files from the file repository to the local configuration server. However, application configuration files are constantly adjusted during daily operations, causing the file repository's data storage to grow. This, in turn, causes the configuration server to consume a significant amount of time when cloning configuration files. Consequently, when the configuration server encounters performance bottlenecks or insufficient capacity, it cannot quickly scale up to meet business needs.

[0020] Based on the above findings, the present application proposes an application configuration method using the following inventive concepts: By introducing shared storage and reshaping the interaction between the configuration server and the file repository, the full-link synchronization request is divided into two stages. In the first stage, the configuration server pulls the changed second configuration file from the file repository and writes it to the shared storage. In the second stage, the application accesses the configuration server, which directly retrieves the latest configuration file corresponding to the application from the shared storage and returns it to the application.

[0021] On the one hand, the decoupling of the response process to configuration requests and the process of pulling the latest configuration files is achieved. This not only ensures that the process of pulling the latest configuration files will not block configuration requests sent to other applications, thereby improving application configuration performance, but also ensures that when the configuration server responds to the application's configuration request, it does not care whether the configuration files in the file repository have changed. Even if the file repository encounters network failures or downtime, it can still provide configuration services normally, thereby improving the availability of configuration services.

[0022] On the other hand, because the configuration files pulled by the configuration server are stored in shared storage, these configuration files can be shared by multiple configuration servers. This not only eliminates the need for other configuration servers to access the file repository, effectively alleviating access pressure on the file repository and improving configuration response speed, but also, when additional configuration servers are needed to achieve capacity expansion, the newly added configuration servers can obtain configuration files from shared storage, eliminating the need to clone all configuration files from the file repository to the local server at startup. This allows configuration servers to quickly scale to meet business needs.

[0023] Before providing a detailed introduction to the application configuration method provided in the embodiment of the present application, a brief introduction to the architecture of the application configuration system involved in the embodiment of the present application is first provided. Figure 2 The schematic diagram of the architecture of an application configuration system is shown. The application configuration system includes a configuration processing device 10 , a file repository 20 , an application 30 , a configuration server 40 and a shared memory 50 .

[0024] The configuration processor device 10 provides configuration functionality for the application 30. This allows the developer of the application 30 to submit configuration information for the application 30 when they need to update the configuration of the application 30. For example, if they want to update a specific function of the application 30, they can submit configuration information for that function. Based on the configuration information submitted by the developer, the configuration processor 10 generates a configuration file for the application 30 and pushes it to the file repository 20 for storage.

[0025] The file warehouse 20 can be any warehouse with a file version management function, such as gitRepo, etc. The embodiment of the present application does not limit the type of the file warehouse 20. The file warehouse 20 receives and stores the configuration files pushed by the configuration processing device 10.

[0026] Configuration server 40 provides configuration services for application 30. Configuration server 40 can retrieve the configuration file corresponding to application 30 from file repository 20 and store the retrieved configuration file in shared storage 50. Furthermore, upon receiving a configuration request from application 30, configuration server 40 retrieves the configuration file for application 30 from shared storage 50 and sends it to application 30 to configure application 30.

[0027] In the application, there can be multiple applications and multiple configuration servers. These configuration servers can access the shared memory 50 so that the configuration file pulled from the file warehouse 20 by one configuration server 40 can be shared by all configuration servers 40.

[0028] Based on the application configuration system introduced above, the application configuration method provided in the embodiment of the present application is described in detail with reference to the accompanying drawings.

[0029] Please refer to Figure 2 , is a flow chart of an application configuration method provided in one embodiment of the present application, the method is applied to configure a server, and the method includes the following steps: S202 : In response to a configuration request of the first application, determine a first configuration file corresponding to the first application from configuration files stored in the shared memory.

[0030] The shared memory is used to store the second configuration file that has changed in the file warehouse, and the file warehouse includes configuration files corresponding to different applications.

[0031] In an embodiment of the present application, the configuration files corresponding to each application in the file warehouse can be obtained by the configuration processing device through various appropriate methods and pushed to the file warehouse.

[0032] In one implementation, after modifying each application, the developer of the application may submit the application's first configuration information to the configuration processing device. The configuration processing device then generates a configuration file containing the first configuration information and pushes the configuration file to the file repository for storage. The first configuration information may include multiple configuration items of the application and a first parameter for each configuration item.

[0033] In another implementation, for each application, the configuration processing device receives first configuration information submitted by the developer of the application for the application; obtains the operating information and baseline information of the application from the monitoring information; generates second configuration information applicable to the application based on the operating information, baseline information and first configuration information of the application; generates a configuration file corresponding to the application based on the response operation of the developer of the application to the second configuration information, and then pushes the configuration file to the file warehouse for storage.

[0034] Application operation information may include, for example, the values ​​of various performance indicators of the application, including, but not limited to, memory usage, CPU (Central Processing Unit) usage, and QPS (Queries Per Second). Application baseline information may include, but not limited to, the application's technical framework, technology stack type, and the application's corresponding business scenarios.

[0035] Exemplarily, the configuration processing device may be a functional module provided on an electronic device. The configuration processing device calls an AI (Artificial Intelligence) model, such as a Large Language Model (LLM), to verify the format of the first configuration information. If the verification passes, the baseline information, operating information, and first configuration information of the application are submitted to the AI ​​model. The AI ​​model detects the correctness and rationality of the first configuration information based on the baseline information and operating information, and provides feedback, wherein the feedback includes whether the first configuration information is reasonable and whether the second configuration information is applicable to the application.

[0036] The configuration processing device then pushes the feedback results to the application developer, who then confirms whether to adopt the second configuration information. If there are any issues with the format or configuration item mismatches, the developer will fix these issues and submit them to the configuration processing device. If the developer confirms the adoption of the second configuration information, a configuration file corresponding to the application is generated based on the second configuration information. If the developer does not adopt the second configuration information, a configuration file corresponding to the application is generated based on the first configuration information.

[0037] In the above embodiment, the configuration processing device can generate the second configuration information suitable for the application in the following manner: verify the first parameter of each configuration item based on the baseline information, and determine the first configuration item that fails the verification and the second configuration item that passes the verification from multiple configuration items; adjust the first parameter of the first configuration item based on the operation information and the baseline information to obtain the second parameter of the first configuration item; and generate the second configuration information suitable for the application based on the second parameter of the first configuration item and the first parameter of the second configuration item.

[0038] For example, the first configuration information of application 1 includes the first parameter of configuration item 1 and the first parameter of configuration item 2. If the first parameter of configuration item 1 fails verification, but the first parameter of configuration item 2 passes verification, the AI ​​model is called to determine the currently optimal second parameter for configuration item 1 based on the running information and baseline information of application 1. Then, the corresponding second configuration information is generated for application 1, which includes the second parameter of configuration item 1 and the first parameter of configuration item 2.

[0039] It can be seen that the configuration files of each application obtained through the above embodiment are correct and reasonable, which can solve the problem that the configuration of the application cannot achieve the expected effect and causes configuration risks due to developer errors, unreasonable configuration or configuration format problems.

[0040] S204: Send the first configuration file to the first application.

[0041] By sending the first configuration file to the first application, the first application can complete the configuration update based on the first configuration file.

[0042] In the embodiment of the present application, the second configuration file stored in the shared memory can be pulled from the file repository by the configuration server and written into the shared memory.

[0043] Specifically, when a configuration file in the file repository changes, in order to increase the configuration server's ability to perceive such changes and ensure that the latest configuration services can be provided to the application, the configuration server can pull the changed second configuration file from the file repository and write the second configuration file to the shared memory.

[0044] The shared memory may be any memory that can be accessed by multiple configuration servers, such as NFS (Network File System), etc. The embodiment of the present application does not limit the type of shared memory.

[0045] Specifically, a directory for storing configuration files can be set in the shared memory. The configuration server can write the pulled second configuration file into the directory, so that other configuration servers can obtain the required configuration files by accessing the directory without having to initiate access to the file repository.

[0046] In the embodiment of the present application, the configuration server may pull the changed second configuration file from the file repository in various appropriate ways, and the embodiment of the present application is not limited to this.

[0047] In one implementation, the changed second configuration file is periodically pulled from the file repository.

[0048] Specifically, in response to the received start signal, a scheduled task is created, and the scheduled task is used to pull the changed second configuration file from the file repository; in response to the trigger time of the scheduled task arriving, whether the trigger time is recorded in the cache is queried; if the trigger time is not recorded in the cache, the scheduled task is executed, and the trigger time is written to the cache.

[0049] After startup, each configuration server will automatically create a scheduled task, and pull the second configuration file from the file warehouse by executing the scheduled task. If the trigger time of the scheduled tasks created by multiple configuration servers is the same, the configuration server that executes the scheduled task first will write the trigger time in the cache. When other configuration servers find that the trigger time is recorded in the cache, it means that a configuration server has already pulled the second configuration file from the file warehouse, so there is no need to execute the scheduled task, but wait for the next trigger time of the scheduled task to arrive. In this way, it can avoid all configuration servers pulling the same configuration file from the file warehouse, causing unnecessary resource consumption and bringing access pressure to the file warehouse.

[0050] In applications, cache can be implemented using various storage devices or technologies with efficient data access capabilities and fast response characteristics, such as Redis, middleware, and databases. The present embodiment does not limit the type of cache. Furthermore, scheduled tasks can be executed by the internal mechanism of the configuration server or by the configuration server calling an external scheduling system.

[0051] By periodically pulling the changed second configuration file from the file warehouse, the configuration server can promptly perceive the changes in the configuration file in the file warehouse.

[0052] In another implementation, in response to receiving a first notification message sent by the file repository, the changed second configuration file is pulled from the file repository, wherein the first notification message is triggered by the file repository when detecting that the stored configuration file has changed.

[0053] Specifically, the file repository is configured with a notification address that points to a configuration server. If there are multiple configuration servers, the notification address can point to each configuration server. This way, when a configuration file in the file repository changes, a first notification message is sent to the notification address via a webhook. The configuration server that first receives the first notification message then pulls the changed second configuration file from the file repository.

[0054] By having the file repository proactively notify the configuration server to pull the stored configuration file when it changes, it helps to increase the real-time perception capability after the configuration change and ensure that the configuration server pulls the second configuration file at the fastest perception speed.

[0055] In another implementation, the two aforementioned methods are combined to pull the changed second configuration file from the file repository. Specifically, on the one hand, the changed second configuration file is pulled from the file repository on a regular basis, and on the other hand, upon receiving the first notification message sent by the file repository, the changed second configuration file is pulled from the file repository.

[0056] For example, Figure 3 As shown, after startup, configuration server 1 creates a scheduled task. By executing the scheduled task, it periodically pulls the second configuration file that has been modified so far from the file warehouse and writes the second configuration file to the shared memory. Similarly, after startup, configuration server 2 also creates a scheduled task. By executing the scheduled task, it periodically pulls the second configuration file that has been modified so far from the file warehouse and writes the second configuration file to the shared memory.

[0057] If the scheduled tasks on configuration server 1 and configuration server 2 have the same trigger time, and configuration server 1 executes the scheduled task first, configuration server 1 not only executes the scheduled task but also writes the current trigger time to the cache. Configuration server 2, upon detecting the current trigger time in the cache, stops executing the scheduled task and waits for the next trigger time.

[0058] In addition, when the file warehouse detects a change in the stored configuration file, it actively pushes a first notification message to configuration server 1 and configuration server 2. The configuration server that first receives the first notification message pulls the second configuration file that has changed so far from the file warehouse.

[0059] It can be seen that the configuration server combines the above two methods to pull the second configuration file, which can increase the configuration server's real-time perception of changes in the file repository, ensure that the second configuration files stored in the shared memory are the latest, and thus provide reliable data support for application configuration updates.

[0060] Typically, the configuration server can use a file pull tool to pull the changed second configuration file from the file repository. However, if the pulled second configuration file is too large or the number of files is too large, the file pull tool will automatically perform a file compression operation. During the file compression process, the storage used to store the second configuration file (i.e., shared storage) will be locked, resulting in the configuration server being unable to access the shared storage and, consequently, unable to respond to the application's configuration request, meaning it cannot provide configuration services to the application.

[0061] In view of this, in another embodiment, before the configuration file pulls the modified second configuration file from the file repository, the process further includes disabling the file compression operation of the file pull tool. Furthermore, in S202 above, the file pull tool is invoked to pull the modified second configuration file from the file repository. This fundamentally prevents the file pull tool from locking the shared memory during file compression, thereby improving the availability of the configuration server.

[0062] In an embodiment of the present application, the file compression operation of the file pulling tool can be disabled in various appropriate ways.

[0063] In one implementation, file compression operations include file merging and garbage collection operations. Accordingly, disabling the file compression operation of a file pulling tool includes: generating a fourth configuration file for the file pulling tool; the fourth configuration file includes a first code and a second code, the first code being used to modify a trigger condition for the file merging operation, and the second code being used to disable the file pulling tool from performing garbage collection operations; and adding the fourth configuration file to the root directory of the file pulling tool.

[0064] For example, if the file repository is a gitRepo, a .gitconfig file is generated and the first code "auto=0" and "autopacklimit=0" are added to the file to remove the file number and size restrictions that trigger file merge operations. Furthermore, the second code "autogc=false" is added to the file to disable the file pull tool from performing garbage collection (GC) operations. This file is then added to the file pull tool's root directory. This way, when the file pull tool is invoked, it accesses the root directory and pulls the second configuration file according to the instructions in the .gitconfig file. Because the file number and size restrictions that trigger file merge operations are met, the file pull tool will not perform file compression even if the second configuration file it pulls is too large or the number of files is too large. Furthermore, because GC is disabled, it will not be performed even if unused second configuration files exist in the shared memory. This fundamentally prevents the file pull tool from locking the shared memory during file compression, improving the availability of the configuration server.

[0065] In another embodiment, the configuration file corresponding to each application in the file warehouse can be pushed to the file warehouse by the configuration processing device. In this case, the following steps are also included: when pulling the changed second configuration file from the file warehouse, if pulling the second configuration file from the file warehouse fails, then checking the working status of the file warehouse; if the working status of the file warehouse is abnormal, then obtaining the changed third configuration file from the configuration processing device, and writing the obtained third configuration file to the shared memory.

[0066] The configuration server can send a probe request to the file repository. If the request succeeds, it indicates that the file repository is operating normally. If the request fails, it may indicate that the file repository is down or there is a network problem. Alternatively, the configuration server can use a retry mechanism to pull the modified second configuration file from the file repository again. If the number of repeated pull failures reaches a threshold, it is determined that the file repository is down or there is a network problem.

[0067] Furthermore, the configuration server may send a pull request to the configuration processing device to request the changed third configuration file. Of course, the configuration processing device may also actively push the configuration file as the third configuration file to the configuration server after failing to push the configuration file to the file repository.

[0068] For example, Figure 4 As shown, if the file repository is down or experiencing network issues, the configuration server is unable to push the configuration files for each application to the file repository, and thus cannot push the configuration files for each application to configuration server 1 or configuration server 2, which then writes these configuration files to the shared memory. Furthermore, neither configuration server 1 nor configuration server 2 is able to pull the changed second configuration file from the file repository, and thus cannot obtain the changed third configuration file from the configuration server.

[0069] It can be seen that through the application configuration method shown in the above embodiment, even if the file warehouse is down or there is a network problem, the configuration server can still obtain the latest configuration file of each application to provide the latest configuration service to each application, thereby further improving the availability of the configuration service.

[0070] The application configuration method provided by the embodiment of the present application introduces a shared memory and transforms the interaction process between the configuration server and the file warehouse, so that the full-link synchronization request is divided into two sections. In the first section, the configuration server pulls the changed second configuration file from the file warehouse and writes the second configuration file to the shared memory; in the second section, when the configuration server receives the configuration request of the first application, it directly obtains the first configuration file corresponding to the first application from the configuration file stored in the shared memory, and returns the first configuration file to the first application for the first application to perform configuration updates. On the one hand, the decoupling of the response process to the configuration request and the process of pulling the latest configuration file is achieved, which not only makes the pulling process of the latest configuration file not block the configuration requests sent to other applications, thereby improving the application configuration performance, but also makes the configuration server not care whether the configuration file in the file warehouse changes when responding to the configuration request of the first application, so that even if the file warehouse has a network failure or downtime, it can still provide configuration services normally, thereby improving the availability of the configuration service. On the other hand, since the configuration files pulled by the configuration server are stored in the shared memory, these configuration files can be shared by multiple configuration servers. This not only eliminates the need for other configuration servers to access the file repository, effectively alleviating the access pressure on the file repository and improving the configuration response speed, but also when additional configuration servers are needed to achieve capacity expansion, the newly added configuration servers can obtain configuration files from the shared storage, eliminating the need to clone all configuration files in the file repository to the local machine at startup, thereby enabling the configuration server to quickly expand capacity to meet business needs.

[0071] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0072] Based on the same inventive concept, this embodiment of the application provides an application configuration device. Figure 5 , is a structural diagram of an application configuration device 500 provided in an embodiment of the present application. The device 500 is applied to a configuration server, and the device 500 includes: a first acquisition module 510 and a sending module 520.

[0073] The first acquisition module 510 is used to respond to the configuration request of the first application and determine the first configuration file corresponding to the first application from the configuration file stored in the shared memory; the shared memory is used to store the second configuration file that has changed in the file warehouse, and the file warehouse includes configuration files corresponding to different applications.

[0074] The sending module 520 is configured to send the first configuration file to the first application.

[0075] In another embodiment, the configuration file corresponding to each application in the file warehouse is obtained by the configuration processing device and pushed to the file warehouse in the following manner: For each application, receiving first configuration information submitted by a developer of the application for the application; Obtaining operation information and baseline information of the application from the monitoring system; generating second configuration information applicable to the application based on the operation information, the baseline information, and the first configuration information; A configuration file corresponding to the application is generated based on the developer's response operation to the second configuration information.

[0076] In another embodiment, the first configuration information includes a plurality of configuration items of the application and a first parameter of each configuration item; The second configuration information is obtained in the following manner: Verifying a first parameter of each configuration item based on the baseline information, and determining a first configuration item that fails the verification and a second configuration item that passes the verification from the plurality of configuration items; Adjusting a first parameter of the first configuration item based on the operation information and the baseline information to obtain a second parameter of the first configuration item; Second configuration information applicable to the application is generated based on the second parameter of the first configuration item and the first parameter of the second configuration item.

[0077] In another embodiment, the configuration file of each application in the file warehouse is pushed to the file warehouse by the configuration processing device; The application configuration device also includes: A second acquisition module is used to pull the changed second configuration file from the file repository; a detection module, configured to detect a working status of the file repository if pulling the second configuration file from the file repository fails; The third acquisition module is configured to acquire a changed third configuration file from the configuration processing device and write the third configuration file into the shared memory if the working state of the file repository is abnormal.

[0078] In another embodiment, the application configuration device further includes a second acquisition module; The second acquisition module is used for: Periodically pull the changed second configuration file from the file repository; and / or, In response to receiving a first notification message sent by the file repository, a changed second configuration file is pulled from the file repository; the first notification message is triggered by the file repository when detecting that a stored configuration file has changed.

[0079] In another embodiment, when the second acquisition module periodically pulls the changed second configuration file from the file repository, the second acquisition module performs the following steps: In response to the received start signal, creating a scheduled task, the scheduled task being used to pull the changed second configuration file from the file repository; In response to the trigger time of the scheduled task arriving, querying whether the trigger time is recorded in the cache; If the trigger time is not recorded in the cache, the scheduled task is executed, and the trigger time is written into the cache.

[0080] In another embodiment, the application configuration device further includes: Disable module, used to disable the file compression operation of the file pulling tool; The second acquisition module is configured to call the file pulling tool to pull the changed second configuration file from the file repository.

[0081] In another embodiment, the file compression operation includes a file merging operation and a garbage collection operation; The disabling module is used to: Generate a fourth configuration file for the file pulling tool; the fourth configuration file includes a first code and a second code, the first code is used to modify the triggering condition of the file merging operation, and the second code is used to prohibit the file pulling tool from performing a garbage collection operation; Add the fourth configuration file to the root directory of the file pulling tool.

[0082] Obviously, the application configuration device provided in the embodiment of the present application can be used as Figure 2 The execution subject of the application configuration method shown is, for example Figure 2 In the application configuration method shown, step S202 can be performed by Figure 5 The first acquisition module 510 in the application configuration device shown in FIG. 1 is executed, and step S204 can be performed by Figure 5 The sending module 520 in the application configuration device is shown to execute.

[0083] According to another embodiment of the present application, Figure 5 The various modules in the application configuration device shown can be individually or all combined into one or several other modules to form a whole, or one (or some) of the modules can be further divided into multiple functionally smaller modules to form a whole, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In actual applications, the functions of one module can also be implemented by multiple modules, or the functions of multiple modules can be implemented by one module. In the embodiments of the present application, the application configuration device may also include other modules. In actual applications, these modules can also be implemented with the assistance of other modules, and can be implemented by the collaboration of multiple modules.

[0084] According to another embodiment of the present application, the system can be executed on a general computing device such as a computer including processing elements such as a CPU, RAM, ROM and storage elements. Figure 2 A computer program (including program code) for each step involved in the corresponding method shown in FIG. Figure 5 The application configuration device shown in the figure and the application configuration method of the embodiment of the present application are implemented. The computer program can be recorded on a computer-readable storage medium, for example, and transferred to an electronic device through the computer-readable storage medium and run therein.

[0085] Figure 6 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Figure 6 At the hardware level, the electronic device includes a processor and, optionally, an internal bus, a network interface, and memory. The memory may include internal memory, such as high-speed random-access memory (RAM), or non-volatile memory, such as at least one disk drive. Of course, the electronic device may also include other hardware required for its services.

[0086] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, Figure 6Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0087] The memory is used to store programs. Specifically, the program may include program code, which includes computer operating instructions. The memory may include internal memory and non-volatile memory, and provides instructions and data to the processor.

[0088] The processor reads the corresponding computer program from the non-volatile memory into the internal memory and then runs it, forming an application configuration device at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations: In response to a configuration request of a first application, determining a first configuration file corresponding to the first application from configuration files stored in a shared memory; the shared memory is used to store a changed second configuration file in a file repository, the file repository including configuration files corresponding to different applications; Send the first configuration file to the first application.

[0089] The above application Figure 2 The methods performed by the application configuration device disclosed in the illustrated embodiments can be applied to or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be performed by hardware integrated logic circuits within the processor or by software instructions. The above processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules within the decoding processor. The software module can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above method.

[0090] The electronic device may also perform Figure 2 Method, and implement application configuration device in Figure 2 、 Figure 3 、 Figure 4 The functions of the illustrated embodiment will not be described in detail in the embodiments of the present application.

[0091] Of course, in addition to software implementation, the electronic device of this application does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0092] The embodiment of the present application also provides a computer-readable storage medium, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by an electronic device including multiple application programs, can enable the electronic device to execute Figure 2 The method of the embodiment shown is specifically used to perform the following operations: In response to a configuration request of a first application, determining a first configuration file corresponding to the first application from configuration files stored in a shared memory; the shared memory is used to store a changed second configuration file in a file repository, the file repository including configuration files corresponding to different applications; Send the first configuration file to the first application.

[0093] An embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps in the application configuration method provided in the embodiment of the present application.

[0094] In short, the above description is only a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

[0095] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0096] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0097] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0098] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.

Claims

1. An application configuration method, characterized in that: Applicable to configuration servers, including: In response to a configuration request of a first application, determining a first configuration file corresponding to the first application from configuration files stored in a shared memory; the shared memory is used to store a changed second configuration file in a file repository, the file repository including configuration files corresponding to different applications; Send the first configuration file to the first application.

2. The method according to claim 1, characterized in that The configuration file corresponding to each application in the file warehouse is obtained by the configuration processing device and pushed to the file warehouse in the following manner: For each application, receiving first configuration information submitted by a developer of the application for the application; Obtaining operation information and baseline information of the application from the monitoring system; generating second configuration information applicable to the application based on the operation information, the baseline information, and the first configuration information; A configuration file corresponding to the application is generated based on the developer's response operation to the second configuration information.

3. The method according to claim 2, characterized in that The first configuration information includes a plurality of configuration items of the application and a first parameter of each configuration item; The generating, based on the operation information, the baseline information, and the first configuration information, second configuration information applicable to the application includes: Verifying a first parameter of each configuration item based on the baseline information, and determining a first configuration item that fails the verification and a second configuration item that passes the verification from the plurality of configuration items; Adjusting a first parameter of the first configuration item based on the operation information and the baseline information to obtain a second parameter of the first configuration item; Second configuration information applicable to the application is generated based on the second parameter of the first configuration item and the first parameter of the second configuration item.

4. The method according to claim 1, wherein The configuration file of each application in the file warehouse is pushed to the file warehouse by the configuration processing device; The method further comprises: Pull the changed second configuration file from the file repository; If pulling the second configuration file from the file repository fails, detecting the working status of the file repository; If the working state of the file warehouse is abnormal, the changed third configuration file is obtained from the configuration processing device, and the third configuration file is written into the shared memory.

5. The method according to claim 1, wherein The second configuration file stored in the shared memory is pulled from the file repository and written into the shared memory in the following manner: Periodically pull the changed second configuration file from the file repository; and / or, In response to receiving a first notification message sent by the file repository, a changed second configuration file is pulled from the file repository; the first notification message is triggered by the file repository when detecting that a stored configuration file has changed.

6. The method according to claim 5, characterized in that The periodically pulling the changed second configuration file from the file repository includes: In response to the received start signal, creating a scheduled task, the scheduled task being used to pull the changed second configuration file from the file repository; In response to the trigger time of the scheduled task arriving, querying whether the trigger time is recorded in the cache; If the trigger time is not recorded in the cache, the scheduled task is executed, and the trigger time is written into the cache.

7. The method according to claim 4, characterized in that Before pulling the changed second configuration file from the file repository, the method further includes: Disable file compression operations of file pulling tools; Pulling the changed second configuration file from the file repository includes: The file pulling tool is called to pull the changed second configuration file from the file repository.

8. The method according to claim 7, characterized in that The file compression operation includes a file merging operation and a garbage collection operation; The disabling of the file compression operation of the file pulling tool includes: Generate a fourth configuration file for the file pulling tool; the fourth configuration file includes a first code and a second code, the first code is used to modify the triggering condition of the file merging operation, and the second code is used to prohibit the file pulling tool from performing a garbage collection operation; Add the fourth configuration file to the root directory of the file pulling tool.

9. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the application configuration method according to any one of claims 1 to 8.

10. A computer program product, characterized in that The computer program product includes a non-transitory computer-readable storage medium storing a computer program, wherein the computer program is operable to cause a computer to execute part or all of the steps in the application configuration method according to any one of claims 1 to 8.