CN112783674A - Configuration management method, device, equipment and medium - Google Patents

Configuration management method, device, equipment and medium Download PDF

Info

Publication number
CN112783674A
CN112783674A CN202110124870.XA CN202110124870A CN112783674A CN 112783674 A CN112783674 A CN 112783674A CN 202110124870 A CN202110124870 A CN 202110124870A CN 112783674 A CN112783674 A CN 112783674A
Authority
CN
China
Prior art keywords
configuration data
configuration
type information
data
data type
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
CN202110124870.XA
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.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network 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 Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202110124870.XA priority Critical patent/CN112783674A/en
Publication of CN112783674A publication Critical patent/CN112783674A/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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • 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/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the disclosure relates to a configuration management method, a device, equipment and a medium, wherein the method comprises the following steps: acquiring a configuration data acquisition request sent by a target program through a process, wherein the configuration data acquisition request comprises data type information, and the number of the processes is at least one; and if the configuration data corresponding to the data type information is found in the process cache corresponding to the process, returning the configuration data corresponding to the data type information to the target program, wherein the process and the process cache are in one-to-one correspondence, and the configuration data corresponding to the various data type information is stored in the process cache. In the embodiment of the disclosure, by adding the process-level cache, the configuration data of multiple data types can be stored in the cache, and accessing the cache avoids locking and data type conversion, so that the efficiency of the application program for acquiring the configuration data is improved, and the performance of the application program is further improved.

Description

