Device linkage method, apparatus, device, storage medium and program product

By obtaining and analyzing the event processing instructions sent by the first target device, determining and sending them to the second target device according to preset rules, the problem of cross-network collaboration between devices is solved and wide interoperability between devices is achieved.

CN119758748APending Publication Date: 2025-04-04XIONGAN SCIENCE & TECHNOLOGY IND PARK DEVELOPMENT MANAGEMENT CO LTD +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411922642.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

The prior art cannot realize cross-network collaborative work between devices, limiting device interoperability in different locations and network environments.

Method used

By obtaining the event processing instructions sent by the first target device, the second target device is determined according to the preset event matching rules, and the instruction is sent to the device to make it execute the corresponding event.

Benefits of technology

It realizes cross-network linkage between devices, expands the application scenario of device linkage, and enables interoperability of devices in different locations and network environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119758748A_ABST
    Figure CN119758748A_ABST
Patent Text Reader

Abstract

The present invention relates to the field of communication technology, and discloses a method, apparatus, device, storage medium and program product for device linkage. The method comprises: obtaining an event processing instruction sent by a first target device; wherein the first target device is a device in a first local area network; determining at least one second target device and a first target event processing instruction corresponding to the second target device according to the event processing instruction and a preset event matching rule; wherein the second target device is a device in a second local area network, and the first target event processing instruction indicates a first target event that the second target device needs to execute; sending the first target event processing instruction to the second target device corresponding to the first target event processing instruction, so that the second target device executes the first target event according to the first target event processing instruction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a method, an apparatus, a computer device, a storage medium and a program product for device linkage. Background Art

[0002] With the rapid development of the Internet of Things (IoT) and smart homes, the interconnection between devices has become an important trend in technological development. At present, in the same local area network, devices are linked through command transmission. Devices achieve interconnection through registration, discovery, data transmission and control.

[0003] However, the linkage between devices can only be carried out within the local area network and cannot be carried out across the network, which limits the interoperability of devices in different locations and different network environments. Summary of the invention

[0004] In view of this, the present invention provides a method, apparatus, device, storage medium and program product for device linkage.

[0005] In a first aspect, the present invention provides a method for device linkage, the method comprising: obtaining an event processing instruction sent by a first target device; wherein the first target device is a device in a first local area network; determining at least one second target device and a first target event processing instruction corresponding to the second target device according to the event processing instruction and a preset event matching rule; wherein the second target device is a device in a second local area network, and the first target event processing instruction indicates a first target event that the second target device needs to execute; sending the first target event processing instruction to the second target device corresponding to the first target event processing instruction, so that the second target device executes the first target event according to the first target event processing instruction.

[0006] The device linkage method provided in this embodiment receives an event processing instruction from a first target device in a first local area network. The event processing instruction is the starting point of the linkage process between devices. It contains information about the action or event that needs to be executed. According to the preset event matching rules, the event processing instruction sent by the first target device is analyzed, and at least one second target device located in the second local area network is determined. The first target event processing instruction is sent to the corresponding second target device. Although the first target device and the second target device are located in different local area networks, they can also perform corresponding actions or events according to the received instructions, so that the linkage between devices is no longer limited to the same local area network, but can work collaboratively across different networks. This greatly expands the application scenarios of device linkage, allowing devices in different locations and different network environments to achieve interoperability.

[0007] In a possible implementation, the method further includes: determining, according to the event processing instruction and a preset event arrangement rule, at least one third target device and a second target event processing instruction corresponding to the third target device; wherein the third target device is a device of the first local area network, and the second target event processing instruction indicates a second target event that needs to be executed by the third target device; controlling the first target device to send the second target event processing instruction to the third target device corresponding to the second target event processing instruction, so that the third target device executes the second target event according to the second target event processing instruction.

[0008] The device linkage method provided in this embodiment determines the third target device that needs to be linked with the first target device in the same local area network through event processing instructions and preset event scheduling rules, and then sends the second target event processing instruction to the third target device corresponding to the second target event processing instruction, so that the third target device executes the second target event according to the second target event processing instruction, thereby being able to achieve near-field communication while ensuring efficient collaborative work between devices in the same local area network through precise preset event scheduling rules.

