CN112783893A - Conflict detection method for control rule - Google Patents

Conflict detection method for control rule Download PDF

Info

Publication number
CN112783893A
CN112783893A CN202011631841.4A CN202011631841A CN112783893A CN 112783893 A CN112783893 A CN 112783893A CN 202011631841 A CN202011631841 A CN 202011631841A CN 112783893 A CN112783893 A CN 112783893A
Authority
CN
China
Prior art keywords
control rule
linkage
linkage information
key value
information
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
CN202011631841.4A
Other languages
Chinese (zh)
Inventor
林彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Opple Lighting Co Ltd
Original Assignee
Opple Lighting 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 Opple Lighting Co Ltd filed Critical Opple Lighting Co Ltd
Priority to CN202011631841.4A priority Critical patent/CN112783893A/en
Publication of CN112783893A publication Critical patent/CN112783893A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24564Applying rules; Deductive queries
    • G06F16/24565Triggers; Constraints
    • 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]
    • G16Y20/00Information sensed or collected by the things
    • G16Y20/20Information sensed or collected by the things relating to the thing itself
    • 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 provides a conflict detection method of control rules, which stores linkage information of a first control rule in a storage module; receiving a second control rule set by a user and sent by a client; performing hash calculation on the linkage equipment information associated with each second linkage information in the second control rule to obtain a second key value corresponding to each second linkage information; searching linkage information matched with each second key value in the storage module by using each second key value; and comparing whether the second linkage information corresponding to each second key value is the same as the linkage information matched with the second key value in the storage module, and if at least one comparison result is different, sending a notice of control rule conflict to the client.

Description

