CN117014245A - Method and device for selecting instruction execution equipment, storage medium and electronic device - Google Patents

Method and device for selecting instruction execution equipment, storage medium and electronic device Download PDF

Info

Publication number
CN117014245A
CN117014245A CN202210467366.4A CN202210467366A CN117014245A CN 117014245 A CN117014245 A CN 117014245A CN 202210467366 A CN202210467366 A CN 202210467366A CN 117014245 A CN117014245 A CN 117014245A
Authority
CN
China
Prior art keywords
target
element type
control statement
intelligent
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210467366.4A
Other languages
Chinese (zh)
Inventor
杨令铎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home 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 Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202210467366.4A priority Critical patent/CN117014245A/en
Priority to PCT/CN2022/096433 priority patent/WO2023206701A1/en
Publication of CN117014245A publication Critical patent/CN117014245A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2816Controlling appliance services of a home automation network by calling their functionalities
    • H04L12/282Controlling appliance services of a home automation network by calling their functionalities based on user interaction within the home
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B15/00Systems controlled by a computer
    • G05B15/02Systems controlled by a computer electric
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/418Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS], computer integrated manufacturing [CIM]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/211Syntactic parsing, e.g. based on context-free grammar [CFG] or unification grammars
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/22Procedures used during a speech recognition process, e.g. man-machine dialogue
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/22Procedures used during a speech recognition process, e.g. man-machine dialogue
    • G10L2015/223Execution procedure of a spoken command
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The application provides a method and a device for selecting instruction execution equipment, a storage medium and an electronic device, and relates to the technical field of intelligent home/intelligent families, wherein the method for selecting the instruction execution equipment comprises the following steps: under the condition that a target control statement sent by a target object is obtained, extracting elements from the target control statement to obtain at least one target element; determining a target component flow matched with the target control statement according to the element type of at least one target element, wherein the target component flow comprises components matched with the element type of each target element, and the components matched with the element type of each target element are used for executing equipment selection operation on a plurality of intelligent equipment according to each target element; sequentially calling each component in the target component flow to execute device selection operation on a plurality of intelligent devices to obtain target intelligent devices; and controlling the target intelligent device to execute the target device operation indicated by the target control statement.

Description

