Data query method and device and electronic equipment

By receiving the configuration query request of the software system, determining the target configuration center and converting the query parameters, the problem of high complexity and poor compatibility of cross-data center configuration data access between different software systems is solved, and efficient compatibility and efficiency of cross-configuration centers is achieved. promote.

CN119292654APending Publication Date: 2025-01-10CHINA TELECOM BESTPAY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411440253.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

When accessing configuration data across data centers between different software systems, the complexity is high and the compatibility is poor, and the existing technology has not been effectively solved.

Method used

Provide a data query method, which receives configuration query requests from the software system, determines the target configuration center, converts query requests to match query parameters, accesses the target configuration center, and parses the returned data, so as to achieve compatibility and efficiency improvements across configuration centers.

Benefits of technology

There is no need to care about what configuration center the software system uses, quickly query configuration data, reduce the complexity of cross-configuration center access, and improve compatibility and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119292654A_ABST
    Figure CN119292654A_ABST
Patent Text Reader

Abstract

The invention discloses a data query method and device and electronic equipment. The method comprises the following steps: receiving a configuration query request of a first software system for a second software system; determining a target configuration center corresponding to the second software system from a plurality of configuration centers based on the configuration query request; converting the configuration query request into a target query parameter matched with a target configuration center, and accessing the target configuration center based on the target query parameter; and receiving configuration data of the second software system returned by the target configuration center, and sending the configuration data to the first software system. According to the method and the device, the technical problems that the complexity of configuration data acquisition is relatively high and the compatibility is poor when configuration data access is carried out across data centers among different software systems in related technologies are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software development, and in particular to a data query method, device and electronic equipment. Background Art

[0002] With the continuous development of information technology, a single configuration center can no longer fully meet the needs of upgraded systems. For example, the architecture of a new project (such as a new version of a software system) will be significantly different from that of an old project (such as an old version of a software system). The configuration center will also choose a newer architecture accordingly, so it is inevitable that the new and old projects will query different configuration centers.

[0003] The configuration data of the new and old projects exist in different configuration centers. For example, the configuration data of the old project is stored in the Zookeeper configuration center, and the relevant configuration data of the new project is stored in the Dynamic Naming and Configuration Service (Nacos) configuration center. When the new and old projects access each other's configuration data, data access needs to be performed across configuration centers. The corresponding configuration centers between the new and old projects are incompatible, and the complexity of obtaining configuration data across data centers is high.