[0009] In one possible implementation, at least one third target device is determined according to an event processing instruction and a preset event orchestration rule, including: determining an event processing type according to the event processing instruction; determining a target orchestration corresponding to the event processing type from preset event orchestration rules according to the event processing type; and determining at least one third target device according to the target orchestration.

[0010] The device linkage method provided in this embodiment determines the event processing type by parsing the event processing instruction, thereby improving the accurate classification and identification of events. Subsequently, the corresponding target arrangement is selected from the preset event arrangement rules according to the event processing type, ensuring the pertinence and efficiency of event processing, reducing unnecessary resource consumption through the precise matching mechanism, and improving the overall efficiency of the system.

[0011] In one possible implementation, according to the event processing type, a target orchestration corresponding to the event processing type is determined from a preset event orchestration rule, including: according to the event processing type, determining a target structural relationship between a first target device and at least one second target device; wherein the structural relationship includes: at least one of a tree structure, a star structure, and a string structure; according to the target structural relationship, determining a target orchestration that is consistent with the structural relationship from the preset event orchestration rule.

[0012] The device linkage method provided in this embodiment can clearly define the linkage mode and hierarchical relationship between devices by determining the target structural relationship between devices (such as tree structure, star structure, and string structure), so as to more accurately understand and execute event processing instructions, ensuring that the collaborative work between devices is more orderly and efficient.

[0013] At the same time, different structural relationships are suitable for different application scenarios and business needs. By selecting the most suitable structural relationship according to the event processing type, the flexibility and adaptability of event processing can be significantly improved.

[0014] In one possible implementation, the first target device, the second target device, and the third target device are all any one of HarmonyOS devices and non-HarmonyOS devices.

[0015] The device linkage method provided in this embodiment is compatible with different types of devices, and both Hongmeng devices and non-Hongmeng devices can participate in the linkage process. This greatly expands the scope of application of the system, allowing more types of devices to be interconnected and meet the needs of diverse application scenarios. At the same time, it solves the problem that Hongmeng devices cannot communicate in different local area networks.

[0016] In a second aspect, the present invention provides a device for device linkage, the device comprising: an acquisition module, used to acquire an event processing instruction sent by a first target device; wherein the first target device is a device in a first local area network; a first determination module, used to determine at least one second target device and a first target event processing instruction corresponding to the second target device according to the event processing instruction and a preset event matching rule; wherein the second target device is a device in a second local area network, and the first target event processing instruction indicates a first target event that the second target device needs to execute; a first execution module, used to send the first target event processing instruction to the second target device corresponding to the first target event processing instruction, so that the second target device executes the first target event according to the first target event processing instruction.

[0017] In one possible implementation, the above-mentioned device also includes: a second determination module, which is used to determine at least one third target device and a second target event processing instruction corresponding to the third target device according to the event processing instruction and a preset event arrangement rule; wherein the third target device is a device of the first local area network, and the second target event processing instruction indicates a second target event that needs to be executed by the third target device; and a second execution module, which is used to control the first target device to send the second target event processing instruction to the third target device corresponding to the second target event processing instruction, so that the third target device executes the second target event according to the second target event processing instruction.

[0018] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the method for device linkage of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0019] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for device linkage of the above-mentioned first aspect or any corresponding embodiment thereof.

[0020] In a fifth aspect, the present invention provides a computer program product, including computer instructions, which are used to enable a computer to execute the method for device linkage of the above-mentioned first aspect or any corresponding embodiment. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0022] Figure 1 is a schematic diagram of a system for device linkage according to an embodiment of the present invention;

[0023] Figure 2 is a flowchart of a method for device linkage according to an embodiment of the present invention;

[0024] Figure 3 is a schematic diagram of a tree structure provided according to an embodiment of the present invention;

[0025] Figure 4 is a schematic diagram of a star-shaped structure provided according to an embodiment of the present invention;

[0026] Figure 5 is a schematic diagram of a serial structure provided according to an embodiment of the present invention;

[0027] Figure 6 is a structural block diagram of an apparatus for device linkage according to an embodiment of the present invention;

[0028] Figure 7 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0030] Please refer to Figure 1 , Figure 1 It is a schematic diagram of a system for device linkage provided according to an embodiment of the present invention.