Configuration management method, device, equipment and medium
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a configuration management method, apparatus, device, and medium.
Background
With the continuous development of intelligent devices, a plurality of application programs can be run in the intelligent devices to realize various functions. Many applications need to be run dependent on configuration data.
Currently, configuration data is stored in shared memory, from which applications can be retrieved. However, according to the above scheme, when the application program accesses the shared memory through the process, locking and data type conversion are required, so that the performance of the application program is reduced.
Disclosure of Invention
To solve the above technical problem or at least partially solve the above technical problem, the present disclosure provides a configuration management method, apparatus, device, and medium.
The embodiment of the disclosure provides a configuration management method, which comprises the following steps:
acquiring a configuration data acquisition request sent by a target program through a process, wherein the configuration data acquisition request comprises data type information, and the number of the processes is at least one;
and if the configuration data corresponding to the data type information is found in the process cache corresponding to the process, returning the configuration data corresponding to the data type information to the target program, wherein the process is in one-to-one correspondence with the process cache, and the configuration data corresponding to various data type information is stored in the process cache.
An embodiment of the present disclosure further provides a configuration management apparatus, where the apparatus includes:
the configuration acquisition request module is used for acquiring a configuration data acquisition request sent by a target program through processes, wherein the configuration data acquisition request comprises data type information, and the number of the processes is at least one;
and a configuration data returning module, configured to return the configuration data corresponding to the data type information to the target program if the configuration data corresponding to the data type information is found in the process cache corresponding to the process, where the process is in one-to-one correspondence with the process cache, and the process cache stores therein configuration data corresponding to multiple data type information.
An embodiment of the present disclosure further provides an electronic device, which includes: a processor; a memory for storing the processor-executable instructions; the processor is used for reading the executable instructions from the memory and executing the instructions to realize the configuration management method provided by the embodiment of the disclosure.
The embodiment of the present disclosure also provides a computer-readable storage medium, which stores a computer program for executing the configuration management method provided by the embodiment of the present disclosure.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages: according to the configuration management scheme provided by the embodiment of the disclosure, a configuration data acquisition request sent by a target program is acquired through a process, wherein the configuration data acquisition request comprises data type information, and the number of the processes is at least one; and if the configuration data corresponding to the data type information is found in the process cache corresponding to the process, returning the configuration data corresponding to the data type information to the target program, wherein the process and the process cache are in one-to-one correspondence, and the configuration data corresponding to the various data type information is stored in the process cache. In the embodiment of the disclosure, by adding the process-level cache, the configuration data of multiple data types can be stored in the cache, and accessing the cache avoids locking and data type conversion, so that the efficiency of the application program for acquiring the configuration data is improved, and the performance of the application program is further improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present disclosure, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic flowchart of a configuration management method according to an embodiment of the present disclosure;
fig. 2 is a schematic flow chart of another configuration management method according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a configuration management apparatus according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, aspects of the present disclosure will be further described below. It should be noted that the embodiments and features of the embodiments of the present disclosure may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced in other ways than those described herein; it is to be understood that the embodiments disclosed in the specification are only a few embodiments of the present disclosure, and not all embodiments.
Currently, configuration data is stored in shared memory, from which applications can be retrieved. The scheme has the following defects that the application program needs to be locked when accessing the shared memory through the process, and because the shared memory can only store the configuration data of one data type, such as the configuration data of a character string type, the application program needs to perform data conversion after reading the configuration data from the shared memory through the process, and converts the configuration data into a proper data type for reuse, so that the performance of the application program is reduced. In order to solve the above problem, an embodiment of the present disclosure provides a configuration management method.
Fig. 1 is a flowchart illustrating a configuration management method according to an embodiment of the present disclosure, where the method may be executed by a configuration management apparatus, where the apparatus may be implemented by software and/or hardware, and may be generally integrated in an electronic device. As shown in fig. 1, the method may be applied to a service server, where the configuration management apparatus is configured, and includes:
step 101, acquiring a configuration data acquisition request sent by a target program through a process, wherein the configuration data acquisition request includes data type information, and the number of the processes is at least one.
The service server in the embodiments of the present disclosure may have a multi-process structure, the number of the processes may be multiple, and the service server may provide specific data for the application executing function, for example, may provide configuration data. The target program may be any application program depending on the configuration data, and is not limited in particular. For example, the target program can be a live program, a communication program and the like. The configuration data acquisition request is a request for acquiring configuration data by a target program, and the request comprises data type information of the configuration data required to be acquired by the target program. The data type information may be identification information indicating a specific data type, for example, a character String may be indicated by "String". The data type information includes at least one of: object Notation (JSON), character strings, numbers, arrays, boolean types, and the like.
In the embodiment of the present disclosure, the service server may obtain, through the process, the configuration data acquisition request sent by the target program, where the configuration data acquisition request includes data type information of configuration data required by the current target program, and data types of configuration data required by different application programs may be different, so that the data type information is also different.
At present, when the configuration data is modified, the modification time of the configuration data changes, and the application program may check whether the modification time of the configuration file changes at regular time, for example, the application program may check once every minute, and if the modification time of the configuration file changes, the configuration data is read again. However, the above-mentioned update scheme of the configuration data is slow, after the configuration data is modified, the latest configuration data can be read only when the application program needs to check the configuration data next time, and even if the configuration data is not changed, the application program can monitor at regular time, which wastes Central Processing Unit (CPU) resources, and further reduces the performance of the application program.
In the embodiment of the present disclosure, the configuration data acquisition request is a request sent by the target program after receiving the configuration update command sent by the configuration server, and the configuration update command is a command sent to the target program after the configuration server updates the general configuration data. After the configuration server updates the general configuration data, it may send a configuration update command to the target program, for example, send a configuration update command "update _ conf", and send the general configuration data to the service server for storage; after the target program receives the configuration update command, it may send a configuration data acquisition request to the server storing the general configuration data to acquire updated configuration data.
In the scheme, the target program can realize a configuration updating command, when the live program receives the command, the configuration data is immediately acquired without periodic monitoring, the waste of a CPU is reduced, and the performance of the target program is improved.
And 102, if the configuration data corresponding to the data type information is found in the process cache corresponding to the process, returning the configuration data corresponding to the data type information to the target program, wherein the process and the process cache are in one-to-one correspondence, and the configuration data corresponding to the multiple data type information is stored in the process cache.
The process cache is a process-level cache newly added in the service server in the embodiment of the present disclosure, and a corresponding process cache may be set for each process, where the processes correspond to the process caches one to one, that is, each process has a single cache and is not shared with other processes. Configuration data corresponding to various data type information can be stored in each process cache so as to be returned when requested by an application program.
In the embodiment of the present disclosure, after the configuration data acquisition request sent by the target program is acquired by the process, the process cache corresponding to the current process may be searched, and if the configuration data corresponding to the data type information exists in the process cache, the configuration data corresponding to the data type information is returned to the target program. The target program receives the configuration data and can perform corresponding operations, for example, when the target program is a live program, a server which needs to perform streaming can be determined according to the configuration data.
The configuration management method in the embodiment of the present disclosure may further include: and if the configuration data corresponding to the data type information is not found in the process cache corresponding to the process, acquiring the general configuration data in the shared memory, converting the general configuration data into the configuration data corresponding to the data type information, and returning the configuration data to the target program. The shared memory corresponds to each process, and the shared memory supports access of each process.
The shared memory refers to a common memory in the service server, each process can access data in the memory, and after the data in the shared memory is updated, the data acquired by each process is also the updated data. In the embodiment of the present disclosure, the shared memory stores general configuration data, where the general configuration data refers to configuration data of a fixed data type, and for example, the general configuration data may be configuration data whose data type is a character string.
If the configuration data corresponding to the data type information is not found in the process cache corresponding to the current process, the service server can access the shared memory, acquire the general configuration data in the shared memory, perform data conversion on the general configuration data to obtain the configuration data corresponding to the data type information, and then return the configuration data corresponding to the data type information to the target program.
In the embodiment of the present disclosure, before acquiring the general configuration data in the shared memory, the method further includes: and calling a locking function to lock the general configuration data in the shared memory. When each process acquires data in the shared memory, the general configuration data needs to be locked, and specifically, the locking can be performed by calling a locking function until the unlocking is performed after the general configuration data is acquired. Through locking, the write operation of other processes to the general configuration data can be avoided, and data errors are avoided.
In the embodiment of the present disclosure, a scheme of two-level caching may be adopted in a service server corresponding to an application program, that is, a shared memory and a process cache are added, the process cache may store configuration data of any data type, and conversion of data types is not required when accessing the process cache, so that performance of the application program is improved.
According to the configuration management scheme provided by the embodiment of the disclosure, a configuration data acquisition request sent by a target program is acquired through a process, wherein the configuration data acquisition request comprises data type information, and the number of the processes is at least one; and if the configuration data corresponding to the data type information is found in the process cache corresponding to the process, returning the configuration data corresponding to the data type information to the target program, wherein the process and the process cache are in one-to-one correspondence, and the configuration data corresponding to the various data type information is stored in the process cache. In the embodiment of the disclosure, by adding the process-level cache, the configuration data of multiple data types can be stored in the cache, and accessing the cache avoids locking and data type conversion, so that the efficiency of the application program for acquiring the configuration data is improved, and the performance of the application program is further improved.
In some embodiments, after converting the general configuration data into the configuration data corresponding to the data type information, the method further includes: and storing the configuration data corresponding to the data type information in a process cache corresponding to the process.
In the embodiment of the present disclosure, if there is no configuration data corresponding to the data type information in the process cache of the current process, the general configuration data in the shared memory is obtained, the general configuration data is subjected to data conversion to obtain the configuration data corresponding to the data type information, and then the configuration data corresponding to the data type information may be updated to the process cache of the current process, so that the configuration information corresponding to the data type information may be directly returned when a subsequent request is made.
For example, when the digital type configuration data does not exist in the process cache, the digital type configuration data may be converted from the common string type configuration data in the shared memory and returned to the target program, and the digital type configuration data may be stored in the process cache for subsequent use.
The configuration data of the plurality of data types are stored in the process cache, so that most of the configuration data can be directly obtained from the process cache without obtaining the configuration data from the shared memory, locking and data type conversion are avoided, and the efficiency of obtaining the configuration data is improved.
Fig. 2 is a schematic flow chart of another configuration management method provided in the embodiment of the present disclosure, and the embodiment further optimizes the configuration management method on the basis of the above embodiment. As shown in fig. 2, the method includes:
step 201, obtaining a configuration data obtaining request sent by a target program through a process.
The configuration data acquisition request comprises data type information, and the number of the processes is at least one. The data type information includes at least one of: object numbered musical notation, character strings, numbers, arrays, and boolean types.
The configuration data acquisition request is a request sent by the target program after receiving a configuration update command sent by the configuration server, and the configuration update command is a command sent to the target program after the configuration server updates the general configuration data.
Illustratively, when the target program is a live program, the live program implements a configuration update command "update _ conf", and when the live program receives the command, the live program immediately reads the configuration data, and the steps of the configuration update are as follows: 1. the configuration data is updated. The configuration data may specifically be updated by a configuration server. 2. A configuration update command "update _ conf" is sent to the live program. 3. And the live broadcast program receives a configuration update command 'update _ conf' and immediately reads the configuration data of the service server. 4. At this point, the configuration of the configuration data is in effect.
Step 202, whether the configuration data corresponding to the data type information is found in the process cache corresponding to the process, if yes, step 203 is executed; otherwise, step 204 is performed.
And step 203, returning the configuration data corresponding to the data type information to the target program.
The process and the process cache are in one-to-one correspondence, and configuration data corresponding to various data type information are stored in the process cache.
The process cache is a process-level cache newly added in the service server in the embodiment of the present disclosure, and a corresponding process cache may be set for each process, where the processes correspond to the process caches one to one, that is, each process has a single cache and is not shared with other processes. Configuration data corresponding to various data type information can be stored in each process cache so as to be returned when requested by an application program.
In the embodiment of the present disclosure, after the configuration data acquisition request sent by the target program is acquired by the process, the process cache corresponding to the current process may be searched, and if the configuration data corresponding to the data type information exists in the process cache, the configuration data corresponding to the data type information is returned to the target program. The target program receives the configuration data and can perform corresponding operations, for example, when the target program is a live program, a server which needs to perform streaming can be determined according to the configuration data.
And step 204, calling a locking function to lock the general configuration data in the shared memory.
Step 205, obtaining the general configuration data in the shared memory, converting the general configuration data into configuration data corresponding to the data type information, and returning the configuration data to the target program.
The shared memory corresponds to each process, and the shared memory supports access of each process.
The shared memory refers to a common memory in the service server, each process can access data in the memory, and after the data in the shared memory is updated, the data acquired by each process is also the updated data. In the embodiment of the present disclosure, the shared memory stores general configuration data, where the general configuration data refers to configuration data of a fixed data type, and for example, the general configuration data may be configuration data whose data type is a character string.
If the configuration data corresponding to the data type information is not found in the process cache corresponding to the current process, the service server can access the shared memory, acquire the general configuration data in the shared memory, perform data conversion on the general configuration data to obtain the configuration data corresponding to the data type information, and then return the configuration data corresponding to the data type information to the target program.
And step 206, storing the configuration data corresponding to the data type information in the process cache corresponding to the process.
In the embodiment of the disclosure, the shared memory can be accessed by a plurality of processes, and each process needs to be locked when acquiring data; and only the configuration data of the character string type is stored in the shared memory, and the data used in the process is of other data types and needs to be subjected to data type conversion. Each process is independently provided with a process cache, and is not shared with other processes, so that locking is not needed; and configuration data of any data type can be stored in the process cache, and data type conversion is not needed.
The overall process of the embodiment of the disclosure may be as follows: the server reads the configuration data into the shared memory, and each process acquires the data in the shared memory for the first time, converts the data into a proper data type and stores the data into each process cache corresponding to the process; when a request of an application program comes, corresponding configuration data can be directly acquired from a process cache of a current process without locking or data type conversion; if the configuration data required by the request does not exist in the cache of the current process, the general configuration data can be obtained from the shared memory, locking is required at the moment, data type conversion is required, the configuration data after the data type conversion is returned to the application program, and the data is updated to the process cache of the current process. Therefore, most of the time, the process cache corresponding to the process has the required configuration data and can be directly accessed.
In the embodiment of the disclosure, the application program can acquire the configuration data from the corresponding process cache through the process without locking or data type conversion, so that the performance of the application program is improved; and after the configuration data is updated, the application program can immediately read the latest configuration data according to the configuration updating command, the configuration immediately takes effect, the application program does not need to periodically detect, the waste of a CPU is reduced, and the performance of a live program is improved.
According to the configuration management scheme provided by the embodiment of the disclosure, a configuration data acquisition request sent by a target program is acquired through a process, and if configuration data corresponding to data type information is found in a process cache corresponding to the process, the configuration data corresponding to the data type information is returned to the target program; and if the configuration data corresponding to the data type information is not found in the process cache corresponding to the process, calling a locking function to lock the general configuration data in the shared memory, acquiring the general configuration data in the shared memory, converting the general configuration data into the configuration data corresponding to the data type information, returning the configuration data to the target program, and storing the configuration data corresponding to the data type information in the process cache corresponding to the process. In the embodiment of the disclosure, by adding the process-level cache, the configuration data of multiple data types can be stored in the cache, and accessing the cache avoids locking and data type conversion, so that the efficiency of the application program for acquiring the configuration data is improved, and the performance of the application program is further improved.
Fig. 3 is a schematic structural diagram of a configuration management apparatus provided in an embodiment of the present disclosure, where the apparatus may be implemented by software and/or hardware, and may be generally integrated in an electronic device. As shown in fig. 3, the apparatus includes:
a configuration acquisition request module 301, configured to acquire, through a process, a configuration data acquisition request sent by a target program, where the configuration data acquisition request includes data type information, and the number of the process is at least one;
a configuration data returning module 302, configured to return the configuration data corresponding to the data type information to the target program if the configuration data corresponding to the data type information is found in a process cache corresponding to the process, where the process is in one-to-one correspondence with the process cache, and the process cache stores therein configuration data corresponding to multiple data type information.
According to the configuration management scheme provided by the embodiment of the disclosure, a configuration data acquisition request sent by a target program is acquired through a process, wherein the configuration data acquisition request comprises data type information, and the number of the processes is at least one; and if the configuration data corresponding to the data type information is found in the process cache corresponding to the process, returning the configuration data corresponding to the data type information to the target program, wherein the process and the process cache are in one-to-one correspondence, and the configuration data corresponding to the various data type information is stored in the process cache. In the embodiment of the disclosure, by adding the process-level cache, the configuration data of multiple data types can be stored in the cache, and accessing the cache avoids locking and data type conversion, so that the efficiency of the application program for acquiring the configuration data is improved, and the performance of the application program is further improved.
Optionally, the apparatus further includes a general configuration data module, specifically configured to:
and if the configuration data corresponding to the data type information is not found in the process cache corresponding to the process, acquiring the general configuration data in the shared memory, converting the general configuration data into the configuration data corresponding to the data type information, and returning the configuration data to the target program.
Optionally, the shared memory corresponds to each of the processes, and the shared memory supports access of each of the processes.
Optionally, the apparatus further includes a configuration data caching module, specifically configured to: after converting the general configuration data into the configuration data corresponding to the data type information,
and storing the configuration data corresponding to the data type information in a process cache corresponding to the process.
Optionally, the apparatus further includes a locking module, specifically configured to: and before the general configuration data in the shared memory is obtained, calling a locking function to lock the general configuration data in the shared memory.
Optionally, the configuration data obtaining request is a request sent by the target program after receiving a configuration update command sent by a configuration server, and the configuration update command is a command sent to the target program after the configuration server updates the general configuration data.
Optionally, the data type information includes at least one of: object numbered musical notation, character strings, numbers, arrays, and boolean types.
The configuration management device provided by the embodiment of the disclosure can execute the configuration management method provided by any embodiment of the disclosure, and has corresponding functional modules and beneficial effects of the execution method.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 4, the electronic device 400 includes one or more processors 401 and memory 402.
The processor 401 may be a Central Processing Unit (CPU) or other form of processing unit having data processing capabilities and/or instruction execution capabilities, and may control other components in the electronic device 400 to perform desired functions.
Memory 402 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, Random Access Memory (RAM), cache memory (cache), and/or the like. The non-volatile memory may include, for example, Read Only Memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium and executed by processor 401 to implement the configuration management methods of the embodiments of the present disclosure described above and/or other desired functions. Various contents such as an input signal, a signal component, a noise component, etc. may also be stored in the computer-readable storage medium.
In one example, the electronic device 400 may further include: an input device 403 and an output device 404, which are interconnected by a bus system and/or other form of connection mechanism (not shown).
The input device 403 may also include, for example, a keyboard, a mouse, and the like.
The output device 404 may output various information to the outside, including the determined distance information, direction information, and the like. The output devices 404 may include, for example, a display, speakers, a printer, and a communication network and its connected remote output devices, among others.
Of course, for simplicity, only some of the components of the electronic device 400 relevant to the present disclosure are shown in fig. 4, omitting components such as buses, input/output interfaces, and the like. In addition, electronic device 400 may include any other suitable components depending on the particular application.
In addition to the above methods and apparatus, embodiments of the present disclosure may also be a computer program product comprising computer program instructions that, when executed by a processor, cause the processor to perform the configuration management methods provided by embodiments of the present disclosure.
The computer program product may write program code for carrying out operations for embodiments of the present disclosure in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server.
Furthermore, embodiments of the present disclosure may also be a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, cause the processor to perform the configuration management method provided by embodiments of the present disclosure.
The computer-readable storage medium may take any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may include, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present disclosure, which enable those skilled in the art to understand or practice the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A configuration management method, comprising:
acquiring a configuration data acquisition request sent by a target program through a process, wherein the configuration data acquisition request comprises data type information, and the number of the processes is at least one;
and if the configuration data corresponding to the data type information is found in the process cache corresponding to the process, returning the configuration data corresponding to the data type information to the target program, wherein the process is in one-to-one correspondence with the process cache, and the configuration data corresponding to various data type information is stored in the process cache.
2. The method of claim 1, further comprising:
and if the configuration data corresponding to the data type information is not found in the process cache corresponding to the process, acquiring the general configuration data in the shared memory, converting the general configuration data into the configuration data corresponding to the data type information, and returning the configuration data to the target program.
3. The method of claim 2, wherein the shared memory corresponds to each of the processes, and wherein the shared memory supports access by each of the processes.
4. The method according to claim 2, wherein after converting the general configuration data into the configuration data corresponding to the data type information, the method further comprises:
and storing the configuration data corresponding to the data type information in a process cache corresponding to the process.
5. The method of claim 2, further comprising, prior to the obtaining the common configuration data in the shared memory:
and calling a locking function to lock the general configuration data in the shared memory.
6. The method of claim 2,
the configuration data acquisition request is a request sent by the target program after receiving a configuration update command sent by a configuration server, and the configuration update command is a command sent to the target program after the configuration server updates the general configuration data.
7. The method of any of claims 1-6, wherein the data type information comprises at least one of: object numbered musical notation, character strings, numbers, arrays, and boolean types.
8. A configuration management apparatus, comprising:
the configuration acquisition request module is used for acquiring a configuration data acquisition request sent by a target program through processes, wherein the configuration data acquisition request comprises data type information, and the number of the processes is at least one;
and a configuration data returning module, configured to return the configuration data corresponding to the data type information to the target program if the configuration data corresponding to the data type information is found in the process cache corresponding to the process, where the process is in one-to-one correspondence with the process cache, and the process cache stores therein configuration data corresponding to multiple data type information.
9. An electronic device, characterized in that the electronic device comprises:
a processor;
a memory for storing the processor-executable instructions;
the processor is configured to read the executable instructions from the memory and execute the instructions to implement the configuration management method of any of claims 1-7.
10. A computer-readable storage medium, characterized in that the storage medium stores a computer program for executing the configuration management method of any of the preceding claims 1-7.
CN202110124870.XA 2021-01-29 2021-01-29 Configuration management method, device, equipment and medium Pending CN112783674A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110124870.XA CN112783674A (en) 2021-01-29 2021-01-29 Configuration management method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110124870.XA CN112783674A (en) 2021-01-29 2021-01-29 Configuration management method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN112783674A true CN112783674A (en) 2021-05-11