Method and device for selecting instruction execution equipment, storage medium and electronic device
Technical Field
The present application relates to the field of communications, and in particular, to a method and apparatus for selecting an instruction execution device, a storage medium, and an electronic apparatus.
Background
In smart home scenarios, there are a variety of smart devices (which may be smart home devices), and when a user uses voice as an entry control device, selection of the smart device is often required. For example, when a user speaks "turn up 2 degrees" to a smart device, that user's intent may be to operate a smart air conditioner if the user is in a living room, while if the user is in a kitchen or toilet, the user's high probability is to operate a smart water heater.
In order to respond to an input control instruction, selection of a responding device needs to be made based on a device selection code. Because the device selection logic is very complex, the developer is required to comprehensively consider various factors to write the device selection codes, and the more the factors are considered, the more complex the code logic. However, current device selection codes are less iterative and robust, resulting in less efficient development and maintenance of the device selection engine.
As can be seen, the selection manner of the instruction execution device in the related art has a problem of low efficiency of development and maintenance of the device selection engine due to poor iteratability and robustness of the device selection code.
Disclosure of Invention
The embodiment of the application provides a method and a device for selecting instruction execution equipment, a storage medium and an electronic device, which at least solve the problem that the efficiency of developing and maintaining an equipment selection engine is low due to poor iterative performance and robustness of equipment selection codes in the selection mode of the instruction execution equipment in the related technology.
According to an aspect of an embodiment of the present application, there is provided a method for selecting an instruction execution device, including: under the condition that a target control statement sent by a target object is obtained, extracting elements from the target control statement to obtain at least one target element; determining a target component flow matched with the target control statement according to the element type of the at least one target element, wherein the target component flow comprises components matched with the element type of each target element, and the components matched with the element type of each target element are used for executing equipment selection operation on a plurality of intelligent equipment according to each target element; sequentially calling each component in the target component flow to execute device selection operation on the plurality of intelligent devices to obtain target intelligent devices; and controlling the target intelligent device to execute the target device operation indicated by the target control statement.
In an exemplary embodiment, the extracting the element of the target control statement to obtain at least one target element includes: extracting elements from the target control statement according to a preset element type set to obtain the at least one target element, wherein the element type of each target element is a preset element type, and the preset element type set comprises at least one of the following elements: the type of device, the name of the device, the floor on which the device is located.
In an exemplary embodiment, the extracting the element of the target control statement according to the preset element type set to obtain the at least one target element includes: the following steps are respectively executed by taking each preset element type as the current preset element type, so that the at least one target element is obtained: analyzing the target control statement according to the current preset element type; and determining the element corresponding to the current preset element type as a target element under the condition that the element corresponding to the current preset element type is parsed from the target control statement.
In an exemplary embodiment, the determining, according to the element type of the at least one target element, a target component flow matched with the target control statement includes: determining a target binary vector corresponding to the target control statement according to the element type of the at least one target element, wherein binary bits in the target binary vector are in one-to-one correspondence with preset element types in the preset element type set, and the values of the binary bits in the target binary vector are used for indicating whether the target control statement contains the corresponding elements of the preset element types or not; and determining that the corresponding binary vector in the component flows is the component flow of the target binary vector, wherein binary bits in the binary vector corresponding to each component flow are in one-to-one correspondence with preset element types in the preset element type set, and the binary bit value in the binary vector corresponding to each component flow is used for indicating whether the component matched with the corresponding preset element type is contained in each component flow.
In an exemplary embodiment, the determining, according to the element type of the at least one target element, a target binary vector corresponding to the target control statement includes: determining a binary vector corresponding to the element type of each target element, wherein in the binary vector corresponding to the element type of each target element, the value of binary bits corresponding to the element type of each target element is 1, and the values of binary bits except for the binary bits corresponding to the element type of each target element are 0; and performing bitwise or operation on the binary vector corresponding to the element type of each target element to obtain the target binary vector.
In an exemplary embodiment, the method further comprises: and under the condition that no element of any preset element type is extracted from the target control statement, determining the preset component flow as a target component flow matched with the target control statement.
In an exemplary embodiment, the controlling the target smart device to perform the target device operation indicated by the target control statement includes: generating a target control instruction corresponding to the target control statement, wherein the target control instruction is used for indicating the target intelligent device to execute the target device operation; and sending the target control instruction to the target intelligent equipment to instruct the target intelligent equipment to execute the target equipment operation.
According to another aspect of the embodiment of the present application, there is also provided a selecting apparatus of an instruction execution device, including: the extraction unit is used for extracting elements of the target control statement under the condition that the target control statement sent by the target object is acquired, so as to obtain at least one target element; a first determining unit, configured to determine, according to an element type of the at least one target element, a target component flow matched with the target control statement, where the target component flow includes a component matched with an element type of each target element, and the component matched with the element type of each target element is configured to perform a device selection operation on a plurality of intelligent devices according to each target element; the execution unit is used for sequentially calling each component in the target component flow to execute device selection operation on the plurality of intelligent devices to obtain target intelligent devices; and the control unit is used for controlling the target intelligent device to execute the target device operation indicated by the target control statement.
In an exemplary embodiment, the extraction unit includes: the extraction module is used for extracting elements of the target control statement according to a preset element type set to obtain at least one target element, wherein the element type of each target element is a preset element type, and the preset element type set comprises at least one of the following elements: the type of device, the name of the device, the floor on which the device is located.
In one exemplary embodiment, the extraction module includes: the first execution sub-module is used for respectively taking each preset element type as the current preset element type to execute the following steps to obtain the at least one target element: analyzing the target control statement according to the current preset element type; and determining the element corresponding to the current preset element type as a target element under the condition that the element corresponding to the current preset element type is parsed from the target control statement.
In an exemplary embodiment, the first determining unit includes: a first determining module, configured to determine, according to an element type of the at least one target element, a target binary vector corresponding to the target control statement, where binary bits in the target binary vector are in one-to-one correspondence with preset element types in the preset element type set, and a value of a binary bit in the target binary vector is used to indicate whether the target control statement includes an element of a corresponding preset element type; and the second determining module is used for determining that the corresponding binary vector in the plurality of component flows is the component flow of the target binary vector as the target component flow, wherein the binary bit in the binary vector corresponding to each component flow corresponds to the preset element type in the preset element type set one by one, and the value of the binary bit in the binary vector corresponding to each component flow is used for indicating whether the component matched with the corresponding preset element type is contained in each component flow.
In one exemplary embodiment, the first determining module includes: a determining submodule, configured to determine a binary vector corresponding to an element type of each target element, where, in the binary vector corresponding to the element type of each target element, a value of a binary bit corresponding to the element type of each target element is 1, and values of binary bits other than the binary bit corresponding to the element type of each target element are 0; and the second execution sub-module is used for executing bitwise or operation on the binary vector corresponding to the element type of each target element to obtain the target binary vector.
In an exemplary embodiment, the apparatus further comprises: and the second determining unit is used for determining the preset component flow as a target component flow matched with the target control statement under the condition that no element of any preset element type is extracted from the target control statement.
In an exemplary embodiment, the control unit includes: the generation module is used for generating a target control instruction corresponding to the target control statement, wherein the target control instruction is used for indicating the target intelligent device to execute the target device operation; and the sending module is used for sending the target control instruction to the target intelligent equipment so as to instruct the target intelligent equipment to execute the target equipment operation.
According to yet another aspect of the embodiments of the present application, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program is configured to execute the method of selecting the above-described instruction execution apparatus when running.
According to still another aspect of the embodiments of the present application, there is further provided an electronic apparatus including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the method for selecting the instruction execution device described above through the computer program.
In the embodiment of the application, a mode of componentizing the equipment selection code is adopted, and at least one target element is obtained by extracting elements of a target control statement under the condition that the target control statement sent by a target object is obtained; determining a target component flow matched with the target control statement according to the element type of at least one target element, wherein the target component flow comprises components matched with the element type of each target element, and the components matched with the element type of each target element are used for executing equipment selection operation on a plurality of intelligent equipment according to each target element; sequentially calling each component in the target component flow to execute device selection operation on a plurality of intelligent devices to obtain target intelligent devices; the intelligent control device performs target device operation indicated by a target control statement, because the device selection code is componentized by taking a statement element as a unit, a corresponding device selection component (or a device screening component) is configured for element types of different statement elements, and a corresponding component flow is set through the statement element types contained in the control statement, namely, a call flow of the component, when the control statement is acquired, the corresponding component flow is selected based on the element types of the statement elements contained in the control statement, and the device selection is performed according to the corresponding component flow, the device selection component can be used iteratively in scenes such as version updating, the aim of improving the iterative performance of the device code can be achieved, and even if the component matched with the element type of one statement element is abnormal, the execution of the component flow which does not contain the component is not affected, and the code quantity contained in the device selection component of the element type of a certain statement element is small, thereby facilitating development and maintenance, the technical effect of improving the development and maintenance efficiency of the device selection engine can be achieved, and further the problem of poor iterative performance of the instruction execution device in related technology and the device selection engine can be solved, and the problem of poor iterative performance of the device selection is caused by the fact that the device selection has poor iterative performance of the device is difficult maintenance efficiency.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the application or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic diagram of a hardware environment of an alternative method of instruction execution device selection in accordance with an embodiment of the present application;
FIG. 2 is a flow chart of an alternative method of selecting an instruction execution device according to an embodiment of the present application;
FIG. 3 is a flow chart of an alternative method of selecting an instruction execution device according to an embodiment of the present application;
FIG. 4 is a schematic diagram of components of an alternative method of selecting an instruction execution device according to an embodiment of the present application;
FIG. 5 is a code schematic for an alternative element encoding according to an embodiment of the application;
FIG. 6 is a code schematic for an alternative flow encoding according to an embodiment of the application;
FIG. 7 is a code schematic diagram of an alternative flow component in accordance with an embodiment of the application;
FIG. 8 is a flow chart of a method of selection of an alternative instruction execution device according to an embodiment of the present application;
FIG. 9 is a block diagram of a selection means of an alternative instruction execution device according to an embodiment of the present application;
fig. 10 is a block diagram of an alternative electronic device according to an embodiment of the application.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of an embodiment of the present application, there is provided a method for selecting an instruction execution device. The selection method of the instruction execution device is widely applied to full-house intelligent digital control application scenes such as intelligent Home (Smart Home), intelligent Home device ecology, intelligent Home (Intelligence House) ecology and the like. Alternatively, the selection method of the instruction execution device in the present embodiment may be applied to a hardware environment constituted by the terminal 102 and the server 104 as shown in fig. 1. As shown in fig. 1, the server 104 is connected to the terminal 102 through a network, and may be used to provide services (such as application services, etc.) for the terminal or clients installed on the terminal, and cloud computing and/or edge computing services may be configured on the server or independent of the server, for providing data computing services for the server 104.
The network may include, but is not limited to, at least one of: wired network, wireless network. The wired network may include, but is not limited to, at least one of: a wide area network, a metropolitan area network, a local area network, and the wireless network may include, but is not limited to, at least one of: WIFI (Wireless Fidelity ), bluetooth. The terminal 102 may not be limited to a PC, a mobile phone, a tablet computer, an intelligent air conditioner, an intelligent smoke machine, an intelligent refrigerator, an intelligent oven, an intelligent cooking range, an intelligent washing machine, an intelligent water heater, an intelligent washing device, an intelligent dish washer, an intelligent projection device, an intelligent television, an intelligent clothes hanger, an intelligent curtain, an intelligent video, an intelligent socket, an intelligent sound box, an intelligent fresh air device, an intelligent kitchen and toilet device, an intelligent bathroom device, an intelligent sweeping robot, an intelligent window cleaning robot, an intelligent mopping robot, an intelligent air purifying device, an intelligent steam box, an intelligent microwave oven, an intelligent kitchen appliance, an intelligent purifier, an intelligent water dispenser, an intelligent door lock, and the like.
The selection method of the instruction execution device according to the embodiment of the present application may be executed by the server 104, may be executed by the terminal 102, or may be executed by both the server 104 and the terminal 102. The method for selecting the instruction execution device executed by the terminal 102 according to the embodiment of the present application may be executed by a client installed thereon.
Taking the selection method of the instruction execution device in the present embodiment performed by the server 104 as an example, fig. 2 is a schematic flow chart of a selection method of an alternative instruction execution device according to an embodiment of the present application, and as shown in fig. 2, the flow of the method may include the following steps:
step S202, when the target control statement sent by the target object is obtained, extracting elements from the target control statement to obtain at least one target element.
The selection method of the instruction execution device in the embodiment can be applied to a scene that the intelligent device is controlled to execute corresponding device operation through the control statement. The intelligent equipment can be intelligent household equipment located in a user family, can be electronic equipment provided with intelligent chips such as an intelligent television, an intelligent refrigerator and an intelligent water heater, is compared with traditional household equipment, and is provided with a computing module, a network interface, an input/output device and the like, so that the intelligent household equipment has the functions of intelligent analysis and intelligent service.
When a user needs to use a certain smart device, the user may send out a target control statement in a voice manner, etc., and the smart device, other smart devices, or a control device (e.g., a smart phone, a smart speaker) may obtain the target control statement sent out by the target object, and send the obtained target control statement to a target server (an example of the server 104 described above). Here, the target object corresponds to the user, and may be an object that establishes a binding relationship with the smart device, or may be an object that does not establish a binding relationship with the smart device, as long as the target object can be identified.
In this embodiment, after the target control sentence is acquired, the target server may extract at least one target element included in the target control sentence from the target control sentence, where the target element may be a sentence element for performing device selection, and may be, but not limited to, the following sentence elements: the element for indicating the location area of the smart device to be selected, the element for indicating the floor where the smart device to be selected is located, and the element for indicating the device name or the device nickname of the smart device to be selected are not limited in this embodiment.
At least one target element is a predetermined sentence element for performing device selection, and is not related to a specific control sentence. The process of extracting the element from the target control statement to obtain at least one target element may be: and extracting the elements of the target control statement according to the preset element types, and determining the elements which can be successfully extracted from the target control statement as target elements so as to obtain at least one target element.
For example, the preset element types include: "floor", "room name", "device name". When the control sentence is "set the temperature of the first floor bedroom air conditioner to 25 degrees", the target elements contained in the control sentence can be determined by analyzing the control sentence as follows: "first floor", "bedroom"; an air conditioner.
Step S204, determining a target component flow matched with the target control statement according to the element type of at least one target element, wherein the target component flow comprises components matched with the element type of each target element, and the components matched with the element type of each target element are used for executing device selection operation on a plurality of intelligent devices according to each target element.
Each preset element type may correspond to a component, and the components corresponding to different preset element types are used for performing device screening operations on the plurality of intelligent devices according to the corresponding preset element types. When the component is executed, the plurality of intelligent devices can be screened according to the target elements corresponding to the component, so that intelligent devices matched with the corresponding target elements are obtained. For example, when the component is a component matching a floor, the screening may be performed according to the floor where the plurality of intelligent devices are located, and the intelligent device located at the specific floor may be selected from the plurality of intelligent devices. Alternatively, the preset element types corresponding to different components may be different, for example, component a may correspond to a "floor" element type, and component B may correspond to a "room name" element type.
In this embodiment, after extracting at least one target element, the target server may determine a target component flow matching the target control statement according to the at least one target element. The target component flow may include one or more components, and when the component flow is executed, the components included in the component flow may be sequentially executed according to a preset execution sequence or a randomly generated execution sequence.
The target component flow may include a component matching an element type of each target element, and the component matching the element type of each target element is used to perform a device selection operation on a plurality of intelligent devices according to each target element. Optionally, the target component flow may include components corresponding to the element types of the other elements, for example, components corresponding to the statement issuing positions, in addition to components matching the element types of each target element, and other components included in different component flows may be the same or different, which is not limited in this embodiment.
The process of determining the target component flow matched with the target control statement according to the element type of the at least one target element may be: the element vector matching the element type of the at least one target element is determined according to the element type of the at least one target element, and then the component flow matching the determined element vector is determined as the target component flow matching the element type of the at least one target element, which is not limited in this embodiment.
Step S206, each component in the target component flow is sequentially called to execute device selection operation on the plurality of intelligent devices, and the target intelligent devices are obtained.
In this embodiment, after determining a target component flow that matches an element type of at least one target element, each component in the target component flow may be sequentially called according to the target component flow to perform a device selection operation on a plurality of intelligent devices, so as to obtain a target intelligent device.
Optionally, the process of sequentially calling the target component in the target component flow according to the target component flow to perform the device selection operation on the plurality of intelligent devices to obtain the target intelligent device may be: and performing equipment selection operation on the plurality of intelligent equipment by using one component in the target component flow to obtain the selected intelligent equipment, and continuing to perform equipment selection operation on the selected intelligent equipment by using the next component in the target component flow until all components in the target component flow perform equipment selection operation on the plurality of intelligent equipment, and finally determining the intelligent equipment obtained by performing equipment selection operation on the plurality of intelligent equipment by using all target components as the target intelligent equipment.
For example, when the target component flow includes component a, component B, and component C, the three components may be used in sequence to perform a device selection operation on a plurality of smart devices, to determine a particular smart device (i.e., the target smart device described above).
In this embodiment, in the process of sequentially calling each component in the target component flow to perform the device selection operation on the plurality of intelligent devices according to the target component flow, the call flow of each component may be preset or may be random. Optionally, when the call flow of each component is preset, the target server may call each component in turn to perform a device selection operation on the plurality of intelligent devices according to the preset call flow; when the call flow of each component is randomly generated, the target server may randomly generate the call flow of each component in the target component flow, and call each component in turn to perform the device selection operation on the plurality of intelligent devices according to the generated call flow, which is not limited in this embodiment.
Optionally, after the device selection operation is performed on the plurality of intelligent devices by sequentially calling each component in the target component flow according to the target component flow, when no matched intelligent device is obtained (that is, no intelligent device meets the screening conditions of all the components), the target server may perform the device selection operation on the plurality of intelligent devices again, or may send a first prompting message to the target object to prompt that the target object cannot determine the matched intelligent device according to the target control statement, or may prompt the use object to reissue the control statement.
Optionally, after the device selection operation is performed on the plurality of intelligent devices by sequentially calling each component in the target component flow according to the target component flow, if there are a plurality of matched intelligent devices (i.e., there are a plurality of intelligent devices that all meet the screening conditions of all the components), the target server may perform the device selection operation on the plurality of intelligent devices again, or may send a second prompting message to the target object, so as to prompt the target object to select a device to which the target control instruction is to be executed from the plurality of candidate intelligent devices, and determine the target intelligent device from the plurality of candidate intelligent devices based on the response of the target object.
It should be noted that, the sequentially calling each component in the target component flow to perform the device selection operation on the plurality of intelligent devices may be: and calling each component by using the target elements corresponding to each component, executing equipment selection operation on the plurality of intelligent equipment, and matching the target intelligent equipment selected by the selection operation with each target element, namely, conforming to element conditions of each target element.
Step S208, the control target intelligent device executes the target device operation indicated by the target control statement.
In this embodiment, after determining the target smart device from the plurality of smart devices, the target server may control the target smart device to perform the target device operation indicated by the target control statement. For example, after determining that a particular smart device is an air conditioner of a first floor bedroom, the server may control the air conditioner to perform the device operation indicated by "set first floor bedroom air conditioner temperature to 25 degrees" (i.e., set temperature to 25 degrees).
In this embodiment, after executing the operation of the target device, the target smart device may send a feedback message to the target server, where the feedback message is used to feed back the execution condition of the operation of the target device to the target server, and the target server may take an operation corresponding to the feedback message according to the feedback message sent by the target smart device. Optionally, in the case that the feedback message is a feedback message for indicating that the target device operation fails to execute, the target server may immediately control the target intelligent device to re-execute the target device operation indicated by the target control statement, or may control the target intelligent device to re-execute the target device operation indicated by the target control statement after waiting for a certain time, which is not limited in this embodiment.
Optionally, before the control target intelligent device executes the target device operation indicated by the target control statement, the target server may parse the target control statement to determine the target device operation included in the target control statement and the device operation parameter corresponding to the target device operation. After determining the target device operation and the device operation parameters, the target server may control the target smart device to perform the target device operation indicated by the target control statement according to the device operation parameters. For example, the server may determine an equipment operation (i.e., adjust the air-conditioning temperature) and an equipment operation parameter (i.e., 25 degrees) of "set the temperature of the first floor bedroom air-conditioner to 25 degrees", and control the first floor bedroom air-conditioner to set the temperature to 25 degrees according to the determined equipment operation and equipment operation parameter.
Through the steps S202 to S208, when the target control sentence sent by the target object is obtained, extracting the element of the target control sentence to obtain at least one target element; determining a target component flow matched with the target control statement according to the element type of at least one target element, wherein the target component flow comprises components matched with the element type of each target element, and the components matched with the element type of each target element are used for executing equipment selection operation on a plurality of intelligent equipment according to each target element; sequentially calling each component in the target component flow to execute device selection operation on a plurality of intelligent devices to obtain target intelligent devices; the target intelligent device is controlled to execute the target device operation indicated by the target control statement, the problem that the efficiency of development and maintenance of the device selection engine is low due to poor iterative performance and robustness of the device selection code in the selection mode of the instruction execution device in the related technology is solved, and the development and maintenance efficiency of the device selection engine is improved.
In an exemplary embodiment, element extraction is performed on the target control statement to obtain at least one target element, including:
S11, extracting elements from the target control statement according to a preset element type set to obtain at least one target element, wherein the element type of each target element is a preset element type, and the preset element type set comprises at least one of the following elements: the type of device, the name of the device, the floor on which the device is located.
In this embodiment, after receiving the target control statement, the target server may perform element extraction on the target control statement according to the preset element type set to obtain at least one target element.
Optionally, the process of extracting the element from the target control statement according to the preset element type set to obtain at least one target element may be: the method includes the steps of firstly analyzing a target control sentence through a syntax analysis algorithm to obtain elements included in the target control sentence, then determining elements with intersection of element types of the elements included in the target control sentence and preset element types included in a preset element type set as target elements, so as to obtain at least one target element, or analyzing the target control sentence through a dictionary library to obtain the elements included in the target control sentence, and determining the elements with intersection of the element types of the elements included in the target control sentence and the preset element types included in the preset element type set as target elements, wherein the method is not limited in this embodiment.
For example, the server may analyze the control sentence "set the temperature of the air conditioner in the bedroom to 25 degrees", determine the element types such as "floor", "room name", and "equipment name", then determine whether the element types are the preset element types, and determine the element corresponding to the element types as the specific element (i.e., the target element) when the element types are the preset element types.
According to the embodiment, the control statement is analyzed according to the preset element type set to obtain at least one specific element, the step of determining the element contained in the control statement can be simplified, and the element determination efficiency is improved.
In an exemplary embodiment, extracting elements of the target control statement according to the preset element type set to obtain at least one target element includes:
s21, each preset element type is used as the current preset element type to execute the following steps to obtain at least one target element:
analyzing the target control statement according to the type of the current preset element;
in the case of parsing from the target control sentence to an element corresponding to the current preset element type, the element corresponding to the current preset element type is determined as one target element.
In this embodiment, the target server may perform element extraction on the target control statement according to the preset element type set, to obtain at least one target element. Alternatively, the element parsing step may be performed with each preset element type as the current preset element type, respectively, so as to obtain at least one target element.
Optionally, the target server may parse the target control statement according to the current preset element type. For example, if the current preset element type is a floor element, the control statement may be parsed according to the floor; if the current preset element type is a room name element, the control statement can be analyzed according to the room name.
Alternatively, in the case of parsing from the target control sentence to an element corresponding to the current preset element type, the element corresponding to the current preset element type may be determined as one target element. For example, when an element corresponding to a floor element type is analyzed from a control sentence, the element may be used as a specific element.
The process of analyzing the target control statement according to the current preset element type may be: analyzing the target control statement according to a statement analysis algorithm to determine the elements included in the target control statement, and determining whether the element types of the elements included in the target control statement are the current preset element types or not according to the element types.
According to the embodiment, the control statement is analyzed according to the current preset element type, and the element of the preset element type analyzed from the control statement is determined to be a specific element, so that the step of determining the specific element from the control statement is simplified.
In one exemplary embodiment, determining a target component flow matching the target control statement based on the element type of the at least one target element includes:
s31, determining a target binary vector corresponding to the target control statement according to the element type of at least one target element, wherein binary bits in the target binary vector are in one-to-one correspondence with preset element types in a preset element type set, and the values of the binary bits in the target binary vector are used for indicating whether the target control statement contains the corresponding element of the preset element type;
s32, determining a component process in which the corresponding binary vector is the target binary vector in the component processes as the target component process, wherein binary bits in the binary vector corresponding to each component process in the component processes are in one-to-one correspondence with preset element types in a preset element type set, and the binary bit value in the binary vector corresponding to each component process is used for indicating whether the component matched with the corresponding preset element type is contained in each component process.
In this embodiment, after determining at least one target element, the target server may determine, according to an element type of the at least one target element, a target binary vector corresponding to the target control statement, where binary bits in the target binary vector correspond to preset element types in the preset element type set one by one, and a value of a binary bit in the target binary vector is used to indicate whether the target control statement includes an element of the corresponding preset element type.
For example, the binary vector corresponding to the control statement (i.e., the target binary vector) is "011", the element type represented by the first binary bit in the binary vector (i.e., the binary bit in which "0" is located) may be "floor", the element type represented by the second binary bit in the binary vector (i.e., the binary bit in which "1" is located) may be "device name", and the element type represented by the third binary bit in the binary vector (i.e., the binary bit in which "1" is located) may be "room name".
Alternatively, the process of determining the target binary vector corresponding to the target control statement according to the element type of the at least one target element may be: the binary bits corresponding to the element types of the target elements in the target binary vector are set to be non-null or "1", and the values of the binary bits other than the binary bits corresponding to the element types of each target element are set to be null or "0", so that the target binary vector corresponding to the target control statement is obtained, or the binary vector corresponding to the element type of each target element in the at least one target element is determined first, and then the bit pressing or the operation is performed on the binary vector corresponding to the element type of each target element, so that the target binary vector is obtained, which is not limited in this embodiment.
After determining the target binary vector, a component flow, of the plurality of component flows, for which the corresponding binary vector is the target binary vector, may be determined as the target component flow. The binary bits in the binary vectors corresponding to each component flow are in one-to-one correspondence with the preset element types in the preset element type set, and the values of the binary bits in the binary vectors corresponding to each component flow are used for indicating whether the components matched with the corresponding preset element types are contained in each component flow.
In the above component processes of using the corresponding binary vector as the target binary vector in the multiple component processes, the process of determining the binary vector as the target component process may be: and sequentially searching binary vectors corresponding to each component flow in the plurality of component flows, and determining the component flow corresponding to the searched binary vector which is the same as the target binary vector as the target component flow. This is not limited in this embodiment.
For example, after determining that a specific element vector (i.e., a target binary vector) is "011", binary vectors matching the element vector "011" may be sequentially searched among a plurality of binary vectors corresponding to a plurality of component flows, and the component flow corresponding to the searched binary vector may be determined as the specific component flow.
It should be noted that, each of the component flows corresponds to a binary vector, and the binary vectors corresponding to different component flows are also different, that is, there is no component flow with the same binary vector corresponding to the component flows.
By determining the component flow, in which the binary vector is the same as the specific binary vector corresponding to the element type of the at least one specific element, as the specific component flow, the process of determining the specific component flow can be simplified, and the execution efficiency of the control instruction can be improved.
In one exemplary embodiment, determining a target binary vector corresponding to a target control statement according to an element type of at least one target element includes:
s41, determining a binary vector corresponding to the element type of each target element, wherein in the binary vector corresponding to the element type of each target element, the value of binary bits corresponding to the element type of each target element is 1, and the values of binary bits except for the binary bits corresponding to the element type of each target element are 0;
s42, performing bitwise or operation on the binary vector corresponding to the element type of each target element to obtain a target binary vector.
In the present embodiment, the target server may determine a binary vector corresponding to an element type of each of the at least one target element, and in the binary vector corresponding to the element type of each target element, a value of a binary bit corresponding to the element type of each target element is 1 and values of binary bits other than the binary bit corresponding to the element type of each target element are 0.
For example, the preset element types include: "floor", "device name", room name ", binary vectors corresponding to each preset element type are respectively: 100, 010, 001. When two element types of "floor" and "device name" exist in the control statement, the server may acquire corresponding binary vectors of "100" and "010".
Optionally, a binary vector corresponding to the element type of each target element is determined, and a binary vector corresponding to the element type of each target element is respectively searched in the binary vectors corresponding to each preset element type in the preset element type set, wherein the preset element types in the preset element type set are in one-to-one correspondence with the plurality of binary vectors.
After determining the binary vector corresponding to the element type of each target element, a bitwise or operation may be performed on the binary vector corresponding to the element type of each target element, resulting in a target binary vector. For example, upon obtaining binary vectors "100" and "010", the server may perform a bitwise or operation on the two binary vectors resulting in a particular binary vector "110".
According to the embodiment, the specific binary vector is generated according to the binary vector corresponding to the element type of each specific element, so that convenience of the determined specific element vector can be improved, execution efficiency of a control instruction is improved, and use experience of a user is further improved.
In an exemplary embodiment, the above method further comprises:
s51, when no element of any preset element type is extracted from the target control statement, determining the preset component flow as a target component flow matched with the target control statement.
In the present embodiment, in the case where no element of the preset element type is extracted from the target control sentence (i.e., in the case where no element of the preset element type is included in the target control sentence), the preset component flow may be determined as the target component flow that matches the target control sentence. For example, component flows of the device according to the device function, the device according to the user dialogue context, and the device according to the talker information (the room, floor) may be set as preset component flows. When the control statement does not include the elements of the preset element type, the preset component flow can be determined to be a specific component flow, so that specific intelligent devices can be screened out from the plurality of intelligent devices.
Alternatively, in the case where an element of any preset element type is extracted from the target control statement, an element included in the preset element flow may be added to the target element flow, that is, in the target element flow, an element included in the preset element flow may be included in addition to the target element corresponding to the element type of at least one target element, which is not limited in this embodiment.
According to the embodiment, when the control statement does not contain the elements of the preset element type, the device screening operation is executed by adopting the preset component flow, so that the response rate of the control statement can be improved, and the use experience of a user can be improved.
In one exemplary embodiment, controlling a target smart device to perform a target device operation indicated by a target control statement includes:
s61, generating a target control instruction corresponding to the target control statement, wherein the target control instruction is used for indicating the target intelligent equipment to execute target equipment operation;
and S62, sending the target control instruction to the target intelligent device to instruct the target intelligent device to execute the target device operation.
In this embodiment, after determining the target smart device, the target server may generate a target control instruction corresponding to a target control statement, where the target control instruction is used to instruct the target smart device to execute the target device operation. Alternatively, the process of generating the target control instruction corresponding to the target control statement may be: the target control instruction is generated according to the target intelligent device and the element value of each target element in the control statement, for example, when the server determines that the specific intelligent device is the air conditioner located in the first floor bedroom according to the control statement 'setting the temperature of the first floor bedroom air conditioner to 25 degrees', a control statement can be generated to adjust the temperature of the air conditioner to 25 degrees.
Optionally, the target control instruction may carry related information of the target intelligent device, so as to instruct the target server to send the target control statement to the target intelligent device. For example, the location information of a specific smart device may be carried in the target control instruction.
After generating the target control instruction corresponding to the target control statement, the target server may send the target control instruction to the target smart device to instruct the target smart device to perform the target device operation. Alternatively, since the target control instruction may be stolen during the transmission to the target smart device, the target control instruction may be encrypted before being transmitted to the target smart device, for example, using the public key of the target smart device.
It should be noted that, the process of sending the target control instruction to the target intelligent device may be: the target control instruction is sent to the target intelligent device in a broadcast manner, or the target control instruction is sent to the target intelligent device in other manners, which is not limited in this embodiment.
According to the embodiment, after the specific intelligent device is determined, the control instruction corresponding to the control statement is generated and is sent to the specific intelligent device, so that the accuracy of sending the control instruction can be improved, and the effect of the control instruction is further improved.
The following explains a selection method of the instruction execution device in the embodiment of the present application with reference to an alternative example.
In the selection method of the instruction execution device in the related technology, the speech position of the user, the device contained in the speech position, which functions the device supports, the dialogue context and other factors are required to be comprehensively considered, and as the more the factors are considered, the more complicated the code logic is, how to keep the iterative performance and the robustness of the device selection code brings great challenges to developers and influences the execution effect of control sentences.
In this alternative example, a set of methods based on component flow configuration is provided, which makes the device selection engine componentized and flowized. The speech location, device functionality, etc. factors considered in the device selection are atomized and component flows are configured according to different trigger conditions. By the method, the maintenance cost of the equipment selection engine can be greatly reduced, so that a developer only needs to configure corresponding component flows according to different conditions, equipment selection logic in an intelligent home scene is simplified, and further the execution effect of control sentences is improved.
As shown in connection with fig. 3, the flow of the selection method of the instruction execution device in this alternative example may include the following steps:
Step S302, defining basic components.
For example, the list of components shown in fig. 4 may be defined according to elements such as room names, floors, nicknames, etc., wherein each row in the list of components is a component.
Step S304, defining element coding, flow coding and configuration flow components.
For example, as shown in FIG. 5, the elements may be defined in terms of room name, floor, nickname, and optionally one element may be expressed in binary each bit. After the element encoding is completed, the flow encoding can be defined according to the element, as shown in fig. 6, and since the flow is a combination of elements, the flow encoding can be conveniently defined by bit operation.
After defining the flow code, eight possible flows (i.e., the component flows described above) may be enumerated by enumerating different element combinations, and different flow components may be configured according to the different flows, and the flow components of the roommandfloor may be as shown in fig. 7.
Step S306, a hit flow is calculated according to the speech, and the hit flow is executed.
As shown in fig. 8, the temperature of the air conditioner in the first floor bedroom is set to 25 degrees, semantic element extraction is performed on the user speech to obtain the user speech expression element "first floor, bedroom", then the flow code is obtained by performing bit-wise or operation according to the user speech expression element, the hit component flow is determined according to the flow code, and then the components in the component flow are sequentially executed, so that the finally screened equipment can be obtained.
By the optional example, the componentization, the flow and the configurability of the equipment selection code are realized, the subsequent development and the maintenance of the equipment selection engine are greatly facilitated, and the working efficiency is improved.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present application is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present application.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM (Read-Only Memory)/RAM (Random Access Memory), magnetic disk, optical disk), comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present application.
According to another aspect of the embodiment of the present application, there is also provided a processing apparatus for implementing the selection method of the above-mentioned instruction execution device. Fig. 9 is a block diagram of a selection device of an alternative instruction execution apparatus according to an embodiment of the present application, and as shown in fig. 9, the device may include:
an extracting unit 902, configured to extract elements from the target control statement to obtain at least one target element when the target control statement sent by the target object is acquired;
a first determining unit 904, connected to the extracting unit 902, configured to determine, according to an element type of at least one target element, a target component flow matched with the target control statement, where the target component flow includes components matched with the element type of each target element, and the components matched with the element type of each target element are configured to perform a device selection operation on a plurality of intelligent devices according to each target element;
the execution unit 906 is connected to the first determining unit 904, and is configured to call each component in the target component flow in sequence to perform a device selection operation on the multiple intelligent devices, so as to obtain a target intelligent device;
and the control unit 908 is connected with the execution unit 906 and is used for controlling the target intelligent device to execute the target device operation indicated by the target control statement.
It should be noted that, the extracting unit 902 in this embodiment may be used to perform the above-mentioned step S202, the first determining unit 904 in this embodiment may be used to perform the above-mentioned step S204, the executing unit 906 in this embodiment may be used to perform the above-mentioned step S206, and the control unit 908 in this embodiment may be used to perform the above-mentioned step S208.
Through the module, under the condition that a target control statement sent by a target object is obtained, extracting elements from the target control statement to obtain at least one target element; determining a target component flow matched with the target control statement according to the element type of at least one target element, wherein the target component flow comprises components matched with the element type of each target element, and the components matched with the element type of each target element are used for executing equipment selection operation on a plurality of intelligent equipment according to each target element; sequentially calling each component in the target component flow to execute device selection operation on a plurality of intelligent devices to obtain target intelligent devices; the target intelligent device is controlled to execute the target device operation indicated by the target control statement, the problem that the efficiency of development and maintenance of the device selection engine is low due to poor iterative performance and robustness of the device selection code in the selection mode of the instruction execution device in the related technology is solved, and the development and maintenance efficiency of the device selection engine is improved.
In one exemplary embodiment, the extraction unit includes:
the extraction module is used for extracting elements of the target control statement according to a preset element type set to obtain at least one target element, wherein the element type of each target element is a preset element type, and the preset element type set comprises at least one of the following elements: the type of device, the name of the device, the floor on which the device is located.
In one exemplary embodiment, the extraction module includes:
the first execution sub-module is used for respectively taking each preset element type as the current preset element type to execute the following steps to obtain at least one target element:
analyzing the target control statement according to the type of the current preset element;
in the case of parsing from the target control sentence to an element corresponding to the current preset element type, the element corresponding to the current preset element type is determined as one target element.
In one exemplary embodiment, the first determining unit includes:
the first determining module is used for determining a target binary vector corresponding to the target control statement according to the element type of at least one target element, wherein binary bits in the target binary vector are in one-to-one correspondence with the preset element types in the preset element type set, and the values of the binary bits in the target binary vector are used for indicating whether the target control statement contains the corresponding preset element type element;
The second determining module is configured to determine, as a target component flow, a component flow in which a binary vector corresponding to the component flow is a target binary vector, where binary bits in the binary vector corresponding to each component flow are in one-to-one correspondence with preset element types in the preset element type set, and a value of the binary bit in the binary vector corresponding to each component flow is used to indicate whether each component flow includes a component matching with the corresponding preset element type.
In one exemplary embodiment, the first determination module includes:
a determination submodule for determining a binary vector corresponding to an element type of each target element, wherein in the binary vector corresponding to the element type of each target element, the value of a binary bit corresponding to the element type of each target element is 1, and the values of binary bits other than the binary bit corresponding to the element type of each target element are 0;
and the second execution sub-module is used for executing bitwise or operation on the binary vector corresponding to the element type of each target element to obtain the target binary vector.
In an exemplary embodiment, the above apparatus further includes:
And the second determining unit is used for determining the preset component flow as a target component flow matched with the target control statement under the condition that no element of any preset element type is extracted from the target control statement.
In one exemplary embodiment, the control unit includes:
the generation module is used for generating a target control instruction corresponding to the target control statement, wherein the target control instruction is used for indicating the target intelligent equipment to execute target equipment operation;
and the sending module is used for sending the target control instruction to the target intelligent equipment so as to instruct the target intelligent equipment to execute the target equipment operation.
It should be noted that the above modules are the same as examples and application scenarios implemented by the corresponding steps, but are not limited to what is disclosed in the above embodiments. It should be noted that the above modules may be implemented in software or in hardware as part of the apparatus shown in fig. 1, where the hardware environment includes a network environment.
According to yet another aspect of an embodiment of the present application, there is also provided a storage medium. Alternatively, in this embodiment, the storage medium may be used to execute the program code of the selection method of any one of the instruction execution apparatuses described above in the embodiment of the present application.
Alternatively, in this embodiment, the storage medium may be located on at least one network device of the plurality of network devices in the network shown in the above embodiment.
Alternatively, in the present embodiment, the storage medium is configured to store program code for performing the steps of:
s1, under the condition that a target control statement sent by a target object is obtained, extracting elements from the target control statement to obtain at least one target element;
s2, determining a target component flow matched with the target control statement according to the element type of at least one target element, wherein the target component flow comprises components matched with the element type of each target element, and the components matched with the element type of each target element are used for executing equipment selection operation on a plurality of intelligent equipment according to each target element;
s3, sequentially calling each component in the target component flow to execute device selection operation on the plurality of intelligent devices to obtain target intelligent devices;
s4, controlling the target intelligent device to execute the target device operation indicated by the target control statement.
Alternatively, specific examples in the present embodiment may refer to examples described in the above embodiments, which are not described in detail in the present embodiment.
Alternatively, in the present embodiment, the storage medium may include, but is not limited to: various media capable of storing program codes, such as a U disk, ROM, RAM, a mobile hard disk, a magnetic disk or an optical disk.
According to still another aspect of the embodiments of the present application, there is further provided an electronic apparatus for implementing the selection method of the above-mentioned instruction execution device, where the electronic apparatus may be a server, a terminal, or a combination thereof.
Fig. 10 is a block diagram of an alternative electronic device, according to an embodiment of the present application, as shown in fig. 10, including a processor 1002, a communication interface 1004, a memory 1006, and a communication bus 1008, wherein the processor 1002, the communication interface 1004, and the memory 1006 communicate with each other via the communication bus 1008, wherein,
a memory 1006 for storing a computer program;
processor 1002, when executing computer programs stored on memory 1006, performs the following steps:
alternatively, in the present embodiment, the storage medium is configured to store program code for performing the steps of:
s1, under the condition that a target control statement sent by a target object is obtained, extracting elements from the target control statement to obtain at least one target element;
S2, determining a target component flow matched with the target control statement according to the element type of at least one target element, wherein the target component flow comprises components matched with the element type of each target element, and the components matched with the element type of each target element are used for executing equipment selection operation on a plurality of intelligent equipment according to each target element;
s3, sequentially calling each component in the target component flow to execute device selection operation on the plurality of intelligent devices to obtain target intelligent devices;
s4, controlling the target intelligent device to execute the target device operation indicated by the target control statement.
Alternatively, in the present embodiment, the communication bus may be a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus, or an EISA (Extended Industry Standard Architecture ) bus, or the like. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, only one thick line is shown in fig. 10, but not only one bus or one type of bus. The communication interface is used for communication between the electronic device and other equipment.
The memory may include RAM or nonvolatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
As an example, the above memory 1006 may be, but is not limited to, a fetch unit 902, a first determination unit 904, an execution unit 906, and a control unit 908 in a selection device including the above instruction execution apparatus. In addition, other module units in the selecting device of the instruction execution apparatus may be included, but are not limited to, and are not described in detail in this example.
The processor may be a general purpose processor and may include, but is not limited to: CPU (Central Processing Unit ), NP (Network Processor, network processor), etc.; but also DSP (Digital Signal Processing, digital signal processor), ASIC (Application Specific Integrated Circuit ), FPGA (Field-Programmable Gate Array, field programmable gate array) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments, and this embodiment is not described herein.
It will be understood by those skilled in the art that the structure shown in fig. 10 is only illustrative, and the device implementing the method for selecting the instruction execution device may be a terminal device, and the terminal device may be a smart phone (such as an Android mobile phone, an iOS mobile phone, etc.), a tablet computer, a palm computer, a mobile internet device (Mobile Internet Devices, MID), a PAD, etc. Fig. 10 is not limited to the structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 10, or have a different configuration than shown in FIG. 10.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be implemented by a program for instructing a terminal device to execute in association with hardware, the program may be stored in a computer readable storage medium, and the storage medium may include: flash disk, ROM, RAM, magnetic or optical disk, etc.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
The integrated units in the above embodiments may be stored in the above-described computer-readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing one or more computer devices (which may be personal computers, servers or network devices, etc.) to perform all or part of the steps of the method described in the embodiments of the present application.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In several embodiments provided by the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, such as the division of the units, is merely a logical function division, and may be implemented in another manner, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution provided in the present embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application, which are intended to be comprehended within the scope of the present application.