[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present invention provide a data query method, device and electronic device to at least solve the technical problems in the related art of high complexity and poor compatibility of configuration data acquisition when different software systems access configuration data across data centers.

[0006] According to one aspect of an embodiment of the present invention, there is provided a data query method, comprising: receiving a configuration query request from a first software system for a second software system; determining a target configuration center corresponding to the second software system from multiple configuration centers based on the configuration query request; converting the configuration query request into a target query parameter that matches the target configuration center, and accessing the target configuration center based on the target query parameter; receiving configuration data of the second software system returned by the target configuration center, and sending the configuration data to the first software system.

[0007] Optionally, determining a target configuration center corresponding to the second software system from multiple configuration centers based on the configuration query request includes: obtaining a system name of the second software system from the configuration query request; querying a preset routing rule based on the system name of the second software system to obtain the target configuration center corresponding to the second software system, wherein the preset routing rule is used to indicate the correspondence between the configuration center and the system name of the software system.

[0008] Optionally, converting the configuration query request into target query parameters that match the target configuration center includes: obtaining the system name of the first software system from the configuration query request; querying the preset routing rule based on the system name of the first software system to obtain the configuration center corresponding to the first software system; detecting whether the configuration center corresponding to the first software system is the target configuration center; and converting the configuration query request into the target query parameters if the configuration center corresponding to the first software system is not the target configuration center.

[0009] Optionally, the method further includes: when the configuration center corresponding to the first software system is the target configuration center, accessing the target configuration center based on the configuration query request.

[0010] Optionally, converting the configuration query request into a target query parameter that matches the target configuration center includes: obtaining a configuration item to be queried of the second software system from the configuration query request; determining a target adaptation rule corresponding to the target configuration center from a plurality of preset adaptation rules, wherein the target adaptation rule is used to indicate a conversion relationship between a configuration item and a query parameter; and converting the configuration item to be queried into the target query parameter using the target adaptation rule.

[0011] Optionally, determining a target configuration center corresponding to the second software system from multiple configuration centers based on the configuration query request includes: detecting whether a format of the configuration query request is a predetermined format; and when the format of the configuration query request is the predetermined format, determining the target configuration center corresponding to the second software system from multiple configuration centers.

[0012] Optionally, the method further includes: when the format of the configuration query request is not the predetermined format, generating an error prompt message based on difference information between the format of the configuration query request and the predetermined format; and returning the error prompt message to the first software system.

[0013] Optionally, sending the configuration data to the first software system includes: parsing the configuration data, wherein the parsing is used to parse the configuration data into a format supported by the first software system; and sending the parsed configuration data to the first software system.

[0014] According to another aspect of an embodiment of the present invention, a data query device is also provided, including: a receiving module, used to receive a configuration query request from a first software system for a second software system; a determination module, used to determine a target configuration center corresponding to the second software system from multiple configuration centers based on the configuration query request; a conversion module, used to convert the configuration query request into a target query parameter matching the target configuration center, and access the target configuration center based on the target query parameter; a sending module, used to receive the configuration data of the second software system returned by the target configuration center, and send the configuration data to the first software system.

[0015] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any one of the data query methods described.

[0016] In an embodiment of the present invention, a configuration query request for a second software system is received from a first software system; based on the configuration query request, a target configuration center corresponding to the second software system is determined from multiple configuration centers; the configuration query request is converted into a target query parameter matching the target configuration center, and the target configuration center is accessed based on the target query parameter; the configuration data of the second software system returned by the target configuration center is received, and the configuration data is sent to the first software system, thereby achieving the purpose of quickly querying the required configuration data across configuration centers without worrying about which configuration center the software system uses, thereby achieving the technical effect of improving the compatibility and access efficiency of configuration data access between software systems across configuration centers and reducing the complexity of data access across configuration centers, thereby solving the technical problem of high complexity and poor compatibility of configuration data acquisition when accessing configuration data across data centers between different software systems in the related technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0018] Figure 1is a flow chart of a data query method according to an embodiment of the present invention;

[0019] Figure 2 is a flow chart of an optional data query method according to an embodiment of the present invention;

[0020] Figure 3 is a schematic diagram of a data query device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0021] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0022] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0023] First, to facilitate understanding of the embodiments of the present invention, some terms or nouns involved in the present invention are explained below:

[0024] Zookeeper, an open source distributed application coordination service, is used to manage and maintain configuration information, naming services, distributed locks, distributed queues, etc. in large distributed systems. It is a high-performance distributed coordination service that can achieve data reliability, stability and consistency.

[0025] Dynamic Naming and Configuration Service (Nacos) is an open source distributed service discovery, configuration management and service management platform that helps developers build cloud-native applications. It provides service registration and discovery, configuration management, dynamic DNS and other functions, which can help developers achieve rapid development and deployment of microservice architecture.

[0026] A configuration center is a service or tool used to centrally manage application configuration information. A configuration center usually provides a centralized platform for developers to easily manage various configuration parameters in applications, such as database connection information, application programming interface (API) keys, environment variables, etc. Through the configuration center, the development team can dynamically manage and modify configuration information without redeploying the application. This can improve the flexibility, maintainability, and security of the application, and also facilitate configuration version management and rollback operations.

[0027] According to an embodiment of the present invention, a method embodiment of data query is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0028] Figure 1 is a flow chart of a data query method according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0029] Step S102, receiving a configuration query request from the first software system for the second software system;

[0030] Optionally, the execution entity of steps S102 to S108 can be a target server, which can be understood as a fusion configuration center service. The fusion configuration center service can provide a query interface for the calling end to use, so that the calling end does not need to care about which configuration center the target project uses, and can query the required configuration.

[0031] Optionally, the first software system is a calling end, used to send a configuration query request for the second software system to the fusion configuration center service; the second software system is a called end. The first software system can be a new version software system or an old version software system. Wherein, when the first software system is a new version software system, the second software system can be an old version software system; when the first software system is an old version software system, the second software system can be a new version software system.

[0032] Step S104, determining a target configuration center corresponding to the second software system from multiple configuration centers based on the configuration query request;

