CN111191431A - Method and system for generating report according to natural language instruction - Google Patents

Method and system for generating report according to natural language instruction Download PDF

Info

Publication number
CN111191431A
CN111191431A CN201811268946.0A CN201811268946A CN111191431A CN 111191431 A CN111191431 A CN 111191431A CN 201811268946 A CN201811268946 A CN 201811268946A CN 111191431 A CN111191431 A CN 111191431A
Authority
CN
China
Prior art keywords
natural language
language instruction
preset
mapping rule
aiml
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811268946.0A
Other languages
Chinese (zh)
Inventor
熊云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201811268946.0A priority Critical patent/CN111191431A/en
Publication of CN111191431A publication Critical patent/CN111191431A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/22Procedures used during a speech recognition process, e.g. man-machine dialogue
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/22Procedures used during a speech recognition process, e.g. man-machine dialogue
    • G10L2015/223Execution procedure of a spoken command

Abstract

The invention discloses a method and a system for generating a report according to a natural language instruction, wherein the method comprises the steps of receiving the natural language instruction input by a user, wherein the natural language instruction is used for indicating the generation of the report; converting the natural language instruction into an executable machine language instruction according to a preset AIML mapping rule; and executing the machine language instruction to generate a report. The user can generate the report form only by issuing a simple natural language instruction without mastering the requirement of a complex machine language command sentence pattern, so that the method is convenient and quick, and the learning cost and the use cost of the user are saved.

Description

Method and system for generating report according to natural language instruction
[ technical field ] A method for producing a semiconductor device
The invention relates to a computer application technology, in particular to a method and a system for generating a report according to a natural language instruction.
[ background of the invention ]
With the development of computer technology and terminal technology, terminal equipment can obtain various service supports, such as services of voice, man-machine interaction, audio and video, data processing and the like. Among them, automatic open-field dialog systems, such as conversational UI, have become a research focus.
However, in these scenarios, only the recognition and execution of a simple instruction such as "open XX software" is implemented; more complex functions are involved, for example, report forms are generated according to requirements, and users are often required to input instructions strictly according to sentence pattern requirements, and users are required to learn the sentence pattern requirements in advance and input machine language commands automatically according to the sentence pattern requirements, so that the operation is complicated. A convenient and fast report generation method is lacked.
[ summary of the invention ]
Aspects of the present application provide a method, system, device and storage medium for generating a report based on a natural language instruction, which can generate a report according to a natural language instruction input by a user conveniently and quickly.
In one aspect of the present invention, a method for generating a report according to a natural language instruction is provided, including:
receiving a natural language instruction input by a user, wherein the natural language instruction is used for indicating to generate a report;
converting the natural language instruction into a machine language instruction according to a preset AIML mapping rule;
and executing the machine language instruction to generate a report.
The above-described aspects and any possible implementation further provide an implementation in which a natural language instruction input by a user is received, including:
and receiving voice data input by a user, and performing text conversion on the voice data to obtain a corresponding natural language instruction.
The foregoing aspect and any possible implementation manner further provide an implementation manner, where converting the natural language instruction into a machine language instruction according to a preset AIML mapping rule includes:
preprocessing the natural language instruction, and determining an AIML mapping rule corresponding to the natural language instruction from preset AIML mapping rules;
and searching a template for processing the natural language instruction from the corresponding AIML mapping rule to obtain a corresponding processing response.
The above aspect and any possible implementation further provide an implementation, where the preprocessing the natural language instruction includes:
and performing semantic recognition on the natural language instruction, and converting the sentence pattern of the natural language instruction into the sentence pattern supported by the preset AIML mapping rule.
The foregoing aspect and any possible implementation manner further provide an implementation manner, where determining an AIML mapping rule corresponding to the natural language instruction from preset AIML mapping rules includes:
and determining the AIML mapping rule corresponding to the natural language instruction from preset AIML mapping rules according to the converted sentence pattern.
The above-described aspects and any possible implementations further provide an implementation in which the processing response is a machine language instruction.
The above-described aspects and any possible implementations further provide an implementation in which executing the machine language instructions includes:
extracting a corresponding execution text from the processing response;
and calling an execution program to execute the execution text.
In another aspect of the present invention, a system for generating a report based on natural language instructions is provided, which includes:
the receiving module is used for receiving a natural language instruction input by a user, and the natural language instruction is used for indicating to generate a report;
the conversion module is used for converting the natural language instruction into a machine language instruction according to a preset AIML mapping rule;
and the execution module is used for executing the machine language instruction and generating a report.
The above-described aspect and any possible implementation further provide an implementation, where the receiving module is specifically configured to:
and receiving voice data input by a user, and performing text conversion on the voice data to obtain a corresponding natural language instruction.
The above-described aspects and any possible implementations further provide an implementation, where the conversion module includes:
the preprocessing submodule is used for preprocessing the natural language instruction and determining an AIML mapping rule corresponding to the natural language instruction from preset AIML mapping rules;
and the processing submodule is used for searching a template for processing the natural language instruction from the corresponding AIML mapping rule to obtain a corresponding processing response.
The above-mentioned aspect and any possible implementation further provide an implementation, where the preprocessing sub-module is specifically configured to:
and performing semantic recognition on the natural language instruction, and converting the sentence pattern of the natural language instruction into the sentence pattern supported by the preset AIML mapping rule.
The above-mentioned aspect and any possible implementation manner further provide an implementation manner, where the preprocessing sub-module is specifically further configured to:
and determining the AIML mapping rule corresponding to the natural language instruction from preset AIML mapping rules according to the converted sentence pattern.
The above-described aspects and any possible implementations further provide an implementation in which the processing response is a machine language instruction.
The above-described aspect and any possible implementation further provide an implementation, where the execution module includes:
the analysis submodule is used for extracting a corresponding execution text from the processing response;
and the execution submodule is used for calling the execution program to execute the execution text.
In another aspect of the present invention, a computer device is provided, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method as described above when executing the program.
In another aspect of the invention, a computer-readable storage medium is provided, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the method as set forth above.
Based on the introduction, the scheme of the invention can conveniently and quickly execute the natural language instruction input by the user to generate the report.
[ description of the drawings ]
FIG. 1 is a flow diagram of a method for generating reports from natural language instructions in accordance with some embodiments of the present invention;
FIG. 2 is a block diagram of a system for generating reports from natural language instructions in accordance with some embodiments of the present invention;
fig. 3 illustrates a block diagram of an exemplary computer system/server 012 suitable for use in implementing embodiments of the invention.
[ detailed description ] embodiments
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. 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 application.
Fig. 1 is a flowchart of generating a report according to a natural language instruction, as shown in fig. 1, including the following steps:
step S11, receiving a natural language instruction input by a user, wherein the natural language instruction is used for indicating generation of a report;
step S12, converting the natural language instruction into an executable machine language instruction according to a preset AIML mapping rule;
and step S13, executing the machine language instruction to generate a report.
The main execution body of the method is database management software installed on the terminal equipment, and can also be system software associated with the database software.
In one preferred implementation of step S11,
receiving a natural language instruction input by a user through an interactive interface, wherein the natural language instruction is used for indicating to generate a report;
preferably, the interactive interface is provided by software installed on the terminal device.
Preferably, the interactive interface is a text input window on a software interface, or a voice recognition button. The interactive interface interacts with people through various input and output devices of the terminal equipment, such as a keyboard, a microphone and a display.
The natural language refers to a language naturally evolving with culture, and languages for daily communication such as english, chinese, japanese, and the like are all natural languages. The user can input natural language on the terminal equipment in a text mode, a voice mode and the like.
For example, natural language text data input by a user through a text input window is directly acquired as a natural language instruction, and for example, voice recognition is performed based on receiving voice data input by the user through clicking a voice recognition button to start a microphone, and the acquired text data is used as a natural language instruction. The natural language instruction is a natural language expression recorded using a character string.
For example, the user inputs a natural language instruction of "displaying a relationship between sales and monthly".
In one preferred implementation of step S12,
and converting the natural language instruction into an executable machine language instruction according to a preset AIML mapping rule. The preset AIML mapping rules define mapping rules from natural language to feature generation. Wherein the preset AIML mapping rule is input and stored by a developer through a training program module.
AIML, full name Artificial Intelligent Markup Language (Artificial Intelligence Markup Language), is an XML Language that creates natural Language software agents for pattern matching rules for conversational robot conversations.
Taking the obtained natural language instruction as 'the relation between the display sales volume and the monthly degree' as an example, converting the natural language instruction into an executable machine language instruction according to a preset AIML mapping rule, and comprising the following substeps:
and a substep S121 of preprocessing the natural language instruction and determining an AIML mapping rule corresponding to the natural language instruction from preset AIML mapping rules.
Preferably, keyword information of the natural language instruction is extracted. Segmenting the sentences of the natural language information to obtain each piece of segmented information, then determining the part of speech and the like of words in the segmented information to further obtain semantic information of the natural language instruction, and then extracting keywords from the natural language instruction. And if the natural language instruction is subjected to semantic recognition through the natural language processing model, semantic information is obtained, and then keywords are extracted from the natural language instruction.
Preferably, matching is performed on the extracted keywords and a preset sentence pattern, and sentence pattern information of the natural language instruction is extracted.
Preferably, according to the sentence pattern information, the AIML mapping rule corresponding to the natural language instruction is determined from preset AIML mapping rules.
For example, the acquired natural language instruction is "show the relationship between sales and monthly", from which the sentence information is extracted as follows: "show the relationship between and".
And if the AIML mapping rule corresponding to the natural language instruction is not determined, outputting prompt information, such as 'unsupported natural language instruction', through the interactive interface.
In a preferred embodiment of the present application, from the perspective of natural language, not everyone is used to the sentence supported by the basic definition of the AIML mapping rule "display and relation. Therefore, the natural language instruction needs to be preprocessed first, and natural language instructions of other sentence patterns are converted into sentence patterns supported by the basic definition of the preset AIML mapping rule; and determining the AIML mapping rule corresponding to the natural language instruction from preset AIML mapping rules according to the sentence pattern.
For example, for a sentence "and what is connected", the conversion method is as follows:
Figure BDA0001845548980000071
for example, "what connection is made between sales volume and monthly" is converted into "displaying the relationship between sales volume and monthly".
For a sentence in which the "influence on the" is not large ", the order of the independent variables and the dependent variables in the sentence is opposite to the order of the independent variables and the dependent variables in the" relation of displaying the "and" the conversion method is as follows:
Figure BDA0001845548980000072
for example, "what connection is made between monthly degrees and sales amount" is converted into "displaying the relationship between sales amount and monthly degrees".
If the natural language instruction of other sentence patterns cannot be converted into the sentence pattern supported by the basic definition of the preset AIML mapping rule, prompt information, such as 'unsupported natural language instruction sentence pattern', is output through the interactive interface.
And a substep S122 of searching a template for processing the natural language instruction from the corresponding AIML mapping rule to obtain a corresponding processing response.
Preferably, the natural language instruction is preprocessed to obtain a corresponding preset AIML mapping rule, and a template for processing the natural language instruction is searched from the preset AIML mapping rule to obtain a corresponding processing response.
For example, the basic definition of the preset AIML mapping rule of "display and relation" is as follows:
Figure BDA0001845548980000081
wherein the content of the first and second substances,
category section is used to identify a piece of knowledge;
the pattern segment is used for expressing a generation rule; the first one indicates a dependent variable and the second one designates an independent variable;
a template segment for identifying a response template for knowledge; the template field specifies the way in which the rule is generated. Because the response to the input will be in response to the parser module, although AIML is employed, the template segment is generally described as a language recognizable to the parser.
For example, the natural language instruction is "a relationship between a sales volume and a monthly degree", and the corresponding template is "trends (< star index ═ 1"/>, < star index ═ 2 "/>"), and a final processing response "trends (sales volume, monthly degree)" is obtained.
Wherein the processing response is a machine language instruction.
Preferably, if the preset AIML mapping rule corresponding to the natural language instruction is not queried, a prompt message, such as "no corresponding template information", is output through the interactive interface.
Step S123, sending the obtained corresponding processing response to the interpreter module.
Sending the obtained corresponding processing response to an interpreter module so that the interpreter module extracts a corresponding execution text from the corresponding processing response according to the AIML definition, namely extracting the corresponding execution text from the processing response; and the executive program module calls the executive program to execute the executive text.
In one preferred implementation of step S13,
the analysis program module extracts a corresponding execution text according to the AIML definition, namely extracts the corresponding execution text from the processing response; and the executive program module calls the executive program to execute the executive text.
Where trends is a function registered as the name, and the value in parentheses is passed to the function as a parameter. The function is called by the executive module.
For example, in response to "tresnds (sales volume, month)", the program analysis module calls the tresnds function to execute the function, and displays a sales volume month change trend table.
Preferably, the sales monthly change trend table is displayed through the interactive interface.
Through this embodiment, the user only needs to operate the software through assigning simple natural language instruction, need not to master complicated machine language command sentence pattern requirement, and convenient and fast has practiced thrift user's learning cost and use cost.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
The above is a description of method embodiments, and the embodiments of the present invention are further described below by way of apparatus embodiments.
Fig. 2 is a structural diagram of a system for generating a report according to a natural language according to the present invention, as shown in fig. 2, including:
the receiving module 21 is configured to receive a natural language instruction input by a user, where the natural language instruction is used to instruct generation of a report;
a conversion module 22, configured to convert the natural language instruction into an executable machine language instruction according to a preset AIML mapping rule;
and the execution module 23 is configured to execute the machine language instruction and generate a report.
The system is database management software installed on the terminal equipment, and can also be system software associated with the database software.
In a preferred implementation of the receiving module 21,
receiving a natural language instruction input by a user through an interactive interface;
preferably, the interactive interface is provided by software installed on the terminal device.
Preferably, the interactive interface is a text input window on a software interface, or a voice recognition button. The interactive interface interacts with people through various input and output devices of the terminal equipment, such as a keyboard, a microphone and a display.
The natural language refers to a language naturally evolving with culture, and languages for daily communication such as english, chinese, japanese, and the like are all natural languages. The user can input natural language on the terminal equipment in a text mode, a voice mode and the like.
For example, natural language text data input by a user through a text input window is directly acquired as a natural language instruction, and for example, voice recognition is performed based on receiving voice data input by the user through clicking a voice recognition button to start a microphone, and the acquired text data is used as a natural language instruction. The natural language instruction is a natural language expression recorded using a character string.
For example, the user inputs a natural language instruction of "displaying a relationship between sales and monthly".
In a preferred implementation of the conversion module 22,
and converting the natural language instruction into an executable machine language instruction according to a preset AIML mapping rule. The preset AIML mapping rules define mapping rules from natural language to feature generation. Wherein the preset AIML mapping rule is input and stored by a developer through a training program module.
AIML, full name Artificial Intelligent Markup Language (Artificial Intelligence Markup Language), is an XML Language that creates natural Language software agents for pattern matching rules for conversational robot conversations.
Taking the obtained natural language instruction as an example of 'naming the person with age greater than 20 in the staff table as an adult', converting the natural language instruction into an executable machine language instruction according to a preset AIML mapping rule, and comprising the following sub-modules:
and the preprocessing submodule is used for preprocessing the natural language instruction and determining the AIML mapping rule corresponding to the natural language instruction from preset AIML mapping rules.
Preferably, keyword information of the natural language instruction is extracted. Segmenting the sentences of the natural language information to obtain each piece of segmented information, then determining the part of speech and the like of words in the segmented information to further obtain semantic information of the natural language instruction, and then extracting keywords from the natural language instruction. And if the natural language instruction is subjected to semantic recognition through the natural language processing model, semantic information is obtained, and then keywords are extracted from the natural language instruction.
Preferably, matching is performed on the extracted keywords and a preset sentence pattern, and sentence pattern information of the natural language instruction is extracted.
Preferably, according to the sentence pattern information, the AIML mapping rule corresponding to the natural language instruction is determined from preset AIML mapping rules.
For example, the acquired natural language instruction is "show the relationship between sales and monthly", from which the sentence information is extracted as follows: "show the relationship between and".
And if the AIML mapping rule corresponding to the natural language instruction is not determined, outputting prompt information, such as 'unsupported natural language instruction', through the interactive interface.
In a preferred embodiment of the present application, from the perspective of natural language, not everyone is used to the sentence supported by the basic definition of the AIML mapping rule "display and relation. Therefore, the natural language instruction needs to be preprocessed first, and natural language instructions of other sentence patterns are converted into sentence patterns supported by the basic definition of the preset AIML mapping rule; and determining the AIML mapping rule corresponding to the natural language instruction from preset AIML mapping rules according to the sentence pattern.
For example, for a sentence "and what is connected", the conversion method is as follows:
Figure BDA0001845548980000111
Figure BDA0001845548980000121
for example, "what connection is made between sales volume and monthly" is converted into "displaying the relationship between sales volume and monthly".
For a sentence in which the "influence on the" is not large ", the order of the independent variables and the dependent variables in the sentence is opposite to the order of the independent variables and the dependent variables in the" relation of displaying the "and" the conversion method is as follows:
Figure BDA0001845548980000122
for example, "what connection is made between monthly degrees and sales amount" is converted into "displaying the relationship between sales amount and monthly degrees".
If the natural language instruction of other sentence patterns cannot be converted into the sentence pattern supported by the basic definition of the preset AIML mapping rule, prompt information, such as 'unsupported natural language instruction sentence pattern', is output through the interactive interface.
And the processing submodule is used for searching a template for processing the natural language instruction from the corresponding AIML mapping rule to obtain a corresponding processing response.
Preferably, the natural language instruction is preprocessed to obtain a corresponding preset AIML mapping rule, and a template for processing the natural language instruction is searched from the preset AIML mapping rule to obtain a corresponding processing response.
For example, the basic definition of the preset AIML mapping rule of "display and relation" is as follows:
Figure BDA0001845548980000123
Figure BDA0001845548980000131
wherein the content of the first and second substances,
category section is used to identify a piece of knowledge;
the pattern segment is used for expressing a generation rule; the first one indicates a dependent variable and the second one designates an independent variable;
a template segment for identifying a response template for knowledge; the template field specifies the way in which the rule is generated. Because the response to the input will be in response to the parser module, although AIML is employed, the template segment is generally described as a language recognizable to the parser.
For example, the natural language instruction is "a relationship between a sales volume and a monthly degree", and the corresponding template is "trends (< star index ═ 1"/>, < star index ═ 2 "/>"), and a final processing response "trends (sales volume, monthly degree)" is obtained.
Wherein the processing response is a machine language instruction.
Preferably, if the preset AIML mapping rule corresponding to the natural language instruction is not queried, a prompt message, such as "no corresponding template information", is output through the interactive interface.
In a preferred implementation of the execution module 23,
the execution module 23 includes:
the analysis submodule is used for extracting a corresponding execution text according to the AIML definition, namely extracting the corresponding execution text from the processing response;
and the execution submodule is used for calling the execution program to execute the execution text.
Where trends is a function registered as the name, and the value in parentheses is passed to the function as a parameter. The function is called by the executive module.
For example, in response to "tresnds (sales volume, month)", the execution submodule calls the tresnds function to execute, and displays a sales volume month change trend table.
Preferably, the sales monthly change trend table is displayed through the interactive interface.
Through the embodiment, the user only needs to issue a simple natural language instruction, the software can be operated, and the required report is generated. The complex sentence pattern requirement of machine language commands does not need to be mastered, the operation is convenient and fast, and the learning cost and the use cost of a user are saved.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the terminal and the server described above may refer to corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and 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 units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processor, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Fig. 3 illustrates a block diagram of an exemplary computer system/server 012 suitable for use in implementing embodiments of the invention. The computer system/server 012 shown in fig. 3 is only an example, and should not bring any limitations to the function and the scope of use of the embodiments of the present invention.
As shown in fig. 3, the computer system/server 012 is embodied as a general purpose computing device. The components of computer system/server 012 may include, but are not limited to: one or more processors or processors 016, a system memory 028, and a bus 018 that couples various system components including the system memory 028 and the processors 016.
Bus 018 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Computer system/server 012 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer system/server 012 and includes both volatile and nonvolatile media, removable and non-removable media.
System memory 028 can include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)030 and/or cache memory 032. The computer system/server 012 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 034 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 3, commonly referred to as a "hard drive"). Although not shown in FIG. 3, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be connected to bus 018 via one or more data media interfaces. Memory 028 can include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of embodiments of the present invention.
Program/utility 040 having a set (at least one) of program modules 042 can be stored, for example, in memory 028, such program modules 042 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof might include an implementation of a network environment. Program modules 042 generally perform the functions and/or methodologies of embodiments of the present invention as described herein.
The computer system/server 012 may also communicate with one or more external devices 014 (e.g., keyboard, pointing device, display 024, etc.), hi the present invention, the computer system/server 012 communicates with an external radar device, and may also communicate with one or more devices that enable a speaker to interact with the computer system/server 012, and/or with any device (e.g., network card, modem, etc.) that enables the computer system/server 012 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 022. Also, the computer system/server 012 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the internet) via the network adapter 020. As shown in fig. 3, the network adapter 020 communicates with the other modules of the computer system/server 012 via bus 018. It should be appreciated that although not shown in fig. 3, other hardware and/or software modules may be used in conjunction with the computer system/server 012, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processor 016 executes programs stored in the system memory 028 to perform the functions and/or methods of the described embodiments of the present invention.
The computer program described above may be provided in a computer storage medium encoded with a computer program that, when executed by one or more computers, causes the one or more computers to perform the method flows and/or apparatus operations shown in the above-described embodiments of the invention.
With the development of time and technology, the meaning of media is more and more extensive, and the propagation path of computer programs is not limited to tangible media any more, and can also be downloaded from a network directly and the like. Any combination of one or more computer-readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. 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 (a non-exhaustive list) of the computer readable storage medium would include the following: 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 context of this document, 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.
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 any of a variety of 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, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the speaker computer, partly on the speaker computer, as a stand-alone software package, partly on the speaker computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the speaker's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and 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 units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processor, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should 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 in the embodiments of the present application.

Claims (16)

1. A method for generating a report according to natural language instructions, comprising:
receiving a natural language instruction input by a user, wherein the natural language instruction is used for indicating to generate a report;
converting the natural language instruction into a machine language instruction according to a preset A I ML mapping rule;
and executing the machine language instruction to generate a report.
2. The method of claim 1, wherein receiving user-entered natural language instructions comprises:
and receiving voice data input by a user, and performing text conversion on the voice data to obtain a corresponding natural language instruction.
3. The method of claim 1, wherein converting the natural language instructions into machine language instructions according to preset AI ML mapping rules comprises:
preprocessing the natural language instruction, and determining an A I ML mapping rule corresponding to the natural language instruction from preset A I ML mapping rules;
and searching a template for processing the natural language instruction from the corresponding A I ML mapping rule to obtain a corresponding processing response.
4. The method of claim 3, wherein pre-processing the natural language instructions comprises:
and performing semantic recognition on the natural language instruction, and converting the sentence pattern of the natural language instruction into the sentence pattern supported by the preset AIML mapping rule.
5. The method of claim 4, wherein determining the A I ML mapping rule corresponding to the natural language instruction from preset A I ML mapping rules comprises:
and determining the AIML mapping rule corresponding to the natural language instruction from preset AI ML mapping rules according to the converted sentence pattern.
6. The method of claim 3, wherein the processing response is a machine language instruction.
7. The method of claim 6, wherein executing the machine language instructions comprises:
extracting a corresponding execution text from the processing response;
and calling an execution program to execute the execution text.
8. A system for generating reports based on natural language instructions, comprising:
the receiving module is used for receiving a natural language instruction input by a user, and the natural language instruction is used for indicating to generate a report;
the conversion module is used for converting the natural language instruction into a machine language instruction according to a preset A I ML mapping rule;
and the execution module is used for executing the machine language instruction and generating a report.
9. The system of claim 8, wherein the receiving module is specifically configured to:
and receiving voice data input by a user, and performing text conversion on the voice data to obtain a corresponding natural language instruction.
10. The system of claim 8, wherein the conversion module comprises:
the preprocessing submodule is used for preprocessing the natural language instruction and determining an AI ML mapping rule corresponding to the natural language instruction from preset AI ML mapping rules;
and the processing submodule is used for searching a template for processing the natural language instruction from the corresponding A I ML mapping rule to obtain a corresponding processing response.
11. The system of claim 10, wherein the pre-processing sub-module is specifically configured to:
and performing semantic recognition on the natural language instruction, and converting the sentence pattern of the natural language instruction into the sentence pattern supported by the preset AIML mapping rule.
12. The system of claim 11, wherein the pre-processing sub-module is further specifically configured to:
and determining the AIML mapping rule corresponding to the natural language instruction from preset AI ML mapping rules according to the converted sentence pattern.
13. The system of claim 10, wherein the processing response is a machine language instruction.
14. The system of claim 13, wherein the execution module comprises:
the analysis submodule is used for extracting a corresponding execution text from the processing response;
and the execution submodule is used for calling the execution program to execute the execution text.
15. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program implements the method of any one of claims 1 to 7.
16. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
CN201811268946.0A 2018-10-29 2018-10-29 Method and system for generating report according to natural language instruction Pending CN111191431A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811268946.0A CN111191431A (en) 2018-10-29 2018-10-29 Method and system for generating report according to natural language instruction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811268946.0A CN111191431A (en) 2018-10-29 2018-10-29 Method and system for generating report according to natural language instruction

Publications (1)

Publication Number Publication Date
CN111191431A true CN111191431A (en) 2020-05-22

Family

ID=70708923

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811268946.0A Pending CN111191431A (en) 2018-10-29 2018-10-29 Method and system for generating report according to natural language instruction

Country Status (1)

Country Link
CN (1) CN111191431A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030069880A1 (en) * 2001-09-24 2003-04-10 Ask Jeeves, Inc. Natural language query processing
US20050015350A1 (en) * 2003-07-15 2005-01-20 Foderaro John K. Multi-personality chat robot
CN1670733A (en) * 2004-03-18 2005-09-21 微软公司 Rendering tables with natural language commands
US20110078105A1 (en) * 2009-09-29 2011-03-31 Pandorabots Method for personalizing chat bots
US20150100588A1 (en) * 2013-10-09 2015-04-09 International Business Machines Corporation Optimized Data Visualization According to Natural Language Query
CN105376294A (en) * 2014-08-12 2016-03-02 索尼公司 Method and system for providing information via an intelligent user interface
US20170316513A1 (en) * 2016-04-30 2017-11-02 Intuit Inc. Methods, systems and computer program products for facilitating user interaction with tax return preparation programs
CN107612968A (en) * 2017-08-15 2018-01-19 北京小蓦机器人技术有限公司 The method, equipment and system of its connected device are controlled by intelligent terminal
CN108108426A (en) * 2017-12-15 2018-06-01 杭州网蛙科技有限公司 Understanding method, device and the electronic equipment that natural language is putd question to

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030069880A1 (en) * 2001-09-24 2003-04-10 Ask Jeeves, Inc. Natural language query processing
US20050015350A1 (en) * 2003-07-15 2005-01-20 Foderaro John K. Multi-personality chat robot
CN1670733A (en) * 2004-03-18 2005-09-21 微软公司 Rendering tables with natural language commands
US20110078105A1 (en) * 2009-09-29 2011-03-31 Pandorabots Method for personalizing chat bots
US20150100588A1 (en) * 2013-10-09 2015-04-09 International Business Machines Corporation Optimized Data Visualization According to Natural Language Query
CN105376294A (en) * 2014-08-12 2016-03-02 索尼公司 Method and system for providing information via an intelligent user interface
US20170316513A1 (en) * 2016-04-30 2017-11-02 Intuit Inc. Methods, systems and computer program products for facilitating user interaction with tax return preparation programs
CN107612968A (en) * 2017-08-15 2018-01-19 北京小蓦机器人技术有限公司 The method, equipment and system of its connected device are controlled by intelligent terminal
CN108108426A (en) * 2017-12-15 2018-06-01 杭州网蛙科技有限公司 Understanding method, device and the electronic equipment that natural language is putd question to

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
时鸿涛: "基于ALICE的语义推理接口" *

