A linkage scene construction method and device
By constructing interconnected scenarios for IoT devices through speech recognition and semantic analysis, generating logical link trees and identifying node objects, this approach solves the problems of high user expertise requirements and the need for reconstructing from scratch in existing technologies, and achieves efficient and flexible interconnected scenario construction.
Patent Information
- Application Number
- CN202411724572.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2044-11-28
AI Technical Summary
In existing technologies, building interconnected scenarios for multiple IoT devices requires users to have professional knowledge, and the interconnected scenarios need to be rebuilt from scratch after adding devices, resulting in a large workload and low efficiency.
By processing user commands for constructing interactive scenarios through speech recognition and semantic analysis, a logical link tree is built, node objects are identified, and an interactive scenario link tree is generated. This supports the linkage of trigger events, calculation events, and control events, and introduces external media and logical objects to enrich the forms of linkage.
It enables convenient construction of interconnected scenarios, meets users' personalized needs, and the logical link tree can be updated without being affected by the addition, deletion or modification of objects, thus improving construction efficiency and flexibility.
Smart Images

Figure CN119724175B_ABST
Abstract
Description
Technical Field
[0008] , , ,
[0010] ,
[0009]
[0001] This application relates to the field of the Internet of Things, and specifically relates to a method and device for constructing a linkage scenario. Background Art
[0002] With the development of the Internet of Things industry, intelligent Internet of Things devices have gradually penetrated into people's daily lives. Compared with controlling a single Internet of Things device, the linkage of multiple Internet of Things devices can generate more powerful, intelligent, and advanced functions to meet diverse user needs.
[0003] In the related art, in order to construct a linkage scenario for multiple Internet of Things devices, a user can define the linkage rules between multiple Internet of Things devices through a visual manual configuration method, deploy the linkage rules to the cloud or the edge side, and then detect the data of each Internet of Things device through the Internet of Things to determine whether conditions such as the execution time or the device state are met, so as to implement the linkage between multiple Internet of Things devices. In addition to imposing professional requirements on the user, the defined linkage rules are more based on the physical models of the Internet of Things devices. After adding new Internet of Things devices, it is necessary to reconstruct a new linkage scenario from scratch, which greatly increases the workload and reduces the construction efficiency of the linkage scenario. Summary of the Invention
[0004] In order to efficiently construct a linkage scenario, this application provides a method and device for constructing a linkage scenario. The technical solution is as follows:
[0005] In a first aspect, this application provides a method for constructing a linkage scenario, the method including:
[0006] In response to a user's linkage scenario construction instruction, perform speech recognition processing to obtain the to-be-processed speech text information;
[0007] Perform semantic analysis processing on the to-be-processed speech text information to obtain the target semantic information; the target semantic information indicates the user's personalized requirements for the linkage scenario;
[0008] According to the target semantic information, construct a logical link tree corresponding to the linkage scenario; the logical link tree indicates the execution path between the node events of each tree node in at least one tree node; the type of the node event is any one of a trigger event, a calculation event, or a control event;
[0009] According to the logical link tree, determine the node object of each tree node, and the type of the node object is any one of a local Internet of Things device, an external medium, or a logical object;
[0010] Based on the logical link tree and the node object of each tree node, a linkage scenario link tree is obtained for the linkage scenario, so that the node object executes the node event of the corresponding tree node based on the execution path; the linkage scenario link tree indicates the event linkage rules between the node objects of each tree node in the linkage scenario.
[0011] In an optional embodiment, the method further includes:
[0012] Obtain the user's attribute information;
[0013] The semantic analysis processing of the speech-text information to be processed to obtain target semantic information includes:
[0014] The target semantic information is obtained by performing semantic analysis on the speech text information to be processed and the attribute information.
[0015] In an optional embodiment, the method further includes:
[0016] Get newly added IoT devices locally;
[0017] Update the node object of each tree node according to the newly added IoT device;
[0018] Based on the updated node object of each tree node, the linked scene link tree is updated to obtain the target linked scene link tree.
[0019] In an optional embodiment, constructing the logical link tree corresponding to the linkage scenario based on the target semantic information includes:
[0020] Based on the target semantic information, generate a target trigger event set, a target computation event set, and a target control event set;
[0021] Perform logical analysis on at least one target triggering event in the target triggering event set to determine a first logical relationship between the at least one target triggering event;
[0022] Perform logical analysis on at least one target computation event in the target computation event set to determine a second logical relationship between the at least one target computation event;
[0023] Perform logical analysis on at least one target control event in the target control event set to determine a third logical relationship between the at least one target control event;
[0024] Based on the first logical relationship, the second logical relationship, the third logical relationship, and the preset basic execution order of events, construct the logical link tree corresponding to the linkage scenario.
[0025] In an optional embodiment, the method further includes:
[0026] Determine the first priority weight corresponding to each of the at least one target triggering events;
[0027] Determine the second priority weight corresponding to each of the at least one target computation events;
[0028] Determine the third priority weight corresponding to each of the at least one target control event;
[0029] Based on the first priority weight corresponding to each target triggering event, the first logical relationship is optimized to obtain the first target logical relationship;
[0030] Based on the second priority weight corresponding to each target event, the second logical relationship is optimized to obtain the second target logical relationship;
[0031] Based on the third priority weight corresponding to each target control event, the third logical relationship is optimized to obtain the third target logical relationship;
[0032] The step of constructing a logical link tree corresponding to the linkage scenario based on the first logical relationship, the second logical relationship, the third logical relationship, and the preset basic execution order of events includes:
[0033] Based on the first target logical relationship, the second target logical relationship, the third target logical relationship, and the preset basic execution order of events, construct the logical link tree corresponding to the linkage scenario.
[0034] In an optional embodiment, constructing the logical link tree corresponding to the linkage scenario based on the target semantic information includes:
[0035] Based on the target semantic information, at least one linkage event group is generated; each event linkage group in the at least one linkage event group includes at least one or more of the trigger event subset, calculation event subset, or control event subset;
[0036] Based on the at least one linked event group, at least one logical link branch is constructed accordingly;
[0037] Determine the fourth logical relationship between the at least one group of linked events;
[0038] The logical link tree is constructed based on the at least one logical link branch and the fourth logical relationship.
[0039] In an optional embodiment, constructing the logical link tree corresponding to the linkage scenario based on the target semantic information includes:
[0040] Based on the target semantic information, construct the initial logical link tree corresponding to the linkage scenario;
[0041] The initial logical link tree is decomposed to obtain at least one initial logical link branch;
[0042] Perform logical verification on each of the at least one initial logical link branches to obtain the verification result;
[0043] If the verification result indicates that there are no duplicate node events in each initial logical link branch and that each initial logical link branch is not a closed loop link, then the initial logical link tree is used as the logical link tree corresponding to the linkage scenario.
[0044] In an optional embodiment, determining the node object of each tree node based on the logical link tree includes:
[0045] Configure a corresponding node object for each tree node based on the type of node event of each tree node or the data type corresponding to the node event of each tree node.
[0046] In an optional embodiment, the method further includes:
[0047] The linkage scenario link tree for the linkage scenario will be synchronized to the cloud and the target node object corresponding to at least one target tree node; the at least one target tree node is a tree node in the logical link tree, and the type of the target node object is a local IoT device.
[0048] Secondly, this application provides a linkage scene construction device, the device comprising:
[0049] The speech recognition module is used to respond to the user's commands for constructing interactive scenarios, perform speech recognition processing, and obtain the speech text information to be processed.
[0050] The semantic analysis module is used to perform semantic analysis on the speech-text information to be processed to obtain target semantic information; the target semantic information indicates the user's personalized needs for the interactive scenario.
[0051] The logical link tree construction module is used to construct a logical link tree corresponding to the linkage scenario based on the target semantic information; the logical link tree indicates the execution path between node events of each tree node in at least one tree node; the type of the node event is any one of trigger event, calculation event or control event;
[0052] The node object determination module is used to determine the node object of each tree node according to the logical link tree, wherein the type of the node object is any one of local IoT device, external medium or logical object;
[0053] The linkage scenario link tree construction module is used to obtain a linkage scenario link tree for the linkage scenario based on the logical link tree and the node object of each tree node, so that the node object executes the node event of the corresponding tree node based on the execution path; the linkage scenario link tree indicates the event linkage rules between the node objects of each tree node in the linkage scenario.
[0054] Thirdly, this application provides a computer-readable storage medium storing at least one instruction or at least one program, wherein the at least one instruction or the at least one program is loaded and executed by a processor to implement a linkage scene construction method as described in the first aspect.
[0055] Fourthly, this application provides a computer device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement a linkage scene construction method as described in the first aspect.
[0056] Fifthly, this application provides a computer program product, which includes computer instructions that, when executed by a processor, implement a linkage scene construction method as described in the first aspect.
[0057] This application provides a method and apparatus for constructing a linked scene, which has the following technical effects:
[0058] The solution provided in this application offers a more convenient method for constructing interconnected scenarios—a voice-based construction method. It can respond to user commands for constructing interconnected scenarios by performing voice recognition processing to obtain the voice-text information to be processed; performing semantic analysis processing on the voice-text information to obtain target semantic information, which indicates the user's personalized needs for the interconnected scenario; and then constructing a logical link tree corresponding to the interconnected scenario based on the target semantic information. The logical link tree indicates the execution path between node events of each tree node in at least one tree node, where the node event type is any one of triggering events, calculation events, or control events. Based on the logical link tree, the node object of each tree node is determined, where the node object type is any one of local IoT devices, external media, or logical objects. Based on the logical link tree and the node objects of each tree node, a interconnected scenario link tree is obtained for the interconnected scenario, enabling the node objects to execute the corresponding tree node's node events based on the execution path. The interconnected scenario link tree indicates the event linkage rules between the node objects of each tree node in the interconnected scenario. The technical solution provided in this application first constructs a logical link tree for the linkage scenario based on the target semantic information, which is used to indicate the execution path of each event in the linkage scenario. On this basis, corresponding execution objects or data objects are configured for each event, so that the corresponding events are executed according to the execution path, thereby constructing a linkage scenario that meets the user's personalized needs. The logical link tree is not affected by the addition, deletion or modification of objects, and it is convenient to update objects and the linkage scenario link tree, thereby improving the efficiency of linkage scenario construction. In addition, the objects involved in the technical solution provided in this application are not limited to IoT devices, but also introduce external media and logical objects, which can enrich the forms of triggering events, calculating events and controlling events, and thus realize more diverse linkage scenarios.
[0059] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0060] To more clearly illustrate the technical solutions and advantages in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0061] Figure 1 This is a schematic diagram of the implementation environment of a linkage scene construction method provided in an embodiment of this application;
[0062] Figure 2 This is a flowchart illustrating a method for constructing a linked scene according to an embodiment of this application;
[0063] Figure 3 This is a schematic diagram of a process for constructing a logical link tree provided in an embodiment of this application;
[0064] Figure 4 This is a schematic diagram illustrating a first logical relationship, a second logical relationship, and a third logical relationship provided in an embodiment of this application;
[0065] Figure 5 This is a schematic diagram of another process for constructing a logical link tree provided in an embodiment of this application;
[0066] Figure 6 This is a schematic diagram of a logical link branch constructed by two linked event groups provided in an embodiment of this application;
[0067] Figures 7(1) to 7(3) This is a schematic diagram of various event execution paths and linkage rules provided in the embodiment itself;
[0068] Figure 8 This is a schematic diagram of a logic verification process provided in an embodiment of this application;
[0069] Figure 9 This is a schematic diagram of a linkage scene construction device provided in an embodiment of this application;
[0070] Figure 10 This is a schematic diagram of the hardware structure of a device for implementing a method for constructing a linked scene, provided in an embodiment of this application. Detailed Implementation
[0071] This application provides a method and apparatus for constructing a linked scene. The technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout.
[0072] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0073] It is understood that in the specific implementation of this application, data such as user attribute information is involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0074] Please see Figure 1 This is a schematic diagram of the implementation environment for a linkage scene construction method provided in this application embodiment, such as... Figure 1 As shown, the implementation environment may include client 01, IoT management device 02, server 03, and local IoT devices 03 to 09.
[0075] Specifically, the client 01 may include devices such as smartphones, desktop computers, tablets, laptops, in-vehicle terminals, digital assistants, smart wearable devices, and voice interaction devices. It may also include software running on the device, such as web pages provided to users by service providers, or applications provided by those service providers. Specifically, the client 01 can be used for users to input voice-formatted commands for constructing interactive scenarios. The client 01 can also be used to perform speech recognition and semantic analysis processing on the commands for constructing interactive scenarios to obtain target semantic information instructing users on their personalized needs for interactive scenarios. The client 01 can send the target semantic information to the IoT management device 02 via a communication network, so that the IoT management device 02 can construct a logical link tree corresponding to the linkage scenario based on the target semantic information, and determine the node object of each tree node in the logical link tree. The node object can be any one or more of the local IoT devices 03 to 09, or it can be logical objects such as external media such as temperature and humidity or cloud device images. Then, based on the logical link tree and the node object of each tree node, a linkage scenario link tree for the linkage scenario is configured, so that the node object executes the node event of the corresponding tree node based on the execution path indicated by the logical link tree.
[0076] Specifically, the server 02 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The server 02 may include a network communication unit, a processor, and a memory, etc. The terminal and the server can be connected directly or indirectly through wired or wireless communication, which is not limited herein. Specifically, the server 02 can be used to receive the linkage scene link tree constructed by the IoT management device 02 and store it in the cloud.
[0077] In another specific embodiment provided in this application, the client 01 can construct the logical link tree and the linkage scene link tree, configure the local IoT devices involved, and synchronize the constructed linkage scene link tree corresponding to the linkage scene to the cloud. The above are examples of the implementation environment in this application embodiment and are not intended to limit the scope of the application.
[0078] This application embodiment can also be implemented using cloud technology. Cloud technology refers to a hosting technology that unifies hardware, software, and network resources within a wide area network (WAN) or local area network (LAN) to achieve data computation, storage, processing, and sharing. It can also be understood as a general term for network technologies, information technologies, integration technologies, management platform technologies, and application technologies based on cloud computing business models. Cloud technology requires cloud computing as its support. Cloud computing is a computing model that distributes computing tasks across a resource pool composed of a large number of computers, enabling various application systems to obtain computing power, storage space, and information services as needed. The network providing these resources is called the "cloud." Specifically, the server 02 and the database are located in the cloud. The server 02 can be a physical machine or a virtualized machine.
[0079] The following describes a method for constructing a linked scene provided in this application. Figure 2 This is a flowchart illustrating a method for constructing a linked scene according to an embodiment of this application. This application provides the operational steps described in the embodiments or flowchart, but based on conventional or non-inventive methods, more or fewer operational steps may be included. The order of steps listed in the embodiments is merely one possible execution order among many and does not represent the only possible execution order. In actual system or server product execution, the methods can be executed sequentially according to the embodiments or accompanying drawings, or in parallel (e.g., in a parallel processor or multi-threaded processing environment). Please refer to... Figure 2 The linkage scene construction method provided in this application embodiment may include the following steps:
[0080] S210: Responding to the user's command to construct a linked scene, it performs speech recognition processing to obtain the speech-text information to be processed.
[0081] In this embodiment, users can initiate the construction of a linked scene via voice, reducing the requirements for users' professional knowledge and operational skills. The linked scene construction command is a voice signal instructing the construction of the linked scene.
[0082] In one specific embodiment, the collected linkage scene construction instructions are filtered to extract high-purity human voice signals as much as possible; the filtered human voice signals are frame-by-frame to identify morphemes, and then the identified morphemes are combined into words and sentences to obtain the voice text information to be processed.
[0083] In one specific embodiment, the user can also manually enter text that can instruct the construction of a linked scene as text information to be processed for semantic analysis.
[0084] S220: Perform semantic analysis on the speech and text information to be processed to obtain the target semantic information.
[0085] In this application embodiment, the target semantic information indicates the user's personalized needs for the linkage scenario, including but not limited to the time, location, people, IoT devices, etc. corresponding to the linkage scenario, the scenario theme, scenario content, and scenario function of the linkage scenario.
[0086] In one specific embodiment, the target semantic information is obtained by performing semantic analysis on the speech text information to be processed, such as text segmentation, topic classification, and entity recognition.
[0087] In one specific embodiment, the above method further includes:
[0088] Obtain user attribute information. This attribute information may include, but is not limited to, user lifestyle data, body shape data, health status data, and dietary preference data.
[0089] Step S220 can be specifically implemented as follows:
[0090] Semantic analysis is performed on the speech text information and attribute information to be processed to obtain the target semantic information.
[0091] In other words, during the semantic analysis process, in addition to the voice and text information currently indicated by the user, the user's attribute information can also be combined to improve the fit between the target semantic information and the user's needs, thereby meeting the user's personalized needs.
[0092] S230: Construct a logical link tree corresponding to the linkage scenario based on the target semantic information.
[0093] In this embodiment of the application, the logical link tree includes at least one tree node and the connection relationship between at least one tree node. Each tree node in the at least one tree node corresponds to a node event. The type of the node event is any one of trigger event, calculation event or control event. The logical link tree can indicate the execution path between the node events of each tree node in the at least one tree node.
[0094] In this embodiment, a trigger event is used to perform trigger judgments on computational events or control events related to the execution path. The trigger event is the entry point of the execution path and can determine whether to trigger related computational or control events by sensing IoT data. IoT data may include, but is not limited to, device status data, time data, and external environment data. A computational event is used to perform conditional judgments on control events or trigger events related to the execution path. The computational event is a decision-making checkpoint in the execution path and can integrate various IoT data and perform calculations and judgments on execution conditions such as preset data indicators or the feasibility of linkage events based on the integrated data. A control event is the target action of the execution path. It controls the state of a specified device or enables information interaction or feedback between people, devices, the environment, and the cloud by executing a set action, and sends the event execution result to the next node in the logical link tree.
[0095] In one specific embodiment, the node events of each tree node can be described in the form of event functions or event processes.
[0096] In a specific embodiment, at least one node event is determined based on the target semantic information, and an execution path between at least one node event is constructed based on the dependency relationship between at least one node event. The node events correspond one-to-one with the tree nodes, and the execution path between at least one node event corresponds to the connection relationship between at least one tree node.
[0097] In a specific embodiment, such as Figure 3 As shown, step S230 can be implemented as follows:
[0098] S310: Generate a set of target trigger events, a set of target computation events, and a set of target control events based on the target semantic information.
[0099] That is, based on the target semantic information, the identified at least one node event can be divided according to the event type to obtain a target trigger event set containing at least one target trigger event, a target computation event set containing at least one target computation event, and a target control event set containing at least one target control event.
[0100] S320: Perform logical analysis on at least one target triggering event in the target triggering event set to determine the first logical relationship between at least one target triggering event.
[0101] S330: Perform logical analysis on at least one target computation event in the target computation event set to determine a second logical relationship between at least one target computation event.
[0102] S340: Perform logical analysis and processing on at least one target control event in the target control event set to determine the third logical relationship between at least one target control event.
[0103] In steps S320-S340, logical analysis is performed on the dependencies between at least one target triggering event to obtain a first logical relationship; logical analysis is performed on the dependencies between at least one target calculation event to obtain a second logical relationship; and logical analysis is performed on the dependencies between at least one target control event to obtain a third logical relationship. For example, logical relationships may include, but are not limited to, equal to, less than, greater than, less than or equal to, greater than or equal to, not equal to, increase to, decrease to, jump to, no longer equal to, etc., and can be described by logical expressions, such as E1||E2, E3&&E4, etc.
[0104] S350: Construct a logical link tree corresponding to the linkage scenario based on the first logical relationship, the second logical relationship, the third logical relationship and the preset basic execution order of events.
[0105] In a specific embodiment, the preset basic execution order of events can be the event order of TCA, where T represents the triggering event, C represents the calculation event, and A represents the control event. Based on the first logical relationship corresponding to the target triggering event set, the second logical relationship corresponding to the target calculation event set, the third logical relationship corresponding to the target control event set, and the preset basic execution order of events, the execution path between at least one target triggering event, at least one target calculation event, and at least one target control event can be determined.
[0106] Figure 4 This is a schematic diagram illustrating a first logical relationship, a second logical relationship, and a third logical relationship provided in an embodiment of this application, as shown below. Figure 4 As shown, the first, second, and third logical relations form a unidirectional graph in terms of data structure. Figure 4 The arrows indicate the preset basic execution order of events. The target trigger event set includes T1, T2, and T3; the target calculation event set includes C1, C2, C3, and C4; and the target control event set includes A1, A2, to An. The first, second, and third logical relationships can be defined as follows: Figure 4 As shown in the figure, A1, A2 to An are control events that can be executed in parallel. A1, A2 to An are independent of each other, and the failure of any one control event does not affect the execution of other control events.
[0107] Optionally, the above method may further include:
[0108] S351: Determine the first priority weight for each target triggering event in at least one target triggering event.
[0109] S352: Determine the second priority weight for each target computation event in at least one target computation event.
[0110] S353: Determine the third priority weight for each target control event in at least one target control event.
[0111] Feasibly, the priority weight of each event can be determined based on the frequency of event occurrence, the amount of data required for the event, etc. For example, the lower the frequency of event occurrence and the less data required, the higher the priority, thereby reducing the amount of data to be sensed and calculated for execution interruption or identification situations and improving processing efficiency.
[0112] S354: Optimize the first logical relationship based on the first priority weight corresponding to each target triggering event to obtain the first target logical relationship.
[0113] S355: Calculate the second priority weight corresponding to each target event, optimize the second logical relationship, and obtain the second target logical relationship.
[0114] S356: Optimize the third logical relationship based on the third priority weight corresponding to each target control event to obtain the third target logical relationship.
[0115] Feasibly, compared to the first logical relation, the first target logical relation can place the target triggering events with higher priority weights first in its expression, so that the program will execute the target triggering events with higher priority weights first. The second target logical relation can be obtained in the same way as the third target logical relation.
[0116] S357: Based on the logical relationships of the first target, the second target, the third target, and the preset basic execution order of events, construct the logical link tree corresponding to the linkage scenario.
[0117] Step S357 can be referred to the foregoing embodiments, and will not be repeated here.
[0118] In a specific embodiment, such as Figure 5 As shown, step S230 can also be implemented as follows:
[0119] S410: Generate at least one group of linked events based on the target semantic information.
[0120] In one specific embodiment, each event linkage group in at least one linkage event group includes at least one or more of the trigger event subset, the calculation event subset, or the control event subset.
[0121] In one specific embodiment, based on the dependencies between at least one node event, the at least one node event can be divided into at least one linked event group. Each linked event group includes at least one or more of a subset of triggering events, a subset of computational events, or a subset of control events; that is, each linked event group can include at least one triggering event, one computational event, or one control event. The node events contained in the linked event group constitute a certain logical relationship.
[0122] S420: Based on at least one linked event group, construct at least one logical link branch.
[0123] Based on the type of node events and their logical relationships in each of at least one linked event group, a logical link branch is constructed for each linked event group. The logical link branch can indicate the execution path and linkage rules between node events in the corresponding linked event group.
[0124] S430: Determine the fourth logical relationship between at least one group of linked events.
[0125] It is feasible to construct a fourth logical relationship between at least one linked event by performing pairwise logical analysis on each linked event group in at least one linked event group.
[0126] S440: Construct a logical link tree based on at least one logical link branch and a fourth logical relation.
[0127] Based on at least one logical link branch and a fourth logical relationship, the execution path and linkage rules between each logical link branch in at least one logical link branch are determined. For example, after a set of linked trigger events, calculation events and control events, another set of trigger events is entered, or after a set of linked calculation events, the control events of that set and the trigger events of another set are executed, thereby increasing the complexity of the linkage scenario and meeting more diverse linkage needs.
[0128] Figure 6 This is a schematic diagram of a logical link branch constructed by two linked event groups provided in an embodiment of this application. One linked event group includes a trigger event T1, a calculation event C1, and a control event A1. The other linked event group includes a trigger event T2, a calculation event C2, and a trigger event T3. At the same time as the execution result of the calculation event C1 indicates that the control event A1 can be executed, the trigger event T2 is executed.
[0129] Figures 7(1) to 7(3) This is a schematic diagram of various event execution paths and linkage rules provided in the embodiment. In this diagram, handleTouch() represents the execution program that triggers the event, handleCondition() represents the execution program that calculates the event, handleCmd() represents the execution program that controls the event, waitTouchCallback() represents the callback program that triggers the event, and waitCmdCallback() represents the callback program that controls the event.
[0130] In a specific embodiment, such as Figure 8 As shown, the above method may further include:
[0131] S510: Based on the target semantic information, construct the initial logical link tree corresponding to the linkage scenario.
[0132] The construction of the initial logical link tree can be referred to the aforementioned embodiments, and will not be repeated here.
[0133] S520: Decompose the initial logical link tree to obtain at least one initial logical link branch.
[0134] Feasibly, the initial logical link tree can be indexed by traversing the tree nodes to decompose the initial logical link tree into at least one initial logical link branch, each of which is a unidirectional graph.
[0135] S530: Perform logical verification on each of the at least one initial logical link branches to obtain the verification result.
[0136] Optionally, the repetition of node events in the tree nodes contained in each initial logical link branch can be checked, as well as the closure of the execution path indicated by each initial logical link branch can be checked.
[0137] S540: If the verification result indicates that there are no duplicate node events in each initial logical link branch and each initial logical link branch is not a closed loop link, the initial logical link tree shall be used as the logical link tree corresponding to the linkage scenario.
[0138] Based on the aforementioned embodiments, if the first detection result obtained by performing a repeatability test on the node events of the tree nodes contained in each initial logical link branch indicates that there are no duplicate node events in each initial logical link branch, and the second detection result obtained by performing a test on the closure of the execution path indicated by each initial logical link branch indicates that each initial logical link branch is not a closed loop link, that is, if the verification of the initial logical link tree passes, the initial logical link tree can be used as the logical link tree corresponding to the linkage scenario; otherwise, the initial logical link tree needs to be reconstructed.
[0139] In addition, mutual exclusion checks can be performed on the node events of the tree nodes contained in each initial logical link branch. If the third detection result indicates that the node events of the tree nodes contained in each initial logical link branch are not mutually exclusive, the check passes.
[0140] S240: Determine the node object for each tree node based on the logical link tree.
[0141] In this embodiment, the node object can be any of the following: a local IoT device, an external medium, or a logical object. The external medium can be weather, temperature, humidity, PM2.5, etc., while the logical object can be a virtual process or a device shadow in the cloud.
[0142] In one specific embodiment, a corresponding node object is configured for each tree node based on the type of node event of each tree node, the data type corresponding to the node event of each tree node, and / or the function that the node event of each tree node needs to implement.
[0143] S250: Based on the logical link tree and the node object of each tree node, obtain the linkage scene link tree for the linkage scene, so that the node object executes the node event of the corresponding tree node based on the execution path.
[0144] In this embodiment of the application, the linkage scene link tree indicates the event linkage rules between node objects of each tree node in the linkage scene.
[0145] In one specific embodiment, based on the node object of each configured tree node, the execution program of the node event of each tree node in the logical link tree is instantiated to obtain the linkage scene link tree for the linkage scene.
[0146] In one specific embodiment, the above method may further include:
[0147] S261: Obtain newly added IoT devices locally.
[0148] S262: Update the node object of each tree node in the logical link tree based on the newly added IoT device.
[0149] S263: Update the linked scene link tree based on the updated node object of each tree node to obtain the target linked scene link tree.
[0150] In the above embodiments, when a new IoT device is added locally, it is not necessary to rebuild the linkage scenario link tree from scratch. Instead, the node objects are updated based on the logical link tree, which reduces the workload required for updates and improves processing efficiency.
[0151] In one specific embodiment, the above method may further include:
[0152] The linkage scenario link tree for the linkage scenario will be synchronized to the cloud and the target node object corresponding to at least one target tree node; at least one target tree node is a tree node in the logical link tree, and the type of the target node object is a local IoT device.
[0153] As can be seen from the above embodiments, the linkage scene construction method provided by this application offers a more convenient way to construct linkage scenes—a voice construction method. It can respond to the user's linkage scene construction command, perform voice recognition processing to obtain the voice-text information to be processed; perform semantic analysis processing on the voice-text information to obtain target semantic information, which indicates the user's personalized needs for the linkage scene; then, based on the target semantic information, construct a logical link tree corresponding to the linkage scene. The logical link tree indicates the execution path between node events of each tree node in at least one tree node, where the node event type is any one of trigger event, calculation event, or control event; based on the logical link tree, determine the node object of each tree node, where the node object type is any one of local IoT device, external medium, or logical object; based on the logical link tree and the node object of each tree node, obtain a linkage scene link tree for the linkage scene, so that the node object executes the corresponding tree node's node event based on the execution path. The linkage scene link tree indicates the event linkage rules between the node objects of each tree node in the linkage scene. The technical solution provided in this application first constructs a logical link tree for the linkage scenario based on the target semantic information, which is used to indicate the execution path of each event in the linkage scenario. On this basis, corresponding execution objects or data objects are configured for each event, so that the corresponding events are executed according to the execution path, thereby constructing a linkage scenario that meets the user's personalized needs. The logical link tree is not affected by the addition, deletion or modification of objects, and it is convenient to update objects and the linkage scenario link tree, thereby improving the efficiency of linkage scenario construction. In addition, the objects involved in the technical solution provided in this application are not limited to IoT devices, but also introduce external media and logical objects, which can enrich the forms of triggering events, calculating events and controlling events, and thus realize more diverse linkage scenarios.
[0154] This application also provides a joint scene construction device 900, such as... Figure 9 As shown, the device 900 may include:
[0155] The speech recognition module 910 is used to respond to the user's command to construct a linked scene, perform speech recognition processing, and obtain the speech text information to be processed.
[0156] The semantic analysis module 920 is used to perform semantic analysis on the speech-text information to be processed to obtain target semantic information; the target semantic information indicates the user's personalized needs for the interactive scenario;
[0157] The logical link tree construction module 930 is used to construct a logical link tree corresponding to the linkage scenario based on the target semantic information; the logical link tree indicates the execution path between node events of each tree node in at least one tree node; the type of the node event is any one of trigger event, calculation event or control event;
[0158] The node object determination module 940 is used to determine the node object of each tree node according to the logical link tree, wherein the type of the node object is any one of local IoT device, external medium or logical object;
[0159] The linkage scenario link tree construction module 950 is used to obtain a linkage scenario link tree for the linkage scenario based on the logical link tree and the node object of each tree node, so that the node object executes the node event of the corresponding tree node based on the execution path; the linkage scenario link tree indicates the event linkage rules between the node objects of each tree node in the linkage scenario.
[0160] In one embodiment of this application, the device 900 may further include:
[0161] An attribute information acquisition unit is used to acquire the user's attribute information;
[0162] The semantic analysis module 920 may include:
[0163] The semantic analysis unit is used to perform semantic analysis on the speech text information to be processed and the attribute information to obtain the target semantic information.
[0164] In one embodiment of this application, the device 900 may further include:
[0165] A new device acquisition unit has been added to acquire newly added IoT devices locally.
[0166] The node object update unit is used to update the node object of each tree node according to the newly added IoT device;
[0167] The linkage scene link tree update unit is used to update the linkage scene link tree according to the node object of each tree node after the update, so as to obtain the target linkage scene link tree.
[0168] In one embodiment of this application, the logical link tree construction module 930 may include:
[0169] The event set generation unit is used to generate a target trigger event set, a target computation event set, and a target control event set based on the target semantic information.
[0170] The first logic analysis unit is used to perform logic analysis on at least one target triggering event in the target triggering event set to determine a first logical relationship between the at least one target triggering event.
[0171] The second logic analysis unit is used to perform logic analysis processing on at least one target computing event in the target computing event set to determine a second logical relationship between the at least one target computing event.
[0172] The third logic analysis unit is used to perform logic analysis on at least one target control event in the target control event set to determine the third logic relationship between the at least one target control event.
[0173] The first logical link tree construction unit is used to construct the logical link tree corresponding to the linkage scenario based on the first logical relationship, the second logical relationship, the third logical relationship and the preset basic execution order of events.
[0174] In one embodiment of this application, the device 900 may further include:
[0175] The first priority weight determination unit is used to determine the first priority weight corresponding to each target triggering event in the at least one target triggering event;
[0176] The second priority weight determination unit is used to determine the second priority weight corresponding to each target computing event in the at least one target computing event;
[0177] The third priority weight determination unit is used to determine the third priority weight corresponding to each target control event in the at least one target control event;
[0178] The first logical relationship optimization unit is used to optimize the first logical relationship according to the first priority weight corresponding to each target triggering event to obtain the first target logical relationship;
[0179] The second logical relationship optimization unit is used to optimize the second logical relationship based on the second priority weight corresponding to each target event to obtain the second target logical relationship;
[0180] The third logical relationship optimization unit is used to optimize the third logical relationship according to the third priority weight corresponding to each target control event to obtain the third target logical relationship;
[0181] The first building unit of the logical link tree may include:
[0182] The first construction subunit of the logical link tree is used to construct the logical link tree corresponding to the linkage scenario based on the first target logical relationship, the second target logical relationship, the third target logical relationship and the preset basic execution order of events.
[0183] In one embodiment of this application, the logical link tree construction module 930 may include:
[0184] An event grouping unit is used to generate at least one linked event group based on the target semantic information; each of the at least one linked event group includes at least one or more of a trigger event subset, a calculation event subset, or a control event subset.
[0185] A logical link branch construction unit is used to construct at least one logical link branch according to the at least one linked event group;
[0186] The fourth logic analysis unit is used to determine the fourth logical relationship between the at least one group of linked events;
[0187] The second logical link tree construction unit is used to construct the logical link tree based on the at least one logical link branch and the fourth logical relationship.
[0188] In one embodiment of this application, the logical link tree construction module 930 may include:
[0189] The third logical link tree construction unit is used to construct the initial logical link tree corresponding to the linkage scenario based on the target semantic information.
[0190] A decomposition unit is used to decompose the initial logical link tree to obtain at least one initial logical link branch.
[0191] A logic verification unit is used to perform logic verification on each of the at least one initial logic link branch to obtain a verification result.
[0192] The fourth logical link tree construction unit is used to use the initial logical link tree as the logical link tree corresponding to the linkage scenario when the verification result indicates that there are no duplicate node events in each initial logical link branch and each initial logical link branch is not a closed loop link.
[0193] In one embodiment of this application, the node object determination module 940 may include:
[0194] The node object determination unit is used to configure a corresponding node object for each tree node according to the type of node event of each tree node or the data type corresponding to the node event of each tree node.
[0195] In one embodiment of this application, the device 900 may further include:
[0196] The synchronization module is used to synchronize the linkage scenario link tree for the linkage scenario to the cloud and the target node object corresponding to at least one target tree node; the at least one target tree node is a tree node in the logical link tree, and the type of the target node object is a local IoT device.
[0197] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0198] It should be noted that the apparatus provided in the above embodiments is only illustrated by the division of the above functional modules when implementing its functions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0199] This application provides a computer device including a processor and a memory. The memory stores at least one instruction or at least one program. The at least one instruction or at least one program is loaded and executed by the processor to implement a linkage scene construction method as provided in the above method embodiments.
[0200] Figure 10A schematic diagram of the hardware structure of a device for implementing a linked scene construction method provided in the embodiments of this application is shown. The device may participate in or include the apparatus or system provided in the embodiments of this application. Figure 10 As shown, device 10 may include one or more processors 1002 (shown as 1002a, 1002b, ..., 1002n in the figure) 1002 (processor 1002 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 1004 for storing data, and a transmission device 1006 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 10 The structure shown is for illustrative purposes only and does not limit the structure of the electronic device described above. For example, device 10 may also include a... Figure 10 The more or fewer components shown, or having the same Figure 10 The different configurations shown.
[0201] It should be noted that the aforementioned one or more processors 1002 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be wholly or partially integrated into any other element within device 10 (or mobile device). As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).
[0202] The memory 1004 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the method described in the embodiments of this application. The processor 1002 executes various functional applications and data processing by running the software programs and modules stored in the memory 1004, thereby realizing the above-mentioned linkage scene construction method. The memory 1004 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 instances, the memory 1004 may further include memory remotely located relative to the processor 1002, and these remote memories can be connected to the device 10 via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0203] The transmission device 1006 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of device 10. In one example, the transmission device 1006 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 1006 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0204] The display may be, for example, a touchscreen liquid crystal display (LCD) that allows a user to interact with the user interface of device 10 (or a mobile device).
[0205] This application embodiment also provides a computer-readable storage medium, which can be disposed in a server to store at least one instruction or at least one program related to implementing a linkage scene construction method in the method embodiment. The at least one instruction or at least one program is loaded and executed by the processor to implement the linkage scene construction method provided in the above method embodiment.
[0206] Optionally, in this embodiment, the storage medium may be located at at least one of the multiple network servers in a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0207] This invention also provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform a linkage scene construction method provided in the various optional embodiments described above.
[0208] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, the above description focuses on specific embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a different order than that shown in the embodiments and still achieve the desired results. Additionally, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired results. In some implementations, multitasking and parallel processing are also possible or may be advantageous.
[0209] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device, equipment, and storage medium embodiments are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0210] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0211] The above description is only a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for constructing a linked scene, characterized in that, The method includes: In response to the user's command to construct a collaborative scenario, speech recognition processing is performed to obtain the speech-text information to be processed. The speech and text information to be processed is subjected to semantic analysis to obtain target semantic information; the target semantic information indicates the user's personalized needs for the interactive scenario; Based on the target semantic information, a logical link tree corresponding to the linkage scenario is constructed; the logical link tree indicates the execution path between node events of each tree node in at least one tree node; the type of the node event is any one of trigger event, calculation event, or control event; Based on the logical link tree, determine the node object of each tree node, wherein the type of the node object is any one of local IoT device, external medium or logical object; Based on the logical link tree and the node object of each tree node, a linkage scenario link tree is obtained for the linkage scenario, so that the node object executes the node event of the corresponding tree node based on the execution path; the linkage scenario link tree indicates the event linkage rules between the node objects of each tree node in the linkage scenario.
2. The method according to claim 1, characterized in that, The method further includes: Obtain the user's attribute information; The semantic analysis processing of the speech-text information to be processed to obtain target semantic information includes: The target semantic information is obtained by performing semantic analysis on the speech text information to be processed and the attribute information.
3. The method according to claim 1, characterized in that, The method further includes: Get newly added IoT devices locally; Update the node object of each tree node according to the newly added IoT device; Based on the updated node object of each tree node, the linked scene link tree is updated to obtain the target linked scene link tree.
4. The method according to claim 1, characterized in that, The step of constructing the logical link tree corresponding to the linkage scenario based on the target semantic information includes: Based on the target semantic information, generate a target trigger event set, a target computation event set, and a target control event set; Perform logical analysis on at least one target triggering event in the target triggering event set to determine a first logical relationship between the at least one target triggering event; Perform logical analysis on at least one target computation event in the target computation event set to determine a second logical relationship between the at least one target computation event; Perform logical analysis on at least one target control event in the target control event set to determine a third logical relationship between the at least one target control event; Based on the first logical relationship, the second logical relationship, the third logical relationship, and the preset basic execution order of events, construct the logical link tree corresponding to the linkage scenario.
5. The method according to claim 4, characterized in that, The method further includes: Determine the first priority weight corresponding to each of the at least one target triggering events; Determine the second priority weight corresponding to each of the at least one target computation events; Determine the third priority weight corresponding to each of the at least one target control event; Based on the first priority weight corresponding to each target triggering event, the first logical relationship is optimized to obtain the first target logical relationship; Based on the second priority weight corresponding to each target event, the second logical relationship is optimized to obtain the second target logical relationship; Based on the third priority weight corresponding to each target control event, the third logical relationship is optimized to obtain the third target logical relationship; The step of constructing a logical link tree corresponding to the linkage scenario based on the first logical relationship, the second logical relationship, the third logical relationship, and the preset basic execution order of events includes: Based on the first target logical relationship, the second target logical relationship, the third target logical relationship, and the preset basic execution order of events, construct the logical link tree corresponding to the linkage scenario.
6. The method according to claim 1, characterized in that, The step of constructing the logical link tree corresponding to the linkage scenario based on the target semantic information includes: Based on the target semantic information, at least one linkage event group is generated; each event linkage group in the at least one linkage event group includes at least one or more of the trigger event subset, calculation event subset, or control event subset; Based on the at least one linked event group, at least one logical link branch is constructed accordingly; Determine the fourth logical relationship between the at least one group of linked events; The logical link tree is constructed based on the at least one logical link branch and the fourth logical relationship.
7. The method according to claim 1, characterized in that, The step of constructing the logical link tree corresponding to the linkage scenario based on the target semantic information includes: Based on the target semantic information, construct the initial logical link tree corresponding to the linkage scenario; The initial logical link tree is decomposed to obtain at least one initial logical link branch; Perform logical verification on each of the at least one initial logical link branches to obtain the verification result; If the verification result indicates that there are no duplicate node events in each initial logical link branch and that each initial logical link branch is not a closed loop link, then the initial logical link tree is taken as the logical link tree corresponding to the linkage scenario.
8. The method according to claim 1, characterized in that, The step of determining the node object of each tree node based on the logical link tree includes: Configure a corresponding node object for each tree node based on the type of node event of each tree node or the data type corresponding to the node event of each tree node.
9. The method according to claim 1, characterized in that, The method further includes: The linkage scenario link tree for the linkage scenario will be synchronized to the cloud and the target node object corresponding to at least one target tree node; the at least one target tree node is a tree node in the logical link tree, and the type of the target node object is a local IoT device.
10. A linkage scene construction device, characterized in that, The device includes: The speech recognition module is used to respond to the user's commands for constructing interactive scenarios, perform speech recognition processing, and obtain the speech text information to be processed. The semantic analysis module is used to perform semantic analysis on the speech-text information to be processed to obtain target semantic information; the target semantic information indicates the user's personalized needs for the interactive scenario. The logical link tree construction module is used to construct a logical link tree corresponding to the linkage scenario based on the target semantic information; the logical link tree indicates the execution path between node events of each tree node in at least one tree node; the type of the node event is any one of trigger event, calculation event or control event; The node object determination module is used to determine the node object of each tree node according to the logical link tree, wherein the type of the node object is any one of local IoT device, external medium or logical object; The linkage scenario link tree construction module is used to obtain a linkage scenario link tree for the linkage scenario based on the logical link tree and the node object of each tree node, so that the node object executes the node event of the corresponding tree node based on the execution path; the linkage scenario link tree indicates the event linkage rules between the node objects of each tree node in the linkage scenario.
Citation Information
Patent Citations
Scene creation method and device, storage medium and electronic equipment
CN115695065A
Scene linkage method and system of equipment, electronic equipment and storage medium
CN116364074A