Family

ID=75759779

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110124870.XA Pending CN112783674A (en) 2021-01-29 2021-01-29 Configuration management method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN112783674A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118093212A (en) * 2024-04-23 2024-05-28 北京控达科技有限公司 Synchronization method for multi-user task access global variable and related equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017020743A1 (en) * 2015-08-06 2017-02-09 阿里巴巴集团控股有限公司 Method and device for sharing cache data
CN110413386A (en) * 2019-06-27 2019-11-05 深圳市富途网络科技有限公司 Multiprocessing method, apparatus, terminal device and computer readable storage medium
CN110597739A (en) * 2019-06-03 2019-12-20 上海云盾信息技术有限公司 Configuration management method, system and equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017020743A1 (en) * 2015-08-06 2017-02-09 阿里巴巴集团控股有限公司 Method and device for sharing cache data
CN110597739A (en) * 2019-06-03 2019-12-20 上海云盾信息技术有限公司 Configuration management method, system and equipment
CN110413386A (en) * 2019-06-27 2019-11-05 深圳市富途网络科技有限公司 Multiprocessing method, apparatus, terminal device and computer readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118093212A (en) * 2024-04-23 2024-05-28 北京控达科技有限公司 Synchronization method for multi-user task access global variable and related equipment

Similar Documents

