CN107680590B - Method, device and storage medium for processing natural language command - Google Patents

Method, device and storage medium for processing natural language command Download PDF

Info

Publication number
CN107680590B
CN107680590B CN201710842798.8A CN201710842798A CN107680590B CN 107680590 B CN107680590 B CN 107680590B CN 201710842798 A CN201710842798 A CN 201710842798A CN 107680590 B CN107680590 B CN 107680590B
Authority
CN
China
Prior art keywords
natural language
language command
execution
command
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710842798.8A
Other languages
Chinese (zh)
Other versions
CN107680590A (en
Inventor
李国华
戴帅湘
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lianzhong Cluster Beijing Technology Co ltd
Original Assignee
Beijing Moran Cognitive 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 Moran Cognitive Technology Co Ltd filed Critical Beijing Moran Cognitive Technology Co Ltd
Priority to CN201710842798.8A priority Critical patent/CN107680590B/en
Publication of CN107680590A publication Critical patent/CN107680590A/en
Application granted granted Critical
Publication of CN107680590B publication Critical patent/CN107680590B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/22Procedures used during a speech recognition process, e.g. man-machine dialogue
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/02Reservations, e.g. for tickets, services or events
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/22Social work or social welfare, e.g. community support activities or counselling services

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Machine Translation (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

An object of the present invention is to provide a method, apparatus and storage medium for executing a natural language command. Specifically, detecting whether a natural language command to be executed satisfies a predetermined condition; if the preset condition is met, determining an execution strategy related to the natural language command; and processing the natural language command according to the execution strategy. Compared with the prior art, the invention improves the existing scheme of unconditionally executing the natural language command of the user, realizes the self-adaptive adjustment of the user requirement, improves the requirement satisfaction degree of the user and correspondingly improves the intelligence degree of the voice system.

Description

Method, device and storage medium for processing natural language command
Technical Field
The invention relates to the technical field of voice interaction, in particular to a technology for processing natural language commands.
Background
However, in the existing voice interaction system, the natural language command issued by the user is equivalent to an unconditionally executed command to the system, and the system does not actively interrupt or adjust the user requirement, so that the system does not have the adaptivity of command execution. However, in practical applications, for some extreme natural language commands such as "explosion" and "killer" with harmfulness, the system is not suitable for executing the natural language commands, and the execution of the natural language commands also seriously affects the execution of other instructions, and the intelligence of the system needs to be improved.
Disclosure of Invention
An object of the present invention is to provide a method, apparatus and storage medium for processing a natural language command.
According to an aspect of the present invention, there is provided a method for executing a natural language command, wherein the method comprises the steps of:
a, detecting whether a natural language command to be executed meets a preset condition;
b, if the preset condition is met, determining an execution strategy related to the natural language command;
c processing the natural language command according to the execution strategy.
According to another aspect of the present invention, there is also provided an execution apparatus for processing a natural language command, wherein the execution apparatus includes:
detecting means for detecting whether a natural language command to be executed satisfies a predetermined condition;
determining means for determining an execution policy for the natural language command if the predetermined condition is satisfied;
and the processing device is used for processing the natural language command according to the execution strategy.
According to yet another aspect of the present invention, there is also provided a computing device comprising:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform a method for executing natural language commands as previously described in accordance with an aspect of the present invention.
According to yet another aspect of the present invention, there is also provided a computer readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements a method for executing natural language commands according to one aspect of the present invention as described above.
Compared with the prior art, the embodiment of the invention improves the existing scheme of unconditional execution of the natural language command of the user by detecting whether the natural language command to be executed meets the preset condition or not, determining the execution strategy of the natural language command if the preset condition is met, and processing the natural language command according to the execution strategy, thereby realizing the self-adaptive adjustment of the user requirement, improving the satisfaction degree of the user requirement and correspondingly improving the intelligence degree of a voice system.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments made with reference to the following drawings:
FIG. 1 illustrates an apparatus diagram of an execution apparatus for processing natural language commands in accordance with an aspect of the present invention;
FIG. 2 illustrates a flow diagram of a method for processing natural language commands in accordance with another aspect of the invention;
FIG. 3 illustrates a block diagram of an exemplary computer system/server suitable for use in implementing embodiments of the present invention.
The same or similar reference numbers in the drawings identify the same or similar elements.
Detailed Description
The present invention is described in further detail below with reference to the attached drawing figures.
Fig. 1 shows an execution device 1 for processing natural language commands according to an aspect of the invention, wherein the execution device 1 comprises detection means 11, determination means 12 and processing means 13. Specifically, the detection means 11 detects whether a natural language command to be executed satisfies a predetermined condition; if the predetermined condition is satisfied, the determining means 12 determines an execution policy regarding the natural language command; the processing means 13 processes the natural language command according to the execution policy.
Here, the execution apparatus 1 refers to an apparatus capable of detecting whether a natural language command to be executed satisfies a predetermined condition, determining an execution policy regarding the natural language command if the predetermined condition is satisfied, and processing the natural language command according to the execution policy.
In a specific embodiment, the execution device 1 may be implemented by an intelligent terminal, or implemented by a network device or a device formed by integrating a network device and an intelligent terminal through a network (i.e., the intelligent terminal and the network device cooperate with each other), or included in the intelligent terminal as a software module and/or a hardware module, or connected with the intelligent terminal in a wired or wireless manner as a hardware device. Herein, the network device includes, but is not limited to, implementations such as a network host, a single network server, a set of multiple network servers, or a set of cloud computing-based computers. Here, the cloud is made up of a large number of hosts or web servers based on cloud computing (CloudComputing), which is a type of distributed computing, a super virtual computer consisting of a collection of loosely coupled computers.
Here, the intelligent terminal may be any electronic product that can perform human-computer interaction with a user through one or more modes such as a keyboard, a touch pad, a touch screen, a remote controller, voice interaction, or a handwriting device, for example, a PC, a mobile phone, a smart phone, a PDA, a wearable device, a palm PC PPC, a wearable device, a tablet computer, a smart car machine, a smart television, a smart sound box, a medical self-service registration device, and the like. In practical application, when the execution device 1 is an intelligent terminal, a client (which may be in an APP form) capable of understanding, processing and responding to the natural language command of the user and outputting a response result may be mounted/installed thereon, or the client may only perform voice recognition on the natural language command input by the user but need a corresponding server to understand, process and respond to the natural language command of the user, and then return the response result to the client for output. Including, but not limited to, the internet, a wide area network, a metropolitan area network, a local area network, a VPN network, a wireless Ad Hoc network (Ad Hoc network), etc.
It should be understood by those skilled in the art that the above-mentioned implementation device 1 is only an example, and other existing or future network devices or intelligent terminals may be applicable to the present invention, and are included in the scope of the present invention and are incorporated herein by reference. Here, the network device and the intelligent terminal each include an electronic device capable of automatically performing numerical calculation and information processing according to a preset or stored instruction, and hardware thereof includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a programmable gate array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
In one embodiment, if the execution apparatus 1 is implemented by an intelligent terminal, the execution apparatus 1 first obtains a natural language command to be executed through an Application Program Interface (API) provided by the intelligent terminal itself, or through an Application Program Interface (API) provided by a third party apparatus such as a microphone; then, detecting whether the natural language command meets a preset condition; and if the preset condition is met, determining an execution strategy related to the natural language command, and processing the natural language command according to the execution strategy.
In another embodiment, if the execution device 1 is implemented by a network device, the execution device 1 first obtains a natural language command to be executed by receiving the natural language command to be executed sent by an intelligent terminal or by receiving a natural language command to be executed sent by a third-party device such as a microphone; then, detecting whether the natural language command meets a preset condition; if the preset condition is met, determining an execution strategy related to the natural language command; then, the natural language command is processed according to the execution strategy.
In yet another embodiment, if the execution device 1 is implemented by an intelligent terminal and a network device, the execution device 1 first obtains a natural language command to be executed through an Application Program Interface (API) provided by the intelligent terminal itself or an Application Program Interface (API) provided by a third-party device such as a microphone; then, detecting whether the natural language command meets a preset condition; if the preset condition is met, the natural language command is sent to the corresponding network equipment, so that the network equipment determines an execution strategy of the natural language command; and processing the natural language command according to the execution strategy.
Here, it should be noted that, when the execution device 1 is implemented by a smart terminal and a network device cooperatively, the steps executed by the smart terminal and the network device respectively may be changed at will, and the execution steps of the smart terminal and the network device are shown above by way of example only.
Specifically, the detection means 11 detects whether the natural language command to be executed satisfies a predetermined condition. Preferably, the predetermined condition includes, but is not limited to, at least any one of: -the natural language command belongs to a first category; -the natural language command belongs to a second category.
For example, if the predetermined condition includes that the natural language command belongs to a first category, the first category refers to an instruction that expresses an intention such as an information requirement, but the content of the user that the user finally obtains a corresponding service and/or commodity is usually delayed due to reasons such as a need for queuing, a road condition, and the like, and an instruction that the user requirement cannot be effectively met, such as a medical registration instruction, a ticket reservation instruction, a movie ticket reservation instruction, and the like. For example, assuming that the user a wants to register by Voice through the execution device 1 (assuming that the execution device 1 is a self-service registration device of a hospital), assuming that a client, such as Voice-APP, is loaded in the self-service registration device, the user a opens the client, or wakes up the client by Voice, or directly sends a natural language command "help me hang an orthopedic number" to the self-service registration device, and since the natural language command belongs to the first category, the detection device 11 detects that the predetermined condition is satisfied.
For example, if the predetermined condition includes that the natural language command belongs to a second category, the second category refers to explicit hazardous, dangerous instructions (e.g., language instructions violating laws, social justice, social morality, humanitarian guidelines, etc.), and implicit hazardous, dangerous instructions (e.g., potential hazards, risks, etc., resulting from the execution of the instructions).
It will be understood by those skilled in the art that the first category and the second category are only examples, and other existing or future first categories and second categories may be applicable to the present invention, and are included within the scope of the present invention and are herein incorporated by reference.
For example, assuming that the detection device 11 detects that the natural language command to be executed is "what is the method of conducting a bus explosion", since the natural voice command belongs to the second category, the detection device 11 detects that the predetermined condition is satisfied. For another example, if the detection device 11 detects that the natural language command to be executed is "tear down the wall", because the execution of the natural language command may cause the load-bearing wall to tear down, has a potential risk, and belongs to the second category, the detection device 11 detects that the predetermined condition is satisfied.
As another example, it is assumed that the detection device 11 detects that the natural language command to be executed is "a fun-recommended killer game", and although the natural language command contains the dangerous word "killer", it actually means a game, and does not belong to the second category, and therefore, the detection device 11 determines that the predetermined condition is not satisfied.
Then, if the predetermined condition is satisfied, the determining means 12 determines an execution policy regarding the natural language command. Here, the execution policy corresponds to the category to which the natural language command belongs, that is, the execution policy corresponding to the natural language command belonging to different categories is different. Here, the manner in which the determining means 12 determines the execution policy includes, but is not limited to, at least any one of:
1) if the natural language command belongs to the first category, the determining device 12 determines the execution policy according to the resource supply information corresponding to the natural language command. Here, the resource supply information refers to a time period, a number of people in a queue, a supply amount of the contents such as the services and/or the commodities, and the like, which are required to wait for the user to finally obtain the contents such as the corresponding services and/or commodities, based on the natural language command. It should be understood by those skilled in the art that the above-mentioned resource supply information is only an example, and other existing or future resource supply information, such as may be applicable to the present invention, should be included within the scope of the present invention, and is hereby incorporated by reference.
For example, for the natural language command "help me hang an orthopedics number" of the user a, since the detection device 11 detects that it satisfies the predetermined condition and belongs to the first category, the determination device 12 determines that the natural language command is not directly executed according to the resource supply information corresponding to the natural language command, such as the number of orthopedics queuing people.
2) If the natural language command belongs to a second category, wherein the execution policy for the natural language command includes a rejection of executing the natural language command.
For example, for the natural language command "which methods of conducting bus explosions", the detection means 11 detects that it satisfies the predetermined condition, but belongs to the second category because the natural language command is dangerous, the determination means 12 may determine that the execution policy regarding the natural language command includes refusing to execute the natural language command.
The processing means 13 then processes the natural language command according to the execution policy.
For example, for a natural language command "help me hang an orthopedic number" of the user a, because the determining device 12 determines that the natural language command is not directly executed according to the resource supply information corresponding to the natural language command, such as the number of orthopedic queuing people, the processing device 13 provides, according to the execution policy, substitute information for substituting response information corresponding to the natural language command to the user who issued the natural language command, so as to process the natural language command, for example, a surgical number source which can also meet the medical service requirement of the user a but has a small number of waiting people is recommended to the user a, so that the orthopedic number source originally provided to the user a is substituted, optimization of the user requirement is achieved, and the satisfaction degree of the user requirement is further improved.
For example, for a natural language command of the user a, such as "help me to order a ticket from beijing to wuhan tomorrow in tomorrow, G79", assuming that the determining device 12 provides resource supply information corresponding to the natural language command, such as remaining ticket information of G79, according to the determined execution policy that the natural language command is not directly executed, the processing device 13 provides, according to the execution policy, alternative information for substituting response information corresponding to the natural language command to the user who issued the natural language command, so as to process the natural language command, and if there is no remaining ticket in the current G79, other times of the day, such as G405, which can also satisfy the travel requirement of the user a and whose departure time is similar to that of G79, is recommended to the user a, so as to substitute the ticket ordering information of G79 originally provided to the user a.
As another example, a natural language command for user a such as "help me order two x theaters" interstellar specialties at noon today: assuming that the determining device 12 determines that the natural language command is not directly executed according to the resource supply information corresponding to the natural language command, such as the travel time from the current location of the user a to the theater, the processing device 13 provides the user who sent the natural language command with substitute information for replacing the response information corresponding to the natural language command according to the execution policy to process the natural language command, such as that if the travel time from the current location of the user a to the theater is short, and the schedule of the movie ticket according to the instruction of the user a will cause the user a not to arrive at the theater but the movie of the current theater is played, then the "star project" of the next theater on the same day that can also satisfy the viewing requirement of the user a will be: the movie ticket information of the city of thousands of stars is recommended to the user A, or the inter-star specialties of other movie theaters close to the user A in the midday time slot of the day: the movie tickets information of the city of thousands of stars is provided for the user a, thereby replacing the last time "interstellar speciality: movie tickets information of the city of thousands of stars.
For another example, for the natural language command "which methods to implement bus explosions" because the determination device 12 may determine that the execution policy regarding the natural language command includes refusal to execute the natural language command, the processing device 13 does not execute the natural language command "which methods to implement bus explosions" according to the execution policy, that is, does not respond to the natural language command.
Preferably, the processing device 13 may further provide rejection response information for rejecting execution of the natural language command to the user who issued the natural language command according to the execution policy, for example, provide rejection response information for rejecting execution of the natural language command "what the method for implementing bus explosion is" to be rejected ", for example," to be rejected for execution because your language instruction contains dangerous information ".
More preferably, the execution apparatus 1 further comprises providing means (not shown). Specifically, the providing means provides adjustment response information for adjusting the natural language command to the user so that the user adjusts the natural language command.
For example, for the natural language command "what is the method of conducting bus explosion", since the determination device 12 may determine that the execution policy on the natural language command includes refusing to execute the natural language command, the providing device may provide the adjustment response information for adjusting the natural language command to the user, such as providing the adjustment response information "please re-input" to the user a, so that the user adjusts the natural language command.
FIG. 2 illustrates a flow diagram of a method for processing natural language commands in accordance with another aspect of the invention.
Wherein, the method comprises a step S1, a step S2 and a step SS 3.
Specifically, in step S1, the execution apparatus 1 detects whether the natural language command to be executed satisfies a predetermined condition; if the predetermined condition is satisfied, in step S2, the execution apparatus 1 determines an execution policy regarding the natural language command; in step S3, the execution apparatus 1 processes the natural language command according to the execution policy.
Here, the execution apparatus 1 refers to an apparatus capable of detecting whether a natural language command to be executed satisfies a predetermined condition, determining an execution policy regarding the natural language command if the predetermined condition is satisfied, and processing the natural language command according to the execution policy.
In a specific embodiment, the execution device 1 may be implemented by an intelligent terminal, or implemented by a network device or a device formed by integrating a network device and an intelligent terminal through a network (i.e., the intelligent terminal and the network device cooperate with each other), or included in the intelligent terminal as a software module and/or a hardware module, or connected with the intelligent terminal in a wired or wireless manner as a hardware device. Herein, the network device includes, but is not limited to, implementations such as a network host, a single network server, a set of multiple network servers, or a set of cloud computing-based computers. Here, the cloud is made up of a large number of hosts or web servers based on cloud computing (CloudComputing), which is a type of distributed computing, a super virtual computer consisting of a collection of loosely coupled computers.
Here, the intelligent terminal may be any electronic product that can perform human-computer interaction with a user through one or more modes such as a keyboard, a touch pad, a touch screen, a remote controller, voice interaction, or a handwriting device, for example, a PC, a mobile phone, a smart phone, a PDA, a wearable device, a palm PC PPC, a wearable device, a tablet computer, a smart car machine, a smart television, a smart sound box, a medical self-service registration device, and the like. In practical application, when the execution device 1 is an intelligent terminal, a client (which may be in an APP form) capable of understanding, processing and responding to the natural language command of the user and outputting a response result may be mounted/installed thereon, or the client may only perform voice recognition on the natural language command input by the user but need a corresponding server to understand, process and respond to the natural language command of the user, and then return the response result to the client for output. Including, but not limited to, the internet, a wide area network, a metropolitan area network, a local area network, a VPN network, a wireless Ad Hoc network (Ad Hoc network), etc.
It should be understood by those skilled in the art that the above-mentioned implementation device 1 is only an example, and other existing or future network devices or intelligent terminals may be applicable to the present invention, and are included in the scope of the present invention and are incorporated herein by reference. Here, the network device and the intelligent terminal each include an electronic device capable of automatically performing numerical calculation and information processing according to a preset or stored instruction, and hardware thereof includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a programmable gate array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
In one embodiment, if the execution apparatus 1 is implemented by an intelligent terminal, the execution apparatus 1 first obtains a natural language command to be executed through an Application Program Interface (API) provided by the intelligent terminal itself, or through an Application Program Interface (API) provided by a third party apparatus such as a microphone; then, detecting whether the natural language command meets a preset condition; and if the preset condition is met, determining an execution strategy related to the natural language command, and processing the natural language command according to the execution strategy.
In another embodiment, if the execution device 1 is implemented by a network device, the execution device 1 first obtains a natural language command to be executed by receiving the natural language command to be executed sent by an intelligent terminal or by receiving a natural language command to be executed sent by a third-party device such as a microphone; then, detecting whether the natural language command meets a preset condition; if the preset condition is met, determining an execution strategy related to the natural language command; then, the natural language command is processed according to the execution strategy.
In yet another embodiment, if the execution device 1 is implemented by an intelligent terminal and a network device, the execution device 1 first obtains a natural language command to be executed through an Application Program Interface (API) provided by the intelligent terminal itself or an Application Program Interface (API) provided by a third-party device such as a microphone; then, detecting whether the natural language command meets a preset condition; if the preset condition is met, the natural language command is sent to the corresponding network equipment, so that the network equipment determines an execution strategy of the natural language command; and processing the natural language command according to the execution strategy.
Here, it should be noted that, when the execution device 1 is implemented by a smart terminal and a network device cooperatively, the steps executed by the smart terminal and the network device respectively may be changed at will, and the execution steps of the smart terminal and the network device are shown above by way of example only.
Specifically, in step S1, the execution apparatus 1 detects whether the natural language command to be executed satisfies a predetermined condition. Preferably, the predetermined condition includes, but is not limited to, at least any one of: -the natural language command belongs to a first category; -the natural language command belongs to a second category.
For example, if the predetermined condition includes that the natural language command belongs to a first category, the first category refers to an instruction that expresses an intention such as an information requirement, but the content of the user that finally obtains a corresponding service and/or commodity is usually delayed due to a requirement of queuing, a road condition, and the like, and an instruction that the user requirement cannot be effectively met, such as a medical registration instruction, a ticket reservation instruction, a movie ticket reservation instruction, and the like. For example, assuming that the user a wants to register by Voice through the execution device 1 (assuming that the execution device 1 is a self-service registration device of a hospital), assuming that a client such as Voice-APP is loaded in the self-service registration device, the user a opens the client, or wakes up the client by Voice, or directly sends a natural language command "help me hang an orthopedic number" to the self-service registration device, and since the natural language command belongs to the first category, in step S1, the execution device 1 detects that the predetermined condition is satisfied.
For example, if the predetermined condition includes that the natural language command belongs to a second category, the second category refers to explicit hazardous, dangerous instructions (e.g., language instructions violating laws, social justice, social morality, humanitarian guidelines, etc.), and implicit hazardous, dangerous instructions (e.g., potential hazards, risks, etc., resulting from the execution of the instructions).
It will be understood by those skilled in the art that the first category and the second category are only examples, and other existing or future first categories and second categories may be applicable to the present invention, and are included within the scope of the present invention and are herein incorporated by reference.
. For example, assuming that the execution device 1 detects that the natural language command to be executed is "what is a method of conducting a bus explosion" in step S1, since the natural voice command belongs to the second category, the execution device 1 detects that the predetermined condition is satisfied in step S1.
As another example, assume that in step S1, the execution apparatus 1 detects that the natural language command to be executed is "recommend a fun killer game", and although the natural language command contains the dangerous word "killer", it actually means a game, and does not belong to the second category, and therefore, in step S1, the execution apparatus 1 determines that the predetermined condition is not satisfied. For another example, assuming that the execution device 1 detects that the natural language command to be executed is "detach the wall", which is a potential risk due to the detachment of the load bearing wall caused by the execution of the natural language command, in step S1, the execution device 1 detects that the predetermined condition is satisfied in step S1.
Next, if the predetermined condition is satisfied, in step S2, the execution apparatus 1 determines an execution policy regarding the natural language command. Here, the execution policy corresponds to the category to which the natural language command belongs, that is, the execution policy corresponding to the natural language command belonging to different categories is different. Here, in step S2, the execution apparatus 1 determines the execution policy in a manner including, but not limited to, at least any one of:
1) if the natural language command belongs to the first category, in step S2, the execution device 1 determines the execution policy according to the resource supply information corresponding to the natural language command. Here, the resource supply information refers to a time period, a number of people in a queue, a supply amount of the contents such as the services and/or the commodities, and the like, which are required to wait for the user to finally obtain the contents such as the corresponding services and/or commodities, based on the natural language command. It should be understood by those skilled in the art that the above-mentioned resource supply information is only an example, and other existing or future resource supply information, such as may be applicable to the present invention, should be included within the scope of the present invention and is hereby incorporated by reference.
For example, for the natural language command "help me hang an orthopedics number" of the user a and belongs to the first category, since the execution device 1 detects that it satisfies the predetermined condition in step S1, the execution device 1 determines the execution policy that the natural language command is not directly executed according to the resource supply information corresponding to the natural language command, such as the number of orthopedics queue persons, in step S2.
2) If the natural language command belongs to a second category, wherein the execution policy for the natural language command includes a rejection of executing the natural language command.
For example, for the natural language command "what is the method of conducting a bus explosion", the execution apparatus 1 detects that it satisfies the predetermined condition in step S1, but belongs to the second category because the natural voice command is dangerous, and then the execution apparatus 1 may determine that the execution policy regarding the natural language command includes refusing to execute the natural language command in step S2.
Then, in step S3, the execution apparatus 1 processes the natural language command according to the execution policy.
For example, for the natural language command "help me hang an orthopedic number" of the user a, because in step S2, the execution device 1 provides, according to the execution policy, the resource supply information corresponding to the natural language command, such as the number of orthopedic queuing people, and the determined execution policy is that the natural language command is not directly executed, in step S3, the execution device 1 provides, according to the execution policy, the substitute information that replaces the response information corresponding to the natural language command to the user that issued the natural language command, so as to process the natural language command, for example, recommend, to the user a, a surgical number source that can also meet the medical service requirement of the user a but has a small number of waiting people, thereby replacing the orthopedic number source originally provided to the user a, implementing optimization of the user requirement, and further improving the satisfaction degree of the user requirement.
If the natural language command of the user a, such as "help me to order a ticket from beijing tomorrow to wuhan tomorrow, G79", in step S2, the execution device 1 provides, according to the resource supply information corresponding to the natural language command, such as the remaining ticket information of G79, and the determined execution policy is that the natural language command is not directly executed, in step S3, the execution device 1 provides, according to the execution policy, alternative information that replaces the response information corresponding to the natural language command to the user that issued the natural language command, so as to process the natural language command, and if there is no remaining ticket in the current G79, other vehicles, such as G405, on the same day that can also meet the travel demand of the user a and that have departure time similar to that of G79, are recommended to the user a, so as to replace the G79 ticket ordering information originally provided to the user a.
As another example, a natural language command for user a such as "help me order two x theaters" interstellar specialties at noon today: the city of thousand stars movie ticket "assumes that in step S2, the execution device 1 determines the execution strategy that the natural language command is not directly executed according to the resource supply information corresponding to the natural language command, such as the travel time from the current location of the user a to the theater, the execution apparatus 1 provides substitute information substituting the response information corresponding to the natural language command to the user who issued the natural language command according to the execution policy in step S3, to process the natural language command, if the travel time from the current location of user a to the theater is short, ordering a movie ticket at the user a's instruction will result in user a not arriving at the theater and the movie being played for the current time, the "interplanetary speciality" of the next session of the theater on the day that would also meet the viewing needs of user a would then be: the movie ticket information of the city of thousands of stars is recommended to the user A, or the inter-star specialties of other movie theaters close to the user A in the midday time slot of the day: the movie tickets information of the city of thousands of stars is provided for the user a, thereby replacing the last time "interstellar speciality: movie tickets information of the city of thousands of stars.
For another example, as for the natural language command "which methods to conduct bus explosions", since the execution device 1 may determine that the execution policy about the natural language command includes refusal to execute the natural language command in step S2, the execution device 1 does not execute the natural language command "which methods to conduct bus explosions" according to the execution policy, that is, does not respond to the natural language command in step S3.
Preferably, in step S3, the execution device 1 may further provide rejection response information for rejecting execution of the natural language command to the user who issued the natural language command according to the execution policy, for example, provide rejection response information for rejecting execution of the natural language command, such as "what methods for implementing bus explosion are" to be rejected ", such as" being rejected for execution because your language instruction contains dangerous information ".
More preferably, the execution apparatus 1 further includes step S4 (not shown). Specifically, in step S4, the execution apparatus 1 provides adjustment response information for adjusting the natural language command to the user so that the user adjusts the natural language command.
For example, as for the natural language command "what is the method of conducting bus explosion", since the execution device 1 may determine that the execution policy on the natural language command includes rejection of execution of the natural language command in step S2, the execution device 1 may provide adjustment response information for adjusting the natural language command to the user, such as providing adjustment response information "please re-input" to the user a in step S4, so that the user adjusts the natural language command.
FIG. 3 illustrates a block diagram of an exemplary computer system/server suitable for use in implementing embodiments of the present invention. The computer system/server 2 shown in FIG. 3 is only an example and should not impose any limitations on the functionality or scope of use of embodiments of the present invention.
As shown in fig. 3, the computer system/server 2 is in the form of a general purpose computing device. The components of computer system/server 2 may include, but are not limited to: one or more processors or processing units 21, a system memory 22, and a bus 23 that couples various system components including the system memory 22 and the processing unit 21.
Bus 23 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, and a processor or 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 2 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer system/server 2 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 22 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)221 and/or cache memory 222. The computer system/server 2 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 223 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 3, often 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 these cases, each drive may be connected to bus 23 by one or more data media interfaces. System memory 22 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 224 having a set (at least one) of program modules 225 may be stored, for example, in system memory 22, such program modules 225 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 may comprise an implementation of a network environment. Program modules 225 generally perform the functions and/or methodologies of the described embodiments of the invention.
The computer system/server 2 may also communicate with one or more external devices 25 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with the computer system/server 2, and/or with any devices (e.g., network card, modem, etc.) that enable the computer system/server 2 to communicate with one or more other computing devices. Such communication may be through input/output (I/O) interfaces 26. Also, the computer system/server 2 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 20. As shown in FIG. 3, the network adapter 20 communicates with the other modules of the computer system/server 2 via a bus 23. 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 2, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 21 executes various functional applications and data processing by executing programs stored in the system memory 22, for example, implementing a method for processing natural language commands, wherein the method comprises the steps of:
a, detecting whether a natural language command to be executed meets a preset condition;
b, if the preset condition is met, determining an execution strategy related to the natural language command;
c processing the natural language command according to the execution strategy.
It should be noted that the present invention may be implemented in software and/or in a combination of software and hardware, for example, as an Application Specific Integrated Circuit (ASIC), a general purpose computer or any other similar hardware device. In one embodiment, the software program of the present invention may be executed by a processor to implement the steps or sub-steps described above. Also, the software programs (including associated data structures) of the present invention can be stored in a computer readable recording medium, such as RAM memory, magnetic or optical drive or diskette and the like. Additionally, some of the steps or sub-steps of the invention may be implemented in hardware, for example, as circuitry that cooperates with the processor to perform various steps or sub-steps.
In addition, some of the present invention can be applied as a computer program product, such as computer program instructions, which when executed by a computer, can invoke or provide the method and/or technical solution according to the present invention through the operation of the computer. Program instructions which invoke the methods of the present invention may be stored on a fixed or removable recording medium and/or transmitted via a data stream on a broadcast or other signal-bearing medium and/or stored within a working memory of a computer device operating in accordance with the program instructions. An embodiment according to the invention herein comprises an apparatus comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the apparatus to perform a method and/or solution according to embodiments of the invention as described above.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the apparatus claims may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.

