CN111414103B - Method and device for generating instruction - Google Patents

Method and device for generating instruction Download PDF

Info

Publication number
CN111414103B
CN111414103B CN201910008235.8A CN201910008235A CN111414103B CN 111414103 B CN111414103 B CN 111414103B CN 201910008235 A CN201910008235 A CN 201910008235A CN 111414103 B CN111414103 B CN 111414103B
Authority
CN
China
Prior art keywords
instruction
template
historical
keyword
keywords
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
CN201910008235.8A
Other languages
Chinese (zh)
Other versions
CN111414103A (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.)
Baidu Online Network Technology Beijing Co Ltd
Original Assignee
Baidu Online Network Technology Beijing 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 Baidu Online Network Technology Beijing Co Ltd filed Critical Baidu Online Network Technology Beijing Co Ltd
Priority to CN201910008235.8A priority Critical patent/CN111414103B/en
Publication of CN111414103A publication Critical patent/CN111414103A/en
Application granted granted Critical
Publication of CN111414103B publication Critical patent/CN111414103B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the application discloses a method and a device for generating an instruction. One embodiment of the method comprises: in response to the detection of an instruction keyword, displaying an instruction prompt window corresponding to the instruction keyword, wherein the instruction prompt window is used for displaying at least one instruction template matched with the instruction keyword, and the instruction template comprises an information filling item for filling information; in response to detecting a selection signal of a target instruction template selected from the at least one instruction template, displaying a target instruction template corresponding to the selection signal at a position corresponding to the instruction keyword; and generating an instruction by the target instruction template and the filling information of the information filling item of the target instruction template in response to detecting an input confirmation signal corresponding to the information filling item of the target instruction template. According to the implementation method, the instruction prompt window can be displayed according to the instruction keywords, the difficulty in obtaining the instruction template is reduced, and the instruction generation efficiency is improved.

Description

