CN111797637A - Interactive labeling method and device - Google Patents

Interactive labeling method and device Download PDF

Info

Publication number
CN111797637A
CN111797637A CN202010707403.5A CN202010707403A CN111797637A CN 111797637 A CN111797637 A CN 111797637A CN 202010707403 A CN202010707403 A CN 202010707403A CN 111797637 A CN111797637 A CN 111797637A
Authority
CN
China
Prior art keywords
sql statement
node
developer
sql
modifiable
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.)
Granted
Application number
CN202010707403.5A
Other languages
Chinese (zh)
Other versions
CN111797637B (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.)
AI Speech Ltd
Original Assignee
AI Speech 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 AI Speech Ltd filed Critical AI Speech Ltd
Priority to CN202010707403.5A priority Critical patent/CN111797637B/en
Publication of CN111797637A publication Critical patent/CN111797637A/en
Application granted granted Critical
Publication of CN111797637B publication Critical patent/CN111797637B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses an interactive labeling method and device, and the method comprises the following steps: acquiring data to be annotated input by a developer, inputting the data to be annotated to an SQL statement output module, and acquiring a first SQL statement output by the module; visually displaying the first SQL statement and forming a modifiable display interface; executing the first SQL statement and displaying a query result corresponding to the first SQL statement; the second SQL statement is regenerated in response to the modification operation of the developer on the modifiable display interface; and executing the second SQL statement and displaying the query result corresponding to the second SQL statement until the developer confirms that the query result corresponding to the second SQL statement is accurate. Through the interactive modification operation of the developer on the first SQL statement on the modifiable display interface, the SQL modification threshold is reduced, and the SQL statement accuracy is improved.

Description