[0033] Optionally, the configuration query request may carry prompt information related to the configuration center, and based on the configuration query request, the target configuration center corresponding to the second software system may be identified. For example, the configuration query request may carry the system name of the second software system, and since the configuration center corresponding to each software system is predetermined, the target configuration center corresponding to the second software system may be determined from multiple configuration centers based on the system name of the second software system.

[0034] Optionally, the fused configuration center service may have the function of establishing communication connections and data interaction with multiple different configuration centers, using the fused configuration center service as a medium to implement cross-data center data query, so that the calling end does not need to pay attention to which configuration center the data to be accessed belongs, thereby reducing the complexity of accessing configuration data across data centers.

[0035] In an optional embodiment, based on a configuration query request, a target configuration center corresponding to the second software system is determined from multiple configuration centers, including: detecting whether a format of the configuration query request is a predetermined format; and when the format of the configuration query request is the predetermined format, determining a target configuration center corresponding to the second software system from multiple configuration centers.

[0036] Optionally, the predetermined format may include multiple query fields, which may include but are not limited to the system name of the called end (i.e., the second software system), the query configuration unique identifier Key, query notes, etc., wherein the query configuration Key is the unique identifier of the configuration item to be queried, used to indicate which configuration data of the called end that the calling end (i.e., the first software system) wants to query.

[0037] Optionally, the query remark can be, but is not limited to, the query purpose. For example, the first software system is system A, the second software system is system B, and the configuration data corresponding to system A is stored in the Nacos configuration center, and the configuration data corresponding to system B is stored in the Zookeeper configuration center. When the calling end system A needs to query the configuration item Key1 of system B, the calling end calls this fusion configuration center service and passes in the query field system name: "system B", query configuration key: "Key1", and query purpose: "query configuration Key1" through the configuration query request. For another example, the first software system is system X, the second software system is system Y, and the configuration data corresponding to system X is stored in the Zookeeper configuration center, and the configuration data corresponding to system B is stored in the Nacos configuration center. When the calling end system X needs to query the configuration item Key2 of system Y, the calling end calls this fusion configuration center service and passes in the query field system name: "system Y", query configuration key: "Key2", and query purpose: "query configuration Key2" through the query configuration query request.

[0038] In the above method, before determining the configuration center corresponding to the second software system based on the configuration query request, the configuration query request can be verified to determine whether the configuration query request meets the requirements, that is, whether it is in a predetermined format. If so, the subsequent process of determining the target configuration center corresponding to the second software system from multiple configuration centers is continued, thereby ensuring the smooth progress of the configuration center determination process, and then ensuring the smooth progress of the cross-configuration center data query process.

[0039] In an optional embodiment, the method further includes: when the format of the configuration query request is not a predetermined format, generating an error prompt message based on difference information between the format of the configuration query request and the predetermined format; and returning the error prompt message to the first software system.

[0040] Optionally, when it is detected that the format of the configuration query request does not meet the requirements, that is, the configuration query request is not in the predetermined format, an error prompt message can be returned to the first software system, and the error prompt message can indicate the difference between the format of the configuration query request and the predetermined format, so as to prompt the first software system to have problems in the configuration query request, and take corresponding measures in time to avoid problems such as interruption of the cross-configuration center data query process and low query efficiency due to the configuration query request format error. Optionally, the error prompt message can also include predetermined format information, and the correct configuration request format can be synchronously fed back to the first software system, so that the operator can correct the configuration query request in time according to the error prompt message, and minimize the interference of the configuration query request error on the cross-configuration center data query process.

[0041] In an optional embodiment, based on a configuration query request, a target configuration center corresponding to the second software system is determined from multiple configuration centers, including: obtaining a system name of the second software system from the configuration query request; querying a preset routing rule based on the system name of the second software system to obtain the target configuration center corresponding to the second software system, wherein the preset routing rule is used to indicate the correspondence between the configuration center and the system name of the software system.

[0042] Optionally, preset routing rules can be pre-set in the fusion configuration center service. The preset routing rules can indicate the correspondence between each configuration center and the software system name. When the system name of the second software system is known, the target configuration center corresponding to the second software system can be quickly obtained by querying the preset routing rules, thereby realizing rapid query of the configuration center to which the second software system belongs, thereby improving the efficiency of configuration data query across configuration centers.

