CN112130980A - Operation execution method and device, storage medium and electronic device - Google Patents

Operation execution method and device, storage medium and electronic device Download PDF

Info

Publication number
CN112130980A
CN112130980A CN202011057037.XA CN202011057037A CN112130980A CN 112130980 A CN112130980 A CN 112130980A CN 202011057037 A CN202011057037 A CN 202011057037A CN 112130980 A CN112130980 A CN 112130980A
Authority
CN
China
Prior art keywords
execution
operations
target device
target
result
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
CN202011057037.XA
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.)
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 CN202011057037.XA priority Critical patent/CN112130980A/en
Publication of CN112130980A publication Critical patent/CN112130980A/en
Pending legal-status Critical Current

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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses an operation execution method and device, a storage medium and an electronic device, wherein the method comprises the following steps: under the condition that scene data meeting a trigger condition is detected, acquiring an execution sequence of a plurality of operations to be executed, wherein the scene data is scene data of a scene where target equipment is located; the method comprises the steps of controlling a target device to sequentially execute a plurality of operations according to an execution sequence, wherein for any two operations which are adjacent in sequence, after an execution success result of a first operation in any two operations responded by the target device is received, the target device is instructed to execute a second operation in any two operations, and the execution sequence of the first operation is located before the second operation.

Description

Operation execution method and device, storage medium and electronic device
Technical Field
The present invention relates to the field of communications, and in particular, to an operation execution method and apparatus, a storage medium, and an electronic apparatus.
Background
With the progress of scientific technology and the development of artificial intelligence, intelligent algorithms are also increasingly applied to daily life, especially for household appliances, the intelligent development of the household appliances is crucial, and the most important problem of intelligence is to intelligently meet the requirements of users.
In the related technology, most scenes are executed, and cannot be accurately executed according to the intention of a user under the condition of poor network, if a user sets a plurality of actions, all the actions may be executed in the same second when the scenes are executed, the scenes are executed quickly, but the actions are mutually dependent (for example, starting is set firstly, then a mode is set), and then the mode is set after the equipment is started cannot be ensured in parallel; or multiple actions are performed serially, ensuring one execution of a scene, but the scene execution takes too long.
In the related art, an effective technical scheme is not provided for solving the problem that the execution of a scene takes too long due to the dependency of the execution of part of scene operations when a plurality of scene operations are operated in parallel.
Disclosure of Invention
The embodiment of the invention provides an operation execution method and device, a storage medium and an electronic device, which are used for at least solving the problems that in the related art, when a plurality of scene operations are operated in parallel, the execution of part of the scene operations depends on the execution of the scene operations, so that the scene execution time is too long, and the like.
According to an aspect of the embodiments of the present invention, an operation execution method is provided, where an execution sequence of a plurality of operations to be executed is obtained when it is detected that scene data satisfies a trigger condition, where the scene data is scene data of a scene where a target device is located; and controlling the target device to sequentially execute the plurality of operations according to the execution sequence, wherein for any two operations adjacent in sequence, after receiving a successful execution result of a first operation in the any two operations responded by the target device, the target device is instructed to execute a second operation in the any two operations, and the execution sequence of the first operation is before the second operation.
In an exemplary embodiment, controlling the target device to sequentially execute the plurality of operations according to the execution order includes: acquiring a first time when the target device receives indication information, wherein the indication information is used for indicating the target device to execute the first operation; and within a preset time after the first time, if the execution success result of the first operation is not received, directly indicating the target equipment to execute the second operation.
In one exemplary embodiment, after determining that the execution success result of the first operation is not received, the method further comprises: setting a policy task for the target device, where the policy task is used to instruct issuing a first query instruction to the target device at different time points to obtain an execution result of the first operation, where the execution result at least includes one of: and the execution success result is an execution failure result.
In an exemplary embodiment, after setting the policy task for the target device, the method further includes: sending the first query instructions at different time points to the target equipment, and sending the query result corresponding to the first query instruction to the target terminal corresponding to the target equipment under the condition that the target equipment feeds back the execution failure result of the first operation; and under the condition that a first query instruction of a target time point in the different time points is issued to the target equipment and the target equipment feeds back an execution success result of the first operation, determining that the first operation is successfully executed.
In one exemplary embodiment, after determining that the execution success result of the first operation is not received, the method further comprises: and after the preset time, receiving the execution success result of the first operation fed back by the target equipment.
In an exemplary embodiment, after controlling the target device to sequentially execute the plurality of operations according to the execution order, the method further includes: after the operations are successfully executed, synchronizing the log data corresponding to the operations to a log system corresponding to the target device, so that the log system feeds the log data back to the target object under the condition that the log system receives a second query instruction of the target object.
According to another aspect of the embodiments of the present invention, there is also provided an operation execution apparatus, including: the device comprises an acquisition module, a processing module and a control module, wherein the acquisition module is used for acquiring the execution sequence of a plurality of operations to be executed under the condition that scene data is detected to meet a trigger condition, and the scene data is the scene data of a scene where target equipment is located; and the control module is configured to control the target device to sequentially execute the multiple operations according to the execution sequence, where for any two operations that are adjacent in sequence, after receiving an execution success result of a first operation in the any two operations responded by the target device, the target device is instructed to execute a second operation in the any two operations, and the execution sequence of the first operation is before the second operation.
In an exemplary embodiment, the control module is further configured to obtain a first time when the target device receives indication information, where the indication information is used to instruct the target device to perform the first operation; and within a preset time after the first time, if the execution success result of the first operation is not received, directly indicating the target equipment to execute the second operation.
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned operation execution method when running.
According to another aspect of the embodiments of the present invention, there is also provided an electronic apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the operation execution method through the computer program.
In the embodiment of the invention, under the condition that scene data meeting a trigger condition is detected, the execution sequence of a plurality of operations to be executed is obtained, wherein the scene data is the scene data of a scene where target equipment is located; and controlling the target device to sequentially execute the plurality of operations according to the execution sequence, wherein for any two operations adjacent in sequence, after receiving a successful execution result of a first operation in the any two operations responded by the target device, the target device is instructed to execute a second operation in the any two operations, the execution sequence of the first operation is before the second operation, namely according to the execution sequence of the plurality of operations to be executed, and the target device is controlled to sequentially execute the plurality of operations according to the execution sequence. By adopting the technical scheme, the problems that in the related art, when a plurality of scene operations are operated in parallel, the execution of part of the scene operations depends on the scene operations, so that the scene execution time is too long and the like are solved.
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 operating an execution method according to an embodiment of the present invention;
FIG. 2 is a flow chart of an operation execution method according to an embodiment of the present invention;
FIG. 3 is a block diagram of an architecture of an intelligent scene engine system according to an alternative embodiment of the invention;
FIG. 4 is a flowchart of an operational execution method implementation according to an alternative embodiment of the present invention;
fig. 5 is a block diagram of an operation performing apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
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. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or 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.
The method provided by the embodiment of the application can be executed in a mobile terminal or a similar operation device. Taking the mobile terminal as an example, fig. 1 is a hardware block diagram of the mobile terminal according to an operation execution method of the embodiment of the present invention. As shown in fig. 1, the mobile terminal 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, which in an exemplary embodiment 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 may also include more or fewer components than shown in FIG. 1, or have a different configuration with equivalent functionality to that shown in FIG. 1 or with more functionality than that shown in FIG. 1.
The memory 104 may be used to store computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the operation execution methods in the embodiments 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 methods 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 examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal over 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. 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, an operation execution method is provided, which is applied to the mobile terminal described above, and fig. 2 is a flowchart of an operation execution method according to an embodiment of the present invention, where the flowchart includes the following steps:
step S202, acquiring an execution sequence of a plurality of operations to be executed under the condition that scene data is detected to meet a trigger condition, wherein the scene data is scene data of a scene where target equipment is located;
step S204, controlling the target device to sequentially execute the plurality of operations according to the execution sequence, where for any two operations that are adjacent in sequence, after receiving a successful execution result of a first operation in the any two operations responded by the target device, the target device is instructed to execute a second operation in the any two operations, and the execution sequence of the first operation is before the second operation.
Through the steps, under the condition that scene data are detected to meet triggering conditions, the execution sequence of a plurality of operations to be executed is obtained, wherein the scene data are the scene data of the scene where the target equipment is located; and controlling the target device to sequentially execute the plurality of operations according to the execution sequence, wherein for any two operations adjacent in sequence, after receiving an execution success result of a first operation in the any two operations responded by the target device, the target device is instructed to execute a second operation in the any two operations, and the execution sequence of the first operation is before the second operation, that is, according to the execution sequence of the plurality of operations to be executed, the target device is controlled to sequentially execute the plurality of operations according to the execution sequence. By adopting the technical scheme, the problems that in the related art, when a plurality of scene operations are operated in parallel, the execution of part of the scene operations depends on the scene operations, so that the scene execution time is too long and the like are solved.
In step S202, usually, the target object performs multiple operations on the target device, the server detects scene data of a scene where the target device is located, and sequences the multiple operations when it is detected that the scene data satisfies the trigger condition.
In an optional embodiment, the step S204 further includes: acquiring a first time when the target device receives indication information, wherein the indication information is used for indicating the target device to execute the first operation; and within a preset time after the first time, if the execution success result of the first operation is not received, directly indicating the target equipment to execute the second operation.
In other words, in the preset time after the first time when the target device receives the indication information, the server does not receive the successful execution result of the first operation, and the target device continues to execute the second operation without waiting for the execution result of the first operation.
It should be noted that the "first time" is a current time when the target device receives the indication information, the "preset time" is a time interval from the current time when the target device receives the indication information, and is a final time when the target device waits to receive the execution result of the first operation, and the "within the preset time after the first time" is a time period from the first time to the preset time.
For example, the execution sequence of the multiple operations to be executed is acquired as "power on and power off", the first time when the target device receives the indication information is 3:00 pm, and the preset time is 3:05 pm, and if the server does not receive the execution success result of the target device executing the "power on" operation from 3:00 pm to 3:05 pm, the target device is indicated to execute the "power off" operation. It should be noted that the above-mentioned time and operations are only values and operations randomly selected for understanding the technical solution of the embodiment of the present invention, and any possible values and operations may be used in the actual operation process.
After determining that the successful execution result of the first operation is not received, in an optional embodiment, a policy task is set for the target device, where the policy task is used to instruct issuing a first query instruction to the target device at different time points to obtain an execution result of the first operation, where the execution result includes at least one of: and the execution success result is an execution failure result.
It is to be understood that in case it is determined that a successful result of the execution of the first operation is not received, first query instructions are sent to the target device at different points in time to determine whether the first operation execution was successful.
In an optional embodiment, after the policy task is set for the target device, the first query instructions at different time points are all issued to the target device, and the query result corresponding to the first query instruction is sent to the target terminal corresponding to the target device under the condition that the target device feeds back the execution failure result of the first operation; and under the condition that a first query instruction of a target time point in the different time points is issued to the target equipment and the target equipment feeds back an execution success result of the first operation, determining that the first operation is successfully executed.
It can also be said that the first query instruction is sent to the target device at limited different time points, the query result information is sent to the target terminal under the condition of the execution failure result of the first operation of the target device, the execution success of the first operation of the target device is determined under the condition of the execution success result of the first operation of the target device, the first query instruction operation is ended after the execution success result of the first operation of the target device is obtained, and the first query instruction operation is continuously executed at the next time point until the last time point after the execution failure result of the first operation of the target device is obtained. It should be noted that the specific time points and the number of the time points may be set by an engineer, may also be set by a target object, and may also directly set a time interval, which is not limited in the embodiment of the present invention.
In an optional embodiment, after determining that the successful result of the execution of the first operation is not received, after the preset time, receiving the successful result of the execution of the first operation fed back by the target device.
It is understood that, within the preset time, the execution success result of the first operation is not received and the first query instruction is not sent, but the execution success result of the first operation of the target device is fed back after the preset time and the receiving operation is still performed.
In an optional embodiment, after the target device is controlled to sequentially execute the operations according to the execution sequence, after all the operations are successfully executed, the log data corresponding to the operations are synchronized to the log system corresponding to the target device, so that the log system feeds the log data back to the target object when receiving the second query instruction of the target object.
After the target device is controlled to execute the plurality of operations in sequence according to the execution sequence, the log data corresponding to the operation result of the target device is stored in the log system, and the target object may query the log system by sending a second query instruction.
In order to better understand the process of the operation execution method, the following describes a flow of the implementation method of the operation execution with reference to an alternative embodiment, but the flow is not limited to the technical solution of the embodiment of the present invention.
In an alternative embodiment, the architecture diagram of the intelligent scene engine system is shown in fig. 3, and is mainly divided into five parts: the IOT data access service, the data cache service, the trigger strategy service, the rule engine service and the action serial executor are bottom services of the intelligent scene engine system, the service can realize serial execution of scene actions and relevant processing of abnormal conditions, the service can be realized in a software or hardware mode, and the invention is not limited to the above.
IOT data access service: the system is responsible for docking external cloud services or internal cloud services; the service core function is to convert cloud service data into a standard attribute value of a scene engine system and route the data to the next system.
Data caching service: the service is responsible for subscribing real-time data from the data access service, caching attribute latest data, attribute data changed last time and relevant time points; and may push data change data as well as service full data.
Trigger execution policy service: the service is responsible for inquiring the last changed data after receiving the service attribute data, inquiring the configuration data of the scene, comprehensively calculating whether the data report is valid data, if the judgment result is invalid, the data report does not trigger the scene, otherwise, the data report needs to be triggered.
The rules engine service: the service is responsible for dynamically loading scenes, analyzing the scenes, calculating conditions and executing the scenes; after subscribing effective executable trigger data, the rule engine retrieves relevant scenes, loads the scenes, calculates whether the conditions are met, executes the scenes if the conditions are met, and otherwise, does not execute the scenes.
Through the system, the cloud service is registered in the intelligent scene engine system, and the attribute data is transmitted to the IOT data access service in real time through cloud docking; the latest state of the attribute, the state value changed last time and the time of the change are stored by the data caching service; then the data flows into a trigger execution policy service, and the current attribute value, the last attribute value and the scene configuration related parameters are needed for executing the policy trigger to jointly calculate whether the scene needs to be contained by the policy and is not continuously triggered; the data protected by the policy will be terminated, and the data not conforming to the policy will continue to flow to the next service; executable scenarios that do not satisfy the policy are loaded by the rules engine service and compute whether the scenarios are executable (equivalent to the trigger conditions in the above embodiments); the executed scene-related actions are loaded by the action serial executor, and finally, corresponding actions (such as pushing messages to the APP, issuing control instructions to the network device, voice broadcasting and the like) are sequentially executed according to the action sequence set by the user. The embodiment of the invention ensures the sequence of scene execution and shortens the execution time of the scene to the maximum extent.
In another alternative embodiment, fig. 4 is a flowchart of an implementation of an operation execution method according to an alternative embodiment of the present invention, as shown in fig. 4, including the following steps:
step S402: the cloud service pushes the attribute data to the IOT data access service in real time;
step S404: the IOT data access service is responsible for docking cloud services, receiving attribute data, converting the data into a standard and then sending the standard to the next service;
step S406: the data caching service caches the current latest attribute data and the data changed last time of the attribute;
step S408: the trigger policy service is responsible for comprehensively calculating whether the scene is protected by the trigger scene according to the current attribute value and the last changed value of the attribute;
step S410: if the strategy protection is not reached, the scene is not triggered this time,
step S412: if the policy protection is achieved, the scene is loaded by the rule engine to be executed;
step S414: the rules engine service queries the current latest state of the attribute set in the condition (equivalent to the scene data in the above-described embodiment) from the data caching service and calculates whether the condition reaches the trigger point (equivalent to the trigger condition in the above-described embodiment);
step S416: if the condition is satisfied, the executed actions (corresponding to the operations in the above-described embodiment) need to be sequentially loaded into a serial executor (corresponding to the target device in the above-described embodiment);
step S418: if the condition is not satisfied, the scene is not executed;
step S420: the serial executor first issues a first action (corresponding to the first operation in the above embodiment);
step S422: waiting for the device to make a callback (equivalent to the execution result of the first operation in the above embodiment), and executing the next action (equivalent to the second operation in the above embodiment) after receiving the callback;
step S424: if the first instruction callback is overtime (1 minute is overtime), the next action is continuously executed, and a timing task (which is equivalent to the first query instruction in the embodiment) is started to actively query the execution result of the previous callback overtime;
step S426: setting the execution result of the scene as the execution completion after all actions are executed, and marking the execution state;
step S428: and if the overtime action is called back at a certain time point after the scene execution fails, the execution state of the action is updated again, and the latest execution state of the scene is updated.
Through the steps, the execution sequence of the actions is ensured, and the execution duration of the scene is shortened; after the execution of the first action is overtime (1 minute), the next action is continuously executed instead of continuously waiting; after the action execution is overtime, a strategy task (three times of inquiry: every 3, 6 and 9 minutes) is started to acquire an execution state, and the action state and the scene execution state are updated after the execution state is acquired; and after the scene is finally successfully executed, the data is synchronized to a log system, so that a user can conveniently inquire an execution result.
According to another alternative embodiment of the present invention, the specific steps are as follows:
the method comprises the following steps: when the preset air temperature is higher than 41 ℃, the air conditioner is started, and the mode is a refrigeration mode (corresponding to a plurality of operations to be executed in the embodiment);
step two: the weather service can push real-time weather data to an IOT data access system;
step three: the data cache server caches the pushed data;
step four: if the current temperature is different from the last time, updating the current data and the last data, such as, for example, the current air temperature of 41 ℃ at 14 pm and the last air temperature of 40 ℃ at 13 pm;
step five: the trigger execution strategy inquires the current temperature to be 41 ℃, and inquires the last temperature value to be 40 ℃;
step six: the scene needs to be loaded to a rule engine for condition calculation;
step seven: after the conditions are met (which is equivalent to the situation that the detected scene data meets the trigger conditions in the embodiment), the serial actuator sequentially preloads the startup, the mode setting refrigeration and the like; firstly, controlling the air conditioner to execute a starting operation, and then controlling the air conditioner to execute a set refrigeration operation.
It should be noted that, each operation is successfully executed, the result information is fed back to the scene engine system. The execution mechanism of the serial executor is as follows: firstly, starting up the air conditioner; the method comprises the steps of firstly sending a starting instruction to equipment, then waiting for air conditioner response (air conditioner refrigeration cannot be continuously executed at the moment), executing refrigeration operation again after receiving the air conditioner response, and then waiting for the equipment response to finish scene execution. In special cases: and if the equipment does not respond within 1 minute after the starting instruction is issued, processing according to overtime. And then the continuation mode is set to cooling. Meanwhile, the processing result of issuing the boot instruction (for example, querying for 3 times, with an interval of 3 minutes each time) is queried in real time, and the boot execution result state is updated again after the device receives the boot response again.
The embodiment of the invention provides a scene action serial execution strategy, when scene data reaches a trigger point, a scene starts to be executed, all actions are sequenced according to a mode set by a user and then executed in sequence. The problems that when the scene action is executed under the condition that the network is unstable or the equipment has problems, the instructions cannot be executed in sequence, the scene cannot sense whether the equipment instruction control is correct after a single instruction is issued to the equipment, a retry mechanism does not exist after a certain instruction fails and the like are solved, and the scene action can be executed in sequence according to the intention of a user under various conditions; the fault tolerance is carried out on the instruction which fails to be executed or the instruction which is overtime to be executed, so that the execution mechanism of the intelligent scene is greatly improved, and the intelligent scene can be accurately executed according to the action preset by the user.
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 (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as 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, an operation executing apparatus is further provided, and the apparatus is used to implement the foregoing embodiments and preferred embodiments, and the description of the apparatus is omitted for brevity. 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. 5 is a block diagram showing the construction of an operation performing apparatus according to an embodiment of the present invention, as shown in fig. 5, the apparatus including:
an obtaining module 52, configured to obtain an execution sequence of a plurality of operations to be executed when it is detected that scene data meets a trigger condition, where the scene data is scene data of a scene where a target device is located;
a control module 54, configured to control the target device to sequentially execute the multiple operations according to the execution sequence, where for any two operations that are adjacent in sequence, after receiving an execution success result of a first operation in the any two operations that the target device responds to, the target device is instructed to execute a second operation in the any two operations, where an execution sequence of the first operation is located before the second operation.
By the device, under the condition that scene data are detected to meet triggering conditions, the execution sequence of a plurality of operations to be executed is acquired, wherein the scene data are scene data of a scene where target equipment is located; and controlling the target device to sequentially execute the plurality of operations according to the execution sequence, wherein for any two operations adjacent in sequence, after receiving a successful execution result of a first operation in the any two operations responded by the target device, the target device is instructed to execute a second operation in the any two operations, the execution sequence of the first operation is before the second operation, namely according to the execution sequence of the plurality of operations to be executed, and the target device is controlled to sequentially execute the plurality of operations according to the execution sequence. By adopting the technical scheme, the problems that in the related art, when a plurality of scene operations are operated in parallel, the execution of part of the scene operations depends on the scene operations, so that the scene execution time is too long and the like are solved.
In an exemplary embodiment, the control module is further configured to obtain a first time when the target device receives indication information, where the indication information is used to instruct the target device to perform the first operation; and within a preset time after the first time, if the execution success result of the first operation is not received, directly indicating the target equipment to execute the second operation.
In other words, in the preset time after the first time when the target device receives the indication information, the server does not receive the successful execution result of the first operation, and the target device continues to execute the second operation without waiting for the execution result of the first operation.
It should be noted that the "first time" is a current time when the target device receives the indication information, the "preset time" is a time interval from the current time when the target device receives the indication information, and is a final time when the target device waits to receive the execution result of the first operation, and the "within the preset time after the first time" is a time period from the first time to the preset time.
For example, the execution sequence of the multiple operations to be executed is acquired as "power on and power off", the first time when the target device receives the indication information is 3:00 pm, and the preset time is 3:05 pm, and if the server does not receive the execution success result of the target device executing the "power on" operation from 3:00 pm to 3:05 pm, the target device is indicated to execute the "power off" operation. It should be noted that the above-mentioned time and operations are only values and operations randomly selected for understanding the technical solution of the embodiment of the present invention, and any possible values and operations may be used in the actual operation process.
In one exemplary embodiment, the operation performing apparatus further includes: a sending module, configured to set a policy task for the target device after determining that a successful execution result of the first operation is not received, where the policy task is used to instruct that a first query instruction is issued to the target device at different time points to obtain an execution result of the first operation, where the execution result at least includes one of: and the execution success result is an execution failure result.
It is understood that, in the case that it is determined that the successful result of the execution of the first operation is not received, the sending module sends the first query instruction to the target device at different time points to determine the result of the execution of the first operation.
In an exemplary embodiment, the sending module is further configured to, after the policy task is set for the target device, send the first query instructions at different time points to the target device, and send the query result corresponding to the first query instruction to the target terminal corresponding to the target device when the target device feeds back the execution failure result of the first operation; and under the condition that a first query instruction of a target time point in the different time points is issued to the target equipment and the target equipment feeds back an execution success result of the first operation, determining that the first operation is successfully executed.
It may also be said that, a first query instruction is sent to the target device at limited different time points, the query result information is sent to the target terminal in the case of the execution failure result of the first operation of the target device, the execution success of the first operation of the target device is determined in the case of the execution success result of the first operation of the target device, and after the execution success result of the first operation of the target device is obtained, the first query instruction operation is ended.
In an exemplary embodiment, after determining that the execution success result of the first operation is not received, the execution success result of the first operation fed back by the target device is received after the preset time.
It is understood that, within the preset time, the execution success result of the first operation is not received, but the execution success result of the first operation of the target device is fed back after the preset time, and the server still performs the receiving operation.
In an exemplary embodiment, the control module is further configured to control the target device to sequentially execute the multiple operations according to the execution order, and after the multiple operations are all successfully executed, synchronize log data corresponding to the multiple operations to a log system corresponding to the target device, so that the log system feeds the log data back to the target object when receiving a second query instruction of the target object.
The log data corresponding to the operation result of the target device is stored in the log system, and the target object may query the log system by sending the second query instruction.
An embodiment of the present invention further provides a storage medium including a stored program, wherein the program executes any one of the methods described above.
Alternatively, in the present embodiment, the storage medium may be configured to store program codes for performing the following steps:
s1, acquiring an execution sequence of a plurality of operations to be executed under the condition that scene data are detected to meet a trigger condition, wherein the scene data are scene data of a scene where target equipment is located;
and S2, controlling the target device to sequentially execute the operations according to the execution sequence, where for any two operations that are adjacent in sequence, after receiving a successful execution result of a first operation in the any two operations that the target device responds to, the target device is instructed to execute a second operation in the any two operations, and the execution sequence of the first operation is before the second operation.
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, acquiring an execution sequence of a plurality of operations to be executed under the condition that scene data are detected to meet a trigger condition, wherein the scene data are scene data of a scene where target equipment is located;
and S2, controlling the target device to sequentially execute the operations according to the execution sequence, where for any two operations that are adjacent in sequence, after receiving a successful execution result of a first operation in the any two operations that the target device responds to, the target device is instructed to execute a second operation in the any two operations, and the execution sequence of the first operation is before the second operation.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing program codes, 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.
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. An operation execution method, comprising:
under the condition that scene data meeting a trigger condition is detected, acquiring an execution sequence of a plurality of operations to be executed, wherein the scene data is scene data of a scene where target equipment is located;
and controlling the target device to sequentially execute the plurality of operations according to the execution sequence, wherein for any two operations adjacent in sequence, after receiving a successful execution result of a first operation in the any two operations responded by the target device, the target device is instructed to execute a second operation in the any two operations, and the execution sequence of the first operation is before the second operation.
2. The method of claim 1, wherein controlling the target device to perform the plurality of operations in sequence in the execution order comprises:
acquiring a first time when the target device receives indication information, wherein the indication information is used for indicating the target device to execute the first operation;
and within a preset time after the first time, if the execution success result of the first operation is not received, directly indicating the target equipment to execute the second operation.
3. The method of claim 2, wherein after determining that a successful result of the execution of the first operation has not been received, the method further comprises:
setting a policy task for the target device, where the policy task is used to instruct issuing a first query instruction to the target device at different time points to obtain an execution result of the first operation, where the execution result at least includes one of: and the execution success result is an execution failure result.
4. The method of claim 3, wherein after setting a policy task for the target device, the method further comprises:
sending the first query instructions at different time points to the target equipment, and sending the query result corresponding to the first query instruction to the target terminal corresponding to the target equipment under the condition that the target equipment feeds back the execution failure result of the first operation;
and under the condition that a first query instruction of a target time point in the different time points is issued to the target equipment and the target equipment feeds back an execution success result of the first operation, determining that the first operation is successfully executed.
5. The method of claim 2, wherein after determining that a successful result of the execution of the first operation has not been received, the method further comprises:
and after the preset time, receiving the execution success result of the first operation fed back by the target equipment.
6. The method according to any one of claims 1 to 5, wherein after controlling the target device to sequentially perform the plurality of operations in the execution order, the method further comprises:
after the operations are successfully executed, synchronizing the log data corresponding to the operations to a log system corresponding to the target device, so that the log system feeds the log data back to the target object under the condition that the log system receives a second query instruction of the target object.
7. An operation execution apparatus, comprising:
the device comprises an acquisition module, a processing module and a control module, wherein the acquisition module is used for acquiring the execution sequence of a plurality of operations to be executed under the condition that scene data is detected to meet a trigger condition, and the scene data is the scene data of a scene where target equipment is located;
and the control module is configured to control the target device to sequentially execute the multiple operations according to the execution sequence, where for any two operations that are adjacent in sequence, after receiving an execution success result of a first operation in the any two operations responded by the target device, the target device is instructed to execute a second operation in the any two operations, and the execution sequence of the first operation is before the second operation.
8. The apparatus of claim 7, wherein the control module is further configured to obtain a first time when the target device receives indication information, where the indication information is used to instruct the target device to perform the first operation; and within a preset time after the first time, if the execution success result of the first operation is not received, directly indicating the target equipment to execute the second operation.
9. A computer-readable storage medium, comprising a stored program, wherein the program is operable to perform the method of any one of claims 1 to 6.
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 of any of claims 1 to 6 by means of the computer program.
CN202011057037.XA 2020-09-29 2020-09-29 Operation execution method and device, storage medium and electronic device Pending CN112130980A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011057037.XA CN112130980A (en) 2020-09-29 2020-09-29 Operation execution method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011057037.XA CN112130980A (en) 2020-09-29 2020-09-29 Operation execution method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN112130980A true CN112130980A (en) 2020-12-25

Family

ID=73843253

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011057037.XA Pending CN112130980A (en) 2020-09-29 2020-09-29 Operation execution method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN112130980A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114785838A (en) * 2022-03-30 2022-07-22 青岛海尔科技有限公司 Device control method and device, storage medium, and electronic apparatus
CN115268283A (en) * 2022-06-29 2022-11-01 青岛海尔科技有限公司 Edge scene execution method and device, storage medium and electronic device
CN115378929A (en) * 2022-10-26 2022-11-22 杭州华橙软件技术有限公司 Method, system, device and storage medium for solving multi-scheme execution conflict

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101348065A (en) * 2007-07-20 2009-01-21 株式会社电装 Automotive air conditioner and method for controlling automotive air conditioner
WO2010093451A1 (en) * 2009-02-11 2010-08-19 Certusview Technologies, Llc Marking apparatus having enhanced features for underground facility marking operations, and associated methods and systems
CN102279794A (en) * 2011-08-12 2011-12-14 华南理工大学 System and method for dynamically testing radio frequency identification (RFID) component
CN103942020A (en) * 2014-03-10 2014-07-23 北京君正集成电路股份有限公司 Information display method and device under dormant state of system
CN104991583A (en) * 2015-06-30 2015-10-21 许继电气股份有限公司 Prefabricated cabin temperature control method, prefabricated cabin temperature control system and prefabricated cabin
CN106054657A (en) * 2016-08-09 2016-10-26 歌尔股份有限公司 Intelligent household control method, intelligent household control server and system
CN109561414A (en) * 2018-12-21 2019-04-02 歌尔科技有限公司 A kind of method, apparatus and wireless headset of wireless headset pairing
CN109711723A (en) * 2018-12-26 2019-05-03 广东嘉腾机器人自动化有限公司 A kind of AGV method for allocating tasks, storage device and scheduling system
CN111143061A (en) * 2019-12-18 2020-05-12 海尔优家智能科技(北京)有限公司 Multi-device linkage control method and device and storage medium
CN111352350A (en) * 2020-03-16 2020-06-30 青岛海信智慧家居***股份有限公司 Method and device for determining execution of smart home scene
CN111427316A (en) * 2020-03-19 2020-07-17 海尔优家智能科技(北京)有限公司 Scene triggering method and device, storage medium and electronic device

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101348065A (en) * 2007-07-20 2009-01-21 株式会社电装 Automotive air conditioner and method for controlling automotive air conditioner
WO2010093451A1 (en) * 2009-02-11 2010-08-19 Certusview Technologies, Llc Marking apparatus having enhanced features for underground facility marking operations, and associated methods and systems
CN102279794A (en) * 2011-08-12 2011-12-14 华南理工大学 System and method for dynamically testing radio frequency identification (RFID) component
CN103942020A (en) * 2014-03-10 2014-07-23 北京君正集成电路股份有限公司 Information display method and device under dormant state of system
CN104991583A (en) * 2015-06-30 2015-10-21 许继电气股份有限公司 Prefabricated cabin temperature control method, prefabricated cabin temperature control system and prefabricated cabin
CN106054657A (en) * 2016-08-09 2016-10-26 歌尔股份有限公司 Intelligent household control method, intelligent household control server and system
CN109561414A (en) * 2018-12-21 2019-04-02 歌尔科技有限公司 A kind of method, apparatus and wireless headset of wireless headset pairing
CN109711723A (en) * 2018-12-26 2019-05-03 广东嘉腾机器人自动化有限公司 A kind of AGV method for allocating tasks, storage device and scheduling system
CN111143061A (en) * 2019-12-18 2020-05-12 海尔优家智能科技(北京)有限公司 Multi-device linkage control method and device and storage medium
CN111352350A (en) * 2020-03-16 2020-06-30 青岛海信智慧家居***股份有限公司 Method and device for determining execution of smart home scene
CN111427316A (en) * 2020-03-19 2020-07-17 海尔优家智能科技(北京)有限公司 Scene triggering method and device, storage medium and electronic device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
明光照;李鸥;张延军;: "基于无线传感器网络的智能家居***设计", 《通信技术》, vol. 42, no. 02, 10 February 2009 (2009-02-10), pages 233 - 234 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114785838A (en) * 2022-03-30 2022-07-22 青岛海尔科技有限公司 Device control method and device, storage medium, and electronic apparatus
CN114785838B (en) * 2022-03-30 2024-01-26 青岛海尔科技有限公司 Control method and device of equipment, storage medium and electronic device
CN115268283A (en) * 2022-06-29 2022-11-01 青岛海尔科技有限公司 Edge scene execution method and device, storage medium and electronic device
CN115378929A (en) * 2022-10-26 2022-11-22 杭州华橙软件技术有限公司 Method, system, device and storage medium for solving multi-scheme execution conflict

Similar Documents

Publication Publication Date Title
CN112130980A (en) Operation execution method and device, storage medium and electronic device
CN111143061B (en) Multi-device linkage control method, device and storage medium
CN111865736B (en) Equipment control method and device
CN109240724A (en) A kind of cascade device upgrade method and equipment
CN113422814A (en) Method and system for sending device control command, storage medium and electronic device
CN112417255B (en) Online state receiving method and device, storage medium and electronic device
CN112165413B (en) Equipment state reporting method and device and electronic device
CN112148504A (en) Target message processing method and device, storage medium and electronic device
CN112566078A (en) Device connection method and apparatus, storage medium, and electronic apparatus
CN112764803A (en) Version upgrading method and device, storage medium and electronic device
CN112671572B (en) Method and device for intelligent equipment network distribution, storage medium and electronic device
CN111836339B (en) Network equipment
CN113282587A (en) State data transmission method and device, storage medium and electronic device
CN109471651A (en) A kind of firmware upgrade method, gateway and firmware upgrade system
CN114257509A (en) Module upgrading method and device, storage medium and electronic device
CN108964989B (en) Method and device for connecting with service platform and computer readable storage medium
CN111385110B (en) Network management method and device
CN114286431A (en) Method and device for starting low power consumption mode, storage medium and electronic device
CN113934524A (en) Asynchronous processing method and device of task, storage medium and electronic device
EP3547615B1 (en) Software-updating method for a wireless communication network
CN111427316A (en) Scene triggering method and device, storage medium and electronic device
CN111831380A (en) Task execution method and device, storage medium and electronic device
JP2010246015A (en) Mobile communication system and mobile communication method
CN116225855B (en) Log generation method, electronic equipment and storage medium
CN114785838B (en) Control method and device of equipment, 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