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

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

Info

Publication number
CN112000903B
CN112000903B CN202010636580.9A CN202010636580A CN112000903B CN 112000903 B CN112000903 B CN 112000903B CN 202010636580 A CN202010636580 A CN 202010636580A CN 112000903 B CN112000903 B CN 112000903B
Authority
CN
China
Prior art keywords
target
query
configuration information
current
data table
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.)
Active
Application number
CN202010636580.9A
Other languages
Chinese (zh)
Other versions
CN112000903A (en
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.)
Suning Cloud Computing Co Ltd
Original Assignee
Suning Cloud Computing 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 Suning Cloud Computing Co Ltd filed Critical Suning Cloud Computing Co Ltd
Priority to CN202010636580.9A priority Critical patent/CN112000903B/en
Publication of CN112000903A publication Critical patent/CN112000903A/en
Priority to PCT/CN2021/099669 priority patent/WO2022001625A1/en
Application granted granted Critical
Publication of CN112000903B publication Critical patent/CN112000903B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • 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

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 application relates to a data query method, a data query device, computer equipment and a storage medium. The method comprises the following steps: acquiring a current query link; acquiring an access request corresponding to the current query link, and acquiring a current configuration code corresponding to the current query link according to the access request; acquiring corresponding target configuration information according to the current configuration code; generating a corresponding target query language according to the target configuration information; and querying through the target query language to obtain a corresponding target query result. The method can improve the service data query efficiency.

Description

