CN114443692B - Data query method and device - Google Patents

Data query method and device Download PDF

Info

Publication number
CN114443692B
CN114443692B CN202210135228.6A CN202210135228A CN114443692B CN 114443692 B CN114443692 B CN 114443692B CN 202210135228 A CN202210135228 A CN 202210135228A CN 114443692 B CN114443692 B CN 114443692B
Authority
CN
China
Prior art keywords
query
configuration information
chart
data
result
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
CN202210135228.6A
Other languages
Chinese (zh)
Other versions
CN114443692A (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.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202210135228.6A priority Critical patent/CN114443692B/en
Publication of CN114443692A publication Critical patent/CN114443692A/en
Application granted granted Critical
Publication of CN114443692B publication Critical patent/CN114443692B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2428Query predicate definition using graphical user interfaces, including menus and forms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/338Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0482Interaction with lists of selectable items, e.g. menus
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Mathematical Physics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the specification provides a data query method, which comprises the following steps: firstly, displaying first configuration information in a visual language form and a corresponding first result chart in a query interface; then, receiving a query instruction initiated by a user based on elements in the first result chart; then, based on the query instruction, updating and displaying the first configuration information as second configuration information; and then the first result chart is updated and displayed as a second result chart corresponding to the second configuration information.

Description

Data query method and device
Technical Field
One or more embodiments of the present disclosure relate to the field of data processing technologies, and in particular, to a data query method and apparatus.
Background
In the big data age, data analysis technology is widely used for mining data value and exerting data efficiency, and has become a research hotspot. To facilitate data analysis for users, more and more data analysis tools are emerging.
However, the operation modes provided to the user by the existing data analysis tools are difficult to meet the actual application requirements. Therefore, a solution is needed to better meet the user requirements, including improving the smoothness of data analysis operation, so as to fully improve the user operation experience.
Disclosure of Invention
One or more embodiments of the present disclosure describe a data query method and apparatus, where a user may directly initiate a query through interaction based on elements in a visual chart, so as to substantially improve smoothness of user operations.
According to a first aspect, there is provided a data query method comprising: displaying first configuration information in a visual language form and a corresponding first result chart in a query interface; receiving a query instruction initiated by a user based on elements in the first result chart; based on the query instruction, updating and displaying the first configuration information as second configuration information; and displaying the first result chart update as a second result chart corresponding to the second configuration information.
In one embodiment, the first result chart includes a statistics table therein, and the element includes a column header or a row header in the statistics table.
In one embodiment, the first result chart includes a statistical graph, and the element includes a coordinate axis or a data marker in the statistical graph.
In one embodiment, presenting first configuration information in a visual language and a corresponding first result chart in a query interface includes: receiving the first configuration information input by a user based on the query interface; inquiring a data storage system based on the first configuration information to obtain a data inquiry result; and drawing the first result chart according to the data query result.
In one embodiment, the first configuration information in the form of a visual language and the corresponding first result chart are presented in the query interface, further comprising: displaying a first query text in a natural language form corresponding to the first configuration information; after receiving a query instruction initiated by a user based on an element in the first result chart, the method further comprises: and displaying the first query text update as a second query text corresponding to the second configuration information.
Further, in a specific embodiment, before presenting the first query text in natural language corresponding to the first configuration information, the method further includes: receiving the first query text input by a user based on the query interface, and converting the first query text into the first configuration information; or receiving the first configuration information input by the user based on the query interface, and converting the first configuration information into the first query text.
In one example, before presenting the first configuration information in the visual language and the corresponding first result chart in the query interface, the method further comprises: inquiring a data storage system based on the first inquiry text to obtain a data inquiry result; and drawing the first result chart according to the data query result.
In a more specific example, querying a data storage system based on the first query text, obtaining a data query result, includes: performing entity recognition on the first query text to obtain a plurality of segmentation words and entity categories corresponding to the segmentation words; according to the entity category, converting the word segmentation correspondence into a plurality of query elements, wherein the query elements are related to metadata in the data storage system; the plurality of word segments are analyzed in a grammar manner, so that a plurality of element combinations formed based on the plurality of query elements are obtained; carrying out semantic analysis on the element combinations to obtain a plurality of query objects; and constructing a data query script based on the plurality of query objects, wherein the data query script is used for executing the query operation on the data storage system to obtain the data query result.
In one embodiment, receiving a query instruction initiated by a user based on an element within the first result chart includes: receiving a graph modification operation sent by a user based on elements in the first result graph; generating the query instruction based on the chart modification operation; based on the query instruction, the first configuration information is updated and displayed as second configuration information, including: determining a configuration component corresponding to the chart modification operation; based on the configuration component, the first configuration information is updated to the second configuration information.
In a particular embodiment, the element within the first result chart includes a column header in the statistics table; wherein receiving a chart modification operation issued by a user based on an element within the first result chart comprises: responding to the triggering operation of the user on a certain column header, and displaying a plurality of column header names which are selected; receiving triggering operation of a user on any one of the column header names as the chart modification operation; based on the configuration component, updating the first configuration information to the second configuration information includes: adding a configuration component determined based on the list of head names into the first configuration information to obtain the second configuration information; displaying the first result chart update as a second result chart corresponding to the second configuration information, including: and adding column data corresponding to any column header name on the basis of the statistical table.
According to a second aspect, there is provided a data querying device comprising: the display unit is configured to display the first configuration information in the visual language form and the corresponding first result chart in the query interface; the instruction receiving unit is configured to receive a query instruction initiated by a user based on elements in the first result chart; the information updating unit is configured to update and display the first configuration information as second configuration information based on the query instruction; and the chart updating unit is configured to display the first result chart update as a second result chart corresponding to the second configuration information.
According to a third aspect, there is provided a computer readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method of the first aspect.
According to a fourth aspect, there is provided a computing device comprising a memory having executable code stored therein and a processor which when executing the executable code implements the method of the first aspect.
By adopting the method and the device provided by the embodiment of the specification, the user is supported to directly initiate the query through interaction based on the elements in the visual chart, and meanwhile, the related interaction information can be synchronously converted into VL and/or NL, so that the linkage of the chart triggered by the visual chart operation and VL and NL is realized, and the user experience is further fully improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments below are briefly introduced, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 illustrates a query interface schematic diagram in accordance with one embodiment;
FIG. 2 illustrates a query interface schematic according to another embodiment;
FIG. 3 illustrates a query interface variation schematic according to one embodiment;
FIG. 4 illustrates a method flow diagram for data querying, according to one embodiment;
FIG. 5 illustrates a query interface schematic according to yet another embodiment;
FIG. 6 illustrates a query interface variation schematic according to another embodiment;
FIG. 7 illustrates a query interface variation schematic in accordance with yet another embodiment;
FIG. 8 illustrates an apparatus architecture diagram for data querying, according to one embodiment.
Detailed Description
The following describes the scheme provided in the present specification with reference to the drawings.
As stated above, in order to facilitate data analysis by users, more and more data analysis tools are being developed. In some data analysis tools, a user is supported to perform configuration of data query through Visual Language (VL) or Visual programming Language, and then display the data query result through a Visual chart. For visual understanding, a VL configuration region 101 and a presentation region 102 of a visual chart are shown in fig. 1.
If the user's query needs change, it is necessary to manually modify the VL configuration information in the interface. For example, referring to fig. 2, if the user wants to further analyze the monovalent sum-duty index after viewing the interface contents of fig. 1, he needs to click on the index icon 201 in the configuration area and find the unit price icon 202 in the drop-down menu, and then click on the unit price sum-duty icon 203. Thus, the user is required to align the chart region and the configuration region back and forth to modify the VL configuration information, which typically interrupts the user's analyzed heart flow experience.
Based on the scheme, the inventor of the application provides a scheme for supporting a user to directly initiate inquiry through interaction based on elements in a visual chart, and meanwhile, related interaction information can be synchronously converted into VL, so that linkage between the chart triggered by visual chart operation and the VL is realized. FIG. 3 illustrates a query interface variation diagram in accordance with one embodiment, showing a drop down menu 302 in response to a user click command on a column head 301 of a monovalent sum column in a table, increasing a monovalent sum-of-occupancy 304 on the right side of the statistics table and increasing a monovalent sum-of-occupancy configuration component 305 in an index row in a VL configuration region, in accordance with a user click command on an intra-group occupancy 303.
Therefore, by adopting the scheme disclosed by the embodiment of the specification, smooth experience of vision and operation of a user can be brought, and time and energy consumed by the user in data analysis are effectively saved.
The implementation steps of the above scheme are described below in conjunction with specific embodiments. Fig. 4 shows a schematic flow chart of a method for querying data according to an embodiment, where an execution subject of the method may be any apparatus, platform or device cluster with computing, processing capabilities, etc., and may be, for example, data analysis software, or a user terminal with data analysis software installed. As shown in fig. 4, the method comprises the steps of:
step S410, first configuration information in a visual language form and a corresponding first result chart are displayed in a query interface; step S420, receiving a query instruction initiated by a user based on elements in the first result chart; step S430, based on the query instruction, updating and displaying the first configuration information as second configuration information; step S440, displaying the first result chart update as a second result chart corresponding to the second configuration information.
The development of the above steps is described as follows:
first, in step S410, first configuration information in a visual language form and a corresponding first result chart are presented in a query interface. It is to be understood that the visual language VL refers to a computer language that represents objects, concepts and processes in a visual form in a computing process, and is a multi-dimensional structure represented by a spatial arrangement of graphic symbols. For example, graphical symbols such as unit price summation, logistics mode, index, dimension, etc. presented by the configuration area 101 in fig. 1 belong to a visual language, wherein the presented VL content forms corresponding VL configuration information.
In one embodiment, this step may include: first, first configuration information input by a user based on a query interface is received. It should be appreciated that the query interface supports user interaction and may be a client interface provided by a data analysis tool or the like. In one example, receiving first configuration information input based on the configuration area 101 shown in fig. 1 includes: unit price sum index, order date (day) and logistics mode dimension, and screening conditions with order date between the last 7 days.
And then, determining a data query script based on the first configuration information, and querying the data storage system based on the data query script to obtain a first data query result. It should be understood that the scripting language of the data query script is adapted to the database storage system, for example, the data storage system is a database, the scripting language of the corresponding query script may be a structured query language (Structured Query Language, abbreviated as SQL), and for example, the file format in the database storage system is an excel table, and the scripting language of the corresponding query script may be a Python language. In one embodiment, the first configuration information is input into a pre-trained machine learning model to obtain an output data query script. However, training of the machine learning model depends on a large amount of training corpus and calculation, so that the practical implementation difficulty is high.
In another embodiment, the first configuration information is first converted into a first query text in a Natural Language (NL) form, and then the first query text is fully controllably and interpretable, so that the first query text is accurately translated into a corresponding query script.
For the conversion from VL configuration information to NL query text, in a specific embodiment, this may be achieved by preset conversion rules; in another specific embodiment, an intermediate language may also be designed, so that a syntax tree corresponding to the intermediate language is constructed based on VL configuration information, and then a corresponding NL text is determined according to the syntax tree. On the other hand, in a specific embodiment, the converted NL text may also be presented in the query interface for the user to see. Illustratively, as shown in fig. 5, NL text obtained by converting VL configuration information in the configuration area 501 is shown in a text box 502: the last 7 days of each order date and the unit price of each logistics mode are summed. In this way, a transition from VL to NL can be achieved.
For determining a corresponding data query script based on the first query text, the natural language is fully controllably and interpretably translated step by step into a query scripting language by performing entity recognition, grammar analysis, semantic analysis and script conversion on the first query text.
In a specific embodiment, entity identification is performed on the first query text to obtain a plurality of segmentation words and entity categories corresponding to the segmentation words; according to the entity category, converting the word segmentation correspondence into a plurality of query elements, wherein the query elements are related to metadata in the data storage system; then, a plurality of element combinations formed based on a plurality of query elements are obtained through grammar analysis of the plurality of segmented words; then, carrying out semantic analysis on the plurality of element combinations to obtain a plurality of query objects; thereafter, a data query script is constructed based on the number of query objects.
Further, in a more specific embodiment, the entity identification may be implemented as: acquiring a plurality of pre-constructed dictionaries corresponding to a plurality of entity categories; by matching the first query text with the plurality of dictionaries, each word segment and its actual category is obtained.
In a more specific embodiment, the query element transformation described above may be implemented as: for each word, converting the word into a corresponding query element based on a conversion rule corresponding to the entity class; illustratively, if the entity class of a certain word is a dimension value (e.g., female), a corresponding query element (e.g., u.sex=female) is formed based on the field value (e.g., female) in the data storage system that matches the certain word, and the corresponding field name (e.g., sex) and table name (e.g., u).
In a more specific embodiment, the determining of the above-mentioned combination of elements may include: the plurality of word segmentation phrases are obtained through grammar analysis of the plurality of word segmentation; according to the word groups, combining the query elements to obtain a plurality of element combinations; illustratively, the several word groups include "gender is not male", and the plurality of query elements include "u.sex, +.and u.sex=male", so that the element combination "u.sex+.man" can be obtained.
In a more specific embodiment, the determining of the query object includes: for any element combination, processing the element combination into a corresponding query object based on a semantic processing rule corresponding to the related entity class; illustratively, the element combination "p.amt" may be treated as a query object "SUM (p.amt)".
In a more specific embodiment, the construction of the data query script includes: query keywords corresponding to each query object are determined, thereby forming a data query script based on the query keywords and each query object. In a more specific embodiment, for each query object, the query keyword corresponding to the query object is determined based on the entity category related to the query object and the mapping relationship between the entity category and the query keyword, which is pre-established, for example, it may be determined that the SQL keyword corresponding to the query object "u.sex+.man" is where.
In a more specific embodiment, the data query script is constructed based on a number of query objects and grammar rules of a scripting language.
In this manner, the first query text may be interpretable stepwise translated into a data query script.
From the above, the first configuration information can be directly translated into a data query script, or the first configuration information is translated into the first query text and then translated into the data query script; thus, the data storage system is queried using the data query script to obtain a first data query result, and it is to be understood that the data query result typically has an original data format in the data storage system.
And then, based on the first data query result, drawing a corresponding first result chart. It should be understood that a chart is a generic term for a graph (or a statistical chart, a data analysis chart, etc.) and a table (or a statistical table, a data analysis table, etc.), and may actually include either one of them, or both of them. In addition, there are various alternative forms of the chart, for example, the graph may include a line graph, a pie chart, or a bar chart, etc., and the table may include a cross table, a detail table, or a perspective table, etc. In one embodiment, the first result chart may be in the form of an automatic selection based on the first data query result. In another embodiment, the first result chart may also be in the form of a user-defined setting. According to one example, the cross-table shown in the presentation area 102 in FIG. 1 may be plotted based on the first data query result.
In the above embodiment, the first configuration information is directly input by the user, so that data query and related presentation are realized.
In another embodiment, the first query text input by the user may be received first and then converted into the corresponding first configuration information. It is to be appreciated that converting the first query text into the first configuration information, essentially converting from NL to VL, is the reverse of the above-described conversion from VL to NL. Specifically, in one embodiment, the conversion from NL to VL may be implemented by a preset rule; in another embodiment, an intermediate language may be designed such that a grammar tree corresponding to the intermediate language is constructed based on the NL query text, and the corresponding VL configuration information is determined from the grammar tree. According to one example, the query text "last 7 days of each order date, unit price summation of each logistics mode" entered by the user based on the text box 502 is received, and converted to obtain the configuration information shown in the configuration area 501.
Further, a first result chart is determined and presented based on the first configuration information or the first query text.
From the above, it may be achieved that the first configuration information and the first result chart are presented in the query interface, preferably the first query text is also presented.
Next, at step S420, a query instruction initiated by a user based on an element within the first result chart is received. Specifically, a chart modification operation issued by the user based on the element is received, so that a query instruction is generated based on the chart modification operation.
In one embodiment, the first result chart includes a statistics table, with the elements including a column header or a row header of the statistics table. It should be understood that the column header refers to the beginning position of a column in the table, for example, see column header 301 in fig. 3; the line header refers to the beginning position of a certain line in the table. Further, in a specific embodiment, in response to a triggering operation of a user on a certain column header in the statistics table, a plurality of column header names are displayed, and then the triggering operation of the user on any column header name in the plurality of column header names is received as a graph modification operation, so that a query instruction is generated. It should be understood that the triggering operation may be click, long press, voice control, etc., and the operation form is not limited. In one example, as shown in FIG. 3, in response to a user clicking on a column header 301, alternative column header names are presented in a drop down menu 302, and clicking on the intra-group occupancy 303 is received as a chart modification operation.
In another embodiment, the first result chart includes a statistical chart, and the element includes a coordinate axis or a data label in the statistical chart. Illustratively, the elements in the line graph include coordinate axes, line segments, and the like; the elements in the pie chart include sector area, sector indicia, sector percentage, sector color indicia, and the like.
Further, in a specific embodiment, in response to a trigger instruction of a user on a coordinate axis in the foldback, the input box is displayed, so that a coordinate interval input based on the input box is received, and a query instruction is generated. In another specific embodiment, the data re-query is triggered in response to a user selection operation of the coordinate interval based on the coordinate axis. In one example, as shown in fig. 6, a coordinate section selection operation (see a rectangular hatched portion covering the coordinate axis) issued by the user based on the "order date" coordinate axis is received, and a query instruction is generated accordingly.
In another specific embodiment, in response to a triggering operation of a user on a sector in the pie chart, an alternative plurality of sector marks are displayed, and then the triggering operation of the user on any sector mark in the plurality of sector marks is received as the chart modification operation. In one example, as shown in fig. 7, in response to a user clicking on the category label Shanghai 701 of a sector, a plurality of alternative categories are presented in a drop down menu, and clicking on the category label Beijing 702 therein is received, and a query instruction is generated accordingly.
From the above, query instructions initiated by a user based on elements in a query result graph may be received. It should be understood that, after the result chart disclosed in the embodiment of the present disclosure is specifically designed, the user is supported to directly perform special interaction based on the elements in the current result chart, such as changing the content of the elements, so as to intuitively and conveniently initiate the data re-query.
Thereafter, in step S430, the first configuration information is updated and displayed as the second configuration information based on the received query instruction.
The updating and displaying of the configuration information can be performed based on the diagram modification operation indicated by the query instruction. In one embodiment, a configuration component corresponding to a chart element involved in a chart modification operation is determined such that a first configuration information update is presented as a second configuration information based on the configuration component. In another embodiment, in response to a modification query on the chart, all elements in the current chart can be acquired, and after a plurality of corresponding configuration components are determined, second configuration information is obtained through assembly, and then the first configuration information is replaced. On the other hand, in one embodiment, a mapping relationship between a pre-established chart element and a VL graphic symbol is acquired, so as to determine the VL graphic symbol corresponding to the chart element related to the chart modification operation, and form a configuration component for updating configuration information.
Further, according to a specific embodiment, the query instruction indicates addition or replacement of column data in the table, and accordingly, VL graphic symbols corresponding to head names of related columns can be determined to form corresponding configuration components, so that update and display of configuration information are performed. In one example, as shown in fig. 3, the query instruction indicates the addition of the intra-group duty cycle item 303, and accordingly, determines that the VL graphic symbol corresponding thereto is "monovalent sum-duty cycle", thereby forming a corresponding configuration component "index, monovalent sum-duty cycle", and further, adds the "monovalent sum-duty cycle" configuration component 305 to the index row of the configuration area.
In another specific embodiment, the query instruction indicates selection of a coordinate axis interval in the foldline graph, and accordingly, a VL graphic symbol corresponding to the selected coordinate axis interval may be determined to form a corresponding configuration component. In one example, as shown in fig. 6, the query instruction indicates the selection of the coordinate axis interval 2022.01.01-2022.01.07 (see the shaded box selection area and the date interval on the right upper leg thereof), at this time, the VL graphic symbol corresponding to the threshold may be determined to be the order date, thereby forming the corresponding configuration component "dimension, order date" and "filter, order date last 7 days (between 2022.01.01-2022.01.07)", and further updating the configuration information shown in the configuration area, with the visual change that the first graphic symbol 601 of "order date between last 3 days (2022-01-05-2022-01-07)" in the filter row is updated to the second graphic symbol 602 of "order date between last 7 days (2022-01-01-07)".
In yet another specific embodiment, the query instruction indicates that a sector is added or replaced, and accordingly, a VL graphic symbol corresponding to the indicia of the sector may be determined to form a corresponding configuration component. In one example, as shown in fig. 7, the query instruction instructs to replace the category label Shanghai 701 in the sector with the category label Beijing 702, and accordingly, determines that the VL graphic symbol corresponding to the category label Shanghai 701 is "city=Beijing", so as to form a configuration component "dimension, city" and "screening, and thus update and display the VL configuration information, where the visual change is that the" city=Shanghai "graphic symbol 703 in the screening row is updated to the" city=Beijing "graphic symbol 704.
By the above, the update display of the VL configuration information according to the interactive operation on the visual chart can be realized.
Then, in step S440, the first result chart update is presented as a second result chart corresponding to the second configuration information. Specifically, the data storage system may be queried based on the second configuration information to obtain a second data query result, and then a second result chart may be generated according to the second data query result. It should be noted that, for determining the corresponding result chart according to the configuration information, reference may be made to the related description in the foregoing embodiment, which is not repeated herein.
Further, the first result chart update is shown as a second result chart. In one example, as shown in FIG. 3, the table in the chart display area changes, mainly including the increase in the monovalent sum-duty cycle column 304. In another example, as shown in fig. 6, the first fold line map 603 in the chart display area is updated and displayed as the second fold line map 604. In yet another example, as shown in FIG. 7, a first pie chart 705 in the chart presentation area is updated presented as a second pie chart 706.
In another aspect, in one embodiment, the step further includes presenting the first query text update as a second query text corresponding to the second configuration information. Specifically, the second configuration information is firstly converted into a second query text; it should be noted that, for the conversion from the configuration information to the query text, reference may be made to the related description in the foregoing embodiment, which is not repeated herein. Further, the query text is updated and displayed. In one example, as shown in FIG. 6, the contents of the text entry box in the query interface change from "monovalent sum for each order date of the last 3 days" to "monovalent sum for each order date of the last 7 days".
In summary, by adopting the data query method disclosed by the embodiment of the specification, a user is supported to directly initiate query through interaction based on elements in the visual chart, and meanwhile, related interaction information can be synchronously converted into VL and/or NL, so that the linkage of the chart triggered by the visual chart operation and the linkage of the VL and the NL are realized, and further, the user experience is fully improved.
Corresponding to the data query method, the embodiment of the specification also discloses a data query device.
FIG. 8 illustrates an apparatus architecture diagram of a data query, according to one embodiment, as illustrated in FIG. 8, the apparatus 800 includes: the display unit 810 is configured to display the first configuration information in the form of a visual language and the corresponding first result chart in the query interface; an instruction receiving unit 820 configured to receive a query instruction initiated by a user based on an element within the first result chart; an information updating unit 830 configured to update and present the first configuration information as second configuration information based on the query instruction; the chart updating unit 840 is configured to display the first result chart update as a second result chart corresponding to the second configuration information.
In one embodiment, the first result chart includes a statistics table therein, and the element includes a column header or a row header in the statistics table.
In one embodiment, the first result chart includes a statistical graph, and the element includes a coordinate axis or a data marker in the statistical graph.
In one embodiment, presentation unit 810 is configured to: receiving the first configuration information input by a user based on the query interface; inquiring a data storage system based on the first configuration information to obtain a data inquiry result; and drawing the first result chart according to the data query result.
In one embodiment, presentation unit 810 is further configured to: displaying a first query text in a natural language form corresponding to the first configuration information; the apparatus 800 further comprises a text update unit 850 configured to: and displaying the first query text update as a second query text corresponding to the second configuration information.
In a specific embodiment, the apparatus 800 further includes a processing unit configured to receive the first query text input by the user based on the query interface, and convert the first query text into the first configuration information; or the first configuration information input by the user based on the query interface is received, and the first configuration information is converted into the first query text.
In one example, the apparatus further includes a data query unit 860 configured to query a data storage system based on the first query text, resulting in a data query result; and drawing the first result chart according to the data query result.
In a more specific example, the data querying unit 860 is specifically configured to: performing entity recognition on the first query text to obtain a plurality of segmentation words and entity categories corresponding to the segmentation words; according to the entity category, converting the word segmentation correspondence into a plurality of query elements, wherein the query elements are related to metadata in the data storage system; the plurality of word segments are analyzed in a grammar manner, so that a plurality of element combinations formed based on the plurality of query elements are obtained; carrying out semantic analysis on the element combinations to obtain a plurality of query objects; and constructing a data query script based on the plurality of query objects, wherein the data query script is used for executing the query operation on the data storage system to obtain the data query result.
In one embodiment, instruction receiving unit 820 is specifically configured to: receiving a graph modification operation sent by a user based on elements in the first result graph; generating the query instruction based on the chart modification operation; the information updating unit 830 is specifically configured to: determining a configuration component corresponding to the chart modification operation; based on the configuration component, the first configuration information is updated to the second configuration information.
In summary, by adopting the data query device disclosed by the embodiment of the specification, a user is supported to directly initiate query through interaction based on elements in the visual chart, and meanwhile, related interaction information can be synchronously converted into VL and/or NL, so that the linkage of the chart triggered by the visual chart operation and the linkage of the VL and the NL are realized, and further, the user experience is fully improved.
According to an embodiment of another aspect, there is also provided a computer-readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method described in connection with fig. 4.
According to an embodiment of yet another aspect, there is also provided a computing device including a memory having executable code stored therein and a processor that, when executing the executable code, implements the method described in connection with fig. 4.
Those skilled in the art will appreciate that in one or more of the examples described above, the functions described in the present invention may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, these functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium.
The foregoing embodiments have been provided for the purpose of illustrating the general principles of the present invention in further detail, and are not to be construed as limiting the scope of the invention, but are merely intended to cover any modifications, equivalents, improvements, etc. based on the teachings of the invention.

Claims (8)

1. A data query method, comprising:
receiving first configuration information in a visual language form input by a user based on a query interface, and converting the first configuration information into a first query text in a natural language form;
matching the first query text with a plurality of dictionaries which are pre-constructed and correspond to a plurality of entity categories to obtain a plurality of segmented words and entity categories corresponding to the segmented words; according to the entity category, converting the word segmentation correspondence into a plurality of query elements, wherein the query elements are related to metadata in the data storage system; the plurality of word segments are analyzed in a grammar manner, so that a plurality of element combinations formed based on the plurality of query elements are obtained; for any element combination, processing the element combination into a corresponding query object based on a semantic processing rule corresponding to the related entity class, so as to obtain a plurality of query objects corresponding to the element combinations; constructing a data query script based on the plurality of query objects, wherein the data query script is used for executing query operation on the data storage system to obtain the data query result; drawing a first result chart according to the data query result;
displaying first configuration information in a visual language form and a corresponding first result chart in a query interface, and displaying the first query text in the query interface;
receiving a query instruction initiated by a user based on elements in the first result chart;
based on the query instruction, updating and displaying the first configuration information as second configuration information;
displaying the first query text update as a second query text corresponding to the second configuration information;
and displaying the first result chart update as a second result chart corresponding to the second configuration information.
2. The method of claim 1, wherein the first result chart includes a statistics table therein, the element including a column header or a row header in the statistics table.
3. The method of claim 1, wherein the first result chart includes therein a statistical graph, and the element includes a coordinate axis or a data marker in the statistical graph.
4. The method of claim 1, wherein,
receiving a query instruction initiated by a user based on an element in the first result chart, comprising: receiving a graph modification operation sent by a user based on elements in the first result graph; generating the query instruction based on the chart modification operation;
based on the query instruction, the first configuration information is updated and displayed as second configuration information, including: determining a configuration component corresponding to the chart modification operation; based on the configuration component, the first configuration information is updated to the second configuration information.
5. The method of claim 4, wherein the element within the first result chart comprises a column header in a statistics table; wherein,,
receiving a graph modification operation sent by a user based on elements in the first result graph, including: responding to the triggering operation of the user on a certain column header, and displaying a plurality of column header names which are selected; receiving triggering operation of a user on any one of the column header names as the chart modification operation;
based on the configuration component, updating the first configuration information to the second configuration information includes: adding a configuration component determined based on the list of head names into the first configuration information to obtain the second configuration information;
displaying the first result chart update as a second result chart corresponding to the second configuration information, including: and adding column data corresponding to any column header name on the basis of the statistical table.
6. A data query device, comprising:
the processing unit is configured to receive first configuration information in a visual language form input by a user based on a query interface and convert the first configuration information into a first query text in a natural language form;
the data query unit is configured to obtain a plurality of segmentation words and entity categories corresponding to the segmentation words by matching the first query text with a plurality of pre-constructed dictionaries corresponding to the entity categories; according to the entity category, converting the word segmentation correspondence into a plurality of query elements, wherein the query elements are related to metadata in the data storage system; the plurality of word segments are analyzed in a grammar manner, so that a plurality of element combinations formed based on the plurality of query elements are obtained; for any element combination, processing the element combination into a corresponding query object based on a semantic processing rule corresponding to the related entity class, so as to obtain a plurality of query objects corresponding to the element combinations; constructing a data query script based on the plurality of query objects, wherein the data query script is used for executing query operation on the data storage system to obtain the data query result; drawing a first result chart according to the data query result;
the display unit is configured to display first configuration information in a visual language form and a corresponding first result chart in a query interface, and display the first query text in the query interface;
the instruction receiving unit is configured to receive a query instruction initiated by a user based on elements in the first result chart;
the information updating unit is configured to update and display the first configuration information as second configuration information based on the query instruction;
a text updating unit configured to update and display the first query text as a second query text corresponding to the second configuration information;
and the chart updating unit is configured to display the first result chart update as a second result chart corresponding to the second configuration information.
7. A computer readable storage medium having stored thereon a computer program, wherein the computer program, when executed in a computer, causes the computer to perform the method of any of claims 1-5.
8. A computing device comprising a memory and a processor, wherein the memory has executable code stored therein, which when executed by the processor, implements the method of any of claims 1-5.
CN202210135228.6A 2022-02-15 2022-02-15 Data query method and device Active CN114443692B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210135228.6A CN114443692B (en) 2022-02-15 2022-02-15 Data query method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210135228.6A CN114443692B (en) 2022-02-15 2022-02-15 Data query method and device

Publications (2)

Publication Number Publication Date
CN114443692A CN114443692A (en) 2022-05-06
CN114443692B true CN114443692B (en) 2023-08-04

Family

ID=81373947

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210135228.6A Active CN114443692B (en) 2022-02-15 2022-02-15 Data query method and device

Country Status (1)

Country Link
CN (1) CN114443692B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110309208A (en) * 2018-03-01 2019-10-08 阿里巴巴集团控股有限公司 The implementation method and device of data visualization
CN110737672A (en) * 2018-07-20 2020-01-31 武汉烽火众智智慧之星科技有限公司 data visualization method and device
CN110837545A (en) * 2019-11-13 2020-02-25 贵州医渡云技术有限公司 Interactive data analysis method, device, medium and electronic equipment
WO2020060720A1 (en) * 2018-09-18 2020-03-26 Tableau Software, Inc. Analyzing natural language expressions in a data visualization user interface
CN112001188A (en) * 2020-10-30 2020-11-27 北京智源人工智能研究院 Method and device for rapidly realizing NL2SQL based on vectorization semantic rule

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170308571A1 (en) * 2016-04-20 2017-10-26 Google Inc. Techniques for utilizing a natural language interface to perform data analysis and retrieval

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110309208A (en) * 2018-03-01 2019-10-08 阿里巴巴集团控股有限公司 The implementation method and device of data visualization
CN110737672A (en) * 2018-07-20 2020-01-31 武汉烽火众智智慧之星科技有限公司 data visualization method and device
WO2020060720A1 (en) * 2018-09-18 2020-03-26 Tableau Software, Inc. Analyzing natural language expressions in a data visualization user interface
CN110837545A (en) * 2019-11-13 2020-02-25 贵州医渡云技术有限公司 Interactive data analysis method, device, medium and electronic equipment
CN112001188A (en) * 2020-10-30 2020-11-27 北京智源人工智能研究院 Method and device for rapidly realizing NL2SQL based on vectorization semantic rule

Also Published As

Publication number Publication date
CN114443692A (en) 2022-05-06

Similar Documents

Publication Publication Date Title
US11055489B2 (en) Determining levels of detail for data visualizations using natural language constructs
KR100969447B1 (en) Rendering tables with natural language commands
CN111813802A (en) Method for generating structured query statement based on natural language
CN107491655B (en) Liver disease information intelligent consultation system based on machine learning
CN101203849A (en) Predictive conversion of user input
US11429253B2 (en) Integrated drill down within a natural language interface for visual analysis
CN111274267A (en) Database query method and device and computer readable storage medium
KR101950126B1 (en) Mathematical formula processing method, device, apparatus and computer storage medium
WO2021254046A1 (en) Information query method and device
US11790010B2 (en) Inferring intent and utilizing context for natural language expressions in a data visualization user interface
WO2020149959A1 (en) Conversion of natural language query
CN111191429A (en) System and method for automatic filling of data table
CN113064980A (en) Intelligent question and answer method and device, computer equipment and storage medium
CN116303537A (en) Data query method and device, electronic equipment and storage medium
CN113918512A (en) Power grid operation rule knowledge graph construction system and method
CN112765999A (en) Machine translation bilingual comparison method and system
CN112115252A (en) Intelligent auxiliary writing processing method and device, electronic equipment and storage medium
CN117539893A (en) Data processing method, medium, device and computing equipment
CN114443692B (en) Data query method and device
CN117668182A (en) Standard intelligent question-answering method and system integrating knowledge graph and large language model
CN117149804A (en) Data processing method, device, electronic equipment and storage medium
CN116340352A (en) Data query method and device, storage medium and electronic equipment
US11698933B1 (en) Using dynamic entity search during entry of natural language commands for visual data analysis
CN114840657A (en) API knowledge graph self-adaptive construction and intelligent question-answering method based on mixed mode
JP2018156552A (en) Computer system and method for searching text data

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
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Wang Jiazhe

Inventor after: Li Xi

Inventor after: Chen Xinru

Inventor before: Wang Jiazhe

GR01 Patent grant
GR01 Patent grant