CN112286167A - Internet of things scene conflict detection method and device, storage medium and electronic equipment - Google Patents

Internet of things scene conflict detection method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN112286167A
CN112286167A CN202011105877.9A CN202011105877A CN112286167A CN 112286167 A CN112286167 A CN 112286167A CN 202011105877 A CN202011105877 A CN 202011105877A CN 112286167 A CN112286167 A CN 112286167A
Authority
CN
China
Prior art keywords
scene
event
execution
instance
events
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011105877.9A
Other languages
Chinese (zh)
Other versions
CN112286167B (en
Inventor
张诗彦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Technology Co Ltd
Original Assignee
Qingdao Haier Technology 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 filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202011105877.9A priority Critical patent/CN112286167B/en
Publication of CN112286167A publication Critical patent/CN112286167A/en
Application granted granted Critical
Publication of CN112286167B publication Critical patent/CN112286167B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B23/00Testing or monitoring of control systems or parts thereof
    • G05B23/02Electric testing or monitoring
    • G05B23/0205Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
    • G05B23/0218Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterised by the fault detection method dealing with either existing or incipient faults
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16YINFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
    • G16Y10/00Economic sectors
    • G16Y10/80Homes; Buildings
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16YINFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
    • G16Y40/00IoT characterised by the purpose of the information processing
    • G16Y40/10Detection; Monitoring
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16YINFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
    • G16Y40/00IoT characterised by the purpose of the information processing
    • G16Y40/30Control

Abstract

The invention discloses a scene conflict detection method and device of the Internet of things, a storage medium and electronic equipment. Wherein, the method comprises the following steps: receiving a scene example monitored by event monitoring equipment; generating a scene identification code corresponding to a scene instance; acquiring a plurality of sequentially executed scene events contained in one execution cycle of a scene instance based on a scene identification code, and acquiring trigger attributes of the internet of things equipment associated with the scene events; in the case that the current scene event in the plurality of scene events has been executed and ended, but the plurality of scene events of the scene instance have not been executed and ended, an execution request for requesting execution of any scene event before the current scene event is detected, and then a scene loopback conflict is prompted to occur. The invention solves the technical problem that in the scene of the Internet of things, the infinite loop execution of the events in the scene cannot be found in the related technology.

Description

Internet of things scene conflict detection method and device, storage medium and electronic equipment
Technical Field
The invention relates to the technical field of communication, in particular to a method and a device for detecting scene conflicts of the Internet of things, a storage medium and electronic equipment.
Background
With the vigorous development of the internet of things, more and more intelligent household appliances and household equipment enter thousands of households, unprecedented intelligent life experience is brought to a user, the household appliances are not machines for cold ice, but can actively understand the needs and preferences of the user, an intelligent agent automatically provides services for the user, and as long as the user provides the desired experience effect, specific equipment control commands do not need to be issued, only the 'scene' of a predefined logic rule needs to be started, and all household appliances in the intelligent home network can cooperate to complete the effect expected by the user.
However, the intelligent scene effect in the scene of the internet of things needs to be translated into a logic language which can be understood by a machine, that is, the existing equipment is coordinated according to the intention of scene description, and the target effect of the scene is achieved through a certain control logic, and if the control logic appears, the problem of 'infinite loop', namely loop problem, which is often encountered in software development, and the problem of infinite loop execution of events in the scene can also be encountered in the scene execution of the scene of the internet of things. In the related art, in the scene of the internet of things, the technical problem of infinite loop execution of events in the scene cannot be found, so that the user experience degree is influenced.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a method and a device for detecting scene conflict of the Internet of things, a storage medium and electronic equipment, and aims to at least solve the technical problem that in the related technology, in the scene of the Internet of things, an event in the scene cannot be found and executed in an infinite loop mode.
According to an aspect of an embodiment of the present invention, there is provided an internet of things scene conflict detection method, including: receiving a scene example monitored by event monitoring equipment; generating a scene identification code corresponding to the scene instance; acquiring a plurality of sequentially executed scene events contained in one execution cycle of the scene instance based on the scene identification code, and acquiring trigger attributes of the internet of things devices associated with the scene events; when the current scene event in the plurality of scene events is executed and ended but all the scene events of the scene instances are not executed and ended, an execution request for requesting execution of any scene event before the current scene event is detected, and then a scene loopback conflict is prompted to occur.
According to another aspect of the embodiments of the present invention, there is also provided an internet of things scene conflict detection apparatus, including: the first receiving unit is used for receiving the scene instances monitored by the event monitoring equipment; the first generating unit is used for generating a scene identification code corresponding to the scene instance; a first obtaining unit, configured to obtain, based on the scene identification code, a plurality of sequentially executed scene events included in one execution cycle of the scene instance, and obtain a trigger attribute of an internet of things device associated with each of the plurality of scene events; a first prompting unit, configured to detect an execution request for requesting execution of any scene event before a current scene event when execution of a current scene event among the plurality of scene events has ended but all of the plurality of scene events of the scene instance have not ended, and prompt occurrence of a scene loopback collision.
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, where the computer program is configured to execute the method for detecting scene conflicts in the internet of things when running.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including a memory and a processor, where the memory stores a computer program, and the processor is configured to execute the method for detecting a scene conflict in an internet of things through the computer program.
In the embodiment of the invention, the scene instance monitored by the event receiving monitoring equipment is adopted; generating a scene identification code corresponding to a scene instance; acquiring a plurality of sequentially executed scene events contained in one execution cycle of a scene instance based on a scene identification code, and acquiring trigger attributes of the internet of things equipment associated with the scene events; in the case that the current scene event in the plurality of scene events has been executed and ended, but the plurality of scene events of the scene instance have not been completely executed and ended, an execution request for requesting execution of any scene event before the current scene event is detected, and then a method of a scene loopback conflict is prompted. The method and the device have the advantages that under the condition that the execution of the current scene event in the scene events is judged to be finished, but the execution of all the scene events of the scene instances is not finished, when the execution request for requesting to execute any scene event before the current scene event is detected, the scene loopback conflict is determined to occur, the purpose of finding the scene conflict occurring in the scene of the internet of things in the execution process is achieved, the problem of infinite loop execution of the event in the scene is found, the technical effect of improving the user experience is achieved, and the technical problem that the infinite loop execution problem of the event in the scene cannot be found in the scene of the internet of things in the related technology is 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 schematic diagram of an application environment of an alternative internet of things scene conflict detection method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a flow of an alternative method for detecting a scene conflict in the internet of things according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a flow of another alternative internet of things scene conflict detection method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an alternative internet of things scene conflict detection apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an alternative electronic device 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.
According to an aspect of the embodiments of the present invention, an internet of things scene conflict detection method is provided, and optionally, as an optional implementation manner, the internet of things scene conflict detection method may be applied to, but is not limited to, an environment as shown in fig. 1.
In fig. 1, the electronic terminal 104 is responsible for human-computer interaction with the user 102, and the electronic terminal 104 includes a memory 106, a processor 108 and a display 110; electronic terminal 104 may interact with backend server 114 via network 112. Server 114 includes database 116 and processing engine 118; the first terminal device 120 and the second terminal device 122 interact with the electronic terminal 104 through the network 112, and both the first terminal device 120 and the second terminal device 122 are communication terminal devices with wireless communication modules. The electronic terminal 104 acquires attribute information corresponding to each of the first terminal device 120 and the second terminal device 122. According to the attribute information of the user 102 and the attribute information corresponding to the first terminal device 120 and the second terminal device 122, receiving a scene instance monitored by an event monitoring device, generating a scene identification code corresponding to the scene instance, acquiring a plurality of sequentially executed scene events contained in one execution cycle of the scene instance based on the scene identification code, and acquiring a trigger attribute of an internet of things device (such as the first terminal device 120 and the second terminal device 122) associated with each of the plurality of scene events, detecting an execution request for requesting execution of any scene event before the current scene event in the plurality of scene events when the execution of the current scene event is finished but the execution of all the plurality of scene events of the scene instance is not finished, and then presenting a scene loop conflict on the electronic terminal 104.
Optionally, in this embodiment, the electronic terminal 104 may be a terminal device configured with a target server, and the electronic terminal 104, the first terminal device 120, and the second terminal device 122 may include, but are not limited to, at least one of the following: mobile phones (such as Android phones, iOS phones, etc.), notebook computers, tablet computers, palm computers, MID (Mobile Internet Devices), PAD, desktop computers, smart televisions, etc. The first terminal device 120 and the second terminal device 122 may further include, but are not limited to, smart home devices, such as a smart air conditioner, a smart kitchen ware, a smart switch, a smart pendant, or the like. The target client may be a video client, an instant messaging client, a browser client, an educational client, etc. The target server can be a video server, an instant messaging server, a browser server, an education server, and the like. Such networks may include, but are not limited to: a wired network, a wireless network, wherein the wired network comprises: a local area network, a metropolitan area network, and a wide area network, the wireless network comprising: bluetooth, WIFI, and other networks that enable wireless communication. The server may be a single server, a server cluster composed of a plurality of servers, or a cloud server. The above is merely an example, and this is not limited in this embodiment.
Optionally, as an optional implementation manner, as shown in fig. 2, the method for detecting a scene conflict of an internet of things includes:
s202, receiving a scene instance monitored by event monitoring equipment;
s204, generating a scene identification code corresponding to the scene instance;
s206, acquiring a plurality of sequentially executed scene events contained in one execution cycle of a scene instance based on the scene identification code, and acquiring trigger attributes of the Internet of things equipment associated with the scene events;
and S208, when the current scene event in the plurality of scene events is executed and ended but the plurality of scene events of the scene instance are not executed and ended, an execution request for requesting to execute any scene event before the current scene event is detected, and a scene loopback conflict is prompted to occur.
In step S202, during actual application, a scene instance monitored by the event monitoring device is received. Here, the event monitoring device may be a gateway or a combination of the gateway and various sensors, for example, monitoring the closing operation of the smart window shades in the room through the gateway, and the light intensity value of the room when the smart window shades are closed; when the gateway is provided with the light sensor, the gateway can judge the current light intensity value. The scene instance is a user-defined intelligent scene. For example, the user is set to automatically turn on the smart ceiling lights in the living room when the room light intensity value is less than 20 lux. Or when the temperature of the room is more than 26 ℃, the intelligent air conditioner is automatically turned on to refrigerate.
In step S204, in practical application, the scene identification code may be a unique identification code generated by the event monitoring device for the user-programmed scene instance, for example, when the room light intensity value set by the family member a is less than 20 lux, the intelligent ceiling lamp in the living room is automatically turned on. The unique identification code generated by the event listening device for the scenario instance may be a 001. The scene example set by the family member B is that when the temperature of the room is greater than 26 ℃, the intelligent air conditioner is automatically turned on to perform cooling, and the unique identification code generated by the event monitoring device to the scene example may be B002.
In step S206, during actual application, a plurality of sequentially executed scene events included in one execution cycle of a scene instance are obtained based on the scene identification code, and a trigger attribute of the internet of things device associated with each of the plurality of scene events is obtained, for example, the scene instance set by the family member a is: the scene event A1 is characterized in that whether the light intensity value of a room is smaller than 20 lux or not is judged firstly, if yes, the scene event A2 is switched to, when the light intensity value is smaller than 20 lux, an intelligent ceiling lamp of a living room is automatically opened, then the scene event A3 is switched to, a curtain in the room is closed, then the scene event A4 is switched to, and the light intensity value of the room after the curtain is closed is judged; finally, turning to the scene event a5, when the light intensity value of the current room is judged to be less than 60 lux, the execution of the scene event of the scene instance is ended. Therefore, the execution sequence of the scene events in the scene instance set by the family member A is A1-A1-A3-A4-A5. The triggering attribute of the internet of things device is an environmental parameter capable of triggering the internet of things device to execute state change, for example, the triggering attribute of the intelligent pendant lamp can be used for setting that the room light is automatically turned on after being less than 20 lux and is automatically turned off after being more than 60 lux; the triggering attribute of the curtain can be that the curtain is closed after the intelligent ceiling lamp is opened, and the curtain is opened after the intelligent ceiling lamp is closed.
In step S208, in an actual application, when the current scene event of the scene events has been executed and ended, but the scene events of the scene instances have not been completely executed and ended, for example, in the above scene instance, when the setting scene instance set by the family member a ends execution of the scene event a4, and when the execution result generated after the execution of the scene event a4 ends before the transition to the scene event a5 is that the light of the room is less than 20 lux, the trigger attribute of the smart pendant is triggered, so the transition to continue execution of the scene event a 2. When the scene event A2 in the current scene instance is determined to be triggered to execute again, the user is prompted that a scene loopback conflict occurs.
According to the embodiment of the invention, under the condition that the execution of the current scene event in the scene events is judged to be finished, but the execution of all the scene events of the scene examples is not finished, when the execution request for requesting to execute any scene event before the current scene event is detected, the scene loop conflict is determined to occur, and the purpose of finding the scene conflict occurring in the scene of the internet of things in the execution process is achieved, so that the problem of infinite loop execution of the event in the scene is found, the technical effect of improving the user experience is achieved, and the technical problem that the technical problem of infinite loop execution of the event in the scene cannot be found in the scene of the internet of things in the related technology is solved.
In an embodiment, step S208 includes, after the execution of the current scenario event in the multiple scenario events is finished, but when the execution of all the multiple scenario events of the scenario instance is not finished, determining that the execution result of the current scenario event is within the trigger attribute range of the internet of things device associated with the first scenario event, where the first scenario event is any scenario event before the current scenario event. For example, the scene example set by the family member a includes 5 scene events, such as a1-a 5. If any of the 5 scene events triggers the execution of any event before the event after the execution of any scene event ends, for example, the trigger attribute of the scene event a2 in which the light intensity value 19 lux of the current room falls is less than 20 lux.
In an embodiment, step S202 further includes acquiring different nestable scene instances sent by the event monitoring device; wherein different nestable scene instances have different scene identification codes; merging a plurality of nestable scene instances which reach a merging condition into a first serial execution scene instance; and replacing the scene identification codes of a plurality of nestable scene instances with the same scene identification code. For example, the scene identification code of the scene instance set by the family member a is a001, and the scene identification code of the scene instance set by the family member B is B002; in the scene example with the scene identification code of a001, the scene event a1 determines whether the room light intensity value is less than 20 lux, then switches to the scene event a2, closes the curtain in the room, then switches to the scene event A3, and determines the room light intensity value after closing the curtain; finally, turning to the scene event a4, when the light intensity value of the current room is judged to be less than 60 lux, the execution of the scene event of the scene instance is ended. In the scene example with the scene identification code of B002, the scene event B1 judges whether the intelligent ceiling lamp in the living room is opened, if so, the intelligent ceiling lamp is switched to the scene event B2, and the curtain in the room is closed; therefore, the scene instance with the scene identification code of B002 set by the family member B can be merged into the scene instance with the scene identification code of A001 set by the family member A to be merged into a new serially executed scene instance; the new serially executed scene instance is then replaced with the same scene identification code. For example, in the case of a scene with a scene identification code of C001, the sequence of execution of the scene events is a1-a2-B1-B2-A3-a 4.
In one embodiment, merging a plurality of nestable scenario instances that meet a merge condition into a first serially executing scenario instance comprises: determining an execution result of a scene event contained in a first nestable scene instance in a plurality of nestable scene instances, and determining that the first nestable scene instance and the second nestable scene instance reach a merging condition within a trigger attribute range of the Internet of things equipment associated with a second nestable scene event; determining the execution sequence of the scene events contained in the first nestable scene instance and the second nestable scene instance; the first and second nestable scene instances are merged into a first serial execution scene instance based on an execution order. For example, in the two scene instances with the scene identification code a001 and the scene identification code B002, the scene event a2 in the scene instance with the scene identification code a001 triggers the scene event B1 in the scene instance with the scene identification code B002, and then the scene event B3 continues to be executed after the execution of the scene event B2 is finished, which can be understood that the two scene instances with the scene identification codes a001 and B002 reach the merging condition.
In one embodiment, for a plurality of nestable scenario instances that meet a merge condition, merging into a first serially executing scenario instance comprises: combining a plurality of sequentially executed nestable scene instances which are called by iteration for a plurality of times into a second serial execution scene instance through a recursive algorithm; the second serial execution scenario instance is merged into the first serial execution scenario instance. For example, if a situation of cyclically executing a part of scene events occurs logically in the scene instance after the two scene instances with the scene identifier a001 and the scene identifier B002 are merged, for example, in the event execution process of a1-a2-B1-B2-A3-a4, a situation of cyclically executing events of a2-B2 occurs, a recursive algorithm may be used to derive a new scene event C2 from the cyclic events, and then C2 is merged into the scene instance, so that the scene event execution sequence in the scene instance may be a1-C2-A3-a 4.
In an embodiment, after step S208, the method further includes: and prompting to change the trigger attribute of the Internet of things equipment associated with each scene event based on the scene loopback conflict. For example, if a scene loopback collision event occurs in a scene instance set by the family member a for opening a ceiling in a living room, the family member a can receive a trigger attribute for changing the opening or closing of a ceiling lamp in the living room by setting a light intensity value under the current scene instance.
According to the embodiment of the invention, under the condition that the execution of the current scene event in the scene events is judged to be finished, but the execution of all the scene events of the scene instances is not finished, when the execution request for requesting to execute any scene event before the current scene event is detected, the scene loopback conflict is determined to occur, and the purpose of finding the scene conflict occurring in the scene of the internet of things in the execution process is achieved, so that the problem of infinite loop execution of the event in the scene is found, the technical effect of improving the user experience is achieved, and the technical problem that the technical problem of infinite loop execution of the event in the scene cannot be found in the scene of the internet of things in the related technology is solved.
Based on the above embodiments, in an application embodiment, as shown in fig. 3, first, step S301 is executed: the event monitoring equipment generates a scene event and then sends the event to the scene overall planning execution equipment; the flow proceeds to step S302: the scenario orchestration execution device determines that a start event of a scenario instance is started, and then proceeds to step S303: generating a unique code of the scene instance execution cycle, and proceeding to step S304: judging whether the current scene instance is a single scene, if so, entering step S305: after all event correlation attributes of the scene instance are searched, the process proceeds to step S307: returning an associated attribute list of the event; then, the process proceeds to step S314: and establishing a list of the events which have occurred in the current execution period, and adding the attribute state associated with the scene by each piece of event information. If it is determined in step S304 that the current scene instance is not a single scene, the flow proceeds to step S306: finding other nested scenes in the current scene, and then proceeding to step S308: merging and nesting a plurality of nestable scenes to obtain a new scene instance, and then entering step S309: searching all time-related attributes of the scene instance, softening and entering step S310: returning the combined scene instance, event and associated attribute list of event, and then proceeding to step S311: replacing the scene instances after combination; then, the process proceeds to step S312: update scene instance event, then proceed to step S313: the event listening device updates the event. Then step S314 is collectively included: the scene overall planning execution equipment establishes a list of the time of occurrence of the execution period, and each piece of event information is added with the attribute state managed by the scene; then, the process proceeds to S315: after the scene overall planning execution device traverses the management attribute state of the query device side, the method proceeds to step S316: the intelligent device end returns the attribute state to the scene overall planning execution device; then, the process proceeds to step S317: the scenario orchestration execution device caches the start event and the attribute state in the event list, and proceeds to step S318: the scene overall planning execution device starts execution control, names the scene execution cycle code, and then executes step S319: changing the attribute of the intelligent equipment; then, step S320 is performed: the intelligent device sends the attribute change to the event monitoring device, carries the scene execution cycle code, and then proceeds to step S321: the event monitoring equipment logically judges whether other scene events are triggered to be executed or not, and then distributes the events to the scene overall planning execution equipment with execution period codes; then, the process proceeds to step S322: the scene overall planning execution device determines that the event is an effective event in a certain scene execution cycle, and if the event is an effective event, the process proceeds to step S323: the scene orchestration execution device queries the associated attribute state of the current scene instance, and then proceeds to step S324: the intelligent equipment returns the attribute state of the equipment to the scene overall planning execution equipment; then, the process proceeds to step S325: when the scenario orchestration execution device determines that the event list has the same event and the attribute status is the same, the process proceeds to step S326: judging whether a scene loop occurs; if the same event does not occur in the event list and the attribute status is the same, step S327 is entered: the scenario orchestration execution device buffers the scenario event and the attribute status into the event list of the current long-term execution cycle, and then performs step S328: executing event-triggered control, and then going to step S319 with the scene execution period encoding: the device attributes of the intelligent device end change.
According to the embodiment of the invention, under the condition that the execution of the current scene event in the scene events is judged to be finished, but the execution of all the scene events of the scene examples is not finished, when the execution request for requesting to execute any scene event before the current scene event is detected, the scene loop conflict is determined to occur, and the purpose of finding the scene conflict occurring in the scene of the Internet of things in the execution process is achieved, so that the problem of infinite loop execution of the event in the scene is found, the technical effect of improving the user experience is achieved, and the technical problem that the infinite loop execution problem of the event in the scene cannot be found in the scene of the Internet of things in the related technology is solved.
According to another aspect of the embodiment of the invention, an internet of things scene conflict detection device for implementing the internet of things scene conflict detection method is also provided. As shown in fig. 4, the apparatus includes:
a first receiving unit 402, configured to receive a scene instance monitored by an event monitoring device;
a first generating unit 404, configured to generate a scene identification code corresponding to a scene instance;
a first obtaining unit 406, configured to obtain, based on the scene identification code, a plurality of sequentially executed scene events included in one execution cycle of the scene instance, and obtain a trigger attribute of the internet of things device associated with each of the plurality of scene events;
a first prompting unit 408, configured to, in a case that a current scene event of the multiple scene events has been executed and ended, but all of the multiple scene events of the scene instance have not been executed and ended, detect an execution request for requesting execution of any scene event before the current scene event, and prompt occurrence of a scene loopback conflict.
In one embodiment, the first prompting unit 408 includes: the first determining unit is configured to determine that an execution result of a current scene event is within a trigger attribute range of the internet of things device associated with the first scene event when execution of the current scene event in the multiple scene events is finished but all the multiple scene events of the scene instance are not finished, where the first scene event is any scene event before the current scene event.
In an embodiment, the internet of things scene conflict detection apparatus further includes:
the second acquisition device is used for acquiring different nestable scene instances sent by the event monitoring equipment; wherein different nestable scene instances have different scene identification codes;
the first merging unit is used for merging a plurality of nestable scene instances which reach merging conditions into a first serial execution scene instance;
the first replacing unit is used for replacing the scene identification codes of the plurality of nestable scene instances with the same scene identification code.
In an embodiment, the first merging unit is specifically configured to determine, in the multiple nestable scene instances, an execution result of a scene event included in the first nestable scene instance, and determine that the first nestable scene instance and the second nestable scene instance reach a merging condition within a trigger attribute range of the internet of things device associated with the second nestable scene event; determining the execution sequence of the scene events contained in the first nestable scene instance and the second nestable scene instance; the first and second nestable scene instances are merged into a first serial execution scene instance based on an execution order.
In an embodiment, the first merging unit is further specifically configured to merge, through a recursive algorithm, a plurality of sequentially executed nestable scene instances that are called by multiple iterations into a second serially executed scene instance; the second serial execution scenario instance is merged into the first serial execution scenario instance.
In an embodiment, the internet of things scene conflict detection apparatus further includes:
and the second prompting unit is used for prompting to change the trigger attribute of the Internet of things equipment associated with each scene event based on the scene loopback conflict.
According to the embodiment of the invention, under the condition that the execution of the current scene event in the scene events is judged to be finished, but the execution of all the scene events of the scene examples is not finished, when the execution request for requesting to execute any scene event before the current scene event is detected, the scene loop conflict is determined to occur, and the purpose of finding the scene conflict occurring in the scene of the Internet of things in the execution process is achieved, so that the problem of infinite loop execution of the event in the scene is found, the technical effect of improving the user experience is achieved, and the technical problem that the infinite loop execution problem of the event in the scene cannot be found in the scene of the Internet of things in the related technology is solved.
For other examples of this embodiment, reference may be made to the above embodiments, which are not described herein again.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device for implementing the method for detecting scene conflicts in the internet of things, as shown in fig. 5, the electronic device includes a memory 502 and a processor 504, the memory 502 stores a computer program therein, and the processor 504 is configured to execute the steps in any one of the method embodiments through the computer program.
Optionally, in this embodiment, the electronic device may be located in at least one network device of a plurality of network devices of a computer network.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, receiving the scene instance monitored by the event monitoring equipment;
s2, generating a scene identification code corresponding to the scene instance;
s3, acquiring a plurality of sequentially executed scene events contained in one execution cycle of a scene instance based on the scene identification code, and acquiring trigger attributes of Internet of things equipment associated with the scene events;
s4, when the current scene event of the plurality of scene events has been executed and ended, but all of the plurality of scene events of the scene instance have not been executed and ended, an execution request for requesting execution of any scene event before the current scene event is detected, and a scene loopback collision is prompted to occur.
Alternatively, it can be understood by those skilled in the art that the structure shown in fig. 5 is only an illustration, and the electronic device may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palmtop computer, and a Mobile Internet Device (MID), a PAD, and the like. Fig. 5 is a diagram illustrating a structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, etc.) than shown in FIG. 5, or have a different configuration than shown in FIG. 5.
The memory 502 may be used to store software programs and modules, such as program instructions/modules corresponding to the method and apparatus for detecting scene conflicts of the internet of things in the embodiment of the present invention, and the processor 504 executes various functional applications and data processing by running the software programs and modules stored in the memory 502, that is, implements the method for detecting scene conflicts of the internet of things. The memory 502 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 502 may further include memory located remotely from the processor 504, which may be connected to the 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 memory 502 may be, but is not limited to, specifically configured to store information such as attributes of an internet of things device. As an example, as shown in fig. 5, the memory 502 may include, but is not limited to, the first receiving unit 402, the first generating unit 404, the first obtaining unit 406, and the first prompting unit 408 of the internet of things scene collision detection apparatus. In addition, the device may further include, but is not limited to, other module units in the internet of things scene conflict detection apparatus, which is not described in this example again.
Optionally, the transmission device 506 is used for receiving or sending data via a network. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 506 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices to communicate with the internet or a local area Network. In one example, the transmission device 506 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In addition, the electronic device further includes: a display 508, configured to display scene conflict prompt information in the internet of things scene conflict detection apparatus; and a connection bus 510 for connecting the respective module parts in the above-described electronic apparatus.
In other embodiments, the electronic device or the server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting a plurality of nodes through a network communication. Nodes can form a Peer-To-Peer (P2P, Peer To Peer) network, and any type of computing device, such as a server, a terminal, and other electronic devices, can become a node in the blockchain system by joining the Peer-To-Peer network.
According to a further aspect of an embodiment 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 arranged to perform the steps in any of the above-mentioned method embodiments when executed.
Alternatively, in the present embodiment, the above-mentioned computer-readable storage medium may be configured to store a computer program for executing the steps of:
s1, receiving the scene instance monitored by the event monitoring equipment;
s2, generating a scene identification code corresponding to the scene instance;
s3, acquiring a plurality of sequentially executed scene events contained in one execution cycle of a scene instance based on the scene identification code, and acquiring trigger attributes of Internet of things equipment associated with the scene events;
s4, when the current scene event of the plurality of scene events has been executed and ended, but all of the plurality of scene events of the scene instance have not been executed and ended, an execution request for requesting execution of any scene event before the current scene event is detected, and a scene loopback collision is prompted to occur.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the methods of the foregoing embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. An Internet of things scene conflict detection method is characterized by comprising the following steps:
receiving a scene example monitored by event monitoring equipment;
generating a scene identification code corresponding to the scene instance;
acquiring a plurality of sequentially executed scene events contained in one execution cycle of the scene instance based on the scene identification code, and acquiring trigger attributes of the internet of things equipment associated with the scene events;
and in the case that the execution of the current scene event in the scene events is finished, but the execution of all the scene events of the scene instances is not finished, detecting an execution request for requesting to execute any scene event before the current scene event, and prompting the occurrence of a scene loopback conflict.
2. The method according to claim 1, wherein the detecting of the execution request for requesting execution of any scene event before the current scene event in the case that the execution of the current scene event in the plurality of scene events has ended but the execution of all the plurality of scene events of the scene instance has not ended comprises:
after the execution of a current scene event in the scene events is finished, but under the condition that the execution of all the scene events of the scene instance is not finished, determining that the execution result of the current scene event is within the trigger attribute range of the internet of things device associated with a first scene event, wherein the first scene event is any scene event before the current scene event.
3. The method of claim 1, wherein before the receiving event listening device listens for the instance of the scene, further comprising:
acquiring different nestable scene examples sent by the event monitoring equipment; wherein the different nestable scene instances have different scene identification codes;
merging a plurality of nestable scene instances which reach a merging condition into a first serial execution scene instance;
and replacing the scene identification codes of a plurality of nestable scene instances with the same scene identification code.
4. The method of claim 3, wherein merging the plurality of nestable scene instances that meet the merge condition into a first serially executing scene instance comprises:
determining an execution result of a scene event contained in a first nestable scene instance in the plurality of nestable scene instances, and determining that the first nestable scene instance and the second nestable scene instance reach a merging condition within a trigger attribute range of the Internet of things equipment associated with a second nestable scene event;
determining an execution sequence of scene events contained in the first nestable scene instance and the second nestable scene instance;
merging the first and second nestable scene instances into a first serial execution scene instance based on the execution order.
5. The method of claim 3, wherein said merging into a first serially executing scenario instance for a plurality of said nestable scenario instances that meet a merge condition further comprises:
combining a plurality of sequentially executed nestable scene instances which are called by iteration for a plurality of times into a second serial execution scene instance through a recursive algorithm;
merging the second serial execution scenario instance with the first serial execution scenario instance.
6. The method of claim 1, further comprising, after the prompting of a scene loop conflict:
and prompting to change the trigger attribute of the Internet of things equipment associated with each scene event based on the scene loopback conflict.
7. An internet of things scene conflict detection apparatus, the apparatus comprising:
the first receiving unit is used for receiving the scene instances monitored by the event monitoring equipment;
the first generating unit is used for generating a scene identification code corresponding to the scene instance;
a first obtaining unit, configured to obtain, based on the scene identification code, a plurality of sequentially executed scene events included in one execution cycle of the scene instance, and obtain a trigger attribute of an internet of things device associated with each of the plurality of scene events;
a first prompting unit, configured to, when a current scene event of the plurality of scene events has been executed and ended but all of the plurality of scene events of the scene instance have not been executed and ended, detect an execution request for requesting execution of any scene event before the current scene event, and prompt occurrence of a scene loopback collision.
8. The apparatus of claim 7, wherein the first prompting unit comprises:
the first determining unit is configured to determine that an execution result of a current scene event is within a trigger attribute range of the internet of things device associated with the first scene event when execution of a current scene event in the plurality of scene events is finished but all the scene events of the scene instance are not finished yet, where the first scene event is any scene event before the current scene event.
9. A computer-readable storage medium, comprising a stored program, wherein the program when executed performs the method of any 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.
CN202011105877.9A 2020-10-15 2020-10-15 Internet of things scene conflict detection method and device, storage medium and electronic equipment Active CN112286167B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011105877.9A CN112286167B (en) 2020-10-15 2020-10-15 Internet of things scene conflict detection method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011105877.9A CN112286167B (en) 2020-10-15 2020-10-15 Internet of things scene conflict detection method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN112286167A true CN112286167A (en) 2021-01-29
CN112286167B CN112286167B (en) 2022-04-29

