CN115033605A - Data query method and device, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN115033605A
CN115033605A CN202210686897.2A CN202210686897A CN115033605A CN 115033605 A CN115033605 A CN 115033605A CN 202210686897 A CN202210686897 A CN 202210686897A CN 115033605 A CN115033605 A CN 115033605A
Authority
CN
China
Prior art keywords
data
query
field
interface
queried
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
CN202210686897.2A
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.)
Weikun Shanghai Technology Service Co Ltd
Original Assignee
Weikun Shanghai Technology Service 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 Weikun Shanghai Technology Service Co Ltd filed Critical Weikun Shanghai Technology Service Co Ltd
Priority to CN202210686897.2A priority Critical patent/CN115033605A/en
Publication of CN115033605A publication Critical patent/CN115033605A/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/23Updating
    • 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/25Integrating or interfacing systems involving database management systems
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The invention relates to a data processing technology, and discloses a data query method, which comprises the following steps: acquiring data to be queried according to the data query request; performing field analysis on each json character string in the data to be queried to obtain a query field corresponding to each json character string; determining an interface field corresponding to each query field according to preset mapping relation data of the query fields and the interface fields; acquiring interface parameter information of an application interface corresponding to each interface field, and constructing an interface calling request according to the interface parameter information and the interface fields; calling an application interface according to the interface calling request, and receiving an interface return value to perform data replacement on data to be queried to obtain queried data; and sending the query data to preset terminal equipment. The invention also relates to a block chaining technique, the query field may be stored in a block chaining point. The invention also provides a data query device, equipment and a medium. The invention can improve the efficiency of data query.

Description