Claims (11)

1. A method for processing natural language commands, wherein the method comprises the steps of:
detecting whether a natural language command to be executed is a dangerous instruction;
if the command is not a dangerous natural language command, determining a corresponding first execution strategy related to the natural language command;
if the execution strategy is determined that the natural language command is not directly executed according to the resource supply information corresponding to the natural language command, providing substitute information for substituting response information corresponding to the natural language command to a user who sends the natural language command according to the first execution strategy so as to process the natural language command;
if the command is a dangerous natural language command, determining a corresponding second execution strategy related to the natural language command;
and providing refusal response information refusing to execute the natural language command to a user sending the natural language command according to the second execution strategy.
2. The method of claim 1, wherein the risky natural language commands comprise verbal instructions violating legal, social ethics, humanitarian guidelines, and implicit hazardous, risky instructions.
3. The method according to claim 1 or 2, wherein the non-risky natural language command comprises a register instruction, a predetermined instruction.
4. The method according to claim 1 or 2, wherein the method further comprises the step of:
providing adjustment response information for adjusting the natural language command to the user, so that the user adjusts the natural language command.
5. An execution device for processing natural language commands, wherein the execution device comprises:
detecting means for detecting whether a natural language command to be executed is a dangerous instruction;
determining means for determining a corresponding first execution policy for the natural language command if the command is not a dangerous natural language command; if the command is a dangerous natural language command, determining a corresponding second execution strategy related to the natural language command;
processing means for providing substitute information for substituting response information corresponding to the natural language command to a user who issued the natural language command according to the first execution policy to process the natural language command if it is determined that the execution policy is that the natural language command is not directly executed according to the resource supply information corresponding to the natural language command; or providing refusal response information refusing to execute the natural language command to a user sending the natural language command according to the second execution strategy.
6. The execution device of claim 5, wherein the risky natural language commands comprise verbal instructions violating legal, social ethics, humanitarian guidelines, and implicit hazardous, risky instructions.
7. The execution device according to claim 5 or 6, wherein the non-risky natural language command comprises a register instruction, a predetermined instruction.
8. The execution device of claim 5 or 6, wherein the execution device further comprises:
providing means for providing adjustment response information for adjusting the natural language command to the user so that the user adjusts the natural language command.
9. The execution device of claim 5 or 6, wherein the execution device is a smart terminal.
10. A computing device, comprising:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method recited by any of claims 1-4.
11. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the method of any one of claims 1 to 4.
CN201710842798.8A 2017-09-18 2017-09-18 Method, device and storage medium for processing natural language command Active CN107680590B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710842798.8A CN107680590B (en) 2017-09-18 2017-09-18 Method, device and storage medium for processing natural language command

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710842798.8A CN107680590B (en) 2017-09-18 2017-09-18 Method, device and storage medium for processing natural language command

