CN113961600A - Data query method and device, computer equipment and storage medium - Google Patents

Data query method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN113961600A
CN113961600A CN202111249844.6A CN202111249844A CN113961600A CN 113961600 A CN113961600 A CN 113961600A CN 202111249844 A CN202111249844 A CN 202111249844A CN 113961600 A CN113961600 A CN 113961600A
Authority
CN
China
Prior art keywords
service
interface
target
data
configuration file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111249844.6A
Other languages
Chinese (zh)
Inventor
汪翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Ping An Smart Healthcare Technology Co ltd
Original Assignee
Ping An International Smart City Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An International Smart City Technology Co Ltd filed Critical Ping An International Smart City Technology Co Ltd
Priority to CN202111249844.6A priority Critical patent/CN113961600A/en
Publication of CN113961600A publication Critical patent/CN113961600A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a data query method, a data query device, computer equipment and a storage medium, which are applied to the technical field of data query and comprise the following steps: receiving a data query request aiming at a target service sent by a first service system, wherein the data query request carries first service interface information corresponding to the first service system, determining a second service interface associated with the first service interface corresponding to the first service interface information from interface association relations included in an interface association relation set, and acquiring an interface configuration file between the first service interface and the second service interface; and based on the second service interface, calling the interface configuration file to acquire the target service data from the second service system, and based on the first service interface, sending the target service data to the first service system, so that the efficiency of data query can be improved. The application relates to a block chain technology, for example, a set of interface association relations can be written into a block chain to be used for determining a second service interface associated with a first service interface.

Description

