An application configuration method, device, electronic device and readable storage medium
By introducing a refresh interface of the proxy service module in the system, the client can uniformly manage the application configuration updates of multiple isolated systems, solving the problem of low application configuration efficiency in the prior art and achieving efficient application configuration management.
Patent Information
- Application Number
- CN202210278079.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-21
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2042-03-21
AI Technical Summary
In the prior art, systems isolated from each other are inefficient in application configuration, and operation and maintenance personnel need to manually pull the application configuration information of each system, resulting in low efficiency.
By setting up a refresh interface of the proxy service module in the system, the client can uniformly initiate update requests to multiple isolation systems, parse update requests to obtain the application's configuration identification information, and obtain the required application configuration information based on this information for configuration reloading.
It improves the efficiency of application configuration, solves the problem of low efficiency when isolating the system configuration from each other, and realizes unified management of applications of different system systems and efficient configuration updates.
Smart Images

Figure CN114647435B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information processing technologies, and in particular, to an application configuration method, apparatus, electronic device, and readable storage medium. Background Art
[0002] With the continuous development of application programs, it may be necessary to update the configuration of the application programs according to actual operation requirements. For example, open the usage permission of a certain application function in the application program, or perform business updates on a certain function, etc.
[0003] Currently, the configuration process of application programs can be executed by a system (virtual machine or container). Since the systems are isolated from each other, that is, each system has its own configuration mechanism, it is usually necessary for operation and maintenance personnel to manually pull the application configuration information required by the application programs of each system respectively. Therefore, the application configuration efficiency is not high. Summary of the Invention
[0004] The purpose of the embodiments of the present invention is to provide an application configuration method, apparatus, electronic device, and readable storage medium, which can improve the application configuration efficiency. The specific technical solutions are as follows:
[0005] In the first aspect of the present invention, first, an application configuration method is provided, which is applied to a system running a proxy service module, including:
[0006] Receiving an update request initiated by a client through a refresh interface of the proxy service module. The update request is used to apply for reloading the configuration of the application program in the system. The client is connected to multiple isolated systems; the system includes a proxy service module;
[0007] Parsing the update request to determine the configuration identification information corresponding to the application program;
[0008] Obtaining the application configuration information required for updating the application program according to the configuration identification information. The application configuration information is used to perform reloading processing on the application program.
[0009] In the second aspect of the present invention, an application configuration apparatus is further provided, which is applied to a system running a proxy service module, including:
[0010] A receiving module, configured to receive an update request initiated by a client through a refresh interface of the proxy service module. The update request is used to apply for reloading the configuration of the application program in the system. The client is connected to multiple isolated systems; the system includes a proxy service module;
[0011] A parsing module, configured to parse the update request to determine the configuration identification information corresponding to the application program;
[0012] An acquisition module, configured to acquire application configuration information required for updating an application according to configuration identification information, where the application configuration information is used to perform configuration reloading processing on the application.
[0013] In another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium storing instructions, which when running on a computer, cause the computer to execute any one of the above data forwarding methods.
[0014] In another aspect of the embodiments of the present invention, there is also provided a computer program product containing instructions, which when running on a computer, cause the computer to execute any one of the above application configuration methods.
[0015] The application configuration method provided by the embodiments of the present invention receives, through the refresh interface of the proxy service module, an update request initiated by a client for applying to perform configuration reloading on an application in the system. Here, by setting the refresh interface, the system can facilitate the client to call to initiate an update request. Since the client is connected to multiple mutually isolated systems, that is, the client can communicate with multiple mutually isolated systems, it can uniformly initiate update requests for applications in different systems, solving the problem of low efficiency in current application configuration for mutually isolated systems. Then, by parsing the update request, the configuration identification information corresponding to the application can be determined, and thus the application configuration information required for the application can be quickly and accurately acquired according to the configuration identification information for performing configuration reloading processing on the application. Thereby, the application configuration efficiency can be improved. Description of the Drawings
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art.
[0017] Figure 1 is a schematic structural diagram of a system provided by an embodiment of the present application;
[0018] Figure 2 is a flowchart of an application configuration method provided by an embodiment of the present application;
[0019] Figure 3 is a flowchart of a method for implementing application configuration provided by an embodiment of the present application;
[0020] Figure 4 is a schematic structural diagram of an application configuration device provided by an embodiment of the present application;
[0021] Figure 5 is a schematic hardware structure diagram of an electronic device provided by an embodiment of the present application. Detailed Embodiments
[0022] The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0023] The following briefly introduces the technical terms involved in the embodiments of the present application.
[0024] The configuration center separates configurations from each application and forms an independent entity to uniformly manage all configurations separately. The configuration center is a component in the entire microservices architecture system. The configuration center is a basic service component for uniformly managing various application configurations.
[0025] Application configurations can include the composition of nodes in an application, the configurations of nodes, the startup sequence, and various pre-declared information associated with the application, such as associated data models, service models, required interface permissions, etc. Configurations accompany the entire life cycle of the application. Using configurations in an application mainly aims to improve the flexibility, scalability, and maintainability of the application. Common configuration parameters can include: environment variables, startup parameters, etc.
[0026] Among them, the systems involved in the embodiments of the present application may include: virtual machines and containers.
[0027] A virtual machine (Virtual Machine, VM) refers to a complete computer system with the functions of a complete hardware system simulated by software and running in a completely isolated environment. What can be accomplished on a physical computer can all be achieved in a virtual machine. When creating a virtual machine in a computer, part of the hard disk and memory capacity of the physical machine need to be used as the hard disk and memory capacity of the virtual machine.
[0028] A container is a data structure that can be used to store various types of data, such as variables and objects of basic types. Container technology can effectively divide the resources of a single operating system into isolated groups to better balance conflicting resource usage requirements between isolated groups. A container is a lightweight, operating system-level virtualization technology that allows applications and their dependencies to run during the process of resource isolation.
[0029] The application configuration method provided by the embodiments of the present application can be applied to at least the following application scenarios, which will be described below.
[0030] With the development of digital transformation, higher and higher requirements are put forward for the configuration of applications. Initially, configuration information was hard-coded in the code and placed in the source code repository together with the code. However, with the arrival of the microservices stage, especially containerized applications, the number of service nodes has increased exponentially, and the configuration center has emerged as the times require.
[0031] Currently, the configuration and update of application programs mainly rely on the configuration content stored in the configuration center. However, firstly, when a new application program is deployed, it is necessary for the operation and maintenance personnel to manually pull the required configuration list, which is prone to omission and low efficiency. Moreover, the configuration reload mechanisms of different application programs are different and cannot be uniformly managed. Therefore, there is a problem of low configuration efficiency in the current application configuration.
[0032] Based on the above application scenario, first, in combination with Figure 1 describe the structure of the system 100 involved in the embodiments of the present application, as Figure 1 shown, the system 100 runs a proxy service module 110 and an application program 120. Among them, the proxy service module includes a refresh interface 111. Next, in combination with Figure 2 detail the application configuration method provided by the embodiments of the present application.
[0033] Figure 2 is a flowchart of an application configuration method provided by an embodiment of the present application;
[0034] As Figure 2 shown, this method is applied to a system that runs a proxy service module. This method may include step 210 - step 230, specifically as follows:
[0035] Step 210, receive an update request initiated by a client through the refresh interface of the proxy service module. The update request is used to apply for a configuration reload of the application program in the system. The client is connected to multiple mutually isolated systems; the system includes a proxy service module.
[0036] Step 220, parse the update request to determine the configuration identification information corresponding to the application program.
[0037] Step 230, obtain the application configuration information required for the update of the application program according to the configuration identification information. The application configuration information is used to perform a configuration reload process on the application program.
[0038] In the embodiments of the present application, receive, through the refresh interface of the proxy service module, an update request initiated by the client for applying for a configuration reload of the application program in the system. Here, by setting the refresh interface in the system, it is convenient for the client to call to initiate an update request. Since the client is connected to multiple mutually isolated systems, that is, the client can communicate with multiple mutually isolated systems, it can uniformly initiate update requests for application programs in different systems, solving the problem of low efficiency in current application configuration for mutually isolated systems. Then, by parsing the update request, the configuration identification information corresponding to the application program can be determined, so that the application configuration information required by the application program can be quickly and accurately obtained according to the configuration identification information for performing a configuration reload process on the application program. Thus, the application configuration efficiency can be improved.
[0039] The specific implementation methods of the above steps are introduced below.
[0040] It involves step 210.
[0041] The system involved in the embodiments of the present application may include: virtual machines and containers.
[0042] Since a virtual machine is a complete computer system with the functions of a complete hardware system simulated by software and running in a completely isolated environment. The essence of a container is a process, and the isolation between processes creates the characteristic that containers do not affect each other. Thus, multiple virtual machines are isolated from each other, and containers are also isolated from each other.
[0043] Receive an update request initiated by the client through the refresh interface for applying to perform configuration reloading on the application program in the system. Since the client is connected to multiple isolated systems, that is, the client can initiate update requests to multiple systems simultaneously.
[0044] Since the client is connected to multiple isolated systems, it means that the client can communicate with multiple isolated systems. The client can initiate update requests to multiple systems through the refresh interface, that is, the interface call functions of the refresh interface are the same. In each update request received by the system, there are respective interface call parameters.
[0045] Thus, the client can initiate an update request to the application programs in multiple systems through the refresh interface of the proxy service module, which is convenient for the unified management of application programs in different systems.
[0046] In a possible embodiment, before step 210, the following steps may further be included:
[0047] Receive a start request, where the start request is used to apply for start configuration of the application program in the system;
[0048] Parse the start request to determine the application identification information corresponding to the application program;
[0049] Obtain the proxy configuration information required for starting the application program according to the application identification information, and the application configuration information is used to perform start configuration processing on the application program.
[0050] The proxy configuration information is used to store some information of related software, such as initialization information, initial path, and account, etc., which is convenient for program transplantation. The proxy configuration information involved in the present application may include: the storage address of the proxy configuration information, the system command script for completing the reloading process, and the configuration group. Each configuration group may include at least one configuration file.
[0051] Here, the proxy configuration information is obtained from the configuration center; according to the proxy configuration information, at least one application is deployed. This can automatically load the required configuration at startup, ensuring that the configuration information required by the application is not missed. It effectively solves the problem that when deploying a new application, it is necessary to manually pull the required configuration information, which is easy to miss and inconvenient.
[0052] Before receiving the update request initiated by the client, it is necessary to start the proxy configuration module. When the proxy configuration module starts, it requires proxy configuration information, which defines some information required for pulling application configurations, such as: configuration group information, environment, application name, and system command script (shell script).
[0053] Exemplarily, the proxy configuration information corresponding to the user service may specifically include:
[0054] Name: relation; Configuration group: user relationship; Environment information: product; Shell script: script 1.
[0055] The above-mentioned content involves that the application includes a single service. If the application includes multiple services, such as running a user service and a recommendation service, the proxy configuration information of the recommendation service may also be included in the configuration directory of the proxy configuration information.
[0056] Exemplarily, the proxy configuration information corresponding to the recommendation service may specifically include:
[0057] Name: recommend; Configuration group: user recommendation; Environment information: product; Shell script: script 2.
[0058] Among them, script 1 and script 2 mentioned above respectively correspond to different script storage paths.
[0059] Here, based on the configuration file of the above-mentioned user service and the proxy configuration information of the recommendation service, after the application starts, the application configuration information of the above two configuration groups can be pulled to be used for the startup of the user service and the recommendation service, and a refresh interface is provided for the external client to call the refresh interface.
[0060] Thus, by obtaining the proxy configuration information required for the startup of the application according to the application identification information, the proxy configuration module can be started based on the proxy configuration information to implement the startup configuration processing of the application. It is convenient to subsequently receive and process the update request initiated by the client.
[0061] Involves step 220.
[0062] By parsing the update request, the configuration identification information corresponding to the application can be determined, which facilitates subsequent quick and accurate acquisition of the application configuration information corresponding to the application according to the configuration identification information.
[0063] In a possible embodiment, there are multiple applications. Parsing the update request to determine the configuration identification information corresponding to the applications includes:
[0064] Parsing the update request to determine the application identification information of each application and the configuration identification information corresponding to each application;
[0065] Obtaining the application configuration information required for application update according to the configuration identification information includes:
[0066] Respectively obtaining the application configuration information corresponding to each application according to the configuration identification information and the application identification information.
[0067] Among them, a virtual machine can include multiple applications, and a container can include one application.
[0068] Regarding the virtual machine, that is, a system can include multiple applications. To perform configuration updates on different applications, it is necessary to determine the application identification information of each application in the system. Then, according to the configuration identification information corresponding to each application identification information, respectively obtain the application configuration information corresponding to each application. Thus, the application configuration information corresponding to each application can be obtained clearly and accurately.
[0069] Regarding the container, that is, a system can include one application, and determine the configuration identification information corresponding to the application. Thus, the application configuration information corresponding to the application can be quickly and accurately obtained according to the configuration identification information of the application.
[0070] Regarding step 230.
[0071] According to the configuration identification information, obtain the application configuration information required for application update from the configuration center for performing configuration reloading processing on the application.
[0072] In a possible embodiment, step 230 includes:
[0073] Determine at least one configuration grouping information corresponding to the application; each configuration grouping information includes the configuration identification information of at least one application configuration information;
[0074] According to the configuration grouping information, obtain the application configuration information from the configuration center.
[0075] An application can provide different application services for users. To improve the configuration efficiency, application configuration information can be obtained by configuration group. Among them, the application configuration information required for application program update is obtained according to the configuration identification information. Specifically, the following steps can be included:
[0076] Determine at least one configuration group information corresponding to the application program; each configuration group information includes the configuration identification information of at least one application configuration information;
[0077] Obtain the application configuration information from the configuration center according to the configuration group information.
[0078] Among them, the configuration group information can be distinguished by service type and can include: user service, recommendation service.
[0079] Specifically, for application program A, the corresponding configuration group information can include: configuration group a and configuration group b. Each configuration group information includes at least one configuration identification information. Finally, the application configuration information in configuration group a and configuration group b is determined as the application configuration information corresponding to application program A. Thus, it can be ensured that the required application configuration information can be quickly and accurately obtained from the configuration center.
[0080] Exemplarily, the business services in the application program include: user service, and its corresponding configuration group information can be "relation". Its corresponding configuration group information can be "relation". Each configuration group information includes at least one configuration identification information. For example, "relation" can include: user configuration identification information and operation configuration identification information; "relation" can include: video configuration identification information and user configuration identification information. Each configuration identification information corresponds to the application configuration information. Therefore, the application configuration information corresponding to the configuration identification information can be efficiently and accurately obtained according to the configuration group information.
[0081] Each configuration group information includes the configuration identification information of at least one application configuration information. Thus, by determining at least one configuration group information corresponding to the application program, the application configuration information can be obtained batchwise and efficiently according to the configuration group information, and the acquisition efficiency of the application configuration information can be improved.
[0082] In a possible embodiment, after step 230, the following steps can also be included:
[0083] Store the application configuration information at a preset configuration address for the application program to read the application configuration information from the preset configuration address and complete the configuration reload process according to the application configuration information.
[0084] By storing the application configuration information at a preset configuration address, the application can read the application configuration information from the preset configuration address by itself and perform configuration reload processing according to the application configuration information. In the above way, the application can read the application configuration information from the preset configuration address by itself to implement configuration reload processing, thus avoiding intrusion into the business and ensuring the smooth progress of the configuration update of the application.
[0085] Among them, in the step of storing the application configuration information at the preset configuration address mentioned above, it may specifically include the following steps:
[0086] Store the application configuration information in a temporary storage space;
[0087] Copy the application configuration information from the temporary storage space to the preset configuration address, and the copy is an atomic operation.
[0088] Among them, an atomic operation refers to an operation that cannot be interrupted by the thread scheduling mechanism. Once this operation starts, it runs until the end without any thread switching in the middle. That is, an atomic operation is indivisible and will not be interrupted by any other task or event before it is executed.
[0089] Here, by storing the application configuration information in the temporary storage space and then copying the application configuration information from the temporary storage space to the preset configuration address, it can be ensured that the process of saving the application configuration information to the preset configuration address is not interrupted, will not affect the normal operation of the system, and ensure the copy efficiency.
[0090] In a possible embodiment, after step 230, the following steps may further be included:
[0091] Execute a pre-stored system command script, and the system command script is used to complete configuration reload processing according to the application configuration information.
[0092] Among them, the system command script (Shell) is a programming language. As a command language, it interactively interprets and executes the commands input by the user or automatically interprets and executes a series of pre-set commands; as a programming language, it defines various variables and parameters and provides many control structures that are only available in high-level languages, including loops and branches.
[0093] The role of the shell is to interpret the commands input to the electronic device and then let the electronic device do what is expected of it. Through a customized shell, the configuration reload process can be automatically completed. Since the shell can complete the preset configuration tasks without manual configuration, in the face of a large number of application configuration requirements with different needs, the customized shell can support complex configuration reload management. In addition, it is also possible to determine whether to execute the customized shell script for the configuration information corresponding to each application program according to the configuration items in the proxy configuration information.
[0094] Here, a system command script stored in advance is provided for automatic execution, and the configuration reload process is implemented by the system command script. This can solve the problem of unified management failure caused by different configuration reload mechanisms for different application programs. Through the system command script, complex configuration reload management and configuration reload processing can be supported, improving the application configuration efficiency.
[0095] In a possible embodiment, after the step of executing the system command script stored in advance involved above, the following steps may further be included:
[0096] Generate a log corresponding to the execution of the system command script; the log includes log identification information; locate the abnormal log lines in the log according to the log identification information; output a prompt message corresponding to the abnormal log lines.
[0097] During the process of calling the refresh interface, the progress of the execution of the system command script can be clearly grasped according to the progress of the log output. Specifically, when the system command script starts to execute, the log lines output may include the "start" identifier; when the system command script ends, the log lines output may include the "end" identifier; during the execution of the system command script, the identifiers included in the log lines output can also reflect the current execution progress. This can ensure that the execution process of the system command script is transparent and controllable.
[0098] Here, during the execution of the system command script, by continuously outputting the log corresponding to the execution of the system command script, the abnormal log lines can be located according to the log identification information, and thus the abnormalities occurring during the reload process can be assisted in locating.
[0099] Among them, the proxy service module involved in this application can support the Application Programming Interface (API) function based on the gin framework of golang. On this basis, the gin framework can also be combined with the gorilla and websocket frameworks.
[0100] Among them, the WebSocket protocol realizes full-duplex communication between the browser and the server, that is, it allows the server to actively send information to the client. Among them, the combination of the gin framework and the Websocket framework can support long connections between the client and the proxy service module, realize the continuous and stable output of logs, and then ensure that the client continuously and stably receives the logs.
[0101] In a possible embodiment, the update request includes verification information. In step 230, it may specifically include the following steps: verifying the verification information in the update request, and when the verification information meets the preset verification conditions, obtaining the application configuration information required for updating the application according to the configuration identification information.
[0102] Among them, it can be specifically determined whether the verification information meets the preset verification conditions by checking whether the verification information is consistent with the preset hash value. When the verification parameter is consistent with the preset hash value, it is determined that the verification information meets the preset verification conditions. Among them, the preset hash value is a parameter calculated by a hash algorithm and can be used to verify the authenticity and security of the verification information.
[0103] Here, by obtaining the application configuration information required for updating the application according to the configuration identification information when the verification information meets the preset verification conditions, it is possible to perform a security check on the call of the refresh interface, ensure that the refresh interface is called safely and effectively, and ensure the security of the system.
[0104] In summary, the application configuration method provided by the embodiments of the present application receives, through the refresh interface of the proxy service module, an update request initiated by the client for applying to perform configuration reloading on the application program in the system. Here, by setting the refresh interface, the system can facilitate the client to call to initiate an update request. Since the client is connected to multiple mutually isolated systems, that is, the client can communicate with multiple mutually isolated systems, it can uniformly initiate update requests for application programs in different systems, solving the problem of low efficiency in current application configuration for mutually isolated systems. Then, by parsing the update request, the configuration identification information corresponding to the application program can be determined, and thus the application configuration information required by the application program can be quickly and accurately obtained for performing configuration reloading processing on the application program. Thereby, the application configuration efficiency can be improved.
[0105] Based on the above Figure 2 shown application configuration method, the embodiments of the present application also provide a method for implementing application configuration, as Figure 3 shown, which may specifically include the following steps:
[0106] First, in response to a client's call request for the refresh interface, the refresh interface pulls the configuration from the call center to obtain application configuration information. Then, the obtained application configuration information is stored in the configuration directory (i.e., the preset configuration address) for the application program to perform configuration reloading based on the application configuration information under the configuration directory, and a system command script is automatically executed to achieve configuration reloading.
[0107] In addition, when the daemon starts running, it can pull the configuration from the configuration center to obtain application configuration information. Then, the obtained application configuration information is stored in the configuration directory (i.e., the preset configuration address). Among them, the Linux system can provide many system or network functions. Running some programs is required to provide these functions, and these running programs can be called processes. That is to say, the processes running in the system provide functions, and these processes are services. For example, the process that provides the http function is the http service. These programs can be called daemons, and a certain service will be provided after the daemon runs.
[0108] In summary, for the application configuration method provided in the embodiments of the present application, the update request initiated by the client for applying to perform configuration reloading on the application programs in the system is received through the refresh interface of the proxy service module. Here, by setting the refresh interface in the system, it is convenient for the client to call to initiate an update request. Since the client is connected to multiple mutually isolated systems, that is, the client can communicate with multiple mutually isolated systems, and can uniformly initiate update requests for the application programs in different systems, which solves the problem of low efficiency in current application configuration for mutually isolated systems. Then, by parsing the update request, the configuration identification information corresponding to the application program can be determined, so that the application configuration information required by the application program can be quickly and accurately obtained according to the configuration identification information for performing configuration reloading processing on the application program. Thus, the application configuration efficiency can be improved.
[0109] Based on the above Figure 2 shown application configuration method, the embodiments of the present application further provide an application configuration device, which is applied to a system that runs a proxy service module, as Figure 4 shown. The application configuration device 400 may include:
[0110] A receiving module 410, configured to receive an update request initiated by a client through the refresh interface of the proxy service module. The update request is used to apply for configuration reloading of application programs in the system. The client is connected to multiple mutually isolated systems; the system includes a proxy service module.
[0111] A parsing module 420, configured to parse the update request to determine the configuration identification information corresponding to the application program.
[0112] An acquisition module 430, configured to acquire application configuration information required for updating an application according to configuration identification information, where the application configuration information is used to perform configuration reloading processing on the application.
[0113] In a possible embodiment, the parsing module 420 is specifically configured to:
[0114] Parse the update request to determine the application identification information of each application and the configuration identification information corresponding to each application;
[0115] The acquisition module 430 is specifically configured to:
[0116] Respectively acquire the application configuration information corresponding to each application according to the configuration identification information and the application identification information.
[0117] In a possible embodiment, the acquisition module 430 is specifically configured to:
[0118] Determine at least one configuration grouping information corresponding to the application; each configuration grouping information includes the configuration identification information of at least one application configuration information;
[0119] Acquire the application configuration information from the configuration center according to the configuration grouping information.
[0120] In a possible embodiment, the application configuration device 400 may further include:
[0121] A storage module 430, configured to store the application configuration information at a preset configuration address for the application to read the application configuration information from the preset configuration address and perform configuration reloading processing according to the application configuration information.
[0122] In a possible embodiment, the application configuration device 400 may further include:
[0123] An execution module, configured to execute a pre-stored system command script, where the system command script is used to perform configuration reloading processing according to the application configuration information.
[0124] In a possible embodiment, the storage module 430 is specifically configured to:
[0125] Store the application configuration information in a temporary storage space;
[0126] Copy the application configuration information from the temporary storage space to the preset configuration address, and the copy is an atomic operation.
[0127] In a possible embodiment, the application configuration device 400 may further include:
[0128] A start-up configuration module, specifically configured to:
[0129] Receive a startup request, where the startup request is used to apply for startup configuration of an application in the system;
[0130] Parse the startup request to determine the application identification information corresponding to the application;
[0131] Obtain the proxy configuration information required for starting the application according to the application identification information, where the application configuration information is used to perform startup configuration processing on the application.
[0132] In summary, in the embodiment of the present application, an update request initiated by the client for applying for configuration reloading of an application in the system is received through the refresh interface of the proxy service module. Here, by setting the refresh interface, the system can facilitate the client to call to initiate the update request. Since the client is connected to multiple mutually isolated systems, that is, the client can communicate with multiple mutually isolated systems, and can uniformly initiate update requests for applications in different systems, which solves the problem of low efficiency in current application configuration for mutually isolated systems. Then, by parsing the update request, the configuration identification information corresponding to the application can be determined, and thus the application configuration information required by the application can be quickly and accurately obtained according to the configuration identification information for performing configuration reloading processing on the application. Thereby, the application configuration efficiency can be improved.
[0133] An embodiment of the present invention also provides an electronic device, as Figure 5 shown, including a processor 501, a communication interface 502, a memory 503, and a communication bus 504. Among them, the processor 501, the communication interface 502, and the memory 503 complete mutual communication through the communication bus 504,
[0134] The memory 503 is used to store a computer program;
[0135] When the processor 501 is used to execute the program stored on the memory 503, the following steps are implemented:
[0136] Receive an update request initiated by the client through the refresh interface of the proxy service module, where the update request is used to apply for configuration reloading of an application in the system, and the client is connected to multiple mutually isolated systems; the system includes a proxy service module;
[0137] Parse the update request to determine the configuration identification information corresponding to the application;
[0138] Obtain the application configuration information required for updating the application according to the configuration identification information, where the application configuration information is used to perform configuration reloading processing on the application.
[0139] The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation, only a thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0140] The communication interface is used for communication between the above terminal and other devices.
[0141] The memory may include a Random Access Memory (RAM), or may also include a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located far from the aforementioned processor.
[0142] The above-mentioned processor may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may 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, discrete hardware components.
[0143] In another embodiment provided by the present invention, there is also provided a computer-readable storage medium, in which instructions are stored. When it runs on a computer, it causes the computer to execute the application configuration method described in any one of the above embodiments.
[0144] In another embodiment provided by the present invention, there is also provided a computer program product containing instructions. When it runs on a computer, it causes the computer to execute the application configuration method described in any one of the above embodiments.
[0145] 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 processes or functions described in the embodiments of the present invention are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)).
[0146] It should be noted that, in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including", or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or device. Without further limitation, an element defined by the statement "comprising a..." does not exclude the existence of additional identical elements in the process, method, article, or device comprising the element.
[0147] Each embodiment in this specification is described in a related manner. The same or similar parts among the embodiments can be referred to each other, and the differences between each embodiment and other embodiments are emphasized. In particular, for system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiments.
[0148] The above are only the preferred embodiments of the present invention and are not intended to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention are all included within the protection scope of the present invention.
Claims
1. An application configuration method, characterized in that, The method includes: Receiving an update request initiated by an external client through a refresh interface of a proxy service module, where the update request is used to apply for reloading the configuration of an application in the system, and the client is connected to multiple isolated systems; the system includes a proxy service module; the refresh interface is an application programming interface; Parsing the update request to determine the configuration identification information corresponding to the application; Obtaining the application configuration information required for updating the application according to the configuration identification information, where the application configuration information is used to perform reloading processing on the configuration of the application; Before receiving the update request initiated by the external client, the method further includes: Receiving a start request, where the start request is used to apply for starting the configuration of an application in the system; Parsing the start request to determine the application identification information corresponding to the application; Obtaining the proxy configuration information required for starting the application according to the application identification information, where the application configuration information is used to perform starting configuration processing on the application; The proxy configuration information includes: the storage address of the proxy configuration information, a pre-stored system command script, and a configuration group.
2. The method according to claim 1, wherein There are multiple applications, and parsing the update request to determine the configuration identification information corresponding to the application includes: Parsing the update request to determine the application identification information of each application and the configuration identification information corresponding to each application; The obtaining the application configuration information required for updating the application according to the configuration identification information includes: Respectively obtaining the application configuration information corresponding to each application according to the configuration identification information and the application identification information.
3. The method according to claim 1, wherein The obtaining the application configuration information required for updating the application according to the configuration identification information includes: Determining at least one configuration group information corresponding to the application; each configuration group information includes the configuration identification information of at least one application configuration information; Obtaining the application configuration information from a configuration center according to the configuration group information.
4. The method according to claim 1, characterized in that, After obtaining the application configuration information required for updating the application according to the configuration identification information, the method further includes: Storing the application configuration information at a preset configuration address for the application to read the application configuration information from the preset configuration address and complete the reloading processing according to the application configuration information.
5. The method according to claim 1, wherein After obtaining the application configuration information required for updating the application according to the configuration identification information, the method further includes: Executing the pre-stored system command script, where the system command script is used to complete the reloading processing according to the application configuration information.
6. The method according to claim 4, characterized in that The storing the application configuration information at a preset configuration address includes: Storing the application configuration information in a temporary storage space; Copying the application configuration information from the temporary storage space to the preset configuration address, and the copy is an atomic operation.
7. An application configuration device, characterized in that, The device includes: A receiving module, configured to receive an update request initiated by an external client through a refresh interface of a proxy service module, where the update request is used to apply for a configuration reload of an application program in the system, and the client is connected to multiple isolated systems; the system includes a proxy service module; the refresh interface is an application program interface; A parsing module, configured to parse the update request to determine configuration identification information corresponding to the application program; An obtaining module, configured to obtain application configuration information required for updating the application program according to the configuration identification information, where the application configuration information is used to perform a configuration reload process on the application program; The apparatus is further configured to receive a start request before receiving the update request initiated by the external client, where the start request is used to apply for a start configuration of an application program in the system; Parse the start request to determine application identification information corresponding to the application program; Obtain proxy configuration information required for starting the application program according to the application identification information, where the application configuration information is used to perform a start configuration process on the application program; The proxy configuration information includes: a storage address of the proxy configuration information, a pre-stored system command script, and a configuration group.
8. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete mutual communication through the communication bus; The memory is used to store a computer program; The processor is configured to implement the method steps described in any one of claims 1-6 when executing the program stored on the memory.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method described in any one of claims 1-6.
Citation Information
Patent Citations
Method and system for reloading Web configuration file
CN106775860A