CN115563030A - Configuration data processing method and device, electronic equipment and storage medium - Google Patents
Configuration data processing method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN115563030A CN115563030A CN202211196461.1A CN202211196461A CN115563030A CN 115563030 A CN115563030 A CN 115563030A CN 202211196461 A CN202211196461 A CN 202211196461A CN 115563030 A CN115563030 A CN 115563030A
- Authority
- CN
- China
- Prior art keywords
- configuration data
- target
- target configuration
- data
- cache
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0806—Multiuser, multiprocessor or multiprocessing cache systems
- G06F12/0811—Multiuser, multiprocessor or multiprocessing cache systems with multilevel cache hierarchies
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1448—Management of the data involved in backup or backup restore
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/20—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
- G06F11/2053—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant
- G06F11/2094—Redundant storage or storage space
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application discloses a method and a device for processing configuration data, electronic equipment and a storage medium. The method comprises the following steps: receiving a data query request from a requester; responding to the data query request, and querying whether target configuration data is stored from a cache to obtain a first query result; under the condition that the first query result is used for indicating that the target configuration data are not stored in the cache, querying the target configuration data from the business configuration library to obtain a second query result; and acquiring a data processing strategy corresponding to the second query result, acquiring target configuration data by using the data processing strategy, and sending the target configuration data to the requester. The method comprises the steps of firstly obtaining target configuration data through caches in multi-level storage, and obtaining the target configuration data from a business configuration library if the target configuration data does not exist in the caches. Therefore, the target configuration data of the target service is obtained based on the multi-level storage mode, and compared with the method of using a single storage device to store the configuration data, the flexibility of data storage is improved.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for processing configuration data, an electronic device, and a storage medium.
Background
In the conventional process of acquiring service configuration data, developers generally edit an entity class carrying configuration items manually, and acquire service configuration data through the written entity class. However, in the conventional method for acquiring service configuration data, usually program developers perform fixed storage in a single storage device after completing configuration, and when the device fails, a service requester cannot acquire configuration data in time, which affects system operation.
Disclosure of Invention
In order to solve the technical problem or at least partially solve the technical problem, the present application provides a method and an apparatus for processing configuration data, an electronic device, and a storage medium.
According to an aspect of an embodiment of the present application, there is provided a method for processing configuration data, including:
receiving a data query request from a requester, wherein the data query request is used for requesting to query target configuration data currently corresponding to a target service;
responding to the data query request, and querying whether the target configuration data is stored from a cache to obtain a first query result;
under the condition that the first query result is used for indicating that the target configuration data are not stored in the cache, querying the target configuration data from a service configuration library to obtain a second query result;
and acquiring a data processing strategy corresponding to the second query result, acquiring the target configuration data by using the data processing strategy, and sending the target configuration data to the requester.
Further, the method further comprises:
reading the target configuration data from the cache if the first query result is used for indicating that the target configuration data is stored in the cache;
and sending the target configuration data to the requester.
Further, when the second query result is that the query is normal, the obtaining the target configuration data by using the data processing policy includes:
and determining the configuration data associated with the target service in the service configuration library as the target configuration data.
Further, after determining the configuration data associated with the target service in the service configuration library as the target configuration data, the method further includes:
writing the target configuration data into the cache, and inquiring whether backup configuration data corresponding to the target service is stored in a backup database or not to obtain a third inquiry result;
writing the target configuration data into the backup database under the condition that the third query result is that the backup configuration data is not stored; or, when the third query result is that the backup configuration data is stored, comparing the target configuration data with the backup configuration data, and when the target configuration data is inconsistent with the backup configuration data, updating the backup configuration data by using the target configuration data.
Further, after writing the target configuration data into the cache, the method further includes:
obtaining a cache result corresponding to the target configuration data;
detecting abnormal configuration data in the cache under the condition that the cache result is used for indicating that the target configuration data is overtime;
and deleting the abnormal configuration data and rewriting the target configuration data into the cache.
Further, when the second query result is a query exception, the obtaining the target configuration data by using the data processing policy includes:
acquiring backup configuration data corresponding to the target service from a backup database;
and determining the backup configuration data with the shortest configuration time from the current time in the backup configuration data as the target configuration data.
Further, in a case that the second query result is a query exception, the method further includes:
acquiring a log file generated when the target configuration data is inquired from a service configuration library;
and generating alarm information based on the log file, and sending the alarm information.
According to still another aspect of the embodiments of the present application, there is provided a device for processing configuration data, including:
the system comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving a data query request from a requester, and the data query request is used for requesting to query target configuration data currently corresponding to a target service;
the response module is used for responding to the data query request, and querying whether the target configuration data is stored or not from a cache to obtain a first query result;
the query module is used for querying the target configuration data from a business configuration library to obtain a second query result under the condition that the first query result is used for indicating that the target configuration data is not stored in the cache;
and the processing module is used for acquiring a data processing strategy corresponding to the second query result, acquiring the target configuration data by using the data processing strategy and sending the target configuration data to the requester.
According to another aspect of the embodiments of the present application, there is also provided a storage medium including a stored program that executes the above steps when the program is executed.
According to another aspect of the embodiments of the present application, there is also provided an electronic apparatus, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete mutual communication through the communication bus: wherein: a memory for storing a computer program; a processor for executing the steps of the method by running the program stored in the memory.
Embodiments of the present application also provide a computer program product containing instructions, which when run on a computer, cause the computer to perform the steps of the above method.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages: the method provided by the embodiment of the application firstly obtains the target configuration data through the cache in the multi-level storage, and if the target configuration data does not exist in the cache, the target configuration data is obtained from the business configuration library. Therefore, the target configuration data of the target service is acquired based on the multi-level storage mode, the requesting party can flexibly acquire the configuration data, and compared with the method of using a single storage device to store the configuration data, the flexibility of data storage is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive labor.
Fig. 1 is a flowchart of a method for processing configuration data according to an embodiment of the present disclosure;
fig. 2 is a block diagram of a device for processing configuration data according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments, and the illustrative embodiments and descriptions thereof of the present application are used for explaining the present application and do not constitute a limitation to the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making creative efforts shall fall within the protection scope of the present application.
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 similar 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. The term "comprising", without further limitation, means that the element so defined is not excluded from the group consisting of additional identical elements in the process, method, article, or apparatus that comprises the element.
The embodiment of the application provides a method and a device for processing configuration data, electronic equipment and a storage medium. The method provided by the embodiment of the present invention may be applied to any required electronic device, for example, the electronic device may be an electronic device such as a server and a terminal, and the method is not specifically limited herein, and for convenience of description, the method is hereinafter simply referred to as an electronic device.
According to an aspect of embodiments of the present application, a method embodiment of a method for processing configuration data is provided. Fig. 1 is a flowchart of a method for processing configuration data according to an embodiment of the present application, and as shown in fig. 1, the method includes:
step S11, receiving a data query request from a requester, wherein the data query request is used for requesting to query target configuration data currently corresponding to a target service.
The method provided by the embodiment of the present application is applied to an intelligent terminal, where the intelligent terminal receives a data query request from a requester, and it should be noted that when the requester needs to apply configuration data of a certain service, the service is determined as a target service, for example: house rental business, house cleaning business, etc. And then generating a data query request based on the service identifier of the target service, and sending the data query request to the intelligent terminal. The intelligent terminal analyzes the data query request to obtain a service identifier carried in the data query request, and then queries target configuration data corresponding to the target service currently by using the service identifier.
And S12, responding to the data query request, and querying whether the target configuration data is stored from the cache to obtain a first query result.
In the embodiment of the application, under the condition that the first query result is used for indicating that the target configuration data is stored in the cache, reading the target configuration data from the cache; and sending the target configuration data to the requester.
In the embodiment of the application, after responding to the data query request, the intelligent terminal queries whether the target configuration data is stored or not from the cache by using the service identifier, so as to obtain a first query result. The cache stores key value pairs, the key names of the key value pairs are service identifiers, and the key values of the key value pairs are configuration data. Based on this, whether a target key value pair matched with the service identifier of the target service exists or not can be inquired from the cached key value pair, if so, the first inquiry result is that target configuration data is stored in the cache, at this time, the configuration data carried by the key value in the target key value pair is determined as the target configuration data, and the data of the target spouse is sent to the requester. And if the target configuration data does not exist, the first query result is that the target configuration data is not stored in the cache.
And step S13, under the condition that the first query result is used for indicating that the target configuration data is not stored in the cache, querying the target configuration data from the service configuration library to obtain a second query result.
In this embodiment of the application, when the first query result is used to indicate that the target configuration data is not stored in the cache, the target configuration data is queried from the service configuration library to obtain a second query result, where the second query result includes that the service configuration stock is in the target configuration data, or that the service configuration library does not have the target configuration data.
And S14, acquiring a data processing strategy corresponding to the second query result, acquiring target configuration data by using the data processing strategy, and sending the target configuration data to the requester.
In this embodiment of the present application, when the second query result is that the query is normal, acquiring the target configuration data by using the data processing policy includes: and determining the configuration data associated with the target service in the service configuration library as target configuration data.
Specifically, a configuration data table corresponding to each service is stored in the service configuration library, the configuration data table includes at least one historical configuration data of the service, the intelligent terminal firstly obtains a target configuration data table corresponding to a target service from the service configuration library by using a service identifier, determines configuration time corresponding to each historical configuration data from the target configuration data table, and determines the historical configuration data with the shortest configuration time from the current time as the target configuration data.
The method provided by the embodiment of the application firstly obtains the target configuration data through the cache in the multi-level storage, and if the target configuration data does not exist in the cache, the target configuration data is obtained from the business configuration library. Therefore, the target configuration data of the target service is acquired based on the multi-level storage mode, the requesting party can flexibly acquire the configuration data, and compared with the method of using a single storage device to store the configuration data, the flexibility of data storage is improved.
In this embodiment of the present application, after determining the configuration data associated with the target service in the service configuration library as the target configuration data, the method further includes the following steps A1-A2:
step A1, writing the target configuration data into a cache, and inquiring whether backup configuration data corresponding to the target service is stored in a backup database or not to obtain a third inquiry result.
Step A2, under the condition that the third query result is that the backup configuration data are not stored, writing the target configuration data into a backup database; or, when the third query result is that the backup configuration data is stored, comparing the target configuration data with the backup configuration data, and when the target configuration data is inconsistent with the backup configuration data, updating the backup configuration data by using the target configuration data.
In the embodiment of the application, in order to facilitate other subsequent requesters to quickly acquire the target configuration data of the target service, the intelligent terminal writes the target configuration data into the cache. And simultaneously inquiring whether the backup configuration data corresponding to the target service is stored in the backup database or not to obtain a third inquiry result. And under the condition that the third query result is that the backup configuration data are not stored, the intelligent terminal copies the target configuration data to the backup database so as to backup the target configuration data.
Or, in the case that the third query result indicates that the backup configuration data is stored, comparing the backup configuration data in the backup database with the target configuration data, and if the backup configuration data is consistent with the target configuration data, not updating the backup configuration data. And if the two are not consistent, updating the backup configuration data by using the target configuration data.
In this embodiment of the present application, after writing the target configuration data into the cache, the method further includes the following steps B1 to B3:
and B1, obtaining a cache result corresponding to the target configuration data.
And step B2, detecting abnormal configuration data in the cache under the condition that the cache result is used for indicating that the target configuration data is overtime.
And step B3, deleting the abnormal configuration data, and writing the target configuration data into the cache again.
In the embodiment of the application, the intelligent terminal can also monitor a cache result obtained after the target configuration data is written into the cache. If the caching result is used for indicating that the target configuration data cache is overtime, the current cached storage amount may exceed the storage amount threshold, and at this time, the intelligent terminal may detect abnormal configuration data currently existing in the cache, specifically, detect storage time corresponding to each configuration data in the cache, and determine the configuration data of which the storage time is greater than the preset time as candidate configuration time. And then detecting whether each configuration item in each candidate configuration data is completely configured or not to obtain the corresponding integrity degree of the candidate configuration data. And finally determining the candidate configuration data with the integrity degree lower than the preset integrity degree as abnormal configuration data.
In the embodiment of the application, after the intelligent terminal detects the abnormal configuration data, the abnormal configuration data is deleted from the cache, and the target configuration data is written into the cache again. Thereby facilitating the subsequent other requesters to quickly query the target configuration data from the cache.
In this embodiment of the present application, when the second query result is a query exception, acquiring target configuration data by using a data processing policy, includes the following steps C1-C2:
and step C1, obtaining backup configuration data corresponding to the target service from a backup database.
And step C2, determining the backup configuration data with the shortest configuration time and the shortest current time in the backup configuration data as the target configuration data.
In the embodiment of the application, when the second query result is that the query is abnormal, backup configuration data corresponding to the target service is acquired from the backup database, historical configuration time corresponding to each backup configuration data is determined, and the backup configuration data with the historical configuration time shortest from the current time is determined as the target configuration data. In addition, before feeding back the target configuration data to the requesting party, it is also necessary to verify whether the target configuration data is correct, and if it is confirmed that the target configuration data is correct, the target configuration data is sent to the requesting party. And if the target configuration data is wrong, sending the target configuration data to the target terminal for correction, and sending the corrected target configuration data fed back by the target terminal to the requester.
In this embodiment of the application, when the second query result is a query exception, the method further includes: acquiring a log file generated when target configuration data is inquired from a business configuration library; and generating alarm information based on the log file, and sending the alarm information.
According to the method provided by the embodiment of the application, under the condition that the service configuration library is abnormal, the last correct configuration data of the target service can be immediately found from the backup database and returned to the requesting party for use, and the system problem is avoided. Meanwhile, alarm information is generated, so that a worker can maintain the service configuration library quickly.
Fig. 2 is a block diagram of a device for processing configuration data according to an embodiment of the present application, where the device may be implemented as part of or all of an electronic device through software, hardware, or a combination of the two. As shown in fig. 2, the apparatus includes:
a receiving module 21, configured to receive a data query request from a requester, where the data query request is used to request to query target configuration data currently corresponding to a target service;
the response module 22 is configured to respond to the data query request, and query whether to store the target configuration data from the cache to obtain a first query result;
the query module 23 is configured to query the target configuration data from the service configuration library to obtain a second query result when the first query result is used to indicate that the target configuration data is not stored in the cache;
and the processing module 24 is configured to obtain a data processing policy corresponding to the second query result, obtain target configuration data by using the data processing policy, and send the target configuration data to the requester.
In an embodiment of the present application, a device for processing configuration data includes: and the reading module is used for reading the target configuration data from the cache and sending the target configuration data to the requester under the condition that the first query result is used for indicating that the target configuration data is stored in the cache.
In this embodiment of the application, when the second query result is that the query is normal, the processing module 24 is configured to determine configuration data associated with the target service in the service configuration library as the target configuration data.
In an embodiment of the present application, a device for processing configuration data includes: the write-in module is used for writing the target configuration data into the cache, and inquiring whether the backup configuration data corresponding to the target service is stored in the backup database or not to obtain a third inquiry result; writing the target configuration data into the backup database under the condition that the third query result is that the backup configuration data is not stored; or, when the third query result is that the backup configuration data is stored, comparing the target configuration data with the backup configuration data, and when the target configuration data is inconsistent with the backup configuration data, updating the backup configuration data by using the target configuration data.
In an embodiment of the present application, a device for processing configuration data includes: the detection module is used for acquiring a cache result corresponding to the target configuration data; detecting abnormal configuration data in the cache under the condition that the cache result is used for indicating that the target configuration data is overtime; and deleting the abnormal configuration data and rewriting the target configuration data into the cache.
In this embodiment of the present application, when the second query result is a query exception, the processing module 24 is configured to obtain backup configuration data corresponding to the target service from the backup database; and determining the backup configuration data with the shortest configuration time from the current time in the backup configuration data as the target configuration data.
In this embodiment of the present application, in a case that the second query result is a query exception, the processing apparatus for configuring data includes: the alarm module is used for acquiring a log file generated when target configuration data is inquired from the service configuration library; and generating alarm information based on the log file, and sending the alarm information.
An embodiment of the present application further provides an electronic device, as shown in fig. 3, the electronic device may include: the system comprises a processor 1501, a communication interface 1502, a memory 1503 and a communication bus 1504, wherein the processor 1501, the communication interface 1502 and the memory 1503 complete communication with each other through the communication bus 1504.
A memory 1503 for storing a computer program;
the processor 1501 is configured to implement the steps of the foregoing embodiments when executing the computer program stored in the memory 1503.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus 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 is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In another embodiment provided by the present application, there is also provided a computer-readable storage medium having stored therein instructions, which when executed on a computer, cause the computer to execute a method for processing configuration data as described in any one of the above embodiments, the method including:
receiving a data query request from a requester, wherein the data query request is used for requesting to query target configuration data currently corresponding to a target service;
responding to the data query request, and querying whether target configuration data is stored from a cache to obtain a first query result;
under the condition that the first query result is used for indicating that the target configuration data are not stored in the cache, querying the target configuration data from the business configuration library to obtain a second query result;
and acquiring a data processing strategy corresponding to the second query result, acquiring target configuration data by using the data processing strategy, and sending the target configuration data to the requester.
Further, the method further comprises:
under the condition that the first query result is used for indicating that the target configuration data are stored in the cache, reading the target configuration data from the cache;
and sending the target configuration data to the requester.
Further, when the second query result is that the query is normal, acquiring the target configuration data by using the data processing policy, including:
and determining the configuration data associated with the target service in the service configuration library as target configuration data.
Further, after determining the configuration data associated with the target service in the service configuration library as the target configuration data, the method further includes:
writing the target configuration data into a cache, and inquiring whether backup configuration data corresponding to the target service is stored in a backup database or not to obtain a third inquiry result;
writing the target configuration data into the backup database under the condition that the third query result is that the backup configuration data is not stored; or, when the third query result is that the backup configuration data is stored, comparing the target configuration data with the backup configuration data, and when the target configuration data is inconsistent with the backup configuration data, updating the backup configuration data by using the target configuration data.
Further, after writing the target configuration data into the cache, the method further includes:
obtaining a cache result corresponding to the target configuration data;
detecting abnormal configuration data in the cache under the condition that the cache result is used for indicating that the target configuration data is overtime;
and deleting the abnormal configuration data and rewriting the target configuration data into the cache.
Further, when the second query result is a query exception, acquiring target configuration data by using a data processing policy, including:
acquiring backup configuration data corresponding to the target service from a backup database;
and determining the backup configuration data with the shortest configuration time from the current time in the backup configuration data as the target configuration data.
Further, in the case that the second query result is a query exception, the method further includes:
acquiring a log file generated when target configuration data is inquired from a business configuration library;
and generating alarm information based on the log file, and sending the alarm information.
In yet another embodiment provided by the present application, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the method for processing configuration data as described in any of the above embodiments.
In the above embodiments, all or part of the implementation may be realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions described in accordance with the embodiments of the application are all or partially generated when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, digital subscriber line) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk), among others.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the scope of protection of the present application.
The previous description is only an example of the present application, and is provided to enable any person skilled in the art to understand or implement the present application. 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 application. Thus, the present application 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 method for processing configuration data, comprising:
receiving a data query request from a requester, wherein the data query request is used for requesting to query target configuration data currently corresponding to a target service;
responding to the data query request, and querying whether the target configuration data is stored from a cache to obtain a first query result;
under the condition that the first query result is used for indicating that the target configuration data are not stored in the cache, querying the target configuration data from a service configuration library to obtain a second query result;
and acquiring a data processing strategy corresponding to the second query result, acquiring the target configuration data by using the data processing strategy, and sending the target configuration data to the requester.
2. The method of claim 1, further comprising:
reading the target configuration data from the cache if the first query result is used for indicating that the target configuration data is stored in the cache;
and sending the target configuration data to the requester.
3. The method according to claim 1, wherein in a case that the second query result is query-normal, the obtaining the target configuration data by using the data processing policy includes:
and determining the configuration data associated with the target service in the service configuration library as the target configuration data.
4. The method of claim 3, wherein after determining the configuration data associated with the target service in the service configuration repository as the target configuration data, the method further comprises:
writing the target configuration data into the cache, and inquiring whether backup configuration data corresponding to the target service is stored in a backup database or not to obtain a third inquiry result;
writing the target configuration data into the backup database under the condition that the third query result is that the backup configuration data is not stored; or, when the third query result is that the backup configuration data is stored, comparing the target configuration data with the backup configuration data, and when the target configuration data is inconsistent with the backup configuration data, updating the backup configuration data by using the target configuration data.
5. The method of claim 4, wherein after writing the target configuration data to the cache, the method further comprises:
obtaining a cache result corresponding to the target configuration data;
detecting abnormal configuration data in the cache under the condition that the cache result is used for indicating that the target configuration data cache is overtime;
and deleting the abnormal configuration data, and rewriting the target configuration data into the cache.
6. The method according to claim 1, wherein in a case that the second query result is a query exception, said obtaining the target configuration data by using the data processing policy includes:
acquiring backup configuration data corresponding to the target service from a backup database;
and determining the backup configuration data with the shortest configuration time from the current time in the backup configuration data as the target configuration data.
7. The method of claim 1, wherein if the second query result is a query exception, the method further comprises:
acquiring a log file generated when the target configuration data is inquired from a service configuration library;
and generating alarm information based on the log file, and sending the alarm information.
8. An apparatus for processing configuration data, comprising:
the system comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving a data query request from a requester, and the data query request is used for requesting to query target configuration data currently corresponding to a target service;
the response module is used for responding to the data query request, and querying whether the target configuration data is stored or not from a cache to obtain a first query result;
the query module is used for querying the target configuration data from a business configuration library to obtain a second query result under the condition that the first query result is used for indicating that the target configuration data is not stored in the cache;
and the processing module is used for acquiring a data processing strategy corresponding to the second query result, acquiring the target configuration data by using the data processing strategy and sending the target configuration data to the requester.
9. A storage medium, characterized in that the storage medium comprises a stored program, wherein the program when executed performs the method steps of any of the preceding claims 1 to 7.
10. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus; wherein:
a memory for storing a computer program;
a processor for performing the method steps of any of claims 1 to 7 by executing a program stored on a memory.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211196461.1A CN115563030A (en) | 2022-09-29 | 2022-09-29 | Configuration data processing method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211196461.1A CN115563030A (en) | 2022-09-29 | 2022-09-29 | Configuration data processing method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115563030A true CN115563030A (en) | 2023-01-03 |
Family
ID=84743785
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211196461.1A Pending CN115563030A (en) | 2022-09-29 | 2022-09-29 | Configuration data processing method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115563030A (en) |
-
2022
- 2022-09-29 CN CN202211196461.1A patent/CN115563030A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110008041B (en) | Message processing method and device | |
CN112202633B (en) | Block chain network testing method and device, electronic equipment and readable storage medium | |
US11455117B2 (en) | Data reading method, apparatus, and system, avoiding version rollback issues in distributed system | |
CN111475519B (en) | Data caching method and device | |
WO2020233351A1 (en) | Blockchain-oriented data management method, apparatus and device, and storage medium | |
CN109600254B (en) | Method for generating full-link log and related system | |
CN114328029B (en) | Backup method and device of application resources, electronic equipment and storage medium | |
CN110311975B (en) | Data request processing method and device | |
CN111831915A (en) | Method, device, electronic equipment and storage medium for responding to data query request | |
CN111125240B (en) | Distributed transaction realization method and device, electronic equipment and storage medium | |
CN113900798A (en) | System memory processing method and device, electronic equipment and storage medium | |
CN110727895B (en) | Sensitive word sending method and device, electronic equipment and storage medium | |
CN110674153B (en) | Data consistency detection method and device and electronic equipment | |
CN112579682A (en) | Data model change notification method and device, electronic device and storage medium | |
CN115563030A (en) | Configuration data processing method and device, electronic equipment and storage medium | |
CN110955460A (en) | Service process starting method and device, electronic equipment and storage medium | |
CN115858668A (en) | Distributed transaction processing method, device, electronic device and storage medium | |
CN112115521A (en) | Data access method and device | |
CN114356211A (en) | Storage space processing method and device, electronic equipment and storage medium | |
CN110083509B (en) | Method and device for arranging log data | |
US7058773B1 (en) | System and method for managing data in a distributed system | |
CN109254855B (en) | Registration method and device of parameter transmission protocol and electronic equipment | |
JP4628830B2 (en) | System for ensuring the integrity of data stored in DBMS | |
CN110764697A (en) | Data management method and device | |
CN112543213B (en) | Data processing method and device |
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 |