Data query method and device, computer equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data query method, an apparatus, a computer device, and a storage medium.
Background
With the development of computer technology, data interaction between service systems is also gradually increased, and in the process of data query, generally, it is necessary to know that service interfaces corresponding to two service systems are queried through a service interface table, and then two service interfaces are called through writing codes to implement data query, so as to implement data interaction between the two service systems. However, developers can deal with the problem of the butt joint of different service interfaces of different external systems every day, and write a large amount of redundant codes to realize data query between two service systems or even between a plurality of service systems, so that the data query efficiency is low.
Disclosure of Invention
The embodiment of the invention provides a data query method, a data query device, computer equipment and a storage medium, which can improve the data query efficiency.
In one aspect, an embodiment of the present application provides a data query method, where the method includes:
receiving a data query request aiming at a target service, which is sent by a first service system, wherein the data query request carries first service interface information corresponding to the first service system, and the data query request is used for requesting target service data of the target service, which is stored by a second service system;
determining a second service interface associated with the first service interface corresponding to the first service interface information from the interface association relationship included in the interface association relationship set, where the second service interface is used to obtain target service data stored in the second service system;
acquiring an interface configuration file between the first service interface and the second service interface;
and calling the interface configuration file to acquire the target service data from the second service system based on the second service interface, and sending the target service data to the first service system based on the first service interface.
In one aspect, an embodiment of the present application provides a data query apparatus, including:
a communication unit, configured to receive a data query request for a target service sent by a first service system, where the data query request carries first service interface information corresponding to the first service system, and the data query request is used to request target service data of the target service stored in a second service system;
a processing unit, configured to determine, from an interface association relationship included in an interface association relationship set, a second service interface associated with a first service interface corresponding to the first service interface information, where the second service interface is used to obtain target service data stored in the second service system;
the processing unit is further configured to obtain an interface configuration file between the first service interface and the second service interface;
the processing unit is further configured to call the interface configuration file to obtain the target service data from the second service system based on the second service interface;
the communication unit is further configured to send the target service data to a first service system based on the first service interface.
In one aspect, an embodiment of the present application provides a computer device, including a processor and a memory, where the processor and the memory are connected to each other, where the memory is used to store a computer program, and the computer program includes program instructions, and the processor is configured to call the program instructions to execute the data query method described above.
In one aspect, an embodiment of the present application provides a computer-readable storage medium, where program instructions are stored in the computer-readable storage medium, and when the program instructions are executed, the computer-readable storage medium is used to implement the data query method described above.
In one aspect, the present application provides a computer program product or a computer program, where the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium, and when the computer instructions are executed by a processor of a computer device, the computer program product or the computer program performs the data query method described above.
In the embodiment of the application, a data query request aiming at a target service and sent by a first service system is received, wherein the data query request carries first service interface information corresponding to the first service system, and the data query request is used for requesting target service data of the target service stored by a second service system; determining a second service interface associated with the first service interface corresponding to the first service interface information from the interface association relationship included in the interface association relationship set, wherein the second service interface is used for acquiring target service data stored by a second service system; acquiring an interface configuration file between a first service interface and a second service interface; and then based on the second service interface, calling the interface configuration file to acquire target service data from the second service system, and based on the first service interface, sending the target service data to the first service system. The business interface between the two business systems can be quickly searched by developers by establishing the interface incidence relation; furthermore, the service data query is carried out by directly calling the interface configuration file, and codes are written in real time when two service systems are not required to carry out the service data query.
Drawings
In order to more clearly illustrate the embodiments of the present invention 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, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1a is an architecture diagram of a data query system provided by an embodiment of the present invention;
FIG. 1b is an architecture diagram of another data query system provided by an embodiment of the present invention;
FIG. 2 is a flow chart of a data query method provided by an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a data query device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the application provides a data query scheme, and the general principle of the data query scheme is as follows: establishing an interface incidence relation between different service interfaces, and pre-configuring an interface configuration file between the service interfaces, and then explaining a specific process of the data query scheme by using two service systems to perform service data query: when the service system 1 wants to query service data to the service system 2, first, service interface information of the service system 1 is obtained, then, a service interface of the service system 2 is determined according to the service interface information of the service system 1 and an interface incidence relation between different service interfaces, then, an interface configuration file between two service interfaces is directly obtained according to the service interface corresponding to the service interface information and the service interface of the service system 2, the stored service data can be queried from the service system 2 by calling the interface configuration file, and then, the queried service data is returned to the service system 1.
The data query scheme provided by the embodiment of the application has the following beneficial effects: the incidence relation between the service interfaces of each service system is managed in a centralized way, and then the service interfaces between the two service systems can be quickly searched by developers by establishing the incidence relation of the interfaces; furthermore, the service data query is carried out by directly calling the interface configuration file, and codes are written in real time when two service systems are not required to carry out the service data query.
Based on the data query scheme, the embodiment of the application provides a data query system. Referring to fig. 1a, fig. 1a is an architecture diagram of a data query system according to an embodiment of the present invention. The data query system may include at least two business systems 101 and at least one interface management platform 102; the business system 101 may provide a data query interface, and the business data to be queried may be input in the data query interface; the interface management platform 102 is configured to store a set of interface association relationships between different service interfaces, interface configuration files between multiple service interfaces, and the like, and the interface management platform 102 may obtain required service data from one service system 101 and forward the obtained service data to another service system 101. The service system 101 and the interface management platform 102 may be directly or indirectly connected through wired or wireless communication, and the application is not limited herein. The service system 101 may be a server or a terminal device, and the interface management platform may also be a server and a terminal device. The terminal device may be an intelligent device such as a mobile phone, a tablet computer, a notebook computer, a palm computer, a Mobile Internet Device (MID), a wearable device, and the like. The servers include a plurality of servers (also called nodes), which may be independent physical servers, and may also be cloud servers providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, Network services, cloud communication, middleware services, domain name services, security services, Content Delivery Networks (CDNs), big data platforms, and artificial intelligence platforms.
In an embodiment, the data query scheme may be executed by the interface management platform 102, specifically, a user may query service data of a target service to another service system 101 through one service system 101, and the user may submit the service data of the target service to be queried on the service system 101, and correspondingly, the service system 101 may generate a data query request for the target service and send the data query request to the interface management platform 102, where the data query request carries first service interface information. Then, the interface management platform 102 may determine, from the association relationship included in the interface association relationship set, a second service interface associated with the first service interface corresponding to the first service interface information; and acquiring a configuration file between the first service interface and the second service interface, then directly calling the second service interface in the configuration file to acquire service data of the target service from another service system 101, and returning the service data of the target service to the service system 101 sending the data query request by using the first service interface in the configuration file.
It should be noted that fig. 1a merely represents an exemplary system architecture of the data query system, and does not limit the specific architecture of the data query system. For example, the number of business systems in FIG. 1a is 2; but in other embodiments the number of business systems may be 3, 5 or even more. As another example, the service system and the interface management device in fig. 1a may both be located outside the blockchain network; however, in other embodiments, the data query system may also be deployed based on a blockchain network, that is, both the service system and the interface management device may be deployed in the blockchain network, or in fig. 1b, the service system is deployed outside the blockchain network, and the interface management device is deployed in the blockchain network, and so on. The blockchain mentioned here is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. Which is essentially a decentralized database, is a string of blocks of data that are related using cryptographic methods.
Referring to fig. 2 based on the data query scheme, fig. 2 is a schematic flow chart of a data query method according to an embodiment of the present invention. The data query method may be executed by a computer device, where the computer device may be the interface management platform 102 in fig. 1a, and the data query method described in this embodiment includes the following steps S201 to S204:
s201, receiving a data query request aiming at a target service sent by a first service system, wherein the data query request carries first service interface information corresponding to the first service system, and the data query request is used for requesting target service data of the target service stored by a second service system.
Wherein, the target business can be weather business, geographic business, insurance business, etc.; accordingly, the target business data may be weather data, geographic data, insurance data, and the like. In a specific implementation, when a first service system wants to query a second service system for target service data of a target service, a data query request may be sent to a computer device, and then the computer device receives the data query request sent by the first service system. The first service interface information may include an interface name, an interface identifier, interface authentication information, and the like of the first service interface, where the interface authentication information may be an IP address, a MAC (Media Access Control) address, and the like of a computer device to which the first service system belongs.
In an embodiment, the first service interface information includes interface verification information, and after receiving the data query request sent by the first service system, the computer device may perform validity verification on the first service interface according to the interface verification information, and if the validity verification on the first service interface passes, obtain an interface association set, and execute step S202. If the validity verification of the first service interface is not passed, alarm information can be output, wherein the alarm information is used for indicating that the interface verification information of the first service interface is wrong.
In one embodiment, before performing step S202, the first service interface information includes a target address of the first service system, where the target address may be an IP address or a MAC address of the first service system on a block chain, and the computer device may trigger a target intelligent contract according to a target service type to which the target service belongs: calling the affiliated target intelligent contract to acquire identity information corresponding to a target address stored on a block chain and preset authorization conditions corresponding to the target intelligent contract; and judging whether the identity information meets a preset authorization condition or not through the target intelligent contract, and if the identity information meets the preset authorization condition, acquiring an interface association relation set. The block chain stores a plurality of intelligent contracts, and each intelligent contract corresponds to one service type; the identity information may be hardware information of a computer device to which the first service system belongs, or the like, and the preset authorization condition may also be hardware information of a computer device to which the first service system belongs, and the preset authorization condition may be set according to an authorization requirement; then the computer equipment can trigger a target intelligent contract corresponding to the target service type to which the target service belongs; and then calling an intelligent contract to acquire identity information corresponding to the communication address stored in the block chain, judging whether the identity information meets a preset authorization condition, and acquiring an interface association relation set if the identity information meets the preset authorization condition. And if the identity information is determined not to meet the preset authorization condition, outputting prompt information, wherein the prompt information is used for indicating that the target address is unauthorized.
In one embodiment, a set of interface associations between different service interfaces may be pre-established. In a specific implementation, the computer device may obtain service interfaces of a plurality of service systems from a preset storage space, where the preset storage space may be a block chain or the like; then, establishing interface incidence relations for the service interfaces of the plurality of service systems according to preset conditions to obtain the interface incidence relations among the service interfaces; wherein the preset conditions include one or more of the following: data interaction exists between the service interfaces, and the service types of the processing services between the service interfaces are the same. The existence of data interaction between service interfaces may refer to: there is a need for data interaction between service interfaces. For example, when data interaction exists between the service system 1 and the service system 2, an interface association relationship between a service interface of the service system 1 and a service interface of the service system 2 may be established; for another example, when the service interface of the service system 1 and the service interface of the service system 2 process services of the same service type, an interface association relationship between the service interface of the service system 1 and the service interface of the service system 2 may be established, and the interface association relationship between the service interfaces is stored in the interface association relationship set.
S202, determining a second service interface associated with the first service interface corresponding to the first service interface information from the interface association relationship included in the interface association relationship set, wherein the second service interface is used for acquiring target service data stored by the second service system.
Each service system may correspond to one or more service interfaces, and each service interface may be used to transmit different service data. The service data of the corresponding service system can be acquired through the service interface or the service data to be stored can be sent to the corresponding service system through the service interface. For example, invoking a first service interface may transfer service data stored by a first service system, and for example, invoking a second service interface may transfer service data stored by a second service system. The set of interface association relationships includes interface association relationships between different service interfaces.
In a specific implementation, in step S202, the first service interface information is already obtained from the data query request, and a first service system may be determined; the computer device may then obtain the set of interface associations from a local space or other platform. Wherein other platforms may be blockchains, etc. And the second service interface associated with the first service interface can be obtained according to the association relationship included in the interface association relationship set.
In one embodiment, the interface association set includes a plurality of interface association subsets, each corresponding to a service type; the specific implementation manner of determining the second service interface associated with the first service interface corresponding to the first service interface information from the interface association relationship included in the interface association relationship set may be: firstly, determining a target service type to which a target service belongs; searching a target interface incidence relation subset matched with the target service type from the plurality of interface incidence relation subsets; and determining a second service interface associated with the first service interface corresponding to the first service interface information from the target interface association relation subset. Specifically, the computer device may determine a target service type to which the target belongs, and then match the target service type with each service type to obtain a matching service type matched with the target service type; and then acquiring a target interface incidence relation subset corresponding to the matched service type from the plurality of interface incidence relation subsets, and determining a second service interface associated with the first service interface from the target interface incidence relation subset. The second service interface associated with the first service interface can be quickly found through the service type, and the efficiency of data query is further improved.
For example, the interface association set includes a subset 1 of interface associations and a subset 2 of interface associations; the interface incidence relation subset 1 corresponds to the insurance business type; the interface incidence relation subset 2 corresponds to the weather service type; the target service is insurance purchase service, the first service interface is service interface 1, the computer equipment can determine the target service type of the insurance purchase service as insurance service type, then the interface incidence relation subset 1 matched with the insurance service type is searched from a plurality of interface incidence relation subsets, and the interface incidence relation subset 1 comprises the interface incidence relation between the service interface 1 and the service interface 2; the computer device may then obtain the service interface 2 corresponding to the service interface 1 from the interface association relation subset 1.
S203, acquiring an interface configuration file between the first service interface and the second service interface.
In a specific implementation, a plurality of reference interface configuration files can be obtained, each reference configuration file corresponds to a plurality of interface fields, and each field interface is used for indicating interface attribute information; determining attribute information of a first service interface and attribute information of a second service interface; respectively matching the attribute information of the first service interface and the attribute information of the second service interface with the interface attribute information indicated by the interface field included in each reference configuration file to obtain a first matching interface field matched with the attribute information of the first service interface and a second matching interface field matched with the attribute information of the second service interface; and if the first matching interface field and the second matching interface field belong to the same reference configuration file, determining the same reference configuration file corresponding to the first matching interface field and the second matching interface field as an interface configuration file between the first service interface and the second service interface. Wherein a plurality of reference interface profiles may be centrally stored in the computer device, the interface attribute information may include an interface identification, an interface type, and the like. The computer device may match the attribute information of the first service interface with the interface attribute information indicated by the plurality of fields in the reference interface profile, and determines a first matching interface field corresponding to the matching interface attribute information matched with the attribute information of the first service interface, and similarly, a second matching interface field corresponding to matching interface attribute information for which attribute information of the second service interface matches may be determined, then judging whether the first matching interface field and the second matching interface field belong to the same reference configuration file in a plurality of reference configuration files, if the first matching interface field and the second matching interface field belong to the same reference configuration file, determining the same reference configuration file corresponding to the first matching interface field and the second matching interface field as an interface configuration file between the first service interface and the second service interface.
If the first matching interface field and the second matching interface field are determined not to belong to the same reference configuration file, sending prompt information to the first service system, and displaying a configuration interface, wherein the prompt information is used for indicating that no interface configuration file exists between the first service interface and the second service interface; and then configuring an interface configuration file between the first service interface and the second service interface in the configuration interface by an authorized person, submitting a confirmation operation on the configuration interface, and then configuring the interface configuration file between the first service interface and the second service interface when the computer device detects the confirmation operation on the configuration interface. The interface configuration file is stored in a json array mode.
S204, based on the second service interface, calling the interface configuration file to acquire the target service data from the second service system, and based on the first service interface, sending the target service data to the first service system.
In a specific implementation, the computer device may parse the interface configuration file to obtain a service transmission parameter of the first service interface and a service transmission parameter of the second service interface; and then, acquiring target service data of the target service from the second service system by using the service transmission parameter of the second service interface. And then the computer equipment acquires the target service data of the target service from the second service system, and sends the target service data to the first service system by using the service transmission parameters of the first service interface.
In an embodiment, in order to further improve the efficiency of data query, since the interface configuration file is configured in a json array, which is convenient for maintenance, after the interface configuration file is obtained, the service transmission parameters of the first service interface and the service transmission parameters of the second service interface may be adjusted, and then the target service data of the target service is obtained from the second service system according to the adjusted service transmission parameters of the first service interface. And then the computer equipment sends the target service data to the first service system by using the adjusted service transmission parameter of the first service interface, so that the data query efficiency can be improved. How the service transmission parameters of the first service interface and the service transmission parameters of the second service interface are adjusted can be determined according to service requirements, traffic bandwidths and service query priorities. For example, when the service requirement is queried in a very short time (e.g., 1s, 3s), the service transmission parameters of the first service interface and the service transmission parameters of the second service interface are adjusted in a direction in which data query is faster. For another example, if both the available bandwidth of the first service system and the available bandwidth of the second service system currently exceed the preset bandwidth, the service transmission parameter of the first service interface and the service transmission parameter of the second service interface may be increased. For another example, the query priority of the service data of the query target service may be determined, and if the query priority is higher than the threshold, the service transmission parameter of the first service interface and the service transmission parameter of the second service interface may also be increased.
In the embodiment of the application, a data query request aiming at a target service and sent by a first service system is received, wherein the data query request carries first service interface information corresponding to the first service system, and the data query request is used for requesting target service data of the target service stored by a second service system; determining a second service interface associated with the first service interface corresponding to the first service interface information from the interface association relationship included in the interface association relationship set, wherein the second service interface is used for acquiring target service data stored by a second service system; acquiring an interface configuration file between a first service interface and a second service interface; and calling a second service interface in the interface configuration file to acquire target service data from the second service system, and sending the target service data to the first service system by using the first service interface. The business interface between the two business systems can be quickly searched by developers by establishing the interface incidence relation; furthermore, the service data query is carried out by directly calling the interface configuration file, and codes are written in real time when two service systems are not required to carry out the service data query.
Based on the description of the above data query method embodiment, the present application also discloses a data query apparatus, which may be a computer program (including program code) running in the above mentioned computer device. The data querying device may perform the method illustrated in fig. 2. Referring to fig. 3, the data query apparatus may operate as follows:
a communication unit 301, configured to receive a data query request for a target service sent by a first service system, where the data query request carries first service interface information corresponding to the first service system, and the data query request is used to request target service data of the target service stored in a second service system;
a processing unit 302, configured to determine, from an interface association relationship included in an interface association relationship set, a second service interface associated with a first service interface corresponding to the first service interface information, where the second service interface is used to obtain target service data stored in the second service system;
the processing unit 302 is further configured to obtain an interface configuration file between the first service interface and the second service interface;
the processing unit 302 is further configured to call the interface configuration file to obtain the target service data from the second service system based on the second service interface;
the communication unit 301 is further configured to send the target service data to a first service system based on the first service interface.
In one embodiment, the interface association set includes a plurality of interface association subsets, and each interface association subset corresponds to one service type; when determining, from the interface association relationship included in the interface association relationship set, the second service interface associated with the first service interface corresponding to the first service interface information, the processing unit 302 may specifically be configured to:
determining a target service type to which the target service belongs;
searching a target interface incidence relation subset matched with the target service type from the plurality of interface incidence relation subsets;
and determining a second service interface associated with the first service interface corresponding to the first service interface information from the target interface association relation subset.
In an embodiment, the first service interface information includes a destination address of the first service system, and before determining, from the interface association relationship included in the interface association relationship set, the second service interface associated with the first service interface corresponding to the first service interface information, the processing unit 302 is further configured to:
triggering a target intelligent contract according to the target service type of the target service:
calling the target intelligent contract to acquire the identity information corresponding to the target address stored in the block chain and the preset authorization condition corresponding to the target intelligent contract;
and judging whether the identity information meets the preset authorization condition or not through the target intelligent contract, and if the identity information meets the preset authorization condition, acquiring an interface association relation set.
In an embodiment, the processing unit 302 is further configured to:
acquiring service interfaces of a plurality of service systems from a preset storage space;
establishing interface incidence relations for the service interfaces of the plurality of service systems according to preset conditions to obtain the interface incidence relations among the service interfaces; wherein the preset conditions include one or more of: data interaction exists between the service interfaces, and the service types of the processing services between the service interfaces are the same;
and storing the interface association relationship among the service interfaces in an interface association relationship set.
In an embodiment, when the processing unit 302 calls the second service interface in the interface configuration file to obtain the target service data from the second service system, it may specifically be configured to:
analyzing the interface configuration file to obtain the service transmission parameters of the first service interface and the service transmission parameters of the second service interface;
acquiring the target service data from the second service system by using the service transmission parameters of the second service interface;
when the communication unit 301 uses the first service interface to send the target service data to the first service system, it may specifically be configured to:
and transmitting the target service data to a first service system by using the service transmission parameter of the first service interface.
In an embodiment, when acquiring the interface configuration file between the first service interface and the second service interface, the processing unit 302 may specifically be configured to:
acquiring a plurality of reference interface configuration files, wherein each reference configuration file corresponds to a plurality of interface fields, and each field interface is used for indicating interface attribute information;
determining attribute information of the first service interface and attribute information of the second service interface;
respectively matching the attribute information of the first service interface and the attribute information of the second service interface with the interface attribute information indicated by the interface field included in each reference configuration file to obtain a first matching interface field matched with the attribute information of the first service interface and a second matching interface field matched with the attribute information of the second service interface;
if the first matching interface field and the second matching interface field belong to the same reference configuration file, determining the same reference configuration file corresponding to the first matching interface field and the second matching interface field as an interface configuration file between the first service interface and the second service interface.
In an embodiment, the processing unit 302 is further configured to:
if the first matching interface field and the second matching interface field do not belong to the same reference configuration file, sending prompt information to the first service system, and displaying a configuration interface, wherein the prompt information is used for indicating that no interface configuration file exists between the first service interface and the second service interface;
and when the confirmation operation aiming at the configuration interface is detected, configuring an interface configuration file between the first service interface and the second service interface.
It can be understood that each functional unit of the data query apparatus in this embodiment can be specifically implemented according to the method in the foregoing method embodiment fig. 2, and the specific implementation process thereof can refer to the related description in the foregoing method embodiment fig. 2, which is not described herein again.
Further, please refer to fig. 4, where fig. 4 is a schematic structural diagram of a computer device according to an embodiment of the present application. The computer device in the corresponding embodiment of fig. 2 may be the computer device shown in fig. 4. As shown in fig. 4, the computer device may include: a processor 401, an input device 402, an output device 403, and a memory 404. The processor 401, the input device 402, the output device 403, and the memory 404 are connected by a bus 405. The memory 404 is used to store a computer program comprising program instructions and the processor 401 is used to execute the program instructions stored by the memory 404.
In the embodiment of the present application, the processor 401 executes the executable program code in the memory 404 to perform the following operations:
receiving a data query request aiming at a target service, which is sent by a first service system, wherein the data query request carries first service interface information corresponding to the first service system, and the data query request is used for requesting target service data of the target service, which is stored by a second service system;
determining a second service interface associated with the first service interface corresponding to the first service interface information from the interface association relationship included in the interface association relationship set, where the second service interface is used to obtain target service data stored in the second service system;
acquiring an interface configuration file between the first service interface and the second service interface;
and calling the interface configuration file to acquire the target service data from the second service system based on the second service interface, and sending the target service data to the first service system based on the first service interface.
In one embodiment, the interface association set includes a plurality of interface association subsets, and each interface association subset corresponds to one service type; when the processor 401 determines, from the interface association relationship included in the interface association relationship set, the second service interface associated with the first service interface corresponding to the first service interface information, the processor may specifically be configured to:
determining a target service type to which the target service belongs;
searching a target interface incidence relation subset matched with the target service type from the plurality of interface incidence relation subsets;
and determining a second service interface associated with the first service interface corresponding to the first service interface information from the target interface association relation subset.
In an embodiment, the first service interface information includes a destination address of the first service system, and before determining, from the interface association relationship included in the interface association relationship set, the second service interface associated with the first service interface corresponding to the first service interface information, the processor 401 is further configured to:
triggering a target intelligent contract according to the target service type of the target service:
calling the target intelligent contract to acquire the identity information corresponding to the target address stored in the block chain and the preset authorization condition corresponding to the target intelligent contract;
and judging whether the identity information meets the preset authorization condition or not through the target intelligent contract, and if the identity information meets the preset authorization condition, acquiring an interface association relation set.
In one embodiment, the processor 401 is further configured to:
acquiring service interfaces of a plurality of service systems from a preset storage space;
establishing interface incidence relations for the service interfaces of the plurality of service systems according to preset conditions to obtain the interface incidence relations among the service interfaces; wherein the preset conditions include one or more of: data interaction exists between the service interfaces, and the service types of the processing services between the service interfaces are the same;
and storing the interface association relationship among the service interfaces in an interface association relationship set.
In an embodiment, when the processor 401 calls the second service interface in the interface configuration file to obtain the target service data from the second service system, the processor may be specifically configured to:
analyzing the interface configuration file to obtain the service transmission parameters of the first service interface and the service transmission parameters of the second service interface;
acquiring the target service data from the second service system by using the service transmission parameters of the second service interface;
the sending the target service data to a first service system by using the first service interface includes:
and transmitting the target service data to a first service system by using the service transmission parameter of the first service interface.
In an embodiment, when the processor 401 acquires the interface configuration file between the first service interface and the second service interface, it may specifically be configured to:
acquiring a plurality of reference interface configuration files, wherein each reference configuration file corresponds to a plurality of interface fields, and each field interface is used for indicating interface attribute information;
determining attribute information of the first service interface and attribute information of the second service interface;
respectively matching the attribute information of the first service interface and the attribute information of the second service interface with the interface attribute information indicated by the interface field included in each reference configuration file to obtain a first matching interface field matched with the attribute information of the first service interface and a second matching interface field matched with the attribute information of the second service interface;
if the first matching interface field and the second matching interface field belong to the same reference configuration file, determining the same reference configuration file corresponding to the first matching interface field and the second matching interface field as an interface configuration file between the first service interface and the second service interface.
In one embodiment, the processor 401 is further configured to:
if the first matching interface field and the second matching interface field do not belong to the same reference configuration file, sending prompt information to the first service system, and displaying a configuration interface, wherein the prompt information is used for indicating that no interface configuration file exists between the first service interface and the second service interface;
and when the confirmation operation aiming at the configuration interface is detected, configuring an interface configuration file between the first service interface and the second service interface.
It should be understood that, in the embodiment of the present Application, the Processor 401 may be a Central Processing Unit (CPU), and the Processor 401 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 404 may include a read-only memory and a random access memory, and provides instructions and data to the processor 401. A portion of the memory 404 may also include non-volatile random access memory.
The input device 402 may comprise a keyboard or the like and inputs the first service interface information to the processor 401; the output device 403 may include a display or the like.
In a specific implementation, the processor 401, the input device 402, the output device 403, and the memory 404 described in this embodiment may execute the implementation described in all the embodiments above, and may also execute the implementation described in the apparatus above, which is not described herein again.
A computer-readable storage medium is provided in an embodiment of the present application, and stores a computer program, where the computer program includes program instructions, and the program instructions, when executed by a processor, can perform the steps performed in all the above embodiments.
Embodiments of the present application further provide a computer program product or a computer program, where the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium, and when the computer instructions are executed by a processor of a computer device, the computer instructions perform the methods in all the embodiments described above.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
While the invention has been described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A method for querying data, comprising:
receiving a data query request aiming at a target service, which is sent by a first service system, wherein the data query request carries first service interface information corresponding to the first service system, and the data query request is used for requesting target service data of the target service, which is stored by a second service system;
determining a second service interface associated with the first service interface corresponding to the first service interface information from the interface association relationship included in the interface association relationship set, where the second service interface is used to obtain target service data stored in the second service system;
acquiring an interface configuration file between the first service interface and the second service interface;
and calling the interface configuration file to acquire the target service data from the second service system based on the second service interface, and sending the target service data to the first service system based on the first service interface.
2. The method of claim 1, wherein the set of interface associations comprises a plurality of subsets of interface associations, each subset of interface associations corresponding to a service type; determining, from the interface association relationship included in the interface association relationship set, a second service interface associated with the first service interface corresponding to the first service interface information, including:
determining a target service type to which the target service belongs;
searching a target interface incidence relation subset matched with the target service type from the plurality of interface incidence relation subsets;
and determining a second service interface associated with the first service interface corresponding to the first service interface information from the target interface association relation subset.
3. The method according to claim 1 or 2, wherein the first service interface information includes a destination address of a first service system, and before determining a second service interface associated with a first service interface corresponding to the first service interface information from among the interface associations included in the interface association set, the method further includes:
triggering a target intelligent contract according to the target service type to which the target service belongs;
calling the target intelligent contract to acquire the identity information corresponding to the target address stored in the block chain and the preset authorization condition corresponding to the target intelligent contract;
and judging whether the identity information meets the preset authorization condition or not through the target intelligent contract, and if the identity information meets the preset authorization condition, acquiring an interface association relation set.
4. The method of claim 1, further comprising:
acquiring service interfaces of a plurality of service systems from a preset storage space;
establishing interface incidence relations for the service interfaces of the plurality of service systems according to preset conditions to obtain the interface incidence relations among the service interfaces; wherein the preset conditions include one or more of: data interaction exists between the service interfaces, and the service types of the processing services between the service interfaces are the same;
and storing the interface association relationship among the service interfaces in an interface association relationship set.
5. The method of claim 1, wherein the invoking the interface profile to obtain the target service data from the second service system based on the second service interface comprises:
analyzing the interface configuration file to obtain the service transmission parameters of the first service interface and the service transmission parameters of the second service interface;
acquiring the target service data from the second service system by using the service transmission parameters of the second service interface;
the sending the target service data to a first service system based on the first service interface includes:
and transmitting the target service data to a first service system by using the service transmission parameter of the first service interface.
6. The method of claim 1, wherein the obtaining the interface configuration file between the first service interface and the second service interface comprises:
acquiring a plurality of reference interface configuration files, wherein each reference configuration file corresponds to a plurality of interface fields, and each field interface is used for indicating interface attribute information;
determining attribute information of the first service interface and attribute information of the second service interface;
respectively matching the attribute information of the first service interface and the attribute information of the second service interface with the interface attribute information indicated by the interface field included in each reference configuration file to obtain a first matching interface field matched with the attribute information of the first service interface and a second matching interface field matched with the attribute information of the second service interface;
if the first matching interface field and the second matching interface field belong to the same reference configuration file, determining the same reference configuration file corresponding to the first matching interface field and the second matching interface field as an interface configuration file between the first service interface and the second service interface.
7. The method of claim 6, further comprising:
if the first matching interface field and the second matching interface field do not belong to the same reference configuration file, sending prompt information to the first service system and displaying a configuration interface, wherein the prompt information is used for indicating that an interface configuration file does not exist between the first service interface and the second service interface;
and when the confirmation operation aiming at the configuration interface is detected, configuring an interface configuration file between the first service interface and the second service interface.
8. A data query apparatus, comprising:
a communication unit, configured to receive a data query request for a target service sent by a first service system, where the data query request carries first service interface information corresponding to the first service system, and the data query request is used to request target service data of the target service stored in a second service system;
a processing unit, configured to determine, from an interface association relationship included in an interface association relationship set, a second service interface associated with a first service interface corresponding to the first service interface information, where the second service interface is used to obtain target service data stored in the second service system;
the processing unit is further configured to obtain an interface configuration file between the first service interface and the second service interface;
the processing unit is further configured to call the interface configuration file to obtain the target service data from the second service system based on the second service interface;
the communication unit is further configured to send the target service data to a first service system based on the first service interface.
9. A computer device comprising a memory for storing a computer program;
a processor calling the computer program in the memory for executing the data query method of any one of claims 1 to 7.
10. A computer storage medium storing a computer program comprising program instructions that, when executed by a processor, perform a data query method as claimed in any one of claims 1 to 7.
CN202111249844.6A 2021-10-26 2021-10-26 Data query method and device, computer equipment and storage medium Pending CN113961600A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111249844.6A CN113961600A (en) 2021-10-26 2021-10-26 Data query method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111249844.6A CN113961600A (en) 2021-10-26 2021-10-26 Data query method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113961600A true CN113961600A (en) 2022-01-21