[0031] Combination Figure 1 As shown, the device linkage system may include: Hongmeng devices, other devices and the cloud. Among them, the cloud can serve as a communication bridge between devices across LANs, that is, when a device in a LAN issues a command, it can be processed through the cloud and sent to Hongmeng devices or other devices in another LAN.

[0032] For devices in the same LAN, when a Hongmeng device sends a command, it can determine the other devices or Hongmeng devices to which it needs to be sent based on the type of command, so that the other devices or Hongmeng devices that receive the command can perform corresponding actions to achieve linkage between devices. Similarly, when another device sends a command, it can determine the other devices or Hongmeng devices to which it needs to be sent based on the type of command, so that the other devices or Hongmeng devices that receive the command can perform corresponding actions to achieve linkage between devices.

[0033] Multiple devices in the same LAN can send instructions at the same time, and then determine the other devices or Hongmeng devices that need to be sent according to the type of each instruction. Among them, when multiple devices in a LAN can send instructions at the same time, the type of each instruction is different, and the number and type of instructions sent to the devices may also be different. Similarly, for devices in different LANs, multiple devices in a LAN can send instructions, and then the cloud will process the instructions separately, and send multiple instructions to the devices corresponding to the instructions in another LAN, so as to realize the linkage between multiple devices.

[0034] It should be noted that in Figure 1 In the process of processing through the cloud, only one cloud is needed. The two clouds here are just to illustrate that devices in the two LANs can send instructions to the cloud. When communicating across LANs, communication can be carried out based on the Internet.

[0035] As an example, in a city park computer room, if a fire occurs, the Hongmeng device in the city computer room can send a fire extinguishing command after sensing the fire, and the type determined by the fire extinguishing command can be the type of fire. Then the fire-related equipment can be linked, such as the sprinkler equipment around the fire point to automatically turn on the sprinkler switch. The fire extinguishing command can then be sent to the cloud, which matches the fire extinguishing command according to the preset event matching rules, determines other instructions that need to be executed corresponding to the event, such as display instructions, etc., and then sends the instructions to be executed to another device in the local area network, such as a large monitoring screen or handheld screen corresponding to the display instruction. Then the device in another local area network executes the display instruction to display the fire information.

[0036] According to an embodiment of the present invention, a method embodiment of device linkage is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0037] In this embodiment, a method for device linkage is provided, which can be used in the above-mentioned device linkage system. Figure 2 is a flow chart of a method for device linkage according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0038] Step S101, obtaining an event processing instruction sent by a first target device; wherein the first target device is a device in a first local area network.

[0039] The first target device may be a device in the first local area network. The first target device may be a Hongmeng device or a non-Hongmeng device. The event processing instruction is used to represent an instruction issued in response to a specific event (such as user input, sensor trigger, etc.) that requires the device to perform a corresponding processing action.

[0040] A local area network (LAN) is a small-scale network used to connect devices located in the same geographical location or relatively close to each other. When an event occurs in the first local area network, the first target device can detect the occurrence of the event, and correspondingly, the first target device can send an event processing instruction corresponding to the event.

[0041] Step S102, according to the event processing instruction and the preset event matching rule, determine at least one second target device and the first target event processing instruction corresponding to the second target device; wherein the second target device is a device in the second local area network, and the first target event processing instruction indicates the first target event that the second target device needs to execute.

[0042] The second target device may be a device in the second local area network. The first local area network and the second local area network belong to different local area networks; the second target device may be a Hongmeng device or other device (non-Hongmeng device). Different second target devices may execute corresponding events for their corresponding first target event instructions.

[0043] The preset event matching rules can be used to match the received event processing instructions with specific events or device types. Each event processing instruction corresponds to the occurrence of an event. Accordingly, when an event occurs, the second target device in the second local area network and the first target event processing instruction corresponding to the second target device can be determined according to the event processing instruction. That is, the occurrence of an event can cause multiple second target devices to be linked, and the events executed by each second target device will also be different.

[0044] As an example, the cloud receives an unlock command sent by the smart unlocking sensor of the first local area network, that is, the smart door lock sensor detects that the user has unlocked the front door with a fingerprint. When the smart door lock is unlocked, an event processing instruction is sent to the central controller. If the event is "smart door lock unlocked", all devices related to "security system release" in the second local area network (such as cameras, alarm systems) are searched. For these devices, corresponding first target event processing instructions are generated, such as "camera starts recording" and "alarm system mutes".

