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.