CN117931837A - Data query method, device, terminal equipment and computer readable storage medium - Google Patents

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

Info

Publication number
CN117931837A
CN117931837A CN202311847072.5A CN202311847072A CN117931837A CN 117931837 A CN117931837 A CN 117931837A CN 202311847072 A CN202311847072 A CN 202311847072A CN 117931837 A CN117931837 A CN 117931837A
Authority
CN
China
Prior art keywords
query
target parameters
universal
domain
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
CN202311847072.5A
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.)
Ubtech Robotics Corp
Original Assignee
Ubtech Robotics Corp
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 Ubtech Robotics Corp filed Critical Ubtech Robotics Corp
Priority to CN202311847072.5A priority Critical patent/CN117931837A/en
Publication of CN117931837A publication Critical patent/CN117931837A/en
Pending legal-status Critical Current

Links

Classifications

    • 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

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application is applicable to the technical field of computers, and provides a data query method, a device, terminal equipment and a computer readable storage medium, which comprise the steps of obtaining target parameters input based on a universal query interface; the target parameters are generated according to a query structure and a query requirement defined by a domain specific language; analyzing the target parameters into corresponding query commands according to the query structure defined by the domain-specific language; and executing the query operation according to the query command and returning a query result. The method has the advantages that the target parameters are built based on the query structure defined by the domain-specific language, the generalized API can be realized, different business systems can use the universal query interface to realize data query, the complex task can be simplified by fully utilizing the domain-specific language, the development efficiency is improved, the development cost is reduced, and the compatibility problem of query interfaces among different systems is solved.

Description