[0045] As an example, the cloud receives a signal from a sensor on a factory production line that a certain process has been completed (such as the assembly of a certain component). When the sensor detects that a process has been completed, an event processing instruction is sent to the second local area network. If the event is "a process has been completed", all devices related to the subsequent steps of the process (such as conveyor belts, robots for the next process) are searched. For these devices, corresponding first target event processing instructions are generated, such as "start the conveyor belt to send the component to the next process" and "activate the robot for the next process to start working.

[0046] As an example, the cloud matches the fire extinguishing instructions according to the preset event matching rules, determines other instructions that need to be executed corresponding to the event, such as display instructions, and then sends the instructions to be executed to another device in the local area network, such as the monitoring screen or handheld screen corresponding to the display instructions.

[0047] Step S103: sending the first target event processing instruction to the second target device corresponding to the first target event processing instruction, so that the second target device executes the first target event according to the first target event processing instruction.

[0048] After determining at least one second target device and a first target event processing instruction that the second target device needs to process, the cloud can send the first target event processing instruction to the second target device in the second local area network, and then the second target device executes the first target event that needs to be processed by the first target event processing instruction.

[0049] The device linkage method provided in this embodiment receives an event processing instruction from a first target device in a first local area network. The event processing instruction is the starting point of the linkage process between devices. It contains information about the action or event that needs to be executed. According to the preset event matching rules, the event processing instruction sent by the first target device is analyzed, and at least one second target device located in the second local area network is determined. The first target event processing instruction is sent to the corresponding second target device. Although the first target device and the second target device are located in different local area networks, they can also perform corresponding actions or events according to the received instructions, so that the linkage between devices is no longer limited to the same local area network, but can work collaboratively across different networks. This greatly expands the application scenarios of device linkage, allowing devices in different locations and different network environments to achieve interoperability.

[0050] In order to realize linkage between devices in a local area network, in a possible implementation, the method further includes:

[0051] Step a1, according to the event processing instruction and the preset event arrangement rules, determine at least one third target device and the second target event processing instruction corresponding to the third target device; wherein the third target device is a device in the first local area network, and the second target event processing instruction indicates the second target event that needs to be executed by the third target device.

[0052] The third target device may be a device of the first local area network, that is, the first target device and the third target device may be devices in a local area network, and the devices that are linked in the same local area network use near field communication as the communication method. The second target event processing instruction indicates the second target event that needs to be executed by the third target device. The preset event scheduling rules may indicate the linkage between multiple devices in the same local area network. The preset event scheduling rules may be set manually. For example: when a device detects a fire, the preset event scheduling rules may determine the device that needs to be linked or the framework structure of the device that needs to be linked based on the fire, and determine the device that needs to be linked based on the framework structure.

[0053] Specifically, when a device detects the occurrence of an event, a corresponding event processing instruction is generated. Then, based on the event processing instruction and the preset event arrangement rules, at least one corresponding third target device and the second target event processing instruction corresponding to the third target device can be determined, and then the second target event processing instruction is sent to the corresponding third target device.

[0054] As an example, a smart camera detects someone breaking into the backyard of a home, and the camera generates an "intrusion detection" event processing instruction. If an "intrusion detection" event occurs, instructions are sent to the smart door lock and alarm system, and the smart door lock can lock all doors. The alarm system can activate sound and light alarms.

[0055] As an example, a sensor detects a machine failure in a certain production link. The sensor generates a "machine failure" event processing instruction. If a "machine failure" occurs, an instruction is sent to the backup machine and the maintenance team. The backup machine can start the backup production line. The maintenance team communication device can send a maintenance request, including the location and type of the faulty machine.

[0056] As an example, a traffic camera detects a serious traffic accident on a certain road. The camera generates a "traffic accident" event processing instruction; if a "traffic accident" occurs, the instruction is sent to the traffic lights, traffic police communication equipment, and traffic broadcasting system. The traffic lights can adjust the signal light mode to relieve traffic congestion. The traffic police communication equipment can send accident notifications and on-site conditions, requesting the traffic police to come to the scene to handle. The traffic broadcasting system can broadcast accident information and detour routes.