Data query method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data query method and apparatus, a computer device, and a storage medium.
Background
At present, a service system provides support for services, and besides conventional service functions, the service system also provides some query pages to implement monitoring functions of certain services or products, however, since the development of services is relatively fast, and the speed of system iteration is also fast, once the monitoring function of a new service or product needs to be changed, the whole query page needs to be redeveloped, resulting in low efficiency of service data query.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a data query method, an apparatus, a computer device and a storage medium, which can improve the efficiency of querying business data.
A method of data query, the method comprising:
acquiring a current query link;
acquiring an access request corresponding to the current query link, and acquiring a current configuration code corresponding to the current query link according to the access request;
acquiring corresponding target configuration information according to the current configuration code;
generating a corresponding target query language according to the target configuration information;
and querying through the target query language to obtain a corresponding target query result.
In one embodiment, before obtaining the current query link, the method further includes: acquiring a configured first service data table and a configured second service data table; determining a target field according to the first service data table and the second service data table; associating the first service data table with the second service data table according to the target field to obtain associated configuration information of the service data table; and generating candidate query links according to the associated configuration information of the service data table, the first service data table and the second service data table, wherein the current query link is determined from the candidate query links.
In one embodiment, the obtaining an access request corresponding to a current query link and obtaining a current configuration code corresponding to the current query link according to the access request includes: operating the current query link, and generating an access request according to the operation; and analyzing the current query link according to the access request to obtain the corresponding current configuration code.
In one embodiment, acquiring the corresponding target configuration information according to the current configuration code includes: acquiring a candidate configuration information set, wherein the candidate configuration information set comprises at least one candidate configuration information, the candidate configuration information comprises a corresponding candidate configuration code, and the candidate configuration information is configuration information corresponding to at least one candidate service data table; and determining target configuration information corresponding to the current configuration code from the candidate configuration information set according to the candidate configuration code and the current configuration code.
In one embodiment, the generating the target query language according to the target configuration information includes: generating a target service data table according to the target configuration information, and displaying the target service data table; and acquiring parameters to be inquired on a display page of the target service data table, and generating a corresponding target inquiry language according to the parameters to be inquired.
In one embodiment, querying through a target query language to obtain a corresponding target query result includes: acquiring parameters to be queried in a target query language; and inquiring the matched target parameter value from the database according to the parameter to be inquired, and determining the target parameter value as a target inquiry result.
In one embodiment, the data query method further includes: acquiring a preset query result display template set; determining a target query result display template from a preset query result display template set; and generating a target query result display interface according to the target query result and the target query result display template, and displaying the target query result display interface.
A data query apparatus, the apparatus comprising:
the query link acquisition module is used for acquiring the current query link;
the access request acquisition module is used for acquiring an access request corresponding to the current query link and acquiring a current configuration code corresponding to the current query link according to the access request;
the configuration information acquisition module is used for acquiring corresponding target configuration information according to the current configuration code;
the query language generation module is used for generating a corresponding target query language according to the target configuration information;
and the query language query module is used for querying through the target query language to obtain a corresponding target query result.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
acquiring a current query link;
acquiring an access request corresponding to the current query link, and acquiring a current configuration code corresponding to the current query link according to the access request;
acquiring corresponding target configuration information according to the current configuration code;
generating a corresponding target query language according to the target configuration information;
and querying through the target query language to obtain a corresponding target query result.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring a current query link;
acquiring an access request corresponding to the current query link, and acquiring a current configuration code corresponding to the current query link according to the access request;
acquiring corresponding target configuration information according to the current configuration code;
generating a corresponding target query language according to the target configuration information;
and querying through the target query language to obtain a corresponding target query result.
The data query method, the data query device, the computer equipment and the storage medium acquire the current query link; acquiring an access request corresponding to the current query link, and acquiring a current configuration code corresponding to the current query link according to the access request; acquiring corresponding target configuration information according to the current configuration code; generating a corresponding target query language according to the target configuration information; and querying through the target query language to obtain a corresponding target query result. Therefore, when a new service or a monitoring function of a product is changed, only the service data table corresponding to the current query link needs to be updated to obtain the updated current query link, the whole query page does not need to be redeveloped, development resources are saved, and the service data query efficiency is improved.
Drawings
FIG. 1 is a diagram of an application environment of a data query method in one embodiment;
FIG. 2 is a flow diagram that illustrates a methodology for querying data in one embodiment;
FIG. 3 is a flow chart illustrating a data query method according to another embodiment;
FIG. 4 is a flowchart illustrating a current configuration code obtaining step according to an embodiment;
FIG. 5 is a flowchart illustrating a target configuration information obtaining step according to an embodiment;
FIG. 6 is a flowchart of the target query language generation step in one embodiment;
FIG. 7 is a flowchart that illustrates the query in the target query language in one embodiment;
FIG. 8 is a flow diagram that illustrates a methodology for querying data in one embodiment;
FIG. 9 is a block diagram showing the structure of a data search device according to an embodiment;
FIG. 10 is a diagram showing an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The data query method provided by the application can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented by an independent server or a server cluster formed by a plurality of servers.
Specifically, the terminal 102 obtains the current query link, operates the current query link, triggers generation of an access request, and sends the access request to the server 104, and the server 104 obtains a current configuration code corresponding to the current query link according to the access request, obtains corresponding target configuration information according to the current configuration code, generates a corresponding target query language according to the target configuration information, and performs query through the target query language to obtain a corresponding target query result. Further, the server 104 may return the target query result to the terminal 102.
In one embodiment, as shown in fig. 2, a data query method is provided, which is described by taking the method as an example applied to the server in fig. 1, and includes the following steps:
step 202, obtain the current query link.
The current query link is a current query link, the current query link is a mode for acquiring configuration information, sharing is more convenient in a link mode, and the configuration information corresponding to the current query link can be acquired by accessing the current query link. That is, the query link is an access entry of the configuration information, and the corresponding configuration information can be obtained through the query link, and the configuration information is information related to the service configuration. The configuration information may be configuration information related to a business data table, where the business data table refers to a table format for performing related configuration, and the business data table is, for example, a student information table, a student achievement table, and the like.
And 204, acquiring an access request corresponding to the current query link, and acquiring a current configuration code corresponding to the current query link according to the access request.
The access request is used to request to access the current query link, and may be generated by operating the current query link and triggering the access request, where the operation may be a voice operation, a click operation, or a trigger for setting a timing event, and specifically, the access request may be generated by setting a relevant access control on an presentation interface of the current query link and triggering the access request by operating the access control, for example, performing a click operation on the access control and triggering the generation of the access request, or performing a voice operation and triggering the generation of the access request.
Further, after the access request is obtained, the current configuration code corresponding to the current query link may be obtained according to the access request, specifically, the current query link may be analyzed according to the access request, and the corresponding current configuration code is obtained through analysis. The format of the current query link may include configuration codes, for example, the current query link may be: http:// xxx. Xx/xx/configuration code. Action, the current configuration code corresponding to the current query link can be obtained by analyzing the format of the current query link. The current configuration code is used for uniquely identifying the configuration information corresponding to the current query link, that is, the corresponding configuration information can be determined and obtained according to the current configuration code.
And step 206, acquiring corresponding target configuration information according to the current configuration code.
Specifically, after the current configuration code is obtained, the corresponding target configuration information can be obtained according to the current configuration code, wherein the target configuration information corresponds to the current query link, and the current query link is a form of the target configuration information, so that the corresponding target configuration information can be obtained according to the current configuration code corresponding to the current query link. Specifically, a candidate configuration information set is obtained, the candidate configuration information set includes at least one candidate configuration information, each candidate configuration information includes a corresponding candidate configuration code, and the target configuration information corresponding to the current configuration code is determined from the candidate configuration information set according to the candidate configuration code and the current configuration code, for example, the candidate configuration information corresponding to the candidate configuration code that is the same as the current configuration code may be determined as the target configuration information.
And step 208, generating a corresponding target query language according to the target configuration information.
Specifically, after the target configuration information is obtained, the target configuration information may be used as a parameter to generate a corresponding target Query Language, where the Query Language is a statement used for querying, and may be a Query statement SQL (Structured Query Language), which is a Query Language used for accessing data and querying, updating, and managing, and the target configuration information may be executed to Query the database to obtain a corresponding Query result. The target configuration information is analyzed to determine parameters to be queried, conditions to be queried, and the like, and then the target query language is generated according to the combination of the parameters to be queried and the conditions to be queried.
And step 210, performing query through the target query language to obtain a corresponding target query result.
Specifically, after the target query language is obtained, the target query language may be executed to perform a query, so as to obtain a corresponding target query result. Specifically, the target query language carries the parameters to be queried, so that the parameters to be queried in the target query language can be obtained, the matched target parameter values are obtained by querying from the database according to the parameters to be queried, and finally the target parameter values can be determined as the target query result.
In the data query method, the current query link is obtained; acquiring an access request corresponding to the current query link, and acquiring a current configuration code corresponding to the current query link according to the access request; acquiring corresponding target configuration information according to the current configuration code; generating a corresponding target query language according to the target configuration information; and querying through the target query language to obtain a corresponding target query result. Therefore, when a new service or a monitoring function of a product is changed, only the service data table corresponding to the current query link needs to be updated to obtain the updated current query link, the whole query page does not need to be redeveloped, development resources are saved, and the service data query efficiency is improved.
In one embodiment, as shown in fig. 3, before obtaining the current query link, the method further includes:
step 302, obtaining the configured first service data table and second service data table.
Step 304, determining a target field according to the first service data table and the second service data table.
The service data table is configured in a table form, and the service data table includes, for example, a student information table, a student score table, and the like, and the service party can configure the first service data table and the second service data table according to service requirements, product requirements, and application scenarios, where the first service data table and the second service data table are two different types of service data tables.
For example, the first service data table may be as shown in the following table:
stu _ no (school number) stu _ name (name) Birth _ date (date of Birth)
1001 Zhang San 2000-01-01
1002 Li Si 2000-02-01
For example, the second service data table may be as shown in the following table:
stu _ no (school number) Course _ code (Course code) Exam _ result (examination score)
1001 C101 80
1002 C101 75
Specifically, after configuring a first service data table and a second service data table according to a service requirement, an actual application scenario, or a product requirement, the first service data table and the second service data table need to be associated, and the first service data table and the second service data table may be associated through a target field, where the target field is a hub for associating the first service data table and the second service data table, and the determination of the target field according to the first service data table and the second service data table may specifically be that a field containing the same field in the first service data table and the second service data table is used as the target field. For example, in the first service data table and the second service data table shown in the above table, the same fields for obtaining the first service data table and the second service data table are: stu _ no (school number), so the target field is stu _ no (school number).
And step 306, associating the first service data table with the second service data table according to the target field to obtain service data table association configuration information.
And 308, generating candidate query links according to the associated configuration information of the service data table, the first service data table and the second service data table, wherein the current query link is determined from the candidate query links.
Specifically, after the target field is determined according to the first service data table and the second service data table, since the target field is used for associating the first service data table and the second service data table, the first service data table and the second service data table can be associated according to the target field to obtain the service data table association configuration information. That is, a first field value corresponding to a target field in the first service data table may be associated with a second field value corresponding to a target field in the second service data table, and the associated data may be determined as service data table association configuration information.
Further, the service data table association configuration information, the first service data table, and the second service data table may be displayed in a link form, and specifically, a corresponding query link may be generated according to the service data table association configuration information, the first service data table, and the second service data table, and is used as a candidate query link. The current query link is also determined from the candidate query links, and specifically, the current query link may be randomly determined from the candidate query links, or the current query link may also be determined from the candidate query links according to business requirements, actual application scenarios, or product requirements.
In an embodiment, as shown in fig. 4, the obtaining an access request corresponding to a current query link, and obtaining a current configuration code corresponding to the current query link according to the access request includes:
and 402, operating the current query link, and generating an access request according to the operation.
And step 404, analyzing the current query link according to the access request to obtain the corresponding current configuration code.
The current query link is a current query link, the current query link is a mode for acquiring configuration information, sharing is more convenient in a link mode, and the configuration information corresponding to the current query link can be acquired by accessing the current query link. That is, the query link is an access entry of the configuration information, and the corresponding configuration information can be obtained through the query link, and the configuration information is information related to the service configuration.
The access request is used to request to access the current query link, and may be generated by operating the current query link and triggering the access request, where the operation may be a voice operation, a click operation, or a trigger for setting a timing event, and specifically, the access request may be generated by setting a relevant access control on an presentation interface of the current query link and triggering the access request by operating the access control, for example, performing a click operation on the access control and triggering the generation of the access request, or performing a voice operation and triggering the generation of the access request.
Further, after the access request is obtained, the current configuration code corresponding to the current query link may be obtained according to the access request, specifically, the current query link may be analyzed according to the access request, and the corresponding current configuration code is obtained through analysis. The format of the current query link may include configuration codes, for example, the current query link may be: and (4) http:// xxx.xxx.xx/xx/configuration codes. The current configuration code is used for uniquely identifying the configuration information corresponding to the current query link, that is, the corresponding configuration information can be determined and obtained according to the current configuration code.
In one embodiment, as shown in fig. 5, acquiring the corresponding target configuration information according to the current configuration code includes:
step 502, a candidate configuration information set is obtained, where the candidate configuration information set includes at least one candidate configuration information, the candidate configuration information includes a corresponding candidate configuration code, and the candidate configuration information is configuration information corresponding to at least one candidate service data table.
Step 504, determining target configuration information corresponding to the current configuration code from the candidate configuration information set according to the candidate configuration code and the current configuration code.
Specifically, after the current configuration code is obtained, the corresponding target configuration information can be obtained according to the current configuration code, wherein the target configuration information corresponds to the current query link, and the current query link is a form of the target configuration information, so that the corresponding target configuration information can be obtained according to the current configuration code corresponding to the current query link.
Specifically, a candidate configuration information set is obtained, where the candidate configuration information set includes at least one candidate configuration information, and each candidate configuration information includes a corresponding candidate configuration code. The candidate configuration codes are used for uniquely identifying the corresponding candidate configuration information, namely the candidate configuration codes and the corresponding candidate configuration information are in one-to-one correspondence. The target configuration information corresponding to the current configuration code may be further determined from the candidate configuration information set according to the candidate configuration code and the current configuration code, for example, the candidate configuration information corresponding to the candidate configuration code that is the same as the current configuration code may be determined as the target configuration information.
In an embodiment, as shown in fig. 6, the generating of the target query language according to the target configuration information, where the target configuration information is the configuration information corresponding to the target service data table, includes:
step 602, generating a target service data table according to the target configuration information, and displaying the target service data table.
And step 604, acquiring the parameters to be queried on the display page of the target service data table, and generating a corresponding target query language according to the parameters to be queried.
Specifically, after the target configuration information is obtained, the configuration information is information related to service configuration. The configuration information may be configuration information related to a business data table, where the business data table refers to a table format for performing related configuration, and the business data table is, for example, a student information table, a student achievement table, and the like. Therefore, a target service data table may be generated according to the target configuration information, where the target service data table is a service data table corresponding to the target configuration information, that is, the target service data table is a representation of the target configuration information.
Further, the target business data table is displayed for a user to check, the user can inquire through a display page of the target business data table, specifically, a parameter to be inquired is input into the display page of the target business data table, and a corresponding target inquiry language is generated according to the input parameter to be inquired. The Query Language is a statement used for querying, and may be a Query statement SQL (Structured Query Language), which is a Query Language used for accessing data, querying, updating, and managing, and may obtain a corresponding Query result by executing a target Query Language.
In one embodiment, as shown in fig. 7, querying through the target query language to obtain a corresponding target query result includes:
step 702, obtaining parameters to be queried in the target query language.
Step 704, querying the matched target parameter value from the database according to the parameter to be queried, and determining the target parameter value as a target query result.
The parameters to be queried can be input into the display page of the target business data table, and the corresponding target query language is generated according to the input parameters to be queried, namely the parameters to be queried are carried in the target query language, and the parameters to be queried are parameters for querying, so that after the target query language is obtained, the query can be performed from the database according to the parameters to be queried in the target query language. Specifically, the parameter to be queried in the target query language is obtained, and the target parameter value matched with the parameter to be queried can be searched from the database according to the parameter to be queried, wherein the data in the database is stored by key value pairs, and includes keys and corresponding values, so that the corresponding target key can be searched from the data in the database according to the parameter to be queried, and the value corresponding to the target key can be used as the target parameter value. Finally, the target parameter value may be determined as the target query result.
In one embodiment, as shown in fig. 8, the data query method further includes:
step 802, a preset query result display template set is obtained.
And step 804, determining a target query result display template from a preset query result display template set.
And 806, generating a target query result display interface according to the target query result and the target query result display template, and displaying the target query result display interface.
The preset query result display template set is a set formed by at least one preset query result display template, the preset query result display template is preset according to business requirements, practical application scenes or product requirements and is used for displaying target query results, the preset query result display template set can be stored in advance, and when the target query results are obtained, the stored preset query result display template set can be obtained. Further, a target query result display template is determined from the preset query result display template set, wherein the target query result display template may be determined randomly from the preset query result display template set, or the target query result display template may be determined from the preset query result display template set according to business requirements, actual application scenarios or product requirements.
Further, after the target query result display template is determined, because the target query result display template is a preset query result display template used for displaying the target query result in the preset query result display template set, a target query result display interface can be generated according to the target query result and the target query result display template, and the target query result display interface is displayed. The generating of the target query result display interface according to the target query result and the target query result display template may be combining the target query result with the target query result display template, that is, displaying the target query result in the target query result display template, so as to obtain the target query result display page.
In a specific embodiment, a data query method is provided, which specifically includes the following steps:
1. and acquiring the configured first service data table and the second service data table.
2. And determining a target field according to the first service data table and the second service data table.
3. And associating the first service data table with the second service data table according to the target field to obtain service data table association configuration information.
4. And generating candidate query links according to the associated configuration information of the service data table, the first service data table and the second service data table, wherein the current query link is determined from the candidate query links.
5. And acquiring the current query link.
6. And acquiring an access request corresponding to the current query link, and acquiring a current configuration code corresponding to the current query link according to the access request.
6-1, operating the current query link and generating an access request according to the operation.
And 6-2, analyzing the current query link according to the access request to obtain the corresponding current configuration code.
7. And acquiring corresponding target configuration information according to the current configuration code.
7-1, acquiring a candidate configuration information set, wherein the candidate configuration information set comprises at least one candidate configuration information, the candidate configuration information comprises a corresponding candidate configuration code, and the candidate configuration information is the configuration information corresponding to at least one candidate service data table.
7-2, determining target configuration information corresponding to the current configuration code from the candidate configuration information set according to the candidate configuration code and the current configuration code.
8. And generating a corresponding target query language according to the target configuration information.
8-1, the target configuration information is the configuration information corresponding to the target service data table, the target service data table is generated according to the target configuration information, and the target service data table is displayed.
And 8-2, acquiring parameters to be queried on a display page of the target service data table, and generating a corresponding target query language according to the parameters to be queried.
9. And querying through the target query language to obtain a corresponding target query result.
9-1, obtaining parameters to be inquired in the target inquiry language.
9-2, inquiring the matched target parameter value from the database according to the parameter to be inquired, and determining the target parameter value as a target inquiry result.
10. And acquiring a preset query result display template set.
11. And determining a target query result display template from a preset query result display template set.
12. And generating a target query result display interface according to the target query result and the target query result display template, and displaying the target query result display interface.
It should be understood that, although the steps in the above-described flowcharts are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in the above-described flowcharts may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or the stages is not necessarily sequential, but may be performed alternately or alternatingly with other steps or at least a portion of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 9, there is provided a data query apparatus 900, including: a query link acquisition module 902, an access request acquisition module 904, a configuration information acquisition module 906, a query language generation module 908, and a query language query module 910, wherein:
a query link obtaining module 902, configured to obtain a current query link.
An access request obtaining module 904, configured to obtain an access request corresponding to the current query link, and obtain a current configuration code corresponding to the current query link according to the access request.
A configuration information obtaining module 906, configured to obtain corresponding target configuration information according to the current configuration code.
And a query language generation module 908, configured to generate a corresponding target query language according to the target configuration information.
The query language query module 910 is configured to perform a query through a target query language to obtain a corresponding target query result.
In an embodiment, the data query apparatus 900 is further configured to obtain the configured first service data table and the configured second service data table, determine a target field according to the first service data table and the second service data table, associate the first service data table and the second service data table according to the target field to obtain service data table association configuration information, and generate a candidate query link according to the service data table association configuration information, the first service data table and the second service data table, where the current query link is determined from the candidate query links.
In an embodiment, the access request obtaining module 904 is further configured to operate on the current query link, generate an access request according to the operation, and analyze the current query link according to the access request to obtain the corresponding current configuration code.
In one embodiment, the configuration information obtaining module 906 is further configured to obtain a candidate configuration information set, where the candidate configuration information set includes at least one candidate configuration information, the candidate configuration information includes a corresponding candidate configuration code, and the candidate configuration information is configuration information corresponding to at least one candidate service data table, and determine, from the candidate configuration information set, target configuration information corresponding to a current configuration code according to the candidate configuration code and the current configuration code.
In an embodiment, the target configuration information is configuration information corresponding to a target service data table, and the query language generation module 908 is further configured to generate the target service data table according to the target configuration information, display the target service data table, obtain a parameter to be queried on a display page of the target service data table, and generate a corresponding target query language according to the parameter to be queried.
In an embodiment, the query language query module 910 is further configured to obtain a parameter to be queried in the target query language, query a matched target parameter value from a database according to the parameter to be queried, and determine the target parameter value as a target query result.
In an embodiment, the data query apparatus 900 is further configured to obtain a preset query result display template set, determine a target query result display template from the preset query result display template set, generate a target query result display interface according to the target query result and the target query result display template, and display the target query result display interface.
For the specific definition of the data query device, reference may be made to the above definition of the data query method, which is not described herein again. The modules in the data query device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 10. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used to store target configuration information. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a data query method.
Those skilled in the art will appreciate that the architecture shown in fig. 10 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program: acquiring a current query link; acquiring an access request corresponding to the current query link, and acquiring a current configuration code corresponding to the current query link according to the access request; acquiring corresponding target configuration information according to the current configuration code; generating a corresponding target query language according to the target configuration information; and querying through the target query language to obtain a corresponding target query result.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring a configured first service data table and a configured second service data table; determining a target field according to the first service data table and the second service data table; associating the first service data table with the second service data table according to the target field to obtain associated configuration information of the service data table; and generating candidate query links according to the associated configuration information of the service data table, the first service data table and the second service data table, wherein the current query link is determined from the candidate query links.
In one embodiment, the processor, when executing the computer program, further performs the steps of: operating the current query link, and generating an access request according to the operation; and analyzing the current query link according to the access request to obtain the corresponding current configuration code.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring a candidate configuration information set, wherein the candidate configuration information set comprises at least one candidate configuration information, the candidate configuration information comprises a corresponding candidate configuration code, and the candidate configuration information is configuration information corresponding to at least one candidate service data table; and determining target configuration information corresponding to the current configuration code from the candidate configuration information set according to the candidate configuration code and the current configuration code.
In one embodiment, the target configuration information is configuration information corresponding to a target service data table, and the processor executes the computer program to further implement the following steps: generating a target service data table according to the target configuration information, and displaying the target service data table; and acquiring parameters to be queried on a display page of the target service data table, and generating a corresponding target query language according to the parameters to be queried.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring parameters to be queried in a target query language; and inquiring the matched target parameter value from the database according to the parameter to be inquired, and determining the target parameter value as a target inquiry result.
In one embodiment, the processor when executing the computer program further performs the steps of: acquiring a preset query result display template set; determining a target query result display template from a preset query result display template set; and generating a target query result display interface according to the target query result and the target query result display template, and displaying the target query result display interface.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: acquiring a current query link; acquiring an access request corresponding to the current query link, and acquiring a current configuration code corresponding to the current query link according to the access request; acquiring corresponding target configuration information according to the current configuration code; generating a corresponding target query language according to the target configuration information; and querying through the target query language to obtain a corresponding target query result.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring a configured first service data table and a configured second service data table; determining a target field according to the first service data table and the second service data table; associating the first service data table with the second service data table according to the target field to obtain associated configuration information of the service data table; and generating candidate query links according to the associated configuration information of the service data table, the first service data table and the second service data table, wherein the current query link is determined from the candidate query links.
In one embodiment, the processor, when executing the computer program, further performs the steps of: operating the current query link, and generating an access request according to the operation; and analyzing the current query link according to the access request to obtain the corresponding current configuration code.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring a candidate configuration information set, wherein the candidate configuration information set comprises at least one candidate configuration information, the candidate configuration information comprises a corresponding candidate configuration code, and the candidate configuration information is configuration information corresponding to at least one candidate service data table; and determining target configuration information corresponding to the current configuration code from the candidate configuration information set according to the candidate configuration code and the current configuration code.
In one embodiment, the target configuration information is configuration information corresponding to a target service data table, and the processor executes the computer program to further implement the following steps: generating a target service data table according to the target configuration information, and displaying the target service data table; and acquiring parameters to be queried on a display page of the target service data table, and generating a corresponding target query language according to the parameters to be queried.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring parameters to be queried in a target query language; and inquiring the matched target parameter value from the database according to the parameter to be inquired, and determining the target parameter value as a target inquiry result.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring a preset query result display template set; determining a target query result display template from a preset query result display template set; and generating a target query result display interface according to the target query result and the target query result display template, and displaying the target query result display interface.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by hardware instructions of a computer program, which may be stored in a non-volatile computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (8)