Interactive labeling method and device
Technical Field
The invention belongs to the technical field of natural language processing, and particularly relates to an interactive labeling method and device.
Background
In the related art, Text-to-SQL is defined as: the machine automatically converts the natural language questions input by the user into SQL sentences operable by the database, and the automatic question answering capability based on the database is realized. In a Text-to-SQL task of semantic analysis, a method for marking common intention and semantic slots is commonly used for marking semantic intention classification, inputting a sentence of natural language and marking the field to which the sentence belongs. Such as: inputting: i want to listen to Liudebua's forgetful water.
Label content 1, domain classification: domain-music;
annotation content 2, annotation intent and semantic slots: intention-to listen to a song; singer name-Liudebua; song title-forgetting water.
The method is used for labeling Text-to-SQL, a sentence of natural language is input, which database the sentence belongs to is labeled, SQL is written, and SQL is executed and verified to be correct. Such as: inputting: the name of the player with the largest number of gold cards of the Olympic games is obtained.
Annotation content 1, database: the Olympic Games;
annotation content 2, SQL: the SELECT name FROM oly olympic prize board ORDER BY gold card number DESC LIMIT 1.
The following table illustrates how each clause content in SQL is extracted from the input:
Figure BDA0002594803770000011
the inventor finds that the method has at least the following problems when labeling the data of the Text-to-SQL task in the process of implementing the application: 1. the marked content (SQL) is complex and the marking efficiency is low;
2. SQL writing methods are various, the marking accuracy rate cannot be guaranteed, and the data quality is not high;
3. the marking threshold is high, and marking personnel need to fully understand the content, the data structure and the service of the database.
Disclosure of Invention
An embodiment of the present invention provides an interactive labeling method and apparatus, which are used to solve at least one of the above technical problems.
In a first aspect, an embodiment of the present invention provides an interactive annotation method, including: acquiring data to be annotated input by a developer, inputting the data to be annotated to an SQL statement output module, and acquiring a first SQL statement output by the SQL statement output module; visually displaying the first SQL statement and forming a modifiable display interface; executing the first SQL statement and displaying a query result corresponding to the first SQL statement; the second SQL statement is regenerated in response to the modification operation of the developer on the modifiable display interface; and executing the second SQL statement and displaying the query result corresponding to the second SQL statement until the developer confirms that the query result corresponding to the second SQL statement is accurate.
In a second aspect, an embodiment of the present invention provides an interactive annotation apparatus, including: the output module is configured to acquire data to be annotated input by a developer, input the data to be annotated to the SQL statement output module, and acquire a first SQL statement output by the SQL statement output module; the visualization module is configured to visually display the first SQL statement and form a modifiable display interface; the display module is configured to execute the first SQL statement and display a query result corresponding to the first SQL statement; the modification module is configured to respond to the modification operation of the developer on the modifiable display interface and regenerate a second SQL statement; and the execution module is configured to execute the second SQL statement and display the query result corresponding to the second SQL statement until the developer confirms that the query result corresponding to the second SQL statement is accurate.
In a third aspect, an electronic device is provided, comprising: the system includes at least one processor, and a memory communicatively coupled to the at least one processor, wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the steps of the multi-intent recognition training or use method of any of the embodiments of the present invention.
In a fourth aspect, the present invention further provides a computer program product, where the computer program product includes a computer program stored on a non-volatile computer-readable storage medium, and the computer program includes program instructions, which, when executed by a computer, make the computer execute the steps of the multi-intent recognition training or using method according to any embodiment of the present invention.
The method and the device can output the first SQL sentence with the basic sentence pattern and the content, can improve the labeling efficiency, and realize continuous correction of the first SQL sentence by adopting interactive correction operation on the first SQL sentence on a modifiable display interface by a developer until the SQL sentence with accurate query result is regenerated, thereby reducing the threshold of SQL modification and improving the accuracy of the SQL sentence.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
FIG. 1 is a flowchart illustrating an interactive annotation method according to an embodiment of the present invention;
FIG. 2 is a flowchart of another interactive annotation method according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a further method for interactive annotation according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a specific example of an interactive annotation method according to an embodiment of the present invention;
FIG. 5 is an interface diagram of a specific example of an interactive annotation method according to an embodiment of the present invention;
FIG. 6 is an interface diagram of another specific example of the interactive annotation method according to an embodiment of the present invention;
FIG. 7 is a block diagram of an interactive annotation device according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a flowchart of an embodiment of an interactive annotation method according to the present application is shown, where the interactive annotation method according to the present embodiment can be applied to a terminal with a communication function, such as a tablet, a computer, and the like.
As shown in fig. 1, in step 101, data to be annotated input by a developer is acquired, the data to be annotated is input to an SQL statement output module, and a first SQL statement output by the SQL statement output module is acquired;
in step 102, visually displaying the first SQL statement and forming a modifiable display interface;
in step 103, executing the first SQL statement and displaying a query result corresponding to the first SQL statement;
in step 104, in response to the modification operation of the developer on the modifiable display interface, regenerating a second SQL statement;
in step 105, the second SQL statement is executed and the query result corresponding to the second SQL statement is displayed until the developer confirms that the query result corresponding to the second SQL statement is accurate.
In this embodiment, for step 101, after acquiring data to be annotated input by a developer, the interactive annotation device inputs the data to be annotated into the SQL statement output module, and the data to be annotated is converted by the SQL statement output module, so as to acquire the first SQL statement having the basic statement and content. Then, in step 102, the interactive annotation device parses the first SQL statement and visually expands the first SQL statement, so as to form a modifiable display interface. Then, in step 103, the interactive annotation device executes the first SQL statement and displays the query result after the execution of the first SQL statement. Then, in step 104, the developer determines whether the query result is correct, and if the query result is incorrect, the developer performs modification operation on the modifiable display interface, and after the modification is completed, the second SQL statement is generated again. Then, in step 105, the interactive annotation device executes the second SQL statement and displays the query result after the execution of the second SQL statement until the developer determines that the query result is correct.
According to the method, the data to be marked are input into the SQL sentence output module, so that the first SQL sentence with the basic sentence pattern and the content is obtained, a developer adopts interactive modification operation on the first SQL sentence on the modifiable display interface, the first SQL sentence is continuously modified, the SQL sentence with the accurate query result is generated until the SQL sentence with the accurate query result is generated again, and therefore the SQL sentence modification threshold is reduced, and meanwhile the SQL sentence accuracy is improved.
Referring further to fig. 2, a flow chart of another interactive annotation method provided in an embodiment of the present application is shown. The flow chart is primarily a flow chart of steps further defined for the additional flow of the flow chart 1.
As shown in fig. 2, in step 201, in response to the developer confirming that the query result corresponding to the second SQL statement is accurate, the data to be annotated is annotated based on the second SQL statement to form an annotation result;
in step 202, the annotation result is stored.
In this embodiment, for step 201, after the interactive annotation device obtains the instruction that the developer confirms that the query result corresponding to the second SQL statement is accurate, the interactive annotation device annotates the data to be annotated based on the second SQL statement, thereby forming an annotation result. Thereafter, for step 202, the interactive annotation device stores the annotation result.
According to the method, the annotation result can be stored after the developer confirms that the query result is accurate, the effect of avoiding loss of the annotation data is achieved, and the problem that the same data to be annotated needs to be annotated repeatedly is solved.
In one embodiment, the modifiable presentation interface includes a tree graph including nodes and logical relationships corresponding to the nodes, wherein each node has either a non-modifiable state or a modifiable state. In this way, the developer can modify the nodes in the modifiable state in the tree diagram, thereby realizing the interactive modification operation of the SQL statement.
The nodes comprise a step node, an operation node and a value node; the step nodes comprise start nodes, wherein the start nodes comprise a selection database node and a generation SQL node, and the generation SQL node comprises a selection table, a selection column, a query condition and/or a sequence.
Referring to fig. 3, a flowchart of another interactive annotation method provided in an embodiment of the present application is shown. The flow diagram is primarily a flow diagram of further defined steps for the case of step 104 "regenerating the second SQL statement in response to a developer's modify operation on the modifiable presentation interface" in fig. 1.
As shown in fig. 3, in step 301, in response to a modification operation performed by a developer on a certain step node and/or a certain operation node, at least one alternative set containing the operation node and/or the value node corresponding to the certain step node and/or at least one alternative set containing the value node corresponding to the operation node are presented to the developer;
in step 302, based on the operation node and/or value node in the candidate set corresponding to a certain step node selected by the developer, and/or value node in the candidate set corresponding to a certain operation node, the second SQL statement is regenerated.
In this embodiment, for step 301, after the developer performs a modification operation on a modifiable certain step node and/or a modifiable certain operation node, the developer of the interactive annotation device presents at least one alternative set containing operation nodes and/or value nodes corresponding to the certain step node and/or at least one alternative set containing value nodes corresponding to the operation nodes. Then, for step 302, the developer selects an operation node and/or a value node in the candidate set corresponding to a certain step node, and/or a value node in the candidate set corresponding to a certain operation node, and the interactive annotation device fills the operation node and/or the value node selected by the developer into the tree graph, thereby completing the regeneration of the second SQL statement.
According to the method, the developer is adopted to carry out interactive modification in the tree diagram, the accuracy of the generated SQL statement can be improved, and the professional threshold of a marking person for modifying the SQL statement is reduced.
In another embodiment, the developer may edit and modify the operation node and the value node, thereby enabling the interactive annotation device to regenerate the second SQL statement.
In some optional embodiments, the method further comprises: and before the second SQL statement is regenerated in response to the modification operation of the developer on the modifiable display interface, storing the content in the modifiable display interface in response to the modification operation of the developer on the modifiable display interface.
It should be noted that the above method steps are not intended to limit the execution order of the steps, and in fact, some steps may be executed simultaneously or in the reverse order of the steps, which is not limited herein.
At present, no first SQL statement with a basic sentence pattern and content can be output in the market, and the first SQL statement is continuously corrected by adopting interactive modification operation on the first SQL statement on a modifiable display interface by a developer, so that the SQL statement with accurate query results is generated again.
The following description is provided to enable those skilled in the art to better understand the present disclosure by describing some of the problems encountered by the inventors in implementing the present disclosure and by describing one particular embodiment of the finally identified solution.
The inventor finds that the defects in the prior art are mainly caused by the following reasons in the process of implementing the application: the output content (SQL) to be labeled has professionality, the use difficulty of the SQL limits a non-technical user to label, and finally a higher threshold is brought to data analysis and use.
The inventor also found that: people who know about database technology and have some business understanding are sought to label data. This often results in high labeling costs and inefficient per-person labeling, which is not conducive to mass production delivery.
The scheme of this application mainly starts to design and optimize from following several aspects and reduces the data analysis threshold, reduces the mark cost, improves per capita mark efficiency:
1. and (3) using the pre-trained model, taking the text to be labeled as input, and outputting the SQL sentence predicted by the model. The SQL statement is not necessarily completely correct, but provides for the extraction of the schema and content of the underlying SQL statement. This step improves the labeling efficiency.
2. The SQL statement is parsed and visualized as a plurality of sub-steps and logical structures (as shown in fig. 5), represented as a tree diagram. This step lowers the threshold for understanding the SQL statement query process.
3. The node content in the tree graph is modified through interactive operation. This step lowers the threshold for modifying SQL statements.
4. And converting the modified tree graph of each step into a new SQL statement, and querying a database to obtain a corresponding result (as shown in FIG. 6). And displaying the SQL sentences and the query results to the user. This step lowers the threshold for data analysis.
Referring to fig. 4, a flowchart of a specific example of an interactive annotation method according to an embodiment of the present application is shown.
As shown in fig. 4, the scheme of the present application mainly includes the following steps:
the method comprises the following steps: and initializing the system and loading a pre-training model.
Step two: the user enters a natural language query, such as: singers with an album number below 100 are arranged in descending order of the number of songs, giving the singers place of birth and their names.
Step three: the system receives user input, and calls a pre-training model to output SQL statements, such as:
Figure BDA0002594803770000071
Figure BDA0002594803770000081
step four: the system analyzes the SQL statement and shows the data query process through the tree diagram. There are three types of node types: a step node, a value node and an operation node. Each node has two states of 'modifiable' and 'non-modifiable' according to needs. Leaf nodes in the tree are all value node types. The three types of nodes have the following characteristics and attributes.
a) Step one, the nodes: there are usually children, the nodes themselves have a fixed value, each node has a candidate set of children, with currently selected children or subtrees. The class node is used for showing relevant operations of the database, such as: selecting a library, generating SQL statements, selecting a table, selecting columns, adding conditions, sorting, limiting quantity, and the like. Typically a "modifiable" state.
b) Value node: usually as leaf nodes, the node itself has a variable value, with no backup set of children. The class node is used for displaying related value contents in the SQL statement, such as: selected table names, column names, entered query conditions, etc. If the table name and the column name are used, the state is 'non-modifiable', otherwise, the state is 'modifiable'.
c) The operation node: there are usually children, the nodes themselves have a variable value, there is a candidate set of children. The node is used for displaying the contents of aggregation operation, sorting keywords, logic keywords and the like in the SQL statement. Such as: AVG, COUNT, SUM, ASC, DESC, etc.
Step five: the node status is set. And the node in the 'non-modifiable' state cannot be modified by a user. The user may click on a node in the "modifiable" state and the system presents an alternative set of child nodes in that node. According to the node characteristics, the alternative set has the limitation of single selection and multiple selection. As shown in FIG. 4, clicking on the "select column" modifiable node, the right column shows all selectable options for that node.
Step six: the system takes the SQL sentence as input, requests to query the database, and displays the SQL sentence and the data query result to the user.
Step seven: the user modifies the contents of the child nodes of the current node by selecting a more appropriate value from the candidate set of nodes, modifying the presentation of the tree graph.
Step eight: the system receives and stores the content modified by the user, wherein the content comprises two items of modified node id and modified child node id set.
Step nine: returning to the fourth step, the system regenerates a new SQL statement according to the modified content.
Step ten: the user may choose to repeat steps seven-nine to obtain more accurate SQL results.
Step eleven: the system records each round of user input, each round of user modification, and the final SQL.
By the aid of the solution, the labeling efficiency of Text-to-SQL tasks can be improved, more data can be labeled in unit time, labeling cost is reduced, and labeling personnel do not need to have deep data knowledge and fix the sentence pattern of SQL to a certain extent, so that the labeling quality is relatively stable, the data analysis efficiency is improved, and the data mining value is higher.
Referring to fig. 7, a block diagram of an interactive annotation apparatus according to an embodiment of the invention is shown.
As shown in FIG. 7, the interactive annotation device 400 includes an output module 410, a visualization module 420, a presentation module 430, a modification module 440, and an execution module 450.
The output module is configured to acquire data to be annotated input by a developer, input the data to be annotated to the SQL statement output module, and acquire a first SQL statement output by the SQL statement output module; the visualization module is configured to visually display the first SQL statement and form a modifiable display interface; the display module is configured to execute the first SQL statement and display a query result corresponding to the first SQL statement; the modification module is configured to respond to the modification operation of the developer on the modifiable display interface and regenerate a second SQL statement; and the execution module is configured to execute the second SQL statement and display the query result corresponding to the second SQL statement until the developer confirms that the query result corresponding to the second SQL statement is accurate.
It should be understood that the modules recited in fig. 7 correspond to various steps in the methods described with reference to fig. 1, 2, and 3. Thus, the operations and features described above for the method and the corresponding technical effects are also applicable to the modules in fig. 7, and are not described again here.
It should be noted that the modules in the embodiments of the present disclosure are not limited to the scheme of the present disclosure, and in addition, the related functional modules may also be implemented by a hardware processor, for example, the determining module may also be implemented by a processor, and will not be described herein again.
In other embodiments, the present invention further provides a non-volatile computer storage medium, where the computer storage medium stores computer-executable instructions, and the computer-executable instructions may execute the interactive labeling method in any of the above method embodiments;
as one embodiment, a non-volatile computer storage medium of the present invention stores computer-executable instructions configured to:
acquiring data to be annotated input by a developer, inputting the data to be annotated to an SQL statement output module, and acquiring a first SQL statement output by the SQL statement output module;
visually displaying the first SQL statement and forming a modifiable display interface;
executing the first SQL statement and displaying a query result corresponding to the first SQL statement;
the second SQL statement is regenerated in response to the modification operation of the developer on the modifiable display interface;
and executing the second SQL statement and displaying the query result corresponding to the second SQL statement until the developer confirms that the query result corresponding to the second SQL statement is accurate.
The non-volatile computer-readable storage medium may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the interactive annotation device, and the like. Further, the non-volatile computer-readable storage medium may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, the non-transitory computer readable storage medium optionally includes memory located remotely from the processor, which may be connected to the interactive annotation device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Embodiments of the present invention also provide a computer program product, which includes a computer program stored on a non-volatile computer-readable storage medium, where the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes any one of the above interactive annotation methods.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 8, the electronic device includes: one or more processors 510 and memory 520, with one processor 510 being an example in fig. 8. The apparatus of the interactive annotation method may further include: an input device 530 and an output device 540. The processor 510, the memory 520, the input device 530, and the output device 540 may be connected by a bus or other means, and fig. 8 illustrates an example of a connection by a bus. The memory 520 is a non-volatile computer-readable storage medium as described above. The processor 510 executes various functional applications of the server and data processing by executing nonvolatile software programs, instructions and modules stored in the memory 520, namely, implements the communication compensation method for voice conversation of the above-described method embodiments. The input device 530 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the communication compensation device. The output device 540 may include a display device such as a display screen.
The product can execute the method provided by the embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the method provided by the embodiment of the present invention.
As an embodiment, the electronic device is applied to an interactive annotation device, and is used for a client, and includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to:
acquiring data to be annotated input by a developer, inputting the data to be annotated to an SQL statement output module, and acquiring a first SQL statement output by the SQL statement output module;
visually displaying the first SQL statement and forming a modifiable display interface;
executing the first SQL statement and displaying a query result corresponding to the first SQL statement;
the second SQL statement is regenerated in response to the modification operation of the developer on the modifiable display interface;
and executing the second SQL statement and displaying the query result corresponding to the second SQL statement until the developer confirms that the query result corresponding to the second SQL statement is accurate.
The electronic device of the embodiments of the present application exists in various forms, including but not limited to:
(1) a mobile communication device: such devices are characterized by mobile communications capabilities and are primarily targeted at providing voice, data communications. Such terminals include smart phones, multimedia phones, functional phones, and low-end phones, among others.
(2) Ultra mobile personal computer device: the equipment belongs to the category of personal computers, has calculation and processing functions and generally has the characteristic of mobile internet access. Such terminals include: PDA, MID, and UMPC devices, etc.
(3) A portable entertainment device: such devices can display and play multimedia content. The devices comprise audio and video players, handheld game consoles, electronic books, intelligent toys and portable vehicle-mounted navigation devices.
(4) The server is similar to a general computer architecture, but has higher requirements on processing capability, stability, reliability, safety, expandability, manageability and the like because of the need of providing highly reliable services.
(5) And other electronic devices with data interaction functions.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods of the various embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. An interactive annotation method comprising:
acquiring data to be annotated input by a developer, inputting the data to be annotated to an SQL statement output module, and acquiring a first SQL statement output by the SQL statement output module;
visually displaying the first SQL statement and forming a modifiable display interface;
executing the first SQL statement and displaying a query result corresponding to the first SQL statement;
in response to the modification operation of the developer on the modifiable display interface, regenerating a second SQL statement;
and executing the second SQL statement and displaying the query result corresponding to the second SQL statement until the developer confirms that the query result corresponding to the second SQL statement is accurate.
2. The method of claim 1, wherein after executing the second SQL statement and presenting the query result corresponding to the second SQL statement until the developer confirms that the query result corresponding to the second SQL statement is accurate, the method further comprises:
responding to the developer to confirm that the query result corresponding to the second SQL statement is accurate, and labeling the data to be labeled based on the second SQL statement to form a labeling result;
and storing the labeling result.
3. The method of claim 1, wherein the modifiable presentation interface comprises a tree graph including nodes and logical relationships corresponding to the nodes, wherein each node has either a non-modifiable state or a modifiable state.
4. The method of claim 3, wherein the nodes comprise a step node, an operation node, and a value node;
the step nodes comprise start nodes, wherein the start nodes comprise a selection database node and a generation SQL node, and the generation SQL node comprises a selection table, a selection column, a query condition and/or a sequence.
5. The method according to claim 4, wherein a certain step node includes at least one alternative set containing the operation node and/or the value node corresponding to the certain step node type, a certain operation node includes at least one alternative set containing the value node corresponding to the certain operation node type, and the regenerating a second SQL statement in response to the modification operation of the modifiable presentation interface by the developer comprises:
in response to a modification operation of a developer on the certain step node and/or a certain operation node, showing the developer the at least one alternative set containing the operation node and/or the value node corresponding to the certain step node and/or the at least one alternative set containing the value node corresponding to the operation node;
and regenerating a second SQL statement based on the operation node and/or the value node in the alternative set corresponding to the certain step node selected by the developer and/or the value node in the alternative set corresponding to the certain operation node.
6. The method of claim 4, wherein said regenerating a second SQL statement in response to a modification operation by the developer on the modifiable presentation interface further comprises:
and regenerating a second SQL statement based on the editing and modification of the operation node and the value node by the developer.
7. The method of claim 1, wherein prior to regenerating a second SQL statement in response to a modification operation by the developer on the modifiable presentation interface, the method further comprises:
and in response to the modification operation of the developer on the modifiable display interface, storing the content in the modifiable display interface.
8. An interactive annotation device comprising:
the output module is configured to acquire data to be annotated input by a developer, input the data to be annotated to the SQL statement output module, and acquire a first SQL statement output by the SQL statement output module;
the visualization module is configured to visually display the first SQL statement and form a modifiable display interface;
the display module is configured to execute the first SQL statement and display a query result corresponding to the first SQL statement;
the modification module is configured to respond to the modification operation of the developer on the modifiable display interface and regenerate a second SQL statement;
and the execution module is configured to execute the second SQL statement and display the query result corresponding to the second SQL statement until the developer confirms that the query result corresponding to the second SQL statement is accurate.
9. An electronic device, comprising: at least one processor, and a memory communicatively coupled to the at least one processor, wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the method of any one of claims 1 to 7.
10. A storage medium having stored thereon a computer program, characterized in that the program, when being executed by a processor, is adapted to carry out the steps of the method of any one of claims 1 to 7.
CN202010707403.5A 2020-07-21 2020-07-21 Interactive labeling method and device Active CN111797637B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010707403.5A CN111797637B (en) 2020-07-21 2020-07-21 Interactive labeling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010707403.5A CN111797637B (en) 2020-07-21 2020-07-21 Interactive labeling method and device