Publications (2)

Publication Number Publication Date
CN107680590A CN107680590A (en) 2018-02-09
CN107680590B true CN107680590B (en) 2020-10-02

Family

ID=61136787

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710842798.8A Active CN107680590B (en) 2017-09-18 2017-09-18 Method, device and storage medium for processing natural language command

Country Status (1)

Country Link
CN (1) CN107680590B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108920125B (en) * 2018-04-03 2019-10-18 北京小蓦机器人技术有限公司 It is a kind of for determining the method and apparatus of speech recognition result
CN110163398B (en) * 2019-05-07 2022-02-01 厦门钛尚人工智能科技有限公司 Stadium booking method and system based on voice recognition
CN113593573B (en) * 2021-07-30 2024-01-12 思必驰科技股份有限公司 Machine interaction method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011135328A (en) * 2009-12-24 2011-07-07 Hitachi Ltd Scam telephone call detection and report system, and detecting and reporting method
CN103516915A (en) * 2012-06-27 2014-01-15 百度在线网络技术(北京)有限公司 Method, system and device for replacing sensitive words in call process of mobile terminal
CN103811003A (en) * 2012-11-13 2014-05-21 联想(北京)有限公司 Voice recognition method and electronic equipment
CN103941686A (en) * 2014-04-14 2014-07-23 美的集团股份有限公司 Voice control method and system
CN104505090A (en) * 2014-12-15 2015-04-08 北京国双科技有限公司 Method and device for voice recognizing sensitive words

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011135328A (en) * 2009-12-24 2011-07-07 Hitachi Ltd Scam telephone call detection and report system, and detecting and reporting method
CN103516915A (en) * 2012-06-27 2014-01-15 百度在线网络技术(北京)有限公司 Method, system and device for replacing sensitive words in call process of mobile terminal
CN103811003A (en) * 2012-11-13 2014-05-21 联想(北京)有限公司 Voice recognition method and electronic equipment
CN103941686A (en) * 2014-04-14 2014-07-23 美的集团股份有限公司 Voice control method and system
CN104505090A (en) * 2014-12-15 2015-04-08 北京国双科技有限公司 Method and device for voice recognizing sensitive words

