CN113157346A - Method, device, equipment and medium for configuring configuration values of function items - Google Patents

Method, device, equipment and medium for configuring configuration values of function items Download PDF

Info

Publication number
CN113157346A
CN113157346A CN202110532504.8A CN202110532504A CN113157346A CN 113157346 A CN113157346 A CN 113157346A CN 202110532504 A CN202110532504 A CN 202110532504A CN 113157346 A CN113157346 A CN 113157346A
Authority
CN
China
Prior art keywords
configuration
function
target
identification information
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110532504.8A
Other languages
Chinese (zh)
Inventor
张清荣
庄晓川
曾智全
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wangsu Science and Technology Co Ltd
Original Assignee
Wangsu Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wangsu Science and Technology Co Ltd filed Critical Wangsu Science and Technology Co Ltd
Priority to CN202110532504.8A priority Critical patent/CN113157346A/en
Publication of CN113157346A publication Critical patent/CN113157346A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Abstract

The invention provides a method, a device, equipment and a medium for configuring configuration values of function items, because in the embodiment of the invention, a configuration server sends a first configuration file to a service component server, the first configuration file only comprises first target identification information of a target function to be realized, the service component server searches the target configuration values of each configuration item corresponding to the target function of the first target identification information according to the corresponding relation between the stored identification information of the function and the configuration values of the configuration items, and sets the configuration values of the corresponding configuration items according to the target configuration values, because only the configuration file comprising the first target identification information of the target function to be realized needs to be transmitted, the resources occupied during the transmission of the configuration file are reduced, the transmission efficiency is improved, and because excessive information does not need to be transmitted, the configuration of each configuration item can be completed more quickly, the use experience of the user is further improved.

Description

