CN111143061A - Multi-device linkage control method and device and storage medium - Google Patents

Multi-device linkage control method and device and storage medium Download PDF

Info

Publication number
CN111143061A
CN111143061A CN201911312916.XA CN201911312916A CN111143061A CN 111143061 A CN111143061 A CN 111143061A CN 201911312916 A CN201911312916 A CN 201911312916A CN 111143061 A CN111143061 A CN 111143061A
Authority
CN
China
Prior art keywords
target
control
control instruction
control instructions
sending
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.)
Granted
Application number
CN201911312916.XA
Other languages
Chinese (zh)
Other versions
CN111143061B (en
Inventor
张亚庆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Haier Uplus Intelligent Technology Beijing Co Ltd
Original Assignee
Haier Uplus Intelligent Technology Beijing 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 Haier Uplus Intelligent Technology Beijing Co Ltd filed Critical Haier Uplus Intelligent Technology Beijing Co Ltd
Priority to CN201911312916.XA priority Critical patent/CN111143061B/en
Publication of CN111143061A publication Critical patent/CN111143061A/en
Application granted granted Critical
Publication of CN111143061B publication Critical patent/CN111143061B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Selective Calling Equipment (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention provides a linkage control method and device of multiple devices and a storage medium, wherein the linkage control method comprises the following steps: storing the obtained target request to a preset key value database, wherein the target request comprises control instructions for at least two target devices; splitting the control instruction included in the currently executed target request in a key value database, and determining the priority of each control instruction in the currently executed target request; and sequentially sending all the control instructions in the currently executed target request to the target equipment corresponding to the control instructions according to the sequence of the priorities from high to low so as to instruct the corresponding target equipment to execute preset corresponding operations based on the control instructions. According to the method and the device, the problems of long time consumption, control failure, abnormal control and the like in multi-device linkage are solved, linkage control of the intelligent household devices can be achieved, the efficiency of controlling the intelligent household devices is improved, and the effect of user experience is improved.

Description

Multi-device linkage control method and device and storage medium
Technical Field
The invention relates to the field of communication, in particular to a multi-device linkage control method and device and a storage medium.
Background
Smart homes have gradually appeared in daily life, and controlling smart home devices through the internet of things has become a big trend of household appliance using modes. In the field of current smart homes, the prior art can only use a single command control device to operate the devices one by one. When multiple devices are linked, situations such as time consumption, control failure, control abnormality and the like occur.
Aiming at the problems of long time consumption, control failure, abnormal control and the like in the related art when multiple devices are linked, an effective solution does not exist at present.
Disclosure of Invention
The embodiment of the invention provides a multi-device linkage control method, a multi-device linkage control device and a storage medium, which are used for at least solving the problems of long time consumption, control failure, abnormal control and the like when no multi-device linkage exists in the related art.
According to an embodiment of the present invention, there is provided a control method of a device including: storing the acquired target request to a preset key value database, wherein the target request comprises control instructions for at least two target devices; splitting control instructions included in a currently executed target request in the key value database, and determining the priority of each control instruction in the currently executed target request; and sequentially sending all the control instructions in the currently executed target request to the target equipment corresponding to the control instructions according to the sequence of the priorities from high to low so as to instruct the corresponding target equipment to execute preset corresponding operations based on the control instructions.
Optionally, sequentially sending all the control instructions in the currently executed target request to the target device corresponding to the control instruction in an order from high priority to low priority, including: inputting the control instructions into an execution queue in sequence according to the sequence of the priority from high to low; and sequentially sending the control instructions in the execution queue to the target equipment corresponding to the control instructions.
Optionally, the first control instruction and the second control instruction are any two adjacent control instructions in the execution queue, which are sorted from high to low according to the priority, where sending the control instructions in the execution queue to the target device corresponding to the control instructions in sequence includes: sending the first control instruction to a first target device corresponding to the first control instruction, and sending a second control instruction to a second target device corresponding to the second control instruction under the condition of receiving a first acknowledgement returned by the first target device, wherein the first acknowledgement is used for indicating that the first target device completes the operation indicated by the first control instruction; or sending the first control instruction to a first target device corresponding to the first control instruction, and sending a second control instruction to a second target device corresponding to the second control instruction under the condition of receiving a first failure response returned by the first target device, wherein the first failure response is used for indicating that the first target device does not finish executing the operation indicated by the first control instruction; or sending the first control instruction to a first target device corresponding to the first control instruction, and sending the second control instruction to a second target device when a preset first time period is reached; wherein the first control instruction has a higher priority than the second control instruction.
Optionally, after the preset first time period is reached, a timeout result is recorded in a preset execution result table, where the timeout result is used to indicate that a response of the first target device is not received within the preset first time period, and the response of the first target device includes the first acknowledgement response and the first failure response.
Optionally, the determining the priority of each control instruction in the currently executed target request comprises: determining the priority of the control instruction according to the sequence of the control instruction in the currently executed target request; or, determining the priority of the control instruction according to the control instruction execution sequence information carried in the currently executed target request.
Optionally, after sequentially sending all the control instructions in the currently executed target request to the target device corresponding to the control instructions in order from high priority to low priority to instruct the corresponding target device to execute preset corresponding operations based on the control instructions, the method further includes: under the condition that the state of the target equipment is confirmed to be changed within a preset second time period, determining whether the latest state after the change of the target equipment is consistent with the control content indicated by the control instruction; if the current state of the target equipment is consistent with the current state of the target equipment, sending the latest state of the target equipment to a target terminal; if not, writing the identification of the target equipment, the initial state and the changed latest state of the target equipment and the control instruction for controlling the target equipment into a preset execution result table; and writing the identifier of the target equipment, the state updating timeout information and the control instruction for controlling the target equipment into the preset execution result table under the condition that the state of the target equipment is confirmed not to change within a preset second time period.
Optionally, after sequentially sending all the control instructions in the currently executed target request to the target device corresponding to the control instructions in order from high priority to low priority to instruct the corresponding target device to execute preset corresponding operations based on the control instructions, the method further includes: and sending a control result after the target equipment is controlled to a message platform so that the message platform can analyze and/or count the working state of the target equipment.
According to another embodiment of the present invention, there is provided a linkage control apparatus of a plurality of devices, including: the storage module is used for storing the acquired target request to a preset key value database, wherein the target request comprises a control instruction for executing control on at least two target devices; a determining module, configured to split, in the key-value database, control instructions included in a currently executed target request, and determine a priority of each control instruction in the currently executed target request; and the sending module is used for sending all the control instructions in the currently executed target request to the target equipment corresponding to the control instructions in sequence from high priority to low priority so as to instruct the corresponding target equipment to execute preset corresponding operation based on the control instructions.
Optionally, the sending module includes: the input unit is used for sequentially inputting the control instructions into the execution queue according to the sequence of the priority from high to low; and the sending unit is used for sequentially sending the control instructions in the execution queue to the target equipment corresponding to the control instructions.
According to a further embodiment of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the invention, the acquired target request is stored in the preset key value database, wherein the target request comprises control instructions for at least two target devices; splitting the control instruction included in the currently executed target request in a key value database, and determining the priority of each control instruction in the currently executed target request; and sequentially sending all the control instructions in the currently executed target request to the target equipment corresponding to the control instructions according to the sequence of the priorities from high to low so as to instruct the corresponding target equipment to execute preset corresponding operations based on the control instructions. Therefore, the problems of long time consumption, control failure, abnormal control and the like in the multi-device linkage in the related art can be solved, linkage control of the intelligent household devices can be achieved, the efficiency of controlling the intelligent household devices is improved, and the effect of user experience is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a hardware configuration of a mobile terminal of a linkage control method of multiple devices according to an embodiment of the present invention;
FIG. 2 is a flow chart of a coordinated control method of multiple devices according to an embodiment of the invention;
FIG. 3 is a schematic illustration of a Redis based storage target request in accordance with an alternative embodiment of the present invention;
FIG. 4 is a schematic diagram of an instruction callback analyzer in accordance with an alternative embodiment of the present invention;
FIG. 5 is a schematic diagram of a query device validation sub-flow in accordance with an alternative embodiment of the present invention;
FIG. 6 is a schematic illustration of a query device current state sub-flow in accordance with an alternative embodiment of the present invention;
FIG. 7 is a schematic diagram of the overall structure according to an alternative embodiment of the invention;
FIG. 8 is a schematic illustration of a single instruction issue sub-flow in accordance with an alternative embodiment of the present invention;
FIG. 9 is a flow chart illustrating sequential execution according to an alternative embodiment of the present invention;
fig. 10 is a block diagram of a control device of an apparatus according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The method provided by the first embodiment of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking an example of the present invention running on a mobile terminal, fig. 1 is a block diagram of a hardware structure of the mobile terminal of a device control method according to an embodiment of the present invention. As shown in fig. 1, the mobile terminal 10 may include one or more (only one shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and optionally may also include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration, and does not limit the structure of the mobile terminal. For example, the mobile terminal 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used for storing computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the control method of the device in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal 10. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In this embodiment, a method for controlling a device operating in the mobile terminal is provided, and fig. 2 is a flowchart of controlling the device according to an embodiment of the present invention, as shown in fig. 2, the flowchart includes the following steps:
step S202, storing an acquired target request to a preset key value database, wherein the target request comprises control instructions for at least two target devices;
the target device may be a home device in the smart home system, for example: refrigerator, washing machine, television, air conditioner, etc., the target request may be a voice request made by the user. The target request may include a plurality of control commands, and different control commands may be used to indicate different home devices, or may be used to control the same home device. For example, the target request is "washing machine starts standard washing mode, air conditioner is adjusted to 25 ℃, and television is adjusted to center one channel", in the request, the target devices are washing machine, air conditioner and television, the corresponding control instructions are "washing machine starts standard washing mode", "air conditioner is adjusted to 25 ℃, and" television is adjusted to center one channel ". The preset key-value database may be a Remote Dictionary service (Remote Dictionary Server, Redis). Redis is a key-value storage system.
Step S204, splitting the control instruction included in the currently executed target request in the key value database, and determining the priority of each control instruction in the currently executed target request;
the priority of the control instructions can be determined according to the sequence of the control instructions in the target request, the control instructions can be prioritized according to the importance degree of the control instructions, and the priority sequence of the corresponding control instructions can be set according to the position of the target device corresponding to the control instructions in the scene. Specifically, the priority of the control instruction corresponding to the target device may be set in an application program of the terminal used by the user.
Step S206, sequentially sending all the control instructions in the currently executed target request to the target device corresponding to the control instruction according to the order of priority from high to low, so as to instruct the corresponding target device to execute a preset corresponding operation based on the control instruction.
Through the steps, the target request is obtained, the target request comprises at least two control instructions, the control instructions are used for requesting to control the target equipment, the priorities of the at least two control instructions are respectively determined, the at least two control instructions are sequenced according to the sequence of the priorities from high to low, and the target equipment is controlled according to the sequencing result and based on the control instructions in sequence. Therefore, the problems of long time consumption, control failure, abnormal control and the like in the multi-device linkage in the related art can be solved, linkage control of the intelligent household devices can be achieved, the efficiency of controlling the intelligent household devices is improved, and the effect of user experience is improved.
Alternatively, the execution subject of the above steps may be a terminal or the like, but is not limited thereto.
In an optional embodiment, sequentially sending all the control instructions in the currently executed target request to the target device corresponding to the control instruction in an order from high priority to low priority, includes: inputting the control instructions into an execution queue in sequence according to the sequence of the priority from high to low; and sequentially sending the control instructions in the execution queue to the target equipment corresponding to the control instructions. In this embodiment, a control instruction may be stored in a Redis store, as shown in fig. 3, which is a schematic diagram of storing a target request based on a Redis according to an alternative embodiment of the present invention. The method comprises the steps of storing commands containing batch control instructions into Redis, dividing the batch control instructions into single commands, sequentially placing the single commands into an execution queue, and respectively determining target equipment corresponding to each control instruction. And respectively sending each control instruction to the corresponding target equipment according to the priority order so as to instruct the target equipment to execute the operation corresponding to the control instruction. For example, the target request is "washing machine starts a standard washing mode, the air conditioner is adjusted to 25 ℃, the television is adjusted to a central channel", the target request is respectively divided into three control instructions "washing machine starts a standard washing mode", "air conditioner is adjusted to 25 ℃ and" television is adjusted to a central channel ", the three control instructions are stored in the Redis, the target devices respectively corresponding to the three control instructions are respectively determined to be" air conditioner "," television "and" television ", the control instructions are sequentially put into the execution queue according to the sequence of the control instructions in the target request, and the corresponding target devices are sequentially controlled to execute the operation indicated by the corresponding control instructions. And judging whether to execute the next single command or not according to the execution result of the current command after executing one single command. And when all the single commands in the execution queue are executed, pushing the total result out by the distributed instruction queue.
In an optional embodiment, the first control instruction and the second control instruction are any two adjacent control instructions in the execution queue, which are sorted from high to low according to the priority, where sending the control instructions in the execution queue to the target device corresponding to the control instructions in sequence includes: sending the first control instruction to a first target device corresponding to the first control instruction, and sending a second control instruction to a second target device corresponding to the second control instruction under the condition of receiving a first acknowledgement returned by the first target device, wherein the first acknowledgement is used for indicating that the first target device completes the operation indicated by the first control instruction; or sending the first control instruction to a first target device corresponding to the first control instruction, and sending a second control instruction to a second target device corresponding to the second control instruction under the condition of receiving a first failure response returned by the first target device, wherein the first failure response is used for indicating that the first target device does not finish executing the operation indicated by the first control instruction; or sending the first control instruction to a first target device corresponding to the first control instruction, and sending the second control instruction to a second target device when a preset first time period is reached; wherein the first control instruction has a higher priority than the second control instruction. In this embodiment, whether to execute the next single command may be determined according to the response result of the target device. Fig. 4 is a schematic diagram of an instruction callback analyzer according to an alternative embodiment of the present invention, where the domain model includes a target device, and the instruction callback analyzer is configured to query a response callback of the target device and a response result of the device, and write the response result of the device into an execution result table, and store the response result in Mysql and Redis storage respectively. In this embodiment, the response result of the device includes: the method comprises the following steps of (1) having response and not having response, wherein the response comprises: response success and response failure. Fig. 5 is a schematic diagram of a flow of the inquiring-device confirming sub-process according to an alternative embodiment of the present invention, which is used to confirm whether the target device answers or not, and whether the answer result is an answer success or an answer failure. And judging whether to execute the next control command according to the response result of the target equipment. And when the result of successful response or failed response of the target device is received or the result of response of the target device is not received within the preset time, executing the next control instruction. For example, the target request is "the washing machine starts the standard washing mode, the air conditioner is adjusted to 25 ℃, the television is adjusted to a central channel", after the control instruction "the washing machine starts the standard washing mode" is sent to the target equipment washing machine, after a confirmation success result returned by the washing machine is received, such as "the marked washing mode is started", or after a confirmation failure result "the marked washing mode cannot be started" returned by the washing machine, the next control instruction is executed, that is, "the air conditioner is adjusted to 25 ℃", and the next control instruction is sent to the target equipment air conditioner. Or the network is interrupted or the target device fails to respond, and at this time, the response result of the target device is not received in a preset time period, and the next control instruction is executed.
In an optional embodiment, after the preset first time period is reached, a timeout result is recorded in a preset execution result table, where the timeout result is used to indicate that a response of the first target device is not received within the preset first time period, and the response of the first target device includes the first acknowledgement response and the first failure response. In this embodiment, if the response result of the target device is not received within the predetermined time, the response timeout is recorded in the execution result table, and a basis is provided for subsequent device maintenance.
In an alternative embodiment, determining the priority of each control instruction in the currently executing target request comprises: determining the priority of the control instruction according to the sequence of the control instruction in the currently executed target request; or, determining the priority of the control instruction according to the control instruction execution sequence information carried in the currently executed target request. In this embodiment, the priority of the control instructions may be determined according to the order of the control instructions in the target request, and the higher the priority of the control instruction ranked higher, or the lower the priority of the control instruction ranked higher. The priority may also be determined according to execution sequence information of the control instruction carried in the target request, and specifically, the execution sequence information of the control instruction may be first, second, last, and the like sequence information carried in the target request, or first, second, third, and the like sequence information. For example, the target request is "turn on the television after turning on the air conditioner", and the target request carries sequence information, that is, the sequence of turning on the air conditioner is the front, and the sequence of turning on the television is the back.
In an optional embodiment, after sequentially sending all the control instructions in the currently executed target request to the target device corresponding to the control instructions in order from high priority to low priority to instruct the corresponding target device to execute preset corresponding operations based on the control instructions, the method further includes: under the condition that the state of the target equipment is confirmed to be changed within a preset second time period, determining whether the latest state after the change of the target equipment is consistent with the control content indicated by the control instruction; if the current state of the target equipment is consistent with the current state of the target equipment, sending the latest state of the target equipment to a target terminal; if not, writing the identification of the target equipment, the initial state and the changed latest state of the target equipment and the control instruction for controlling the target equipment into a preset execution result table; and writing the identifier of the target equipment, the state updating timeout information and the control instruction for controlling the target equipment into the preset execution result table under the condition that the state of the target equipment is confirmed not to change within a preset second time period. In this embodiment, as shown in fig. 6, a sub-flowchart of querying a current state of a device according to an alternative embodiment of the present invention is shown, where the sub-flowchart is used to query whether a current state of a target device is consistent with a state of execution indicated by a control instruction. And under the condition that the state of the current equipment is consistent with the operation completed by the control instruction, transmitting the latest state of the target equipment to an application program of the mobile terminal used by the user. And under the condition that the current state of the target equipment is inconsistent with the operation finished by the control instruction, detecting whether the response of the target equipment is overtime, under the condition that the response is overtime, writing an overtime result into an execution result table, and under the condition that the response is not overtime, writing the identification of the target equipment, the initial state and the changed latest state of the target equipment and the control instruction for controlling the target equipment into a preset execution result table. Writing the response result of the target device into the execution result table can provide a basis for subsequent device maintenance.
In an optional embodiment, after sequentially sending all the control instructions in the currently executed target request to the target device corresponding to the control instructions in order from high priority to low priority to instruct the corresponding target device to execute preset corresponding operations based on the control instructions, the method further includes: and sending a control result after the target equipment is controlled to a message platform so that the message platform can analyze and/or count the working state of the target equipment. In this embodiment, as shown in fig. 7, the overall structural diagram according to an optional embodiment of the present invention is shown, where a batch instruction input by a user is received through a batch instruction interface, an instruction sequence execution controller includes a Redis storage configured to store a control instruction and sequentially send the control instruction to a target device in a domain model, a Mysql cluster is configured to store an execution result of the batch instruction and record a response result of the instruction, a device shadow cache system is configured to store a latest state of a device after the instruction is queried and executed, and after the batch instruction is executed, notify a caller and a message platform of the execution result. Fig. 8 is a schematic diagram illustrating a single instruction issue sub-flow according to an alternative embodiment of the present invention, and fig. 9 is a schematic diagram illustrating a sequential execution flow according to an alternative embodiment of the present invention.
Through the application, the linkage success rate of a plurality of remote control household appliances is greatly improved. The attribute after the control of the device can be judged in a next step. The linkage control of a plurality of household appliances can be controlled in a time-delay mode.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, a control device of an apparatus is further provided, where the control device is used to implement the foregoing embodiments and preferred embodiments, and details are not repeated for what has been described. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 10 is a block diagram of a control apparatus of a device according to an embodiment of the present invention, as shown in fig. 10, the apparatus including: a storage module 1002, configured to store an obtained target request to a preset key value database, where the target request includes a control instruction for controlling at least two target devices; a determining module 1004, configured to split, in the key-value database, the control instruction included in the currently executed target request, and determine a priority of each control instruction in the currently executed target request; a sending module 1006, configured to send all the control instructions in the currently executed target request to the target device corresponding to the control instruction in sequence according to a priority order from high to low, so as to instruct the corresponding target device to execute a preset corresponding operation based on the control instruction.
In an alternative embodiment, the sending module includes: the input unit is used for sequentially inputting the control instructions into the execution queue according to the sequence of the priority from high to low; and the sending unit is used for sequentially sending the control instructions in the execution queue to the target equipment corresponding to the control instructions.
In an optional embodiment, the sending unit sequentially sends the control instructions in the execution queue to the target device corresponding to the control instructions by: sending the first control instruction to a first target device corresponding to the first control instruction, and sending a second control instruction to a second target device corresponding to the second control instruction under the condition of receiving a first acknowledgement returned by the first target device, wherein the first acknowledgement is used for indicating that the first target device completes the operation indicated by the first control instruction; or sending the first control instruction to a first target device corresponding to the first control instruction, and sending a second control instruction to a second target device corresponding to the second control instruction under the condition of receiving a first failure response returned by the first target device, wherein the first failure response is used for indicating that the first target device does not finish executing the operation indicated by the first control instruction; or sending the first control instruction to a first target device corresponding to the first control instruction, and sending the second control instruction to a second target device when a preset first time period is reached; the first control instruction and the second control instruction are any two adjacent control instructions in the execution queue, which are sorted from high to low according to the priority, and the priority of the first control instruction is higher than that of the second control instruction.
In an optional embodiment, the apparatus is further configured to record a timeout result in a preset execution result table after the preset first time period is reached, where the timeout result is used to indicate that a response of the first target device is not received within the preset first time period, and the response of the first target device includes the first acknowledgement response and the first failure response.
In an alternative embodiment, the determining module is further configured to: determining the priority of the control instruction according to the sequence of the control instruction in the currently executed target request; or, determining the priority of the control instruction according to the control instruction execution sequence information carried in the currently executed target request.
In an optional embodiment, the apparatus is further configured to, after sequentially sending all the control instructions in the currently executed target request to the target device corresponding to the control instruction in an order from high priority to low priority to instruct the corresponding target device to perform a preset corresponding operation based on the control instruction, and in a case that it is determined that a state of the target device changes within a preset second time period, determine whether a latest state after the change of the target device is consistent with the control content indicated by the control instruction; if the current state of the target equipment is consistent with the current state of the target equipment, sending the latest state of the target equipment to a target terminal; if not, writing the identification of the target equipment, the initial state and the changed latest state of the target equipment and the control instruction for controlling the target equipment into a preset execution result table; and writing the identifier of the target equipment, the state updating timeout information and the control instruction for controlling the target equipment into the preset execution result table under the condition that the state of the target equipment is confirmed not to change within a preset second time period.
In an optional embodiment, the apparatus is further configured to send all the control instructions in the currently executed target request to the target device corresponding to the control instruction in sequence from high to low according to the priority, so as to instruct the corresponding target device to execute a preset corresponding operation based on the control instruction, and then send a control result obtained after controlling the target device to a message platform, so that the message platform analyzes and/or counts the working state of the target device.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, storing the acquired target request to a preset key value database, wherein the target request comprises control instructions for at least two target devices;
s2, splitting the control instructions included in the currently executed target request in the key value database, and determining the priority of each control instruction in the currently executed target request;
and S3, sequentially sending all the control instructions in the currently executed target request to the target equipment corresponding to the control instructions according to the sequence of the priorities from high to low so as to instruct the corresponding target equipment to execute preset corresponding operations based on the control instructions.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, storing the acquired target request to a preset key value database, wherein the target request comprises control instructions for at least two target devices;
s2, splitting the control instructions included in the currently executed target request in the key value database, and determining the priority of each control instruction in the currently executed target request;
and S3, sequentially sending all the control instructions in the currently executed target request to the target equipment corresponding to the control instructions according to the sequence of the priorities from high to low so as to instruct the corresponding target equipment to execute preset corresponding operations based on the control instructions.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A linkage control method of multiple devices is characterized by comprising the following steps:
storing the acquired target request to a preset key value database, wherein the target request comprises control instructions for at least two target devices;
splitting control instructions included in a currently executed target request in the key value database, and determining the priority of each control instruction in the currently executed target request;
and sequentially sending all the control instructions in the currently executed target request to the target equipment corresponding to the control instructions according to the sequence of the priorities from high to low so as to instruct the corresponding target equipment to execute preset corresponding operations based on the control instructions.
2. The method according to claim 1, wherein sequentially sending all the control instructions in the currently executed target request to the target device corresponding to the control instructions in an order from high priority to low priority comprises:
inputting the control instructions into an execution queue in sequence according to the sequence of the priority from high to low;
and sequentially sending the control instructions in the execution queue to the target equipment corresponding to the control instructions.
3. The method according to claim 2, wherein the first control instruction and the second control instruction are any two adjacent control instructions in the execution queue, which are sorted from high to low according to the priority, and wherein sequentially sending the control instructions in the execution queue to the target device corresponding to the control instructions comprises:
sending the first control instruction to a first target device corresponding to the first control instruction, and sending a second control instruction to a second target device corresponding to the second control instruction under the condition of receiving a first acknowledgement returned by the first target device, wherein the first acknowledgement is used for indicating that the first target device completes the operation indicated by the first control instruction;
or sending the first control instruction to a first target device corresponding to the first control instruction, and sending a second control instruction to a second target device corresponding to the second control instruction under the condition of receiving a first failure response returned by the first target device, wherein the first failure response is used for indicating that the first target device does not finish executing the operation indicated by the first control instruction;
or sending the first control instruction to a first target device corresponding to the first control instruction, and sending the second control instruction to a second target device when a preset first time period is reached;
wherein the first control instruction has a higher priority than the second control instruction.
4. The method of claim 3, further comprising:
after the preset first time period is reached, recording a timeout result in a preset execution result table, where the timeout result is used to indicate that a response of the first target device is not received within the preset first time period, and the response of the first target device includes the first acknowledgement response and the first failure response.
5. The method of claim 1, wherein determining the priority of each control instruction in the currently executing target request comprises:
determining the priority of the control instruction according to the sequence of the control instruction in the currently executed target request;
or, determining the priority of the control instruction according to the control instruction execution sequence information carried in the currently executed target request.
6. The method according to any one of claims 1 to 5, wherein after sequentially sending all the control instructions in the currently executed target request to the target device corresponding to the control instructions in order of priority from high to low to instruct the corresponding target device to execute a preset corresponding operation based on the control instructions, the method further comprises:
under the condition that the state of the target equipment is confirmed to be changed within a preset second time period, determining whether the latest state after the change of the target equipment is consistent with the control content indicated by the control instruction; if the current state of the target equipment is consistent with the current state of the target equipment, sending the latest state of the target equipment to a target terminal; if not, writing the identification of the target equipment, the initial state and the changed latest state of the target equipment and the control instruction for controlling the target equipment into a preset execution result table;
and writing the identifier of the target equipment, the state updating timeout information and the control instruction for controlling the target equipment into the preset execution result table under the condition that the state of the target equipment is confirmed not to change within a preset second time period.
7. The method according to claim 1, wherein after sequentially sending all the control instructions in the currently executed target request to the target device corresponding to the control instructions in order from high priority to low priority to instruct the corresponding target device to execute preset corresponding operations based on the control instructions, the method further comprises:
and sending a control result after the target equipment is controlled to a message platform so that the message platform can analyze and/or count the working state of the target equipment.
8. A linkage control device of multiple devices, characterized by comprising:
the storage module is used for storing the acquired target request to a preset key value database, wherein the target request comprises a control instruction for executing control on at least two target devices;
a determining module, configured to split, in the key-value database, control instructions included in a currently executed target request, and determine a priority of each control instruction in the currently executed target request;
and the sending module is used for sending all the control instructions in the currently executed target request to the target equipment corresponding to the control instructions in sequence from high priority to low priority so as to instruct the corresponding target equipment to execute preset corresponding operation based on the control instructions.
9. The apparatus of claim 8, wherein the sending module comprises:
the input unit is used for sequentially inputting the control instructions into the execution queue according to the sequence of the priority from high to low;
and the sending unit is used for sequentially sending the control instructions in the execution queue to the target equipment corresponding to the control instructions.
10. A storage medium, in which a computer program is stored, wherein the computer program is arranged to perform the method of any of claims 1 to 7 when executed.
CN201911312916.XA 2019-12-18 2019-12-18 Multi-device linkage control method, device and storage medium Active CN111143061B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911312916.XA CN111143061B (en) 2019-12-18 2019-12-18 Multi-device linkage control method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911312916.XA CN111143061B (en) 2019-12-18 2019-12-18 Multi-device linkage control method, device and storage medium

Publications (2)

Publication Number Publication Date
CN111143061A true CN111143061A (en) 2020-05-12
CN111143061B CN111143061B (en) 2024-02-23

Family

ID=70518824

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911312916.XA Active CN111143061B (en) 2019-12-18 2019-12-18 Multi-device linkage control method, device and storage medium

Country Status (1)

Country Link
CN (1) CN111143061B (en)

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111737431A (en) * 2020-06-19 2020-10-02 海尔优家智能科技(北京)有限公司 Equipment exception processing method and device, storage medium and electronic device
CN111813001A (en) * 2020-07-10 2020-10-23 珠海格力电器股份有限公司 Equipment cooperative control method, equipment capable of cooperative control and cooperative system
CN111857835A (en) * 2020-07-23 2020-10-30 珠海优特物联科技有限公司 Signal processing method and device, smart card and readable storage medium
CN112087492A (en) * 2020-08-12 2020-12-15 北京首钢自动化信息技术有限公司 Equipment management method and device, electronic equipment and storage medium
CN112130980A (en) * 2020-09-29 2020-12-25 海尔优家智能科技(北京)有限公司 Operation execution method and device, storage medium and electronic device
CN112134965A (en) * 2020-11-24 2020-12-25 树根互联技术有限公司 Issuing method and device of Internet of things instruction and electronic equipment
CN112286062A (en) * 2020-09-23 2021-01-29 青岛经济技术开发区海尔热水器有限公司 Intelligent household appliance linkage control method and device, electronic equipment and storage medium
CN112492023A (en) * 2020-11-25 2021-03-12 青岛海尔科技有限公司 Device control method, device, storage medium, and electronic apparatus
CN112738245A (en) * 2020-12-28 2021-04-30 青岛海尔科技有限公司 Method and device for determining equipment response information, storage medium and electronic device
CN112856779A (en) * 2021-01-29 2021-05-28 海尔(深圳)研发有限责任公司 Method and device for monitoring air conditioner and monitoring equipment
CN112925219A (en) * 2021-02-03 2021-06-08 青岛海尔科技有限公司 Method and device for executing smart home scene
CN113311720A (en) * 2021-04-30 2021-08-27 青岛海尔空调器有限总公司 Intelligent household appliance linkage control method, device and equipment
CN113485206A (en) * 2021-08-06 2021-10-08 时代云英(重庆)科技有限公司 Extensible Internet of things system and method
CN113674749A (en) * 2021-08-26 2021-11-19 珠海格力电器股份有限公司 Control method, control device, electronic equipment and storage medium
CN113672284A (en) * 2021-10-25 2021-11-19 北京中天星控科技开发有限公司 Instruction execution method, system, electronic equipment and storage medium
CN114167766A (en) * 2021-11-15 2022-03-11 成都四方伟业软件股份有限公司 Method and device for issuing and executing instructions during multi-association equipment
CN114172911A (en) * 2021-10-29 2022-03-11 青岛海享智科技有限公司 Group control system control method, apparatus and medium
CN114280953A (en) * 2021-12-29 2022-04-05 河南紫联物联网技术有限公司 Scene mode creating method and device, electronic equipment and storage medium
CN114401298A (en) * 2021-12-16 2022-04-26 荣耀终端有限公司 Data transmission method, equipment and system
WO2022083210A1 (en) * 2020-10-23 2022-04-28 重庆海尔空调器有限公司 Control method, control device and control system for plurality of intelligent household appliances
CN114815707A (en) * 2022-05-17 2022-07-29 重庆伏特猫科技有限公司 Intelligent device control method and system based on Netty network framework
CN115001891A (en) * 2022-05-31 2022-09-02 四川虹美智能科技有限公司 Intelligent household appliance control method and device based on hierarchical management
CN115343984A (en) * 2022-07-29 2022-11-15 青岛海尔科技有限公司 Equipment control method, device, storage medium and electronic device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107084591A (en) * 2017-05-08 2017-08-22 广州视源电子科技股份有限公司 A kind of control method of intelligent refrigerator, device, equipment and storage medium
WO2017219653A1 (en) * 2016-06-24 2017-12-28 中兴通讯股份有限公司 Device control method, apparatus and system, and file sending method and apparatus
CN109033206A (en) * 2018-06-29 2018-12-18 北京奇虎科技有限公司 A kind of rule matching method, Cloud Server and rule match system
CN109597601A (en) * 2018-12-03 2019-04-09 苏州提点信息科技有限公司 A kind of kitchen display system for supporting voice operating
CN208969451U (en) * 2018-10-10 2019-06-11 北京邮电大学 A kind of intelligent home control system
CN110012103A (en) * 2019-04-11 2019-07-12 芋头科技(杭州)有限公司 Control method, device and the controller and medium of smart machine
CN110376907A (en) * 2019-07-12 2019-10-25 恒大智慧科技有限公司 Intelligent home furnishing control method, device, equipment and storage medium
CN110534094A (en) * 2019-07-31 2019-12-03 大众问问(北京)信息科技有限公司 A kind of voice interactive method, device and equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017219653A1 (en) * 2016-06-24 2017-12-28 中兴通讯股份有限公司 Device control method, apparatus and system, and file sending method and apparatus
CN107084591A (en) * 2017-05-08 2017-08-22 广州视源电子科技股份有限公司 A kind of control method of intelligent refrigerator, device, equipment and storage medium
CN109033206A (en) * 2018-06-29 2018-12-18 北京奇虎科技有限公司 A kind of rule matching method, Cloud Server and rule match system
CN208969451U (en) * 2018-10-10 2019-06-11 北京邮电大学 A kind of intelligent home control system
CN109597601A (en) * 2018-12-03 2019-04-09 苏州提点信息科技有限公司 A kind of kitchen display system for supporting voice operating
CN110012103A (en) * 2019-04-11 2019-07-12 芋头科技(杭州)有限公司 Control method, device and the controller and medium of smart machine
CN110376907A (en) * 2019-07-12 2019-10-25 恒大智慧科技有限公司 Intelligent home furnishing control method, device, equipment and storage medium
CN110534094A (en) * 2019-07-31 2019-12-03 大众问问(北京)信息科技有限公司 A kind of voice interactive method, device and equipment

Cited By (32)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111737431A (en) * 2020-06-19 2020-10-02 海尔优家智能科技(北京)有限公司 Equipment exception processing method and device, storage medium and electronic device
CN111737431B (en) * 2020-06-19 2024-03-22 海尔优家智能科技(北京)有限公司 Method and device for processing equipment exception, storage medium and electronic device
CN111813001A (en) * 2020-07-10 2020-10-23 珠海格力电器股份有限公司 Equipment cooperative control method, equipment capable of cooperative control and cooperative system
CN111813001B (en) * 2020-07-10 2023-10-27 珠海格力电器股份有限公司 Cooperative control method for equipment, cooperative controllable equipment and cooperative system
CN111857835A (en) * 2020-07-23 2020-10-30 珠海优特物联科技有限公司 Signal processing method and device, smart card and readable storage medium
CN111857835B (en) * 2020-07-23 2024-01-19 珠海优特电力科技股份有限公司 Signal processing method and device, smart card and readable storage medium
CN112087492A (en) * 2020-08-12 2020-12-15 北京首钢自动化信息技术有限公司 Equipment management method and device, electronic equipment and storage medium
CN112087492B (en) * 2020-08-12 2023-05-12 北京首钢自动化信息技术有限公司 Device management method and device, electronic device and storage medium
CN112286062A (en) * 2020-09-23 2021-01-29 青岛经济技术开发区海尔热水器有限公司 Intelligent household appliance linkage control method and device, electronic equipment and storage medium
CN112286062B (en) * 2020-09-23 2023-02-28 青岛经济技术开发区海尔热水器有限公司 Intelligent household appliance linkage control method and device, electronic equipment and storage medium
CN112130980A (en) * 2020-09-29 2020-12-25 海尔优家智能科技(北京)有限公司 Operation execution method and device, storage medium and electronic device
WO2022083210A1 (en) * 2020-10-23 2022-04-28 重庆海尔空调器有限公司 Control method, control device and control system for plurality of intelligent household appliances
CN112134965B (en) * 2020-11-24 2021-02-26 树根互联技术有限公司 Issuing method and device of Internet of things instruction and electronic equipment
CN112134965A (en) * 2020-11-24 2020-12-25 树根互联技术有限公司 Issuing method and device of Internet of things instruction and electronic equipment
CN112492023A (en) * 2020-11-25 2021-03-12 青岛海尔科技有限公司 Device control method, device, storage medium, and electronic apparatus
CN112492023B (en) * 2020-11-25 2023-04-07 青岛海尔科技有限公司 Device control method, device, storage medium, and electronic apparatus
CN112738245A (en) * 2020-12-28 2021-04-30 青岛海尔科技有限公司 Method and device for determining equipment response information, storage medium and electronic device
CN112738245B (en) * 2020-12-28 2023-03-28 青岛海尔科技有限公司 Method and device for determining equipment response information, storage medium and electronic device
CN112856779A (en) * 2021-01-29 2021-05-28 海尔(深圳)研发有限责任公司 Method and device for monitoring air conditioner and monitoring equipment
CN112925219A (en) * 2021-02-03 2021-06-08 青岛海尔科技有限公司 Method and device for executing smart home scene
CN113311720A (en) * 2021-04-30 2021-08-27 青岛海尔空调器有限总公司 Intelligent household appliance linkage control method, device and equipment
CN113485206A (en) * 2021-08-06 2021-10-08 时代云英(重庆)科技有限公司 Extensible Internet of things system and method
CN113674749A (en) * 2021-08-26 2021-11-19 珠海格力电器股份有限公司 Control method, control device, electronic equipment and storage medium
CN113672284A (en) * 2021-10-25 2021-11-19 北京中天星控科技开发有限公司 Instruction execution method, system, electronic equipment and storage medium
CN114172911A (en) * 2021-10-29 2022-03-11 青岛海享智科技有限公司 Group control system control method, apparatus and medium
CN114167766A (en) * 2021-11-15 2022-03-11 成都四方伟业软件股份有限公司 Method and device for issuing and executing instructions during multi-association equipment
CN114401298A (en) * 2021-12-16 2022-04-26 荣耀终端有限公司 Data transmission method, equipment and system
CN114280953A (en) * 2021-12-29 2022-04-05 河南紫联物联网技术有限公司 Scene mode creating method and device, electronic equipment and storage medium
CN114815707A (en) * 2022-05-17 2022-07-29 重庆伏特猫科技有限公司 Intelligent device control method and system based on Netty network framework
CN115001891B (en) * 2022-05-31 2023-05-19 四川虹美智能科技有限公司 Intelligent household appliance control method and device based on hierarchical management
CN115001891A (en) * 2022-05-31 2022-09-02 四川虹美智能科技有限公司 Intelligent household appliance control method and device based on hierarchical management
CN115343984A (en) * 2022-07-29 2022-11-15 青岛海尔科技有限公司 Equipment control method, device, storage medium and electronic device

Also Published As

Publication number Publication date
CN111143061B (en) 2024-02-23

Similar Documents

Publication Publication Date Title
CN111143061A (en) Multi-device linkage control method and device and storage medium
CN112073471B (en) Control method and device of equipment, storage medium and electronic device
CN109147788B (en) Local voice library updating method and device
CN111885144A (en) Equipment binding method and device
CN109561002B (en) Voice control method and device for household electrical appliance
CN111934956B (en) Equipment configuration method and device, storage medium and electronic device
CN111736938B (en) Information display method and device, storage medium and electronic device
CN113254038B (en) Upgrade confirmation method, server, line controller and mobile terminal
CN111552195A (en) Control method and device of intelligent household equipment
WO2023045611A1 (en) Device control method, apparatus and system, storage medium, and electronic apparatus
CN113518125A (en) Offline data uploading method and system, storage medium and electronic device
CN112925219A (en) Method and device for executing smart home scene
CN112671572B (en) Method and device for intelligent equipment network distribution, storage medium and electronic device
CN112423322A (en) Model information sending method, device, storage medium and electronic device
CN112130458A (en) Target device control method and device, storage medium and electronic device
CN110830334B (en) Household appliance control method, device, system, server and household appliance
CN110880994A (en) Control method and control equipment of household appliance
CN112035139A (en) Data updating method, device, system and storage medium for intelligent household equipment
CN113596235B (en) Operation instruction issuing method and device, storage medium and electronic device
CN111741085A (en) Processing method and device of intelligent equipment, storage medium and electronic device
CN111427316A (en) Scene triggering method and device, storage medium and electronic device
CN104869171A (en) Information processing method and smart home equipment
CN110445784A (en) The display methods and device of operation data, energy resource system
CN110425688A (en) A kind of intelligent control method and device of air conditioner
CN113674740A (en) Response method and device of household appliance, storage medium and electronic device

Legal Events

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