CN117579410A - Control command distribution method and device, storage medium and electronic device - Google Patents

Control command distribution method and device, storage medium and electronic device Download PDF

Info

Publication number
CN117579410A
CN117579410A CN202311370478.9A CN202311370478A CN117579410A CN 117579410 A CN117579410 A CN 117579410A CN 202311370478 A CN202311370478 A CN 202311370478A CN 117579410 A CN117579410 A CN 117579410A
Authority
CN
China
Prior art keywords
target
command
equipment
determining
control commands
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
CN202311370478.9A
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
Haier Uplus Intelligent Technology Beijing Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
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 Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd, Haier Uplus Intelligent Technology Beijing Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202311370478.9A priority Critical patent/CN117579410A/en
Publication of CN117579410A publication Critical patent/CN117579410A/en
Pending legal-status Critical Current

Links

Classifications

    • 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] or computer integrated manufacturing [CIM]
    • 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/2807Exchanging configuration information on appliance services in a home automation network
    • 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
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/26Pc applications
    • G05B2219/2642Domotique, domestic, home control, automation, smart house
    • 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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Manufacturing & Machinery (AREA)
  • Quality & Reliability (AREA)
  • Selective Calling Equipment (AREA)

Abstract

The application discloses a control command distribution method, a control command distribution device, a storage medium and an electronic device, and relates to the technical field of smart families, wherein the control command distribution method comprises the following steps: and under the condition that a plurality of control commands for controlling the same target device are received, determining the device type corresponding to the target device, wherein the device type at least comprises one of the following: simple equipment and non-simple equipment; determining a distribution strategy of a plurality of control commands according to the device type, wherein the distribution strategy comprises at least one of the following: under the condition that the equipment type of the target equipment is simple equipment, determining a distribution strategy to simultaneously and parallelly issue a plurality of control commands; under the condition that the equipment type of the target equipment is non-simple equipment, determining the distribution strategy to serially issue a plurality of control commands according to the preset execution time of each control command, and adopting the technical scheme, the technical problem that the issuing strategy of the corresponding control command cannot be determined according to the equipment type of the equipment is solved.

Description