Similar Documents

Publication Publication Date Title
CN110462730B (en) Facilitating end-to-end communication with automated assistants in multiple languages
US10698932B2 (en) Method and apparatus for parsing query based on artificial intelligence, and storage medium
US9805718B2 (en) Clarifying natural language input using targeted questions
US20180366107A1 (en) Method and device for training acoustic model, computer device and storage medium
KR102445519B1 (en) System and method for manufacturing conversational intelligence service providing chatbot
CN113220836B (en) Training method and device for sequence annotation model, electronic equipment and storage medium
US9619209B1 (en) Dynamic source code generation
CN111177350A (en) Method, device and system for forming dialect of intelligent voice robot
US20170220327A1 (en) Dynamic source code generation
US10706085B2 (en) Method and system for exposing virtual assistant services across multiple platforms
CN109032731B (en) Voice interaction method and system based on semantic understanding and oriented to operating system
US11100297B2 (en) Provision of natural language response to business process query
CN109785829B (en) Customer service assisting method and system based on voice control
US20230186033A1 (en) Guided text generation for task-oriented dialogue
US20070156406A1 (en) Voice user interface authoring tool
CN116521841A (en) Method, device, equipment and medium for generating reply information
CN110647613A (en) Courseware construction method, courseware construction device, courseware construction server and storage medium
US11620328B2 (en) Speech to media translation
US20230409294A1 (en) Adaptive user interfacing
CN113051895A (en) Method, apparatus, electronic device, medium, and program product for speech recognition
US20230005466A1 (en) Speech synthesis method, and electronic device
CN111104118A (en) AIML-based natural language instruction execution method and system
CN115019787A (en) Interactive homophonic and heteronym word disambiguation method, system, electronic equipment and storage medium
CN111191431A (en) Method and system for generating report according to natural language instruction
CN114047900A (en) Service processing method and device, electronic equipment and computer readable storage medium

Legal Events

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