Method and device for generating instruction
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a method and a device for generating instructions.
Background
With the rapid development of information technology, information service departments need to implement data services quickly and effectively, and the data services are generally expressed as various data processing applications. A technician needs to divide the data processing application into a plurality of project modules according to the functions to be implemented by the data processing application, and then specifically implement the functions of each project module. And finally, combining the project modules to form the application.
Disclosure of Invention
The embodiment of the application provides a method and a device for generating an instruction.
In a first aspect, an embodiment of the present application provides a method for generating an instruction, where the method includes: in response to the detection of an instruction keyword, displaying an instruction prompt window corresponding to the instruction keyword, wherein the instruction prompt window is used for displaying at least one instruction template matched with the instruction keyword, and the instruction template comprises an information filling item for filling information; in response to detecting a selection signal of a target instruction template selected from the at least one instruction template, displaying a target instruction template corresponding to the selection signal at a position corresponding to the instruction keyword; and generating an instruction by the target instruction template and the filling information of the information filling item of the target instruction template in response to detecting an input confirmation signal corresponding to the information filling item of the target instruction template.
In some embodiments, the displaying the instruction prompt window corresponding to the instruction keyword includes: inputting the instruction keywords into an instruction matching model to obtain at least one instruction template corresponding to the instruction keywords, wherein the instruction matching model is used for representing the corresponding relation between the instruction keywords and the instruction template, and the instruction template comprises the at least one instruction keyword including the instruction keywords; and acquiring the sequencing information of the instruction keywords in the at least one instruction template, and displaying the at least one instruction template through an instruction prompt window according to the sequencing information, wherein the sequencing information is used for representing the position sequence of the instruction keywords in the at least one instruction keyword contained in the at least one instruction template.
In some embodiments, the instruction matching model is trained by: acquiring historical instruction keywords in a historical instruction to obtain a historical instruction keyword set; for the historical instruction keywords in the historical instruction keyword set, querying at least one initial historical instruction keyword which has a matching relationship with the historical instruction keywords in the historical instruction to obtain at least one initial instruction template of the historical instruction keyword; and combining the initial instruction templates corresponding to the historical instruction keyword set to obtain an instruction matching model.
In some embodiments, the querying at least one initial historical instruction keyword in the historical instruction, which has a matching relationship with the historical instruction keyword, to obtain at least one initial instruction template of the historical instruction keyword includes: and for the initial historical instruction keyword in the at least one initial historical instruction keyword, if a reference instruction template formed by the historical instruction keyword and the initial historical instruction keyword exists, combining the historical instruction keyword and the initial historical instruction keyword to form an initial instruction template.
In some embodiments, the displaying the at least one instruction template through an instruction prompt window according to the sorting information includes: dividing the at least one instruction template into at least one instruction template set according to the ordering information, wherein the ordering information of the instruction keywords contained in the instruction templates in the same instruction template set is the same; and sequentially displaying the instruction templates in the at least one instruction template set in an instruction prompt window according to the sorting information.
In a second aspect, an embodiment of the present application provides an apparatus for generating an instruction, where the apparatus includes: an instruction prompt window display unit, responding to the detection of an instruction keyword, configured to display an instruction prompt window corresponding to the instruction keyword, wherein the instruction prompt window is used for displaying at least one instruction template matched with the instruction keyword, and the instruction template comprises an information filling item for filling information; an instruction template display unit configured to display a target instruction template corresponding to a selection signal in a position corresponding to the instruction keyword in response to detection of the selection signal of the target instruction template selected among the at least one instruction template; and an instruction generating unit configured to generate an instruction by the target instruction template and the filling information of the information filling item of the target instruction template in response to detecting an input confirmation signal corresponding to the information filling item of the target instruction template.
In some embodiments, the instruction prompt window display unit includes: the instruction template acquisition subunit is configured to input the instruction keywords into an instruction matching model to obtain at least one instruction template corresponding to the instruction keywords, wherein the instruction matching model is used for representing a corresponding relation between the instruction keywords and the instruction template, and the instruction template comprises at least one instruction keyword including the instruction keywords; and the instruction prompt window display subunit is configured to acquire the sorting information of the instruction keywords in the at least one instruction template, and display the at least one instruction template through the instruction prompt window according to the sorting information, wherein the sorting information is used for representing the position sequence of the instruction keywords in at least one instruction keyword contained in the instruction template in the at least one instruction template.
In some embodiments, the apparatus includes an instruction matching model training unit configured to train an instruction matching model, the instruction matching model training unit including: the historical instruction keyword set acquisition subunit is configured to acquire historical instruction keywords in a historical instruction to obtain a historical instruction keyword set; an initial instruction template obtaining subunit, configured to, for a historical instruction keyword in the historical instruction keyword set, query at least one initial historical instruction keyword in a historical instruction, which has a matching relationship with the historical instruction keyword, to obtain at least one initial instruction template of the historical instruction keyword; and the instruction matching model obtaining subunit is configured to combine the initial instruction templates corresponding to the historical instruction keyword set to obtain an instruction matching model.
In some embodiments, the initial instruction template obtaining subunit includes: and the initial instruction template acquisition module is used for combining the historical instruction keywords and the initial historical instruction keywords into an initial instruction template when the initial historical instruction keywords in the at least one initial historical instruction keyword are configured into a reference instruction template formed by the historical instruction keywords and the initial historical instruction keywords.
In some embodiments, the instruction prompt window display subunit includes: the instruction template set dividing module is configured to divide the at least one instruction template into at least one instruction template set according to the ordering information, wherein the ordering information of the instruction keywords contained in the instruction templates in the same instruction template set is the same; and the instruction prompt window display module is configured to sequentially display the instruction templates in the at least one instruction template set in the instruction prompt window according to the sorting information.
In a third aspect, an embodiment of the present application provides a server, including: one or more processors; a memory having one or more programs stored thereon, which when executed by the one or more processors, cause the one or more processors to perform the method for generating instructions of the first aspect.
In a fourth aspect, the present application provides a computer-readable medium, on which a computer program is stored, where the computer program is characterized in that when being executed by a processor, the computer program implements the method for generating instructions of the first aspect.
The method and the device for generating the instruction provided by the embodiment of the application display an instruction prompt window according to the detected instruction keyword, wherein the instruction prompt window is used for displaying at least one instruction template matched with the instruction keyword, and the instruction template comprises an information filling item for filling information; then, after a selection signal corresponding to the target instruction template is detected, displaying the target instruction template corresponding to the selection signal at a position corresponding to the instruction keyword; and finally, generating the instruction after detecting the input confirmation signal of the information filling item of the target instruction template. According to the technical scheme, the instruction prompt window can be displayed according to the instruction keywords, the difficulty in obtaining the instruction template is reduced, and the instruction generation efficiency is improved.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which one embodiment of the present application may be applied;
FIG. 2 is a flow diagram for one embodiment of a method for generating instructions according to the present application;
FIG. 3a is a schematic diagram of an application scenario of a method for generating instructions according to the present application;
fig. 3b is a schematic diagram corresponding to fig. 3a after filling information is input.
FIG. 4 is a flow diagram of one embodiment of a method for obtaining an instruction matching model according to the present application;
FIG. 5 is a block diagram illustrating one embodiment of an apparatus for generating instructions according to the present application;
FIG. 6 is a schematic block diagram of a computer system suitable for use in implementing a server according to embodiments of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 illustrates an exemplary system architecture 100 to which a method for generating an instruction or an apparatus for generating an instruction of embodiments of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have installed thereon various information processing applications such as an instruction editing application, an execution input application, an instruction classification query application, an instruction search tool, and the like.
The terminal apparatuses 101, 102, and 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices having a display screen and supporting instruction input, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like. When the terminal apparatuses 101, 102, 103 are software, they can be installed in the electronic apparatuses listed above. It may be implemented as a plurality of software or software modules (for example, for providing distributed services), or as a single software or software module, which is not specifically limited herein.
The server 105 may be a server that provides various services, such as a server that provides support for instruction keywords entered on the terminal apparatuses 101, 102, 103. The server may analyze and perform other processing on the received data such as the instruction keyword, and feed back a processing result (e.g., an instruction) to the terminal device.
It should be noted that the method for generating the instruction provided in the embodiment of the present application may be executed by the terminal devices 101, 102, and 103 individually, or may also be executed by the terminal devices 101, 102, and 103 and the server 105 together. Accordingly, the means for generating the instructions may be provided in the terminal devices 101, 102, 103, or in the server 105.
The server may be hardware or software. When the server is hardware, it may be implemented as a distributed server cluster formed by multiple servers, or may be implemented as a single server. When the server is software, it may be implemented as a plurality of software or software modules (for example, to provide distributed services), or may be implemented as a single software or software module, and is not limited specifically herein.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of a method for generating instructions in accordance with the present application is shown. The method for generating instructions comprises the following steps:
step 201, in response to detecting the instruction keyword, displaying an instruction prompt window corresponding to the instruction keyword.
In the present embodiment, an execution subject of the method for generating an instruction (e.g., the terminal apparatuses 101, 102, 103 and/or the server 105 shown in fig. 1) may receive an instruction keyword from a terminal with which a user inputs an instruction by a wired connection manner or a wireless connection manner. Wherein the instruction key is used to compose an instruction. The instruction may contain at least one instruction key and perform specified data processing based on the contained at least one instruction key. The instruction key may be different for different languages or instruction sets. For example, in SQL (Structured Query Language), the instruction key may be: select, from, where, etc. In Oracle, the instruction key may be: alter, set, control, files, etc. It should be noted that the wireless connection means may include, but is not limited to, a 3G/4G connection, a WiFi connection, a bluetooth connection, a WiMAX connection, a Zigbee connection, a uwb (ultra wideband) connection, and other wireless connection means now known or developed in the future.
In the prior art, in the process of completing a project module, a technician needs to frequently use a large number of instructions to realize corresponding functions. When the technical personnel realize data processing through the instruction, the technical personnel need to be skilled in mastering various instructions, the difficulty of obtaining the instruction by the technical personnel is improved, and the efficiency of obtaining the instruction is not high.
Therefore, when the execution main body of the application detects an instruction keyword input by a user, an instruction prompt window corresponding to the instruction keyword can be displayed. The instruction prompt window may include a plurality of instruction templates associated with the instruction keywords. Typically, the instruction template contains at least one instruction keyword and may also contain information fill-in items that require the user to fill in information. For example, the instruction template may be: "select from where __". Wherein "select", "from", "where" may be an instruction keyword; "__" can be an information filler. That is, the instruction prompt window may be configured to display at least one instruction template matching the instruction keyword, where the instruction template includes an information filler for filling information. For a specific instruction template, the instruction keywords, the number of the information padding items, and the positions of the padding items included in the instruction template may be different, and are not described in detail herein.
In some optional implementation manners of this embodiment, the displaying the instruction prompt window corresponding to the instruction keyword may include the following steps:
firstly, inputting the instruction keywords into an instruction matching model to obtain at least one instruction template corresponding to the instruction keywords.
The execution subject may obtain the instruction key after detecting the instruction key. Then, the execution subject may input the instruction keyword into the instruction matching model to obtain at least one instruction template corresponding to the instruction keyword. The instruction matching model may be configured to characterize a correspondence between an instruction keyword and an instruction template, where the instruction template may include at least one instruction keyword including the instruction keyword.
And secondly, obtaining the sequencing information of the instruction keywords in the at least one instruction template, and displaying the at least one instruction template through an instruction prompt window according to the sequencing information.
After at least one instruction template corresponding to the instruction keywords is obtained through the instruction matching model, the execution main body can inquire the instruction template to obtain the sequencing information of the instruction keywords in the at least one instruction template. The sorting information may be used to characterize a position order of the instruction keywords in at least one instruction keyword included in the instruction template of the at least one instruction template. That is, the instruction keyword has corresponding sorting information in each of the at least one instruction template. The sequencing information is used for representing the position information of the instruction keywords in each instruction template. Then, the execution subject may display at least one instruction template through the instruction prompt window according to the sorting information.
In some optional implementation manners of this embodiment, the displaying the at least one instruction template through an instruction prompt window according to the sorting information may include the following steps:
the first step, the at least one instruction template is divided into at least one instruction template set according to the sorting information.
The sorting information may be used to characterize the position order of the instruction keywords in the instruction keywords included in the instruction template. The execution subject may divide the at least one instruction template into at least one instruction template set according to the ordering information. For example, the instruction key acquired by the execution subject is ranked first in some instruction templates, and the execution subject may divide the instruction template with the instruction key ranked first into an instruction template set. Similarly, the execution subject may also obtain an instruction template set composed of instruction templates with the instruction key arranged at the second position, and the like. That is, the order information of the instruction keywords included in the instruction templates in the same instruction template set is the same.
And secondly, sequentially displaying the instruction templates in the at least one instruction template set in an instruction prompt window according to the sequencing information.
The sequencing information of the instruction keywords can represent the correlation size of the instruction keywords acquired by the execution main body in the corresponding instruction template, and the correlation can represent the possibility of selecting the instruction template by a user. To this end, the execution body may sequentially display instruction templates within the at least one instruction template set within the instruction hint window in accordance with the ordering information. For example, the execution agent may display an instruction template with an instruction keyword arranged first at the top of the instruction hint window; and displaying the instruction template with the instruction key arranged at the second position after the instruction template with the instruction key arranged at the first position, and so on.
Step 202, in response to detecting a selection signal of a target instruction template selected from the at least one instruction template, displaying a target instruction template corresponding to the selection signal at a position corresponding to the instruction keyword.
After the execution main body displays the instruction prompt window, the user can select a required instruction template from the instruction prompt window according to the requirement. When a user selects a certain target instruction template within the instruction prompt window, the execution subject may detect a selection signal corresponding to the target instruction template. The selection signal may be a mouse click signal or a touch signal corresponding to the target instruction template. After detecting the selection signal, the execution subject may display a target instruction template corresponding to the selection signal at a position corresponding to the instruction keyword. That is, the target instruction template is inserted into a position corresponding to the instruction keyword and displayed. For example, the user input information is: XXX, XXX A, the instruction key obtained by the execution subject is A. After the instruction prompt window is displayed, executing a target instruction template corresponding to the selection signal detected by the main body as follows: "A __ B __ C". The execution principal may replace instruction key a directly with "a __ B __ C". Namely, the user input information at this time is: XXX, XXX A __ B __ C. When the target instruction template corresponding to the selection signal detected by the execution subject is: "C __ B __ A", the executive agent inserts "C __ B __ A" into the user input information as follows: XXX, XXX C __ B __ A. That is, the execution subject may display the target instruction template at a corresponding position according to the sorting information of the instruction keyword in the target instruction template.
Step 203, responding to the detected input confirmation signal of the information filling item corresponding to the target instruction template, and generating an instruction by the target instruction template and the filling information of the information filling item of the target instruction template.
The instruction template comprises information filling items for filling information, and the information filling items are used for filling corresponding information by a user to form a complete executable instruction. When the execution body detects an input confirmation signal of the information filler of the target instruction template, it can be considered that the user has completed the information input of the information filler. At this time, the execution subject may generate an instruction through the target instruction template and the fill information of the information fill item, and perform corresponding data processing according to the instruction.
With continued reference to fig. 3, fig. 3 is a schematic diagram of an application scenario of the method for generating an instruction according to the present embodiment. In the application scenario of fig. 3, the user input information is: XXX, XXX A. After the terminal device 102 detects the instruction keyword a, a corresponding instruction prompt window is displayed. The instruction prompt window comprises an instruction template: a __ B __ C; a __ B __ D; a __ B __ E; a __ C __ D; a __ C __ E, and the like. Where A, B, C, D and E are instruction keys, as shown in FIG. 3 a. When the terminal device 102 detects a selection signal corresponding to the target instruction template, the target instruction template corresponding to the selection signal may be displayed at a corresponding position. Finally, after detecting the input confirmation signal, the command is generated by the target command template and the target information fill information (which may be, for example, X and Y), as shown in FIG. 3 b.
The method provided by the embodiment of the application firstly displays an instruction prompt window according to the detected instruction keywords, wherein the instruction prompt window is used for displaying at least one instruction template matched with the instruction keywords, and the instruction template comprises information filling items for filling information; then, after a selection signal corresponding to the target instruction template is detected, displaying the target instruction template corresponding to the selection signal at a position corresponding to the instruction keyword; and finally, generating the instruction after detecting the input confirmation signal of the information filling item of the target instruction template. According to the technical scheme, the instruction prompt window can be displayed according to the instruction keywords, the difficulty in obtaining the instruction template is reduced, and the instruction generation efficiency is improved.
With further reference to FIG. 4, a flow 400 of yet another embodiment of a method of retrieving an instruction matching model is illustrated. The process 400 of the instruction matching model obtaining method includes the following steps:
step 401, obtaining historical instruction keywords in the historical instruction to obtain a historical instruction keyword set.
In this embodiment, the instruction matching model obtaining method execution subject (for example, the server 105 shown in fig. 1) may obtain the historical instruction by a wired connection manner or a wireless connection manner. The history instruction may be a history instruction of a language, a history instruction of an application, a history instruction of a department that implements the application specifying module, or the like. According to actual needs, the instruction matching model can also be constructed by other types of historical instructions according to the actual needs.
To obtain an instruction matching model, the execution subject may obtain historical instructions. Here, the history instruction may be a history instruction of a language, a history instruction of an application, a history instruction of a department that implements an application specifying module, or the like. According to actual needs, the instruction matching model can also be constructed by other types of historical instructions according to the actual needs.
After the history instruction is obtained, the execution main body can extract information of the history instruction to obtain a history instruction keyword in the history instruction, and further obtain a history instruction keyword set corresponding to the history instruction. The set of historical instruction keys may contain instruction keys that are commonly used in historical instructions.
Step 402, for the historical instruction keywords in the historical instruction keyword set, at least one initial historical instruction keyword in the historical instruction, which has a matching relationship with the historical instruction keywords, is queried to obtain at least one initial instruction template of the historical instruction keywords.
The instruction key within the instruction template is typically different from the content of other non-instructions. After obtaining the historical instruction keyword set, the execution main body can query at least one initial historical instruction keyword which has a matching relationship with the historical instruction keyword in a plurality of ways to obtain at least one initial instruction template of the historical instruction keyword. For example, the execution subject may extract an initial historical instruction keyword having a matching relationship with the historical instruction keyword and other relationships with the historical instruction keyword from the historical instruction in which the historical instruction keyword is located; the execution subject may also determine an initial historical instruction key based on the data processing results of the historical instruction. The matching relationship may be a combination relationship among a plurality of instruction keywords, including the instruction keywords, the number of the instruction keywords, and a position relationship among the instruction keywords.
And 403, merging the initial instruction templates corresponding to the historical instruction keyword set to obtain an instruction matching model.
In the above process, the execution subject may query at least one initial instruction template corresponding to each historical instruction keyword, and this way may obtain the same initial instruction template. For example, the historical instruction key set includes a historical instruction key a and a historical instruction key B. When the execution main body queries the initial historical instruction keyword according to the historical instruction keyword A, an initial instruction template can be obtained: "A __ B __ C"; when the execution main body queries the initial historical instruction keyword according to the historical instruction keyword B, an initial instruction template can be obtained: "A __ B __ C", so a repeat of the original instruction template occurs. Therefore, the execution subject can merge the obtained initial instruction templates, and the merged initial instruction template becomes an instruction matching model.
In some optional implementation manners of this embodiment, the querying at least one initial historical instruction keyword in the historical instruction, which has a matching relationship with the historical instruction keyword, to obtain at least one initial instruction template of the historical instruction keyword may include: and for the initial historical instruction keyword in the at least one initial historical instruction keyword, if a reference instruction template formed by the historical instruction keyword and the initial historical instruction keyword exists, combining the historical instruction keyword and the initial historical instruction keyword to form an initial instruction template.
In determining the initial instruction template, the execution subject may first obtain a reference instruction template. Wherein the reference instruction template may be an actual instruction template including the historical instruction key. Meanwhile, the instruction keywords in the reference instruction template also have the position sequence, and whether the historical instruction keywords and the initial historical instruction keywords can form the instruction template can be determined according to the sequence. If the reference instruction template formed by the historical instruction key and the initial historical instruction key exists, the historical instruction key and the initial historical instruction key can be combined into the actual instruction template. The execution body may combine the historical instruction key with the initial historical instruction key into an initial instruction template.
With further reference to fig. 5, as an implementation of the method shown in the above figures, the present application provides an embodiment of an apparatus for generating an instruction, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be applied to various electronic devices.
As shown in fig. 5, the apparatus 500 for generating an instruction of the present embodiment may include: an instruction presentation window display unit 501, an instruction template display unit 502, and an instruction generation unit 503. The instruction prompt window display unit 501, in response to detecting an instruction keyword, is configured to display an instruction prompt window corresponding to the instruction keyword, where the instruction prompt window is used to display at least one instruction template matching the instruction keyword, and the instruction template includes an information filling item for filling information; an instruction template display unit 502 configured to display a target instruction template corresponding to a selection signal in a position corresponding to the instruction keyword in response to detection of the selection signal of the target instruction template selected among the at least one instruction template; the instruction generating unit 503 is configured to generate an instruction by the target instruction template and the filling information of the information filling item of the target instruction template in response to detecting the input confirmation signal corresponding to the information filling item of the target instruction template.
In some optional implementations of this embodiment, the instruction prompt window display unit 501 may include: an instruction template acquisition subunit (not shown in the figure) and an instruction prompt window display subunit (not shown in the figure). The instruction template obtaining subunit is configured to input the instruction keywords into an instruction matching model, so as to obtain at least one instruction template corresponding to the instruction keywords, where the instruction matching model is used to represent a corresponding relationship between the instruction keywords and the instruction template, and the instruction template includes at least one instruction keyword including the instruction keywords; the instruction prompt window display subunit is configured to acquire ordering information of the instruction keywords in the at least one instruction template, and display the at least one instruction template through an instruction prompt window according to the ordering information, where the ordering information is used to represent a position order of the instruction keywords in at least one instruction keyword included in the instruction template in the at least one instruction template.
In some optional implementations of the present embodiment, the apparatus 500 for generating an instruction further comprises an instruction matching model training unit (not shown in the figure) configured to train the instruction matching model. The instruction matching model training unit may include: a history instruction keyword set obtaining subunit (not shown in the figure), an initial instruction template obtaining subunit (not shown in the figure), and an instruction matching model obtaining subunit (not shown in the figure). The historical instruction keyword set acquisition subunit is configured to acquire historical instruction keywords in a historical instruction to obtain a historical instruction keyword set; an initial instruction template obtaining subunit, configured to, for a historical instruction keyword in the historical instruction keyword set, query at least one initial historical instruction keyword in a historical instruction, which has a matching relationship with the historical instruction keyword, to obtain at least one initial instruction template of the historical instruction keyword; and the instruction matching model acquisition subunit is configured to combine the initial instruction templates corresponding to the historical instruction keyword set to obtain an instruction matching model.
In some optional implementation manners of this embodiment, the initial instruction template obtaining subunit may include: and an initial instruction template obtaining module (not shown in the figure), configured to, when a reference instruction template formed by the historical instruction keyword and the initial historical instruction keyword exists for an initial historical instruction keyword in the at least one initial historical instruction keyword, combine the historical instruction keyword and the initial historical instruction keyword into an initial instruction template.
In some optional implementation manners of this embodiment, the instruction prompt window displaying subunit may include: an instruction template set dividing module (not shown in the figure) and an instruction prompt window display module (not shown in the figure). The instruction template set dividing module is configured to divide the at least one instruction template into at least one instruction template set according to the ordering information, wherein the ordering information of the instruction keywords contained in the instruction templates in the same instruction template set is the same; and the instruction prompt window display module is configured to sequentially display the instruction templates in the at least one instruction template set in the instruction prompt window according to the sorting information.
The present embodiment further provides a server, including: one or more processors; a memory having one or more programs stored thereon, which when executed by the one or more processors, cause the one or more processors to perform the above-described method for generating instructions.
The present embodiment also provides a computer-readable medium, on which a computer program is stored, which program, when being executed by a processor, carries out the above-mentioned method for generating instructions.
Referring now to FIG. 6, a block diagram of a computer system 600 suitable for use in implementing a server (e.g., server 105 of FIG. 1) of an embodiment of the present application is shown. The server shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the method of the present application when executed by a Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium mentioned above in the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes an instruction prompt window display unit, an instruction template display unit, and an instruction generation unit. Where the names of these units do not in some cases constitute a limitation of the unit itself, for example, the instruction generating unit may also be described as a "unit for generating an instruction by an instruction template and padding information".
As another aspect, the present application also provides a computer-readable medium, which may be contained in the apparatus described in the above embodiments; or may be present separately and not assembled into the device. The computer readable medium carries one or more programs which, when executed by the apparatus, cause the apparatus to: in response to the detection of an instruction keyword, displaying an instruction prompt window corresponding to the instruction keyword, wherein the instruction prompt window is used for displaying at least one instruction template matched with the instruction keyword, and the instruction template comprises an information filling item for filling information; in response to detecting a selection signal of a target instruction template selected from the at least one instruction template, displaying a target instruction template corresponding to the selection signal at a position corresponding to the instruction keyword; and generating an instruction by the target instruction template and the filling information of the information filling item of the target instruction template in response to detecting an input confirmation signal corresponding to the information filling item of the target instruction template.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (10)