Data query method, device, terminal equipment and computer readable storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data query method, a data query device, a terminal device, and a computer readable storage medium.
Background
Common business systems, such as an operation management system and a report system, have data query requirements, so that when the business systems are developed, a large number of application programming interfaces (Application Programming Interface, APIs) are required to be developed for users to use, so that the problems of long development period and high development cost exist, different definitions exist for query interfaces developed among different business systems, and the compatibility of the query interfaces among different business systems is poor.
Disclosure of Invention
The embodiment of the application provides a data query method, a data query device, terminal equipment and a computer readable storage medium, which can improve development efficiency, reduce development cost and solve the problem of compatibility of query interfaces among different systems.
In a first aspect, an embodiment of the present application provides a data query method, including:
Acquiring target parameters input based on a universal query interface; the target parameters are generated according to a query structure and a query requirement defined by a domain specific language;
analyzing the target parameters into corresponding query commands according to the query structure defined by the domain-specific language;
And executing the query operation according to the query command, and returning a query result.
In an implementation manner of the first aspect, the parsing the target parameter into the corresponding query command according to the query structure defined by the domain-specific language includes:
Analyzing each word in the target parameters to obtain the field value in each word;
and filling the field values into an analysis template to obtain a query instruction corresponding to the target parameter.
Before the field values are filled into the analysis template to obtain the query instruction corresponding to the target parameter, the method further comprises the following steps:
and constructing the analysis template.
In an implementation manner of the first aspect, before the obtaining the target parameter input based on the universal query interface, the method further includes:
and constructing the universal query interface and deploying the universal query interface to a target service system.
In an implementation manner of the first aspect, before the performing a query operation according to the query command and returning a query result, the method further includes:
And checking the inquiry command.
In an implementation manner of the first aspect, the obtaining a target parameter input based on a universal query interface; before the target parameters are generated according to the query structure and the query requirement defined by the domain-specific language, the method further comprises the following steps:
individual words and parameters in the query structure are defined based on the domain-specific language.
In an implementation manner of the first aspect, filling the field value into the parsing template to obtain a query instruction corresponding to the target parameter includes:
And filling the obtained field value into a field corresponding to the analysis template to obtain the query instruction.
In a second aspect, an embodiment of the present application provides a data query apparatus, including:
The acquisition unit is used for acquiring target parameters input based on the universal query interface; the target parameters are generated according to a query structure and a query requirement defined by a domain specific language;
the analysis unit is used for analyzing the target parameters into corresponding query commands according to the query structure defined by the domain specific language;
And the query unit is used for executing the query operation according to the query command and returning a query result.
In a third aspect, an embodiment of the present application provides a terminal device, where the terminal device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, where the processor implements the method as described in the first aspect or any optional manner of the first aspect when the processor executes the computer program.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium storing a computer program which, when executed by a processor, implements a method as described in the first aspect or any of the alternatives of the first aspect.
In a fifth aspect, an embodiment of the application provides a computer program product for causing a terminal device to carry out the method of the first aspect or any of the alternatives of the first aspect, when the computer program product is run on the terminal device.
Compared with the prior art, the embodiment of the application has the beneficial effects that:
The data query method, the device, the terminal equipment and the computer readable storage medium provided by the embodiment of the application can receive the target parameters generated based on the query structure defined by the domain-specific language through the universal query interface, and then the universal query interface can analyze the target parameters into the corresponding query command, so that the query operation is performed according to the query command to obtain the corresponding query result, the target parameters are constructed based on the query structure defined by the domain-specific language, the universal API can be realized, different business systems can use the universal query interface to realize data query, the advantages that the complex task can be simplified by fully utilizing the domain-specific language, the development efficiency is improved, the development cost is reduced, and the compatibility problem of the query interface between different systems is solved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of an implementation flow of a data query method in an embodiment of the present application;
Figure 2 is a schematic diagram of a DSL-defined query structure provided in an embodiment of the present application;
FIG. 3 is a schematic diagram of an implementation flow of another data query method according to an embodiment of the present application;
FIG. 4 is an interface schematic diagram of an API document of a universal query interface in an embodiment of the present application provided by an embodiment of the present application;
FIG. 5 is a schematic diagram of a query interface of a universal query interface in an embodiment of the present application;
fig. 6 is a schematic diagram of an implementation flow of S12 of the data query method according to the embodiment of the present application;
FIG. 7 is a schematic diagram of a query statement obtained by the universal query interface according to an embodiment of the present application;
FIG. 8 is a schematic diagram of a query result returned by the universal query interface according to an embodiment of the present application;
Fig. 9 is a schematic structural diagram of a data query device according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a server according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations. Furthermore, the terms "first," "second," "third," and the like in the description of the present specification and in the appended claims, are used for distinguishing between descriptions and not necessarily for indicating or implying a relative importance.
It should also be appreciated that references to "one embodiment" or "some embodiments" or the like described in this specification mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
Common business systems, such as an operation management system and a report system, have data query requirements, so that when the business system is developed, a large number of APIs need to be developed for users, for example, one or a group of APIs need to be developed for one query page, so that more time is required to develop the APIs, and the problems of long development period and high development cost exist. In addition, the query interfaces developed between different service systems have different definitions, so that the problem of poor compatibility of the query interfaces between different service systems also exists.
Based on the problems that the development period of the current query interface is long and the development cost is high, and the compatibility of the query interfaces between different service systems is poor, the embodiment of the application provides a data query method, the target parameters generated based on the DSL defined query structure are received through the universal query interface, then the universal query interface can analyze the target parameters into corresponding query commands, so that query operation is performed according to the query commands, corresponding query results are obtained, the target parameters are constructed based on the DSL defined query structure, the universal API can be realized, the universal query interface can be used by different service systems to realize data query, the advantages of simplifying complex tasks by DSL and improving the development efficiency are fully utilized, the development efficiency is improved, the development cost is reduced, and the compatibility problem of the query interfaces between different systems is solved.
The following first describes concepts related to the embodiments of the present application as follows:
domain specific language (Domain Specific Language, DSL) is a computer program language with limited expressivity for a domain. DSL may be a complete language with its own grammar, semantics and usage, or an incomplete language, which may be used in conjunction with other languages or tools.
The DSL has wide application scene and can be applied to a plurality of fields such as software development, data analysis, automatic test and the like. For example, in the field of software development, software requirements may be described by DSL, program behavior defined, source code generated, etc.; as another example, in the field of data analysis, DSL can be used for data cleansing, data conversion, data analysis, etc.; in the field of automated testing, DSL can be used to write test scripts, simulate user behavior, and the like.
Since DSL is a domain specific language, the domain specific concepts can be precisely expressed so that developers can understand and apply more quickly. DSL can reduce complex tasks or processes to a simple set of commands or statements, thereby enabling developers to develop more quickly. Meanwhile, since DSL is visual and concise, writing errors in the development process of developers can be effectively reduced, the quality and maintainability of codes are improved, the development efficiency is accelerated, DSL can be reused, the development text can be reused, and therefore the situation of repeatedly writing the same codes or scripts can be reduced, and the development efficiency is further improved.
The following describes in detail a data query method provided in the embodiment of the present application with reference to the accompanying drawings:
referring to fig. 1, fig. 1 shows a schematic implementation flow chart of a data query method according to an embodiment of the present application.
It should be noted that, the execution body of the data query method provided in the embodiment of the present application may be a terminal device provided with a service system, where the query interface of the service system is a general query interface in the embodiment of the present application, and the terminal device may be a terminal such as a mobile phone, a desktop computer, a notebook computer, a tablet computer, or a wearable device, or may be a device such as a cloud server in various application scenarios.
As shown in fig. 1, the data query method provided by the embodiment of the present application may include S11 to S13:
In S11, target parameters input based on the general query interface are acquired.
The target parameters are generated according to a DSL defined query structure and query requirements.
In the embodiment of the application, a set of semantic grammar definition of the universal query can be completed through DSL definition query structure, and then the defined DSL is used as the embedded parameter of the universal query interface, so that the target parameter corresponding to the query requirement can be generated by using the DSL defined query structure, and the target parameter input by the universal query interface can be obtained from the embedded parameter of the universal query interface.
In a specific application, the query structure scheme defined by DSL is as follows:
1. Select words are defined. The selection words are used for describing fields to be queried, the defined format is a character string, and a plurality of selection words can be supported in one target parameter. If the upload select word is not selected in the target parameter, all field data may be returned when the query is executed.
2. Source words are defined. The source words are used for describing the data table to be queried, the defined format is a data source character string, and only one source word can be defined and must be defined in one target parameter.
3. Condition words and sentences. Wherein the condition words are used for describing the query conditions, a combination of AND logic AND OR logic can be used, nested query conditions are supported, AND a plurality of condition words can be supported in one target parameter. Wherein, each key parameter in the condition words can be classified into the following types:
eq represents equal to (=), and a plurality of use times are equivalent to in operations;
ne represents not equal (|=), and a plurality of uses correspond to not in operation;
gi represents greater than (>);
ge represents equal to or greater than (> =);
lt means less than (<);
le represents (< =);
in denotes inside a certain set;
notin indicates not being within a certain set.
4. Paging parameters current and size are defined. The current represents the current page number of the paging parameter, the size represents the size of each page of the paging parameter, the paging parameter is used for describing the paging display result, if the paging parameter is not defined in the target parameter, paging is not used when the query result is returned, and all data meeting the query condition are directly returned.
5. The ordering word sort is defined. The sorting words sort is used for describing a sorting mode, wherein the desc keywords represent descending order, the asc keywords represent ascending order, and a plurality of sorting keywords can be defined in target parameters or not defined in target parameters.
Illustratively, as shown in fig. 2, fig. 2 shows a schematic diagram of a DSL-defined query structure. The corresponding target parameters may be constructed by DSL defined query structures.
In a specific application, after the query requirement is determined, corresponding target parameters may be generated according to the query requirement and the DSL-defined query structure.
For example, if the number of users with ages greater than or equal to 30 years old is to be queried, corresponding target parameters (where \n is a line feed symbol) are generated according to a query structure defined by DSL as follows:
in a specific application, the above target parameter is filled in an embedded parameter (parameter) of the universal query interface, so that the universal query interface can receive the target parameter.
In an embodiment of the present application, referring to fig. 3, the data query method further includes the following steps:
S14: and constructing a universal query interface and deploying the universal query interface to a target service system.
In a specific application, an actual API is constructed and used as a general query interface, and the general query interface is embedded and deployed into a target service system through an API document.
The target service system refers to a service system which needs to apply the universal query interface to realize the query function, and the deployment of the universal query interface into the target service system can be performed along with the deployment of the target service system or can be performed independently to deploy a public component.
The deployment of the universal query interface to the target service system specifically means that the universal query interface is set in a position corresponding to the target service system when the target service system architecture is designed, and is set based on an API document of the universal query interface, and then an interface code is deployed to the target service system.
For example, referring to fig. 4, fig. 4 is an interface schematic diagram of an API document of a generic query interface in an embodiment of the present application.
As shown in fig. 4, the API document of the generic query interface may include an interface address field, a request mode field, consumes field, produces field, an interface description field, a request parameter, a response status, a response parameter, and the like.
The interface address field is used for designating an address of the interface, the request mode field is used for designating how to request to use the interface, the consumes field is used for designating a submitted content type of a processing request, the produces field is used for designating a return value type, the interface description field is used for describing the interface, the request parameter is used for receiving a target parameter, namely, the target parameter is input to a position corresponding to the request parameter, the response state is used for representing a response state of a query instruction, and the response parameter is used for indicating relevant information of the response parameter.
Taking the above query requirement of the user number with the age of 30 years or more as an example, the target parameters generated according to the query structure defined by DSL are input to the positions corresponding to the request parameters, so as to obtain the query interface shown in fig. 5. Thus, the query page of the service system can acquire the target parameters input by the universal query interface.
It can be understood that the universal query interface has the characteristics of flexible configuration and capability of adapting to different scenes and requirements, and also allows a developer to perform customized development according to the requirements, and the universal query interface greatly shortens the time for developing the API, so that the development efficiency and the performance of open projects can be better ensured. The universal query interface conforms to DSL defined standards, so that APIs between different systems can have higher compatibility, interaction between different systems is smoother, and the advantages of safety and reusability are achieved.
In S12, the target parameter is parsed into a corresponding query command according to the query structure defined by the DSL.
In a specific application, an analysis engine of a DSL statement is deployed in the universal query interface, and the target parameter can be analyzed according to a query result defined by DSL, so that a corresponding query instruction is obtained.
In an embodiment of the present application, please refer to fig. 6, fig. 6 is a schematic diagram of an implementation flow of S12 of the data query method according to the embodiment of the present application. As shown in fig. 6, the step S12 may specifically include the following steps:
S121: and analyzing each word and sentence in the target parameter to obtain the field value in each word and sentence.
In a specific application, the target parameter is generated according to a query structure defined by DSL, so that the target parameter includes a plurality of words, each word has a corresponding field value, and after the target parameter is obtained, the word can be analyzed row by row, so as to obtain the field value in each word.
S122: and filling the field value into the analysis template to obtain a query instruction corresponding to the target parameter.
In an embodiment of the present application, creating the parsing template may be further included before filling the field value into the parsing template to obtain the query instruction corresponding to the target parameter.
The parsing templates may be constructed according to the query command, that is, the constructed parsing templates may be SQL templates, and the SQL templates may be: select # { selectCause } from # { sourceCause } wheree1=1# { [ whereCause ] } # orderCause ] } # pageCause }.
And filling the field value acquired in the step S121 into a field corresponding to the analysis template, so that a directly usable query command can be obtained.
In a specific application, the field value extracted from the select word may be written in the above-mentioned SQL template at selectCause position, the field value extracted from the source word at sourceCause position, the field value extracted from the condition word at whereCause position, the field value extracted from the sort word at orderCause position, and the field value extracted from the current and size parameters at pageCause position.
After the target parameters are input into the request parameters of the universal query interface, corresponding query sentences (shown in a Curl display column in fig. 7) can be obtained through analysis.
In an embodiment of the present application, in order to improve operation security and reduce security risks such as SQL injection, after obtaining the above query command, the query command may be further checked.
In a specific application, the generated query command may be verified by a regular expression, and only if the verification passes, the query operation may be performed.
In other implementations, the generated query command may be parsed by an SQL parser, if the query command may be parsed, the query command may be considered to pass the verification, or an ANTLR tool may generate an SQL syntax parser, and the generated SQL syntax parser parses an SQL statement to determine validity of the SQL statement, thereby implementing the verification of the query command.
In S13: and executing the query operation according to the query command and returning a query result.
In a specific application, after obtaining the query command, the service system may call the database to perform the query operation based on the query command, perform a corresponding search in the database/data table input in the universal query interface, and return a query result.
Illustratively, as shown in fig. 8, the returned result is displayed in the response content, and the query result is 531.
It should be noted that, for the query requirement with the query result displayed by the page, the required page parameters may be defined based on the above page parameters, and when the query result is returned by performing the corresponding query operation, the query result may be paged according to the page parameters, and the paged query result may be returned.
For the query requirement of ordering the query results, the needed ordering words and sentences can be defined based on the ordering words and sentences, and when the corresponding query operation is performed and the query results are returned, the query results can be ordered according to the ordering keywords and the ordered query results are returned.
It can be seen from the foregoing that, in the data query method provided by the embodiment of the present application, the target parameter generated based on the query structure defined by the DSL is received through the universal query interface, and then the universal query interface can parse the target parameter into the corresponding query command, so as to execute the query operation according to the query command, obtain the corresponding query result, construct the target parameter based on the query structure defined by the DSL, and implement the generalized API.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present application.
Based on the data query method provided by the above embodiment, the embodiment of the present invention further provides an embodiment of a data query device for implementing the above method embodiment.
Referring to fig. 9, fig. 9 is a schematic structural diagram of a code automatic deployment system according to an embodiment of the present application. In the embodiment of the present application, each unit included in the data query device is configured to execute each step in the embodiment corresponding to fig. 1. Refer specifically to fig. 1 and the related description in the corresponding embodiment of fig. 1. For convenience of explanation, only the portions related to the present embodiment are shown. As shown in fig. 9, the data query device 90 may include an acquisition unit 901, an analysis unit 902, and a query unit 903, where:
the acquiring unit 901 is used for acquiring target parameters input based on a universal query interface; the target parameters are generated according to a query structure and a query requirement defined by a domain specific language;
The parsing unit 902 is configured to parse the target parameter into a corresponding query command according to a query structure defined by the domain-specific language;
The query unit 903 is configured to perform a query operation according to the above query command, and return a query result.
In some implementations, the parsing unit 902 includes a word parsing unit and a filling unit.
The word and sentence analysis unit is used for analyzing each word and sentence in the target parameter and obtaining the field value in each word and sentence;
The filling unit is used for filling the field value into the analysis template to obtain the query instruction corresponding to the target parameter.
In some embodiments, the filling unit is specifically configured to fill the obtained field value into a field corresponding to the parsing template, so as to obtain the query instruction.
In some implementations, the data query device further includes a first construction unit, where the first construction unit is configured to construct the parsing template.
In a specific application, the parsing template is an SQL template.
In some implementations, the data query device further includes a second building unit, where the second building unit is configured to build the generic query interface and deploy the generic query interface to a target service system.
In some implementations, the data query device further includes a verification unit, where the verification unit is configured to verify the query command.
In some implementations, the data query device further includes a domain-specific language definition unit for defining each of the words and parameters in the query structure based on the domain-specific language.
It should be noted that, because the content of information interaction and execution process between the above units is based on the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be referred to the method embodiment specifically, and will not be described herein again.
Therefore, the data query device provided by the embodiment of the application can also receive the target parameters generated based on the query structure defined by the domain-specific language through the universal query interface, and then the universal query interface can analyze the target parameters into the corresponding query commands, so that the query operation is performed according to the query commands to obtain the corresponding query results, the target parameters are constructed based on the query structure defined by the domain-specific language, the universal API can be realized, different business systems can realize data query by using the universal query interface, the advantages of simplifying complex tasks and improving the development efficiency by fully utilizing the domain-specific language are fully utilized, the development efficiency is improved, the development cost is reduced, and the compatibility problem of the query interfaces among different systems is solved.
Fig. 10 is a schematic structural diagram of a terminal device according to another embodiment of the present application. As shown in fig. 10, the terminal device 10 provided in this embodiment includes: a processor 100, a memory 101 and a computer program 102, such as an image segmentation program, stored in the memory 101 and executable on the processor 100. The steps of the respective data query method embodiments described above, such as S11 to S13 shown in fig. 1, are implemented when the processor 100 executes the computer program 102. Or the processor 100, when executing the computer program 102, implements the functions of the modules/units in the embodiments of the terminal devices, for example, the functions of the units 901 to 903 shown in fig. 11.
Illustratively, the computer program 102 may be partitioned into one or more modules/units that are stored in the memory 101 and executed by the processor 100 to accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing a specific function for describing the execution of the computer program 102 in the terminal device 10. For example, the computer program 102 may be divided into an acquisition unit, an analysis unit and a query unit, and specific functions of each unit are described in the corresponding embodiment of fig. 9, which is not repeated herein.
The terminal device may include, but is not limited to, a processor 100, a memory 101. It will be appreciated by those skilled in the art that fig. 10 is merely an example of the terminal device 10 and is not intended to limit the terminal device 10, and may include more or fewer components than shown, or may combine certain components, or different components, such as the terminal device described above may also include input-output devices, network access devices, buses, etc.
The Processor 100 may be a central processing unit (Central Processing Unit, CPU), other general purpose Processor, digital signal Processor (DIGITAL SIGNAL Processor, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), off-the-shelf Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 101 may be an internal storage unit of the terminal device 10, for example, a hard disk or a memory of the terminal device 10. The memory 101 may be an external storage device of the terminal device 10, for example, a plug-in hard disk, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD) or the like, which are provided in the terminal device 10. Further, the memory 101 may also include both an internal storage unit and an external storage device of the terminal device 10. The memory 101 is used for storing the computer program and other programs and data required for the terminal device. The above-described memory 101 may also be used to temporarily store data that has been output or is to be output.
The embodiment of the application also provides a computer readable storage medium. Referring to fig. 11, fig. 11 is a schematic structural diagram of a computer readable storage medium according to an embodiment of the present application, as shown in fig. 11, a computer program 102 is stored in the computer readable storage medium 110, and the computer program 102 can implement the data query method when executed by a processor.
The embodiment of the application provides a computer program product which can realize the data query method when being executed by terminal equipment when being run on the terminal equipment.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of each functional unit and module is illustrated, and in practical application, the above-mentioned functional allocation may be performed by different functional units and modules, that is, the internal structure of the terminal device is divided into different functional units or modules, so as to perform all or part of the above-mentioned functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference may be made to related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (10)