Claims (10)

1. A method of selecting an instruction execution device, comprising:
under the condition that a target control statement sent by a target object is obtained, extracting elements from the target control statement to obtain at least one target element;
determining a target component flow matched with the target control statement according to the element type of the at least one target element, wherein the target component flow comprises components matched with the element type of each target element, and the components matched with the element type of each target element are used for executing equipment selection operation on a plurality of intelligent equipment according to each target element;
sequentially calling each component in the target component flow to execute device selection operation on the plurality of intelligent devices to obtain target intelligent devices;
and controlling the target intelligent device to execute the target device operation indicated by the target control statement.
2. The method of claim 1, wherein the extracting the element of the target control statement to obtain at least one target element comprises:
extracting elements from the target control statement according to a preset element type set to obtain the at least one target element, wherein the element type of each target element is a preset element type, and the preset element type set comprises at least one of the following elements: the type of device, the name of the device, the floor on which the device is located.
3. The method according to claim 2, wherein the extracting the element of the target control sentence according to the preset element type set to obtain the at least one target element includes:
the following steps are respectively executed by taking each preset element type as the current preset element type, so that the at least one target element is obtained:
analyzing the target control statement according to the current preset element type;
and determining the element corresponding to the current preset element type as a target element under the condition that the element corresponding to the current preset element type is parsed from the target control statement.
4. The method according to claim 2, wherein determining a target component flow matching the target control statement according to the element type of the at least one target element comprises:
determining a target binary vector corresponding to the target control statement according to the element type of the at least one target element, wherein binary bits in the target binary vector are in one-to-one correspondence with preset element types in the preset element type set, and the values of the binary bits in the target binary vector are used for indicating whether the target control statement contains the corresponding elements of the preset element types or not;
and determining that the corresponding binary vector in the component flows is the component flow of the target binary vector, wherein binary bits in the binary vector corresponding to each component flow are in one-to-one correspondence with preset element types in the preset element type set, and the binary bit value in the binary vector corresponding to each component flow is used for indicating whether the component matched with the corresponding preset element type is contained in each component flow.
5. The method of claim 4, wherein determining a target binary vector corresponding to the target control statement based on the element type of the at least one target element comprises:
determining a binary vector corresponding to the element type of each target element, wherein in the binary vector corresponding to the element type of each target element, the value of binary bits corresponding to the element type of each target element is 1, and the values of binary bits except for the binary bits corresponding to the element type of each target element are 0;
and performing bitwise or operation on the binary vector corresponding to the element type of each target element to obtain the target binary vector.
6. The method according to claim 2, wherein the method further comprises:
and under the condition that no element of any preset element type is extracted from the target control statement, determining the preset component flow as a target component flow matched with the target control statement.
7. The method of any one of claims 1 to 6, wherein the controlling the target smart device to perform the target device operation indicated by the target control statement comprises:
Generating a target control instruction corresponding to the target control statement, wherein the target control instruction is used for indicating the target intelligent device to execute the target device operation;
and sending the target control instruction to the target intelligent equipment to instruct the target intelligent equipment to execute the target equipment operation.
8. A selection device of an instruction execution apparatus, comprising:
the extraction unit is used for extracting elements of the target control statement under the condition that the target control statement sent by the target object is acquired, so as to obtain at least one target element;
a determining unit, configured to determine a target component flow matched with the target control statement according to an element type of the at least one target element, where the target component flow includes a component matched with an element type of each target element, and the component matched with the element type of each target element is configured to perform a device selection operation on a plurality of intelligent devices according to each target element;
the execution unit is used for sequentially calling each component in the target component flow to execute device selection operation on the plurality of intelligent devices to obtain target intelligent devices;
And the control unit is used for controlling the target intelligent device to execute the target device operation indicated by the target control statement.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein the program when run performs the method of any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method according to any of claims 1 to 7 by means of the computer program.
CN202210467366.4A 2022-04-29 2022-04-29 Method and device for selecting instruction execution equipment, storage medium and electronic device Pending CN117014245A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210467366.4A CN117014245A (en) 2022-04-29 2022-04-29 Method and device for selecting instruction execution equipment, storage medium and electronic device
PCT/CN2022/096433 WO2023206701A1 (en) 2022-04-29 2022-05-31 Instruction execution device selection method and apparatus, and storage medium and electronic apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210467366.4A CN117014245A (en) 2022-04-29 2022-04-29 Method and device for selecting instruction execution equipment, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN117014245A true CN117014245A (en) 2023-11-07