1. A method for generating instructions, comprising:
in response to detecting an instruction keyword, displaying an instruction prompt window corresponding to the instruction keyword, including: inputting the instruction keywords into an instruction matching model to obtain at least one instruction template corresponding to the instruction keywords, obtaining the sequencing information of the instruction keywords in the at least one instruction template, and displays the at least one instruction template through an instruction prompt window according to the sorting information, wherein the instruction prompt window is used for displaying at least one instruction template matched with the instruction keyword, the instruction matching model is used for representing the corresponding relation between instruction keywords and an instruction template, the instruction template comprises information filling items used for filling information and at least one instruction keyword including the instruction keywords, the sequencing information is used for representing the position sequence of the instruction keywords in at least one instruction keyword contained in an instruction template in the at least one instruction template;
in response to detecting a selection signal of a target instruction template selected from the at least one instruction template, displaying a target instruction template corresponding to the selection signal at a position corresponding to the instruction keyword;
in response to detecting an input confirmation signal corresponding to an information fill item of the target instruction template, generating an instruction by the target instruction template and fill information of the information fill item of the target instruction template.
2. The method of claim 1, wherein the instruction matching model is trained by:
acquiring historical instruction keywords in a historical instruction to obtain a historical instruction keyword set;
for the historical instruction keywords in the historical instruction keyword set, querying at least one initial historical instruction keyword which has a matching relationship with the historical instruction keywords in the historical instruction to obtain at least one initial instruction template of the historical instruction keywords;
and merging the initial instruction templates corresponding to the historical instruction keyword set to obtain an instruction matching model.
3. The method of claim 2, wherein querying at least one initial historical instruction keyword in the historical instruction, which has a matching relationship with the historical instruction keyword, to obtain at least one initial instruction template of the historical instruction keyword comprises:
and for an initial historical instruction keyword in the at least one initial historical instruction keyword, if a reference instruction template formed by the historical instruction keyword and the initial historical instruction keyword exists, combining the historical instruction keyword and the initial historical instruction keyword to form an initial instruction template.
4. The method of claim 1, wherein said displaying the at least one instruction template through an instruction prompt window according to the ordering information comprises:
dividing the at least one instruction template into at least one instruction template set according to the ordering information, wherein the ordering information of the instruction keywords contained in the instruction templates in the same instruction template set is the same;
and sequentially displaying the instruction templates in the at least one instruction template set in an instruction prompt window according to the sorting information.
5. An apparatus for generating instructions, comprising:
an instruction prompt window display unit configured to display an instruction prompt window corresponding to an instruction keyword in response to detection of the instruction keyword, including: inputting the instruction keywords into an instruction matching model to obtain at least one instruction template corresponding to the instruction keywords, obtaining the sequencing information of the instruction keywords in the at least one instruction template, and displays the at least one instruction template through an instruction prompt window according to the sorting information, wherein the instruction prompt window is used for displaying at least one instruction template matched with the instruction keyword, the instruction matching model is used for representing the corresponding relation between instruction keywords and an instruction template, the instruction template comprises information filling items used for filling information and at least one instruction keyword including the instruction keywords, the sequencing information is used for representing the position sequence of the instruction keywords in at least one instruction keyword contained in an instruction template in the at least one instruction template;
an instruction template display unit configured to display a target instruction template corresponding to a selection signal in a position corresponding to the instruction keyword in response to detecting the selection signal of the target instruction template selected among the at least one instruction template;
an instruction generating unit, in response to detecting an input confirmation signal corresponding to an information fill item of the target instruction template, configured to generate an instruction by the target instruction template and fill information of the information fill item of the target instruction template.
6. The apparatus of claim 5, wherein the apparatus comprises an instruction matching model training unit configured to train an instruction matching model, the instruction matching model training unit comprising:
the historical instruction keyword set acquisition subunit is configured to acquire historical instruction keywords in a historical instruction to obtain a historical instruction keyword set;
the initial instruction template acquisition subunit is configured to query at least one initial historical instruction keyword in a historical instruction, which has a matching relationship with the historical instruction keyword, to obtain at least one initial instruction template of the historical instruction keyword;
and the instruction matching model obtaining subunit is configured to combine the initial instruction templates corresponding to the historical instruction keyword set to obtain an instruction matching model.
7. The apparatus of claim 6, wherein the initial instruction template fetch subunit comprises:
and the initial instruction template acquisition module is used for combining the historical instruction keywords and the initial historical instruction keywords into an initial instruction template when the initial historical instruction keywords in the at least one initial historical instruction keyword are configured into a reference instruction template formed by the historical instruction keywords and the initial historical instruction keywords.
8. The apparatus of claim 5, wherein the instruction prompt window display subunit comprises:
the instruction template set dividing module is configured to divide the at least one instruction template into at least one instruction template set according to the ordering information, wherein the ordering information of the instruction keywords contained in the instruction templates in the same instruction template set is the same;
and the instruction prompt window display module is configured to sequentially display the instruction templates in the at least one instruction template set in the instruction prompt window according to the sorting information.
9. A server, comprising:
one or more processors;
a memory having one or more programs stored thereon,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-4.
10. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 4.
CN201910008235.8A 2019-01-04 2019-01-04 Method and device for generating instruction Active CN111414103B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910008235.8A CN111414103B (en) 2019-01-04 2019-01-04 Method and device for generating instruction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910008235.8A CN111414103B (en) 2019-01-04 2019-01-04 Method and device for generating instruction