Control command distribution method and device, storage medium and electronic device
Technical Field
The present invention relates to the technical field of smart home, and in particular, to a control command distribution method, a control command distribution device, a storage medium, and an electronic device.
Background
At present, the scene and the AI control equipment are both used for calculating whether an issued instruction is legal or not and whether a legal instruction needs to be compensated to provide a control success rate or not based on the equipment digital model, for example, a user controls an air conditioner through an intelligent sound box, adjusts temperature in a shutdown state, after an instruction is sent to the equipment digital model, the equipment digital model is matched with a compensation rule according to the current state shutdown and the issued instruction temperature adjustment, namely, a startup instruction is arranged in front, so that the equipment is issued with the startup instruction first, and the equipment is issued with the temperature adjustment after the equipment is changed into the startup state. The digital model of the device is required to order the instructions for controlling the same device, namely after receiving the instructions of the non-passing calling party (scene and AI), the digital model is required to order the instructions according to the device, the instructions for controlling different devices are issued to different devices in parallel, the instructions for controlling the same device are issued to the devices in series, but because part of the devices are controlled by the device type characteristics of the device, the legitimacy of the instructions is not required to be calculated based on the current state at all, the part of the devices only have the commands of opening, closing and the like which are irrelevant to the current state, and therefore, the ordering is not required at all when a plurality of instructions corresponding to the part of the devices come, and if the ordering is carried out, the response time of the part of the devices is greatly improved.
Therefore, for the technical problem that in the related art, the issuing strategy of the corresponding control command cannot be determined according to the device type of the device, no effective solution has been proposed yet.
Disclosure of Invention
The embodiment of the application provides a control command distribution method, a control command distribution device, a storage medium and an electronic device, which are used for at least solving the technical problem that in the related art, a corresponding control command distribution strategy cannot be determined according to the equipment type of equipment.
According to an embodiment of the present application, there is provided a control command distribution method, including: determining a device type corresponding to the target device under the condition that a plurality of control commands for controlling the same target device are received, wherein the device type at least comprises one of the following: simple equipment and non-simple equipment; determining a distribution strategy of the plurality of control commands according to the device type, wherein the distribution strategy comprises at least one of the following: determining that the distribution policy is to simultaneously issue the plurality of control commands in parallel in the case that the device type of the target device is simple; and in the case that the device type of the target device is a non-simple device, determining the distribution strategy to serially issue the plurality of control commands according to the preset execution time of each control command.
In an exemplary embodiment, before determining the device type corresponding to the target device in a case of receiving a plurality of control commands for controlling the same target device, the method further includes: under the condition that a target object is determined to trigger a preset scene, acquiring a batch of original commands of scene services corresponding to the preset scene, wherein the batch of original commands are used for carrying out linkage control on a plurality of different devices in a target area; analyzing the batch of original commands to obtain a plurality of target control commands; and identifying the equipment to be controlled corresponding to each target control command, and decomposing the target control commands into a plurality of command queues to be issued, wherein each command queue to be issued corresponds to a unique target equipment to be controlled.
In an exemplary embodiment, after determining the distribution policy to issue the plurality of control commands in series according to a preset execution time of each control command, the method further includes: identifying whether a mutual exclusion relation or a compensation relation exists between any two control commands issued in series before and after; under the condition that the mutual exclusion relation or the compensation relation exists, determining a time difference value of the preset execution time corresponding to the any two control commands; and directly issuing a control command with the latest preset execution time in the two arbitrary control commands to the target equipment under the condition that the time difference value is smaller than or equal to a preset difference value.
In an exemplary embodiment, in a case of receiving a plurality of control commands for controlling the same target device, determining a device type corresponding to the target device includes: acquiring a device digital model corresponding to the target device, wherein the device digital model is used for indicating command types and command execution strategies which the target device is allowed to execute; and determining a target command type and a target command execution strategy corresponding to the target device according to the device digital model, so as to determine the device type corresponding to the target device based on the target command type and the target command execution strategy.
In an exemplary embodiment, determining a device type corresponding to the target device based on the target command type and the target command execution policy includes: under the condition that the command types at least comprise group command types and/or business function command types, determining the device type corresponding to the target device as non-simple device; under the condition that the target command execution strategy at least comprises a mutual exclusion strategy and a compensation strategy, determining the equipment type corresponding to the target equipment as non-simple equipment; and under the condition that the command types do not comprise group command types and/or business function command types and the target command execution strategy does not comprise mutual exclusion and compensation strategies, determining the device type corresponding to the target device as simple device.
In an exemplary embodiment, after determining the distribution policy of the plurality of control commands according to the device type, the method further includes: acquiring an execution result of the target device executing the plurality of control commands; determining the final equipment state of the target equipment according to the execution result; and feeding back the equipment state to the scene service to indicate the current target equipment of the target object to finish command adjustment.
In an exemplary embodiment, after feeding back the device status to the scene service to indicate that the target object is currently the target device to complete the command adjustment, the method further includes: under the condition that the target object is determined to need to change the equipment state of the current target equipment, acquiring a starting state adjustment instruction of the target object aiming at the current target equipment, wherein the dynamic adjustment instruction carries a target control command; and indicating the current target equipment to adjust the equipment state to the target equipment state according to the dynamic adjustment instruction, and sending a prompt whether to generate a new preset scene to the scene service.
According to another embodiment of the present application, there is also provided a control command distributing apparatus, including: the first determining module is used for determining a device type corresponding to the target device under the condition that a plurality of control commands for controlling the same target device are received, wherein the device type at least comprises one of the following: simple equipment and non-simple equipment; a second determining module, configured to determine a distribution policy of the plurality of control commands according to the device type, where the distribution policy includes at least one of: determining that the distribution policy is to simultaneously issue the plurality of control commands in parallel in the case that the device type of the target device is simple; and in the case that the device type of the target device is a non-simple device, determining the distribution strategy to serially issue the plurality of control commands according to the preset execution time of each control command.
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 above-described control command distribution method when run.
According to still another aspect of the embodiments of the present application, there is further provided an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the above-mentioned control command distribution method through the computer program.
In the embodiment of the application, when a plurality of control commands are to be executed simultaneously by the same target device, the device type of the target device is determined, the distribution strategy of issuing the plurality of control commands to the target device is determined based on the device type, specifically, for simple devices, the plurality of control commands can be issued to the target device for execution simultaneously, for non-simple devices, the control time sequence corresponding to the plurality of control commands is determined, and each control command is issued to the target device in series.
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 present application or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those 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 a control command distribution method according to an embodiment of the present application;
FIG. 2 is a flow chart of a method of distributing control commands according to an embodiment of the present application;
FIG. 3 is a timing diagram of a distribute command according to an embodiment of the present application;
FIG. 4 is a flow chart of a device digital model execution command according to an embodiment of the present application;
fig. 5 is a block diagram of a control command distribution apparatus according to an embodiment of the present application.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, 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 one of ordinary skill in the art based on the embodiments herein 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 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 embodiments of the present 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 one aspect of the embodiments of the present application, a method for distributing control commands is provided. The distribution method of the control command is widely applied to full-house intelligent digital control application scenes such as intelligent Home (Smart Home), intelligent Home equipment ecology, intelligent Home (Intelligence House) ecology and the like. Alternatively, in the present embodiment, the above-described control command distribution method may be applied to a hardware environment constituted by the terminal device 102 and the server 104 as shown in fig. 1. As shown in fig. 1, the server 104 is connected to the terminal device 102 through a network, and may be used to provide services (such as application services and the like) for a terminal or a client installed on the terminal, a database may be set on the server or independent of the server, for providing data storage services for the server 104, 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 device 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.
In this embodiment, a control command distribution method is provided and applied to the computer terminal, and fig. 2 is a flowchart of a control command distribution method according to an embodiment of the present application, where the flowchart includes the following steps:
step S202, determining a device type corresponding to a target device when receiving a plurality of control commands for controlling the same target device, where the device type includes at least one of: simple equipment and non-simple equipment;
optionally, the simple device is used for indicating that the device digital model associated with the target device only allows executing commands independent of the current state of the device, and the non-simple device is used for indicating that the device digital model associated with the target device has commands related to the current state of the device, such as group commands and/or service functions and/or mutual exclusion and compensation strategies.
For example, for an air conditioner, it may be determined by the device digital model that the air conditioner has a mutual exclusion policy (for example, the device digital model cannot adjust the temperature in a shutdown state), when issuing a plurality of control instructions to the air conditioner, the device digital model is instructed to issue a plurality of commands for controlling the device in series, the device is started first, and the device is started first until the device responds to the subsequent temperature adjustment issued again, so that when the temperature adjustment instruction reaches the device, the device is started, the device will normally execute, otherwise the device will not execute;
optionally, for the light group, the light group device is determined to be a simple device through the device digital model, the device digital model can issue a plurality of commands for controlling the device in parallel, that is, a plurality of light-on instructions are issued to the device at the same time, so that the lights on the same panel are turned on together.
Step S204, determining a distribution policy of the plurality of control commands according to the device type, where the distribution policy includes at least one of: determining that the distribution policy is to simultaneously issue the plurality of control commands in parallel in the case that the device type of the target device is simple; and in the case that the device type of the target device is a non-simple device, determining the distribution strategy to serially issue the plurality of control commands according to the preset execution time of each control command.
Through the steps, when a plurality of control commands are to be executed simultaneously by the same target device, the device type of the target device is determined, the distribution strategy of issuing the plurality of control commands to the target device is determined based on the device type, specifically, for simple devices, the plurality of control commands can be issued to the target device for execution simultaneously, for non-simple devices, the control time sequence corresponding to the plurality of control commands is determined, and each control command is issued to the target device in sequence.
In an exemplary embodiment, before determining the device type corresponding to the target device in a case of receiving a plurality of control commands for controlling the same target device, the method further includes: under the condition that a target object is determined to trigger a preset scene, acquiring a batch of original commands of scene services corresponding to the preset scene, wherein the batch of original commands are used for carrying out linkage control on a plurality of different devices in a target area; analyzing the batch of original commands to obtain a plurality of target control commands; and identifying the equipment to be controlled corresponding to each target control command, and decomposing the target control commands into a plurality of command queues to be issued, wherein each command queue to be issued corresponds to a unique target equipment to be controlled.
In short, since there may be linkage of multiple devices in the same scene, in the scene service corresponding to the scene, there will be batch original commands for controlling the multiple devices to run, in order to facilitate issuing a suitable control command to each device, the batch original commands are analyzed and classified by the device digital model, multiple control commands attached to the same target object are adjusted in the same command queue to be issued, then the commands in the command queues to be issued of different devices are issued in parallel, and then, after determining the device type of the target device, other device commands except the first command are issued dynamically according to the distribution strategy.
In an exemplary embodiment, after determining the distribution policy to issue the plurality of control commands in series according to a preset execution time of each control command, the method further includes: identifying whether a mutual exclusion relation or a compensation relation exists between any two control commands issued in series before and after; under the condition that the mutual exclusion relation or the compensation relation exists, determining a time difference value of the preset execution time corresponding to the any two control commands; and directly issuing a control command with the latest preset execution time in the two arbitrary control commands to the target equipment under the condition that the time difference value is smaller than or equal to a preset difference value.
For example, when the target device is air-conditioned, the first command that needs to be issued in series is: the second command is to adjust the cooling temperature to 24 degrees, the second command is to adjust the cooling temperature to 27 degrees, assuming that the preset time difference between the two commands is 2 minutes, when the target device in the scene executes the first command at 10:30, the second command will be executed at 10:35, at this time, the second command can be sequentially executed according to the time sequence of the commands, but if the target device in the scene executes the first command at 10:30, the second command needs to be executed at 10:31, and at this time, the target device can be directly instructed to execute the second command at 10:30 until the command after 10:31 is finished when the command interval time is too short. Thereby greatly guaranteeing the effectiveness of the execution of the control command.
In an exemplary embodiment, in a case of receiving a plurality of control commands for controlling the same target device, determining a device type corresponding to the target device includes: acquiring a device digital model corresponding to the target device, wherein the device digital model is used for indicating command types and command execution strategies which the target device is allowed to execute; and determining a target command type and a target command execution strategy corresponding to the target device according to the device digital model, so as to determine the device type corresponding to the target device based on the target command type and the target command execution strategy.
It can be understood that, the control command corresponding to the target device is typically issued through the device digital model of the target device, so that the device type of the target device may also be determined based on distinguishing the command type and the command execution policy from the device digital model, for example, assuming that the control command processed in the device digital model associated with the target device does not have the characteristics of group command, service function, mutual exclusion, compensation policy, etc., it is indicated that the current control command is only a command having no relation to the current state corresponding to the target device, such as on/off, etc., and the corresponding device of this type may be referred to as a simple device, and a corresponding distribution policy is set for this type of device, after the device of the same type is subsequently determined, the control command may be quickly sent according to the distribution policy, thereby ensuring the execution efficiency of the control command and realizing the quick response to the user demand.
In an exemplary embodiment, determining a device type corresponding to the target device based on the target command type and the target command execution policy includes: under the condition that the command types at least comprise group command types and/or business function command types, determining the device type corresponding to the target device as non-simple device; under the condition that the target command execution strategy at least comprises a mutual exclusion strategy and a compensation strategy, determining the equipment type corresponding to the target equipment as non-simple equipment; and under the condition that the command types do not comprise group command types and/or business function command types and the target command execution strategy does not comprise mutual exclusion and compensation strategies, determining the device type corresponding to the target device as simple device.
In an exemplary embodiment, after determining the distribution policy of the plurality of control commands according to the device type, the method further includes: acquiring an execution result of the target device executing the plurality of control commands; determining the final equipment state of the target equipment according to the execution result; and feeding back the equipment state to the scene service to indicate the current target equipment of the target object to finish command adjustment.
That is, in the case that the execution of the plurality of control commands of the same target device is completed on the target device, the execution result of the plurality of control commands is determined according to the completion result of each control command, the device state of the target device at the last is determined by combining the last issued control command, and then the feedback scene service determines the specific operation condition of each device in the scene triggered by the target object.
In an exemplary embodiment, after feeding back the device status to the scene service to indicate that the target object is currently the target device to complete the command adjustment, the method further includes: under the condition that the target object is determined to need to change the equipment state of the current target equipment, acquiring a starting state adjustment instruction of the target object aiming at the current target equipment, wherein the dynamic adjustment instruction carries a target control command; and indicating the current target equipment to adjust the equipment state to the target equipment state according to the dynamic adjustment instruction, and sending a prompt whether to generate a new preset scene to the scene service.
It should be noted that, because the control command of the corresponding device in the service of the corresponding scene may be adaptively adjusted when the usage habit of the target object is changed, in order to facilitate the subsequent management control of the target device, the dynamic adjustment command issued by the target object for a part of the target devices may be further combined with the old preset scene to update the scene or generate a new scene, thereby meeting the increasingly changed service requirement of the target object.
In order to better understand the process of the control command distribution method, the following describes the implementation method flow of the control command distribution in combination with the alternative embodiment, but is not limited to the technical solution of the embodiment of the present application.
In this embodiment, a method for distributing control commands is provided, and fig. 3 is a timing chart of command distribution according to an embodiment of the present application, where, as shown in fig. 3, the caller 32, the device digital model service 34, and the device 36 can implement the method for distributing control commands. Where digitizing device 34 is a device digital model service for determining which control commands are attributed to the same target device, grouping multiple control commands by device.
Specifically, the implementation steps are as follows:
step S1: the device uses the object to trigger a scene, and the scene service issues the corresponding original batch command to the device digital model service, wherein the scene may simultaneously comprise a plurality of devices, and each device corresponds to a plurality of control commands.
Step S2: the device digital model service groups the individual device subcommand queues by device and determines if the current device is a simple device. It can be understood that when a plurality of devices are controlled to be linked simultaneously under the situation, in order to ensure that a plurality of control commands corresponding to the same device are issued to the corresponding devices, the original batch commands are divided according to the devices by using the device digital model service, so as to obtain a plurality of control commands corresponding to each device to be issued and executed. In addition, according to the preset, the device without group command, service function, mutual exclusion and compensation strategy in the device digital model is identified as simple device, other devices except the above conditions are identified as non-simple devices, and a plurality of control commands are sent according to the set simple device and the distribution strategy of the non-simple devices.
Step S3: issuing subcommands in the subcommand queues of the devices; specifically, if the device is simple, all subcommands in the device queue are issued together; if the device is not simple, the subcommands in the device queue are issued in series, and the next subcommand in the device queue can be issued after each subcommand is executed.
Step S4: and obtaining the subcommand response corresponding to each device, namely after the subcommand is issued, determining the final execution effect of each subcommand by obtaining the response information of the subcommand in order to better determine the execution effect of the command.
Step S5: after the execution of the subcommands in each equipment queue is completed, the execution results of the subcommands are summarized. I.e. sort the issuing of each subcommand and the response results.
Step S6: and feeding the summarized results back to the scene service to realize callback of the device digital model service on the batch command results.
FIG. 4 is a flow chart of a device digital model execution command according to an embodiment of the present application, as an alternative implementation; the method specifically comprises the following steps:
step S402, the equipment digital model receives batch commands;
step S404, grouping each subcommand according to the equipment;
step S406, the first command of each equipment group is issued in parallel;
step S408, determining whether the current device is a simple device;
step S410, under the condition that the current device is not simple, other subcommands in the corresponding device group are stored in the memory to wait for the response of the previous subcommand and then are issued;
step S412, in the case that the current device is a simple device, other subcommands in the corresponding device group are issued together;
in short, by adding a dynamic device distinguishing policy, that is, when the device digital model processes a plurality of commands of the same device, the command distributing policy is distinguished according to the device type, and the device is directly issued to the simple device, so that the quick response of the device is achieved. For example, 10 lamps on the same panel are controlled because the 10 lamps belong to one device on one panel, but the instructions to the digital model of the device are 10 (onOff 1: true, onOff2: true … onOff10: true), and the serial results in the user seeing that the 10 lamps are lit one after the other, rather than all together. In order to solve the problem, by adding a dynamic device distinguishing policy into the device digital model, because when each device is controlled, the device digital model can take the configuration of the controlled device, if a simple device is found, that is, a plurality of instructions are issued in parallel, a user can see 10 lamps to be lightened together for the lamp device.
Through the steps, the part of simple equipment (such as a lamp) which does not need instruction sequencing in the scene is identified, and then the equipment digital model is used for carrying out parallel issuing of a plurality of instructions on the part of simple equipment, so that the equipment in the scene can respond more quickly.
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 (such as ROM/RAM, magnetic disk, optical disk), comprising several 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 of the embodiments of the present application.
Fig. 5 is a block diagram of a control command distributing apparatus according to an embodiment of the present application; as shown in fig. 5, includes:
a first determining module 52, configured to determine, when a plurality of control commands for controlling the same target device are received, a device type corresponding to the target device, where the device type includes at least one of: simple equipment and non-simple equipment;
a second determining module 54, configured to determine a distribution policy of the plurality of control commands according to the device type, where the distribution policy includes at least one of: determining that the distribution policy is to simultaneously issue the plurality of control commands in parallel in the case that the device type of the target device is simple; and in the case that the device type of the target device is a non-simple device, determining the distribution strategy to serially issue the plurality of control commands according to the preset execution time of each control command.
Through the device, when the same target device is to execute a plurality of control commands at the same time, the device type of the target device is determined, the distribution strategy of issuing the plurality of control commands to the target device is determined based on the device type, specifically, for simple devices, the plurality of control commands can be issued to the target device for execution at the same time, for non-simple devices, the control time sequence corresponding to the plurality of control commands is determined, and each control command is issued to the target device in sequence.
In an exemplary embodiment, the above apparatus further includes: the system comprises a decomposition module, a target object and a control module, wherein the decomposition module is used for acquiring batch original commands of scene services corresponding to a preset scene under the condition that the preset scene is triggered by the target object before determining the equipment type corresponding to the target equipment under the condition that a plurality of control commands for controlling the same target equipment are received, wherein the batch original commands are used for carrying out linkage control on a plurality of different equipment in a target area; analyzing the batch of original commands to obtain a plurality of target control commands; and identifying the equipment to be controlled corresponding to each target control command, and decomposing the target control commands into a plurality of command queues to be issued, wherein each command queue to be issued corresponds to a unique target equipment to be controlled.
In an exemplary embodiment, the above apparatus further includes: a third determining module, configured to determine the distribution policy to be that after the plurality of control commands are issued in series according to a preset execution time of each control command, the method further includes: identifying whether a mutual exclusion relation or a compensation relation exists between any two control commands issued in series before and after; under the condition that the mutual exclusion relation or the compensation relation exists, determining a time difference value of the preset execution time corresponding to the any two control commands; and directly issuing a control command with the latest preset execution time in the two arbitrary control commands to the target equipment under the condition that the time difference value is smaller than or equal to a preset difference value.
In an exemplary embodiment, the first determining module is further configured to obtain a device digital model corresponding to the target device, where the device digital model is used to indicate a command type and a command execution policy that the target device is allowed to execute; and determining a target command type and a target command execution strategy corresponding to the target device according to the device digital model, so as to determine the device type corresponding to the target device based on the target command type and the target command execution strategy.
In an exemplary embodiment, the first determining module is further configured to determine that the device type corresponding to the target device is a non-simple device when the command type includes at least a group command type and/or a service function command type; under the condition that the target command execution strategy at least comprises a mutual exclusion strategy and a compensation strategy, determining the equipment type corresponding to the target equipment as non-simple equipment; and under the condition that the command types do not comprise group command types and/or business function command types and the target command execution strategy does not comprise mutual exclusion and compensation strategies, determining the device type corresponding to the target device as simple device.
In an exemplary embodiment, the above apparatus further includes: the feedback module is used for acquiring an execution result of the target device for executing the plurality of control commands after determining the distribution strategy of the plurality of control commands according to the device type; determining the final equipment state of the target equipment according to the execution result; and feeding back the equipment state to the scene service to indicate the current target equipment of the target object to finish command adjustment.
In an exemplary embodiment, the feedback module further includes: the adjusting unit is used for acquiring an initial state adjusting instruction of the target object aiming at the current target equipment under the condition that the target object is determined to need to change the equipment state of the current target equipment, wherein the dynamic adjusting instruction carries a target control command; and indicating the current target equipment to adjust the equipment state to the target equipment state according to the dynamic adjustment instruction, and sending a prompt whether to generate a new preset scene to the scene service.
Embodiments of the present application also provide a storage medium including a stored program, wherein the program performs the method of any one of the above when run.
Alternatively, in the present embodiment, the above-described storage medium may be configured to store program code for performing the steps of:
s1, under the condition that a plurality of control commands for controlling the same target device are received, determining a device type corresponding to the target device, wherein the device type at least comprises one of the following: simple equipment and non-simple equipment;
s2, determining a distribution strategy of the plurality of control commands according to the equipment type, wherein the distribution strategy comprises at least one of the following steps: determining that the distribution policy is to simultaneously issue the plurality of control commands in parallel in the case that the device type of the target device is simple; and in the case that the device type of the target device is a non-simple device, determining the distribution strategy to serially issue the plurality of control commands according to the preset execution time of each control command.
Embodiments of the present application 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 method embodiments described above.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, where the transmission device is connected to the processor, and the input/output device is connected to the processor.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
s1, under the condition that a plurality of control commands for controlling the same target device are received, determining a device type corresponding to the target device, wherein the device type at least comprises one of the following: simple equipment and non-simple equipment;
s2, determining a distribution strategy of the plurality of control commands according to the equipment type, wherein the distribution strategy comprises at least one of the following steps: determining that the distribution policy is to simultaneously issue the plurality of control commands in parallel in the case that the device type of the target device is simple; and in the case that the device type of the target device is a non-simple device, determining the distribution strategy to serially issue the plurality of control commands according to the preset execution time of each control command.
Alternatively, in the present embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments and optional implementations, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the application described above may be implemented in a general purpose computing device, they may be centralized on a single computing device, or distributed across a network of computing devices, or they may alternatively be implemented in program code executable by computing devices, such that they may be stored in a memory device for execution by the computing devices and, in some cases, the steps shown or described may be performed in a different order than what is shown or described, or they may be implemented as individual integrated circuit modules, or as individual integrated circuit modules. Thus, the present application is not limited to any specific combination of hardware and software.
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 and are intended to be comprehended within the scope of the present application.

Claims (10)

1. A method of distributing control commands, comprising:
and under the condition that a plurality of control commands for controlling the same target device are received, determining the device type corresponding to the target device, wherein the device type at least comprises one of the following: simple equipment and non-simple equipment;
determining a distribution strategy of the plurality of control commands according to the device type, wherein the distribution strategy comprises at least one of the following: determining that the distribution policy is to simultaneously issue the plurality of control commands in parallel in the case that the device type of the target device is simple; and in the case that the device type of the target device is a non-simple device, determining the distribution strategy to serially issue the plurality of control commands according to the preset execution time of each control command.
2. The method for distributing a control command according to claim 1, wherein, in a case where a plurality of control commands for controlling the same target device are received, before determining a device type corresponding to the target device, the method further comprises:
under the condition that a target object is determined to trigger a preset scene, acquiring a batch of original commands of scene services corresponding to the preset scene, wherein the batch of original commands are used for carrying out linkage control on a plurality of different devices in a target area;
analyzing the batch of original commands to obtain a plurality of target control commands;
and identifying the equipment to be controlled corresponding to each target control command, and decomposing the target control commands into a plurality of command queues to be issued, wherein each command queue to be issued corresponds to a unique target equipment to be controlled.
3. The method of claim 1, wherein after determining the distribution policy to serially issue the plurality of control commands according to a preset execution time for each control command, the method further comprises:
identifying whether a mutual exclusion relation or a compensation relation exists between any two control commands issued in series before and after;
under the condition that the mutual exclusion relation or the compensation relation exists, determining a time difference value of the preset execution time corresponding to the any two control commands;
and directly issuing a control command with the latest preset execution time in the two arbitrary control commands to the target equipment under the condition that the time difference value is smaller than or equal to a preset difference value.
4. The method for distributing a control command according to claim 1, wherein, in a case where a plurality of control commands for controlling the same target device are received, determining a device type corresponding to the target device includes:
acquiring a device digital model corresponding to the target device, wherein the device digital model is used for indicating command types and command execution strategies which the target device is allowed to execute;
and determining a target command type and a target command execution strategy corresponding to the target device according to the device digital model, so as to determine the device type corresponding to the target device based on the target command type and the target command execution strategy.
5. The method for distributing control commands according to claim 4, wherein determining the device type corresponding to the target device based on the target command type and the target command execution policy comprises:
under the condition that the command types at least comprise group command types and/or business function command types, determining the device type corresponding to the target device as non-simple device;
under the condition that the target command execution strategy at least comprises a mutual exclusion strategy and a compensation strategy, determining the equipment type corresponding to the target equipment as non-simple equipment;
and under the condition that the command types do not comprise group command types and/or business function command types and the target command execution strategy does not comprise mutual exclusion and compensation strategies, determining the device type corresponding to the target device as simple device.
6. The method for distributing control commands according to claim 1, wherein after determining the distribution policy of the plurality of control commands according to the device type, the method further comprises:
acquiring an execution result of the target device executing the plurality of control commands;
determining the final equipment state of the target equipment according to the execution result;
and feeding back the equipment state to the scene service to indicate the current target equipment of the target object to finish command adjustment.
7. The method of claim 6, wherein the device status is fed back to a scene service to indicate the target object after the current target device completes command adjustment, the method further comprising:
under the condition that the target object is determined to need to change the equipment state of the current target equipment, acquiring a starting state adjustment instruction of the target object aiming at the current target equipment, wherein the dynamic adjustment instruction carries a target control command;
and indicating the current target equipment to adjust the equipment state to the target equipment state according to the dynamic adjustment instruction, and sending a prompt whether to generate a new preset scene to the scene service.
8. A control command distribution apparatus, comprising:
the first determining module is used for determining a device type corresponding to the target device under the condition that a plurality of control commands for controlling the same target device are received, wherein the device type at least comprises one of the following: simple equipment and non-simple equipment;
a second determining module, configured to determine a distribution policy of the plurality of control commands according to the device type, where the distribution policy includes at least one of: determining that the distribution policy is to simultaneously issue the plurality of control commands in parallel in the case that the device type of the target device is simple; and in the case that the device type of the target device is a non-simple device, determining the distribution strategy to serially issue the plurality of control commands according to the preset execution time of each control command.
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 of the preceding 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 the claims 1 to 7 by means of the computer program.
CN202311370478.9A 2023-10-20 2023-10-20 Control command distribution method and device, storage medium and electronic device Pending CN117579410A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311370478.9A CN117579410A (en) 2023-10-20 2023-10-20 Control command distribution method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311370478.9A CN117579410A (en) 2023-10-20 2023-10-20 Control command distribution method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN117579410A true CN117579410A (en) 2024-02-20