1. A method of data query, the method comprising:
acquiring a current query link;
acquiring an access request corresponding to the current query link, and acquiring a current configuration code corresponding to the current query link according to the access request;
acquiring corresponding target configuration information according to the current configuration code;
generating a corresponding target query language according to the target configuration information;
inquiring through the target inquiry language to obtain a corresponding target inquiry result;
wherein, before obtaining the current query link, the method further comprises:
acquiring a configured first service data table and a configured second service data table;
determining a target field according to the first service data table and the second service data table;
associating the first service data table with the second service data table according to the target field to obtain service data table association configuration information;
generating candidate query links according to the business data table association configuration information, the first business data table and the second business data table, wherein the current query link is determined from the candidate query links;
wherein, the acquiring the corresponding target configuration information according to the current configuration code includes:
acquiring a candidate configuration information set, wherein the candidate configuration information set comprises at least one candidate configuration information, the candidate configuration information comprises a corresponding candidate configuration code, and the candidate configuration information is configuration information corresponding to at least one candidate service data table;
and determining target configuration information corresponding to the current configuration code from the candidate configuration information set according to the candidate configuration code and the current configuration code.
2. The method according to claim 1, wherein the obtaining the access request corresponding to the current query link and obtaining the current configuration code corresponding to the current query link according to the access request includes:
operating the current query link, and generating the access request according to the operation;
and analyzing the current query link according to the access request to obtain a corresponding current configuration code.
3. The method according to claim 1, wherein the target configuration information is configuration information corresponding to a target service data table, and the generating a corresponding target query language according to the target configuration information includes:
generating a target service data table according to the target configuration information, and displaying the target service data table;
and acquiring parameters to be inquired on a display page of the target service data table, and generating a corresponding target inquiry language according to the parameters to be inquired.
4. The method of claim 1, wherein said querying in the target query language to obtain a corresponding target query result comprises:
acquiring parameters to be queried in the target query language;
and inquiring the matched target parameter value from a database according to the parameter to be inquired, and determining the target parameter value as a target inquiry result.
5. The method of claim 1, further comprising:
acquiring a preset query result display template set;
determining a target query result display template from the preset query result display template set;
and generating a target query result display interface according to the target query result and the target query result display template, and displaying the target query result display interface.
6. An apparatus for implementing the data query method of claim 1, the apparatus comprising:
the query link acquisition module is used for acquiring the current query link;
an access request obtaining module, configured to obtain an access request corresponding to the current query link, and obtain a current configuration code corresponding to the current query link according to the access request;
the configuration information acquisition module is used for acquiring corresponding target configuration information according to the current configuration code;
the query language generation module is used for generating a corresponding target query language according to the target configuration information;
and the query language query module is used for querying through the target query language to obtain a corresponding target query result.
7. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 5 are implemented when the computer program is executed by the processor.
8. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 5.
CN202010636580.9A 2020-07-03 2020-07-03 Data query method and device, computer equipment and storage medium Active CN112000903B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010636580.9A CN112000903B (en) 2020-07-03 2020-07-03 Data query method and device, computer equipment and storage medium
PCT/CN2021/099669 WO2022001625A1 (en) 2020-07-03 2021-06-11 Data query method and apparatus, computer device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010636580.9A CN112000903B (en) 2020-07-03 2020-07-03 Data query method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112000903A CN112000903A (en) 2020-11-27
CN112000903B true CN112000903B (en) 2022-11-18