[0057] Step a2: Control the first target device to send the second target event processing instruction to the third target device corresponding to the second target event processing instruction, so that the third target device executes the second target event according to the second target event processing instruction.

[0058] After determining the third target device corresponding to the at least one second target event instruction, the third target device may be controlled to execute the second target event that needs to be executed.

[0059] The device linkage method provided in this embodiment determines the third target device that needs to be linked with the first target device in the same local area network through event processing instructions and preset event scheduling rules, and then sends the second target event processing instruction to the third target device corresponding to the second target event processing instruction, so that the third target device executes the second target event according to the second target event processing instruction, thereby being able to achieve near-field communication while ensuring efficient collaborative work between devices in the same local area network through precise preset event scheduling rules.

[0060] In order to accurately determine the arrangement of devices, in a possible implementation, in the above step a1, according to the event processing instruction and the preset event arrangement rule, determining at least one third target device includes:

[0061] Step a11, determining the event processing type according to the event processing instruction.

[0062] The event processing type is used to characterize the classification of the nature of the event. The event processing type may be a device failure type, a fire type, etc., which may be determined according to the event processing instruction and is not specifically limited here.

[0063] As an example, a sensor in a smart factory detects that the temperature of a machine on a production line is too high, and it generates an event processing instruction. In step a12, the system parses the instruction and determines that the event processing type is "equipment failure warning".

[0064] Specifically, the system needs to parse the format and content of the event processing instructions. This usually includes reading specific fields or parameters in the instructions, which may contain key information about the event type, trigger conditions, priority, etc. After parsing the instructions, the system will match the parsed information with known event processing types based on the preset event type library or rule set. This process may involve a variety of technical means such as string comparison, pattern matching, and rule reasoning. Once an event processing type that matches the instruction content is found, the system will record it as a basis for subsequent steps. If the instruction content does not match any known type, the system may trigger an exception handling process, such as recording an error log, sending an alarm notification, etc.

[0065] As an example, a smoke detector in a smart home system detects smoke and generates an event processing instruction. The instruction contains the key information "smoke detection". After parsing the instruction, the system will match "smoke detection" with the preset event type library and determine that it belongs to the event processing type of "security alarm". Next, the system can find the corresponding processing strategy or plan based on the type of "security alarm", such as starting the alarm system, shutting down related electrical equipment, etc.

[0066] Step a12: According to the event processing type, determine the target orchestration corresponding to the event processing type from the preset event orchestration rules.

[0067] The target orchestration may represent the orchestration relationship between devices corresponding to the event processing type. The target orchestration may be the communication orchestration between devices at the same level, the communication orchestration between devices in a master-slave relationship, etc., which is not specifically limited here and can be implemented by those skilled in the art.

[0068] Specifically, a database storing all preset event orchestration rules is first accessed. Specifically, it may include mapping relationships between various event processing types and corresponding target orchestrations. In the event orchestration rule base, the system searches for a target orchestration that matches the previously determined event processing type. This matching process may involve simple key-value pair lookup, complex rule reasoning, or optimized search based on a certain algorithm. Once a matching target orchestration is found, the system selects it and prepares to apply it to subsequent processing flows. If the system fails to find a matching target orchestration (for example, because the event processing type is newly added and the rule base has not been updated), an error handling process may be triggered, such as recording an error log, sending an alarm notification, etc. After selecting the target orchestration, the system loads it into memory and prepares to execute the instructions or action sequences therein. This usually involves parsing each step in the orchestration and determining the resources, permissions, and conditions required to execute these steps.

[0069] Step a13: determining at least one third target device according to the target arrangement.

[0070] First, the content of the target orchestration will be parsed. After parsing the target orchestration, the system will identify the devices related to each step in the orchestration. These devices may be devices that directly participate in the execution of the action (such as sensors, actuators, servers, etc.), or they may be devices that need to be notified or provide information (such as monitoring systems, log servers, etc.). Based on the above identification process, the system will determine at least one third target device. These devices will be regarded as the subjects that need to execute the instructions or action sequences in the orchestration. If multiple steps or actions are involved in the orchestration, multiple third target devices may be involved. After determining the third target devices, the system will prepare to communicate with these devices. Specifically, it can include establishing a network connection, setting up communication protocols, preparing data packets to be sent, etc.