Method, device, equipment and medium for configuring configuration values of function items
Technical Field
The present invention relates to the technical field of configuration management service components, and in particular, to a method, an apparatus, a device, and a medium for configuring configuration values of function items.
Background
A large-scale multi-tenant Network system, such as a Content Delivery Network (CDN), cloud computing, edge computing, and an application system constructed based on such a technique, includes a configuration server and a plurality of service component servers. The application system has a plurality of configuration items, each configuration item can be set with a configuration value, the plurality of configuration items are combined to realize a certain function, and when the same configuration item is used for realizing different functions, the configuration values corresponding to the configuration items may be different.
The configuration server needs to provide customized services or functions for different tenants according to configuration items. For all configuration items in the application system, the configuration server identifies whether the configuration item is a configuration item for realizing the function, if so, determines a configuration value corresponding to the configuration item when the function is realized, and if not, sets the configuration item as a default value. After the configuration values of all the configuration items are set, the configuration file containing the set configuration items and configuration values is sent to the service component server, so that the service component server can complete corresponding functions.
Because the number of configuration items in the application system is large, the configuration server sends a configuration file containing the set configuration items and configuration values to the service component server, and the service component server occupies large resources and has low transmission efficiency when maintaining configuration information. In the prior art, for each request of a tenant, the configuration server sends configuration values of all configuration items in the application system to the service component servers, and when the configuration server sends configuration files to a plurality of service component servers at the same time, the transmission efficiency is lower, and the use experience of a user is affected.
Disclosure of Invention
The invention provides a method, a device, equipment and a medium for configuring a configuration value of a function item, which are used for solving the problems that in the prior art, when a configuration server sends a configuration file to a service component, the transmission efficiency is low, the occupied resource is large, and the use experience of a user is influenced.
The embodiment of the invention provides a configuration method of a configuration value of a function item, which is applied to a service component server and comprises the following steps:
receiving a first configuration file sent by a configuration server, and determining first target identification information of a target function to be realized carried in the first configuration file;
searching a target configuration value of each configuration item corresponding to the target function of the first target identification information according to the corresponding relation between the stored identification information of the function and the configuration values of the configuration items;
and configuring the configuration value of the corresponding configuration item according to the target configuration value.
Further, before the 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 comprises identification information of functions and configuration values of configuration items corresponding to the functions, and the configuration values of the configuration items irrelevant to the realization of the functions are default values;
and storing the corresponding relation between the identification information of the function and the configuration value of the configuration item.
Further, the correspondence between the identification information of the saving function and the configuration value of the configuration item includes:
according to a first sub-configuration file in the second configuration file, saving a default value corresponding to the configuration value of a configuration item, wherein the default value corresponding to the configuration value of the configuration item is saved in the first sub-configuration file;
and according to a second sub-configuration file in the second configuration file, storing the configuration value of the configuration item for realizing the function corresponding to the identification information of the function, wherein the identification information of the function and the configuration value of the configuration item for realizing the function corresponding to the function are stored in the second sub-configuration file.
Further, the correspondence between the identification information of the saving function and the configuration value of the configuration item includes:
calculating a hash value of the identification information according to the identification information of the function;
and storing the corresponding relation among the hash value, the configuration item and the corresponding configuration value in a hash table.
Further, the 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 identification information of the function and the configuration value of the configuration item includes:
calculating a target hash value of first target identification information according to the first target identification information of the target function;
and searching the target configuration value of each configuration item corresponding to the target hash value in the hash table.
Further, the 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 stored identification information of the function and the configuration value of the configuration item includes:
judging whether the configuration value of the configuration item corresponding to the target function of the first target identification information is stored;
if not, determining that the target function corresponding to the first target identification information is a combined function, and searching second target identification information for realizing a target single function of the target function;
and searching the target configuration value of each configuration item corresponding to the target single function of the second target identification information according to the corresponding relation between the stored identification information of the function and the configuration value of the configuration item.
Further, the method further comprises:
receiving a modified third configuration file sent by the configuration server, wherein the third configuration file comprises identification information of a function to be modified and a configuration value of a modified configuration item;
and modifying the configuration value of the configuration item corresponding to the identification information of the function to be modified in the stored corresponding relation according to the third configuration file.
Further, the determining the first target identification information of the target function to be implemented, which is carried in the first configuration file, includes:
and searching keywords in the first configuration file according to information of the keywords which are saved in advance, and determining the content after the keywords as the first target identification information.
The embodiment of the invention also provides a configuration method of the configuration value of the function item, which is applied to a configuration server and comprises the following steps:
receiving an input request, and determining a target function to be realized carried in the request;
and generating a first configuration file carrying first target identification information of the target function to be realized, and sending the first configuration file to a service component server.
Further, the method further comprises:
receiving an input operation of creating a second configuration file, and creating the second configuration file, wherein the second configuration file comprises identification information of functions and configuration values of configuration items corresponding to the functions, and the configuration values of the configuration items irrelevant to the realization of the functions are default values;
and sending the second configuration file to the service component server.
Further, the method further comprises:
receiving an input operation, wherein the operation is an operation for modifying a configuration value of a configuration item to be modified in a function to be modified;
generating a third configuration file according to the operation, wherein the third configuration file comprises identification information of the function to be modified and a configuration value of the modified configuration item;
and sending the third configuration file to the service component server.
The embodiment of the invention also provides a configuration device of the configuration value of the function item, which is applied to the service component server, and the device comprises:
the receiving processing module is used for receiving a first configuration file sent by a configuration server and determining first target identification information of a target function to be realized carried in the first configuration file;
the searching module is used for searching the target configuration value of each configuration item corresponding to the target function of the first target identification information according to the corresponding relation between the stored identification information of the function and the configuration value of the configuration item;
and the configuration module is used for configuring the configuration values of the corresponding configuration items according to the target configuration values.
Further, the receiving processing module is further configured to receive a second configuration file sent by the configuration server, where the second configuration file includes identification information of a function and a configuration value of each configuration item corresponding to the function, and the configuration value of the configuration item unrelated to the implementation of the function is a default value;
the device further comprises:
and the storage module is used for storing the corresponding relation between the identification information of the function and the configuration value of the configuration item.
Further, the saving module is specifically configured to save, according to a first sub-configuration file in the second configuration file, a default value corresponding to the configuration value of the configuration item, where the default value corresponding to the configuration value of the configuration item is saved in the first sub-configuration file; and according to a second sub-configuration file in the second configuration file, storing the configuration value of the configuration item for realizing the function corresponding to the identification information of the function, wherein the identification information of the function and the configuration value of the configuration item for realizing the function corresponding to the function are stored in the second sub-configuration file.
Further, the storage module is specifically configured to calculate a hash value of the identification information according to the identification information of the function; and storing the corresponding relation among the hash value, the configuration item and the corresponding configuration value in a hash table.
Further, 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 searching the target configuration value of each configuration item corresponding to the target hash value in the hash table.
Further, the search module is specifically configured to determine whether a configuration value of a configuration item corresponding to the target function of the first target identification information is stored; if not, determining that the target function corresponding to the first target identification information is a combined function, and searching second target identification information for realizing a target single function of the target function; and searching the target configuration value of each configuration item corresponding to the target single function of the second target identification information according to the corresponding relation between the stored identification information of the function and the configuration value of the configuration item.
Further, the receiving processing module is further configured to receive a modified third configuration file sent by the configuration server, where the third configuration file includes identification information of a function to be modified and a configuration value of a modified configuration item; and modifying the configuration value of the configuration item corresponding to the identification information of the function to be modified in the stored corresponding relation according to the third configuration file.
Further, the receiving processing module is specifically configured to search for a keyword in the first configuration file according to information of a keyword stored in advance, and determine that content after the keyword is the first target identification information.
The embodiment of the invention also provides a configuration device of the configuration value of the function item, which is applied to a configuration server, and the device comprises:
the receiving processing module is used for receiving an input request and determining a target function to be realized carried in the request;
a generating module, configured to generate a first configuration file carrying first target identification information of the target function to be implemented;
and the sending module is used for sending the first configuration file to a service component server.
Further, the receiving processing module is further configured to receive an input operation of creating a second configuration file, and create the second configuration file, where the second configuration file includes identification information of a function and configuration values of configuration items corresponding to the function, and the configuration value of the configuration item unrelated to the implementation of the function is a default value;
the sending processing module is further configured to send the second configuration file to the service component server.
Further, the receiving processing module is further configured to receive an input operation, where the operation is an operation of modifying a configuration value of a configuration item to be modified in a function to be modified;
the generating module is further configured to generate a third configuration file according to the operation, where the third configuration file includes identification information of a function to be modified and a configuration value of a modified configuration item;
the sending module is further configured to send the third configuration file to the service component server.
An embodiment of the present invention further provides an electronic device, where the electronic device at least includes a processor and a memory, and the processor is configured to implement the steps of the method for configuring the configuration value of any one of the function items when executing the computer program stored in the memory.
The embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the steps of the method for configuring the configuration value of any one of the above-mentioned function items.
In the embodiment of the present invention, the configuration server sends the first configuration file to the service component server, where the first configuration file only includes the first target identification information of the target function to be implemented, and the service 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 stored identification information of the 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.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1 is a schematic diagram illustrating a configuration process of configuration values of a function item according to an embodiment of the present invention;
fig. 2a is a schematic diagram of a first sub-configuration file having default values of all configuration items recorded in a second configuration file according to an embodiment of the present invention;
fig. 2b is a schematic diagram of a sub-configuration module corresponding to a single function in a second configuration file according to an embodiment of the present invention;
fig. 2c is a schematic diagram of a configuration module corresponding to a combination function in a third configuration file according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a first configuration file according to an embodiment of the present invention;
FIG. 4 is an interaction diagram illustrating configuration of configuration values of function items according to an embodiment of the present invention;
FIG. 5 is a flow chart illustrating configuration values of function items according to an embodiment of the present invention;
FIG. 6 is a diagram illustrating a configuration process of configuration values of function items according to an embodiment of the present invention;
FIG. 7 is a schematic structural diagram of an apparatus for configuring configuration values of function items according to an embodiment of the present invention;
FIG. 8 is a schematic structural diagram of an apparatus for configuring configuration values of function items according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments that can be obtained by a person skilled in the art based on the embodiments of the present invention without any creative effort belong to the protection scope of the embodiments of the present invention.
In order to improve the transmission efficiency of the configuration file, reduce the occupied resources in the transmission process and improve the use experience of a user, the invention provides a method, a device, equipment and a medium for configuring the configuration values of the functional items.
Example 1:
fig. 1 is a schematic diagram of a configuration process of configuration values of function items according to an embodiment of the present invention, where the process includes:
s101: receiving a first configuration file sent by a configuration server, and determining first target identification information of a target function to be realized carried in the first configuration file.
The configuration method of the configuration value of the function item provided by the embodiment of the invention is applied to the service component server, and the service component server can be positioned at a PC (personal computer) end and the like.
In the embodiment of the present invention, the service component server receives the configuration file sent by the configuration server, and in order to distinguish from other configuration files received by the service 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, where the first target identification information may be a name, a number, and the like of the target function to be implemented, and the first target identification information is information that uniquely identifies the target function.
And after receiving the first configuration file, the service component server determines a target function to be realized in the first configuration file according to the first target identification information carried in the configuration file. Specifically, in the embodiment of the present invention, after receiving the first configuration file, according to a keyword pre-stored in the service component server, a keyword in the first configuration file is identified, where the keyword is a preset keyword, and the specific keyword may be an index, and in the embodiment of the present invention, the keyword is "use _ conf _ mod _ name", the keyword is used to search for first target identification information in the first configuration file, and a specific part after the keyword is the first target identification information. And determining first target identification information of the target function to be realized in the first configuration file according to the keyword, and further determining the target function to be realized.
Specifically, in the embodiment of the present invention, after receiving a request of a tenant, the configuration server parses the request, determines a target function to be implemented carried in the request, determines first target identification information corresponding to the target function by searching preset identification information of each function, and generates a first configuration file corresponding to the tenant. The name of the first configuration file may be named as a domain name where the tenant is located, such as aaa.
The configuration server sends the first configuration file to the service component server, and after receiving the first configuration file, the service component server identifies a keyword in the first configuration file, where in the embodiment of the present invention, the keyword is "use _ conf _ mod _ name", identifies the "═ of the keyword, and determines that the content after the" ═ is the first target identification information of the target function to be implemented.
S102: and searching the target configuration value of each configuration item corresponding to the target function of the first target identification information according to the corresponding relation between the stored identification information of the function and the configuration value of the configuration item.
In the embodiment of the invention, for each function, the configuration value of each configuration item when the service component server realizes the function is pre-stored. Therefore, when the corresponding relation between the identification information of the stored function and the configuration value of the configuration item is stored, for the configuration item for realizing the function, the configuration value of the configuration item for realizing the function is stored, and for the configuration item irrelevant to realizing the function, the default value of the configuration item is stored.
After the target function is determined, the target configuration value of each configuration item corresponding to the target function of the first target identification information may be determined according to a correspondence between the identification information of the function and the configuration value of the configuration item, which is stored in advance.
S103: and configuring the configuration value of the corresponding configuration item according to the target configuration value.
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 each found target configuration value.
In the embodiment of the present invention, the configuration server sends the first configuration file to the service component server, where the first configuration file only includes the first target identification information of the target function to be implemented, and the service 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 stored identification information of the 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.
Example 2:
in order to avoid that the configuration server sends the configuration values of all configuration items in the application system to the service component server for each request of the tenant, further reducing resources occupied during transmission, improving transmission efficiency, and improving user experience, on the basis of the above embodiment, in an embodiment of the present invention, 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 comprises identification information of functions and configuration values of configuration items corresponding to the functions, and the configuration values of the configuration items irrelevant to the realization of the functions are default values;
and storing the corresponding relation between the identification information of the function and the configuration value of the configuration item.
In the embodiment of the present invention, in order to enable the service component server to pre-store 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 service component server, where the second configuration file includes the identification information of each function and the configuration value of each configuration item corresponding to each function.
In order to save the corresponding relationship between the identification information of the function and the configuration value of the configuration item in the service component server, reduce the resources occupied during transmission, improve the transmission efficiency, and improve the use experience of the user, on the basis of 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 includes:
saving a default value corresponding to the configuration value of the configuration item according to a first sub-configuration file in the second configuration file, wherein the default value corresponding to the configuration value of the configuration item is saved in the first sub-configuration file;
and according to a second sub-configuration file in the second configuration file, storing the configuration value of the configuration item for realizing the function corresponding to the identification information of the function, wherein the identification information of the function and the configuration value of the configuration item for realizing the function corresponding to the function are stored in the second sub-configuration file.
Specifically, in the embodiment of the present invention, the second configuration file includes two sub-configuration files, and in order to distinguish 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, where the first sub-configuration file records a default value corresponding to the configuration value of each configuration item, and the second sub-configuration file stores a function that can be implemented and a configuration value of a configuration item that implements the function and corresponds to the function. And after receiving the second configuration file, saving a default value corresponding to the configuration value of each configuration item in the first sub-configuration file.
In the embodiment of the present invention, the functions in the second configuration file include a single function that can be realized by setting the configuration values of the configuration items, and a combined function that is realized by performing a plurality of single functions. In the second sub-configuration file, for each combined function, a corresponding relationship between the identification information of the combined function and the identification information of the single function implementing the combined function may be stored, and by determining the identification information of the single function implementing the combined function, and then determining the configuration value of the configuration item implementing the single function according to the identification information, the configuration value of the configuration item implementing the single function is taken as the configuration value of the configuration item implementing the combined function. In the second configuration file, for each combination function, the configuration values of the configuration items for realizing the combination function may be directly saved.
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 item required to be used for implementing the single function, and the configuration value of the configuration item when implementing the single function. The configuration module corresponding to the combination function records the identification information of the combination function, the configuration items required to be used for realizing the combination function, and the configuration value of each configuration item in realizing the combination function.
In addition to the identification information of the combined function, identification information of each single function for realizing the combined function is also recorded in the configuration module corresponding to the combined function, and a common combined function is a function including at least two single functions.
And after receiving the second configuration file, saving the configuration values of the configuration items required to be used for realizing the single function according to the sub-configuration modules corresponding to the single function aiming at each single function. And for each combined function, determining identification information of a single function for realizing the combined function according to a configuration module corresponding to the combined function, determining a configuration value of a configuration item for realizing the single function according to the identification information, and storing the configuration value of the configuration item for realizing the single function as the configuration value of the configuration item for realizing the combined function.
In the embodiment of the present invention, the service component server stores the correspondence between the identification information of the function and the configuration value of the configuration item according to the received second configuration file, specifically, stores the identification information of each single function and the configuration value of the configuration item that realizes the single function, and also stores the correspondence between the identification information of each combined function and the identification information of the single function that realizes the combined function. The configuration value of the configuration item of the target function to be realized can be determined according to the stored corresponding relation aiming at any target function to be realized, the configuration file carrying the configuration value of the configuration item of the target function to be realized is prevented from being sent to the service component server by the configuration server all the time, and one-position configuration and multi-position multiplexing are realized.
Fig. 2a is a schematic diagram of a first sub-configuration file having default values of all configuration items recorded in a second configuration file according to an embodiment of the present invention, as shown in fig. 2a, the conf _ mod _ name is a keyword in the first sub-configuration file, content behind the keyword is 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.
Fig. 2b is a schematic diagram of a sub-configuration module corresponding to a single function in a second configuration file according to an embodiment of the present invention, as shown in fig. 2b, the conf _ mod _ name is a keyword in the second sub-configuration file, the content behind the keyword is identification information of the single function, the identification information of the single function may be function1, function2, function3, or function4, and configuration items and configuration values corresponding to the configuration items required for implementing each single function are also stored in the sub-configuration module. For example, the configuration items for realizing the function of 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 for realizing the function of 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; the configuration items for realizing the function of 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 realizing the function of 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.
Fig. 2c is a schematic diagram of a configuration module corresponding to a combined function in a second configuration file according to an embodiment of the present invention, where as shown in fig. 2c, the conf _ mod _ name is a keyword in the second sub-configuration file, content behind the keyword is identification information of the combined function, the identification information of the combined function may be function11, function12, function13, or the like, and the configuration module further stores a single function that needs to be implemented when the combined function is implemented, where the use _ conf _ mod _ name is identification information of the single function that needs to be implemented. For example, in implementing the function11, the single functions that need to be implemented are function1 and function 2; when the function12 is realized, the single functions to be realized are function1 and function 3; in implementing the function13, the single functions that need to be implemented are function2 and function 3.
In order to implement the correspondence between the identification information of the function and the configuration value of the configuration item, reduce resources occupied during transmission, improve transmission efficiency, and improve user experience, on the basis of the foregoing embodiments, in an embodiment of the present invention, the correspondence between the stored identification information of the function and the configuration value of the configuration item includes:
calculating a hash value of the identification information according to the identification information of the function;
and storing the corresponding relation among the hash value, the configuration item and the corresponding configuration value in a hash table.
In the embodiment of the present invention, after receiving a second configuration file sent by a configuration server, for each function, identification information corresponding to the function in the second configuration file is determined, a hash value of the identification information is calculated, and a correspondence relationship between the hash value, a configuration item, and a corresponding configuration value is stored in a hash table.
Specifically, the second configuration file may be named g.conf, and after the second configuration file is received, a keyword in each configuration module in the second configuration file is identified, in this embodiment of the present invention, the keyword is "conf _ mod _ name", the "═ behind the keyword is identified, the content after the" ═ is identified, and the identification information corresponding to the function is determined, 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 stored in a hash table, and if there is no configuration item present in the configuration module, the configuration item unrelated to the implementation of the function is set as a default value according to the first sub-configuration file in which the default values of all configuration items are recorded in the second configuration file.
Example 3:
on the basis of the foregoing embodiments, in an embodiment of the present invention, in order to search for a configuration value of a configuration item of a target function by a configuration server, reduce resources occupied during transmission, improve transmission efficiency, and improve user experience, the searching for a target configuration value of each configuration item corresponding to first target identification information of the target function according to a correspondence between stored identification information of the function and the configuration value of the configuration item includes:
calculating a target hash value of first target identification information according to the first target identification information of the target function;
and searching the target configuration value of each configuration item corresponding to the target hash value in the hash table.
In the embodiment of the present invention, after determining the first target identification information of the target function carried in the first configuration file, according to the first target identification information of the target function, 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 in the hash table is searched.
Specifically, in the embodiment of the present invention, after a first configuration file is received, a keyword in the first configuration file is identified, where the keyword is "use _ conf _ mod _ name", the "═ behind the keyword is identified, the content after the" ═ is "is determined to be first target identification information of a target function to be implemented, then a target hash value of the first target identification information is calculated, and a target configuration value of each configuration item corresponding to the target hash value is searched in a stored hash table.
In the embodiment of the present invention, in the hash table, for each function, configuration values of all configuration items corresponding to the function may be saved, where there are configuration items related to implementing the function and configuration items unrelated to implementing the function, where the configuration value of the configuration item related to implementing the function is saved as a configuration value when implementing the function, and the configuration value of the configuration item unrelated to implementing the function is saved as a default value. In addition, in the present application, in order to reduce the storage space occupied by the hash table, only the configuration values of the configuration items for implementing the function may be saved in the hash table. Therefore, after receiving the first configuration file sent by the configuration server, the first sub-configuration file in the first configuration file, which includes the default value of the configuration value of each configuration item, is saved to the preset storage location, so that the configuration value of the configuration item, which is irrelevant to implementing the function, can be determined by the default value of the configuration item stored to the preset storage location.
In the embodiment of the present invention, when the value in the hash table stores the configuration value of the configuration item for implementing 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 implementing the target function is searched from the hash table. And for the configuration values of the configuration items irrelevant to the implementation of the target function, searching a first sub-configuration file in a preset storage position, and finding the default value of the configuration item irrelevant to the implementation of the target function according to the default value of the configuration value of each configuration item stored in the first sub-configuration file.
Fig. 3 is a schematic diagram of a first configuration file according to an embodiment of the present invention, and as shown in fig. 3, the first configuration file includes first target identification information of a 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 function x; the first target identification information of the target function to be realized carried in bb.com.conf is function12 and function y; the first target identification information of the target function to be realized carried in bb.com.conf is function13 and function z.
Fig. 4 is an interaction diagram of configuration values of function items provided in an embodiment of the present invention, and as shown in fig. 4, the process includes that a configuration server sends a first configuration file and a second configuration file to a service component server, the service component server establishes a hash table after receiving the second configuration file, stores a corresponding relationship between identification information of each function and a configuration value of a configuration item, determines first target identification information of a target function to be implemented in the first configuration file after receiving the first configuration file, determines a target configuration value of each configuration item corresponding to the target function according to the stored corresponding relationship, configures the configuration item, and sends the configured configuration item to a tenant.
Fig. 5 is a schematic diagram illustrating a configuration flow of configuration values of function items according to an embodiment of the present invention, where the process includes:
s501: and receiving a second configuration file sent by the configuration server.
S502: and calculating the hash value of the identification information according to the identification information of each function.
S503: and storing the corresponding relation among the hash value, the configuration item and the corresponding configuration value in a hash table.
S504: and receiving a first configuration file sent by a configuration server.
S505: and determining first target identification information of the target function to be realized carried in the first configuration file.
S506: and searching the target configuration value of each configuration item corresponding to the target function according to the corresponding relation between the stored identification information of the function and the configuration value of the configuration item.
S507: and configuring the configuration value of the corresponding configuration item according to the target configuration value.
Example 4:
on the basis of the foregoing embodiments, in an embodiment of the present invention, in order to search for a configuration value of a configuration item of a target function by a configuration server, reduce resources occupied during transmission, improve transmission efficiency, and improve user experience, the searching for a target configuration value of each configuration item corresponding to a target function of the first target identification information according to a correspondence between stored identification information of the function and a configuration value of the configuration item includes:
judging whether the configuration value of the configuration item corresponding to the target function of the first target identification information is stored;
if not, determining that the target function corresponding to the first target identification information is a combined function, and searching second target identification information for realizing a target single function of the target function;
and searching the target configuration value of each configuration item corresponding to the target single function of the second target identification information according to the corresponding relation between the stored identification information of the function and the configuration value of the configuration item.
In the embodiment of the present invention, when the correspondence between the identification information of the function and the configuration value of the configuration item is saved, the configuration value of the configuration item that needs to be used when the single function is implemented is saved for each single function. For each combined function, the corresponding relationship between the identification information of the combined function and the identification information of the single function implementing the combined function may be saved, or the identification information of the single function implementing the combined function is determined, 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.
After the first target identification information of the target function to be realized is determined, whether the target function corresponding to the first target identification information is a single function or not can be judged, if the target function is not a single function but a combined function, the target single function of realizing the target function can be determined, and then the target configuration value of each configuration item corresponding to the target single function is determined.
When judging whether the target function is a single function, determining first target identification information of the target function, searching whether the first target identification information exists in a hash table, and if the first target identification information does not exist in the hash table, determining that the target function is not the single function but a combined function.
Specifically, after it is determined that the target function corresponding to the first target identification information is a combined function, second target identification information for implementing a target single function of the target function is searched, and for each second target identification information, a target configuration value of each configuration item corresponding to the target single function of the second target identification information is searched according to a correspondence between the stored identification information of the function and the configuration value of the configuration item.
Example 5:
in order to implement that when the configuration value of a configuration item of a certain function in a configuration file is modified, the configuration value of the configuration item of the function stored in a service component server is also modified in the same way, so as to improve the use experience of a user, on the basis of the above embodiments, in an embodiment of the present invention, the method further includes:
receiving a modified third configuration file sent by the configuration server, wherein the third configuration file comprises identification information of a function to be modified and a configuration value of a modified configuration item;
and modifying the configuration value of the configuration item corresponding to the identification information of the function to be modified in the stored corresponding relation according to the third configuration file.
When the configuration server modifies the configuration value of the configuration item of a certain function, or adds or deletes a certain function, the modified third configuration file is sent to the service component server, and the service component server modifies the stored corresponding relation according to the modified third configuration file. If the configuration value of a certain function configuration item is modified, modifying the configuration value of the configuration item corresponding to the identification information of the function to be modified in the stored corresponding relationship according to the identification information of the function to be modified and the configuration value of the modified configuration item included in the third configuration file; if a certain function is deleted, deleting the corresponding relation between the identification information of the function and the configuration value of the configuration item in the stored corresponding relation; if a function is added, the corresponding relation between the identification information of the function and the configuration value of the configuration item is added in the stored corresponding relation.
In the embodiment of the present invention, if a fourth configuration file obtained by modifying a target function to be implemented is received, the fourth configuration file is used to update the first configuration file, and to re-determine the target function to be implemented, according to a correspondence between stored identification information of a function and configuration values of configuration items, a target configuration value of each configuration item corresponding to the first target identification information of the target function is searched, and according to the target configuration value, a configuration value of a corresponding configuration item is configured.
In the embodiment of the present invention, when the configuration server modifies the configuration value of the configuration item of a certain function, or adds or deletes a certain function, the modified third configuration file is sent to the service component server, the service component server modifies the stored corresponding relationship according to the modified third configuration file, and when configuring the target function to be implemented again, the target function is configured according to the corresponding relationship between the identification information of the updated function and the configuration value of the configuration item. Meanwhile, if the configuration values of a plurality of configuration items of one function are modified or the configuration values of the configuration items of a plurality of functions are modified, the modification at one place and the updating at multiple places can be realized through one third configuration file, and the modification efficiency of the configuration values of the function configuration items is improved.
Example 6:
in order to determine a target function to be implemented and improve a use experience of a user, on the basis of the foregoing embodiments, in an embodiment of the present invention, the determining a target function to be implemented carried in the first configuration file includes:
and searching the keywords in the first configuration file according to the information of the keywords which are saved in advance, and taking the content after the keywords as the first target identification information.
In the embodiment of the invention, after receiving the first configuration file, the service component server searches the keywords in the first configuration file according to the information of the stored keywords, and determines the content behind the keywords as the first target identification information of the target function to be realized.
Specifically, in the embodiment of the present invention, after receiving the first configuration file, according to information of a keyword pre-stored in the service component server, a keyword in the first configuration file is identified, where the keyword is a preset keyword, and specifically, the keyword may be an index, and in the embodiment of the present invention, the keyword is "use _ conf _ mod _ name", and the keyword is used to identify a position of target identification information in the first configuration file, that is, a part behind the keyword is the first target identification information. And determining first target identification information of the target function to be realized in the first configuration file according to the keyword, and further determining the target function to be realized.
Example 7:
fig. 6 is a schematic diagram of a configuration process of configuration values of a function item according to an embodiment of the present invention, where the process includes:
s601: receiving an input request, and determining a target function to be realized carried in the request.
The configuration method of the configuration value of the function item provided by the embodiment of the invention is applied to a configuration server, and the configuration server can be positioned at a PC (personal computer) end and the like.
In the embodiment of the invention, after the configuration server receives the request of the tenant, the configuration server analyzes the request and determines the target function to be realized carried in the request.
S602: and generating a first configuration file carrying first target identification information of the target function to be realized, and sending the first configuration file to a service component server.
After determining the target function to be implemented, the configuration server determines first target identification information corresponding to the target function by searching for preset identification information corresponding to each function, and generates a first configuration file corresponding to the tenant, where the name of the first configuration file may be named as a domain name where the tenant is located, for example, aaa.
In the embodiment of the invention, after the configuration server generates the first configuration file carrying the first target identification information of the target function, the first configuration file is sent to the service component server.
Example 8:
in order to avoid that the configuration server sends the configuration values of all the configuration items in the application system to the service component server for each request of the tenant, the configuration server sends the configuration values of all the configuration items in the application system to the service component server once, and the service component server can meet different requests of the tenant, reduce resources occupied during transmission, improve transmission efficiency and improve use experience of users, on the basis of the above embodiments, in the embodiment of the present invention, the method further includes:
receiving an input operation of creating a second configuration file, and creating the second configuration file, wherein the second configuration file comprises identification information of functions and configuration values of configuration items corresponding to the functions, and the configuration values of the configuration items irrelevant to the realization of the functions are default values;
and sending the second configuration file to the service component server.
In the embodiment of the present invention, the administrator may preset the second configuration file in the configuration server, and 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.
Specifically, in this embodiment of the present invention, the second configuration file includes two sub-configuration files, and in order to facilitate distinguishing 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, where the first sub-configuration file stores therein a default value corresponding to the configuration value of each configuration item, and the second sub-configuration file stores therein a function that can be implemented, and in this embodiment of the present invention, the function in the second configuration file includes a single function that can be implemented by setting the configuration value of the configuration item, and a combined function that is implemented by completing a plurality of single functions. The combined function exists in the second sub-configuration file in the form of a configuration module, and the single function exists in the second sub-configuration file in the form of a sub-configuration module, wherein the sub-configuration module corresponding to the single function records the identification information of the single function, the configuration item required to be used for realizing 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 for realizing the combined function.
Example 9:
in order to implement that when the configuration value of a configuration item of a certain function in a configuration file is modified, the configuration value of the configuration item of the function stored in a service component server is also modified in the same way, so as to improve the use experience of a user, on the basis of the above embodiments, in an embodiment of the present invention, the method further includes:
receiving an input operation, wherein the operation is an operation for modifying a configuration value of a configuration item to be modified in a function to be modified;
generating a third configuration file according to the operation, wherein the third configuration file comprises identification information of the function to be modified and a configuration value of the modified configuration item;
and sending the third configuration file to the service component server.
When an administrator modifies the configuration value of the configuration item of a certain function, the configuration server receives an input operation, wherein the operation is an operation of modifying the configuration value of the configuration item to be modified in the function to be modified, and generates a third configuration file, and the third configuration file comprises identification information of the function to be modified and the configuration value of the modified configuration item.
In the embodiment of the present invention, the administrator may further delete or add a certain function, and if the certain function is deleted, delete the corresponding relationship between the identification information of the function and the configuration value of the configuration item in the third configuration file; if a function is added, the corresponding relation between the identification information of the function and the configuration value of the configuration item is added in the third configuration file.
Example 10:
fig. 7 is a schematic structural diagram of an apparatus for configuring configuration values of function items according to an embodiment of the present invention, where the apparatus includes:
a receiving processing module 701, 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, where the first configuration file carries the first target identification information;
a searching module 702, configured to search, according to a correspondence between stored identification information of a function and configuration values of configuration items, a target configuration value of each configuration item corresponding to a target function of the first target identification information;
a configuration module 703, configured to configure the configuration value of the corresponding configuration item according to the target configuration value.
In a possible implementation manner, the receiving processing module 701 is further configured to receive a second configuration file sent by the configuration server, where the second configuration file includes identification information of a function and configuration values of configuration items corresponding to the function, and the configuration value of a configuration item that is unrelated to implementation of the function is a default value;
the device further comprises:
a saving module 704, configured to save a corresponding relationship between the identification information of the function and the configuration value of the configuration item.
In a possible implementation manner, the saving module 704 is specifically configured 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, where the first sub-configuration file stores the default value corresponding to the configuration value of the configuration item; and according to a second sub-configuration file in the second configuration file, storing the configuration value of the configuration item for realizing the function corresponding to the identification information of the function, wherein the identification information of the function and the configuration value of the configuration item for realizing the function corresponding to the function are stored in the second sub-configuration file.
In a possible implementation manner, 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 storing the corresponding relation among the hash value, the configuration item and the corresponding configuration value in a hash table.
In a possible implementation manner, the searching module 702 is specifically configured to calculate a target hash value of first target identification information according to the first target identification information of the target function; and searching the target configuration value of each configuration item corresponding to the target hash value in the hash table.
In a possible implementation manner, the searching module 702 is specifically configured to determine whether a configuration value of a configuration item corresponding to a target function of the first target identification information is stored; if not, determining that the target function corresponding to the first target identification information is a combined function, and searching second target identification information for realizing a target single function of the target function; and aiming at the second target identification information, searching the target configuration value of each configuration item corresponding to the target single function of the second target identification information according to the corresponding relation between the stored identification information of the function and the configuration value of the configuration item.
In a possible implementation manner, the receiving processing module 701 is further configured to receive a modified third configuration file sent by the configuration server, where the third configuration file includes identification information of a function to be modified and a configuration value of a modified configuration item; and modifying the configuration value of the configuration item corresponding to the identification information of the function to be modified in the stored corresponding relation according to the third configuration file.
In a possible implementation manner, the receiving processing module 701 is specifically configured to search a keyword in the first configuration file according to information of the keyword stored in advance, and determine that content after the keyword is the first target identification information.
Fig. 8 is a schematic structural diagram of an apparatus for configuring configuration values of function items according to an embodiment of the present invention, where the apparatus includes:
a receiving processing module 801, configured to receive an input request, and determine a target function to be implemented, where the target function is carried in the request;
a generating module 802, configured to generate a first configuration file carrying first target identification information of the target function to be implemented;
a sending module 803, configured to send the first configuration file to a service component server.
In a possible implementation manner, the receiving processing module 801 is further configured to receive an input operation of creating a second configuration file, and create the second configuration file, where the second configuration file includes identification information of a function and configuration values of configuration items corresponding to the function, and the configuration value of a configuration item that is unrelated to implementing the function is a default value;
the sending processing module is further configured to send the second configuration file to the service component server.
In a possible implementation manner, the receiving processing module 801 is further configured to receive an input operation, where the operation is an operation of modifying a configuration value of a configuration item to be modified in a function to be modified;
the generating module 802 is further configured to generate a third configuration file according to the operation, where the third configuration file includes identification information of a function to be modified and a configuration value of a modified configuration item;
the sending module 803 is further configured to send the third configuration file to the service component server.
Example 11:
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and on the basis of the foregoing embodiments, an embodiment of the present invention further provides an electronic device, as shown in fig. 9, including: the system comprises 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 are communicated with each other through the communication bus 904;
the memory 903 has stored therein a computer program which, when executed by the processor 901, causes the processor 901 to perform the steps of:
receiving a first configuration file sent by a configuration server, and determining first target identification information of a target function to be realized carried in the first configuration file;
searching a target configuration value of each configuration item corresponding to the target function of the first target identification information according to the corresponding relation between the stored identification information of the function and the configuration values of the configuration items;
and configuring the configuration value of the corresponding configuration item according to the target configuration value.
In a possible implementation manner, before the 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 comprises identification information of functions and configuration values of configuration items corresponding to the functions, and the configuration values of the configuration items irrelevant to the realization of the functions are default values;
and storing the corresponding relation between the identification information of the function and the configuration value of the configuration item.
In a possible implementation manner, the correspondence between the identification information of the saving function and the configuration value of the configuration item includes:
according to a first sub-configuration file in the second configuration file, saving a default value corresponding to the configuration value of a configuration item, wherein the default value corresponding to the configuration value of the configuration item is saved in the first sub-configuration file;
and according to a second sub-configuration file in the second configuration file, storing the configuration value of the configuration item for realizing the function corresponding to the identification information of the function, wherein the identification information of the function and the configuration value of the configuration item for realizing the function corresponding to the function are stored in the second sub-configuration file.
In a possible implementation manner, the correspondence between the identification information of the saving function and the configuration value of the configuration item includes:
calculating a hash value of the identification information according to the identification information of the function;
and storing the corresponding relation among the hash value, the configuration item and the corresponding configuration value in a hash table.
In a possible implementation manner, the 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 identification information of the function and the configuration value of the configuration item includes:
calculating a target hash value of first target identification information according to the first target identification information of the target function;
and searching the target configuration value of each configuration item corresponding to the target hash value in the hash table.
In a possible implementation manner, the 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 stored identification information of the function and the configuration value of the configuration item includes:
judging whether the configuration value of the configuration item corresponding to the target function of the first target identification information is stored;
if not, determining that the target function corresponding to the first target identification information is a combined function, and searching second target identification information for realizing a target single function of the target function;
and searching the target configuration value of each configuration item corresponding to the target single function of the second target identification information according to the corresponding relation between the stored identification information of the function and the configuration value of the configuration item.
In one possible embodiment, the method further comprises:
receiving a modified third configuration file sent by the configuration server, wherein the third configuration file comprises identification information of a function to be modified and a configuration value of a modified configuration item;
and modifying the configuration value of the configuration item corresponding to the identification information of the function to be modified in the stored corresponding relation according to the third configuration file.
In a possible implementation manner, the determining first target identification information of the target function to be implemented, which is carried in the first configuration file, includes:
and searching keywords in the first configuration file according to information of the keywords which are saved in advance, and determining the content after the keywords as the first target identification information.
Because the principle of the electronic device for solving the problem is similar to the method for configuring the configuration value of the function item, the method can be used for implementing the electronic device, and repeated details are not described herein.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface 902 is used for communication between the electronic apparatus and other apparatuses.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Alternatively, the memory may be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a central processing unit, a Network Processor (NP), and the like; but may also be a Digital instruction processor (DSP), an application specific integrated circuit, a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like.
Fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and on the basis of the foregoing embodiments, an embodiment of the present invention further provides an electronic device, as shown in fig. 10, including: the system comprises 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 are communicated with each other through the communication bus 1004;
the memory 1003 has stored therein a computer program which, when executed by the processor 1001, causes the processor 1001 to perform the steps of:
receiving an input request, and determining a target function to be realized carried in the request;
and generating a first configuration file carrying first target identification information of the target function to be realized, and sending the first configuration file to a service component server.
In one possible embodiment, the method further comprises:
receiving an input operation of creating a second configuration file, and creating the second configuration file, wherein the second configuration file comprises identification information of functions and configuration values of configuration items corresponding to the functions, and the configuration values of the configuration items irrelevant to the realization of the functions are default values;
and sending the second configuration file to the service component server.
In one possible embodiment, the method further comprises:
receiving an input operation, wherein the operation is an operation for modifying a configuration value of a configuration item to be modified in a function to be modified;
generating a third configuration file according to the operation, wherein the third configuration file comprises identification information of the function to be modified and a configuration value of the modified configuration item;
and sending the third configuration file to the service component server.
Because the principle of the electronic device for solving the problem is similar to the method for configuring the configuration value of the function item, the method can be used for implementing the electronic device, and repeated details are not described herein.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface 902 is used for communication between the electronic apparatus and other apparatuses.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Alternatively, the memory may be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a central processing unit, a Network Processor (NP), and the like; but may also be a Digital instruction processor (DSP), an application specific integrated circuit, a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like.
Example 12:
on the basis of the foregoing embodiments, the present invention further provides a computer-readable storage medium, in which a computer program executable by a processor is stored, and when the program runs on the processor, the processor is caused to execute the following steps:
receiving a first configuration file sent by a configuration server, and determining first target identification information of a target function to be realized carried in the first configuration file;
searching a target configuration value of each configuration item corresponding to the target function of the first target identification information according to the corresponding relation between the stored identification information of the function and the configuration values of the configuration items;
and configuring the configuration value of the corresponding configuration item according to the target configuration value.
In a possible implementation manner, before the 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 comprises identification information of functions and configuration values of configuration items corresponding to the functions, and the configuration values of the configuration items irrelevant to the realization of the functions are default values;
and storing the corresponding relation between the identification information of the function and the configuration value of the configuration item.
In a possible implementation manner, the correspondence between the identification information of the saving function and the configuration value of the configuration item includes:
according to a first sub-configuration file in the second configuration file, saving a default value corresponding to the configuration value of a configuration item, wherein the default value corresponding to the configuration value of the configuration item is saved in the first sub-configuration file;
and according to a second sub-configuration file in the second configuration file, storing the configuration value of the configuration item for realizing the function corresponding to the identification information of the function, wherein the identification information of the function and the configuration value of the configuration item for realizing the function corresponding to the function are stored in the second sub-configuration file.
In a possible implementation manner, the correspondence between the identification information of the saving function and the configuration value of the configuration item includes:
calculating a hash value of the identification information according to the identification information of the function;
and storing the corresponding relation among the hash value, the configuration item and the corresponding configuration value in a hash table.
In a possible implementation manner, the 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 identification information of the function and the configuration value of the configuration item includes:
calculating a target hash value of first target identification information according to the first target identification information of the target function;
and searching the target configuration value of each configuration item corresponding to the target hash value in the hash table.
In a possible implementation manner, the 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 stored identification information of the function and the configuration value of the configuration item includes:
judging whether the configuration value of the configuration item corresponding to the target function of the first target identification information is stored;
if not, determining that the target function corresponding to the first target identification information is a combined function, and searching second target identification information for realizing a target single function of the target function;
and searching the target configuration value of each configuration item corresponding to the target single function of the second target identification information according to the corresponding relation between the stored identification information of the function and the configuration value of the configuration item.
In one possible embodiment, the method further comprises:
receiving a modified third configuration file sent by the configuration server, wherein the third configuration file comprises identification information of a function to be modified and a configuration value of a modified configuration item;
and modifying the configuration value of the configuration item corresponding to the identification information of the function to be modified in the stored corresponding relation according to the third configuration file.
In a possible implementation manner, the determining first target identification information of the target function to be implemented, which is carried in the first configuration file, includes:
and searching keywords in the first configuration file according to information of the keywords which are saved in advance, and determining the content after the keywords as the first target identification information.
Since the principle of solving the problems of the computer-readable medium is similar to the method for configuring the configuration values of the function items, after the processor executes the computer program in the computer-readable medium, the steps implemented may refer to the other embodiments, and repeated details are not repeated.
On the basis of the foregoing embodiments, the present invention further provides a computer-readable storage medium, in which a computer program executable by a processor is stored, and when the program runs on the processor, the processor is caused to execute the following steps:
receiving an input request, and determining a target function to be realized carried in the request;
and generating a first configuration file carrying first target identification information of the target function to be realized, and sending the first configuration file to a service component server.
In one possible embodiment, the method further comprises:
receiving an input operation of creating a second configuration file, and creating the second configuration file, wherein the second configuration file comprises identification information of functions and configuration values of configuration items corresponding to the functions, and the configuration values of the configuration items irrelevant to the realization of the functions are default values;
and sending the second configuration file to the service component server.
In one possible embodiment, the method further comprises:
receiving an input operation, wherein the operation is an operation for modifying a configuration value of a configuration item to be modified in a function to be modified;
generating a third configuration file according to the operation, wherein the third configuration file comprises identification information of the function to be modified and a configuration value of the modified configuration item;
and sending the third configuration file to the service component server.
Since the principle of solving the problems of the computer-readable medium is similar to the method for configuring the configuration values of the function items, after the processor executes the computer program in the computer-readable medium, the steps implemented may refer to the other embodiments, and repeated details are not repeated.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such 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 such modifications and variations.