Family

ID=73466408

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010636580.9A Active CN112000903B (en) 2020-07-03 2020-07-03 Data query method and device, computer equipment and storage medium

Country Status (2)

Country Link
CN (1) CN112000903B (en)
WO (1) WO2022001625A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112000903B (en) * 2020-07-03 2022-11-18 苏宁云计算有限公司 Data query method and device, computer equipment and storage medium
CN112732243A (en) * 2021-01-11 2021-04-30 京东数字科技控股股份有限公司 Data processing method and device for generating functional component
CN113064917A (en) * 2021-03-08 2021-07-02 南京苏宁软件技术有限公司 Data query method and device, computer equipment and storage medium
CN115604135B (en) * 2022-11-28 2023-03-31 广州市千钧网络科技有限公司 Service monitoring method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190370370A1 (en) * 2018-06-04 2019-12-05 International Business Machines Corporation Autonomous generation of a graph query language interface on top of an application programming interface
CN110990400A (en) * 2019-11-20 2020-04-10 浙江大搜车软件技术有限公司 Database query method and device, computer equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2894587B1 (en) * 2014-01-09 2019-01-09 Fujitsu Limited Stored data access controller
US11068847B2 (en) * 2016-06-19 2021-07-20 Data.World, Inc. Computerized tools to facilitate data project development via data access layering logic in a networked computing platform including collaborative datasets
CN111309991B (en) * 2020-01-16 2023-03-31 广州三七互娱科技有限公司 Query statement generation method and device and data query method and system
CN112000903B (en) * 2020-07-03 2022-11-18 苏宁云计算有限公司 Data query method and device, computer equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190370370A1 (en) * 2018-06-04 2019-12-05 International Business Machines Corporation Autonomous generation of a graph query language interface on top of an application programming interface
CN110990400A (en) * 2019-11-20 2020-04-10 浙江大搜车软件技术有限公司 Database query method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
WO2022001625A1 (en) 2022-01-06
CN112000903A (en) 2020-11-27