Family

ID=89885204

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311370478.9A Pending CN117579410A (en) 2023-10-20 2023-10-20 Control command distribution method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN117579410A (en)

Similar Documents

Publication Publication Date Title
CN115167164A (en) Method and device for determining equipment scene, storage medium and electronic device
CN114697150B (en) Command issuing method and device, storage medium and electronic device
CN115167161A (en) Method and device for determining association relation of lamp, storage medium and electronic device
CN110794773A (en) Click-type scene creating method and device
CN116107975A (en) Control method and device of equipment, storage medium and electronic device
CN117579410A (en) Control command distribution method and device, storage medium and electronic device
CN115309062B (en) Control method and device of equipment, storage medium and electronic device
CN116107253A (en) Method and device for determining equipment use scene, storage medium and electronic device
CN115631832A (en) Cooking plan determination method and device, storage medium and electronic device
CN115457955A (en) Distributed awakening decision method and device, storage medium and electronic device
CN115174297B (en) Method and device for updating attribute information, storage medium and electronic device
US11251985B2 (en) Method for configuring and method for controlling a home automation apparatus
WO2024016506A1 (en) Gateway device control method and apparatus, and storage medium and electronic apparatus
CN115296947B (en) Control command response method and device, storage medium and electronic device
CN115297103B (en) Method and device for acquiring logic constraint file, storage medium and electronic device
CN115277412B (en) Edge gateway upgrading method and device, storage medium and electronic device
CN115314332B (en) Equipment theme setting method and device, storage medium and electronic device
CN117784631A (en) Method and device for sending scene execution instruction, storage medium and electronic device
CN115174382B (en) Equipment upgrading method, storage medium and electronic device
CN115174513B (en) Message pushing method and device, storage medium and electronic device
CN117499472A (en) Intelligent terminal voice broadcasting method, system, storage medium and electronic device
CN115296946A (en) Control request decomposition method and device, storage medium and electronic device
CN117749549A (en) Equipment operation method and device, storage medium and electronic device
CN115616930A (en) Control instruction sending method and device, storage medium and electronic device
CN115174297A (en) Attribute information updating method and device, 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