Publications (2)

Publication Number Publication Date
CN111797637A true CN111797637A (en) 2020-10-20
CN111797637B CN111797637B (en) 2024-06-25

Family

ID=72827303

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010707403.5A Active CN111797637B (en) 2020-07-21 2020-07-21 Interactive labeling method and device

Country Status (1)

Country Link
CN (1) CN111797637B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114048226A (en) * 2021-11-12 2022-02-15 国家电网有限公司大数据中心 Data query method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105404690A (en) * 2015-12-16 2016-03-16 华为技术服务有限公司 Database querying method and apparatus
CN108920543A (en) * 2018-06-13 2018-11-30 珠海格力电器股份有限公司 query and interaction method and device, computer device and storage medium
CN108959631A (en) * 2018-07-24 2018-12-07 北京百度网讯科技有限公司 Method and apparatus for query information
CN109446218A (en) * 2018-09-25 2019-03-08 中国平安人寿保险股份有限公司 SQL statement generation method, device and computer readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105404690A (en) * 2015-12-16 2016-03-16 华为技术服务有限公司 Database querying method and apparatus
CN108920543A (en) * 2018-06-13 2018-11-30 珠海格力电器股份有限公司 query and interaction method and device, computer device and storage medium
CN108959631A (en) * 2018-07-24 2018-12-07 北京百度网讯科技有限公司 Method and apparatus for query information
CN109446218A (en) * 2018-09-25 2019-03-08 中国平安人寿保险股份有限公司 SQL statement generation method, device and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
DATAWHALE: "一文了解Text-to-SQL", Retrieved from the Internet <URL:《blog.csdn.net/Datawhale/article/details/104035610?spm=1001.2014.3001.5506》> *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114048226A (en) * 2021-11-12 2022-02-15 国家电网有限公司大数据中心 Data query method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN111797637B (en) 2024-06-25