[0043] Optionally, a database may be set up in the fusion configuration center service, which is used to store the relationships between multiple groups of configuration centers and system names of software systems. When the system name of the second software system is parsed out from the configuration query request, the system name may be used as a query field, and the target configuration center corresponding to the system name of the second software system may be queried from the database through database query.

[0044] Step S106, converting the configuration query request into a target query parameter that matches the target configuration center, and accessing the target configuration center based on the target query parameter;

[0045] Optionally, due to compatibility issues between different configuration centers, there may be differences in the interface forms, data access, data storage formats, rules, etc. of different configuration centers. For example, the Nacos configuration center and the Zookeeper configuration center may have different access interfaces. Based on this, when the target configuration center to be accessed is known, the configuration query request can be converted into a form recognizable by the target configuration center, that is, the configuration query request can be converted into a target query parameter recognizable by the target configuration center, and the target query parameter is transmitted to the target configuration center through a unified interface to query the corresponding configuration data of the second software system. In this way, it is possible to achieve efficient query of configuration data across configuration centers without having to care about which configuration center the configuration data to be queried belongs to, thereby reducing the complexity of configuring data across configuration centers.

[0046] In an optional embodiment, converting a configuration query request into a target query parameter that matches a target configuration center includes: obtaining a system name of a first software system from the configuration query request; querying a preset routing rule based on the system name of the first software system to obtain a configuration center corresponding to the first software system; detecting whether the configuration center corresponding to the first software system is the target configuration center; and converting the configuration query request into a target query parameter if the configuration center corresponding to the first software system is not the target configuration center.

[0047] Optionally, when performing configuration data query based on the data query method of this embodiment, the operator does not need to care about which configuration center the configuration data to be queried belongs to, that is, there may be a situation where the operator does not know which configuration center the configuration data to be queried belongs to. Therefore, before converting the configuration query request into the target query parameter, it can be determined whether the configuration center corresponding to the first software system and the second software system is consistent, that is, whether the configuration center corresponding to the first software system is the target configuration center. If they are inconsistent, it indicates that the configuration query request is a cross-configuration center data query request. At this time, it is necessary to convert the configuration query request into a target query parameter form that can be recognized by the target configuration center, thereby ensuring that cross-configuration center data query can be achieved without caring about which configuration center the configuration data to be queried belongs to.

[0048] In an optional embodiment, the method further includes: when the configuration center corresponding to the first software system is the target configuration center, accessing the target configuration center based on the configuration query request.

[0049] Optionally, the configuration query request may be in a format compatible with the configuration center corresponding to the first software system. When the configuration center corresponding to the first software system is the target configuration center, that is, the first software system and the second software system correspond to the same configuration center, there is no need to perform an operation of converting the configuration query request into target query parameters. This can avoid unnecessary data conversion, simplify the configuration data query process, and improve the configuration data query efficiency without having to worry about which configuration center the configuration data to be queried belongs to.

[0050] In an optional embodiment, converting a configuration query request into a target query parameter that matches a target configuration center includes: obtaining a configuration item to be queried of the second software system from the configuration query request; determining a target adaptation rule corresponding to the target configuration center from a plurality of preset adaptation rules, wherein the target adaptation rule is used to indicate a conversion relationship between a configuration item and a query parameter; and converting the configuration item to be queried into a target query parameter using the target adaptation rule.

[0051] Optionally, each configuration center is pre-configured with a corresponding adaptation rule for converting the configuration query request into a form recognizable by the corresponding configuration center. When the target configuration center corresponding to the second software system is known, the target adaptation rule corresponding to the target configuration center can be determined from multiple adaptation rules, and based on the target adaptation rule, the configuration items to be queried parsed in the configuration query request are converted into target query parameters recognizable by the target configuration center. Each adaptation rule is used to indicate the conversion method of converting the configuration query request into the query parameters recognizable by the corresponding configuration center.

[0052] Optionally, the fusion configuration center service can be used as a medium for configuration data query across configuration centers. The adaptation rules corresponding to each configuration center are pre-configured on the fusion configuration center service. When converting the items to be configured, the target adaptation rules corresponding to the target configuration center are directly called, and the items to be configured are converted into target query parameters based on the target adaptation rules, thereby realizing the query and call of the corresponding configuration data in the target configuration center. Without having to worry about which configuration center the configuration data to be queried belongs to, efficient query of configuration data across configuration centers is achieved, reducing the complexity of configuration data query across data centers.