Conflict detection method for control rule
Technical Field
The present invention relates to a detection method, and more particularly, to a collision detection method for control rules.
Background
In the control system, with the increase of the number of devices and the sudden increase of application scenes, when the control rules are constructed manually, control rule conflicts easily occur due to different levels of users and different familiarity of the system, so that different actions trigger different effects of the same device at the same time, and a setter cannot be reminded in real time. For example, in a household control system, when the illuminance sensor is higher than a certain value M1, a user wants to dim the light at first, and the user feels that M1 lumens cannot meet the requirement at second, and wants to dim the light at second, so that the lamp can output a larger value M2 lumens, wherein M2 is larger than M1, and the control rules set by the user first and the user second conflict with each other, so that the control system cannot meet the control requirements of a plurality of users; in addition, in the scene control of the control system, the control rule set by the user one is as follows: 1) associating the motion detection sensor MS1 with the lights of zone one and zone two, 2) when detecting that someone is present in zone one, the motion detection sensor MS1 is triggered, light fixture one, light fixture two and light fixture three in zone one are on, light fixture four and light fixture five in zone two are off; and when the second user sets the scene control rule, the third lamp is arranged in the second area, so that when people appear in the first area, the third lamp should be turned off but is turned on due to the set control rule of the second user.
At present, in a control system, there are devices such as executing devices and sensors, and users first Group the devices, for example, dividing the executing device1 and the executing device2 into a Group1, if different users set the following two rules:
rule 1: when the sensor pir1 is triggered, the executive equipment device1 and the executive equipment device2 in the Group1 start working;
rule 2 when the sensor pir1 is triggered, the executive device1 and the executive device2 stop working.
In the two control rules set up, there is a conflict between the execution of the device1, since different actions cannot be triggered by the same sensor pir 1. For the above encountered problem of rule conflict, the conventional solution: for rule 2, firstly analyzing the triggering condition of the sensor pir1, and if the condition is satisfied, searching a rule table related to the sensor pir 1; after finding out the related rules of the sensor pir1, searching all the groups to find out a Group 1; further traversing all the devices in the Group 1; finally, the device1 is found to conflict between rule one and rule two by comparison.
Because the calculation complexity, the number of control rules and the equipment grouping scale of the traditional solution are all related, the system response capability is slowed down along with the increase of the rules, so that when a user sets the control rules at a client and then carries out recursive collision detection by a background, the phenomena of untimely response, unsmooth background system and the like can occur.
Disclosure of Invention
In view of the above problems, the present invention provides a method for detecting a conflict of a control rule, which can be applied to a control system, and comprises the following steps:
storing linkage information of a first control rule in a storage module; receiving a second control rule set by a user and sent by a client; performing hash calculation on the linkage equipment information associated with each second linkage information in the second control rule to obtain a second key value corresponding to each second linkage information; searching linkage information matched with each second key value in the storage module by using each second key value; and comparing whether the second linkage information corresponding to each second key value is the same as the linkage information matched with the second key value in the storage module, and if at least one comparison result is different, sending a notice of control rule conflict to the client.
Preferably, the first control rule is issued to the gateway.
Preferably, if the linkage information is not found in the storage module, the second linkage information is stored in the storage unit using the second key value as the address, and a second control rule is issued to the gateway.
Preferably, the step of storing the linkage information of the first control rule in the storage module includes:
initializing a storage unit in a storage module; performing hash calculation on the linkage equipment information associated with each linkage information to obtain a corresponding first key value; and storing each linkage information into the storage unit with the corresponding first key value as an address. The first control rule is configured by a user at the client.
Preferably, the searching of the linkage information matched with each second key value in the storage module by using each second key value comprises: and searching linkage information matched with the second key value in a storage module by taking the second key value as an address.
Preferably, the linkage information of the first control rule and the second linkage information of the second control rule include a name of the sensor, a name of the execution device, and a linkage action of the sensor and the execution device or a linkage action of the sensor and the execution device.
Preferably, linkage device information associated with the first control rule linkage information and the second linkage information of the second control rule used for the hash calculation is a sensor name and an execution device name associated with the sensor.
Preferably, the number of storage units in the storage module is greater than the product of the number of sensors and the number of actuators.
Preferably, the notification of the control rule conflict comprises the second linkage information participating in the comparison and/or its corresponding linkage information.
The invention also provides a conflict detection method of the control rule, which comprises the following steps
Sending the configured second control rule to a server, wherein the server is used for performing hash calculation on linkage equipment information associated with each linkage information in the second control rule to obtain a second key value corresponding to each linkage information, searching linkage information of the matched first control rule in a storage module by using each second key value, and judging whether the linkage information of the second control rule corresponding to each second key value conflicts with the searched linkage information of the matched first control rule;
and receiving and displaying the notification information of the control rule conflict sent by the server on the client.
Preferably, the first control rule is configured by the user at the client and sent to the server.
The invention also comprises a storage medium which comprises a stored program, wherein when the program runs, the device where the storage medium is located is controlled to execute the conflict detection method of the control rule.
The invention analyzes the control rule and compiles the control rule into the rule with the minimum granularity of each linkage information and the linkage equipment information associated with the linkage information through Hash calculation, thereby realizing real-time quick response and solving the performance problem. Through detection, the user is informed in time after rule conflict is found, so that the user can modify the set rule as soon as possible, the condition that the operation of the execution equipment in the control system is disordered due to the setting of different users is avoided, and the control system can meet the requirement of multiple users.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a schematic diagram of a control system according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a correspondence between a hash value of the linkage device and linkage information in the storage unit according to the embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Fig. 1 is a schematic structural diagram of a control system according to an embodiment of the present invention, referring to fig. 1, a control system 10 includes a terminal 11, a server 12, a gateway 13, a plurality of sensors 14, and a plurality of executing device lamps 15, where the sensors include infrared sensors pir1, in this embodiment, the executing device is a lamp 15, but is not limited thereto, the executing device may also be other electrical devices, a user may set a control rule using the terminal 11, and the set control rule is sent to the server 12 through a wired or wireless network, in this embodiment, when the sensor 14 is triggered, the server 12 parses the set control rule, finds linkage information of the lamps 15 associated with the sensor 14, and controls the associated lamps through the gateway 13 according to a parsing result, in addition, a first control rule may also be issued to the gateway 13, and the gateway 13 parses the set control rule, and finding linkage information and associated equipment to enable the associated equipment lamps and the sensors to be directly communicated through the gateway.
Fig. 2 is a schematic diagram of a correspondence between a hash value of the linkage device and linkage information in the storage unit according to the embodiment of the present invention. Referring to fig. 2, the linkage information is stored in the storage unit 200 of the server, the linkage information is linkage information including linkage actions of the sensor and the execution device, besides, the linkage information may also be a name of the sensor, a name of the execution device, and a combination of linkage actions of the sensor and the execution device, or the linkage information includes a name of the execution device and a combination of linkage actions of the sensor and the execution device, the first control rule may include a plurality of items of linkage information and their respectively associated linkage devices, in this embodiment, the first control rule is that when the infrared sensor pir1 is triggered, the light1 in the control system is turned on, the light3 is turned on, and the first control rule may be expressed as:
Rule1:{pir1, light1 on, light3 on}
the first control rule includes the following two pieces of linkage information and associated linkage device information:
1) { (pir1, light1), light1 on }, which indicates that when sensor pir1 triggers, lamp light1 lights up; here, light1 on is the first interlocking information indicating that the lamp light1 is lit, (pir1, light1) are the interlocking device information associated with the first interlocking information light1 on, that is, the sensor pir1 and the lamp light1 are the associated devices associated with the first interlocking information.
2) { (pir1, light3), light3 on }, which indicates that when sensor pir1 triggers, lamp light3 lights up; here, light3 on is second interlocking information indicating that the lamp light3 is lit, (pir1, light3) are interlocking device information associated with the second interlocking information light3 on, that is, the sensor pir1 and the lamp light3 are interlocking devices associated with the second interlocking information.
The server will initialize the memory unit 200 in the memory module first, wherein, the number of the memory unit is larger than the product of the number of the sensors and the number of the executing devices; performing hash calculation on the linkage equipment information associated with each linkage information in the received first control rule to obtain a first key value 100 corresponding to each linkage information one by one; finally, a deformation Rule' for the first control Rule is formed, wherein each first key value 100 corresponds to one linkage information:
Rule1’; {hash(pir1+ light11), light1 on}, {hash(pir1+ light3), light3 on}
the HASH is a HASH function, the pir1+ light1 represents a combination of the name of the linkage device information sensor pir1 and the name of the lamp light1, such as splicing of character strings, and other linkage device information and linkage information, and so on. Each calculated HASH value 100 points as an address value to a storage location where the linkage information is stored. As shown in fig. 1, the value of Hash (pir1+ light1) points to the storage unit 200 of the associated linkage information, which is the On light. Similarly, the Hash (pir1+ light3) points to a storage unit of the linkage action of the lamp light3 associated with the sensor pir1, and the storage unit stores the lamp-On action On; in addition, the storage unit may store information "light 1 on", "light 3 on", "light 2 Down", or store linkage information "pir 1, light1 on", "pir 1, light3 on", "pir 1, light2 Down"
When the second user sets a second rule at the client side to be that when the infrared sensor pir1 is triggered, the light lamps light1 and light lamps light2 are extinguished, that is:
Rule2’:{pir1, light1 Down, light2 Down}
after setting, the second control rule is sent from the client 11 to the server 12, and after receiving the second control rule set by the user from the client 11, the server 12 parses the second control rule to parse the second linkage information and its associated linkage device information
1) { (pir1, light1), light1 Down }, wherein the second linkage information is light1 Down and its associated linkages are sensor pir1 and lamp light1, indicating that lamp light1 is extinguished when sensor pir1 triggers.
2) { (pir1, light2), light2 Down }, where another second linkage information is light2 Down and its associated linkages are sensor pir1 and lamp light2, indicating that lamp light2 goes out when sensor pir1 triggers.
And calculating a hash value by performing hash calculation on the linkage equipment associated with the second linkage information, wherein the hash value is used as a second key value and corresponds to each piece of second linkage information one by one to form a deformed second control rule, and the expression is as follows:
{hash(pir1+ light1), light1 down },{ hash(pir1+ light3), light3 down}
the HASH is HASH calculation, and pir1+ light1 represents a combination of the name of the sensor pir1 and the name of the lamp light1, such as splicing of character strings; each hash value, i.e. the second key value, corresponds to the related second linkage information, for example, a hash (pir1+ light1) corresponds to the second linkage information light1 down, a hash (pir1+ light3) corresponds to the second linkage information light3 down, and the rest of the linkage device information is analogized. The second key value is used to search for the linkage information of the first rule in the storage module, and one method is to query the storage module by using the second key value as an address of the storage unit and extract the matching linkage information stored in the searched storage unit. After a second key value Hash (pir1+ light1) is used for finding out a matched linkage information lamp light1 for an address and is lightened ("light 1 on"), the linkage information lamp light1 is compared with linkage information lamp 1 Down "in a second control rule corresponding to the second key value, linkage information conflict of a lamp light1 in two control rules associated with pir1 is found through comparison, so that the second control rule set by a user and a first control rule set by the user are judged to conflict, the server stops setting the second control rule and sends a notification of the control rule conflict to the client 11, the notification information can comprise names and/or linkage information of associated equipment, and after the user sees a notification message of the rule conflict through the client 11, the user can timely modify the second control rule to be set. If the linkage information of the first control rule corresponding to the second key value is not found in the storage module, in this embodiment, the storage module does not have a storage unit for storing the linkage information of the lamp light3 and the sensor pir1, and the server stores the linkage information of the lamp light3 and the sensor pir1 of the second control rule as the linkage information of the new first control rule in the storage unit with the second key value as an address.
The first control rule set by the user at the client can also be issued to the gateway device in the control system, so that the gateway can control the execution device according to the trigger signal of the sensor, the linkage between the execution device and the sensor can be performed not through the server but through the local gateway, and the response speed and time are improved.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
Thus, it should be appreciated by those skilled in the art that while a number of exemplary embodiments of the invention have been illustrated and described in detail herein, many other variations or modifications consistent with the principles of the invention may be directly determined or derived from the disclosure of the present invention without departing from the spirit and scope of the invention. Accordingly, the scope of the invention should be understood and interpreted to cover all such other variations or modifications.

Claims (14)

1. A conflict detection method for a control rule is characterized by comprising the following steps:
storing linkage information of a first control rule in a storage module;
receiving a second control rule set by a user and sent by a client;
performing hash calculation on the linkage equipment information associated with each second linkage information in the second control rule to obtain a second key value corresponding to each second linkage information;
searching linkage information matched with each second key value in the storage module by using each second key value;
and comparing whether the second linkage information corresponding to each second key value is the same as the linkage information matched with the second key value in the storage module, and if at least one comparison result is different, sending a notice of control rule conflict to the client.
2. The method of claim 1, wherein the conflict detection is performed by a computer,
the step of storing the linkage information of the first control rule in the storage module includes:
initializing a storage unit in a storage module;
performing hash calculation on the linkage equipment information associated with each linkage information to obtain a corresponding first key value;
and storing each linkage information into the storage unit with the corresponding first key value as an address.
3. The method of claim 2, wherein the first control rule is configured by a user at a client.
4. The method according to claim 1, wherein the searching for the linkage information matching the second key value in the storage module by using each second key value comprises:
and searching linkage information matched with the second key value in a storage module by taking the second key value as an address.
5. The method according to claim 2, wherein the linkage information of the first control rule and the second linkage information of the second control rule include a name of a sensor, a name of an execution device, and a linkage action of the sensor and the execution device or a name of the execution device, and a linkage action of the sensor and the execution device or a linkage action of the sensor and the execution device.
6. The method according to claim 5, wherein the linkage device information associated with the linkage information of the first control rule and the second linkage information of the second control rule for hash calculation is a sensor name and an execution device name associated with a sensor.
7. The method of claim 6, wherein the number of storage units is greater than a product of the number of sensors and the number of actuators.
8. The method of claim 2, further comprising issuing the first control rule to the gateway.
9. The method according to claim 1, wherein if no linkage information is found in the storage module, the second linkage information is stored in the storage unit addressed by the second key value.
10. The method of claim 9, wherein the second control rule is issued to the gateway.
11. A method for conflict detection of control rules, characterized in that,
sending the configured second control rule to a server, wherein the server is used for performing hash calculation on linkage equipment information associated with each linkage information in the second control rule to obtain a second key value corresponding to each linkage information, searching linkage information of the matched first control rule in a storage module by using each second key value, and judging whether the linkage information of the second control rule corresponding to each second key value conflicts with the searched linkage information of the matched first control rule;
and receiving and displaying the notification information of the control rule conflict sent by the server on the client.
12. The method of claim 11, wherein the first control rule is configured by a user at a client and sent to a server.
13. The method according to claim 12, wherein the linkage information of the first control rule and the second control rule includes a name of a sensor, a name of an execution device, and a linkage action of the sensor and the execution device or a name of the execution device, and a linkage action of the sensor and the execution device or a linkage action of the sensor and the execution device.
14. A storage medium, characterized in that the storage medium comprises a stored program, wherein a device in which the storage medium is located is controlled to execute the conflict detection method of the control rule according to any one of claims 1 to 12 when the program runs.
CN202011631841.4A 2020-12-31 2020-12-31 Conflict detection method for control rule Pending CN112783893A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011631841.4A CN112783893A (en) 2020-12-31 2020-12-31 Conflict detection method for control rule

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011631841.4A CN112783893A (en) 2020-12-31 2020-12-31 Conflict detection method for control rule

Publications (1)

Publication Number Publication Date
CN112783893A true CN112783893A (en) 2021-05-11

Family

ID=75754697

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011631841.4A Pending CN112783893A (en) 2020-12-31 2020-12-31 Conflict detection method for control rule

Country Status (1)

Country Link
CN (1) CN112783893A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106527168A (en) * 2016-12-27 2017-03-22 海尔优家智能科技(北京)有限公司 AllJoyn linkage control conflict resolution method, trigger and server
WO2018192487A1 (en) * 2017-04-21 2018-10-25 北京京东尚科信息技术有限公司 Method and apparatus for controlling smart device linkage

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106527168A (en) * 2016-12-27 2017-03-22 海尔优家智能科技(北京)有限公司 AllJoyn linkage control conflict resolution method, trigger and server
WO2018192487A1 (en) * 2017-04-21 2018-10-25 北京京东尚科信息技术有限公司 Method and apparatus for controlling smart device linkage

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
黄晓辉;李栋;石海龙;崔莉;: "EasiRCC:面向智能家居的规则匹配与冲突消除方法", 计算机研究与发展, no. 12 *

Similar Documents

Publication Publication Date Title
CN113545009B (en) Scene operation method and device, electronic equipment and computer readable medium
US8285718B1 (en) Clustering multimedia search
US9824125B2 (en) Methods and apparatus for storing, suggesting, and/or utilizing lighting settings
US9317613B2 (en) Large scale entity-specific resource classification
US20200380652A1 (en) Automated generation of synthetic lighting scene images using generative adversarial networks
US20200106632A1 (en) System and method for disambiguation of internet-of-things devices
US20170167746A1 (en) Adaptive trigger sequencing for site control automation
US10814235B2 (en) Vector-space framework for evaluating gameplay content in a game environment
JP2012208613A (en) Behavior condition estimation system and method thereof
CN108536786A (en) A kind of information recommendation method, device, server and storage medium
US9305226B1 (en) Semantic boosting rules for improving text recognition
CN112783893A (en) Conflict detection method for control rule
CN215499680U (en) Intelligent control system
CN112528046B (en) New knowledge graph construction method and device and information retrieval method and device
WO2020249543A1 (en) A controller for downscaling a set of light settings and a method thereof
JP7362969B2 (en) Controller and method for training a machine to automate lighting control actions
CN111078646A (en) Method and system for grouping software based on running data of Internet equipment
WO2022040225A1 (en) Systems and methods for improving training of machine learning systems
US20220151046A1 (en) Enhancing a user's recognition of a light scene
US20240107646A1 (en) A controller for unlearning a learnt preference for a lighting system and a method thereof
da Silva Cardoso IM2HoT: Interactive Machine-Learning to improve the House of Things
CN114302536A (en) Lighting scene generation method and device, intelligent equipment, server and storage medium
JP6634971B2 (en) Information providing method, information providing apparatus, and information providing program
CN115709678A (en) Projection method, projection device, terminal equipment, storage medium and vehicle
CN117172244A (en) Corpus aggregation method, storage medium and electronic equipment

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