1. A method of querying data, comprising:
Acquiring target parameters input based on a universal query interface; the target parameters are generated according to a query structure and a query requirement defined by a domain specific language;
analyzing the target parameters into corresponding query commands according to the query structure defined by the domain-specific language;
And executing the query operation according to the query command and returning a query result.
2. The data query method of claim 1, wherein said parsing said target parameters into corresponding query commands according to said domain-specific language defined query structure comprises:
Analyzing each word in the target parameters to obtain the field value in each word;
and filling the field value into an analysis template to obtain a query instruction corresponding to the target parameter.
3. The data query method of claim 2, further comprising, prior to said populating the field values into the parse templates to obtain query instructions corresponding to the target parameters:
And constructing the analysis template.
4. The data query method of claim 1, further comprising, prior to said obtaining the target parameters entered based on the universal query interface:
and constructing the universal query interface and deploying the universal query interface to a target service system.
5. The data query method according to any one of claims 1 to 4, wherein before performing a query operation according to the query command and returning a query result, further comprising:
and checking the query command.
6. The data query method of any one of claims 1 to 4, wherein the obtaining is based on target parameters entered by a universal query interface; wherein before the target parameters are generated according to the query structure and the query requirement defined by the domain-specific language, the method further comprises:
individual words and parameters in the query structure are defined based on the domain-specific language.
7. The data query method according to claim 2, wherein filling the field value into a parsing template to obtain a query instruction corresponding to a target parameter, comprises:
and filling the obtained field value into a field corresponding to the analysis template to obtain the query instruction.
8. A data query device, comprising:
the acquisition unit is used for acquiring target parameters input based on the universal query interface; the target parameters are generated according to a query structure and a query requirement defined by a domain specific language;
The analysis unit is used for analyzing the target parameters into corresponding query commands according to the query structure defined by the domain specific language;
And the query unit is used for executing query operation according to the query command and returning a query result.
9. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the data query method of any of claims 1 to 7 when executing readable instructions of the computer program.
10. A computer readable storage medium storing a computer program, characterized in that readable instructions of the computer program when executed by a processor implement the data query method of any one of claims 1 to 7.
CN202311847072.5A 2023-12-28 2023-12-28 Data query method, device, terminal equipment and computer readable storage medium Pending CN117931837A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311847072.5A CN117931837A (en) 2023-12-28 2023-12-28 Data query method, device, terminal equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311847072.5A CN117931837A (en) 2023-12-28 2023-12-28 Data query method, device, terminal equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN117931837A true CN117931837A (en) 2024-04-26