Similar Documents

Publication Publication Date Title
TWI746690B (en) Method, device and server for generating natural language question answer
CN107798123B (en) Knowledge base and establishing, modifying and intelligent question and answer methods, devices and equipment thereof
CN110164435A (en) Audio recognition method, device, equipment and computer readable storage medium
CN111553138B (en) Auxiliary writing method and device for standardizing content structure document
CN101167075A (en) Characteristic expression extracting device, method, and program
JP7093397B2 (en) Question answering robot generation method and equipment
US20190147100A1 (en) Method and apparatus for establishing intelligent question answering repository, and intelligent question answering method
CN113556484B (en) Video processing method, video processing device, electronic equipment and computer readable storage medium
CN109508448A (en) Short information method, medium, device are generated based on long article and calculate equipment
CN110427459A (en) Visualized generation method, system and the platform of speech recognition network
CN109524008A (en) Voice recognition method, device and equipment
CN115374146A (en) Method and system for editing dialogue service module according to relation data
CN111797637B (en) Interactive labeling method and device
CN109033082B (en) Learning training method and device of semantic model and computer readable storage medium
CN114297372A (en) Personalized note generation method and system
CN110321882A (en) Learning resource acquisition method and device, learning terminal and storage medium
US20210074265A1 (en) Voice skill creation method, electronic device and medium
CN117193738A (en) Application building method, device, equipment and storage medium
CN109542299B (en) Gold sentence display method for electronic book, electronic equipment and computer storage medium
CN110147358B (en) Construction method and construction system of automatic question-answering knowledge base
CN115757469A (en) Data generation method, electronic device and storage medium for text-to-SQL tasks
CN115756692A (en) Method for automatically combining and displaying pages based on style attributes and related equipment thereof
CN114745594A (en) Method and device for generating live playback video, electronic equipment and storage medium
CN114428788A (en) Natural language processing method, device, equipment and storage medium
JP7427405B2 (en) Idea support system and its control method

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 215123 building 14, Tengfei Innovation Park, 388 Xinping street, Suzhou Industrial Park, Suzhou City, Jiangsu Province

Applicant after: Sipic Technology Co.,Ltd.

Address before: 215123 building 14, Tengfei Innovation Park, 388 Xinping street, Suzhou Industrial Park, Suzhou City, Jiangsu Province

Applicant before: AI SPEECH Co.,Ltd.

GR01 Patent grant
GR01 Patent grant