Family

ID=74496312

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011105877.9A Active CN112286167B (en) 2020-10-15 2020-10-15 Internet of things scene conflict detection method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112286167B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102891786A (en) * 2012-09-21 2013-01-23 兴泓昇(福州)智能科技有限公司 Automatically-correlated scene control networking method of intelligent home system
CN106527168A (en) * 2016-12-27 2017-03-22 海尔优家智能科技(北京)有限公司 AllJoyn linkage control conflict resolution method, trigger and server
CN107819651A (en) * 2017-09-30 2018-03-20 深圳市艾特智能科技有限公司 Intelligent home equipment control method, device, storage medium and computer equipment
CN110471300A (en) * 2019-08-23 2019-11-19 杭州行至云起科技有限公司 A kind of conflict coordination method and system of more intelligent scenes
CN111352350A (en) * 2020-03-16 2020-06-30 青岛海信智慧家居系统股份有限公司 Method and device for determining execution of smart home scene

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102891786A (en) * 2012-09-21 2013-01-23 兴泓昇(福州)智能科技有限公司 Automatically-correlated scene control networking method of intelligent home system
CN106527168A (en) * 2016-12-27 2017-03-22 海尔优家智能科技(北京)有限公司 AllJoyn linkage control conflict resolution method, trigger and server
CN107819651A (en) * 2017-09-30 2018-03-20 深圳市艾特智能科技有限公司 Intelligent home equipment control method, device, storage medium and computer equipment
CN110471300A (en) * 2019-08-23 2019-11-19 杭州行至云起科技有限公司 A kind of conflict coordination method and system of more intelligent scenes
CN111352350A (en) * 2020-03-16 2020-06-30 青岛海信智慧家居系统股份有限公司 Method and device for determining execution of smart home scene

Also Published As

Publication number Publication date
CN112286167B (en) 2022-04-29

Similar Documents

Publication Publication Date Title
US20190222432A1 (en) Smart household control method, apparatus and system
US20160174268A1 (en) Smart home controller and communication method thereof
CN114244644B (en) Control method and device for intelligent home, storage medium and electronic device
CN109413515A (en) Apparatus control method, device, mobile terminal and server
CN113110147B (en) Method and device for cross-platform linkage of intelligent equipment, equipment and storage medium
CN113037771B (en) Method and device for controlling device shadow, storage medium and electronic device
CN112637024A (en) Control method, control device, electronic equipment and storage medium
CN108154036B (en) Control method and control device of intelligent equipment
CN109167711A (en) A kind of control method of household electrical appliances, device, storage medium and server
CN114697150A (en) Command issuing method and device, storage medium and electronic device
CN115167164A (en) Method and device for determining equipment scene, storage medium and electronic device
CN112286167B (en) Internet of things scene conflict detection method and device, storage medium and electronic equipment
CN113094157A (en) Generation method and device for calling topological graph, storage medium and electronic device
CN112035720A (en) Event reminding triggering method and device, storage medium and electronic equipment
CN110324217A (en) Control method, device, electronic equipment and the storage medium of equipment triggering
CN112152850B (en) Internet of things equipment management method based on flash connection protocol and service terminal
CN114915514A (en) Intention processing method and device, storage medium and electronic device
TW201800960A (en) Event processing method, apparatus and device for internet of things
CN115314245B (en) Authority management method, system, storage medium and electronic device
CN105607594A (en) Method for searching equipment by server memory based on smart home appliance
CN112147904A (en) Information transmission method and device and household appliance
CN105553788B (en) The control method of node and triggering node work in family's sensing network
CN111596562B (en) Equipment control method, cloud equipment and computer storage medium
CN105897588B (en) More home equipment routing table construction methods based on Spark big data platform
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
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Liu Jianguo

Inventor after: Zhang Shiyan

Inventor before: Zhang Shiyan

GR01 Patent grant
GR01 Patent grant