Publication Publication Date Title
CN110674432A (en) Second-level caching method and device and computer readable storage medium
CN110597739A (en) Configuration management method, system and equipment
CN111177271B (en) Data storage method, device and computer equipment for persistence of kafka data to hdfs
CN108153803B (en) Data acquisition method and device and electronic equipment
CN101790868A (en) Monitoring of newly added computer network resources having service level objectives
CN112182036A (en) Data sending and writing method and device, electronic equipment and readable storage medium
US20070233696A1 (en) Apparatus, Method, and Program Product for Information Processing
CN112783674A (en) Configuration management method, device, equipment and medium
CN110321367B (en) Data storage method, data query method, related device and electronic equipment
US20230089710A1 (en) Data request server code and configuration file deployment
CN111831915A (en) Method, device, electronic equipment and storage medium for responding to data query request
CN111382206A (en) Data storage method and device
CN111708720A (en) Data caching method, device, equipment and medium
US9798746B2 (en) Dynamic map template discovery and map creation
CN112000690B (en) Method and device for analyzing structured operation statement
CN111522879B (en) Data distribution method based on cache and electronic equipment
CN117076491A (en) Data processing method, storage medium and equipment
CN108388424B (en) Method and device for calling interface data and electronic equipment
US11494371B2 (en) Computer system and data management method
CN111881220B (en) Data operation method and device under list storage, electronic equipment and storage medium
CN112068899B (en) Plug-in loading method and device, electronic equipment and storage medium
CN110968267B (en) Data management method, device, server and system
US8001533B2 (en) Maintaining object referential integrity for abstract objects
CN112347794A (en) Data translation method, device, equipment and computer storage medium
CN109739874B (en) Method, apparatus, computer device and storage medium for providing data content

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