CN113535987B - Linkage rule matching method and related device - Google Patents
Linkage rule matching method and related device Download PDFInfo
- Publication number
- CN113535987B CN113535987B CN202111065811.6A CN202111065811A CN113535987B CN 113535987 B CN113535987 B CN 113535987B CN 202111065811 A CN202111065811 A CN 202111065811A CN 113535987 B CN113535987 B CN 113535987B
- Authority
- CN
- China
- Prior art keywords
- attribute
- expression domain
- linkage rule
- matched
- equipment
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/36—Creation of semantic tools, e.g. ontology or thesauri
- G06F16/367—Ontology
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/901—Indexing; Data structures therefor; Storage structures
- G06F16/9024—Graphs; Linked lists
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16Y—INFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
- G16Y10/00—Economic sectors
- G16Y10/80—Homes; Buildings
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16Y—INFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
- G16Y40/00—IoT characterised by the purpose of the information processing
- G16Y40/30—Control
- G16Y40/35—Management of things, i.e. controlling in accordance with a policy or in order to achieve specified objectives
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
- H04L67/125—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Computing Systems (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- Development Economics (AREA)
- Computational Linguistics (AREA)
- Medical Informatics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Life Sciences & Earth Sciences (AREA)
- Animal Behavior & Ethology (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Economics (AREA)
- Accounting & Taxation (AREA)
- Structural Engineering (AREA)
- Civil Engineering (AREA)
- Architecture (AREA)
- Software Systems (AREA)
- Machine Translation (AREA)
Abstract
The application discloses a linkage rule matching method and a related device, wherein the method comprises the following steps: acquiring a first attribute of a device to be matched, and uploading the first attribute to a cloud management platform; the method comprises the steps of obtaining a first linkage rule which is obtained by a cloud management platform and is associated with equipment to be matched; wherein the first linkage rule comprises a first vocabulary; traversing the ontology base, obtaining a target equipment model corresponding to the equipment to be matched and an expression domain linked list corresponding to the target equipment model, and obtaining a second vocabulary corresponding to the first attribute from the expression domain linked list; the ontology library comprises at least one expression domain linked list; judging whether a mapping relation exists between the first vocabulary and the second vocabulary; if so, judging that the first linkage rule is successfully matched with the equipment to be matched. The method has the advantages that the inference process from the original data reported by the equipment to the natural language of the user is realized based on the ontology base, the linkage rule under the scene of the Internet of things can be effectively matched, the matching distance between the equipment to be matched and the linkage rule is shortened, and the user experience is optimized.
Description
Technical Field
The application relates to the technical field of internet of things, in particular to a linkage rule matching method and a related device.
Background
With the continuous popularization and the vigorous development of the internet of things technology, the interconnection and intercommunication of equipment, systems and services form an internet of things world with information interaction, remote communication and intelligent regulation. The smart home serves as a popular application in the current Internet of things industry, is also called home automation, and is an application scene that various heterogeneous devices in a home are connected together by using the Internet of things technology and personalized services such as automatic control of household appliances, light control, anti-theft alarm and the like are provided by taking a house as a platform. In order to enable the original data reported by the equipment to be matched with the linkage rule created by the user, the user needs to sense and understand the meaning of the underlying equipment attribute data when creating the linkage rule, and the user is best in natural language, so that the user can sense that the meaning of the equipment attribute data is unfriendly and is easy to make mistakes.
At present, a user needs to specify a value or a range of a certain attribute of a specific certain device when creating a linkage rule, so that not only is user experience poor, but also a matching distance exists between original data reported by the device and the linkage rule created by a natural language of the user. Therefore, a new linkage rule matching method is needed to solve the above problems.
Disclosure of Invention
The technical problem mainly solved by the application is to provide a linkage rule matching method and a related device, which can reduce the matching distance between equipment to be matched and a linkage rule.
In order to solve the technical problem, the application adopts a technical scheme that: provided is a linkage rule matching method, including: acquiring a first attribute of a device to be matched, and uploading the first attribute to a cloud management platform; obtaining a first linkage rule which is acquired by the cloud management platform and is associated with the equipment to be matched; wherein the first linkage rule comprises a first vocabulary; traversing an ontology library, obtaining a target equipment model corresponding to the equipment to be matched and an expression domain linked list corresponding to the target equipment model, and obtaining a second vocabulary corresponding to the first attribute from the expression domain linked list; wherein the ontology library comprises at least one expression domain linked list; judging whether the first vocabulary and the second vocabulary have a mapping relation or not; and if so, judging that the first linkage rule is successfully matched with the equipment to be matched.
The method comprises the following steps of obtaining a first attribute of a device to be matched and uploading the first attribute to a cloud management platform: acquiring an attribute set of at least one device; wherein the set of attributes includes at least one second attribute of the device; constructing a corresponding single attribute expression domain chain for each second attribute; wherein the chain of single attribute expression domains comprises a multi-level expression domain.
The number of elements in the next-level expression domain is less than or equal to the number of elements in the previous-level expression domain, and at least one element in the previous-level expression domain generates one element in the next-level expression domain through the action of a mapping function.
Before the step of obtaining the first linkage rule associated with the device to be matched, which is obtained by the cloud management platform, the method comprises the following steps: constructing an equipment model by using the single attribute expression domain chain; wherein the equipment model comprises the single attribute expression domain chain and/or a cross-attribute expression domain tree formed by combining a plurality of single attribute expression domain chains; constructing the ontology library by using each attribute of at least one equipment model and the expression domain linked list corresponding to the attribute; wherein the expression domain linked list comprises the single attribute expression domain chain and/or the cross-attribute expression domain tree.
Wherein the step of constructing the device model using the single attribute expression domain chain includes: and in response to the fact that the number of the second attributes in the attribute set is one, constructing the equipment model by using the single attribute expression domain chain corresponding to the second attributes.
Wherein the step of constructing an equipment model using the single attribute expression domain chain further comprises: and in response to the number of the second attributes in the attribute set being greater than one, combining the single-attribute expression domain chains corresponding to the plurality of second attributes through a combination predicate to obtain a cross-attribute expression domain tree, and constructing the device model by combining the plurality of cross-attribute expression domain trees.
Wherein, the expression domain linked list comprises at least one third vocabulary; before the step of obtaining the first linkage rule associated with the device to be matched, which is obtained by the cloud management platform, the method further comprises the following steps: acquiring a plurality of preset linkage rules created by a user according to any third vocabulary in the expression domain linked list in the ontology base; the step of obtaining the first linkage rule associated with the device to be matched, which is obtained by the cloud management platform, includes: and obtaining the first linkage rule which is acquired by the cloud management platform from the plurality of preset linkage rules and is associated with the equipment to be matched.
The step of traversing the ontology library, obtaining a target device model corresponding to the device to be matched and an expression domain linked list corresponding to the target device model, and obtaining a second vocabulary corresponding to the first attribute from the expression domain linked list includes: traversing an ontology library, obtaining a target equipment model corresponding to the equipment to be matched and an expression domain linked list corresponding to the target equipment model, and obtaining a single attribute expression domain chain and/or a cross-attribute expression domain tree corresponding to the first attribute from the expression domain linked list according to the first attribute; and acquiring a second vocabulary corresponding to the first attribute from the single attribute expression domain chain and/or the cross-attribute expression domain tree.
In order to solve the above technical problem, another technical solution adopted by the present application is: the linkage rule matching device comprises a memory and a processor which are coupled with each other, wherein program instructions are stored in the memory, and the processor is used for executing the program instructions to realize the linkage rule matching method mentioned in any embodiment.
In order to solve the above technical problem, the present application adopts another technical solution: there is provided a computer-readable storage medium storing a computer program for implementing the linkage rule matching method according to any one of the above embodiments.
Different from the prior art, the beneficial effects of the application are that: the linkage rule matching method provided by the application comprises the following steps: the method comprises the steps of obtaining a first attribute of a device to be matched, uploading the first attribute to a cloud management platform, obtaining a first linkage rule which is obtained by the cloud management platform and is associated with the device to be matched, traversing a body library, obtaining a target device model corresponding to the device to be matched and an expression domain linked list corresponding to the target device model, obtaining a second vocabulary corresponding to the first attribute from the expression domain linked list of the body library, and judging that the first linkage rule is successfully matched with the device to be matched if the first vocabulary and the second vocabulary in the first linkage rule have a mapping relation. By the method, the inference process from the equipment reporting original data to the user natural language is realized based on the ontology library, so that the linkage rule under the scene of the Internet of things is effectively matched, the matching distance between the equipment to be matched and the linkage rule is reduced, and the user experience is optimized.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts. Wherein:
FIG. 1 is a schematic flow chart diagram illustrating an embodiment of a linkage rule matching method according to the present application;
FIG. 2 is a schematic flow chart illustrating an embodiment of the method before step S1 in FIG. 1;
FIG. 3 is a schematic diagram of an embodiment of a chain of single attribute expression domains;
FIG. 4 is a schematic flow chart illustrating an embodiment of the method before step S2 in FIG. 1;
FIG. 5 is a schematic diagram of an embodiment of a cross attribute representation domain tree;
FIG. 6 is a schematic flow chart illustrating an embodiment of step S3 in FIG. 1;
FIG. 7 is a schematic structural diagram of an embodiment of a linkage rule matching device according to the present application;
FIG. 8 is a block diagram of an embodiment of a computer-readable storage medium of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all 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 application.
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating an embodiment of a linkage rule matching method according to the present application. Specifically, the linkage rule matching method comprises the following steps:
s1: and acquiring a first attribute of the equipment to be matched, and uploading the first attribute to a cloud management platform.
Specifically, in practical application, a first attribute of the device to be matched and the ID of the device to be matched are obtained and uploaded to the cloud management platform. Specifically, in the present embodiment, the element of the first attribute may be specific time, place, temperature, humidity, or the like.
Specifically, in this embodiment, please refer to fig. 2-3, fig. 2 is a flowchart illustrating an embodiment before step S1 in fig. 1, and fig. 3 is a diagram illustrating an embodiment of a single attribute expression domain chain. Specifically, step S1 includes:
s10: a set of attributes of at least one device is obtained.
Specifically, the set of attributes includes at least one second attribute of the device. The operation to be performed in advance is firstly an attribute set of a domain model expert-defined model familiar with product characteristics, where the attribute set may include one second attribute of one device or may include a plurality of second attributes of one device, and of course, the attribute set may also include the same attribute of a plurality of devices or may include a plurality of second attributes of a plurality of devices, and the application is not limited herein. In this embodiment, the attribute set includes all elements of the second attribute, e.g., V in FIG. 31、V2、V3、V4、……V10。
S11: and constructing a corresponding single attribute expression domain chain for each second attribute.
Specifically, in the present embodiment, with continued reference to FIG. 3, the chain of single-attribute expression domains includes multiple levels of expression domains. The specific construction process is shown in FIG. 3, where the zeroth order expression domain contains all the elements in the property set, e.g., V1、V2、V3、V4、……V10Each level of the expression domain starting from the first level of the expression domain isAnd the calculation is carried out by applying a mapping function to the expression domain of the previous stage. Specifically, the number of elements in the next-level expression domain is less than or equal to the number of elements in the previous-level expression domain. At least one element in the expression domain of the previous level generates an element in the expression domain of the next level through the mapping function, that is, one element in each expression domain of the level must have a mapping relation with one element in the expression domain of the previous level. As shown in fig. 3, the expression domain chain from the zeroth level to the nth level is a single attribute expression domain chain corresponding to a certain second attribute. In this way, the meaning of all element expressions in a single attribute expression domain chain is both complete and non-overlapping. Further, a single attribute expression domain chain herein represents a single attribute of the device model, e.g., temperature, etc. For example, V9Is 31 ℃ and X3Represents 30 ℃ or higher, Y2Indicating a little heat. The language frequently used by users in daily life is described by spoken language such as 'hot to some extent', therefore, the next level of the expression domain linked list is always closer to the natural language vocabulary of human than the previous level.
S2: and obtaining a first linkage rule which is acquired by the cloud management platform and is associated with the equipment to be matched.
Specifically, the first linkage rule includes a first vocabulary. After the cloud management platform acquires the equipment to be matched, the cloud management platform searches and screens out a first linkage rule associated with the equipment to be matched. Of course, there may be multiple association rules associated with the device ID to be matched. There may be one or more first words associated with the first attribute in the first linkage rule. In addition, in the present embodiment, one first linkage rule may correspond to more than one first device.
Specifically, in the present embodiment, please refer to fig. 4, where fig. 4 is a schematic flowchart of an embodiment before step S2 in fig. 1. Specifically, step S2 includes:
s20: and constructing the equipment model by using the single attribute expression domain chain.
Specifically, in this embodiment, when the number of devices reporting data is one, the device model includes a single attribute expression domain chain or a cross-attribute expression domain tree formed by combining multiple single attribute expression domain chains; when the number of the devices reporting data is greater than or equal to one, the number of the device attributes reported by one of the devices is one, and the number of the device attributes reported by one of the devices is greater than or equal to one, the device model comprises a single-attribute expression domain chain and a cross-attribute expression domain tree formed by combining a plurality of single-attribute expression domain chains. For example, domain chains are expressed along temporal attributes: time UTC value 1623632400, 2021/06/1409: 00:00 and early fifths of may be derived. Domain chains are expressed along the geo-location attribute: the longitude and latitude [120.21201,30.2084] can deduce that the geographic location is in Hangzhou and China. Therefore, information gully between the original data reported by the equipment and the natural language of the user can be communicated, so that the original data of the equipment attribute is closer to the natural language of the user in the linkage rule.
Specifically, in the present embodiment, please continue to refer to fig. 4, step S20 includes: and when the number of the second attributes in the attribute set is one, constructing the equipment model by using the single attribute expression domain chain corresponding to the second attributes. Specifically, when the number of the second attributes reported by the device is only one, the device model is constructed by using the single attribute expression domain chain corresponding to the second attribute.
Specifically, in the present embodiment, please refer to fig. 4 and 5 together, and fig. 5 is a schematic diagram of an embodiment of a cross-attribute expression domain tree. Step S20 further includes: and when the number of the second attributes in the attribute set is more than one, combining the single attribute expression domain chains corresponding to the second attributes through the combination predicates to obtain a cross-attribute expression domain tree, and combining the multiple cross-attribute expression domain trees to construct an equipment model.
Specifically, when the number of the devices reporting data is one and the number of the reported device attributes is greater than or equal to one, the device model includes a cross-attribute expression domain tree formed by combining a plurality of single-attribute expression domain chains. For example, when the number of the second attributes in the attribute set is two, the second attributes are respectively an attribute value set a and an attribute value set B, and the attribute value set a and the attribute value set B respectively include a plurality of elements, the single attribute expression domain chain of the attribute value set a and the single attribute expression domain chain of the attribute value set B are respectively obtained according to the step S11, the single attribute expression domain chain of the attribute value set a and the single attribute expression domain chain of the attribute value set B are combined through the combination predicate P to obtain a high-level attribute value set C, so that a cross-attribute expression domain tree is obtained, and the equipment model is constructed by combining the plurality of cross-attribute expression domain trees. In this embodiment, the combination predicate may include a conjunction word of sum, or, and, etc. for combining and expressing different attributes, which is not limited herein. For example, a domain tree is expressed across attributes along time and place: (in early fifths of the May, and Hangzhou) the noon festival can be deduced. Therefore, the original data of the equipment attributes are closer to the user natural language in the linkage rule, and the equipment is communicated to report the information gully between the original data and the user natural language.
S21: and constructing an ontology library by each attribute of at least one equipment model and the expression domain linked list corresponding to the attribute.
Specifically, the expression domain linked list comprises a single attribute expression domain chain, or the expression domain linked list comprises a cross attribute expression domain tree, or the expression domain linked list comprises a single attribute expression domain chain and a cross attribute expression domain tree. That is, the ontology library includes each attribute of at least one device model and its corresponding expression domain linked list.
Through the mode, the next level of the expression domain linked list is always closer to the human natural language vocabulary than the previous level, so that the information gully between the original data reported by the equipment and the natural language of the user can be communicated, the original data of the equipment attribute is closer to the natural language of the user in the linkage rule, the matching distance between the equipment to be matched and the linkage rule is greatly shortened, and the user experience is further optimized.
In addition, in the present embodiment, please continue to refer to fig. 3, the expression domain linked list includes at least one third vocabulary, and the third vocabulary is an element in the expression domain linked list. In this embodiment, step S2 is preceded by: and acquiring a plurality of preset linkage rules created by the user according to any third vocabulary in the expression domain linked list. In this embodiment, the user creates a preset according to any one third vocabulary in the expression domain linked list in the ontology libraryLinkage rules, e.g., a user may utilize element Y in the second level expression domain for the second attribute in FIG. 32Create a preset linkage rule, or may utilize element X in the first level expression domain of the second attribute of FIG. 31And creating a preset linkage rule, which is not limited in the application. Therefore, each preset linkage rule necessarily has a mapping relation with the second attribute of the corresponding equipment. By the method, the information gully between the original data reported by the equipment and the natural language of the user can be communicated, so that the original data of the equipment attribute is closer to the natural language of the user in the linkage rule, and the user experience is further optimized.
Further, in the present embodiment, step S2 includes: the method includes the steps of obtaining a first linkage rule which is acquired by a cloud management platform from a plurality of preset linkage rules and is associated with a device to be matched, specifically, the first linkage rule can be a first linkage rule corresponding to an ID of the device to be matched, and other corresponding modes can be adopted.
S3: and traversing the ontology base to obtain a target equipment model corresponding to the equipment to be matched and an expression domain linked list corresponding to the target equipment model, and acquiring a second vocabulary corresponding to the first attribute from the expression domain linked list.
Specifically, the ontology library includes at least one expression domain linked list.
Specifically, in the present embodiment, please refer to fig. 6, where fig. 6 is a flowchart illustrating an implementation manner of step S3 in fig. 1. Specifically, step S3 includes:
s30: and traversing the ontology base to obtain a target equipment model corresponding to the equipment to be matched and an expression domain linked list corresponding to the target equipment model, and obtaining a single attribute expression domain chain and/or a cross-attribute expression domain tree corresponding to the first attribute from the expression domain linked list according to the first attribute.
Specifically, a target device model body associated with the device ID to be matched and an expression domain linked list corresponding to the target device model body are found in the body library, and the expression domain linked list (time, place, temperature) associated with the first attribute in the body library is traversed according to the first attribute (time, place, temperature) reported by the device.
S31: and acquiring a second vocabulary corresponding to the first attribute from the single attribute expression domain chain and/or the cross-attribute expression domain tree.
Specifically, a second vocabulary ("time" element, "place" element, "temperature" element) corresponding to the first attribute (time, place, temperature) is obtained from the expression domain linked list according to the first attribute (time, place, temperature).
Through the design mode, the same ontology library is adopted in the process of establishing the preset linkage rule by the user and matching the equipment to be matched with the first linkage rule, and the original data of the equipment attribute is closer to the natural language of the user in the preset linkage rule because the preset linkage rule is established according to the vocabulary in the ontology library. Therefore, the inference process from the equipment reporting original data to the user natural language is realized based on the ontology library, the linkage rule under the scene of the internet of things can be effectively matched, the matching distance between the equipment to be matched and the linkage rule is greatly shortened, and the user experience is further optimized.
In addition, in the present embodiment, the expression of the linkage rule is: the predicate is used for controlling the device to execute instructions in an actual application scenario, and may be a spoken conjunctive word provided by a user or a standard conjunctive word, which is more standard. If the predicate is a more spoken conjunct, it may need to be converted to a standard conjunct in the linkage rules.
S4: and judging whether the first vocabulary and the second vocabulary have a mapping relation.
Specifically, the first vocabulary in the first association rule is a third vocabulary used when the first association rule is created by the initial user. For example, as shown in FIG. 3, if the user creates the first linkage rule, X in the first level expression domain is used2And the first vocabulary in the first linkage rule is Y1If so, indicating that a mapping relationship exists between the two; if the user creates the first linkage rule, it is X in the first level expression domain2And the first vocabulary in the first linkage rule is Y2Then, they are explainedThere is no mapping relationship between them.
S5: if so, judging that the first linkage rule is successfully matched with the equipment to be matched.
Specifically, if the first vocabulary and the second vocabulary have a mapping relation, it is determined that the first linkage rule is successfully matched with the device to be matched.
S6: otherwise, return is made to step S3.
Specifically, if the first vocabulary and the second vocabulary do not have a mapping relationship, the matching of the first linkage rule and the device to be matched fails, and the step of traversing the first device set and the expression domain linked list corresponding to the first device set in the ontology library and acquiring the second vocabulary corresponding to the first attribute from the expression domain linked list is returned.
By the method, the device can be opened to report information gully between the original data and the user natural language, so that the user natural language in the linkage rule is closer to the original data of the device attribute, the inference process from the device reporting of the original data to the user natural language can be effectively matched with the linkage rule in the scene of the internet of things based on the ontology, the matching distance between the device to be matched and the linkage rule is greatly shortened, and the user experience is further optimized.
The specific embodiment is as follows:
when the device to be matched is an air conditioner, when a first attribute (current time, current location and current temperature) reported by the air conditioner is assumed, elements of the first attribute comprise a time UTC value 1623632400, a location longitude and latitude [120.21201,30.2084] and a temperature of 31 ℃, and the elements of the first attribute and the ID of the air conditioner are uploaded to a cloud management platform.
The cloud management platform acquires a first linkage rule associated with the air conditioning equipment ID from a plurality of preset linkage rules. Specifically, please continue to refer to fig. 3, the air conditioner model ontology corresponding to the air conditioner is found in the ontology library constructed previously according to the air conditioner ID, and the first attribute (time UTC value 1623632400, place longitude and latitude [120.21201, 30.2084) reported by the air conditioner is determined according to the first attribute (time UTC value 1623632400, place longitude and latitude [120.21201,30.2084]]And the temperature is 31 ℃) to traverse the expression domain linked list of the ontology library (time, place and temperature). In particular toAccording to the first attribute (time UTC value 1623632400, location latitude and longitude [120.21201, 30.2084)]And the temperature is 31 ℃) to obtain an element V with a time UTC value of 1623632400 from an expression domain linked list5Element V at 31 ℃9A single attribute expression domain chain, a cross attribute expression domain tree, or a single attribute expression domain chain and a cross attribute expression domain tree.
Obtaining the element V of 'time UTC value 1623632400' from the single attribute expression domain chain, the cross attribute expression domain tree or the single attribute expression domain chain and the cross attribute expression domain tree5Corresponding second vocabulary X2And "temperature 31 ℃ of element V9Corresponding second vocabulary X3. Suppose and element V of "time UTC value 16236324005Corresponding second vocabulary X2Comprises elements such as 'May and first five' and the like, and an element V with the temperature of 31 DEG C9Corresponding second vocabulary X3The material comprises elements such as 31 ℃ and 31 ℃ in indoor temperature. And the first linkage rule is based on Y by the user1(in the morning) or Y2Created (somewhat hot), that is, Y1(am) and Y2(somewhat hot) is the first vocabulary in the first linkage rule. Thus, Y1(noon) and X2Or Y is2(somewhat hot) and X3The mapping relations exist between the original data and the natural language of the user, so that the information gully between the original data reported by the equipment and the natural language of the user can be opened, the original data of the equipment attribute is closer to the natural language of the user in the linkage rule, and the first linkage rule can be quickly matched with the original data reported by the air conditioner.
Specifically, the domain chain is expressed along the temporal attributes: the time UTC value 1623632400 can be deduced to be 2021/06/1409: 00:00 and May June Wu; similarly, domain chains are expressed along the geographic location attributes: the longitude and latitude [120.21201,30.2084] can deduce that the geographic position is in Hangzhou and China; and expressing the domain tree along time and place: (in early fifths of the May, and Hangzhou) the noon festival can be deduced. The user typically has a large number of people at home at noon, so the user may set a rule: if the room is somewhat hot on the day of the morning, the air conditioner is automatically turned on to be set in the comfort mode.
And if the mapping relation exists between the first vocabulary and the second vocabulary in the first linkage rule, the first linkage rule is successfully matched with the reported attribute of the air conditioner. After the matching is successful, the air conditioner is operated when the user gives an instruction of 'on at noon and when the day is hot', and the air conditioner is automatically turned on to be set in a comfort mode when the temperature is 31 ℃ in the noon and the day. And if the first vocabulary and the second vocabulary in the first linkage rule do not have the mapping relation, the first linkage rule is unsuccessfully matched with the air conditioner.
Through the design mode, the first linkage rule and the expression domain linked list of the equipment use data in the same ontology library, so that the original data of the equipment attribute is closer to the natural language of the user in the linkage rule. Therefore, the method and the device can get through the information gully between the original data reported by the equipment and the natural language of the user, the inference process from the original data reported by the equipment to the natural language of the user can be effectively matched with the linkage rule in the scene of the internet of things based on the ontology library, the matching distance between the equipment to be matched and the linkage rule is greatly shortened, and the user experience is further optimized.
Referring to fig. 7, fig. 7 is a schematic structural diagram of an embodiment of the linkage rule matching device according to the present application. The linkage rule matching device includes a memory 10 and a processor 12 coupled to each other. Specifically, in the present embodiment, the memory 10 stores program instructions, and the processor 12 is configured to execute the program instructions to implement the linkage rule matching method mentioned in any of the above embodiments.
Specifically, the processor 12 may also be referred to as a CPU (Central Processing Unit). The processor 12 may be an integrated circuit chip having signal processing capabilities. The Processor 12 may also be a general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. In addition, processor 12 may be commonly implemented by a plurality of integrated circuit chips.
Referring to fig. 8, fig. 8 is a block diagram illustrating an embodiment of a computer-readable storage medium according to the present application. The computer-readable storage medium 20 stores a computer program 200, which can be read by a computer, and the computer program 200 can be executed by a processor to implement the linkage rule matching method mentioned in any of the above embodiments. The computer program 200 may be stored in the computer-readable storage medium 20 in the form of a software product, and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. The computer-readable storage medium 20 having a storage function may be various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, or may be a terminal device, such as a computer, a server, a mobile phone, or a tablet.
In summary, unlike the prior art, the linkage rule matching method provided by the present application includes: the method comprises the steps of obtaining a first attribute of a device to be matched, uploading the first attribute to a cloud management platform, obtaining a first linkage rule which is obtained by the cloud management platform and is associated with the first attribute and a first device set corresponding to the first linkage rule, traversing the first device set and an expression domain linked list corresponding to the first device set in a body library, obtaining a second vocabulary corresponding to the first attribute from the expression domain linked list of the body library, and judging that the first linkage rule is successfully matched with the device to be matched if the first vocabulary and the second vocabulary in the first linkage rule have a mapping relation. By the method, the device can be opened to report information gully between the original data and the user natural language, so that the user natural language in the linkage rule is closer to the original data of the device attribute, the inference process from the device reporting of the original data to the user natural language can be effectively matched with the linkage rule in the scene of the internet of things based on the ontology, the matching distance between the device to be matched and the linkage rule is greatly shortened, and the user experience is further optimized.
The above description is only for the purpose of illustrating embodiments of the present application and is not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application or are directly or indirectly applied to other related technical fields, are also included in the scope of the present application.
Claims (10)
1. A linkage rule matching method is characterized by comprising the following steps:
acquiring a first attribute of a device to be matched, and uploading the first attribute to a cloud management platform;
obtaining a first linkage rule which is acquired by the cloud management platform and is associated with the equipment to be matched; wherein the first linkage rule comprises a first vocabulary;
traversing an ontology library, obtaining a target equipment model corresponding to the equipment to be matched and an expression domain linked list corresponding to the target equipment model, and obtaining a second vocabulary corresponding to the first attribute from the expression domain linked list; the ontology library comprises at least one expression domain linked list, the zeroth-level expression domain comprises all elements in the attribute set, each level of expression domain starting from the first level of expression domain is obtained by calculation through the action of a mapping function on the previous level of expression domain, and one element in each level of expression domain has a mapping relation with one element in the previous level of expression domain;
judging whether the first vocabulary and the second vocabulary have a mapping relation or not;
and if so, judging that the first linkage rule is successfully matched with the equipment to be matched.
2. The linkage rule matching method according to claim 1, wherein before the step of obtaining the first attribute of the device to be matched and uploading the first attribute to a cloud management platform, the method comprises:
acquiring an attribute set of at least one device; wherein the set of attributes includes at least one second attribute of the device;
constructing a corresponding single attribute expression domain chain for each second attribute; wherein the single-attribute expression domain chain represents a single attribute of the device model, the single-attribute expression domain chain including a multi-level expression domain.
3. The linkage rule matching method according to claim 2,
the number of elements in the next level expression domain is less than or equal to the number of elements in the previous level expression domain, and at least one element in the previous level expression domain generates one element in the next level expression domain through the action of a mapping function.
4. The linkage rule matching method according to claim 2, wherein the step of obtaining the first linkage rule associated with the device to be matched, which is obtained by the cloud management platform, comprises:
constructing an equipment model by using the single attribute expression domain chain; wherein the equipment model comprises the single attribute expression domain chain and/or a cross-attribute expression domain tree formed by combining a plurality of single attribute expression domain chains;
constructing the ontology library by using each attribute of at least one equipment model and the expression domain linked list corresponding to the attribute; wherein the expression domain linked list comprises the single attribute expression domain chain and/or the cross-attribute expression domain tree.
5. The linkage rule matching method according to claim 4, wherein the step of constructing an equipment model using the single attribute expression domain chain includes:
and in response to the fact that the number of the second attributes in the attribute set is one, constructing the equipment model by using the single attribute expression domain chain corresponding to the second attributes.
6. The linkage rule matching method according to claim 4, wherein the step of constructing an equipment model using the single attribute expression domain chain further comprises:
and in response to the number of the second attributes in the attribute set being greater than one, combining the single-attribute expression domain chains corresponding to the plurality of second attributes through a combination predicate to obtain a cross-attribute expression domain tree, and constructing the equipment model by using the combination of the plurality of cross-attribute expression domain trees.
7. The linkage rule matching method according to claim 4, wherein the expression domain linked list includes at least one third vocabulary; before the step of obtaining the first linkage rule associated with the device to be matched, which is obtained by the cloud management platform, the method further comprises the following steps:
acquiring a plurality of preset linkage rules created by a user according to any third vocabulary in the expression domain linked list in the ontology base;
the step of obtaining the first linkage rule associated with the device to be matched, which is obtained by the cloud management platform, includes:
and obtaining the first linkage rule which is acquired by the cloud management platform from the plurality of preset linkage rules and is associated with the equipment to be matched.
8. The linkage rule matching method according to claim 7, wherein the step of traversing the ontology library, obtaining a target device model corresponding to the device to be matched and an expression domain linked list corresponding to the target device model, and obtaining a second vocabulary corresponding to the first attribute from the expression domain linked list comprises:
traversing an ontology library, obtaining a target equipment model corresponding to the equipment to be matched and an expression domain linked list corresponding to the target equipment model, and obtaining a single attribute expression domain chain and/or a cross-attribute expression domain tree corresponding to the first attribute from the expression domain linked list according to the first attribute;
and acquiring a second vocabulary corresponding to the first attribute from the single attribute expression domain chain and/or the cross-attribute expression domain tree.
9. A linkage rule matching apparatus, comprising a memory and a processor coupled to each other, wherein the memory stores program instructions, and the processor is configured to execute the program instructions to implement the linkage rule matching method according to any one of claims 1 to 8.
10. A computer-readable storage medium characterized in that a computer program for implementing the linkage rule matching method according to any one of claims 1 to 8 is stored.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111065811.6A CN113535987B (en) | 2021-09-13 | 2021-09-13 | Linkage rule matching method and related device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111065811.6A CN113535987B (en) | 2021-09-13 | 2021-09-13 | Linkage rule matching method and related device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113535987A CN113535987A (en) | 2021-10-22 |
CN113535987B true CN113535987B (en) | 2022-01-21 |
Family
ID=78093201
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111065811.6A Active CN113535987B (en) | 2021-09-13 | 2021-09-13 | Linkage rule matching method and related device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113535987B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115032901B (en) * | 2021-12-22 | 2023-03-28 | 荣耀终端有限公司 | Equipment control method and electronic equipment |
CN114281830B (en) * | 2022-03-01 | 2022-08-30 | 杭州涂鸦信息技术有限公司 | Rule mapping table construction method, rule matching method and device for multi-attribute conditions |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107179701A (en) * | 2017-07-21 | 2017-09-19 | 电子科技大学 | A kind of intelligent home device self-adapting linkage rule generating method |
CN107612968A (en) * | 2017-08-15 | 2018-01-19 | 北京小蓦机器人技术有限公司 | The method, equipment and system of its connected device are controlled by intelligent terminal |
CN108399176A (en) * | 2017-02-07 | 2018-08-14 | 阿里巴巴集团控股有限公司 | A kind of rule-based data processing method and regulation engine device |
CN110399530A (en) * | 2018-04-20 | 2019-11-01 | 杭州海康威视数字技术股份有限公司 | Data matching method, device and computer equipment |
CN110717025A (en) * | 2019-10-08 | 2020-01-21 | 北京百度网讯科技有限公司 | Question answering method and device, electronic equipment and storage medium |
CN110738044A (en) * | 2019-10-17 | 2020-01-31 | 杭州涂鸦信息技术有限公司 | Control intention recognition method and device, electronic equipment and storage medium |
CN111311790A (en) * | 2020-01-17 | 2020-06-19 | 杭州涂鸦信息技术有限公司 | Rapid matching method and system for passwords |
CN112217697A (en) * | 2020-09-24 | 2021-01-12 | 复旦大学 | Intelligent control system of Internet of things equipment |
CN112235326A (en) * | 2020-12-15 | 2021-01-15 | 长沙树根互联技术有限公司 | Internet of things equipment data analysis method and device and electronic equipment |
CN112463927A (en) * | 2020-12-09 | 2021-03-09 | 上海嗨酷强供应链信息技术有限公司 | Efficient intelligent semantic matching method |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8108423B2 (en) * | 2008-10-03 | 2012-01-31 | Disney Enterprises, Inc. | System and method for ontology and rules based segmentation engine for networked content delivery |
CN103064849B (en) * | 2011-10-19 | 2017-04-12 | 深圳市世纪光速信息技术有限公司 | Treatment method and device for cascading style sheet (CSS) |
US8732207B2 (en) * | 2012-07-02 | 2014-05-20 | International Business Machines Corporation | Attribute-based linked tries for rule evaluation |
KR101465230B1 (en) * | 2013-11-05 | 2014-11-25 | 주식회사 서비전자 | Method for device control using smart device and control system the same |
CN104898592B (en) * | 2015-03-31 | 2017-11-28 | 联想(北京)有限公司 | A kind of generation method and electronic equipment of the rule that links |
CN106657521A (en) * | 2015-10-30 | 2017-05-10 | 中兴通讯股份有限公司 | Smart device voice communication method, apparatus and system |
CN108234408A (en) * | 2016-12-15 | 2018-06-29 | 中兴通讯股份有限公司 | A kind of things-internet gateway inter-linked controlling method and things-internet gateway |
CN107864174B (en) * | 2017-07-03 | 2021-07-20 | 华南理工大学 | Rule-based Internet of things equipment linkage method |
CN112583925B (en) * | 2020-12-23 | 2023-05-23 | 佳讯飞鸿(北京)智能科技研究院有限公司 | Control system and method for Internet of things service, readable storage medium and electronic equipment |
-
2021
- 2021-09-13 CN CN202111065811.6A patent/CN113535987B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108399176A (en) * | 2017-02-07 | 2018-08-14 | 阿里巴巴集团控股有限公司 | A kind of rule-based data processing method and regulation engine device |
CN107179701A (en) * | 2017-07-21 | 2017-09-19 | 电子科技大学 | A kind of intelligent home device self-adapting linkage rule generating method |
CN107612968A (en) * | 2017-08-15 | 2018-01-19 | 北京小蓦机器人技术有限公司 | The method, equipment and system of its connected device are controlled by intelligent terminal |
CN110399530A (en) * | 2018-04-20 | 2019-11-01 | 杭州海康威视数字技术股份有限公司 | Data matching method, device and computer equipment |
CN110717025A (en) * | 2019-10-08 | 2020-01-21 | 北京百度网讯科技有限公司 | Question answering method and device, electronic equipment and storage medium |
CN110738044A (en) * | 2019-10-17 | 2020-01-31 | 杭州涂鸦信息技术有限公司 | Control intention recognition method and device, electronic equipment and storage medium |
CN111311790A (en) * | 2020-01-17 | 2020-06-19 | 杭州涂鸦信息技术有限公司 | Rapid matching method and system for passwords |
CN112217697A (en) * | 2020-09-24 | 2021-01-12 | 复旦大学 | Intelligent control system of Internet of things equipment |
CN112463927A (en) * | 2020-12-09 | 2021-03-09 | 上海嗨酷强供应链信息技术有限公司 | Efficient intelligent semantic matching method |
CN112235326A (en) * | 2020-12-15 | 2021-01-15 | 长沙树根互联技术有限公司 | Internet of things equipment data analysis method and device and electronic equipment |
Non-Patent Citations (3)
Title |
---|
Learning Expressive Linkage Rules for Entity Matching using Genetic Programming;Robert Isele et al.;《dissertation》;20131231;第1-16页 * |
基于规则的智能家居设备联动机制的研究与实现;吴启亮;《中国优秀博硕士学位论文全文数据库(硕士)工程科技Ⅱ辑》;20180715;第2018年卷(第02期);第C038-761页 * |
面向智能家居的不确定性规则推理机制的研究与实现;肖碧怡;《中国优秀博硕士学位论文全文数据库(硕士) 工程科技Ⅱ辑》;20170215;第2017年卷(第02期);第C038-1961页 * |
Also Published As
Publication number | Publication date |
---|---|
CN113535987A (en) | 2021-10-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113535987B (en) | Linkage rule matching method and related device | |
WO2021254114A1 (en) | Method and apparatus for constructing multitask learning model, electronic device and storage medium | |
CN110612509A (en) | Personalization of virtual assistant skills based on user profile information | |
KR20160124765A (en) | Multi-round session interaction method and system, and computer device | |
US10547469B2 (en) | System, method, and recording medium for adjusting ambience of a room | |
US20180197104A1 (en) | Using an action-augmented dynamic knowledge graph for dialog management | |
US20140129032A1 (en) | Genetic learning for environmental control automation | |
EP3210133A1 (en) | Tagging personal photos with deep networks | |
CN106845644A (en) | A kind of heterogeneous network of the contact for learning user and Mobile solution by correlation | |
JP7003480B2 (en) | Automatic learning universal gateway | |
US20180190292A1 (en) | Voice recognition system and construction method thereof | |
US9323504B1 (en) | Template-driven data access | |
US20220283831A1 (en) | Action recipes for a crowdsourced digital assistant system | |
CN109407538A (en) | Intelligent home furnishing control method and system | |
US20180067991A1 (en) | Using Structured Smart Digital Memory to Personalize Digital Agent and Bot Scenarios | |
US12033044B2 (en) | Interactive and dynamic mapping engine (IDME) | |
CN115905687A (en) | Cold start-oriented recommendation system and method based on meta-learning graph neural network | |
US11080471B2 (en) | Rules-based automated chart description system | |
Sai et al. | Smart Home Messenger Notifications System using IoT | |
KR102481162B1 (en) | Subscription data push method and device in the Internet of Things, the device and storage medium | |
Li et al. | Intelligent control system of smart home for context awareness | |
WO2024139703A1 (en) | Object recognition model updating method and apparatus, electronic device, storage medium, and computer program product | |
Khan et al. | DIY interface for enhanced service customization of remote IoT devices: a CoAP based prototype | |
WO2023221357A1 (en) | Device control method and related apparatus | |
US20200012688A1 (en) | Method and device for retrieving content |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
EE01 | Entry into force of recordation of patent licensing contract | ||
EE01 | Entry into force of recordation of patent licensing contract |
Application publication date: 20211022 Assignee: Guangdong Graffiti Intelligent Information Technology Co.,Ltd. Assignor: HANGZHOU TUYA INFORMATION TECHNOLOGY Co.,Ltd. Contract record no.: X2022330000777 Denomination of invention: Linkage rule matching method and related devices Granted publication date: 20220121 License type: Common License Record date: 20221214 |