[0053] Step S108, receiving the configuration data of the second software system returned by the target configuration center, and sending the configuration data to the first software system.

[0054] Optionally, after querying the configuration data corresponding to the configuration item to be queried from the target configuration center, the queried configuration data is sent to the first software system through the fusion configuration center service, thereby completing the data query across configuration centers. This enables efficient query of configuration data across configuration centers without having to care about which configuration center the configuration data to be queried belongs to, thereby reducing the complexity of querying configuration data across data centers.

[0055] In an optional embodiment, sending the configuration data to the first software system includes: parsing the configuration data, wherein the parsing is used to parse the configuration data into a format supported by the first software system; and sending the parsed configuration data to the first software system.

[0056] It should be noted that, since there are compatibility issues between the first software system and the target configuration center, and the configuration data is queried in the target configuration center, the data format of the corresponding configuration data is also matched with the target configuration center. Therefore, after obtaining the configuration data, the obtained configuration data can be parsed into a format that can be recognized and supported by the first software system through the fusion configuration center service, and the parsed configuration data is sent to the first software system, thereby ensuring that the configuration data received by the first software system is required by the first software and can be normally recognized.

[0057] Through the above steps S102 to S108, the purpose of quickly querying the required configuration data across configuration centers can be achieved without worrying about which configuration center the software system uses, thereby achieving the technical effect of improving the compatibility and access efficiency of configuration data access between software systems across configuration centers and reducing the complexity of data access across configuration centers, thereby solving the technical problem of high complexity and poor compatibility of configuration data acquisition when different software systems access configuration data across data centers in related technologies.

[0058] Based on the above embodiments and optional embodiments, the present invention proposes an optional implementation mode: Figure 2 is a flow chart of an optional data query method according to an embodiment of the present invention. Figure 2 As shown, the method includes:

[0059] S1, the upstream calling end system A initiates a configuration query request for system B, passes the configuration item key to be queried and the system name of system B to the fusion configuration center service through the configuration query request, and calls the fusion configuration query service;

[0060] S2, after receiving the configuration query request from system A, the fusion configuration center service resolves the configuration center to which system B belongs, and obtains the target configuration center;

[0061] S3, adapting the target query parameters corresponding to the target configuration center by means of database query;

[0062] S4, parse the configuration item that system A wants to query from the configuration query request, and query the configuration content (i.e., configuration data) corresponding to the configuration item Key in the target configuration center;

[0063] S5, parse the configuration content, encapsulate the parsed configuration content and return it to the A system, wherein the queried configuration content can be converted into a format that can be recognized and supported by the A system through the parsing process.

[0064] In the above method, by providing a fusion configuration center service interface, it is compatible with multiple configuration centers, can route and adapt to various configuration centers by itself, and reduces the complexity of querying configurations in multiple configuration centers, so that developers do not need to pay attention to the details of the configuration center type during the development process.

[0065] Based on the above embodiments and optional embodiments, the present invention proposes another optional implementation method, providing a unified fusion configuration center service, integrating the Zookeeper configuration center and the Nacos configuration center, and theoretically being compatible with third-party configuration centers without restrictions. The fusion configuration center service needs to provide a query interface for the caller to use. The caller does not need to care about which configuration center the target project (such as the configuration item to be queried) uses, and can query the required configuration content. The fusion configuration center service includes configuration verification, configuration query routing, and configuration content adaptation.

[0066] First, the fusion configuration center service (ie, fusion configuration service) receives query fields such as "query configuration key", "system name", "query notes", etc. through the corresponding interface, wherein the query configuration key is a unique identifier of the configuration item to be queried.

[0067] Then, this fusion configuration service interface routes out the type of configuration center that needs to be queried through the system database or memory, verifies the consistency of the query on the caller side, processes the query parameters of the corresponding configuration center, queries the configuration data of the corresponding configuration center, and records the configuration information of this query.

[0068] Finally, this fusion configuration center service interface parses the queried configuration data and encapsulates it in a unified return parameter format, and returns the processed configuration data to the caller.

[0069] The specific role of the integrated configuration center service in the process of compatibility between the corresponding configuration centers of new and old projects (i.e., new and old software systems) is as follows: when a caller needs to query the relevant configuration of a software system, the caller knows the system name to which the configuration item belongs and the configuration Key that needs to be queried, so as to query the configuration item that needs to be accessed and the configuration data corresponding to the configuration item, without having to worry about the type of configuration center used by the system.

[0070] Here are two specific examples:

[0071] When the calling end A system needs to query the configuration item Key1 of the B system (Zookeeper configuration center), the calling end calls this fusion configuration center service and passes in the query field system name: "System B", query configuration Key: "Key1", and query purpose: "Query configuration Key1". The fusion configuration center service interface receives the configuration query request, determines through routing that it needs to query the Zookeeper configuration center, adapts the Zookeeper rules by itself, queries the Zookeeper configuration center to obtain the corresponding configuration data, and finally parses the configuration data and returns it to the calling end A.

[0072] When the calling end X system needs to query the configuration item Key2 of the Y system (Nacos configuration center), the calling end calls this fusion configuration center service, passes in the query field system name: "system Y", query configuration Key: "Key2", query purpose: "query configuration Key2", and the fusion configuration center service interface receives the configuration query request, determines through routing that it needs to query the Nacos configuration center, adapts the Nacos rules by itself, queries the Nacos configuration center to obtain the corresponding configuration data, and finally parses the configuration data and returns it to the calling end X.

[0073] From the above two cases, we can find that if there are more different configuration centers, they only need to be developed in this fusion configuration interface service, and each caller does not need to care about which configuration center the target project uses.

[0074] In this embodiment, a data query device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the terms "module" and "device" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0075] According to an embodiment of the present invention, a device embodiment for implementing the above data query method is also provided. Figure 3 is a schematic diagram of the structure of a data query device according to an embodiment of the present invention. Figure 3 As shown, the data query device includes: a receiving module 300, a determining module 302, a converting module 306, and a sending module 308, wherein:

[0076] The receiving module 300 is used to receive a configuration query request from the first software system for the second software system;

[0077] A determination module 302, connected to the receiving module 300, for determining a target configuration center corresponding to the second software system from a plurality of configuration centers based on the configuration query request;

[0078] The conversion module 306 is connected to the determination module 302 and is used to convert the configuration query request into a target query parameter that matches the target configuration center, and access the target configuration center based on the target query parameter;

[0079] The sending module 308 is connected to the conversion module 306 and is used to receive the configuration data of the second software system returned by the target configuration center and send the configuration data to the first software system.

[0080] In an embodiment of the present invention, a receiving module 300 is provided for receiving a configuration query request from a first software system for a second software system; a determining module 302 is connected to the receiving module 300 and is used to determine a target configuration center corresponding to the second software system from multiple configuration centers based on the configuration query request; a conversion module 306 is connected to the determining module 302 and is used to convert the configuration query request into a target query parameter matching the target configuration center, and access the target configuration center based on the target query parameter; a sending module 308 is connected to the conversion module 306 and is used to receive configuration data of the second software system returned by the target configuration center, and send the configuration data to the first software system, thereby achieving the purpose of quickly querying the required configuration data across configuration centers without worrying about which configuration center the software system uses, thereby achieving the technical effect of improving the compatibility and access efficiency of configuration data access between software systems across configuration centers and reducing the complexity of data access across configuration centers, thereby solving the technical problem of high complexity and poor compatibility of configuration data acquisition when configuration data is accessed across data centers between different software systems in the related technology.

[0081] Optionally, the above-mentioned determination module includes: a first acquisition sub-module, used to obtain the system name of the second software system from the configuration query request; a second acquisition sub-module, used to query the preset routing rules based on the system name of the second software system to obtain the target configuration center corresponding to the second software system, wherein the preset routing rules are used to indicate the correspondence between the configuration center and the system name of the software system.

[0082] Optionally, the above-mentioned conversion module includes: a third acquisition sub-module, used to obtain the system name of the first software system from the configuration query request; a fourth acquisition sub-module, used to query the preset routing rules based on the system name of the first software system to obtain the configuration center corresponding to the first software system; a first detection sub-module, used to detect whether the configuration center corresponding to the first software system is the target configuration center; and a first conversion sub-module, used to convert the configuration query request into a target query parameter when the configuration center corresponding to the first software system is not the target configuration center.

[0083] Optionally, the above-mentioned device also includes: a first access submodule, which is used to access the target configuration center based on the configuration query request when the configuration center corresponding to the first software system is the target configuration center.

[0084] Optionally, the above-mentioned conversion module includes: a fifth acquisition sub-module, used to obtain the configuration items to be queried of the second software system from the configuration query request; a first determination sub-module, used to determine the target adaptation rule corresponding to the target configuration center from a plurality of preset adaptation rules, wherein the target adaptation rule is used to indicate the conversion relationship between the configuration item and the query parameter; and a second conversion sub-module, used to convert the configuration items to be queried into target query parameters using the target adaptation rule.

[0085] Optionally, the above-mentioned determination module includes: a second detection submodule, used to detect whether the format of the configuration query request is a predetermined format; a second determination submodule, used to determine the target configuration center corresponding to the second software system from multiple configuration centers when the format of the configuration query request is a predetermined format.

[0086] Optionally, the above-mentioned device also includes: a first generation submodule, used to generate error prompt information based on the difference information between the format of the configuration query request and the predetermined format when the format of the configuration query request is not the predetermined format; a first return submodule, used to return the error prompt information to the first software system.

[0087] Optionally, the sending module includes: a first parsing submodule, used to parse the configuration data, wherein the parsing is used to parse the configuration data into a format supported by the first software system; and a first sending submodule, used to send the parsed configuration data to the first software system.

[0088] It should be noted that the above modules can be implemented by software or hardware. For example, for the latter, it can be implemented in the following ways: the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0089] It should be noted that the receiving module 300, the determining module 302, the converting module 306, and the sending module 308 correspond to steps S102 to S108 in the embodiment, and the examples and application scenarios implemented by the modules and the corresponding steps are the same, but are not limited to the contents disclosed in the embodiment. It should be noted that the modules as part of the device can be run in a computer terminal.

[0090] It should be noted that the optional or preferred implementation of this embodiment can refer to the relevant description in the embodiment, which will not be repeated here.

[0091] The above-mentioned data query device may also include a processor and a memory. The above-mentioned receiving module 300, determining module 302, conversion module 306, sending module 308, etc. are all stored in the memory as program modules, and the processor executes the above-mentioned program modules stored in the memory to realize corresponding functions.

[0092] The processor includes a kernel, which retrieves the corresponding program module from the memory. The kernel may be one or more. The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. The memory includes at least one memory chip.

[0093] According to an embodiment of the present application, an embodiment of a non-volatile storage medium is also provided. Optionally, in this embodiment, the non-volatile storage medium includes a stored program, wherein when the program is executed, the device where the non-volatile storage medium is located is controlled to execute any one of the data query methods.

[0094] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group, and the non-volatile storage medium includes a stored program.

[0095] Optionally, when the program is running, the device where the non-volatile storage medium is located is controlled to perform the following functions: receiving a configuration query request from the first software system for the second software system; based on the configuration query request, determining a target configuration center corresponding to the second software system from multiple configuration centers; converting the configuration query request into a target query parameter that matches the target configuration center, and accessing the target configuration center based on the target query parameter; receiving configuration data of the second software system returned by the target configuration center, and sending the configuration data to the first software system.

[0096] According to an embodiment of the present application, an embodiment of a processor is also provided. Optionally, in this embodiment, the processor is used to run a program, wherein the program performs the following functions when running: receiving a configuration query request from the first software system for the second software system; determining a target configuration center corresponding to the second software system from multiple configuration centers based on the configuration query request; converting the configuration query request into a target query parameter that matches the target configuration center, and accessing the target configuration center based on the target query parameter; receiving configuration data of the second software system returned by the target configuration center, and sending the configuration data to the first software system.

[0097] According to an embodiment of the present application, an embodiment of a computer program product is also provided. When executed on a data processing device, it is suitable for executing a program that initializes any one of the above-mentioned data query method steps.

[0098] Optionally, the above-mentioned computer program product, when executed on a data processing device, is suitable for executing a program that initializes the following method steps: receiving a configuration query request from a first software system for a second software system; determining a target configuration center corresponding to the second software system from multiple configuration centers based on the configuration query request; converting the configuration query request into target query parameters that match the target configuration center, and accessing the target configuration center based on the target query parameters; receiving configuration data of the second software system returned by the target configuration center, and sending the configuration data to the first software system.

[0099] An embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the following steps are implemented: receiving a configuration query request from a first software system for a second software system; determining a target configuration center corresponding to the second software system from multiple configuration centers based on the configuration query request; converting the configuration query request into a target query parameter that matches the target configuration center, and accessing the target configuration center based on the target query parameter; receiving configuration data of the second software system returned by the target configuration center, and sending the configuration data to the first software system.

[0100] The above sequence of the embodiments of the present invention is for description only and does not represent the superiority or inferiority of the embodiments.

[0101] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0102] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the above modules can be a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, modules or indirect coupling or communication connection of modules, which can be electrical or other forms.

[0103] The modules described above as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0104] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of software functional modules.

[0105] If the above-mentioned integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable non-volatile storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a non-volatile storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the various embodiments of the present invention. The aforementioned non-volatile storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0106] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A data query method, characterized in that: include: Receiving a configuration query request from the first software system for the second software system; Based on the configuration query request, determining a target configuration center corresponding to the second software system from a plurality of configuration centers; Converting the configuration query request into a target query parameter matching the target configuration center, and accessing the target configuration center based on the target query parameter; Receive the configuration data of the second software system returned by the target configuration center, and send the configuration data to the first software system.

2. The method according to claim 1, characterized in that The determining, based on the configuration query request, a target configuration center corresponding to the second software system from a plurality of configuration centers includes: Acquire a system name of the second software system from the configuration query request; Based on the system name of the second software system, a preset routing rule is queried to obtain the target configuration center corresponding to the second software system, wherein the preset routing rule is used to indicate the correspondence between the configuration center and the system name of the software system.

3. The method according to claim 2, characterized in that The converting the configuration query request into a target query parameter matching the target configuration center includes: Acquire a system name of the first software system from the configuration query request; Querying the preset routing rule based on the system name of the first software system to obtain a configuration center corresponding to the first software system; Detecting whether the configuration center corresponding to the first software system is the target configuration center; When the configuration center corresponding to the first software system is not the target configuration center, the configuration query request is converted into the target query parameter.

4. The method according to claim 3, characterized in that: The method further comprises: In a case where the configuration center corresponding to the first software system is the target configuration center, the target configuration center is accessed based on the configuration query request.

5. The method according to claim 1, characterized in that The converting the configuration query request into a target query parameter matching the target configuration center includes: Acquire the configuration item to be queried of the second software system from the configuration query request; Determining a target adaptation rule corresponding to the target configuration center from a plurality of preset adaptation rules, wherein the target adaptation rule is used to indicate a conversion relationship between a configuration item and a query parameter; The target adaptation rule is used to convert the configuration item to be queried into the target query parameter.

6. The method according to any one of claims 1 to 5, characterized in that The determining, based on the configuration query request, a target configuration center corresponding to the second software system from a plurality of configuration centers includes: Detecting whether the format of the configuration query request is a predetermined format; When the format of the configuration query request is the predetermined format, the target configuration center corresponding to the second software system is determined from the multiple configuration centers.

7. The method according to claim 6, characterized in that The method further comprises: If the format of the configuration query request is not the predetermined format, generating error prompt information based on difference information between the format of the configuration query request and the predetermined format; The error prompt information is returned to the first software system.

8. The method according to any one of claims 1 to 5, characterized in that The sending the configuration data to the first software system comprises: Performing parsing processing on the configuration data, wherein the parsing processing is used to parse the configuration data into a format supported by the first software system; The parsed configuration data is sent to the first software system.

9. A data query device, characterized in that: include: A receiving module, configured to receive a configuration query request from the first software system for the second software system; A determination module, configured to determine a target configuration center corresponding to the second software system from a plurality of configuration centers based on the configuration query request; A conversion module, used to convert the configuration query request into a target query parameter matching the target configuration center, and access the target configuration center based on the target query parameter; The sending module is used to receive the configuration data of the second software system returned by the target configuration center, and send the configuration data to the first software system.

10. An electronic device, characterized in that: It includes one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the data query method described in any one of claims 1 to 8.