[0071] As an example, a smart home system detects a fire alarm and determines the target orchestration to be "activate the smoke alarm and turn off the power." In this example, the system identifies the devices associated with the instructions in the orchestration: the smoke alarm and the power control system. These devices will be considered the third target devices. Next, the system prepares to communicate with these devices and sends the corresponding instructions to perform the actions in the orchestration. For example, sending an activation instruction to the smoke alarm and a power off instruction to the power control system.

[0072] The device linkage method provided in this embodiment determines the event processing type by parsing the event processing instruction, thereby improving the accurate classification and identification of events. Subsequently, the corresponding target arrangement is selected from the preset event arrangement rules according to the event processing type, ensuring the pertinence and efficiency of event processing, reducing unnecessary resource consumption through the precise matching mechanism, and improving the overall efficiency of the system.

[0073] In order to improve the efficiency of collaboration between devices, in a possible implementation, in the above step a12, according to the event processing type, determining the target orchestration corresponding to the event processing type from the preset event orchestration rules includes:

[0074] Step a121, determining a target structure relationship between a first target device and at least one second target device according to an event processing type; wherein the structure relationship includes at least one of a tree structure, a star structure, and a string structure.

[0075] After determining the event processing type, further analyze and determine the structural relationship between the devices related to event processing. These devices include one or more first target devices (which may be the trigger or main processor of the event) and at least one second target device (which may be the responder or auxiliary processor of the event). The structural relationship describes the connection method and interaction mode of these devices in the event processing process.

[0076] Specifically, the system will analyze the devices that may be involved and how they interact based on the characteristics of the event processing type. Next, the system will identify the first target device and the second target device that are directly related to the event processing. These devices may be determined based on event trigger conditions, device functions, geographic locations, or other factors. The system will determine the target structure relationship between the target devices based on the characteristics of the target devices and the needs of event processing. Specifically, it may include a tree structure (such as a hierarchical management system), a star structure (such as a connection between a central node and multiple peripheral nodes), a string structure (such as a linear connection between devices), etc.

[0077] As an example, a sensor (first target device) in a smart factory detects an abnormality on a production line and triggers an event processing flow. In this example, the system may identify other devices directly related to the sensor (such as alarm systems, safety doors, emergency stop buttons, etc.) as second target devices. Then, based on the characteristics of these devices and the needs of event processing, the system may determine the structural relationship between them as a tree structure, with the sensor as the root node and other devices as child nodes.

[0078] Please refer to Figure 3 , Figure 3 is a schematic diagram of a tree structure provided according to an embodiment of the present invention.

[0079] Figure 3 In the system, a first-level terminal can communicate with multiple second-level terminals, and each second-level terminal can communicate with multiple third-level terminals. In other words, terminals are divided into different levels, and one terminal can send messages to multiple lower-level terminals.

[0080] As an example, the central controller decides to turn off the lights in all rooms at 8pm. It generates a message with this instruction and sends it to all connected secondary terminals (room controllers). The secondary terminals (room controllers) receive and forward the message: Each room controller receives the message from the central controller. The room controllers parse the message and recognize the instruction to turn off the lights. The room controllers forward this instruction to all the tertiary terminals (lighting devices in the room) to which they are connected. The tertiary terminals (lighting devices) receive and execute the instruction: Each light device receives the instruction from the room controller. The light devices parse the instruction and automatically turn off at 8pm.

[0081] Please refer to Figure 4 , Figure 4 is a schematic diagram of a star-shaped structure provided according to an embodiment of the present invention.

[0082] exist Figure 4 In the embodiment, the star structure can be composed of terminal 1 to terminal 8. Terminal 1 to terminal 8 belong to the same level of terminals. Specifically, a terminal can send instructions to terminals of the same level at the same time.