Family

ID=88517111

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210467366.4A Pending CN117014245A (en) 2022-04-29 2022-04-29 Method and device for selecting instruction execution equipment, storage medium and electronic device

Country Status (2)

Country Link
CN (1) CN117014245A (en)
WO (1) WO2023206701A1 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108594777B (en) * 2018-04-20 2020-03-13 百度在线网络技术(北京)有限公司 Intelligent household control method, device, equipment, system and storage medium
CN110147047A (en) * 2019-06-19 2019-08-20 深圳聚点互动科技有限公司 Smart home device screening technique, device, computer equipment and storage medium
CN110597082A (en) * 2019-10-23 2019-12-20 北京声智科技有限公司 Intelligent household equipment control method and device, computer equipment and storage medium
CN110687817B (en) * 2019-11-05 2023-03-21 深圳市欧瑞博科技股份有限公司 Intelligent household control method and device, terminal and computer readable storage medium
CN113658590A (en) * 2021-06-30 2021-11-16 深圳市艾特智能科技有限公司 Control method and device of intelligent household equipment, readable storage medium and terminal

Also Published As

Publication number Publication date
WO2023206701A1 (en) 2023-11-02

Similar Documents

Publication Publication Date Title
CN113412469A (en) Equipment network distribution method and device, electronic equipment and storage medium
CN112188277B (en) Screen projection control method and device, electronic equipment and computer program medium
CN113168334A (en) Data processing method and device, electronic equipment and readable storage medium
CN113498594A (en) Control method and device of intelligent household system, electronic equipment and storage medium
CN113615141A (en) Account number association method, device, system, server and storage medium
CN115047778A (en) Control method and device for intelligent equipment, storage medium and electronic device
CN114697150A (en) Command issuing method and device, storage medium and electronic device
CN114911535B (en) Application program component configuration method, storage medium and electronic device
CN117014245A (en) Method and device for selecting instruction execution equipment, storage medium and electronic device
CN115002206B (en) Control method and device of intelligent equipment, storage medium and electronic device
CN117376042A (en) Functional platform configuration method and device of intelligent equipment and electronic device
WO2020081264A1 (en) Systems, methods, and media for identifying and responding to malicious files having similar features
CN115460060B (en) Device upgrading method and device of intelligent device, storage medium and electronic device
CN116541012A (en) Basic parameter modification method and device, storage medium and electronic device
CN114826899B (en) Debugging method and device for equipment control service, storage medium and electronic device
CN116432658A (en) Voice data processing method and device, storage medium and electronic device
WO2023206702A1 (en) Log processing method and apparatus, storage medium, and electronic device
CN117373443A (en) Voice interaction flow configuration method, system, storage medium and electronic device
CN117198284A (en) Instruction information processing method and device and household appliance
CN117909785A (en) Fault diagnosis method, device, equipment and storage medium
CN116301767A (en) Interface file generation method and device, storage medium and electronic device
CN113905362A (en) Method and device for optimizing network access of Ble Mesh device, electronic device and storage medium
CN117908856A (en) Work order construction method and device, storage medium and electronic device
CN116257498A (en) Link log association method and link log association device
CN116225456A (en) Program deployment method, device, storage medium and terminal

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