Family

ID=90767684

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311847072.5A Pending CN117931837A (en) 2023-12-28 2023-12-28 Data query method, device, terminal equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN117931837A (en)

Similar Documents

Publication Publication Date Title
CN109002510B (en) Dialogue processing method, device, equipment and medium
US8887135B2 (en) Generating test cases for functional testing of a software application
US8626786B2 (en) Dynamic language checking
CA2680306A1 (en) Identification of concepts in software
CN116860949B (en) Question-answering processing method, device, system, computing equipment and computer storage medium
US9311077B2 (en) Identification of code changes using language syntax and changeset data
CN109815141B (en) Test method and device
CN109144879B (en) Test analysis method and device
CN114090671A (en) Data import method and device, electronic equipment and storage medium
CN110737631A (en) data analysis method and device based on Flink engine
CN112181924A (en) File conversion method, device, equipment and medium
CN115599359A (en) Code generation method, device, equipment and medium
CN111782207A (en) Method, device and equipment for generating task stream code and storage medium
CN111767217A (en) JS unit test case generation method and device
CN113778897A (en) Automatic test method, device, equipment and storage medium of interface
CN113343248A (en) Vulnerability identification method, device, equipment and storage medium
US9063744B2 (en) Modifying a file written in a formal language
CN115758973A (en) Method, device and equipment for generating chip register design file and storage medium
CN113822002B (en) Data processing method, device, computer equipment and storage medium
CN117931837A (en) Data query method, device, terminal equipment and computer readable storage medium
CN111898762B (en) Deep learning model catalog creation
CN110737431B (en) Software development method, development platform, terminal device and storage medium
CN110515653B (en) Document generation method and device, electronic equipment and computer readable storage medium
CN113722321A (en) Data export method and device and electronic equipment
CN109783134B (en) Front-end page configuration method and device and electronic equipment

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