[0083] As an example, Terminal 1 to Terminal 8: These terminals are at the same level in the system and can communicate with each other. A distributed control system, where Terminal 1 to Terminal 8 represent different sensors or actuators, which are distributed in different locations but belong to the same control network. Terminal 1 detects an abnormal situation (such as high temperature) and decides to notify other terminals at the same level. Terminal 1 generates an instruction containing the abnormal situation and recommended actions (such as "Please note that the temperature in area A is too high, it is recommended to start the cooling system"). Terminal 1 sends this instruction to other terminals at the same level (Terminal 2 to Terminal 8). Terminal 2 to Terminal 8 receive the instruction from Terminal 1. Each terminal interprets the instruction and takes corresponding actions according to its own function and role. Terminal 3 is an actuator of the cooling system, which may start the cooling system in response to the instruction of Terminal 1. Other terminals (such as sensors) may record this event or adjust their own monitoring parameters according to the instruction.

[0084] Please refer to Figure 5 , Figure 5 is a schematic diagram of a serial structure provided according to an embodiment of the present invention.

[0085] Figure 5 In the example, terminals 1 to n are all terminals of the same level. A terminal can only send a message to a terminal of the same level.

[0086] As an example, the terminals of a message passing network represent different nodes that need to pass information according to specific rules. When the system is initialized, the communication relationship of each terminal is configured. For example, terminal 1 may be configured to send messages to terminal 2, while terminal 2 may be configured to send messages to terminal 3, and so on. It is important to note that this configuration is one-way, that is, terminal 1 cannot send messages to other terminals such as terminal 3 or terminal 4 (unless they are also explicitly configured as the target of terminal 1). When terminal 1 has a message to send, it sends the message to terminal 2 according to the configuration. Similarly, other terminals will also send messages to the specified target terminals according to their configuration.

[0087] Step a122, according to the target structural relationship, determine the target arrangement that is consistent with the structural relationship from the preset event arrangement rules.

[0088] After determining the target structure relationship, the target arrangement that matches the structure relationship can be found from the preset event arrangement rules. The target arrangement is a set of specific instructions or action sequences that are designed to guide the system on how to respond to and process events based on the structure relationship.

[0089] Specifically, a database storing all preset event orchestration rules is first accessed. In the event orchestration rule base, the system searches for a target orchestration that matches the target structure relationship. Specifically, this may involve matching the target structure relationship with the structure relationship template in the rule base. Once a matching target orchestration is found, the system selects it and prepares to apply it to subsequent processing flows. If the system fails to find a matching target orchestration, an error handling flow may be triggered.

[0090] The device linkage method provided in this embodiment can clearly define the linkage mode and hierarchical relationship between devices by determining the target structural relationship between devices (such as a tree structure, a star structure, and a string structure), so as to more accurately understand and execute event processing instructions, and ensure that the collaborative work between devices is more orderly and efficient. At the same time, different structural relationships are suitable for different application scenarios and business needs. By selecting the most suitable structural relationship according to the event processing type, the flexibility and adaptability of event processing can be significantly improved.

[0091] In this embodiment, a device for device linkage is also provided, which is used to implement the above embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0092] This embodiment provides a device linkage apparatus, such as Figure 6 As shown, including:

[0093] The acquisition module 601 is used to acquire the event processing instruction sent by the first target device; wherein the first target device is a device in the first local area network;

[0094] A first determination module 602 is used to determine at least one second target device and a first target event processing instruction corresponding to the second target device according to the event processing instruction and a preset event matching rule; wherein the second target device is a device in the second local area network, and the first target event processing instruction indicates a first target event that the second target device needs to execute;

[0095] The first execution module 603 is used to send the first target event processing instruction to the second target device corresponding to the first target event processing instruction, so that the second target device executes the first target event according to the first target event processing instruction.

[0096] In a possible implementation, the above device further includes:

[0097] A second determination module is used to determine at least one third target device and a second target event processing instruction corresponding to the third target device according to the event processing instruction and a preset event arrangement rule; wherein the third target device is a device of the first local area network, and the second target event processing instruction indicates a second target event that needs to be executed by the third target device;

[0098] The second execution module is used to control the first target device to send the second target event processing instruction to the third target device corresponding to the second target event processing instruction, so that the third target device executes the second target event according to the second target event processing instruction.

[0099] In one possible implementation, the second determination module includes: a first determination unit, used to determine the event processing type according to the event processing instruction; a second determination unit, used to determine the target orchestration corresponding to the event processing type from preset event orchestration rules according to the event processing type; and a third determination unit, used to determine at least one third target device according to the target orchestration.

