[go: up one dir, main page]

CN111104118A - AIML-based natural language instruction execution method and system - Google Patents

AIML-based natural language instruction execution method and system Download PDF

Info

Publication number
CN111104118A
CN111104118A CN201811268945.6A CN201811268945A CN111104118A CN 111104118 A CN111104118 A CN 111104118A CN 201811268945 A CN201811268945 A CN 201811268945A CN 111104118 A CN111104118 A CN 111104118A
Authority
CN
China
Prior art keywords
natural language
language instruction
aiml
rule
processing
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
CN201811268945.6A
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.)
Baidu Online Network Technology Beijing Co Ltd
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 CN201811268945.6A priority Critical patent/CN111104118A/en
Publication of CN111104118A publication Critical patent/CN111104118A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Machine Translation (AREA)

Abstract

The invention discloses a natural language instruction execution method and a system based on AIML, wherein the method comprises the steps of receiving a natural language instruction input by a user; converting the natural language instruction into an executable machine language instruction according to a preset AIML mapping rule; executing the machine language instructions. The user only needs to issue a simple natural language instruction, the software can be operated, the requirement of mastering complex machine language command sentence patterns is not needed, convenience and rapidness are achieved, and the learning cost and the use cost of the user are saved.

Description

AIML-based natural language instruction execution method and system
[ technical field ] A method for producing a semiconductor device
The invention relates to a computer application technology, in particular to a natural language instruction execution method and system based on AIML.
[ 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.
However, in these scenarios, the user is often required to input an instruction according to the sentence pattern requirement, and the user needs not only to learn the sentence pattern requirement in advance, but also to input a machine language command according to the sentence pattern requirement, which is complicated to operate. A convenient and fast method for executing instructions is lacking.
For example, in operating on a database, a user is required to enter machine language commands that meet the requirements of a sentence, but not by simple natural language input.
[ summary of the invention ]
Aspects of the present application provide a method, system, device and storage medium for executing a natural language instruction based on AIML, which can conveniently and quickly execute a natural language instruction input by a user.
In one aspect of the present invention, a method for executing natural language instructions based on AIML is provided, where the method includes:
receiving a natural language instruction input by a user;
converting the natural language instruction into a machine language instruction according to a preset AIML mapping rule;
executing the machine language instructions.
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;
acquiring a rule generation mode and a feature name from the natural language instruction according to a basic definition of a preset AIML mapping rule;
and searching a template for processing the generation mode of the rule, and acquiring a processing response corresponding to the natural language instruction according to the template.
The above aspect and any possible implementation further provide an implementation, where the preprocessing the natural language instruction includes:
performing semantic recognition on the natural language instruction, and determining key words and sentence pattern information of the natural language instruction;
and determining the AIML mapping rule corresponding to the natural language instruction from preset AIML mapping rules according to the sentence pattern information.
The above aspect and any possible implementation further provide an implementation, where the preprocessing the natural language instruction further includes:
and converting the natural language instruction into a sentence pattern supported by the preset AIML mapping rule.
As for the above-mentioned aspect and any possible implementation manner, further providing an implementation manner, the searching for the template for processing the rule generation manner includes:
carrying out semantic recognition on the generation mode of the rule, and determining key words and sentence pattern information of the generation mode of the rule;
and determining a processing template corresponding to the generation mode of the rule from preset templates according to the sentence pattern information.
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, there is provided a system comprising:
the receiving module is used for receiving a natural language instruction input by a user;
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.
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;
the first processing submodule is used for acquiring a rule generation mode and a feature name from the natural language instruction according to a basic definition of a preset AIML mapping rule;
and the second processing submodule is used for searching a template for processing the generation mode of the rule and obtaining a processing response corresponding to the natural language instruction according to the template.
The above-mentioned aspect and any possible implementation further provide an implementation, where the preprocessing sub-module is specifically configured to:
performing semantic recognition on the natural language instruction, and determining key words and sentence pattern information of the natural language instruction;
and determining the AIML mapping rule corresponding to the natural language instruction from preset AIML mapping rules according to the sentence pattern information.
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 converting the natural language instruction into a 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 first processing submodule is specifically configured to:
carrying out semantic recognition on the generation mode of the rule, and determining key words and sentence pattern information of the generation mode of the rule;
and determining a processing template corresponding to the generation mode of the rule from preset templates according to the sentence pattern information.
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. .
[ description of the drawings ]
FIG. 1 is a flow chart of the method of the present invention;
FIG. 2 is a block diagram of the system 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 an AIML-based natural language instruction execution method according to the present invention, as shown in FIG. 1, including the following steps:
step S11, receiving a natural language instruction input by a user;
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.
The execution main body of the method is software installed on the terminal equipment, and the software provides service support for users, such as services of voice, man-machine interaction, audio and video, data processing, machine learning and the like. Such as database management software.
In one preferred implementation of step S11,
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 "designate a person with an age of more than 20 in the staff table as an adult".
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 'naming the person with age greater than 20 in the staff table as an adult' as an example, the natural language instruction is converted into an executable machine language instruction according to a preset AIML mapping rule, and the method comprises 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.
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 natural language instruction obtained is "call a person with age greater than 20 in the staff table as an adult", from which sentence information is extracted as follows: "will" name.
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.
From the perspective of natural language, instead of a sentence that everyone is used to support the basic definition of the AIML mapping rule "named" a, a sentence such as "take a" as a tag "is used. Therefore, it is necessary to convert natural language instructions of other sentence patterns into sentence patterns supported by the basic definition of the preset AIML mapping rule. The conversion method comprises the following steps:
Figure BDA0001845554610000071
for example, "take adults as people older than 20 in the tag staff table" is converted into "call people older than 20 in the staff table as adults".
And a substep S122 of obtaining a rule generation mode and a feature name from the natural language instruction according to a basic definition of a preset AIML mapping rule.
For example, the preset AIML mapping rule is basically defined as follows:
Figure BDA0001845554610000072
Figure BDA0001845554610000081
wherein,
category section is used to identify a piece of knowledge;
the pattern section is used for identifying a regular expression matched with the input; the Pattern section expresses a feature generation rule, the first one indicates the rule generation mode, and the second one indicates the name of the feature named by the generated result;
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;
the srai section defines the template that looks from the entire configuration definition how the first ". multidot.concrete is to be handled.
For example, the natural language instruction is "call a person with age greater than 20 in the staff table as an adult", wherein the corresponding sentence is "call a word" and the rule is generated in such a manner that "a person with age greater than 20 in the staff table" is obtained, and the generated result is named as an "adult".
And a substep S123 of searching a template for processing the rule generating mode from a preset configuration definition according to the rule generating mode to obtain a corresponding processing response.
Preferably, the generation mode of the rule is preprocessed, and a corresponding processing template is determined.
Preferably, keyword information of a generation manner of the rule is extracted. Segmenting the sentences of the rule generation mode to obtain each piece of segmentation information, then determining the part of speech and the like of words in the segmentation information to further obtain semantic information of the rule generation mode, and then extracting keywords from the rule generation mode. And if the rule generating mode is subjected to semantic recognition through a natural language processing model, semantic information is obtained, and then keywords are extracted from the rule generating mode.
Preferably, matching is performed on the extracted keywords and a preset sentence pattern, and sentence pattern information for determining the corresponding processing template is extracted.
Preferably, according to the sentence pattern information, a corresponding processing template is determined from preset templates.
For example, the rule is generated in a manner of "people with age greater than 20 in the staff table", and sentence pattern information is extracted therefrom as follows: "peoplewith age greater than x in the table", the corresponding treatment template is determined.
If the processing template corresponding to the generation mode of the rule is not determined, prompt information is output through the interactive interface, for example, no corresponding template information exists.
Preferably, a corresponding processing response is obtained according to the processing template.
For example, the treatment templates corresponding to "persons with age greater than one in the table" are as follows:
Figure BDA0001845554610000091
for the natural language instruction "person with age greater than 20 in the staff table is named as adult", the generation manner "person with age greater than 20 in the staff table" corresponding to the rule is acquired, and the final process response "execute process feature (adult)" 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 S124, 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 execute process 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 "execute process feature (human, age >20, adult)", the program analysis module calls an execute process function to execute, and names a human with age greater than 20 in the human table as an adult.
Preferably, after the processing is finished, prompt information is output through the interactive interface, for example, "people with age greater than 20 in the staff table are named as adults, and execution is finished".
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 block diagram of an AIML-based natural language instruction execution system according to the present invention, as shown in fig. 2, including:
a receiving module 21, configured to receive a natural language instruction input by a user;
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 used for executing the machine language instruction.
The system is software installed on the terminal equipment, and the software provides service support for users, such as services of voice, man-machine interaction, audio and video, data processing, machine learning and the like. Such as database management 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 "designate a person with an age of more than 20 in the staff table as an adult".
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.
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 natural language instruction obtained is "call a person with age greater than 20 in the staff table as an adult", from which sentence information is extracted as follows: "will" name.
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.
From the perspective of natural language, instead of a sentence that everyone is used to support the basic definition of the AIML mapping rule "named" a, a sentence such as "take a" as a tag "is used. Therefore, it is necessary to convert natural language instructions of other sentence patterns into sentence patterns supported by the basic definition of the preset AIML mapping rule. The conversion method comprises the following steps:
Figure BDA0001845554610000121
Figure BDA0001845554610000131
for example, "take adults as people older than 20 in the tag staff table" is converted into "call people older than 20 in the staff table as adults".
And the first processing submodule is used for acquiring a rule generation mode and a feature name from the natural language instruction according to the basic definition of a preset AIML mapping rule.
For example, the preset AIML mapping rule is basically defined as follows:
Figure BDA0001845554610000132
wherein,
category section is used to identify a piece of knowledge;
the pattern section is used for identifying a regular expression matched with the input; the Pattern section expresses a feature generation rule, the first one indicates the rule generation mode, and the second one indicates the name of the feature named by the generated result;
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;
the srai section defines the template that looks from the entire configuration definition how the first ". multidot.concrete is to be handled.
For example, the natural language instruction is "call a person with age greater than 20 in the staff table as an adult", wherein the corresponding sentence is "call a word" and the rule is generated in such a manner that "a person with age greater than 20 in the staff table" is obtained, and the generated result is named as an "adult".
And the second processing submodule is used for searching a template for processing the generation mode of the rule from a preset configuration definition according to the generation mode of the rule and obtaining a corresponding processing response.
Preferably, the generation mode of the rule is preprocessed, and a corresponding processing template is determined.
Preferably, keyword information of a generation manner of the rule is extracted. Segmenting the sentences of the rule generation mode to obtain each piece of segmentation information, then determining the part of speech and the like of words in the segmentation information to further obtain semantic information of the rule generation mode, and then extracting keywords from the rule generation mode. And if the rule generating mode is subjected to semantic recognition through a natural language processing model, semantic information is obtained, and then keywords are extracted from the rule generating mode.
Preferably, matching is performed on the extracted keywords and a preset sentence pattern, and sentence pattern information for determining the corresponding processing template is extracted.
Preferably, according to the sentence pattern information, a corresponding processing template is determined from preset templates.
For example, the rule is generated in a manner of "people with age greater than 20 in the staff table", and sentence pattern information is extracted therefrom as follows: "peoplewith age greater than x in the table", the corresponding treatment template is determined.
If the processing template corresponding to the generation mode of the rule is not determined, prompt information is output through the interactive interface, for example, no corresponding template information exists.
Preferably, a corresponding processing response is obtained according to the processing template.
For example, the treatment templates corresponding to "persons with age greater than one in the table" are as follows:
Figure BDA0001845554610000141
for the natural language instruction "person with age greater than 20 in the staff table is named as adult", the generation manner "person with age greater than 20 in the staff table" corresponding to the rule is acquired, and the final process response "execute process feature (adult)" 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.
Preferably, the system further comprises a sending submodule for 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 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 execute process 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 "execute process feature (human, age >20, adult)", the execution submodule calls an execute process function to execute, and names a human with age greater than 20 in the human table as adult.
Preferably, after the processing is finished, prompt information is output through the interactive interface, for example, "people with age greater than 20 in the staff table are named as adults, and execution is finished".
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 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 + +, 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 (18)

1. An AIML-based natural language instruction execution method, comprising:
receiving a natural language instruction input by a user;
converting the natural language instruction into a machine language instruction according to a preset AIML mapping rule;
executing the machine language instructions.
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 AIML mapping rules comprises:
preprocessing the natural language instruction;
acquiring a rule generation mode and a feature name from the natural language instruction according to a basic definition of a preset AIML mapping rule;
and searching a template for processing the generation mode of the rule, and acquiring a processing response corresponding to the natural language instruction according to the template.
4. The method of claim 3, wherein pre-processing the natural language instructions comprises:
performing semantic recognition on the natural language instruction, and determining key words and sentence pattern information of the natural language instruction;
and determining the AIML mapping rule corresponding to the natural language instruction from preset AIML mapping rules according to the sentence pattern information.
5. The method of claim 4, wherein pre-processing the natural language instructions further comprises:
and converting the natural language instruction into a sentence pattern supported by the preset AIML mapping rule.
6. The method of claim 3, wherein finding a template that handles the manner in which the rule is generated comprises:
carrying out semantic recognition on the generation mode of the rule, and determining key words and sentence pattern information of the generation mode of the rule;
and determining a processing template corresponding to the generation mode of the rule from preset templates according to the sentence pattern information.
7. The method of claim 1, wherein the processing response is a machine language instruction.
8. The method of claim 7, 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.
9. An AIML-based natural language instruction execution system, comprising:
the receiving module is used for receiving a natural language instruction input by a user;
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.
10. The system of claim 9, 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.
11. The system of claim 9, wherein the conversion module comprises:
the preprocessing submodule is used for preprocessing the natural language instruction;
the first processing submodule is used for acquiring a rule generation mode and a feature name from the natural language instruction according to a basic definition of a preset AIML mapping rule;
and the second processing submodule is used for searching a template for processing the generation mode of the rule and obtaining a processing response corresponding to the natural language instruction according to the template.
12. The system of claim 11, wherein the pre-processing sub-module is specifically configured to:
performing semantic recognition on the natural language instruction, and determining key words and sentence pattern information of the natural language instruction;
and determining the AIML mapping rule corresponding to the natural language instruction from preset AIML mapping rules according to the sentence pattern information.
13. The system of claim 12, wherein the pre-processing sub-module is further specifically configured to:
and converting the natural language instruction into a sentence pattern supported by the preset AIML mapping rule.
14. The system of claim 11, wherein the first processing submodule is specifically configured to:
carrying out semantic recognition on the generation mode of the rule, and determining key words and sentence pattern information of the generation mode of the rule;
and determining a processing template corresponding to the generation mode of the rule from preset templates according to the sentence pattern information.
15. The system of claim 9, wherein the processing response is a machine language instruction.
16. The system of claim 15, 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.
17. 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 8.
18. 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 8.
CN201811268945.6A 2018-10-29 2018-10-29 AIML-based natural language instruction execution method and system Pending CN111104118A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811268945.6A CN111104118A (en) 2018-10-29 2018-10-29 AIML-based natural language instruction execution method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811268945.6A CN111104118A (en) 2018-10-29 2018-10-29 AIML-based natural language instruction execution method and system

Publications (1)

Publication Number Publication Date
CN111104118A true CN111104118A (en) 2020-05-05

Family

ID=70420234

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811268945.6A Pending CN111104118A (en) 2018-10-29 2018-10-29 AIML-based natural language instruction execution method and system

Country Status (1)

Country Link
CN (1) CN111104118A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111694574A (en) * 2020-06-12 2020-09-22 北京百度网讯科技有限公司 Method, device, equipment and storage medium for instruction code processing

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120259891A1 (en) * 2011-04-11 2012-10-11 David Edoja Method, system and program for analytics data delivering
US20140188477A1 (en) * 2012-12-31 2014-07-03 Via Technologies, Inc. Method for correcting a speech response and natural language dialogue system
CN105138710A (en) * 2015-10-12 2015-12-09 金耀星 Chat agent system and method
CN106547248A (en) * 2016-10-09 2017-03-29 南京邮电大学 A kind of strategy-generating method for control system under open environment
CN106649706A (en) * 2016-12-20 2017-05-10 北京云知声信息技术有限公司 Natural language knowledge learning method and apparatus
CN108108426A (en) * 2017-12-15 2018-06-01 杭州网蛙科技有限公司 Understanding method, device and the electronic equipment that natural language is putd question to
CN108509412A (en) * 2018-03-02 2018-09-07 北京搜狗科技发展有限公司 A kind of data processing method, device, electronic equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120259891A1 (en) * 2011-04-11 2012-10-11 David Edoja Method, system and program for analytics data delivering
US20140188477A1 (en) * 2012-12-31 2014-07-03 Via Technologies, Inc. Method for correcting a speech response and natural language dialogue system
CN105138710A (en) * 2015-10-12 2015-12-09 金耀星 Chat agent system and method
CN106547248A (en) * 2016-10-09 2017-03-29 南京邮电大学 A kind of strategy-generating method for control system under open environment
CN106649706A (en) * 2016-12-20 2017-05-10 北京云知声信息技术有限公司 Natural language knowledge learning method and apparatus
CN108108426A (en) * 2017-12-15 2018-06-01 杭州网蛙科技有限公司 Understanding method, device and the electronic equipment that natural language is putd question to
CN108509412A (en) * 2018-03-02 2018-09-07 北京搜狗科技发展有限公司 A kind of data processing method, device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111694574A (en) * 2020-06-12 2020-09-22 北京百度网讯科技有限公司 Method, device, equipment and storage medium for instruction code processing
CN111694574B (en) * 2020-06-12 2023-11-14 北京百度网讯科技有限公司 Instruction code processing methods, devices, equipment and storage media

Similar Documents

Publication Publication Date Title
AU2021202694B2 (en) Facilitating end-to-end communications with automated assistants in multiple languages
KR102445519B1 (en) Conversational intelligence service provision chatbot production system and method
US20220215183A1 (en) Automatic post-editing model for neural machine translation
US10698932B2 (en) Method and apparatus for parsing query based on artificial intelligence, and storage medium
US9805718B2 (en) Clarifying natural language input using targeted questions
CN108847241B (en) Method for recognizing conference voice as text, electronic device and storage medium
CN111402861B (en) Voice recognition method, device, equipment and storage medium
US11907665B2 (en) Method and system for processing user inputs using natural language processing
US11100297B2 (en) Provision of natural language response to business process query
CN111177350A (en) Method, device and system for forming dialect of intelligent voice robot
CN113051895A (en) Method, apparatus, electronic device, medium, and program product for speech recognition
CN109785829B (en) Customer service assisting method and system based on voice control
CN111897511A (en) A kind of voice drawing method, device, equipment and storage medium
CN110890097A (en) Voice processing method and device, computer storage medium and electronic equipment
CN114020888A (en) Text generation method, device, equipment and storage medium
CN113555016A (en) Voice interaction method, electronic equipment and readable storage medium
WO2024077906A1 (en) Speech text generation method and apparatus, and training method and apparatus for speech text generation model
CN119149726A (en) Text abstract generation method, device, equipment, storage medium and product
Shestakevych et al. Designing an Application for Monitoring the Ukrainian Spoken Language.
CN117111804A (en) Information processing methods, devices, electronic equipment and storage media
CN115019787B (en) Interactive homonym disambiguation method, system, electronic equipment and storage medium
CN114047900A (en) Business processing method, apparatus, electronic device, and computer-readable storage medium
CN111104118A (en) AIML-based natural language instruction execution method and system
CN120340475A (en) Meeting minutes generation method, device, computer readable medium and electronic device
CN116580698A (en) Speech synthesis method, device, computer equipment and medium based on artificial intelligence

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