Data query method and device, electronic equipment and storage medium
Technical Field
The present invention relates to data processing technologies, and in particular, to a data query method and apparatus, an electronic device, and a storage medium.
Background
With the development of science and technology, the query of business data is gradually standardized, and a data interface of a response type is called to complete data query when what type of data needs to be queried.
However, at present, more and more business data need to be queried, which results in that more and more data interfaces need to be called for querying the business data, but the existing data querying method can only call a single data interface to respectively take out the fields needed by the user, then assemble the fields and return the business data to be queried, which results in lower efficiency of data querying.
Disclosure of Invention
The invention provides a data query method, a data query device, electronic equipment and a storage medium, and mainly aims to improve the efficiency of data query.
Responding to a data query request, and acquiring data to be queried, which comprises one or more json character strings, according to the data query request;
performing field analysis on each json character string in the data to be queried to obtain a query field corresponding to each json character string;
determining an interface field corresponding to each query field according to preset mapping relation data of the query fields and the interface fields;
acquiring interface parameter information of an application interface corresponding to each interface field, and constructing an interface calling request according to the interface parameter information and all the interface fields corresponding to the interface parameter information;
calling the application interface according to the interface calling request, and receiving an interface return value of the application interface to perform data replacement on the data to be queried to obtain queried data;
and sending the query data to the terminal equipment which sends the data query request and/or predetermined terminal equipment.
Optionally, the performing field analysis on each json character string in the data to be queried to obtain a query field corresponding to each json character string includes:
and extracting the key name of each key value pair in the json character string to obtain a query field corresponding to the json character string.
Optionally, the receiving an interface return value of the application interface to perform data replacement on the data to be queried to obtain queried data includes:
extracting a return value corresponding to the interface field in the interface return value to obtain a field return value of the interface field;
determining the field return value of the interface field as the field query value of the query field corresponding to the interface field;
determining the key name in the json character string as the key value pair of the query field as a target key value pair of the query field;
and replacing the field query value of the query field with the key value in the target key value pair corresponding to the query field in the data to be queried to obtain the query data.
Optionally, the replacing the field query value of the query field with a key value in a target key value pair corresponding to the query field in the data to be queried to obtain the query data includes:
acquiring a field value format corresponding to the query field;
converting the field query value of the query field into a field value format corresponding to the query field;
and replacing the field query value of the query field after format conversion with a key value in a target key value pair corresponding to the query field in the data to be queried to obtain the query data.
Optionally, the sending the query data to the terminal device sending the data query request and/or a predetermined terminal device includes:
converting the query data into a preset data format to update the query data;
and sending the updated query data to the terminal equipment which sends the data query request and/or the predetermined terminal equipment.
Optionally, the sending the query data to the terminal device that sends the data query request and/or a predetermined terminal device includes:
calculating a data signature of the query data;
identifying the query data using the data signature;
and sending the query data identified by the data signature to the terminal equipment sending the data query request and/or predetermined terminal equipment.
In order to solve the above problem, the present invention also provides a data query apparatus, including:
the field analysis module is used for responding to a data query request and acquiring data to be queried, which comprises one or more json character strings, according to the data query request; performing field analysis on each json character string in the data to be queried to obtain a query field corresponding to each json character string; determining an interface field corresponding to each query field according to preset mapping relation data of the query fields and the interface fields;
the data query module is used for acquiring interface parameter information of the application interface corresponding to each interface field and constructing an interface calling request according to the interface parameter information and all the interface fields corresponding to the interface parameter information; calling the application interface according to the interface calling request, and receiving an interface return value of the application interface to perform data replacement on the data to be queried to obtain queried data;
and the data sending module is used for sending the query data to the terminal equipment which sends the data query request and/or predetermined terminal equipment.
Optionally, the receiving an interface return value of the application interface to perform data replacement on the data to be queried to obtain query data includes:
extracting a return value corresponding to the interface field in the interface return value to obtain a field return value of the interface field;
determining the field return value of the interface field as the field query value of the query field corresponding to the interface field;
determining the key name in the json character string as the key value pair of the query field as a target key value pair of the query field;
and replacing the field query value of the query field with the key value in the target key value pair corresponding to the query field in the data to be queried to obtain the query data.
In order to solve the above problem, the present invention also provides an electronic device, including:
a memory storing at least one computer program; and
and the processor executes the computer program stored in the memory to realize the data query method.
In order to solve the above problem, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored, and the at least one computer program is executed by a processor in an electronic device to implement the data query method described above.
The method comprises the steps that field analysis is carried out on each json character string in the data to be queried to obtain a query field corresponding to each json character string; determining an interface field corresponding to each query field according to preset mapping relation data of the query fields and the interface fields; acquiring interface parameter information of an application interface corresponding to each interface field, and constructing an interface calling request according to the interface parameter information and all the interface fields corresponding to the interface parameter information; calling the application interface according to the interface calling request, and receiving an interface return value of the application interface to perform data replacement on the data to be queried to obtain queried data; the method comprises the steps of determining an interface to be called according to the mapping relation between the field to be inquired and the interface field, constructing an interface calling request and calling at the same time, and simultaneously carrying out data replacement on data to be inquired returned by the calling interface to complete data inquiry without carrying out screening and assembling on the data after calling different application interfaces again, so that the efficiency of data inquiry is improved. Therefore, the data query method, the data query device, the electronic equipment and the readable storage medium provided by the embodiment of the invention improve the efficiency of data query.
Drawings
Fig. 1 is a schematic flow chart of a data query method according to an embodiment of the present invention;
fig. 2 is a schematic block diagram of a data query apparatus according to an embodiment of the present invention;
fig. 3 is a schematic diagram of an internal structure of an electronic device implementing a data query method according to an embodiment of the present invention;
the implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the invention provides a data query method. The execution subject of the data query method includes, but is not limited to, at least one of electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiments of the present application. In other words, the data query method may be performed by software or hardware installed in the terminal device or the server device, and the software may be a block chain platform. The server includes but is not limited to: the cloud server can be an independent server, or can be a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, Network service, cloud communication, middleware service, domain name service, security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, and the like.
Referring to fig. 1, which is a schematic flow chart of a data query method according to an embodiment of the present invention, in an embodiment of the present invention, the data query method includes:
s1, responding to a data query request, and acquiring data to be queried, which comprises one or more json character strings, according to the data query request;
in the embodiment of the invention, the data query request is a data query request, the data to be queried comprises one or more json character strings, and each json character string comprises a field to be queried.
Further, in the embodiment of the present invention, the data query request includes the data to be queried or a data storage address of the data to be queried, so that the data to be queried including one or more json character strings can be obtained according to the data query request, for example, the data to be queried is directly extracted from the data query request or the data to be queried is obtained according to the data storage address.
S2, performing field analysis on each json character string in the data to be queried to obtain a query field corresponding to each json character string;
in order to obtain the fields to be queried in the data to be queried, the embodiment of the invention analyzes the fields of each json character string in the data to be queried so as to obtain the query fields corresponding to the json character strings.
Specifically, in the embodiment of the present invention, the performing field analysis on each json character string in the data to be queried to obtain a query field corresponding to each json character string includes:
and extracting the key name of each key value pair in the json character string to obtain a query field corresponding to the json character string.
In another embodiment of the present invention, the query field may be stored in a blockchain node, and the data access efficiency is improved by using the characteristic of high throughput of the blockchain node.
S3, determining an interface field corresponding to each query field according to preset mapping relation data of the query fields and the interface fields;
in the embodiment of the present invention, the mapping relationship data includes the correspondence between different query fields and interface fields, and therefore, in the embodiment of the present invention, the interface field corresponding to each query field may be determined according to the mapping relationship data. The interface field is a field that can be called by an application interface of an application program.
S4, acquiring interface parameter information of the application interface corresponding to each interface field, and constructing an interface calling request according to the interface parameter information and all the interface fields corresponding to the interface parameter information;
in the embodiment of the present invention, the Application Interface is an API (Application Programming Interface), and the Interface parameter information includes field values of parameter fields necessary for constructing an Interface call request, such as url, a request mode, a request format, and the like.
In the embodiment of the present invention, constructing an interface call request according to the interface parameter information and all interface fields corresponding to the interface parameter information includes:
acquiring a preset interface calling request template;
the interface call request template of the embodiment of the invention is a blank interface call request which contains necessary different request fields and is not filled with field values.
Extracting a field value corresponding to each parameter field in the interface parameter information;
taking the field value corresponding to the parameter field as the field value corresponding to the same request field in the interface calling request, and writing the field value into the interface calling request template to obtain an initial interface calling request;
and taking the interface field as a field of the request of the initial interface calling request to obtain the interface calling request.
The field of the request in the embodiment of the invention is a field which can be called and returned by an application interface.
S5, calling the application interface according to the interface calling request, and receiving an interface return value of the application interface to perform data replacement on the data to be queried to obtain queried data;
in the embodiment of the present invention, in order to query the field value corresponding to the query field, the application interface needs to be called according to the interface call request.
In detail, the invoking the application interface according to the interface invoking request in the embodiment of the present invention includes:
acquiring an application server of an application corresponding to the application interface;
and sending the interface calling request to the application server to call the application interface.
In the embodiment of the invention, the return value corresponding to the field of the request is returned after the application interface is successfully called.
Further, in the embodiment of the present invention, receiving an interface return value of the application interface to perform data replacement on the data to be queried to obtain query data includes:
extracting a return value corresponding to the interface field in the interface return value to obtain a field return value of the interface field;
determining the field return value of the interface field as the field query value of the query field corresponding to the interface field;
determining the key name in the json character string as the key value pair of the query field as a target key value pair of the query field;
in the embodiment of the invention, the key value in the key value pair is determined as the key name, and the value in the key value pair is determined as the key value.
And replacing the field query value of the query field with the key value in the target key value pair corresponding to the query field in the data to be queried to obtain the query data.
Further, because the format of the field return value in the embodiment of the present invention cannot meet the requirement, the replacing, in the embodiment of the present invention, the field query value of the query field with the key value in the target key value pair corresponding to the query field in the data to be queried to obtain the query data includes:
acquiring a field value format corresponding to the query field;
converting the field query value of the query field into a field value format corresponding to the query field;
and replacing the field query value of the query field after format conversion with a key value in a target key value pair corresponding to the query field in the data to be queried to obtain the query data.
And S6, sending the query data to the terminal equipment which sends the data query request and/or the predetermined terminal equipment.
In the embodiment of the present invention, the query data is sent to a terminal device that sends the data query request and/or a predetermined terminal device, where the terminal device includes: intelligent terminals such as cell-phone, computer, panel.
Further, in the embodiment of the present invention, sending the query data to the terminal device that sends the data query request and/or a predetermined terminal device includes:
acquiring a device transmission address of the terminal device;
constructing a transmission channel according to the equipment transmission address and a preset transmission protocol;
and sending the query data to the terminal equipment by utilizing the transmission channel.
Specifically, the constructing of the transmission channel according to the device transmission address and the preset transmission protocol in the embodiment of the present invention includes:
and replacing the equipment transmission address with a transmission address in the transmission protocol to obtain the transmission channel.
Specifically, the transmission protocol in the embodiment of the present invention may be a transmission protocol such as a TCP protocol, a UDP protocol, or the like, and the embodiment of the present invention does not limit the type of the transmission protocol.
In another embodiment of the present invention, in order to ensure that data loss occurs due to incomplete data transmission of the query data during the transmission process, the sending of the query data to the terminal device that sends the data query request and/or the predetermined terminal device includes:
calculating a data signature of the query data;
identifying the query data using the data signature;
and sending the query data identified by the data signature to the terminal equipment sending the data query request and/or predetermined terminal equipment.
Specifically, the performing file signature calculation on the query data to obtain signature data in the embodiment of the present invention includes:
converting the query data into binary data;
and taking the binary data as a function variable of a preset file signature function to calculate the file signature function, so as to obtain the data signature.
Optionally, the file signature function in the embodiment of the present invention includes, but is not limited to, an MD5 algorithm function and a hash algorithm function.
In another embodiment of the present invention, to ensure that the format of the query data meets the requirement, the sending the query data to the terminal device that sends the data query request and/or the predetermined terminal device includes: and converting the query data into a preset data format to update the query data, and sending the updated query data to the terminal equipment sending the data query request and/or the predetermined terminal equipment. The data format is in a set data format in the embodiment of the invention, and the embodiment of the invention does not limit the type of the data format.
Fig. 2 is a functional block diagram of the data query device according to the present invention.
The data query apparatus 100 according to the present invention may be installed in an electronic device. According to the implemented functions, the data query apparatus may include a field parsing module 101, a data query module 102, and a data sending module 103, which may also be referred to as a unit, and refers to a series of computer program segments that can be executed by a processor of an electronic device and can perform fixed functions, and are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the field analysis module 101 is configured to respond to a data query request and acquire data to be queried, which includes one or more json character strings, according to the data query request; performing field analysis on each json character string in the data to be queried to obtain a query field corresponding to each json character string; determining an interface field corresponding to each query field according to preset mapping relation data of the query fields and the interface fields;
the data query module 102 is configured to obtain interface parameter information of an application interface corresponding to each interface field, and construct an interface call request according to the interface parameter information and all the interface fields corresponding to the interface parameter information; calling the application interface according to the interface calling request, and receiving an interface return value of the application interface to perform data replacement on the data to be queried to obtain queried data;
the data sending module 103 is configured to send the query data to the terminal device that sends the data query request and/or a predetermined terminal device.
In detail, when the modules in the data query apparatus 100 according to the embodiment of the present invention are used, the same technical means as the data query method described in fig. 1 are used, and the same technical effects can be produced, which is not described herein again.
Fig. 3 is a schematic structural diagram of an electronic device implementing the data query method according to the present invention.
The electronic device may comprise a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may further comprise a computer program, such as a data query program, stored in the memory 11 and operable on the processor 10.
The memory 11 includes at least one type of readable storage medium, which includes flash memory, removable hard disk, multimedia card, card type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, for example a removable hard disk of the electronic device. The memory 11 may also be an external storage device of the electronic device in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, provided on the electronic device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 may be used not only to store application software installed in the electronic device and various types of data, such as codes of a data query program, etc., but also to temporarily store data that has been output or will be output.
The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device by running or executing programs or modules (e.g., data query programs, etc.) stored in the memory 11 and calling data stored in the memory 11.
The communication bus 12 may be a PerIPheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. The communication bus 12 is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
Fig. 3 shows only an electronic device having components, and those skilled in the art will appreciate that the structure shown in fig. 3 does not constitute a limitation of the electronic device, and may include fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so that functions such as charge management, discharge management, and power consumption management are implemented through the power management device. The power source may also include any component of one or more dc or ac power sources, recharging devices, power failure classification circuits, power converters or inverters, power status indicators, and the like. The electronic device may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Optionally, the communication interface 13 may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices.
Optionally, the communication interface 13 may further include a user interface, which may be a Display (Display), an input unit (such as a Keyboard (Keyboard)), and optionally, a standard wired interface, or a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the electronic device and for displaying a visualized user interface.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The data query program stored in the memory 11 of the electronic device is a combination of a plurality of computer programs, and when running in the processor 10, can realize:
responding to a data query request, and acquiring data to be queried, which comprises one or more json character strings, according to the data query request;
performing field analysis on each json character string in the data to be queried to obtain a query field corresponding to each json character string;
determining an interface field corresponding to each query field according to preset mapping relation data of the query fields and the interface fields;
acquiring interface parameter information of an application interface corresponding to each interface field, and constructing an interface calling request according to the interface parameter information and all the interface fields corresponding to the interface parameter information;
calling the application interface according to the interface calling request, and receiving an interface return value of the application interface to perform data replacement on the data to be queried to obtain queried data;
and sending the query data to the terminal equipment which sends the data query request and/or predetermined terminal equipment.
Specifically, the processor 10 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 for a specific implementation method of the computer program, which is not described herein again.
Further, the electronic device integrated module/unit, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. The computer readable medium may be non-volatile or volatile. The computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
Embodiments of the present invention may also provide a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program may implement:
responding to a data query request, and acquiring data to be queried, which comprises one or more json character strings, according to the data query request;
performing field analysis on each json character string in the data to be queried to obtain a query field corresponding to each json character string;
determining an interface field corresponding to each query field according to preset mapping relation data of the query fields and the interface fields;
acquiring interface parameter information of an application interface corresponding to each interface field, and constructing an interface calling request according to the interface parameter information and all the interface fields corresponding to the interface parameter information;
calling the application interface according to the interface calling request, and receiving an interface return value of the application interface to perform data replacement on the data to be queried to obtain queried data;
and sending the query data to the terminal equipment which sends the data query request and/or predetermined terminal equipment.
Further, the computer usable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the blockchain node, and the like.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
The embodiment of the application can acquire and process related data based on an artificial intelligence technology. Among them, Artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not to denote any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A method for data query, the method comprising:
responding to a data query request, and acquiring data to be queried, which comprises one or more json character strings, according to the data query request;
performing field analysis on each json character string in the data to be queried to obtain a query field corresponding to each json character string;
determining an interface field corresponding to each query field according to preset mapping relation data of the query fields and the interface fields;
acquiring interface parameter information of an application interface corresponding to each interface field, and constructing an interface calling request according to the interface parameter information and all the interface fields corresponding to the interface parameter information;
calling the application interface according to the interface calling request, and receiving an interface return value of the application interface to perform data replacement on the data to be queried to obtain queried data;
and sending the query data to the terminal equipment sending the data query request and/or predetermined terminal equipment.
2. The data query method of claim 1, wherein the performing field parsing on each json character string in the data to be queried to obtain a query field corresponding to each json character string comprises:
and extracting the key name of each key value pair in the json character string to obtain a query field corresponding to the json character string.
3. The data query method of claim 1, wherein the receiving an interface return value of the application interface to perform data replacement on the data to be queried to obtain query data comprises:
extracting a return value corresponding to the interface field in the interface return value to obtain a field return value of the interface field;
determining the field return value of the interface field as the field query value of the query field corresponding to the interface field;
determining the key name in the json character string as the key value pair of the query field as a target key value pair of the query field;
and replacing the field query value of the query field with the key value in the target key value pair corresponding to the query field in the data to be queried to obtain the query data.
4. The data query method of claim 3, wherein the replacing the field query value of the query field with a key value in a target key value pair corresponding to the query field in the data to be queried to obtain the query data includes:
acquiring a field value format corresponding to the query field;
converting the field query value of the query field into a field value format corresponding to the query field;
and replacing the field query value of the query field after format conversion with a key value in a target key value pair corresponding to the query field in the data to be queried to obtain the query data.
5. The data query method according to claim 1, wherein the sending the query data to the terminal device that issued the data query request and/or a predetermined terminal device comprises:
converting the query data into a preset data format to update the query data;
and sending the updated query data to the terminal equipment which sends the data query request and/or the predetermined terminal equipment.
6. The data query method according to any one of claims 1 to 5, wherein the sending the query data to the terminal device that issued the data query request and/or a predetermined terminal device includes:
calculating a data signature of the query data;
identifying the query data using the data signature;
and sending the query data identified by the data signature to the terminal equipment sending the data query request and/or predetermined terminal equipment.
7. A data query apparatus, comprising:
the field analysis module is used for responding to a data query request and acquiring data to be queried, which comprises one or more json character strings, according to the data query request; performing field analysis on each json character string in the data to be queried to obtain a query field corresponding to each json character string; determining an interface field corresponding to each query field according to preset mapping relation data of the query fields and the interface fields;
the data query module is used for acquiring interface parameter information of the application interface corresponding to each interface field and constructing an interface calling request according to the interface parameter information and all the interface fields corresponding to the interface parameter information; calling the application interface according to the interface calling request, and receiving an interface return value of the application interface to perform data replacement on the data to be queried to obtain queried data;
and the data sending module is used for sending the query data to the terminal equipment which sends the data query request and/or predetermined terminal equipment.
8. The data query apparatus of claim 7, wherein the receiving of the interface return value of the application interface to perform data replacement on the data to be queried to obtain query data comprises:
extracting a return value corresponding to the interface field in the interface return value to obtain a field return value of the interface field;
determining the field return value of the interface field as the field query value of the query field corresponding to the interface field;
determining key names in the json character strings as key value pairs of the query fields as target key value pairs of the query fields;
and replacing the field query value of the query field with the key value in the target key value pair corresponding to the query field in the data to be queried to obtain the query data.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor;
wherein the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the data query method of any one of claims 1 to 6.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out a data query method according to any one of claims 1 to 6.
CN202210686897.2A 2022-06-16 2022-06-16 Data query method and device, electronic equipment and storage medium Pending CN115033605A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210686897.2A CN115033605A (en) 2022-06-16 2022-06-16 Data query method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210686897.2A CN115033605A (en) 2022-06-16 2022-06-16 Data query method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115033605A true CN115033605A (en) 2022-09-09

Family

ID=83124450

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210686897.2A Pending CN115033605A (en) 2022-06-16 2022-06-16 Data query method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115033605A (en)

Similar Documents

Publication Publication Date Title
CN114491047A (en) Multi-label text classification method and device, electronic equipment and storage medium
CN112115145A (en) Data acquisition method and device, electronic equipment and storage medium
CN114185895A (en) Data import and export method and device, electronic equipment and storage medium
CN113868528A (en) Information recommendation method and device, electronic equipment and readable storage medium
CN112506559A (en) Gray scale publishing method and device based on gateway, electronic equipment and storage medium
CN114881616A (en) Business process execution method and device, electronic equipment and storage medium
CN113890712A (en) Data transmission method and device, electronic equipment and readable storage medium
CN112580079A (en) Authority configuration method and device, electronic equipment and readable storage medium
CN113806434A (en) Big data processing method, device, equipment and medium
CN115081016A (en) Log desensitization method and device, electronic equipment and storage medium
CN112464619B (en) Big data processing method, device and equipment and computer readable storage medium
CN113722533A (en) Information pushing method and device, electronic equipment and readable storage medium
CN113468175A (en) Data compression method and device, electronic equipment and storage medium
CN115687384A (en) UUID (user identifier) identification generation method, device, equipment and storage medium
CN114547011A (en) Data extraction method and device, electronic equipment and storage medium
CN114185588A (en) Incremental package generation method, device, equipment and storage medium
CN114611477A (en) Design recommendation method and device for data table, electronic equipment and medium
CN114820132A (en) Order distribution method and device, electronic equipment and storage medium
CN115033605A (en) Data query method and device, electronic equipment and storage medium
CN114357534B (en) Classroom training platform construction method, device, equipment and medium based on block chain
CN114942855A (en) Interface calling method and device, electronic equipment and storage medium
CN115033510A (en) Component communication method, device, electronic device and storage medium
CN114416575A (en) Method, device and equipment for generating Mock data and storage medium
CN115225458A (en) Alarm notification method, alarm notification device, electronic equipment and storage medium
CN115174555A (en) File transmission method and device, electronic equipment and storage medium

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