Similar Documents

Publication Publication Date Title
CN112000903B (en) Data query method and device, computer equipment and storage medium
CN109474578B (en) Message checking method, device, computer equipment and storage medium
WO2020186786A1 (en) File processing method and apparatus, computer device and storage medium
CN109672741B (en) Micro-service monitoring method and device, computer equipment and storage medium
CN110620812B (en) Interactive information pushing method and device, computer equipment and storage medium
CN110990400A (en) Database query method and device, computer equipment and storage medium
CN109710677B (en) Experiment data processing method and device, computer equipment and storage medium
CN110647438A (en) Event monitoring method and device, computer equipment and storage medium
CN111125169B (en) Data query method, control device, control medium and computer equipment
CN110866198B (en) Static resource caching method, system, device, computer equipment and storage medium
CN111245548A (en) Data synchronization method and device based on timestamp and computer equipment
CN111563368A (en) Report generation method and device, computer equipment and storage medium
CN110688598B (en) Service parameter acquisition method and device, computer equipment and storage medium
CN110908778B (en) Task deployment method, system and storage medium
CN111310427A (en) Service data configuration processing method and device, computer equipment and storage medium
CN111190901B (en) Business data storage method and device, computer equipment and storage medium
CN108848000B (en) Network request testing method and device, computer equipment and storage medium
CN110321284B (en) Test data entry method, device, computer equipment and storage medium
CN111107042B (en) Message parsing method and device, computer equipment and storage medium
WO2021169305A1 (en) Voiceprint data processing method and apparatus, computer device, and storage medium
CN111309991B (en) Query statement generation method and device and data query method and system
CN109542962B (en) Data processing method, data processing device, computer equipment and storage medium
CN110457401B (en) Data storage method and device, computer equipment and storage medium
CN110275703B (en) Method and device for assigning key value to data, computer equipment and storage medium
CN109582313B (en) Business interface dynamic construction method and device, computer 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
GR01 Patent grant
GR01 Patent grant