Claims (15)

1. A method for configuring configuration values of function items is applied to a service component server, and the method comprises the following steps:
receiving a first configuration file sent by a configuration server, and determining first target identification information of a target function to be realized carried in the first configuration file;
searching a target configuration value of each configuration item corresponding to the target function of the first target identification information according to the corresponding relation between the stored identification information of the function and the configuration values of the configuration items;
and configuring the configuration value of the corresponding configuration item according to the target configuration value.
2. The method of claim 1, wherein before receiving the first configuration file sent by the configuration server, the method further comprises:
receiving a second configuration file sent by the configuration server, wherein the second configuration file comprises identification information of functions and configuration values of configuration items corresponding to the functions, and the configuration values of the configuration items irrelevant to the realization of the functions are default values;
and storing the corresponding relation between the identification information of the function and the configuration value of the configuration item.
3. The method according to claim 2, wherein the correspondence between the identification information of the save function and the configuration value of the configuration item comprises:
saving a default value corresponding to the configuration value of the configuration item according to a first sub-configuration file in the second configuration file, wherein the default value corresponding to the configuration value of the configuration item is saved in the first sub-configuration file;
and according to a second sub-configuration file in the second configuration file, storing the configuration value of the configuration item for realizing the function corresponding to the identification information of the function, wherein the identification information of the function and the configuration value of the configuration item for realizing the function corresponding to the function are stored in the second sub-configuration file.
4. The method according to claim 2 or 3, wherein the correspondence between the identification information of the save function and the configuration value of the configuration item comprises:
calculating a hash value of the identification information according to the identification information of the function;
and storing the corresponding relation among the hash value, the configuration item and the corresponding configuration value in a hash table.
5. The method according to claim 4, wherein the 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 identification information of the function and the configuration value of the configuration item comprises:
calculating a target hash value of first target identification information according to the first target identification information of the target function;
and searching the target configuration value of each configuration item corresponding to the target hash value in the hash table.
6. The method according to claim 1, wherein the 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 storage function and the configuration value of the configuration item comprises:
judging whether the configuration value of the configuration item corresponding to the target function of the first target identification information is stored;
if not, determining that the target function corresponding to the first target identification information is a combined function, and searching second target identification information for realizing a target single function of the target function;
and searching the target configuration value of each configuration item corresponding to the target single function of the second target identification information according to the corresponding relation between the stored identification information of the function and the configuration value of the configuration item.
7. The method according to claim 1 or 2, characterized in that the method further comprises:
receiving a modified third configuration file sent by the configuration server, wherein the third configuration file comprises identification information of a function to be modified and a configuration value of a modified configuration item;
and modifying the configuration value of the configuration item corresponding to the identification information of the function to be modified in the stored corresponding relation according to the third configuration file.
8. The method according to claim 1, wherein the determining first target identification information of the target function to be implemented carried in the first configuration file comprises:
and searching keywords in the first configuration file according to information of the keywords which are saved in advance, and determining the content after the keywords as the first target identification information.
9. A method for configuring configuration values of function items is applied to a configuration server, and the method comprises the following steps:
receiving an input request, and determining a target function to be realized carried in the request;
and generating a first configuration file carrying first target identification information of the target function to be realized, and sending the first configuration file to a service component server.
10. The method of claim 9, further comprising:
receiving an input operation of creating a second configuration file, and creating the second configuration file, wherein the second configuration file comprises identification information of functions and configuration values of configuration items corresponding to the functions, and the configuration values of the configuration items irrelevant to the realization of the functions are default values;
and sending the second configuration file to the service component server.
11. The method of claim 9, further comprising:
receiving an input operation, wherein the operation is an operation for modifying a configuration value of a configuration item to be modified in a function to be modified;
generating a third configuration file according to the operation, wherein the third configuration file comprises identification information of the function to be modified and a configuration value of the modified configuration item;
and sending the third configuration file to the service component server.
12. An apparatus for configuring configuration values of function items, which is applied to a service component server, the apparatus comprising:
the receiving processing module is used for receiving a first configuration file sent by a configuration server and determining first target identification information of a target function to be realized carried in the first configuration file;
the searching module is used for searching the target configuration value of each configuration item corresponding to the target function of the first target identification information according to the corresponding relation between the stored identification information of the function and the configuration value of the configuration item;
and the configuration module is used for configuring the configuration values of the corresponding configuration items according to the target configuration values.
13. An apparatus for configuring configuration values of function items, applied to a configuration server, the apparatus comprising:
the receiving processing module is used for receiving an input request and determining a target function to be realized carried in the request;
a generating module, configured to generate a first configuration file carrying first target identification information of the target function to be implemented;
and the sending module is used for sending the first configuration file to a service component server.
14. An electronic device, characterized in that the electronic device comprises at least a processor and a memory, the processor being adapted to carry out the steps of the method for configuring configuration values of functional items according to any of claims 1-8 or claims 9-11 when executing a computer program stored in the memory.
15. A computer-readable storage medium, characterized in that it stores a computer program which, when being executed by a processor, carries out the steps of the method of configuration values of functional items according to any one of claims 1 to 8 or claims 9 to 11.
CN202110532504.8A 2021-05-17 2021-05-17 Method, device, equipment and medium for configuring configuration values of function items Pending CN113157346A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110532504.8A CN113157346A (en) 2021-05-17 2021-05-17 Method, device, equipment and medium for configuring configuration values of function items

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110532504.8A CN113157346A (en) 2021-05-17 2021-05-17 Method, device, equipment and medium for configuring configuration values of function items

Publications (1)

Publication Number Publication Date
CN113157346A true CN113157346A (en) 2021-07-23

Family

ID=76876377

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110532504.8A Pending CN113157346A (en) 2021-05-17 2021-05-17 Method, device, equipment and medium for configuring configuration values of function items

Country Status (1)

Country Link
CN (1) CN113157346A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010034257A1 (en) * 2008-09-28 2010-04-01 华为技术有限公司 Method for terminal configuration and management and terminal apparatus
CN104219281A (en) * 2014-07-30 2014-12-17 浙江吉利控股集团有限公司 Vehicle personalized function configuring method and system based on CAN bus
CN109951318A (en) * 2019-02-22 2019-06-28 珠海天燕科技有限公司 The function configuration method and device of application
CN110244987A (en) * 2019-06-18 2019-09-17 腾讯科技(深圳)有限公司 Configuration data processing method, device, readable storage medium storing program for executing and computer equipment
CN112214237A (en) * 2020-09-24 2021-01-12 交控科技股份有限公司 CBTC subsystem function configuration method and device based on feature grouping

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010034257A1 (en) * 2008-09-28 2010-04-01 华为技术有限公司 Method for terminal configuration and management and terminal apparatus
CN104219281A (en) * 2014-07-30 2014-12-17 浙江吉利控股集团有限公司 Vehicle personalized function configuring method and system based on CAN bus
CN109951318A (en) * 2019-02-22 2019-06-28 珠海天燕科技有限公司 The function configuration method and device of application
CN110244987A (en) * 2019-06-18 2019-09-17 腾讯科技(深圳)有限公司 Configuration data processing method, device, readable storage medium storing program for executing and computer equipment
CN112214237A (en) * 2020-09-24 2021-01-12 交控科技股份有限公司 CBTC subsystem function configuration method and device based on feature grouping

Similar Documents

Publication Publication Date Title
US7937456B2 (en) Configuration profiling for remote clients
WO2021012568A1 (en) Data processing method and related device
CN109391509A (en) A kind of method, system and the application server of more new application
US9110884B2 (en) Message publishing and subscribing method and apparatus
CN110427386B (en) Data processing method, device and computer storage medium
EP3093809B1 (en) Systems and methods for state machine management
CN104754062A (en) Internet based information popularization method, server and user terminal
TW201401210A (en) Pushing Business Objects
CN109753424B (en) AB test method and device
CN109885729B (en) Method, device and system for displaying data
CN104484413A (en) Method and device for obtaining searching results
CN108520401B (en) User list management method, device, platform and storage medium
US9547730B2 (en) Adaptive query processor for query systems with limited capabilities
CN107483565B (en) Service background identification method, proxy server and computer storage medium
CN107491700B (en) Data access method and equipment
CN110955460B (en) Service process starting method and device, electronic equipment and storage medium
CN113157346A (en) Method, device, equipment and medium for configuring configuration values of function items
CN113495723B (en) Method, device and storage medium for calling functional component
CN110619204A (en) Invitation code generation method and device, terminal equipment and storage medium
US10042957B2 (en) Devices and methods for implementing dynamic collaborative workflow systems
US11144593B2 (en) Indexing structure with size bucket indexes
GB2522832A (en) A method and a system for loading data with complex relationships
CN113868687A (en) Task processing progress management method and device
US11023672B1 (en) Dynamic service injection
CN109213815B (en) Method, device, server terminal and readable medium for controlling execution times

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination