CN114564231A - Data query method, data query device, electronic equipment, medium and program product - Google Patents

Data query method, data query device, electronic equipment, medium and program product Download PDF

Info

Publication number
CN114564231A
CN114564231A CN202210189276.3A CN202210189276A CN114564231A CN 114564231 A CN114564231 A CN 114564231A CN 202210189276 A CN202210189276 A CN 202210189276A CN 114564231 A CN114564231 A CN 114564231A
Authority
CN
China
Prior art keywords
configuration
data query
preset
data
interface
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
CN202210189276.3A
Other languages
Chinese (zh)
Inventor
吴晨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202210189276.3A priority Critical patent/CN114564231A/en
Publication of CN114564231A publication Critical patent/CN114564231A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • 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

Landscapes

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

Abstract

The present disclosure relates to a data query method, apparatus, electronic device, medium, and program product, the data query method comprising: reading a preset configuration through a preset interface, wherein the preset configuration comprises a first configuration and a second configuration, the first configuration comprises a predefined dynamic parameter related to data query, and the second configuration comprises a predefined function for obtaining a true value of the dynamic parameter; obtaining a true value of the dynamic parameter by executing the predefined function in the second configuration; and replacing the dynamic parameters in the first configuration with the real values, and executing data query based on the first configuration after parameter replacement. The data query method can adapt to various data query scenes, saves the cost of interface development, and can realize the required data query function through simple configuration.

Description

Data query method, data query device, electronic equipment, medium and program product
Technical Field
The present disclosure relates generally to the field of computer technology, and more particularly, to a data query method, apparatus, electronic device, medium, and program product.
Background
With the development of business, the change situation of business data is often needed to be concerned, and currently, related business data is mainly acquired from the storage of database tools such as MySQL, Hive and drive, and then is displayed in a visual page for a business party to view and analyze based on a specific scheme. For the above application scenario, the current online implementation scheme is to hard code the configuration for data query in the code and encapsulate it into an interface open to the outside. For a business party with data requirements, the above open interface to the outside needs to be relied on to query and acquire relevant data. However, for the above hard-coded approach, in order to query a specific piece of data, a special interface is often required to be developed and deployed online, which is difficult to adapt to various data query scenarios and costly to implement, especially for non-backend technicians.
Disclosure of Invention
The present disclosure provides a data query method, apparatus, electronic device, medium, and program product to solve at least the problems in the related art described above, and may not solve any of the problems described above.
According to a first aspect of embodiments of the present disclosure, there is provided a data query method, including: reading a preset configuration through a preset interface, wherein the preset configuration comprises a first configuration and a second configuration, the first configuration comprises a predefined dynamic parameter related to data query, and the second configuration comprises a predefined function for obtaining a true value of the dynamic parameter; obtaining a true value of the dynamic parameter by executing the predefined function in the second configuration; and replacing the dynamic parameters in the first configuration with the real values, and executing data query based on the first configuration after parameter replacement.
Optionally, the preset configuration comprises a predefined configuration name, wherein the preset interface reads the preset configuration based on the configuration name.
Optionally, the preset configuration is stored in a configuration platform, wherein reading the preset configuration through a preset interface includes: reading the preset configuration from the configuration platform through the preset interface in response to the preset configuration being stored in the configuration platform.
Optionally, the data query method further includes: mapping the preset configuration read by the preset interface into an executable instance so as to query data by executing the instance.
Optionally, the first configuration is encoded based on the database to be queried and a structured query language, wherein the dynamic parameter is represented by a preset identifier.
Optionally, the second configuration is encoded based on the JS object numbered musical notation.
According to a second aspect of the embodiments of the present disclosure, there is provided a data query apparatus including: an interface call unit configured to: reading a preset configuration through a preset interface, wherein the preset configuration comprises a first configuration and a second configuration, the first configuration comprises a predefined dynamic parameter related to data query, and the second configuration comprises a predefined function for obtaining a true value of the dynamic parameter; a first execution unit configured to: obtaining a true value of the dynamic parameter by executing the predefined function in the second configuration; a second execution unit configured to: and replacing the dynamic parameters in the first configuration with the real values, and executing data query based on the first configuration after parameter replacement.
Optionally, the preset configuration comprises a predefined configuration name, wherein the preset interface reads the preset configuration based on the configuration name.
Optionally, the preset configuration is stored in a configuration platform, wherein the interface calling unit is configured to: reading the preset configuration from the configuration platform through the preset interface in response to the preset configuration being stored in the configuration platform.
Optionally, the data query apparatus further includes: an instance mapping unit configured to: mapping the preset configuration read by the preset interface into an executable instance so as to query data by executing the instance.
Optionally, the first configuration is encoded based on the database to be queried and a structured query language, wherein the dynamic parameter is represented by a preset identifier.
Optionally, the second configuration is encoded based on the JS object profile.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the data query method according to the present disclosure.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium, wherein instructions, when executed by at least one processor, cause the at least one processor to perform a data query method as described above according to the present disclosure.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product comprising computer instructions which, when executed by a processor, implement a data query method according to the present disclosure.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
according to the data query method, the data query device, the electronic equipment, the medium and the program product, the real values of the dynamic parameters can be dynamically generated according to simple preset configuration through setting and realizing the predefined dynamic parameters, and data query is executed on the basis to obtain target data, so that the method can adapt to various data query scenes, a plurality of interfaces do not need to be developed for a plurality of pieces of data, and the cost of interface development is greatly saved. In addition, according to the data query method, the data query device, the electronic equipment, the medium and the program product of the exemplary embodiment of the disclosure, on one hand, technical details are shielded, so that non-backend technicians can realize a required data query function through simple configuration, on the other hand, modification of the configuration can be quickly validated, online deployment of services is not needed, and the online deployment cost is saved while the service stability is ensured.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a flow chart illustrating a data query method according to an exemplary embodiment of the present disclosure;
FIG. 2 is an illustrative diagram showing configuration execution logic in accordance with an exemplary embodiment of the present disclosure;
FIG. 3 is a block diagram illustrating a data querying device according to an exemplary embodiment of the present disclosure;
fig. 4 is a block diagram illustrating an electronic device 400 according to an example embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The embodiments described in the following examples do not represent all embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
In this case, the expression "at least one of the items" in the present disclosure means a case where three types of parallel expressions "any one of the items", "a combination of any plural ones of the items", and "the entirety of the items" are included. For example, "including at least one of a and B" includes the following three cases in parallel: (1) comprises A; (2) comprises B; (3) including a and B. For another example, "at least one of step one and step two is performed", which means the following three parallel cases: (1) executing the step one; (2) executing the step two; (3) and executing the step one and the step two.
At present, the implementation scheme for querying data in a database is mainly to hard code the configuration for querying data in a code and encapsulate the configuration into an interface which is open to the outside, and a service party queries and acquires related data by using the interface. However, if the traditional hard coding scheme is adopted, a special interface is often required to be developed and deployed online to query a specific piece of data, which is difficult to adapt to various data query scenarios and costly to implement, especially for non-backend technicians.
In view of the above problems, the present disclosure provides a data query method, apparatus, electronic device, medium, and program product, which can dynamically generate real values of dynamic parameters in a configuration according to a simple preset configuration, and perform data query on the basis to obtain target data, so as to be capable of adapting to various data query scenarios, without developing multiple interfaces for multiple data, thereby greatly saving the cost of interface development, and enabling non-backend technicians to implement a required data query function through simple configuration.
Hereinafter, a data query method, apparatus, and electronic device according to exemplary embodiments of the present disclosure will be described in detail with reference to fig. 1 to 4.
Fig. 1 is a flowchart illustrating a data query method according to an exemplary embodiment of the present disclosure.
Referring to fig. 1, in step S101, a preset configuration may be read through a preset interface. Here, the preset configuration may include a first configuration and a second configuration, the first configuration may include a predefined dynamic parameter related to the data query, and the second configuration may include a predefined function for obtaining a real value of the dynamic parameter. The dynamic parameter may represent a parameter that dynamically changes with a change in query condition or query time, and thus a real value of the dynamic parameter needs to be determined each time data is queried, where a person skilled in the art may predefine the dynamic parameter in the code according to actual needs. The predefined function may represent a separate small program with a specific function defined in a class, and the function may also be referred to as a method, and is implemented by extracting the code to improve reusability of the code, where a person skilled in the art may implement the predefined function in the code in advance according to actual needs. Further, the first configuration may be encoded based on a database and a Structured Query Language (SQL) that require a query, and the dynamic parameter may be represented using a preset identifier. SQL is an operating command set specifically built for a database, and is a fully functional database language. In addition, the second configuration may be encoded based on a JS Object Notation (JSON). JSON is a lightweight data exchange format that stores and represents data in a text format that is completely independent of the programming language.
According to an exemplary embodiment of the present disclosure, the preset configuration read by the preset interface may be mapped to an executable instance to query data by executing the instance. Here, the preset configuration may be mapped to a JavaBean as an executable instance.
According to an exemplary embodiment of the present disclosure, the preset configuration may include a predefined configuration name. Here, the preset interface may read the preset configuration based on a configuration name, and the configuration name may be defined by those skilled in the art according to actual situations. By identifying the configuration name, the preset interface can read the preset configuration more conveniently and reliably. On the other hand, the preset configuration may be stored in the configuration platform, and the configuration platform may be set by those skilled in the art according to actual situations to uniformly store various configurations. Here, the configuration platform may include a message push function, and when a configuration in the configuration platform is changed, a message of the configuration change may be pushed to a technician. Thus, as an example, the preset configuration may be read from the configuration platform through the preset interface in response to the preset configuration being stored in the configuration platform.
Next, in step S102, the actual value of the dynamic parameter may be obtained by executing the predefined function in the second configuration. Here, the predefined function may be executed based on a Java reflection mechanism. The Java reflection mechanism is a reflection mechanism based on Java language, and can dynamically acquire information and dynamically call an object method, namely in a running state, all attributes and methods of any class can be known; any method and property can be called for any object.
Next, in step S103, the dynamic parameter in the first configuration may be replaced with a true value, and based on the first configuration after parameter replacement, a data query may be performed to obtain the target data.
According to the exemplary embodiment of the present disclosure, as an example, assuming that a business side needs to view and analyze the version issue condition of a client in the week, and the version issue time of the client is from the third of the week to the next third of the week (today is after the third of the week) or from the last third of the week to the third of the week (today is before the third of the week), a time parameter as one of query conditions needs to be dynamically generated according to the version issue time; in addition, it is further assumed that the version number (appVersion) of the current reissued version of the client needs to be acquired by relying on the keep platform interface, that is, the version number of the current reissued version needs to be acquired from the keep interface first, and then the version number of the current reissued version is used as one of the query conditions. When the service side needs to inquire the total download number (downloadCount) of each version of the client in the week, the dynamic parameters can be predefined by using the identifier $ { xxx }, namely, the weekly release time ($ { thishweekreekleasetime }), the next weekly release time ($ { nextweekreeleeasetime }) and the current weekly release version ($ { thishweekreekreeleaseversions }) are defined. On this basis, the first configuration may be implemented, by way of example, by the following code:
Figure BDA0003524756770000061
in addition, the generation manner of the dynamic parameters can be specified in the second configuration, and the parameters (params) are transmitted based on JSON implementation. As an example, the second configuration may be implemented by:
Figure BDA0003524756770000062
here, getthiswwekreebletimetime (), getnextwekreleasetimetime (), and getthiswwekreeleaseversions () of the above code may represent predefined functions for obtaining the true value of the dynamic parameter, and those skilled in the art may implement the above functions in the code in advance.
Next, the first configuration and the second configuration may be combined into a preset configuration. As an example, a configuration name (configName) of the preset configuration may be predefined as getDownloadCount, and the preset configuration may be implemented by:
Figure BDA0003524756770000063
Figure BDA0003524756770000071
next, the preset configuration may be further stored in a configuration platform, and the preset configuration may be read from the configuration platform through a preset interface in response to the preset configuration being stored in the configuration platform. As an example, the preset interface may be implemented by:
Figure BDA0003524756770000072
next, the preset configuration can be mapped to a corresponding executable JavaBean. By way of example, the JavaBean may be implemented by the following code:
Figure BDA0003524756770000073
next, the actual value of the dynamic parameter may be obtained by executing the predefined function in the second configuration.
As an example, the function execution result may be represented by the following code:
Figure BDA0003524756770000074
next, the dynamic parameters in the first configuration may be replaced with real values. As an example, the first configuration after parameter replacement may be represented by the following code:
"sql":"select sum(downloadCount),app Version from table where time>='2021-11-17 00:00:00'and time<='2021-11-24 00:00:00'and app Version in('21.11.01',”'21.11.02','21.11.03')group by appVersion"
next, based on the first configuration after parameter replacement, data query may be performed, so as to obtain the total download number of each version of the client in the week. By way of example, the results of a data query may be represented by the contents of the following table:
sum(downloadCount) appVersion
9801302 21.11.01
5831322 21.11.02
10831322 21.11.03
fig. 2 is an illustrative diagram showing configuration execution logic in accordance with an exemplary embodiment of the present disclosure.
Referring to fig. 2, as an example, a technician at the service side may perform simple modular coding in advance to obtain a dynamic SQL configuration (i.e., the preset configuration as described above), and store the dynamic SQL configuration in the configuration platform; then, after the dynamic SQL configuration is stored in the configuration platform, the configuration platform pushes the configuration change message to the upstream service, and after the upstream service receives the configuration change message pushed by the configuration platform, the upstream service can call a preset universal interface to read the dynamic SQL configuration from the configuration platform based on a configuration name (configName); the dynamic SQL configuration may then be mapped to a javabean (namedparamconfig) at the backend, reading parameters (params) by executing namedparamconfig, i.e., traversing and executing predefined functions to generate actual values (i.e., true values of the dynamic parameters); then, the generated actual value can be replaced into the dynamic SQL configuration at the back end to obtain the real SQL configuration based on the actual value, and at this time, the target data in a database (database, db) can be inquired and obtained by executing the real SQL configuration; finally, the target data may be returned from the backend to the upstream service.
According to the data query method disclosed by the exemplary embodiment of the disclosure, the real values of the dynamic parameters in the configuration can be dynamically generated according to the simple preset configuration, and the data query is executed on the basis to acquire the target data, so that the method can adapt to various data query scenes, a plurality of interfaces do not need to be developed for a plurality of data, the cost of interface development is greatly saved, and non-backend technicians can realize the required data query function through the simple configuration.
Fig. 3 is a block diagram showing a data querying device. Referring to fig. 3, the data querying device 300 may include: an interface calling unit 301, a first execution unit 302 and a second execution unit 303.
The interface calling unit 301 may read a preset configuration through a preset interface. Here, the preset configuration may include a first configuration and a second configuration, the first configuration may include a predefined dynamic parameter related to the data query, and the second configuration may include a predefined function for obtaining a real value of the dynamic parameter.
The first execution unit 302 may obtain the actual value of the dynamic parameter by executing the predefined function in the second configuration.
The second execution unit 303 may replace the dynamic parameter in the first configuration with a real value, and perform the data query based on the first configuration after the parameter replacement.
Alternatively, as described above, the preset configuration may include a predefined configuration name. Here, the preset interface may read the preset configuration based on the configuration name.
According to an exemplary embodiment of the present disclosure, the preset configuration may be stored in the configuration platform, and the interface calling unit 301 may read the preset configuration from the configuration platform through the preset interface in response to the preset configuration being stored in the configuration platform.
According to an exemplary embodiment of the present disclosure, the data querying device 300 may further include an instance mapping unit (not shown). The instance mapping unit may map the preset configuration read by the preset interface to an executable instance to query data by executing the instance.
According to an example embodiment of the present disclosure, the first configuration may be encoded based on a database requiring a query and a structured query language. Here, the dynamic parameter may be represented using a preset flag.
According to an exemplary embodiment of the present disclosure, the second configuration may be encoded based on the JS object profile.
According to the data query method and device disclosed by the exemplary embodiment of the disclosure, the real values of the dynamic parameters in the configuration can be dynamically generated according to the simple preset configuration, and the data query is executed on the basis to acquire the target data, so that various data query scenes can be adapted, a plurality of interfaces do not need to be developed for a plurality of data, the cost of interface development is greatly saved, and non-backend technicians can also realize the required data query function through the simple configuration.
According to an embodiment of the present disclosure, an electronic device may be provided. Fig. 4 is a block diagram of an electronic device 400 including at least one memory 401 having a set of computer-executable instructions stored therein and at least one processor 402 that, when executed by the at least one processor, perform a data query method in accordance with an embodiment of the disclosure, according to an embodiment of the disclosure.
By way of example, the electronic device 400 may be a PC computer, tablet device, personal digital assistant, smartphone, or other device capable of executing the set of instructions described above. Here, the electronic device 400 need not be a single electronic device, but can be any collection of devices or circuits that can execute the above instructions (or sets of instructions), either individually or in combination. The electronic device 400 may also be part of an integrated control system or system manager, or may be configured as a portable electronic device that interfaces with local or remote (e.g., via wireless transmission).
In the electronic device 400, the processor 402 may include a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a programmable logic device, a special purpose processor system, a microcontroller, or a microprocessor. By way of example, and not limitation, processor 402 may also include analog processors, digital processors, microprocessors, multi-core processors, processor arrays, network processors, and the like.
The processor 402 may execute instructions or code stored in memory, where the memory 401 may also store data. The instructions and data may also be transmitted or received over a network via the network interface device, which may employ any known transmission protocol.
The memory 401 may be integrated with the processor 402, for example, by having RAM or flash memory disposed within an integrated circuit microprocessor or the like. Further, memory 401 may comprise a stand-alone device, such as an external disk drive, storage array, or any other storage device usable by a database system. The memory 401 and the processor 402 may be operatively coupled or may communicate with each other, such as through I/O ports, network connections, etc., so that the processor 402 can read files stored in the memory 401.
In addition, the electronic device 400 may also include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, mouse, touch input device, etc.). All components of the electronic device may be connected to each other via a bus and/or a network.
According to an embodiment of the present disclosure, there may also be provided a computer-readable storage medium, wherein when executed by at least one processor, instructions in the computer-readable storage medium cause the at least one processor to perform the data query method of the embodiment of the present disclosure. Examples of the computer-readable storage medium herein include: read-only memory (ROM), random-access programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), random-access memory (RAM), dynamic random-access memory (DRAM), static random-access memory (SRAM), flash memory, non-volatile memory, CD-ROM, CD-R, CD + R, CD-RW, CD + RW, DVD-ROM, DVD-R, DVD + R, DVD-RW, DVD + RW, DVD-RAM, BD-ROM, BD-R, BD-R LTH, BD-RE, Blu-ray or optical disk memory, Hard Disk Drive (HDD), solid-state disk drive (SSD), card-type memory (such as a multimedia card, a Secure Digital (SD) card or an extreme digital (XD) card), tape, a floppy disk, a magneto-optical data storage device, an optical data storage device, a hard disk, a magnetic tape, a magneto-optical data storage device, a hard disk, a magnetic tape, a magnetic data storage device, a magnetic tape, a magnetic data storage device, a magnetic tape, a magnetic data storage device, a magnetic tape, a magnetic data storage device, a magnetic tape, a magnetic data storage device, a magnetic tape, a magnetic data storage device, a magnetic disk, a magnetic data storage device, a magnetic disk, A solid state disk, and any other device configured to store and provide a computer program and any associated data, data files, and data structures to a processor or computer in a non-transitory manner such that the processor or computer can execute the computer program. The computer program in the computer-readable storage medium described above can be run in an environment deployed in a computer apparatus, such as a client, a host, a proxy device, a server, and the like, and further, in one example, the computer program and any associated data, data files, and data structures are distributed across a networked computer system such that the computer program and any associated data, data files, and data structures are stored, accessed, and executed in a distributed fashion by one or more processors or computers.
According to an embodiment of the present disclosure, there is provided a computer program product including computer instructions, which when executed by a processor implement the data query method of the embodiment of the present disclosure.
According to the data query method, the data query device, the electronic equipment, the medium and the program product, the real values of the dynamic parameters can be dynamically generated according to the simple preset configuration through setting and realizing the predefined dynamic parameters, and the data query is executed on the basis to acquire the target data, so that the method can adapt to various data query scenes, a plurality of interfaces do not need to be developed aiming at a plurality of data, and the cost of interface development is greatly saved. In addition, according to the data query method, the data query device, the electronic device, the medium and the program product of the exemplary embodiment of the disclosure, on one hand, technical details in relevant configuration of data query are shielded, so that non-backend technicians can realize a required data query function through simple configuration, on the other hand, modification of configuration can be quickly validated, online deployment of service is not needed, and the online deployment cost is saved while the service stability is ensured.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice in the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A method for querying data, comprising:
reading a preset configuration through a preset interface, wherein the preset configuration comprises a first configuration and a second configuration, the first configuration comprises a predefined dynamic parameter related to data query, and the second configuration comprises a predefined function for obtaining a true value of the dynamic parameter;
obtaining a true value of the dynamic parameter by executing the predefined function in the second configuration;
and replacing the dynamic parameters in the first configuration with the real values, and executing data query based on the first configuration after parameter replacement.
2. The data query method of claim 1, wherein the preset configuration comprises a predefined configuration name, wherein the preset interface reads the preset configuration based on the configuration name.
3. The data query method of claim 1, wherein the preset configuration is stored in a configuration platform, and wherein reading the preset configuration through a preset interface comprises:
reading the preset configuration from the configuration platform through the preset interface in response to the preset configuration being stored in the configuration platform.
4. The data query method of claim 1, further comprising:
mapping the preset configuration read by the preset interface into an executable instance so as to query data by executing the instance.
5. The data query method of claim 4, wherein the first configuration is encoded based on the database to be queried and a structured query language, wherein the dynamic parameter is represented by a preset identifier.
6. The data query method of claim 4, wherein the second configuration is encoded based on the JS object numbered musical notation.
7. A data query apparatus, comprising:
an interface call unit configured to: reading a preset configuration through a preset interface, wherein the preset configuration comprises a first configuration and a second configuration, the first configuration comprises a predefined dynamic parameter related to data query, and the second configuration comprises a predefined function for obtaining a true value of the dynamic parameter;
a first execution unit configured to: obtaining a true value of the dynamic parameter by executing the predefined function in the second configuration;
a second execution unit configured to: and replacing the dynamic parameters in the first configuration with the real values, and executing data query based on the first configuration after parameter replacement.
8. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the data query method of any one of claims 1 to 6.
9. A computer-readable storage medium, wherein instructions in the computer-readable storage medium, when executed by at least one processor, cause the at least one processor to perform the data query method of any one of claims 1 to 6.
10. A computer program product comprising computer instructions, wherein the computer instructions, when executed by a processor, implement the data query method of any one of claims 1 to 6.
CN202210189276.3A 2022-02-28 2022-02-28 Data query method, data query device, electronic equipment, medium and program product Pending CN114564231A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210189276.3A CN114564231A (en) 2022-02-28 2022-02-28 Data query method, data query device, electronic equipment, medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210189276.3A CN114564231A (en) 2022-02-28 2022-02-28 Data query method, data query device, electronic equipment, medium and program product

Publications (1)

Publication Number Publication Date
CN114564231A true CN114564231A (en) 2022-05-31

Family

ID=81716022

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210189276.3A Pending CN114564231A (en) 2022-02-28 2022-02-28 Data query method, data query device, electronic equipment, medium and program product

Country Status (1)

Country Link
CN (1) CN114564231A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150293769A1 (en) * 2012-12-26 2015-10-15 Tencent Technology (Shenzhen) Company Limited Application implementation method and apparatus
CN107256249A (en) * 2017-06-08 2017-10-17 北京小度信息科技有限公司 A kind of data base query method, device, electronic equipment and computer-readable storage medium
CN111104421A (en) * 2019-12-31 2020-05-05 新奥数能科技有限公司 Data query method and device based on data interface standard configuration
CN112307068A (en) * 2020-11-10 2021-02-02 天元大数据信用管理有限公司 Dynamic SQL query method
CN113297274A (en) * 2021-06-10 2021-08-24 杭州每刻科技有限公司 Signed data query method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150293769A1 (en) * 2012-12-26 2015-10-15 Tencent Technology (Shenzhen) Company Limited Application implementation method and apparatus
CN107256249A (en) * 2017-06-08 2017-10-17 北京小度信息科技有限公司 A kind of data base query method, device, electronic equipment and computer-readable storage medium
CN111104421A (en) * 2019-12-31 2020-05-05 新奥数能科技有限公司 Data query method and device based on data interface standard configuration
CN112307068A (en) * 2020-11-10 2021-02-02 天元大数据信用管理有限公司 Dynamic SQL query method
CN113297274A (en) * 2021-06-10 2021-08-24 杭州每刻科技有限公司 Signed data query method and system

Similar Documents

Publication Publication Date Title
CN108846753B (en) Method and apparatus for processing data
US8799230B2 (en) Method and system for centralized issue tracking
US10255308B2 (en) Conforming data structure instances to schema versions
US20140344247A1 (en) System and method for identifying applicable third-party applications to associate with a file
CN111177231A (en) Report generation method and report generation device
WO2019134340A1 (en) Salary calculation method, application server, and computer readable storage medium
CN111339041A (en) File parsing and warehousing and file generating method and device
CN111352935B (en) Index creating method, device and equipment in block chain type account book
US10417248B2 (en) Field extension in database system
US9590859B2 (en) Discovering resources of a distributed computing environment
CN110738038A (en) Contract text generation method, device, equipment and computer readable storage medium
CN110825425A (en) Configuration data management method and device, electronic equipment and storage medium
CN110362630B (en) Data management method, device, equipment and computer readable storage medium
CN114564231A (en) Data query method, data query device, electronic equipment, medium and program product
CN115221936A (en) Record matching in a database system
CN113436699A (en) Method, system, electronic device and storage medium for generating new corona nucleic acid detection report
US10235530B2 (en) Protecting sensitive information when replicating data to remote systems
CN113900895B (en) Information processing method, information processing apparatus, storage medium, and electronic device
CN111949472A (en) Method and device for recording application logs
WO2023162260A1 (en) Environment construction assistance device, system, and method, and computer-readable medium
CN112069789B (en) Method, equipment and medium for matching appointed content based on domestic CPU text domain
CN109376023B (en) Method and equipment for generating calling information and issuing return code group
CN114296778A (en) Message notification method and device
CN114358000A (en) Extracting structured information from unstructured documents
CN117573130A (en) Code processing method, 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