Publications (2)

Publication Number Publication Date
CN111414103A CN111414103A (en) 2020-07-14
CN111414103B true CN111414103B (en) 2021-11-16

Family

ID=71490651

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910008235.8A Active CN111414103B (en) 2019-01-04 2019-01-04 Method and device for generating instruction

Country Status (1)

Country Link
CN (1) CN111414103B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102103572A (en) * 2009-12-18 2011-06-22 北大方正集团有限公司 Method and system for inputting formula template through formula input method
CN102307263A (en) * 2011-09-16 2012-01-04 汉王科技股份有限公司 Mobile terminal device mail box address input method and mobile terminal device
CN102541928A (en) * 2010-12-30 2012-07-04 腾讯科技(深圳)有限公司 Method and device for searching contents of terminal application program
CN103154930A (en) * 2010-07-30 2013-06-12 库比克设计工作室有限责任公司 Fill in the blanks word completion system
CN103902535A (en) * 2012-12-24 2014-07-02 腾讯科技(深圳)有限公司 Method, device and system for obtaining associational word
CN104699370A (en) * 2015-03-11 2015-06-10 酷派软件技术(深圳)有限公司 Input method and terminal
CN107608532A (en) * 2016-07-11 2018-01-19 北京搜狗科技发展有限公司 A kind of association-feeding method, device and electronic equipment
CN108108194A (en) * 2016-11-24 2018-06-01 腾讯科技(深圳)有限公司 User interface edit methods and user interface editing machine
CN108959256A (en) * 2018-06-29 2018-12-07 北京百度网讯科技有限公司 Generation method, device, storage medium and the terminal device of short text

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102103572A (en) * 2009-12-18 2011-06-22 北大方正集团有限公司 Method and system for inputting formula template through formula input method
CN103154930A (en) * 2010-07-30 2013-06-12 库比克设计工作室有限责任公司 Fill in the blanks word completion system
CN102541928A (en) * 2010-12-30 2012-07-04 腾讯科技(深圳)有限公司 Method and device for searching contents of terminal application program
CN102307263A (en) * 2011-09-16 2012-01-04 汉王科技股份有限公司 Mobile terminal device mail box address input method and mobile terminal device
CN103902535A (en) * 2012-12-24 2014-07-02 腾讯科技(深圳)有限公司 Method, device and system for obtaining associational word
CN104699370A (en) * 2015-03-11 2015-06-10 酷派软件技术(深圳)有限公司 Input method and terminal
CN107608532A (en) * 2016-07-11 2018-01-19 北京搜狗科技发展有限公司 A kind of association-feeding method, device and electronic equipment
CN108108194A (en) * 2016-11-24 2018-06-01 腾讯科技(深圳)有限公司 User interface edit methods and user interface editing machine
CN108959256A (en) * 2018-06-29 2018-12-07 北京百度网讯科技有限公司 Generation method, device, storage medium and the terminal device of short text

