Process configuration method, device and system
By setting the coverage priority of the data configuration layer in the distributed system and generating a process configuration set, the problem of poor flexibility in process startup data configuration in the existing technology is solved, and an efficient and accurate configuration process is achieved.
Patent Information
- Application Number
- CN202011542402.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-23
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2040-12-23
AI Technical Summary
The existing process startup data configuration in distributed systems has poor flexibility and complicated operation steps, which can easily cause configuration confusion and errors, leading to inaccurate configuration.
By acquiring multiple data configuration layers, merging operations based on user-input configurations, setting coverage priorities, and generating process configuration sets, user terminals can flexibly start target applications, avoid repeated configurations, and simplify operating steps.
It improves the flexibility and accuracy of configuration, reduces repeated configuration, simplifies operation steps, enhances configuration efficiency, and avoids configuration errors.
Smart Images

Figure CN112667312B
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a process configuration method, device and system. Background Art
[0002] In a distributed system, it is usually necessary to configure process startup data for servers in a cluster so that applications that need to be configured can obtain process startup data from the server to start the application when the program starts. The existing configuration of process startup data is to edit the corresponding configuration data according to the configuration needs of each application so that these configuration data can be injected when the application starts. However, in actual application, the configuration data required by each application may be partially different, and users need to repeatedly configure the process startup data of each application in the entire process, which has poor flexibility and complicated operation steps, which can easily cause confusion and errors in configuration, bringing inconvenience to configuration personnel. Summary of the invention
[0003] The purpose of the present application is to solve at least one of the technical problems existing in the prior art, and to provide a process configuration method, device and electronic device to improve the flexibility of data configuration, reduce repeated configuration, and improve configuration accuracy and efficiency.
[0004] The present application provides a process configuration method, including:
[0005] Acquire a first configuration group and a second configuration group, wherein the first configuration group includes a plurality of first data configuration layers, the first data configuration layers encapsulate first configuration data for starting the application, and the second configuration group includes a plurality of second data configuration layers, the second data configuration layers encapsulate second configuration data for starting the application;
[0006] In response to a configuration merging operation initiated by a user through a client, configuring the overlay priority of each of the first data configuration layers and each of the second data configuration layers;
[0007] According to the coverage priority of the first data configuration layer and each of the second data configuration layers, the first data configuration layer with high coverage priority is used to cover the second data configuration layer with low coverage priority corresponding to the first data configuration layer with high coverage priority, and a process configuration set is generated so that the user terminal starts the target application according to the process configuration set.
[0008] Further, obtaining a first configuration group includes:
[0009] In response to a data configuration operation initiated by a user through a client, acquiring each of the first data configuration layers, wherein each of the first data configuration layers has a different configuration priority;
[0010] According to the configuration priority ranking of each of the first data configuration layers, the first configuration data of the first data configuration layer with a high configuration priority overwrites the first configuration data of the first data configuration layer with a low configuration priority, so as to obtain the first configuration group.
[0011] Furthermore, the client is composed of a terminal cluster, and each of the first data configuration layers is configured by different sub-clusters of different groups in the terminal cluster through different first configuration data.
[0012] Furthermore, the levels of the first data configuration layers are different from each other, and the configuration entries of the first data configuration layers at different levels are different.
[0013] Further, enabling the user terminal to start the target application according to the process configuration set includes:
[0014] The version information of the application is generated according to the process configuration set, and the version information is written into the identity information of the target application, so that the user terminal obtains the process configuration set according to the identity information to start the target application.
[0015] Furthermore, the first configuration data includes address information of configuration parameters.
[0016] Further, the configuring the coverage priority of each of the first data configuration layers and each of the second data configuration layers includes:
[0017] configuring the coverage priority of each of the first data configuration layers and each of the second data configuration layers according to the startup process of the target application; or,
[0018] Configure the coverage priority of each of the first data configuration layers and each of the second data configuration layers according to the application function of the target application; or,
[0019] The coverage priority of each of the first data configuration layers and each of the second data configuration layers is configured according to the custom configuration parameters.
[0020] Furthermore, in an embodiment of the present application, a process configuration device is provided, including:
[0021] A data acquisition module, configured to acquire a first configuration group and a second configuration group, wherein the first configuration group includes a plurality of first data configuration layers, wherein the first data configuration layers encapsulate first configuration data for starting an application, and the second configuration group includes a plurality of second data configuration layers, wherein the second data configuration layers encapsulate second configuration data for starting an application;
[0022] A data configuration module, configured to configure the coverage priority of each of the first data configuration layers and each of the second data configuration layers in response to a configuration merging operation input by a user;
[0023] A data merging module is used to generate a process configuration set by overwriting the second data configuration layer with a low coverage priority corresponding to the first data configuration layer with a high coverage priority based on the coverage priorities of the first data configuration layer and each of the second data configuration layers, so that the user terminal starts the target application according to the process configuration set.
[0024] Furthermore, in an embodiment of the present application, a server is also provided, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the process configuration method as described in the above embodiment is implemented.
[0025] Furthermore, in an embodiment of the present application, a process configuration system is also provided, including a client and a server as described in the above embodiment, wherein the client is connected to the server.
[0026] Furthermore, in an embodiment of the present application, the process configuration device also includes a component generation module, which is used to obtain a component generation instruction, match the corresponding style source according to the component tag in the component generation instruction, and extract the corresponding style data from the server according to the style source to generate the content component.
[0027] Furthermore, an embodiment of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the process configuration method as described in the above embodiment is implemented.
[0028] Furthermore, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the process configuration method described in the above embodiment.
[0029] Compared with the prior art, the above-mentioned embodiment configures the overwriting priority of each first data configuration layer and each second data configuration layer obtained by responding to the merge operation initiated by the client, and overwrites the data layer with high coverage priority in the first data configuration layer to the data layer with low coverage priority in the second data configuration layer according to the overwriting priority, so that the corresponding data configuration can be obtained from other data configuration layers, there is no need to repeat the process of starting the data configuration of the whole process, thus avoiding confusion and errors in configuration, increasing flexibility and simplifying the operation steps.
[0030] The above-mentioned embodiment obtains the first configuration group by overwriting the first configuration data with a low configuration priority with the first configuration data with a high configuration priority according to the sorting of different configuration priorities between the first data configuration layers, so that the data with different priorities in the first data configuration layer are combined in an overwriting manner to obtain the first configuration group, which simplifies the operation steps of the first configuration group and eliminates the need to obtain multiple first configuration groups by repeating the entire process.
[0031] In the above embodiment, each first data configuration layer is configured by different sub-clusters in the terminal cluster through different first configuration data, so that different configuration data can have different permissions and the processing is more targeted. In addition, configuration by different sub-clusters can improve configuration efficiency.
[0032] The above embodiment sets different configuration entries for the first data configuration layers at different levels, so that the configuration methods of the configuration data at different levels are more targeted.
[0033] The above embodiment generates version information of the application through a process configuration set, writes the version information into the identity information of the application, and then starts the application by obtaining the process configuration set based on the identity information, so that there is no need to store the process configuration set in the user terminal, saving the storage space of the user terminal, and being able to obtain the corresponding version of the process configuration set, thereby improving the accuracy of the obtained process configuration set.
[0034] The above embodiment can dynamically obtain the configuration value by setting the address information of the configuration parameter in the first configuration data, thereby avoiding the influence of changes caused by the deployment environment or other conditions on the fixed configuration value.
[0035] In the above embodiments, the coverage priority in each first data configuration layer and each second data configuration layer can be configured according to the startup process or application function of the target application, and can also be configured according to custom configuration parameters. This allows the coverage priority of each first data configuration layer and each second data configuration layer to be configured according to a variety of situations and has a wider application. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The present application is further described below with reference to the accompanying drawings and embodiments;
[0037] Figure 1 An application environment diagram of a process configuration method in an embodiment;
[0038] Figure 2 A schematic diagram of a process configuration method in one embodiment;
[0039] Figure 3 A schematic diagram of the structure of a configuration file of a common configuration group in one embodiment;
[0040] Figure 4 A schematic diagram of the coverage between configuration groups in one embodiment;
[0041] Figure 5 It is a structural block diagram of a process configuration device in one embodiment;
[0042] Figure 6 A structural block diagram of a server in one embodiment;
[0043] Figure 7 is a structural block diagram of a computer device in one embodiment;
[0044] Figure 8 A schematic diagram of the structure of a process configuration system in one embodiment. DETAILED DESCRIPTION
[0045] This section will describe in detail the specific embodiments of the present application. The preferred embodiments of the present application are shown in the accompanying drawings. The purpose of the accompanying drawings is to supplement the description of the text part of the specification with graphics, so that people can intuitively and vividly understand each technical feature and the overall technical solution of the present application, but it cannot be understood as a limitation on the scope of protection of the present application.
[0046] In a distributed system, it is usually necessary to configure process startup data for servers in a cluster so that applications that need to be configured can obtain process startup data from the server to start the application when the program starts. The existing configuration of process startup data is to edit the corresponding configuration data according to the configuration needs of each application so that these configuration data can be injected when the application starts. However, in actual application, the configuration data required by each application may be partially different, and users need to repeatedly configure the process startup data of each application in the entire process, which has poor flexibility and complicated operation steps, which can easily cause confusion and errors in configuration, bringing inconvenience to configuration personnel.
[0047] In order to solve the above technical problems, Figure 1 FIG. 1 is an application environment diagram of a process configuration method in an embodiment. Figure 1 The process configuration system includes a user terminal 110 and a server 120. The user terminal 110 and the server 120 are connected via a network. The user terminal 110 may be a desktop user terminal or a mobile user terminal. The mobile user terminal 110 may be at least one of a mobile phone, a tablet computer, a laptop computer, etc. The user terminal 110 may be implemented as an independent user terminal or a user terminal cluster composed of multiple user terminals. The server 120 may be implemented as an independent server or a server cluster composed of multiple servers.
[0048] Below, the process configuration method provided in the embodiment of the present application will be introduced and explained in detail through several specific embodiments.
[0049] like Figure 2 As shown, in one embodiment, a process configuration method is provided. This embodiment mainly uses the method applied to a computer device as an example. The computer device may be the above-mentioned Figure 1 The server 120 in.
[0050] Reference Figure 2 , the process configuration method specifically includes the following steps:
[0051] S11. Obtain a first configuration group and a second configuration group, wherein the first configuration group includes multiple first data configuration layers, the first data configuration layers encapsulate first configuration data for starting an application, and the second configuration group includes multiple second data configuration layers, the second data configuration layers encapsulate second configuration data for starting an application.
[0052] In this embodiment, the first configuration group refers to a code set for starting an application. The second configuration group refers to a code set for starting an application different from the first configuration group. The first data configuration layer refers to a parameter set formed by a combination of first configuration data for starting an application. The second data configuration layer refers to a parameter set formed by a combination of second configuration data for starting an application different from the first configuration data. The first configuration data refers to a set of partial parameters for starting an application. The second configuration data refers to a set of partial parameters for starting a different application.
[0053] For example, for the two applications "Cloud City Song" and "Douluo Continent" on the Sanqi Interactive Entertainment platform, starting the application "Cloud City Song" requires configuration file A, and starting the application "Douluo Continent" requires configuration file B, where configuration file A is the first configuration group, and configuration file B is the second configuration group. Configuration files A and B both contain all the codes required to start the applications "Cloud City Song" and "Douluo Continent" respectively. For example, starting the application "Cloud City Song" requires the recharge function, account input function, and push receiving function, while starting the application "Douluo Continent" requires the recharge function, account input function, and region identification function. Therefore, configuration file A can be divided into multiple configuration modules according to the different functions implemented by the code, namely, configuration module 1 for implementing the recharge function, configuration module 2 for implementing the account input function, and configuration module 3 for implementing the push receiving function. Configuration file B can also be divided into multiple configuration modules according to the different functions implemented by the code, namely, configuration module 4 for implementing the recharge function module, configuration module 5 for implementing the account input function, and configuration module 6 for implementing the region identification function. Among them, configuration module 1, configuration module 2 and configuration module 3 are the first data configuration layer, and configuration module 1, configuration module 2 and configuration module 3 respectively contain the codes for realizing the recharge function, account input function and push receiving function in "Song of Cloud City". Configuration module 4, configuration module 5 and configuration module 6 are the second data configuration layer, and configuration module 4, configuration module 5 and configuration module 6 respectively contain the codes for realizing the recharge function, account input function and regional identification function in "Douluo Continent". Among them, the codes and related parameters in configuration modules 1, 2 and 3 are the first configuration data, and the codes and related parameters in configuration modules 4, 5 and 6 are the second configuration data. Configuration module 1 and configuration module 4 are both code sets for realizing the recharge function, but because the corresponding applications are different, the parameters in the configuration module codes will be different. For example, if the code of configuration module 1 contains the parameter abcde, then the code of configuration module 4 contains the parameter a'bcde. Similarly, configuration module 2 and configuration module 5 are both code sets that implement the account input function. However, since the corresponding applications are different, the configuration module codes are the same but the related parameters may be different. For example, if the code of configuration module 2 contains the parameter abdef, then the code of configuration module 5 contains the parameter abde'f.
[0054] In one embodiment, obtaining a first configuration group includes:
[0055] In response to a data configuration operation initiated by a user through a client, obtaining each first data configuration layer, wherein each first data configuration layer has a different configuration priority;
[0056] According to the configuration priority ranking of each first data configuration layer, the first configuration data of the first data configuration layer with a high configuration priority overwrites the first configuration data of the first data configuration layer with a low configuration priority, so as to obtain a first configuration group.
[0057] In this embodiment, the server obtains each first data configuration layer by responding to the data configuration operation initiated by the user through the client. The data configuration operation refers to the information that the user selects the first data configuration layer and sets the configuration priority of each first data configuration layer according to the first configuration group parameters required by the program to be started. For example, the user needs to start the application "Song of Cloud City". At this time, the complete parameters of the first configuration group required to start "Song of Cloud City" are abcdefghijkl, and it is required to have a recharge function, an account input function and a push receiving function. Among them, the parameters of the data configuration layer corresponding to the recharge function, the account input function, the push receiving function and the regional identification function are abcdef, e'f'ghij, i'j'kl, ijklm, respectively, among which e and e', f and f', i and i', j and j' are the same type of parameters, that is, only one of them can exist in the configuration file. At this time, the user can initiate a data configuration operation through the client, select the data configuration layer corresponding to the recharge function, account input function, and push reception function as the first data configuration layer, set the configuration priority of the first data configuration layer corresponding to the recharge function to (3), set the configuration priority of the first data configuration layer corresponding to the account input function to (2), and set the configuration priority of the first data configuration layer corresponding to the region identification function to (1), where the larger the number of the configuration priority, the higher the configuration priority. Therefore, the server obtains the first configuration group according to the first data configuration layers selected in the data configuration operation and the configuration priorities of the first data configuration layers. Specifically, according to the configuration priority sorting of each first data configuration layer, the first data configuration layers corresponding to the recharge function, the account input function, and the push reception function are obtained. The first configuration data of the first data configuration layer with high configuration priority is overwritten with the first configuration data of the first data configuration layer with low configuration priority to obtain the first configuration group, that is, the first configuration data e'f'ghij of the first data configuration layer with configuration priority (2) is overwritten with the first configuration data i'j'kl of the first data configuration layer with configuration priority (1) to obtain the combined first configuration data e'f'ghijkl, and then the first configuration data abcdef of the first data configuration layer with configuration priority (3) is overwritten with the first configuration data e'f'ghij of the first data configuration layer with configuration priority (2) to obtain the combined first configuration data abcdefghij, and the data of the first configuration group finally obtained is abcdefghijkl.
[0058] As an example of this embodiment, Figure 3The figure shows a schematic diagram of the structure of the configuration file of the public configuration group. The public configuration group contains the operation and maintenance mandatory overlay layer, the development and editing layer, and the configuration verification layer. The code and related parameters of the operation and maintenance mandatory overlay layer and the development and editing layer are shown in the figure. According to the needs of the public configuration layer, the user can set the configuration priority of the operation and maintenance mandatory overlay layer to (3), the configuration priority of the development and editing layer to (2), and the configuration priority of the configuration verification layer to (1). At this time, the server will overwrite and merge each layer from top to bottom according to the configuration priority to form a public configuration group. In the process of overwriting and merging the development and editing layer with the operation and maintenance mandatory overlay layer, some codes of the two configuration layers are as follows Figure 3 As shown, the operation and maintenance mandatory overlay layer and the development and editing layer have the same code port: 27017 and database: config. At this time, the host: $(instance-pisces-mongo) of the operation and maintenance mandatory overlay layer overwrites and merges the host: localhost of the development and editing layer.
[0059] In this embodiment, the method for obtaining the second configuration group is the same as the method for obtaining the first configuration group, and will not be described in detail herein.
[0060] In this embodiment, the first configuration group is obtained by overwriting the first configuration data with a low configuration priority with the first configuration data with a high configuration priority according to the sorting of different configuration priorities between the first data configuration layers, so that the data of different priorities in the first data configuration layer are combined in an overwriting manner to obtain the first configuration group, which simplifies the operation steps of the first configuration group and eliminates the need to repeat the entire process to obtain multiple first configuration groups.
[0061] In one embodiment, the first configuration data includes address information of the configuration parameters.
[0062] In this embodiment, the configuration parameters in the first configuration data may need to be changed due to changes in the deployment environment or other conditions. For example, when the network connected to the application changes during startup, the corresponding configuration parameters may need to be changed from a to a' in order to start the application due to different network operators. At this time, the server can use the configuration placeholder key: ${XXX} to define certain configuration parameters that may need to be dynamically changed, or use the address information of the configuration parameters that may need to be dynamically changed to replace them, so that the server determines the parameters required when starting the application and then obtains the value of the relevant parameter from the address information.
[0063] In this embodiment, by setting the address information of the configuration parameter in the first configuration data, the configuration value can be obtained dynamically, thereby avoiding the influence of changes caused by the deployment environment or other conditions on the fixed configuration value.
[0064] S12: In response to a configuration merging operation initiated by the user through the client, configure the coverage priority of each first data configuration layer and each second data configuration layer.
[0065] In this embodiment, the server responds to the configuration merging operation initiated by the user through the client to configure the coverage priority of each first data configuration layer and each second data configuration layer. The configuration merging operation refers to the information of setting the coverage priority of each first data configuration layer in the first configuration group and the coverage level of each second data configuration layer in the second configuration group according to the relevant code and parameters required by the application to be started.
[0066] For example, for the two applications "Cloud City Song" and "Douluo Continent" on the Sanqi Interactive Entertainment platform, the first configuration group is required to start the application "Cloud City Song", and the second configuration group is required to start the application "Douluo Continent". Starting the application "Cloud City Song" requires configuring the recharge function, account input function and push receiving function, while starting the application "Douluo Continent" requires configuring the recharge function, account input function and region identification function. The first configuration group can be divided into multiple configuration modules according to the different functions implemented by the code, namely, configuration module 1 for implementing the recharge function, configuration module 2 for implementing the account input function and configuration module 3 for implementing the push receiving function. The second configuration group can also be divided into multiple configuration modules according to the different functions implemented by the code, namely, configuration module 4 for implementing the recharge function module, configuration module 5 for implementing the account input function and configuration module 6 for implementing the region identification function. Among them, configuration module 1, configuration module 2 and configuration module 3 are the first data configuration layer, and configuration module 1, configuration module 2 and configuration module 3 respectively contain the code for implementing the recharge function, account input function and push receiving function in "Cloud City Song". Configuration modules 4, 5 and 6 are the second data configuration layer, and configuration modules 4, 5 and 6 respectively contain codes for implementing the recharge function, account input function and region identification function in "Douluo Continent". Among them, the codes and related parameters in configuration modules 1, 2 and 3 are the first configuration data, and the codes and related parameters in configuration modules 4, 5 and 6 are the second configuration data. Configuration modules 1 and 4 are both code sets for implementing the recharge function, but because the corresponding applications are different, the parameters in the codes of the configuration modules will be different. For example, the code of configuration module 1 contains the parameter abcde, and the code of configuration module 4 contains the parameter a'bcde. Therefore, the user initiates the configuration merge operation through the client according to the functions to be implemented in the process of starting the application and the relevant parameters that need to be modified at the current moment. For example, starting the application "Song of Cloud City" requires the recharge function, account input function and push reception function, among which the configuration module 1 that implements the recharge function contains the parameter abcde. However, at the current moment, the recharge environment during the startup of the application "Song of Cloud City" is the same as that of "Douluo Continent", and the parameters contained in the configuration module 4 that implements the recharge function during the startup of the application "Douluo Continent" are a'bcde, where parameters a and a' are the same type of parameters, that is, there can only be one in the same position in the file. Therefore, it is necessary to use parameter a' of configuration module 4 to replace parameter a in configuration module 1. At this time, in the configuration merge operation, the overwrite priority of the first data configuration layer corresponding to configuration module 1 can be set to (1), and the overwrite priority of the second data configuration layer corresponding to configuration module 4 can be set to (2).
[0067] In one embodiment, the client is composed of a terminal cluster, and each first data configuration layer is configured by different groups of sub-clusters in the terminal cluster through different first configuration data.
[0068] In this embodiment, the client may be composed of a terminal cluster. Since the configuration file A, i.e., the first configuration group, is organized in the form of a first data configuration layer, and the functions implemented by each first data configuration layer are different, and each first data configuration layer is a specific configuration content, the terminal cluster of the client can be divided into different groups of sub-clusters according to each first data configuration layer. It is then configured by sub-clusters of different groups in the terminal cluster of the client. And since the functions implemented by each first data configuration layer are different, the first configuration data used by each first data configuration layer configured by sub-clusters of different groups are different. Among them, the sub-cluster refers to the terminal sub-cluster into which the terminal cluster of the client is divided according to different first data configuration layers. For example, there are 100 computers in the terminal cluster. According to the application "Song of the Cloud City", three first data configuration layers corresponding to the functions are required. The 100 computers can be divided into three different sub-clusters to configure their respective first data configuration layers. In addition, for each first data configuration layer, different people can configure it through sub-clusters of different groups in the terminal cluster of the client.
[0069] In this embodiment, each second data configuration layer may also be configured by different sub-clusters in the terminal cluster through different second configuration data.
[0070] In this embodiment, each first data configuration layer is configured by different sub-clusters in the terminal cluster through different first configuration data, so that different configuration data can have different permissions and the processing is more targeted, and configuration by different sub-clusters can improve configuration efficiency.
[0071] In one embodiment, the levels of the first data configuration layers are different from each other, and the configuration entries of the first data configuration layers of different levels are different.
[0072] In this embodiment, the levels of the first data configuration layers are different, wherein the level refers to the level of each first data configuration layer in a configuration group set by the user. The levels of the first data configuration layers are different from each other, and the configuration entries of the first data configuration layers of different levels are different.
[0073] For example, the first configuration group includes a first data configuration layer corresponding to the recharge function, a first data configuration layer for the account input function, and a first data configuration layer for the push receiving function. The configuration entry of the first data configuration layer corresponding to the recharge function is set as the container data source, the configuration entry of the first data configuration layer for the account input function is set as the local data source, and the configuration entry of the first data configuration layer for the push receiving function is set as the third-party interface data source.
[0074] In this embodiment, the levels of the second data configuration layers are different from each other, and the configuration entries of the second data configuration layers of different levels are different.
[0075] In this embodiment, different configuration entries are set for first data configuration layers at different levels, so that the configuration methods of configuration data at different levels are more targeted.
[0076] In one embodiment, configuring the coverage priority of each first data configuration layer and each second data configuration layer includes:
[0077] configuring the coverage priority of each first data configuration layer and each second data configuration layer according to the startup process of the target application; or,
[0078] Configure the coverage priority of each first data configuration layer and each second data configuration layer according to the application function of the target application program; or,
[0079] The coverage priority of each first data configuration layer and each second data configuration layer is configured according to the custom configuration parameter.
[0080] In this embodiment, the user configures the coverage priority of each first data configuration layer and each second data configuration layer through a configuration merge operation initiated by the client. The configuration can be based on the startup process of the target application, the application function of the target application, or the custom configuration parameters. For example, the coverage priority of each first data configuration layer and each second data configuration layer can be configured based on the startup process of the target application "Song of the Cloud City", which includes hardware initialization, execution of the boot loader, loading and starting the kernel image, and other stages. The coverage priority of each first data configuration layer and each second data configuration layer can also be configured based on the application functions of the target application "Song of the Cloud City", including the recharge function, account input function, and push reception function. The coverage priority of each first data configuration layer and each second data configuration layer can also be configured based on the custom configuration parameters of the target application "Song of the Cloud City", including network interface selection and operating system selection.
[0081] In this embodiment, the coverage priority in each first data configuration layer and each second data configuration layer can be configured according to the startup process or application function of the target application, and can also be configured according to custom configuration parameters. This allows the coverage priority of each first data configuration layer and each second data configuration layer to be configured according to a variety of situations and has a wider application range.
[0082] S13. According to the coverage priority of the first data configuration layer and each second data configuration layer, the first data configuration layer with a high coverage priority is overwritten by the second data configuration layer with a low coverage priority corresponding to the first data configuration layer with a high coverage priority, and a process configuration set is generated so that the user terminal starts the target application according to the process configuration set.
[0083] In this embodiment, the server generates a process configuration set according to the overwriting priorities of the first data configuration layer and each second data configuration layer, specifically by overwriting the second data configuration layer with a low overwriting priority corresponding to the first data configuration layer with a high overwriting priority.
[0084] For example, for the two applications "Cloud City Song" and "Douluo Continent" on the Sanqi Interactive Entertainment platform, the first configuration group is required to start the application "Cloud City Song", and the second configuration group is required to start the application "Douluo Continent". Starting the application "Cloud City Song" requires a recharge function, an account input function, and a push reception function, wherein the configuration module 1 that implements the recharge function contains parameters abcde. However, at the current moment, the recharge environment during the startup of the application "Cloud City Song" is the same as that of "Douluo Continent", and the parameters contained in the configuration module 4 that implements the recharge function during the startup of the application "Douluo Continent" are a'bcde, wherein parameters a and a' are the same type of parameters, that is, there can only be one in the same position in the file. Therefore, it is necessary to replace parameter a in configuration module 1 with parameter a' of configuration module 4. At this time, the overlay priority of the first data configuration layer corresponding to configuration module 1 can be set to (1) in the configuration merge operation, and the overlay priority of the second data configuration layer corresponding to configuration module 4 can be set to (2). The overwriting priority of the first data configuration layer corresponding to configuration modules 2 and 3 is set to (2), and the overwriting priority of the second data configuration layer corresponding to configuration modules 5 and 6 is set to (1). At this time, configuration modules 2 and 3, both of which have an overwriting priority of (2), respectively overwrite corresponding configuration modules 5 and 6, whose overwriting priority is (1). Since the overwriting priority of configuration module 1 is (1) and the overwriting priority of the corresponding configuration module 4 is (2), the server first overwrites configuration module 1 with configuration module 4, wherein the overwriting is to retain the same part of the parameters, and the different parts use the parameters of the configuration module with a high overwriting priority to replace the parameters of the configuration module with a low overwriting priority. The parameters of configuration module 1' are a'bcde, and the overwriting priority of configuration module 1' is (2). Therefore, the generated process configuration set is a configuration file composed of configuration module 1', configuration module 2 and configuration module 3.
[0085] In one embodiment, the method of enabling a user terminal to start a target application according to a process configuration set includes:
[0086] The version information of the application is generated according to the process configuration set, and the version information is written into the identity information of the target application, so that the user terminal obtains the process configuration set according to the identity information to start the target application.
[0087] In this embodiment, the server generates the version information of the application according to the process configuration set, and writes the version information into the identity information of the target application, so that the user terminal can obtain the process configuration set from the server or configuration center according to the identity information. Identity information is similar to address information and can serve as an index. Since the only configuration unit output by the server or configuration center is the version, each application connected to the server or configuration center ultimately pulls the configuration information of a certain version. Therefore, the user terminal can obtain the accurate version at the same time.
[0088] In this embodiment, the version information of the application is generated through the process configuration set, and the version information is written into the identity information of the application, so that the process configuration set is obtained based on the identity information to start the application, which makes it unnecessary to store the process configuration set in the user terminal, saving the storage space of the user terminal, and can obtain the corresponding version of the process configuration set, thereby improving the accuracy of the obtained process configuration set.
[0089] In one embodiment, the server may obtain a first configuration group, a second configuration group, and a third configuration group, wherein the first configuration group includes a plurality of first data configuration layers, the first data configuration layer encapsulates first configuration data for starting an application, the second configuration group includes a plurality of second data configuration layers, the second data configuration layer encapsulates second configuration data for starting an application, and the third configuration group includes a plurality of third data configuration layers, the third data configuration layer encapsulates third configuration data for starting an application. The server responds to a configuration merge operation initiated by a user through a client, and configures the overwriting priority of each first data configuration layer, each second data configuration layer, and each third data configuration layer. According to the overwriting priority of the first data configuration layer, each second data configuration layer, and each third configuration layer, the first data configuration layer with a high overwriting priority is first overwritten with the second data configuration layer and the third data layer with a low overwriting priority corresponding to the first data configuration layer with a high overwriting priority, and a process configuration set is generated, so that the user terminal starts the target application according to the process configuration set.
[0090] For example, for the three applications "Song of Cloud City", "Douluo Continent" and "Ares Awakening" on the Sanqi Interactive Entertainment platform, the first configuration group is required to start the application "Song of Cloud City", the second configuration group is required to start the application "Douluo Continent", and the third configuration group is required to start the application "Ares Awakening". The first configuration group can be divided into configuration module 1, configuration module 2 and configuration module 3 according to the different functions implemented by the code. The second configuration group can also be divided into configuration module 4, configuration module 5 and configuration module 6 according to the different functions implemented by the code. The third configuration group can also be divided into configuration module 7, configuration module 8 and configuration module 9 according to the different functions implemented by the code. Among them, configuration module 1, configuration module 2 and configuration module 3 are the first data configuration layer. Configuration module 4, configuration module 5 and configuration module 6 are the second data configuration layer. Configuration module 7, configuration module 8 and configuration module 9 are the third data configuration layer. Among them, the codes and related parameters in configuration modules 1, 2, and 3 are the first configuration data, the codes and related parameters in configuration modules 4, 5, and 6 are the second configuration data, and the codes and related parameters in configuration modules 7, 8, and 9 are the third configuration data. Configuration modules 1, 4, and 7 are all code sets for implementing the recharge function, but because the corresponding applications are different, the parameters in the codes of the configuration modules will be different. For example, the code of configuration module 1 includes the parameter abcde, the code of configuration module 4 includes the parameter a'bcde, and the code of configuration module 7 includes the parameter ab'cde. Therefore, the user initiates a configuration merge operation through the client according to the functions to be implemented in the process of starting the application and the related parameters that need to be modified at the current moment. At this time, in the configuration merge operation, the overwriting priority of the first data configuration layer corresponding to configuration module 1 can be set to (1), the overwriting priority of the second data configuration layer corresponding to configuration module 4 can be set to (2), and the overwriting priority of the second data configuration layer corresponding to configuration module 7 can be set to (3). Starting the application "Song of Cloud City" originally requires configuration module 1 to contain parameters abcde, but at the current moment, the configuration module that needs to implement the recharge function during the startup of the application "Song of Cloud City" contains parameters a'b'cde, where parameters a and a', b and b' are the same type of parameters, that is, there can only be one in the same position in the file, so it is necessary to use parameter a' of configuration module 4 to replace parameter a in configuration module 1, and use parameter b' of configuration module 7 to replace parameter b in configuration module 1. At this time, in the configuration merge operation, the overwriting priority of the first data configuration layer corresponding to configuration module 1 can be set to (1), the overwriting priority of the second data configuration layer corresponding to configuration module 4 can be set to (2), and the overwriting priority of the third data configuration layer corresponding to configuration module 7 can be set to (3).The overwriting priority of the first data configuration layer corresponding to configuration modules 2 and 3 is set to (3), the overwriting priority of the second data configuration layer corresponding to configuration modules 5 and 6 is set to (2), and the overwriting priority of the second data configuration layer corresponding to configuration modules 8 and 9 is set to (1). At this time, configuration modules 5 and 6 with the same coverage priority of (2) are first used to cover the corresponding configuration modules 8 and 9 with the same coverage priority of (1), and then configuration modules 2 and 3 with the same coverage priority of (3) are used to cover the corresponding configuration modules 5 and 6 with the same coverage priority of (1). Since the coverage priority of configuration module 1 is (1) and the corresponding configuration modules 4 and 7 have the same coverage priorities of (2) and (3), respectively, the server first covers configuration module 1 with configuration module 4, wherein the parts with the same parameters are retained, and the parts with different parameters are replaced with the parameters of the configuration module with the higher coverage priority instead of the parameters of the configuration module with the lower coverage priority. The parameters of configuration module 1' are a'bcde. At this time, the coverage priority of configuration module 1' is (2). The server then covers configuration module 1' with configuration module 7, and the parameters of the final configuration module 1" are a'b'cde. Therefore, the generated process configuration set is a configuration file composed of configuration module 1", configuration module 2 and configuration module 3.
[0091] For example, Figure 4 The figure shows the overlay diagram between configuration groups. There are three configuration groups, namely the public configuration group, configuration group A and configuration group B. Each configuration group contains an operation and maintenance mandatory overlay layer and a public configuration layer. Since the three configuration groups are used for public servers, servers in region A and servers in region B respectively, the parameters used in the public configuration layer are different. When the public configuration layer of configuration groups A and B needs to adopt the parameters of the public configuration layer of the public configuration group, the overlay priority of the public configuration layer of the public configuration group can be set to (2), and the overlay priority of the public configuration layers of the other two configuration groups can be set to (1). At this time Figure 4 As shown, the overlay and merge can be performed from left to right, that is, the common configuration layer of the common configuration group will first be overlaid and merged with the common configuration layer of configuration group A, and the overlay and merged result will then be overlaid and merged with the common configuration layer of configuration group B. In this embodiment, the overlay priority of the common configuration layer of the common configuration group is greater than the overlay priority of the common configuration layers of the other two configuration groups, so the common configuration layer of the common configuration group overlays the common configuration layers of the other two configuration groups.
[0092] In the above embodiment, by responding to the merge operation initiated by the client, the overwriting priority of each first data configuration layer and each second data configuration layer obtained is configured, and the data layer with a high coverage priority in the first data configuration layer is overwritten with the data layer with a low coverage priority in the second data configuration layer according to the overwriting priority, so that the corresponding data configuration can be obtained from other data configuration layers, without repeating the process of starting the data configuration of the whole process, avoiding confusion and errors in configuration, increasing flexibility, and simplifying the operation steps.
[0093] In one embodiment, Figure 5 As shown, a process configuration device is provided, comprising:
[0094] The data acquisition module 101 is used to acquire a first configuration group and a second configuration group, wherein the first configuration group includes multiple first data configuration layers, the first data configuration layers encapsulate first configuration data for starting the application, and the second configuration group includes multiple second data configuration layers, the second data configuration layers encapsulate second configuration data for starting the application.
[0095] The data configuration module 102 is used to configure the coverage priority of each first data configuration layer and each second data configuration layer in response to the configuration merging operation input by the user.
[0096] The data merging module 103 is used to generate a process configuration set by overwriting the second data configuration layer with a low coverage priority corresponding to the first data configuration layer with a high coverage priority based on the coverage priority of the first data configuration layer and each second data configuration layer, so that the user terminal starts the target application according to the process configuration set.
[0097] In one embodiment, the data acquisition module 101 is further used to:
[0098] In response to a data configuration operation initiated by a user through a client, first data configuration layers are obtained, wherein the first data configuration layers have different configuration priorities.
[0099] According to the configuration priority ranking of each first data configuration layer, the first configuration data of the first data configuration layer with a high configuration priority overwrites the first configuration data of the first data configuration layer with a low configuration priority, so as to obtain a first configuration group.
[0100] In one embodiment, the client is composed of a terminal cluster, and each first data configuration layer is configured by different groups of sub-clusters in the terminal cluster through different first configuration data.
[0101] In one embodiment, the levels of the first data configuration layers are different from each other, and the configuration entries of the first data configuration layers of different levels are different.
[0102] In one embodiment, the data merging module 103 is further used to:
[0103] The version information of the application is generated according to the process configuration set, and the version information is written into the identity information of the target application, so that the user terminal obtains the process configuration set according to the identity information to start the target application.
[0104] In one embodiment, the first configuration data includes address information of the configuration parameters.
[0105] In one embodiment, the data configuration module 102 is further configured to:
[0106] configuring the coverage priority of each first data configuration layer and each second data configuration layer according to the startup process of the target application; or,
[0107] Configure the coverage priority of each first data configuration layer and each second data configuration layer according to the application function of the target application program; or,
[0108] The coverage priority of each first data configuration layer and each second data configuration layer is configured according to the custom configuration parameter.
[0109] In one embodiment, a server is provided, such as Figure 6 As shown, it includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the program, the process configuration method as described in the above embodiment is implemented.
[0110] In one embodiment, a computer device is provided, such as Figure 7 As shown, the computer device includes a processor, a memory, a network interface, an input device and a display screen connected via a system bus. Among them, the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program. When the computer program is executed by the processor, the processor can implement the process configuration method. The internal memory may also store a computer program. When the computer program is executed by the processor, the processor can execute the process configuration method. Those skilled in the art can understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0111] In one embodiment, the process configuration device provided by the present application can be implemented in the form of a computer program. The computer program can be Figure 7The computer device shown in the figure is run. The memory of the computer device can store various program modules constituting the process configuration device. The computer program composed of various program modules enables the processor to execute the steps of the process configuration method of each embodiment of the present application described in this specification.
[0112] In one embodiment, an electronic device is provided, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the steps of the process configuration method described above when executing the program. The steps of the process configuration method here may be the steps of the process configuration method described in the above embodiments.
[0113] In one embodiment, a process configuration system is provided, such as Figure 8 As shown, it includes a client and a server as described in the above embodiment, and the client is connected to the server.
[0114] In this embodiment, config is a microservice-based configuration center, which can obtain configuration files from container data sources, third-party interface data sources and local data sources. Themis is a middle-end server, which is used to connect to microservice systems with multiple different business functions. The first configuration group and the second configuration group corresponding to the configuration file are obtained from config. The user initiates a configuration merge operation through the operation interface function of the client, and configures the coverage priority of each first data configuration layer in the first configuration group and each second data configuration layer in the second configuration group obtained by the middle-end server. After the middle-end server performs coverage merging according to the coverage priorities of each first data configuration layer and each second data configuration layer to generate a process configuration set, the configuration file is obtained through a broker (message forwarder) when the application starts. The broker can use an RSocket intelligent gateway, the client is a themis web client for displaying the operation interface, the application is an application that needs to be configured and accessed, and new configuration changes can be continuously obtained from the config configuration center in subsequent operations.
[0115] In one embodiment, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer-executable instructions, wherein the computer-executable instructions are used to cause a computer to execute the steps of the process configuration method described above. The steps of the process configuration method here may be the steps of the process configuration method in the above-mentioned various embodiments.
[0116] The above is a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications are also considered to be within the scope of protection of the present application.
[0117] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
Claims
1. A process configuration method, characterized in that: include: Acquire a first configuration group and a second configuration group, wherein the first configuration group includes a plurality of first data configuration layers, the first data configuration layers encapsulate first configuration data for starting a first application, the second configuration group includes a plurality of second data configuration layers, the second data configuration layers encapsulate second configuration data for starting a second application, the first application and the second application are different, and the first configuration data includes address information of configuration parameters; In response to a configuration merging operation initiated by a user through a client, configuring the overlay priority of each of the first data configuration layers and each of the second data configuration layers; According to the overwriting priority of the first data configuration layer and each of the second data configuration layers, the first data configuration layer with a high coverage priority is overwritten by the second data configuration layer with a low coverage priority corresponding to the first data configuration layer with a high coverage priority, and a process configuration set is generated so that the user terminal starts the target application according to the process configuration set, wherein the overwriting is for retaining the same parts of parameters, and for the different parts, the parameters of the configuration module with a high coverage priority are used to replace the parameters of the configuration module with a low coverage priority.
2. The process configuration method according to claim 1, characterized in that: Get the first configuration group, including: In response to a data configuration operation initiated by a user through a client, acquiring each of the first data configuration layers, wherein each of the first data configuration layers has a different configuration priority; According to the configuration priority ranking of each of the first data configuration layers, the first configuration data of the first data configuration layer with a high configuration priority overwrites the first configuration data of the first data configuration layer with a low configuration priority, so as to obtain the first configuration group.
3. The process configuration method according to claim 2, characterized in that: The client is composed of a terminal cluster, and each first data configuration layer is configured by different sub-clusters of different groups in the terminal cluster through different first configuration data.
4. The process configuration method according to claim 2 or 3, characterized in that: The levels of the first data configuration layers are different from each other, and the configuration entries of the first data configuration layers at different levels are different.
5. The process configuration method according to claim 1, characterized in that: So that the user terminal starts the target application according to the process configuration set, including: The version information of the application is generated according to the process configuration set, and the version information is written into the identity information of the target application, so that the user terminal obtains the process configuration set according to the identity information to start the target application.
6. The process configuration method according to claim 1, characterized in that: The configuring the coverage priority of each of the first data configuration layers and each of the second data configuration layers includes: configuring the coverage priority of each of the first data configuration layers and each of the second data configuration layers according to the startup process of the target application; or, Configure the coverage priority of each of the first data configuration layers and each of the second data configuration layers according to the application function of the target application; or, The coverage priority of each of the first data configuration layers and each of the second data configuration layers is configured according to the custom configuration parameters.
7. A process configuration device, characterized in that: include: a data acquisition module, configured to acquire a first configuration group and a second configuration group, wherein the first configuration group includes a plurality of first data configuration layers, the first data configuration layers encapsulate first configuration data for starting a first application, the second configuration group includes a plurality of second data configuration layers, the second data configuration layers encapsulate second configuration data for starting a second application, the first application and the second application are different, and the first configuration data includes address information of configuration parameters; A data configuration module, configured to configure the coverage priority of each of the first data configuration layers and each of the second data configuration layers in response to a configuration merging operation input by a user; A data merging module is used to, based on the coverage priorities of the first data configuration layer and each of the second data configuration layers, overwrite the second data configuration layer with a low coverage priority corresponding to the first data configuration layer with a high coverage priority by the first data configuration layer with a high coverage priority, and generate a process configuration set so that the user terminal starts the target application according to the process configuration set; wherein, the overwriting is to retain the parts with the same parameters, and the parts with different parameters use the parameters of the configuration module with a high coverage priority to replace the parameters of the configuration module with a low coverage priority.
8. A server, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the process configuration method according to any one of claims 1 to 6 when executing the program.
9. A process configuration system, characterized in that: The method comprises a client and a server as claimed in claim 8, wherein the client is connected to the server.
Citation Information
Patent Citations
Method and device for generating information priority policy data, and application management system
CN102455935A
Method, device and system for starting and optimizing application program and medium
CN107943576A
Process starting method and devices, configuration method, and systems
CN109002332A
Configuration data management method and system
CN110362358A
Methods for Multi-Source Configuration of Mobile Applications
US20170024203A1