[0100] In one possible implementation, the second determination unit includes: a first determination subunit, used to determine a target structural relationship between a first target device and at least one second target device according to an event processing type; wherein the structural relationship includes: at least one of a tree structure, a star structure, and a string structure; and a second determination subunit, used to determine a target orchestration that is consistent with the structural relationship from a preset event orchestration rule according to the target structural relationship.

[0101] In one possible implementation, the first target device, the second target device, and the third target device are all any one of HarmonyOS devices and non-HarmonyOS devices.

[0102] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0103] The device linkage apparatus in this embodiment is presented in the form of a functional unit, where the functional unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0104] The embodiment of the present invention also provides a computer device having the above Figure 6 The device shown is linked to the device.

[0105] See also Figure 7 , Figure 7 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 7 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 10 is taken as an example.

[0106] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0107] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0108] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0109] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0110] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0111] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0112] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0113] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for device linkage, characterized in that: The method comprises: Acquire an event processing instruction sent by a first target device; wherein the first target device is a device in a first local area network; According to the event processing instruction and the preset event matching rule, determining at least one second target device and a first target event processing instruction corresponding to the second target device; wherein the second target device is a device of the second local area network, and the first target event processing instruction indicates a first target event that the second target device needs to execute; The first target event processing instruction is sent to a second target device corresponding to the first target event processing instruction, so that the second target device executes the first target event according to the first target event processing instruction.

2. The device linkage method according to claim 1, characterized in that: The method further comprises: According to the event processing instruction and the preset event arrangement rule, at least one third target device and a second target event processing instruction corresponding to the third target device are determined; wherein the third target device is a device of the first local area network, and the second target event processing instruction indicates a second target event that needs to be executed by the third target device; The first target device is controlled to send the second target event processing instruction to a third target device corresponding to the second target event processing instruction, so that the third target device executes the second target event according to the second target event processing instruction.

3. The device linkage method according to claim 1, characterized in that: The step of determining at least one third target device according to the event processing instruction and the preset event arrangement rule includes: Determine the event processing type according to the event processing instruction; According to the event processing type, determining a target orchestration corresponding to the event processing type from a preset event orchestration rule; At least one third target device is determined according to the target orchestration.

4. The device linkage method according to claim 3, characterized in that: The determining, according to the event processing type, a target orchestration corresponding to the event processing type from a preset event orchestration rule includes: According to the event processing type, determining a target structure relationship between a first target device and at least one second target device; wherein the structure relationship includes: at least one of a tree structure, a star structure, and a string structure; According to the target structural relationship, a target arrangement that is consistent with the structural relationship is determined from preset event arrangement rules.

5. The device linkage method according to claim 2, characterized in that: The first target device, the second target device and the third target device are any one of Hongmeng devices and non-Hongmeng devices.

6. A device for equipment linkage, characterized in that: The device comprises: An acquisition module, used for acquiring an event processing instruction sent by a first target device; wherein the first target device is a device in a first local area network; A first determination module, configured to determine at least one second target device and a first target event processing instruction corresponding to the second target device according to the event processing instruction and a preset event matching rule; wherein the second target device is a device of a second local area network, and the first target event processing instruction indicates a first target event that the second target device needs to execute; The first execution module is used to send the first target event processing instruction to a second target device corresponding to the first target event processing instruction, so that the second target device executes the first target event according to the first target event processing instruction.

7. The device for equipment linkage according to claim 6, characterized in that: The device also includes: A second determination module is used to determine at least one third target device and a second target event processing instruction corresponding to the third target device according to the event processing instruction and a preset event arrangement rule; wherein the third target device is a device of the first local area network, and the second target event processing instruction indicates a second target event that needs to be executed by the third target device; The second execution module is used to control the first target device to send the second target event processing instruction to the third target device corresponding to the second target event processing instruction, so that the third target device executes the second target event according to the second target event processing instruction.

8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the device linkage method according to any one of claims 1 to 5 by executing the computer instructions.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the device linkage method according to any one of claims 1 to 5.

10. A computer program product, characterized in that The invention comprises computer instructions, wherein the computer instructions are used to make a computer execute the device linkage method according to any one of claims 1 to 5.

Citation Information

Cited By

  • Linkage method and device of electronic equipment, equipment, medium and program product

    CN120897190A