Also Published As

Publication number Publication date
CN111414103A (en) 2020-07-14

Similar Documents

Publication Publication Date Title
CN109992589B (en) Method, device, server and medium for generating SQL (structured query language) statements based on visual page
US11514226B2 (en) Systems and methods for the comparison of selected text
CN109241141B (en) Deep learning training data processing method and device
CN109325213B (en) Method and device for labeling data
KR102573518B1 (en) Information processing method and device, electronic device, computer-readable medium and computer program stored in medium
CN109359194B (en) Method and apparatus for predicting information categories
CN110263186A (en) For identification, select and present items of media content purpose method and system
CN109840192B (en) Method and device for automatic testing
CN111045653B (en) System generation method and device, computer readable medium and electronic equipment
CN110674117A (en) Data modeling method and device, computer readable medium and electronic equipment
CN110737824B (en) Content query method and device
CN116594683A (en) Code annotation information generation method, device, equipment and storage medium
CN109409419B (en) Method and apparatus for processing data
CN109783498A (en) Data processing method and device, electronic equipment, storage medium
CN111414103B (en) Method and device for generating instruction
CN113010582A (en) Data processing method and device, computer readable medium and electronic equipment
US20220164377A1 (en) Method and apparatus for distributing content across platforms, device and storage medium
CN114035729B (en) Electronic voting method and device and terminal equipment
CN109857838B (en) Method and apparatus for generating information
CN110881056A (en) Method and device for pushing information
CN115168778A (en) Website page generation method and system, electronic equipment and readable storage medium
US11741055B2 (en) Managing file revisions from multiple reviewers
CN110413165B (en) Icon configuration method and device, electronic equipment and computer readable medium
CN110888583B (en) Page display method, system and device and electronic equipment
CN109584012B (en) Method and device for generating item push information

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant