A method, device, equipment and medium for configuring configuration values of function items
By receiving the configuration file sent by the configuration server and searching for the target configuration value, only the necessary configuration items are transmitted, which solves the problem of low efficiency of configuration file transmission and improves user experience and resource utilization.
Patent Information
- Application Number
- CN202110532504.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-17
- Publication Date
- 2024-10-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In large-scale multi-tenant network systems, when the configuration server sends configuration files to the business component servers, the transmission efficiency is low, occupying a large amount of resources, and affecting the user experience.
By receiving the configuration file sent by the configuration server, the target identification information of the target function is determined, and the target configuration value is found based on the corresponding relationship between the saved function identification information and the configuration value of the configuration item. Only the necessary configuration items are transmitted, reducing the resource usage of the transmission. and improve efficiency.
It improves the efficiency of configuration file transmission, reduces resource usage, improves user experience, and enables faster configuration item setting.
Smart Images

Figure CN113157346B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of configuration management business components, and in particular to a configuration method, device, equipment and medium for configuring the configuration value of a function item. Background Art
[0002] In large multi-tenant network systems, such as content delivery networks (CDN), cloud computing, edge computing, and application systems built on such technologies, there are configuration servers and multiple business component servers. There are multiple configuration items in the application system, and a configuration value can be set for each configuration item. Multiple configuration items can be combined to achieve a certain function, and when the same configuration item is used to achieve different functions, the configuration value corresponding to the configuration item may be different.
[0003] The configuration server needs to provide customized services or functions for different tenants based on the configuration items. For all configuration items in the application system, the configuration server will identify whether the configuration item is a configuration item that implements the function. If so, it will determine the configuration value corresponding to the configuration item when implementing the function. If not, it will set the configuration item to the default value. After the configuration values of all configuration items are set, the configuration file containing the set configuration items and configuration values will be sent to the business component server, so that the business component server can complete the corresponding function.
[0004] Since there are many configuration items in the application system, the configuration server takes up a lot of resources and has low transmission efficiency when sending the configuration file containing the set configuration items and configuration values to the business component server, and when the business component server maintains the configuration information. In addition, in the prior art, for each request from the tenant, the configuration server will send the configuration values of all configuration items in the application system to the business component server. When the configuration server sends the configuration file to multiple business component servers at the same time, the transmission efficiency will be even lower, affecting the user experience. Summary of the invention
[0005] The present invention provides a configuration method, device, equipment and medium for configuring the configuration value of a function item, so as to solve the problem in the prior art that when a configuration server sends a configuration file to a business component, the transmission efficiency is low, the resource usage is large, and the user experience is affected.
[0006] An embodiment of the present invention provides a method for configuring a configuration value of a function item, which is applied to a business component server, and the method includes:
[0007] Receive a first configuration file sent by a configuration server, and determine first target identification information of a target function to be implemented carried in the first configuration file;
[0008] According to the correspondence between the stored function identification information and the configuration values of the configuration items, searching for the target configuration values of the configuration items corresponding to the target function of the first target identification information;
[0009] According to the target configuration value, the configuration value of the corresponding configuration item is configured.
[0010] Furthermore, before receiving the first configuration file sent by the configuration server, the method further includes:
[0011] receiving a second configuration file sent by the configuration server, wherein the second configuration file includes identification information of a function and configuration values of configuration items corresponding to the function, wherein configuration values of configuration items irrelevant to implementing the function are default values;
[0012] Saves the correspondence between the identification information of the function and the configuration value of the configuration item.
[0013] Furthermore, the correspondence between the identification information of the saving function and the configuration value of the configuration item includes:
[0014] Saving, according to a first sub-configuration file in the second configuration file, a default value corresponding to a configuration value of a configuration item, wherein the first sub-configuration file stores the default value corresponding to the configuration value of the configuration item;
[0015] According to the second sub-configuration file in the second configuration file, the configuration value of the configuration item implementing the function corresponding to the identification information of the function is saved, wherein the second sub-configuration file saves the identification information of the function and the configuration value of the configuration item implementing the function corresponding to the function.
[0016] Furthermore, the correspondence between the identification information of the saving function and the configuration value of the configuration item includes:
[0017] Calculate a hash value of the identification information according to the identification information of the function;
[0018] The correspondence between the hash value, the configuration item and the corresponding configuration value is stored in a hash table.
[0019] Further, searching for the target configuration value of each configuration item corresponding to the first target identification information of the target function according to the correspondence between the stored function identification information and the configuration value of the configuration item includes:
[0020] Calculate a target hash value of the first target identification information according to the first target identification information of the target function;
[0021] Search the hash table for target configuration values of each configuration item corresponding to the target hash value.
[0022] Further, searching for target configuration values of each configuration item corresponding to the target function of the first target identification information according to the correspondence between the stored function identification information and the configuration values of the configuration items includes:
[0023] Determining whether a configuration value of a configuration item corresponding to the target function of the first target identification information is saved;
[0024] If not, determining that the target function corresponding to the first target identification information is a combined function, and searching for second target identification information of a target single function for realizing the target function;
[0025] According to the correspondence between the stored function identification information and the configuration values of the configuration items, the target configuration values of the configuration items corresponding to the target single function of the second target identification information are searched.
[0026] Furthermore, the method further comprises:
[0027] receiving a modified third configuration file sent by the configuration server, wherein the third configuration file includes identification information of the function to be modified and configuration values of the modified configuration items;
[0028] According to the third configuration file, the configuration value of the configuration item corresponding to the identification information of the function to be modified in the saved corresponding relationship is modified.
[0029] Further, the determining the first target identification information of the target function to be implemented carried in the first configuration file includes:
[0030] According to the pre-stored keyword information, the keyword in the first configuration file is searched, and the content after the keyword is determined to be the first target identification information.
[0031] The embodiment of the present invention further provides a method for configuring a configuration value of a function item, which is applied to a configuration server, and the method includes:
[0032] Receive an input request and determine a target function to be implemented in the request;
[0033] A first configuration file carrying first target identification information of the target function to be implemented is generated, and the first configuration file is sent to the business component server.
[0034] Furthermore, the method further comprises:
[0035] receiving an input operation of creating a second configuration file, and creating the second configuration file, wherein the second configuration file includes identification information of the function and configuration values of configuration items corresponding to the function, wherein configuration values of configuration items irrelevant to implementing the function are default values;
[0036] Send the second configuration file to the business component server.
[0037] Furthermore, the method further comprises:
[0038] An operation of receiving an input, wherein the operation is an operation of modifying a configuration value of a configuration item to be modified in a function to be modified;
[0039] According to the operation, a third configuration file is generated, wherein the third configuration file includes identification information of the function to be modified and configuration values of the configuration items to be modified;
[0040] The third configuration file is sent to the service component server.
[0041] The embodiment of the present invention further provides a device for configuring a configuration value of a function item, which is applied to a business component server, and the device includes:
[0042] A receiving and processing module, configured to receive a first configuration file sent by a configuration server, and determine first target identification information of a target function to be implemented carried in the first configuration file;
[0043] A search module, configured to search for target configuration values of each configuration item corresponding to the target function of the first target identification information according to the correspondence between the stored function identification information and the configuration values of the configuration items;
[0044] The configuration module is used to configure the configuration value of the corresponding configuration item according to the target configuration value.
[0045] Furthermore, the receiving and processing module is further configured to receive a second configuration file sent by the configuration server, wherein the second configuration file includes identification information of the function and configuration values of configuration items corresponding to the function, wherein configuration values of configuration items irrelevant to the implementation of the function are default values;
[0046] The device also includes:
[0047] The saving module is used to save the corresponding relationship between the identification information of the function and the configuration value of the configuration item.
[0048] Further, the saving module is specifically used to save a default value corresponding to the configuration value of the configuration item according to the first sub-configuration file in the second configuration file, wherein the first sub-configuration file saves the default value corresponding to the configuration value of the configuration item; and save the configuration value of the configuration item for implementing the function corresponding to the identification information of the function according to the second sub-configuration file in the second configuration file, wherein the second sub-configuration file saves the identification information of the function and the configuration value of the configuration item for implementing the function corresponding to the function.
[0049] Furthermore, the saving module is specifically used to calculate a hash value of the identification information according to the identification information of the function; and save the corresponding relationship between the hash value, the configuration item and the corresponding configuration value in a hash table.
[0050] Furthermore, the search module is specifically configured to calculate a target hash value of the first target identification information according to the first target identification information of the target function; and search the hash table for target configuration values of each configuration item corresponding to the target hash value.
[0051] Furthermore, the search module is specifically used to determine whether the configuration value of the configuration item corresponding to the target function of the first target identification information is saved; if not, it is determined that the target function corresponding to the first target identification information is a combined function, and the second target identification information of the target single function used to implement the target function is searched; according to the correspondence between the saved function identification information and the configuration value of the configuration item, the target configuration value of each configuration item corresponding to the target single function of the second target identification information is searched.
[0052] Furthermore, the receiving and processing module is also used to receive a modified third configuration file sent by the configuration server, wherein the third configuration file includes identification information of the function to be modified and configuration values of the modified configuration items; and according to the third configuration file, modify the configuration values of the configuration items corresponding to the identification information of the function to be modified in the saved correspondence.
[0053] Furthermore, the receiving and processing module is specifically configured to search for a keyword in the first configuration file according to information of the pre-saved keyword, and determine that the content after the keyword is the first target identification information.
[0054] The embodiment of the present invention further provides a device for configuring a configuration value of a function item, which is applied to a configuration server, and the device includes:
[0055] A receiving and processing module, used to receive an input request and determine a target function to be implemented in the request;
[0056] A generating module, used for generating a first configuration file carrying first target identification information of the target function to be realized;
[0057] A sending module is used to send the first configuration file to the business component server.
[0058] Furthermore, the receiving and processing module is further used to receive an input operation of creating a second configuration file, and create the second configuration file, wherein the second configuration file includes identification information of the function and configuration values of each configuration item corresponding to the function, wherein the configuration values of configuration items irrelevant to the implementation of the function are default values;
[0059] The sending processing module is further used to send the second configuration file to the business component server.
[0060] Furthermore, the receiving and processing module is further used to receive an input operation, wherein the operation is an operation of modifying a configuration value of a configuration item to be modified in the function to be modified;
[0061] The generating module is further used to generate a third configuration file according to the operation, wherein the third configuration file includes identification information of the function to be modified and configuration values of the configuration items to be modified;
[0062] The sending module is further configured to send the third configuration file to the service component server.
[0063] An embodiment of the present invention further provides an electronic device, which includes at least a processor and a memory, and the processor is used to implement the steps of the configuration value configuration method of any of the above-mentioned function items when executing a computer program stored in the memory.
[0064] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the steps of the method for configuring the configuration value of any of the above-mentioned function items are implemented.
[0065] In an embodiment of the present invention, a configuration server sends a first configuration file to a business component server, wherein the first configuration file includes only first target identification information of a target function to be implemented. The business component server searches for target configuration values of configuration items corresponding to the target function of the first target identification information based on the correspondence between the identification information of the saved function and the configuration values of the configuration items, and sets the configuration values of the corresponding configuration items based on the target configuration values. Since only the configuration file including the first target identification information of the target function to be implemented needs to be transmitted, resources occupied by the transmission of the configuration file are reduced, transmission efficiency is improved, and since there is no need to transmit too much information, configuration of each configuration item can be completed more quickly, further improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the technical solution of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0067] Figure 1 A schematic diagram of a configuration process of a configuration value of a function item provided in an embodiment of the present invention;
[0068] Figure 2a A schematic diagram of a first sub-configuration file in which default values of all configuration items are recorded in a second configuration file provided in an embodiment of the present invention;
[0069] Figure 2b A schematic diagram of a sub-configuration module corresponding to a single function in a second configuration file provided in an embodiment of the present invention;
[0070] Figure 2c A schematic diagram of a configuration module corresponding to a combined function in a third configuration file provided in an embodiment of the present invention;
[0071] Figure 3 A schematic diagram of a first configuration file provided by an embodiment of the present invention;
[0072] Figure 4 An interactive schematic diagram of configuration of configuration values of function items provided in an embodiment of the present invention;
[0073] Figure 5 A schematic diagram of a configuration flow of configuration values of function items provided in an embodiment of the present invention;
[0074] Figure 6 A schematic diagram of a configuration process of a configuration value of a function item provided in an embodiment of the present invention;
[0075] Figure 7 A schematic diagram of the structure of a configuration device for a configuration value of a function item provided by an embodiment of the present invention;
[0076] Figure 8 A schematic diagram of the structure of a configuration device for a configuration value of a function item provided by an embodiment of the present invention;
[0077] Fig. 9 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention;
[0078] Fig.10 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0079] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the embodiments of the present invention.
[0080] In order to improve the transmission efficiency of configuration files, reduce the resources occupied during the transmission process, and enhance the user experience, the present invention provides a configuration method, device, equipment and medium for configuration values of function items.
[0081] Embodiment 1:
[0082] Figure 1 A schematic diagram of a configuration process of a configuration value of a function item provided in an embodiment of the present invention, the process comprising:
[0083] S101: Receive a first configuration file sent by a configuration server, and determine first target identification information of a target function to be implemented carried in the first configuration file.
[0084] A method for configuring a configuration value of a function item provided in an embodiment of the present invention is applied to a business component server, and the business component server may be located at a PC end or the like.
[0085] In an embodiment of the present invention, a business component server receives a configuration file sent by a configuration server. In order to distinguish the configuration file from other configuration files received by the business component server, the configuration file is referred to as a first configuration file in the embodiment of the present invention. The first configuration file carries first target identification information of a target function to be implemented, wherein the first target identification information may be a name, number, etc. of the target function to be implemented, wherein the first target identification information is information that uniquely identifies the target function.
[0086] When the business component server receives the first configuration file, the target function to be implemented in the first configuration file is determined based on the first target identification information carried in the configuration file. Specifically, in an embodiment of the present invention, when the first configuration file is received, the keyword in the first configuration file is identified based on the keyword pre-saved in the business component server. The keyword is a preset keyword. Specifically, the keyword can be an index, etc. In an embodiment of the present invention, the keyword is "use_conf_mod_name". The keyword is used to find the first target identification information in the first configuration file. Specifically, the part after the keyword is the first target identification information. The first target identification information of the target function to be implemented in the first configuration file is determined based on the keyword, and then the target function to be implemented is determined.
[0087] Specifically, in an embodiment of the present invention, after receiving the request from the tenant, the configuration server parses the request, determines the target function to be implemented carried in the request, and then determines the first target identification information corresponding to the target function by searching for the identification information of each function that is pre-set, and generates a first configuration file corresponding to the tenant. The name of the first configuration file can be named after the domain name of the tenant, such as aaa.com.conf, bbb.com.conf or ccc.com.conf, and the target function to be implemented is represented in the form of "keyword = first target identification information" in the first configuration file.
[0088] The configuration server sends the first configuration file to the business component server. After receiving the first configuration file, the business component server identifies the keyword in the first configuration file. In the embodiment of the present invention, the keyword is "use_conf_mod_name", identifies the "=" after the keyword, and determines that the content after the "=" is the first target identification information of the target function to be implemented.
[0089] S102: searching for target configuration values of configuration items corresponding to the target function of the first target identification information according to the stored correspondence between the identification information of the function and the configuration values of the configuration items.
[0090] In the embodiment of the present invention, for each function, the business component server pre-stores the configuration value of each configuration item when implementing the function. When implementing the function, only some configuration items may be required, so when storing the correspondence between the identification information of the function and the configuration value of the configuration item, for the configuration item that implements the function, the configuration value of the configuration item when it is used to implement the function is stored, and for the configuration item that is not related to the implementation of the function, the default value of the configuration item is stored.
[0091] After the target function is determined, the target configuration values of the configuration items corresponding to the target function of the first target identification information may be determined according to the correspondence between the pre-saved function identification information and the configuration values of the configuration items.
[0092] S103: According to the target configuration value, configure the configuration value of the corresponding configuration item.
[0093] In the embodiment of the present invention, after the target configuration value of each configuration item corresponding to the target function is found, the configuration value of the corresponding configuration item is configured according to the found target configuration value.
[0094] Because in the embodiment of the present invention, the configuration server sends a first configuration file to the business component server, and the first configuration file only includes the first target identification information of the target function to be implemented, the business component server searches for the target configuration value of each configuration item corresponding to the target function of the first target identification information according to the correspondence between the identification information of the saved function and the configuration value of the configuration item, and sets the configuration value of the corresponding configuration item according to the target configuration value. Since only the configuration file containing the first target identification information of the target function to be implemented needs to be transmitted, the resources occupied by the configuration file transmission are reduced, the transmission efficiency is improved, and since there is no need to transmit too much information, the configuration of each configuration item can be completed more quickly, further improving the user experience.
[0095] Embodiment 2:
[0096] In order to avoid that the configuration server sends the configuration values of all configuration items in the application system to the business component server for each request of the tenant, further reducing the resources occupied during transmission, improving transmission efficiency, and enhancing the user experience, based on the above embodiment, in the embodiment of the present invention, before receiving the first configuration file sent by the configuration server, the method further includes:
[0097] receiving a second configuration file sent by the configuration server, wherein the second configuration file includes identification information of a function and configuration values of configuration items corresponding to the function, wherein configuration values of configuration items irrelevant to implementing the function are default values;
[0098] Saves the correspondence between the identification information of the function and the configuration value of the configuration item.
[0099] In an embodiment of the present invention, in order to enable the business component server to pre-save the correspondence between the identification information of each function and the configuration value of the configuration item, the configuration server sends a second configuration file to the business component server, and the second configuration file includes the identification information of each function and the configuration value of each configuration item corresponding to each function.
[0100] In order to save the corresponding relationship between the identification information of the function and the configuration value of the configuration item in the business component server, reduce the resources occupied during transmission, improve the transmission efficiency, and enhance the user experience, based on the above embodiment, in the embodiment of the present invention, the corresponding relationship between the identification information of the function and the configuration value of the configuration item is saved, including:
[0101] According to the first sub-configuration file in the second configuration file, saving the default value corresponding to the configuration value of the configuration item, wherein the first sub-configuration file saves the default value corresponding to the configuration value of the configuration item;
[0102] According to the second sub-configuration file in the second configuration file, the configuration value of the configuration item implementing the function corresponding to the identification information of the function is saved, wherein the second sub-configuration file saves the identification information of the function and the configuration value of the configuration item implementing the function corresponding to the function.
[0103] Specifically, in the embodiment of the present invention, the second configuration file includes two sub-configuration files. To facilitate the distinction between the two sub-configuration files, the two sub-configuration files are referred to as a first sub-configuration file and a second sub-configuration file, wherein the first sub-configuration file records the default value corresponding to the configuration value of each configuration item, and the second sub-configuration file stores the functions that can be realized and the configuration value of the configuration item corresponding to the function that realizes the function. When the second configuration file is received, the default value corresponding to the configuration value of each configuration item in the first sub-configuration file is saved.
[0104] In an embodiment of the present invention, the functions in the second configuration file include a single function that can be realized by setting the configuration value of the configuration item, and a combined function that is realized by completing multiple single functions. In the second sub-configuration file, for each combined function, the corresponding relationship between the identification information of the combined function and the identification information of the single function that realizes the combined function can be saved, by determining the identification information of the single function that realizes the combined function, and then determining the configuration value of the configuration item that realizes the single function according to the identification information, and using the configuration value of the configuration item that realizes the single function as the configuration value of the configuration item that realizes the combined function. In addition, in the second configuration file, for each combined function, the configuration value of the configuration item used to realize the combined function can also be directly saved.
[0105] In the embodiment of the present invention, in order to facilitate the existence of the combined function in the form of a configuration module in the second sub-configuration file, the single function exists in the form of a sub-configuration module in the second sub-configuration file, wherein the sub-configuration module corresponding to the single function records the identification information of the single function, the configuration items required to implement the single function, and the configuration value of the configuration item when implementing the single function. The configuration module corresponding to the combined function records the identification information of the combined function, the configuration items required to implement the combined function, and the configuration value of each configuration item when implementing the combined function.
[0106] In addition to recording the identification information of the combined function, the configuration module corresponding to the combined function also records the identification information of each single function that implements the combined function. Generally, a combined function is a function that includes at least two single functions.
[0107] After receiving the second configuration file, for each single function, according to the sub-configuration module corresponding to the single function, the configuration value of the configuration item required to implement the single function is saved. For each combined function, according to the configuration module corresponding to the combined function, the identification information of the single function implementing the combined function is determined, and then the configuration value of the configuration item implementing the single function is determined according to the identification information, and the configuration value of the configuration item implementing the single function is used as the configuration value of the configuration item implementing the combined function and saved.
[0108] In the embodiment of the present invention, since the business component server saves the corresponding relationship between the identification information of the function and the configuration value of the configuration item according to the received second configuration file, specifically, the identification information of each single function and the configuration value of the configuration item for realizing the single function are saved, and the corresponding relationship between the identification information of each combined function and the identification information of the single function for realizing the combined function is also saved. This allows the configuration value of the configuration item of any target function to be realized to be determined through the saved corresponding relationship, avoiding the need for the configuration server to send the configuration file carrying the configuration value of the configuration item of the target function to be realized to the business component server all the time, and realizing one-place configuration and multiple-place reuse.
[0109] Figure 2a A schematic diagram of a first sub-configuration file in which the default values of all configuration items are recorded in the second configuration file provided in an embodiment of the present invention, such as the Figure 2a As shown, conf_mod_name is a keyword in the first sub-configuration file, the content after the keyword is the identification information of the first sub-configuration file, the identification information of the first sub-configuration file is all, the configuration items in the first sub-configuration file are conf_item1, conf_item2 and conf_item3, and the configuration values are value_10, value_20 and value_30.
[0110] Figure 2b A schematic diagram of a sub-configuration module corresponding to a single function in a second configuration file provided in an embodiment of the present invention, such as the Figure 2bAs shown, the conf_mod_name is a keyword in the second sub-configuration file, and the content after the keyword is the identification information of the single function, which can be function1, function2, function3 or function4, etc. The configuration items required to implement each single function and their corresponding configuration values are also stored in the sub-configuration module. For example, the configuration items to implement function1 are conf_item11, conf_item12 and conf_item13, the configuration value of conf_item11 is value_111, the configuration value of conf_item12 is value_121, and the configuration value of conf_item13 is value_131; the configuration items to implement function2 are conf_item21, conf_item22 and conf_item23, the configuration value of conf_item21 is value_211, the configuration value of conf_item22 is value_221, and the configuration value of conf_item23 is value_231. 1; The configuration items for implementing function3 are conf_item31, conf_item32 and conf_item33, the configuration value of conf_item31 is value_311, the configuration value of conf_item32 is value_321, and the configuration value of conf_item33 is value_331; The configuration items for implementing function4 are conf_item11, conf_item21 and conf_item31, the configuration value of conf_item11 is value_114, the configuration value of conf_item21 is value_214, and the configuration value of conf_item31 is value_314.
[0111] Figure 2c A schematic diagram of a configuration module corresponding to a combined function in a second configuration file provided in an embodiment of the present invention, such as the Figure 2cAs shown, the conf_mod_name is a keyword in the second sub-configuration file, and the content after the keyword is the identification information of the combined function, which can be function11, function12 or function13, etc. The configuration module also stores the single function that needs to be implemented when implementing the combined function, where use_conf_mod_name is the identification information of the single function that needs to be implemented. For example, when implementing function11, the single functions that need to be implemented are function1 and function2; when implementing function12, the single functions that need to be implemented are function1 and function3; when implementing function13, the single functions that need to be implemented are function2 and function3.
[0112] In order to realize the correspondence between the identification information of the function and the configuration value of the configuration item, reduce the resources occupied during transmission, improve the transmission efficiency, and enhance the user experience, based on the above embodiments, in an embodiment of the present invention, the correspondence between the identification information of the function and the configuration value of the configuration item stored includes:
[0113] Calculate a hash value of the identification information according to the identification information of the function;
[0114] The correspondence between the hash value, the configuration item and the corresponding configuration value is stored in a hash table.
[0115] In an embodiment of the present invention, after receiving the second configuration file sent by the configuration server, for each function, the identification information corresponding to the function in the second configuration file is determined, the hash value of the identification information is calculated, and the correspondence between the hash value, the configuration item and the corresponding configuration value is saved in a hash table.
[0116] Specifically, the second configuration file can be named G.conf. After receiving the second configuration file, for each configuration module in the second configuration file, a keyword in the configuration module is identified. In an embodiment of the present invention, the keyword is "conf_mod_name". The "=" after the keyword is identified, and the content after the "=" is determined to be the identification information corresponding to the function. Then, a hash value of the identification information is calculated, and the correspondence between the hash value, the configuration item and the corresponding configuration value is saved in a hash table. For configuration items that do not appear in the configuration module, the configuration items that are not related to the implementation of the function are set to default values according to the first sub-configuration file in the second configuration file that records the default values of all configuration items.
[0117] Embodiment 3:
[0118] In order to configure the server to search for the configuration value of the configuration item of the target function, reduce the resources occupied during transmission, improve the transmission efficiency, and enhance the user experience, based on the above embodiments, in an embodiment of the present invention, searching for the target configuration value of each configuration item corresponding to the first target identification information of the target function according to the correspondence between the saved function identification information and the configuration value of the configuration item includes:
[0119] Calculate a target hash value of the first target identification information according to the first target identification information of the target function;
[0120] Search the hash table for target configuration values of each configuration item corresponding to the target hash value.
[0121] In an embodiment of the present invention, after the first target identification information of the target function carried in the first configuration file is determined, the target hash value of the first target identification information is calculated based on the first target identification information of the target function, and the target configuration values of each configuration item corresponding to the target hash value in the hash table are searched.
[0122] Specifically, in an embodiment of the present invention, after receiving the first configuration file, a keyword in the first configuration file is identified, and in the embodiment of the present invention, the keyword is "use_conf_mod_name", the "=" after the keyword is identified, and the content after the "=" is determined to be the first target identification information of the target function to be implemented, and then the target hash value of the first target identification information is calculated, and the target configuration value of each configuration item corresponding to the target hash value is searched in the saved hash table.
[0123] In an embodiment of the present invention, in the hash table, for each function, the configuration values of all configuration items corresponding to the function can be saved, wherein the configuration items include configuration items related to the realization of the function and configuration items unrelated to the realization of the function, wherein the configuration values of the configuration items related to the realization of the function are saved as the configuration values when the function is realized, and the configuration values of the configuration items unrelated to the realization of the function are saved as default values. In addition, in the present application, in order to reduce the storage space occupied by the hash table, the hash table can also only save the configuration values of the configuration items used to realize the function. Therefore, after receiving the first configuration file sent by the configuration server, the first sub-configuration file including the default value of the configuration value of each configuration item in the first configuration file is saved to a preset storage location, so the default value of the configuration items stored in the preset storage location can be determined to determine the configuration values of the configuration items unrelated to the realization of the function.
[0124] Among them, in the embodiment of the present invention, when the hash table stores the configuration value of the configuration item for realizing the target function, after determining the target hash value corresponding to the first target identification information of the target function, the configuration value of the configuration item for realizing the target function is searched from the hash table. For the configuration value of the configuration item that is not related to realizing the target function, the first sub-configuration file is searched in the preset storage location, and the default value of the configuration value of the configuration item that is not related to realizing the target function is found according to the default value of the configuration value of each configuration item stored in the first sub-configuration file.
[0125] Figure 3 A schematic diagram of a first configuration file provided in an embodiment of the present invention, such as the Figure 3 As shown, the first configuration file includes the first target identification information of the target function to be implemented. For example, the first target identification information of the target function to be implemented carried in aaa.com.conf is function11 and functionX; the first target identification information of the target function to be implemented carried in bbb.com.conf is function12 and functionY; the first target identification information of the target function to be implemented carried in bbb.com.conf is function13 and functionZ.
[0126] Figure 4 The interactive schematic diagram of the configuration of the configuration value of the function item provided in the embodiment of the present invention, such as the Figure 4 As shown, the process includes a configuration server sending a first configuration file and a second configuration file to a business component server. After receiving the second configuration file, the business component server establishes a hash table to save the correspondence between the identification information of each function and the configuration value of the configuration item. After receiving the first configuration file, the first target identification information of the target function to be implemented in the first configuration file is determined, and the target configuration value of each configuration item corresponding to the target function is determined according to the saved correspondence, and the configuration items are configured, and then the configured configuration items are sent to the tenant.
[0127] Figure 5 A schematic diagram of a configuration flow of a configuration value of a function item provided in an embodiment of the present invention, the process includes:
[0128] S501: Receive a second configuration file sent by a configuration server.
[0129] S502: For each function, calculate a hash value of the identification information according to the identification information of the function.
[0130] S503: Save the correspondence between the hash value, the configuration item and the corresponding configuration value in a hash table.
[0131] S504: Receive a first configuration file sent by a configuration server.
[0132] S505: Determine first target identification information of the target function to be implemented carried in the first configuration file.
[0133] S506: According to the saved correspondence between the identification information of the function and the configuration value of the configuration item, search for the target configuration value of each configuration item corresponding to the target function.
[0134] S507: According to the target configuration value, configure the configuration value of the corresponding configuration item.
[0135] Embodiment 4:
[0136] In order to configure the server to search for the configuration value of the configuration item of the target function, reduce the resources occupied during transmission, improve the transmission efficiency, and enhance the user experience, based on the above embodiments, in an embodiment of the present invention, searching for the target configuration value of each configuration item corresponding to the target function of the first target identification information according to the correspondence between the identification information of the saved function and the configuration value of the configuration item includes:
[0137] Determining whether a configuration value of a configuration item corresponding to the target function of the first target identification information is saved;
[0138] If not, determining that the target function corresponding to the first target identification information is a combined function, and searching for second target identification information of a target single function for realizing the target function;
[0139] According to the correspondence between the stored function identification information and the configuration values of the configuration items, the target configuration values of the configuration items corresponding to the target single function of the second target identification information are searched.
[0140] In the embodiment of the present invention, when saving the correspondence between the identification information of a function and the configuration value of a configuration item, for each single function, the configuration value of the configuration item required to implement the single function is saved. For each combined function, the correspondence between the identification information of the combined function and the identification information of the single function that implements the combined function can be saved, or the identification information of the single function that implements the combined function can be determined, and then the configuration value of the configuration item that implements the single function is determined based on the identification information, and the configuration value of the configuration item that implements the single function is used as the configuration value of the configuration item that implements the combined function.
[0141] After determining the first target identification information of the target function to be achieved, it is also possible to determine whether the target function corresponding to the first target identification information is a single function. If the target function is not a single function but a combined function, the target single function for achieving the target function can be determined, and then the target configuration values of each configuration item corresponding to the target single function can be determined.
[0142] Among them, when judging whether the target function is a single function, the first target identification information of the target function is determined, and then the hash table is searched to see whether the first target identification information exists. If the first target identification information does not exist in the hash table, it is determined that the target function is not a single function but a combined function.
[0143] Specifically, after determining that the target function corresponding to the first target identification information is a combination function, the second target identification information of the target single function used to implement the target function is searched, and for each second target identification information, the target configuration value of each configuration item corresponding to the target single function of the second target identification information is searched according to the correspondence between the saved function identification information and the configuration value of the configuration item.
[0144] Embodiment 5:
[0145] In order to realize that when the configuration value of a configuration item of a certain function in the configuration file is modified, the configuration value of the configuration item of the function stored in the business component server is also modified in the same way, thereby improving the user experience, based on the above embodiments, in an embodiment of the present invention, the method further includes:
[0146] receiving a modified third configuration file sent by the configuration server, wherein the third configuration file includes identification information of the function to be modified and configuration values of the modified configuration items;
[0147] According to the third configuration file, the configuration value of the configuration item corresponding to the identification information of the function to be modified in the saved corresponding relationship is modified.
[0148] When the configuration server modifies the configuration value of a configuration item of a certain function, or adds or deletes a certain function, it sends the modified third configuration file to the business component server, and the business component server modifies the saved correspondence according to the modified third configuration file. If the configuration value of a certain function configuration item is modified, the configuration value of the configuration item corresponding to the identification information of the function to be modified in the saved correspondence is modified according to the identification information of the function to be modified included in the third configuration file and the configuration value of the modified configuration item; if a certain function is deleted, the correspondence between the identification information of the function and the configuration value of the configuration item is deleted from the saved correspondence; if a function is added, the correspondence between the identification information of the function and the configuration value of the configuration item is added to the saved correspondence.
[0149] In an embodiment of the present invention, if a fourth configuration file that has been modified to implement a target function is received, the fourth configuration file is used to update the first configuration file, and the target function to be implemented is re-determined, and the target configuration value of each configuration item corresponding to the first target identification information of the target function is searched based on the correspondence between the saved function identification information and the configuration value of the configuration item, and the configuration value of the corresponding configuration item is configured based on the target configuration value.
[0150] In an embodiment of the present invention, when the configuration server modifies the configuration value of a configuration item of a certain function, or adds or deletes a certain function, it sends the modified third configuration file to the business component server, and the business component server modifies the saved correspondence according to the modified third configuration file, and when configuring the target function to be implemented again, it is configured according to the correspondence between the updated function identification information and the configuration value of the configuration item. At the same time, if the configuration values of multiple configuration items of a function are modified, or the configuration values of configuration items of multiple functions are modified, it can be implemented through a third configuration file, realizing one-place modification and multiple-place update, and improving the modification efficiency of the configuration value of the function configuration item.
[0151] Embodiment 6:
[0152] In order to determine the target function to be implemented and improve the user experience, based on the above embodiments, in an embodiment of the present invention, the determining of the target function to be implemented carried in the first configuration file includes:
[0153] According to the information of the pre-saved keywords, the keywords in the first configuration file are searched, and the first target identification information is obtained according to the content after the keywords.
[0154] In the embodiment of the present invention, after receiving the first configuration file, the business component server searches for the keyword in the first configuration file according to the stored keyword information, and determines that the content after the keyword is the first target identification information of the target function to be implemented.
[0155] Specifically, in the embodiment of the present invention, after receiving the first configuration file, the keyword in the first configuration file is identified according to the keyword information pre-saved in the business component server. The keyword is a preset keyword. Specifically, the keyword can be an index, etc. In the embodiment of the present invention, the keyword is "use_conf_mod_name". The keyword is used to identify the position of the target identification information in the first configuration file, that is, the part after the keyword is the first target identification information. The first target identification information of the target function to be implemented in the first configuration file is determined according to the keyword, and then the target function to be implemented is determined.
[0156] Embodiment 7:
[0157] Figure 6 A schematic diagram of a configuration process of a configuration value of a function item provided in an embodiment of the present invention, the process comprising:
[0158] S601: receiving an input request, and determining a target function to be implemented carried in the request.
[0159] A configuration method for a configuration value of a function item provided in an embodiment of the present invention is applied to a configuration server, which may be located at a PC end or the like.
[0160] In the embodiment of the present invention, after the configuration server receives the request from the tenant, the configuration server parses the request and determines the target function to be implemented carried in the request.
[0161] S602: Generate a first configuration file carrying first target identification information of the target function to be implemented, and send the first configuration file to the business component server.
[0162] After determining the target function to be implemented, the configuration server determines the first target identification information corresponding to the target function by searching for the pre-set corresponding identification information of each function, and generates a first configuration file corresponding to the tenant. The name of the first configuration file can be named after the domain name of the tenant, such as aaa.com.conf, bbb.com.conf or ccc.com.conf, etc., and the target function to be implemented is represented in the first configuration file in the form of "keyword = first target identification information".
[0163] In the embodiment of the present invention, after the configuration server generates the first configuration file carrying the first target identification information of the target function, it sends the first configuration file to the business component server.
[0164] Embodiment 8:
[0165] In order to avoid that the configuration server sends the configuration values of all configuration items in the application system to the business component server for each request of the tenant, the configuration server sends the configuration values of all configuration items in the application system to the business component server once, and the business component server can meet the different requests of the tenant, reduce the resources occupied during transmission, improve the transmission efficiency, and enhance the user experience. On the basis of the above embodiments, in an embodiment of the present invention, the method further includes:
[0166] receiving an input operation of creating a second configuration file, and creating the second configuration file, wherein the second configuration file includes identification information of the function and configuration values of configuration items corresponding to the function, wherein configuration values of configuration items irrelevant to implementing the function are default values;
[0167] Send the second configuration file to the business component server.
[0168] In the embodiment of the present invention, the administrator pre-sets the second configuration file in the configuration server. Specifically, the administrator inputs an operation of creating the second configuration file to the configuration server, so that the configuration server creates the second configuration file.
[0169] Specifically, in an embodiment of the present invention, the second configuration file includes two sub-configuration files. To facilitate the distinction between the two sub-configuration files, the two sub-configuration files are referred to as a first sub-configuration file and a second sub-configuration file, wherein the first sub-configuration file stores the default value corresponding to the configuration value of each configuration item, and the second sub-configuration file stores the functions that can be realized. In an embodiment of the present invention, the functions in the second configuration file include a single function that can be realized by setting the configuration value of the configuration item, and a combined function that can be realized by completing multiple single functions. The combined function exists in the form of a configuration module in the second sub-configuration file, and the single function exists in the form of a sub-configuration module in the second sub-configuration file, wherein the sub-configuration module corresponding to the single function records the identification information of the single function, the configuration item required to realize the single function, and the configuration value of the configuration item when realizing the single function. The configuration module corresponding to the combined function records the identification information of the combined function, and the identification information of the single function used to realize the combined function.
[0170] Embodiment 9:
[0171] In order to realize that when the configuration value of a configuration item of a certain function in the configuration file is modified, the configuration value of the configuration item of the function stored in the business component server is also modified in the same way, thereby improving the user experience, based on the above embodiments, in an embodiment of the present invention, the method further includes:
[0172] An operation of receiving an input, wherein the operation is an operation of modifying a configuration value of a configuration item to be modified in a function to be modified;
[0173] According to the operation, a third configuration file is generated, wherein the third configuration file includes identification information of the function to be modified and configuration values of the configuration items to be modified;
[0174] The third configuration file is sent to the service component server.
[0175] When an administrator modifies the configuration value of a configuration item of a certain function, the configuration server receives an input operation, which is an operation to modify the configuration value of the configuration item to be modified in the function to be modified, and generates a third configuration file, which includes identification information of the function to be modified and the configuration value of the modified configuration item.
[0176] In an embodiment of the present invention, the administrator can also delete or add a function. If a function is deleted, the correspondence between the identification information of the function and the configuration value of the configuration item is deleted in the third configuration file; if a function is added, the correspondence between the identification information of the function and the configuration value of the configuration item is added in the third configuration file.
[0177] Embodiment 10:
[0178] Figure 7 A schematic diagram of a configuration device for a configuration value of a function item provided in an embodiment of the present invention, the device comprising:
[0179] The receiving and processing module 701 is configured to receive a first configuration file sent by a configuration server, and determine first target identification information of a target function to be implemented carried in the first configuration file;
[0180] A search module 702, configured to search for target configuration values of each configuration item corresponding to the target function of the first target identification information according to the stored correspondence between the identification information of the function and the configuration values of the configuration items;
[0181] The configuration module 703 is used to configure the configuration value of the corresponding configuration item according to the target configuration value.
[0182] In a possible implementation, the receiving and processing module 701 is further configured to receive a second configuration file sent by the configuration server, wherein the second configuration file includes identification information of the function and configuration values of configuration items corresponding to the function, wherein configuration values of configuration items irrelevant to implementing the function are default values;
[0183] The device also includes:
[0184] The saving module 704 is used to save the correspondence between the identification information of the function and the configuration value of the configuration item.
[0185] In a possible implementation, the saving module 704 is specifically used to save a default value corresponding to a configuration value of a configuration item according to a first sub-configuration file in the second configuration file, wherein the first sub-configuration file saves the default value corresponding to the configuration value of the configuration item; and save a configuration value of a configuration item for implementing a function corresponding to identification information of a function according to a second sub-configuration file in the second configuration file, wherein the second sub-configuration file saves identification information of the function and configuration value of the configuration item for implementing the function corresponding to the function.
[0186] In a possible implementation, the saving module 704 is specifically configured to calculate a hash value of the identification information according to the identification information of the function; and save the corresponding relationship between the hash value, the configuration item, and the corresponding configuration value in a hash table.
[0187] In a possible implementation, the search module 702 is specifically configured to calculate a target hash value of the first target identification information according to the first target identification information of the target function; and search the hash table for target configuration values of each configuration item corresponding to the target hash value.
[0188] In one possible implementation, the search module 702 is specifically used to determine whether the configuration value of the configuration item corresponding to the target function of the first target identification information is saved; if not, it is determined that the target function corresponding to the first target identification information is a combined function, and the second target identification information of the target single function used to implement the target function is searched; for the second target identification information, according to the correspondence between the saved function identification information and the configuration value of the configuration item, the target configuration value of each configuration item corresponding to the target single function of the second target identification information is searched.
[0189] In a possible implementation, the receiving and processing module 701 is further used to receive a modified third configuration file sent by the configuration server, wherein the third configuration file includes identification information of the function to be modified and a configuration value of the modified configuration item; and according to the third configuration file, the configuration value of the configuration item corresponding to the identification information of the function to be modified in the saved correspondence is modified.
[0190] In a possible implementation manner, the receiving and processing module 701 is specifically configured to search for a keyword in the first configuration file according to pre-saved keyword information, and determine that the content after the keyword is the first target identification information.
[0191] Figure 8 A schematic diagram of a configuration device for a configuration value of a function item provided in an embodiment of the present invention, the device comprising:
[0192] The receiving and processing module 801 is used to receive an input request and determine a target function to be implemented in the request;
[0193] A generating module 802 is used to generate a first configuration file carrying first target identification information of the target function to be implemented;
[0194] The sending module 803 is used to send the first configuration file to the business component server.
[0195] In a possible implementation, the receiving and processing module 801 is further configured to receive an input operation of creating a second configuration file, and create the second configuration file, wherein the second configuration file includes identification information of the function and configuration values of configuration items corresponding to the function, wherein configuration values of configuration items not related to implementing the function are default values;
[0196] The sending processing module is further used to send the second configuration file to the business component server.
[0197] In a possible implementation manner, the receiving and processing module 801 is further used to receive an input operation, wherein the operation is an operation of modifying a configuration value of a configuration item to be modified in the function to be modified;
[0198] The generating module 802 is further configured to generate a third configuration file according to the operation, wherein the third configuration file includes identification information of the function to be modified and configuration values of the configuration items to be modified;
[0199] The sending module 803 is further configured to send the third configuration file to the business component server.
[0200] Embodiment 11:
[0201] Fig. 9 FIG. 1 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Based on the above embodiments, an embodiment of the present invention further provides an electronic device, such as Fig. 9 As shown, it includes: a processor 901, a communication interface 902, a memory 903 and a communication bus 904, wherein the processor 901, the communication interface 902, and the memory 903 communicate with each other through the communication bus 904;
[0202] The memory 903 stores a computer program. When the program is executed by the processor 901, the processor 901 performs the following steps:
[0203] Receive a first configuration file sent by a configuration server, and determine first target identification information of a target function to be implemented carried in the first configuration file;
[0204] According to the correspondence between the stored function identification information and the configuration values of the configuration items, searching for the target configuration values of the configuration items corresponding to the target function of the first target identification information;
[0205] According to the target configuration value, the configuration value of the corresponding configuration item is configured.
[0206] In a possible implementation manner, before receiving the first configuration file sent by the configuration server, the method further includes:
[0207] receiving a second configuration file sent by the configuration server, wherein the second configuration file includes identification information of a function and configuration values of configuration items corresponding to the function, wherein configuration values of configuration items irrelevant to implementing the function are default values;
[0208] Saves the correspondence between the identification information of the function and the configuration value of the configuration item.
[0209] In a possible implementation manner, the correspondence between the identification information of the storage function and the configuration value of the configuration item includes:
[0210] Saving, according to a first sub-configuration file in the second configuration file, a default value corresponding to a configuration value of a configuration item, wherein the first sub-configuration file stores the default value corresponding to the configuration value of the configuration item;
[0211] According to the second sub-configuration file in the second configuration file, the configuration value of the configuration item implementing the function corresponding to the identification information of the function is saved, wherein the second sub-configuration file saves the identification information of the function and the configuration value of the configuration item implementing the function corresponding to the function.
[0212] In a possible implementation manner, the correspondence between the identification information of the storage function and the configuration value of the configuration item includes:
[0213] Calculate a hash value of the identification information according to the identification information of the function;
[0214] The correspondence between the hash value, the configuration item and the corresponding configuration value is stored in a hash table.
[0215] In a possible implementation, searching for the target configuration value of each configuration item corresponding to the first target identification information of the target function according to the stored correspondence between the identification information of the function and the configuration value of the configuration item includes:
[0216] Calculate a target hash value of the first target identification information according to the first target identification information of the target function;
[0217] Search the hash table for target configuration values of each configuration item corresponding to the target hash value.
[0218] In a possible implementation, searching for target configuration values of configuration items corresponding to the target function of the first target identification information according to the stored correspondence between the identification information of the function and the configuration values of the configuration items includes:
[0219] Determining whether a configuration value of a configuration item corresponding to the target function of the first target identification information is saved;
[0220] If not, determining that the target function corresponding to the first target identification information is a combined function, and searching for second target identification information of a target single function for realizing the target function;
[0221] According to the correspondence between the stored function identification information and the configuration values of the configuration items, the target configuration values of the configuration items corresponding to the target single function of the second target identification information are searched.
[0222] In a possible implementation, the method further includes:
[0223] receiving a modified third configuration file sent by the configuration server, wherein the third configuration file includes identification information of the function to be modified and configuration values of the modified configuration items;
[0224] According to the third configuration file, the configuration value of the configuration item corresponding to the identification information of the function to be modified in the saved corresponding relationship is modified.
[0225] In a possible implementation manner, determining the first target identification information of the target function to be implemented carried in the first configuration file includes:
[0226] According to the pre-stored keyword information, the keyword in the first configuration file is searched, and the content after the keyword is determined to be the first target identification information.
[0227] Since the principle of solving the problem by the above electronic device is similar to the method for configuring the configuration value of the function item, the implementation of the above electronic device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0228] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0229] The communication interface 902 is used for communication between the electronic device and other devices.
[0230] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0231] The above-mentioned processor can be a general-purpose processor, including a central processing unit, a network processor (Network Processor, NP), etc.; it can also be a digital signal processing processor (Digital Signal Processing, DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.
[0232] Fig.10 FIG. 1 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Based on the above embodiments, an embodiment of the present invention further provides an electronic device, such as Fig.10 As shown, it includes: a processor 1001, a communication interface 1002, a memory 903 and a communication bus 1004, wherein the processor 1001, the communication interface 1002, and the memory 1003 communicate with each other through the communication bus 1004;
[0233] The memory 1003 stores a computer program. When the program is executed by the processor 1001, the processor 1001 performs the following steps:
[0234] Receive an input request and determine a target function to be implemented in the request;
[0235] A first configuration file carrying first target identification information of the target function to be implemented is generated, and the first configuration file is sent to the business component server.
[0236] In a possible implementation, the method further includes:
[0237] receiving an input operation of creating a second configuration file, and creating the second configuration file, wherein the second configuration file includes identification information of the function and configuration values of configuration items corresponding to the function, wherein configuration values of configuration items irrelevant to implementing the function are default values;
[0238] Send the second configuration file to the business component server.
[0239] In a possible implementation, the method further includes:
[0240] An operation of receiving an input, wherein the operation is an operation of modifying a configuration value of a configuration item to be modified in a function to be modified;
[0241] According to the operation, a third configuration file is generated, wherein the third configuration file includes identification information of the function to be modified and configuration values of the configuration items to be modified;
[0242] The third configuration file is sent to the service component server.
[0243] Since the principle of solving the problem by the above electronic device is similar to the method for configuring the configuration value of the function item, the implementation of the above electronic device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0244] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0245] The communication interface 902 is used for communication between the electronic device and other devices.
[0246] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0247] The above-mentioned processor can be a general-purpose processor, including a central processing unit, a network processor (Network Processor, NP), etc.; it can also be a digital signal processing processor (Digital Signal Processing, DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.
[0248] Embodiment 12:
[0249] On the basis of the above embodiments, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program executable by a processor, and when the program runs on the processor, the processor implements the following steps when executing:
[0250] Receive a first configuration file sent by a configuration server, and determine first target identification information of a target function to be implemented carried in the first configuration file;
[0251] According to the correspondence between the stored function identification information and the configuration values of the configuration items, searching for the target configuration values of the configuration items corresponding to the target function of the first target identification information;
[0252] According to the target configuration value, the configuration value of the corresponding configuration item is configured.
[0253] In a possible implementation manner, before receiving the first configuration file sent by the configuration server, the method further includes:
[0254] receiving a second configuration file sent by the configuration server, wherein the second configuration file includes identification information of a function and configuration values of configuration items corresponding to the function, wherein configuration values of configuration items irrelevant to implementing the function are default values;
[0255] Saves the correspondence between the identification information of the function and the configuration value of the configuration item.
[0256] In a possible implementation manner, the correspondence between the identification information of the storage function and the configuration value of the configuration item includes:
[0257] Saving, according to a first sub-configuration file in the second configuration file, a default value corresponding to a configuration value of a configuration item, wherein the first sub-configuration file stores the default value corresponding to the configuration value of the configuration item;
[0258] According to the second sub-configuration file in the second configuration file, the configuration value of the configuration item implementing the function corresponding to the identification information of the function is saved, wherein the second sub-configuration file saves the identification information of the function and the configuration value of the configuration item implementing the function corresponding to the function.
[0259] In a possible implementation manner, the correspondence between the identification information of the storage function and the configuration value of the configuration item includes:
[0260] Calculate a hash value of the identification information according to the identification information of the function;
[0261] The correspondence between the hash value, the configuration item and the corresponding configuration value is stored in a hash table.
[0262] In a possible implementation, searching for the target configuration value of each configuration item corresponding to the first target identification information of the target function according to the stored correspondence between the identification information of the function and the configuration value of the configuration item includes:
[0263] Calculate a target hash value of the first target identification information according to the first target identification information of the target function;
[0264] Search the hash table for target configuration values of each configuration item corresponding to the target hash value.
[0265] In a possible implementation, searching for target configuration values of configuration items corresponding to the target function of the first target identification information according to the stored correspondence between the identification information of the function and the configuration values of the configuration items includes:
[0266] Determining whether a configuration value of a configuration item corresponding to the target function of the first target identification information is saved;
[0267] If not, determining that the target function corresponding to the first target identification information is a combined function, and searching for second target identification information of a target single function for realizing the target function;
[0268] According to the correspondence between the stored function identification information and the configuration values of the configuration items, the target configuration values of the configuration items corresponding to the target single function of the second target identification information are searched.
[0269] In a possible implementation, the method further includes:
[0270] receiving a modified third configuration file sent by the configuration server, wherein the third configuration file includes identification information of the function to be modified and configuration values of the modified configuration items;
[0271] According to the third configuration file, the configuration value of the configuration item corresponding to the identification information of the function to be modified in the saved corresponding relationship is modified.
[0272] In a possible implementation manner, determining the first target identification information of the target function to be implemented carried in the first configuration file includes:
[0273] According to the pre-stored keyword information, the keyword in the first configuration file is searched, and the content after the keyword is determined to be the first target identification information.
[0274] Since the principle of solving the problem by the computer-readable medium provided above is similar to the method of configuring the configuration value of the function item, after the processor executes the computer program in the computer-readable medium above, the steps implemented can refer to the other embodiments above, and the repeated parts will not be repeated.
[0275] On the basis of the above embodiments, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program executable by a processor, and when the program runs on the processor, the processor implements the following steps when executing:
[0276] Receive an input request and determine a target function to be implemented in the request;
[0277] A first configuration file carrying first target identification information of the target function to be implemented is generated, and the first configuration file is sent to the business component server.
[0278] In a possible implementation, the method further includes:
[0279] receiving an input operation of creating a second configuration file, and creating the second configuration file, wherein the second configuration file includes identification information of the function and configuration values of configuration items corresponding to the function, wherein configuration values of configuration items irrelevant to implementing the function are default values;
[0280] Send the second configuration file to the business component server.
[0281] In a possible implementation, the method further includes:
[0282] An operation of receiving an input, wherein the operation is an operation of modifying a configuration value of a configuration item to be modified in a function to be modified;
[0283] According to the operation, a third configuration file is generated, wherein the third configuration file includes identification information of the function to be modified and configuration values of the configuration items to be modified;
[0284] The third configuration file is sent to the service component server.
[0285] Since the principle of solving the problem by the computer-readable medium provided above is similar to the method of configuring the configuration value of the function item, after the processor executes the computer program in the computer-readable medium above, the steps implemented can refer to the other embodiments above, and the repeated parts will not be repeated.
[0286] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0287] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0288] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0289] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0290] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for configuring a configuration value of a function item, characterized in that: Applied to a business component server, the method comprises: Receive a first configuration file sent by a configuration server, and determine first target identification information of a target function to be implemented carried in the first configuration file; According to the correspondence between the stored function identification information and the configuration values of the configuration items, searching for the target configuration values of the configuration items corresponding to the target function of the first target identification information; According to the target configuration value, configure the configuration value of the corresponding configuration item; Before receiving the first configuration file sent by the configuration server, the method further includes: receiving a second configuration file sent by the configuration server, wherein the second configuration file includes identification information of a function and configuration values of configuration items corresponding to the function, wherein configuration values of configuration items irrelevant to implementing the function are default values; According to the identification information of the function and the configuration values of the configuration items corresponding to the function stored in the second configuration file, saving the correspondence between the identification information of the function and the configuration values of the configuration items; The corresponding relationship between the identification information of the storage function and the configuration value of the configuration item includes: Calculate a hash value of the identification information according to the identification information of the function; The corresponding relationship between the hash value, the configuration item and the corresponding configuration value is stored in a hash table; The searching, according to the correspondence between the stored function identification information and the configuration value of the configuration item, for the target configuration value of each configuration item corresponding to the first target identification information of the target function comprises: Calculate a target hash value of the first target identification information according to the first target identification information of the target function; Search the hash table for target configuration values of each configuration item corresponding to the target hash value.
2. The method according to claim 1, characterized in that The corresponding relationship between the identification information of the storage function and the configuration value of the configuration item includes: According to the first sub-configuration file in the second configuration file, save the default value corresponding to the configuration value of the configuration item, wherein the first sub-configuration file saves the default value corresponding to the configuration value of the configuration item; According to the second sub-configuration file in the second configuration file, the configuration value of the configuration item implementing the function corresponding to the identification information of the function is saved, wherein the second sub-configuration file saves the identification information of the function and the configuration value of the configuration item implementing the function corresponding to the function.
3. The method according to claim 1, characterized in that The searching, according to the correspondence between the identification information of the saved function and the configuration value of the configuration item, for the target configuration value of each configuration item corresponding to the target function of the first target identification information comprises: Determining whether a configuration value of a configuration item corresponding to the target function of the first target identification information is saved; If not, determining that the target function corresponding to the first target identification information is a combined function, and searching for second target identification information of a target single function for realizing the target function; According to the correspondence between the stored function identification information and the configuration values of the configuration items, the target configuration values of the configuration items corresponding to the target single function of the second target identification information are searched.
4. The method according to claim 1, characterized in that The method further comprises: receiving a modified third configuration file sent by the configuration server, wherein the third configuration file includes identification information of the function to be modified and configuration values of the modified configuration items; According to the third configuration file, the configuration value of the configuration item corresponding to the identification information of the function to be modified in the saved corresponding relationship is modified.
5. The method according to claim 1, characterized in that The determining of the first target identification information of the target function to be implemented carried in the first configuration file includes: According to the pre-stored keyword information, the keyword in the first configuration file is searched, and the content after the keyword is determined to be the first target identification information.
6. A method for configuring a configuration value of a function item, characterized in that: Applied to configuring a server, the method comprises: Receive an input request and determine a target function to be implemented in the request; Generate a first configuration file carrying first target identification information of the target function to be implemented, and send the first configuration file to the business component server; Wherein, the method further comprises: receiving an input operation of creating a second configuration file, creating the second configuration file, and saving identification information of the function and configuration values of each configuration item corresponding to the function into the second configuration file, wherein the configuration values of configuration items irrelevant to implementing the function are default values; The second configuration file is sent to the business component server, so that the business component server calculates a hash value of the identification information according to the identification information of the function, and saves a correspondence between the hash value, the configuration item and the corresponding configuration value in a hash table.
7. The method according to claim 6, characterized in that The method further comprises: An operation of receiving an input, wherein the operation is an operation of modifying a configuration value of a configuration item to be modified in a function to be modified; According to the operation, a third configuration file is generated, wherein the third configuration file includes identification information of the function to be modified and configuration values of the configuration items to be modified; The third configuration file is sent to the service component server.
8. A device for configuring a configuration value of a function item, characterized in that: Applied to a business component server, the device comprises: A receiving and processing module, configured to receive a first configuration file sent by a configuration server, and determine first target identification information of a target function to be implemented carried in the first configuration file; A search module, used to search for target configuration values of each configuration item corresponding to the target function of the first target identification information according to the correspondence between the stored function identification information and the configuration values of the configuration items; A configuration module, used to configure the configuration value of the corresponding configuration item according to the target configuration value; The receiving and processing module is further configured to receive a second configuration file sent by the configuration server, wherein the second configuration file includes identification information of the function and configuration values of configuration items corresponding to the function, wherein the configuration values of configuration items irrelevant to the implementation of the function are default values; The device also includes: a saving module, configured to save a correspondence between the identification information of the function and the configuration values of the configuration items according to the identification information of the function and the configuration values of the configuration items corresponding to the function stored in the second configuration file; The storage module is specifically used to calculate the hash value of the identification information according to the identification information of the function; and store the corresponding relationship between the hash value, the configuration item and the corresponding configuration value in a hash table; The search module is specifically configured to calculate a target hash value of the first target identification information according to the first target identification information of the target function; and search the hash table for target configuration values of each configuration item corresponding to the target hash value.
9. A device for configuring a configuration value of a function item, characterized in that: Applied to a configuration server, the device comprises: A receiving and processing module, used for receiving an input request and determining a target function to be implemented in the request; A generating module, used for generating a first configuration file carrying first target identification information of the target function to be realized; A sending module, used for sending the first configuration file to the business component server; The receiving and processing module is further used to receive an input operation of creating a second configuration file, and create the second configuration file, and save the identification information of the function and the configuration values of each configuration item corresponding to the function to the second configuration file, wherein the second configuration file includes the identification information of the function and the configuration values of each configuration item corresponding to the function, wherein the configuration values of the configuration items not related to the implementation of the function are default values; The sending module is also used to send the second configuration file to the business component server, so that the business component server calculates the hash value of the identification information according to the identification information of the function, and saves the correspondence between the hash value, the configuration item and the corresponding configuration value in a hash table.
10. An electronic device, characterized in that: The electronic device comprises at least a processor and a memory, and the processor is used to implement the steps of the method for configuring the configuration value of the function item according to any one of claims 1-5 or claims 6-7 when executing the computer program stored in the memory.
11. A computer-readable storage medium, characterized in that: It stores a computer program, which, when executed by a processor, implements the steps of the method for configuring the configuration value of the function item according to any one of claims 1-5 or claims 6-7.