Also Published As

Publication number Publication date
CN107680590A (en) 2018-02-09

Similar Documents

Publication Publication Date Title
CN107957776B (en) Active virtual assistant
US12041021B2 (en) Systems and methods for improved processing of message queries
CN110741431A (en) Cross-device handover
CN107680590B (en) Method, device and storage medium for processing natural language command
TW201828120A (en) Virtual assistant generation of group recommendations
US10572104B2 (en) Electronic device for executing a plurality of applications and method for controlling the electronic device
US10171403B2 (en) Determining intended electronic message recipients via linguistic profiles
CN107944000B (en) Flight freight rate updating method and device, electronic equipment and storage medium
CN112055064B (en) Data synchronization method, device, equipment and storage medium
US20160350136A1 (en) Assist layer with automated extraction
WO2019140826A1 (en) Electronic red envelope gifting device and method and computer readable storage medium
US11763230B2 (en) Trend detection via machine learning models
CN113469732A (en) Content understanding-based auditing method and device and electronic equipment
CN113221846A (en) Image recognition method, apparatus, device, storage medium, and program product
WO2015195902A1 (en) Issue response and prediction
CN106355309A (en) Processing method and system for business information alteration
US20200183762A1 (en) Simulation distraction suppression
US20090138504A1 (en) Electronic calendar scheduling method
CN115061762A (en) Page display method and device, electronic equipment and medium
CN113900783A (en) Task processing method, device and equipment based on limited resources and storage medium
US20130205218A1 (en) Event triggered viewing
US11151612B2 (en) Automated product health risk assessment
US20110276723A1 (en) Assigning input devices to specific sessions
CN113344620A (en) Method, device and storage medium for issuing welfare information
CN110874390A (en) Information processing apparatus, information processing method, and non-transitory 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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220907

Address after: Room 35201, 5th Floor, Zone 2, Building 3, No. 2, Zhuantang Science and Technology Economic Zone, Xihu District, Hangzhou City, Zhejiang Province, 310024

Patentee after: Hangzhou suddenly Cognitive Technology Co.,Ltd.

Address before: 100080 Room 401, gate 2, east area, block a, 768 Industrial Park, No.5, Xueyuan Road, Haidian District, Beijing

Patentee before: BEIJING XIAOMO ROBOT TECHNOLOGY CO.,LTD.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240527

Address after: Room 701, 7th Floor, Building 6, No. A1 Chaoqian Road, Science and Technology Park, Changping District, Beijing, 100000

Patentee after: Lianzhong cluster (Beijing) Technology Co.,Ltd.

Country or region after: China

Address before: Room 35201, 5th Floor, Zone 2, Building 3, No. 2, Zhuantang Science and Technology Economic Zone, Xihu District, Hangzhou City, Zhejiang Province, 310024

Patentee before: Hangzhou suddenly Cognitive Technology Co.,Ltd.

Country or region before: China

TR01 Transfer of patent right