Family

ID=79467307

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111249844.6A Pending CN113961600A (en) 2021-10-26 2021-10-26 Data query method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113961600A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115292356A (en) * 2022-07-21 2022-11-04 中电金信软件有限公司 Data query method and device and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115292356A (en) * 2022-07-21 2022-11-04 中电金信软件有限公司 Data query method and device and electronic equipment

Similar Documents

Publication Publication Date Title
US10073916B2 (en) Method and system for facilitating terminal identifiers
CN109558748B (en) Data processing method and device, electronic equipment and storage medium
CN110535971B (en) Interface configuration processing method, device, equipment and storage medium based on block chain
CN112087502B (en) Method, device and equipment for processing request and storage medium
CN113364853B (en) Business service system, business request method and gateway equipment
CN114389874B (en) Response method and device for cloud application service, server and storage medium
CN113259479B (en) Data processing method and equipment
CN113242331B (en) Different types of address conversion method, device, computer equipment and storage medium
CN108154024B (en) Data retrieval method and device and electronic equipment
CN112527504A (en) Multi-tenant resource quota management method and device, and computer equipment
CN112328486A (en) Interface automation test method and device, computer equipment and storage medium
CN114185743A (en) Data processing method and device, computer equipment and storage medium
CN113961600A (en) Data query method and device, computer equipment and storage medium
CN112200680B (en) Block link point management method, device, computer and readable storage medium
CN114239072A (en) Block chain node management method and block chain network
CN111817859A (en) Data sharing method, device, equipment and storage medium based on zero knowledge proof
CN111597537A (en) Block chain network-based certificate issuing method, related equipment and medium
CN113420050B (en) Data query management method, device, computer equipment and readable storage medium
CN114567678A (en) Resource calling method and device of cloud security service and electronic equipment
CN112291241A (en) Firewall wall opening method, firewall wall opening device and terminal equipment
CN114531486B (en) Industrial Internet data processing method, device, equipment and storage medium
CN115878352B (en) Event delivery processing method and device based on pre-subscription
CN110784479B (en) Data verification method and device, electronic equipment and storage medium
CN111523890B (en) Block chain-based data processing method, device, storage medium and equipment
US20230061914A1 (en) Rule based machine learning for precise fraud detection

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20221026

Address after: Room 2601 (Unit 07), Qianhai Free Trade Building, No. 3048, Xinghai Avenue, Nanshan Street, Qianhai Shenzhen-Hong Kong Cooperation Zone, Shenzhen, Guangdong 518000

Applicant after: Shenzhen Ping An Smart Healthcare Technology Co.,Ltd.

Address before: 1-34 / F, Qianhai free trade building, 3048 Xinghai Avenue, Mawan, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong 518000

Applicant before: Ping An International Smart City Technology Co.,Ltd.