Equipment linkage system based on rules and events

By designing a device linkage system based on rules and events, using kafka clusters and multiple components, the dynamic management of multi-computer room equipment linkage and linkage rules is realized, the problems of equipment drift and dynamic management of rules are solved, and the second-level rules are implemented and Millisecond-level linkage action.

CN115550420BActive Publication Date: 2025-02-25HANGZHOU CLOSELI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211143024.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-20
Publication Date
2025-02-25
Estimated Expiration
2042-09-20

AI Technical Summary

Technical Problem

The existing technology is difficult to achieve linkage between multi-computer room equipment, and it is impossible to flexibly and dynamically change the linkage rules, resulting in the inability to linkage when the equipment drifts and the user customizes the linkage method to redevelop and release.

Method used

A device linkage system based on rules and events was designed to realize the equipment through the kafka cluster connection between the host and slave computer rooms, using components such as linkage center, rule engine server, Goose server, device proxy cloud and RabbitMQ module. Event reception, logical calculation, rule management and dynamic configuration.

Benefits of technology

The dynamic configuration and second-level effect of device linkage rules are realized, and the millisecond-level triggering of linkage actions is solved, solving the problem of device drift and dynamic management of linkage rules.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115550420B_ABST
    Figure CN115550420B_ABST
Patent Text Reader

Abstract

The present invention discloses a device linkage system based on rules and events, comprising the following steps: obtaining services that need to be updated, the services that need to be updated include pyramid structure slices generated by a quadtree algorithm; calculating the slice level that needs to be generated for the services that need to be updated; if a single building is included, flattening the original oblique photography data of the oblique block where the single building is located; converting the flattened oblique photography data and the single building into 3D region s format slice data; replacing the 3D region s format slice data into the corresponding row and column number folder in the original service. The device linkage system based on rules and events of the present invention only slices the updated elements in the scene, and performs scene service fusion based on the slices, avoiding global updates of large scenes, and avoiding repeated loading of slices, reducing the amount of service data, and improving the updating efficiency and display effect of large scene elements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a device linkage system based on rules and events. Background Art

[0002] To achieve multi-device linkage, the following technologies are currently used: the device-side proxy service in each computer room performs linkage logic calculations and notifies the corresponding devices to be triggered to perform corresponding linkage actions. The problem with this technology is that the devices in multiple computer rooms cannot be linked, and the linkage rules cannot be changed flexibly and dynamically. The former results in that if the device drifts, such as drifting from domestic to overseas, the domestic and overseas devices of the same user cannot be linked and triggered. The latter results in that if the user wants to customize the linkage method, it needs to be redeveloped and released, and the configuration of dynamic linkage rules cannot be achieved. Summary of the invention

[0003] The present invention provides a device linkage system based on rules and events to solve the above-mentioned technical problems, and specifically adopts the following technical solutions:

[0004] A device linkage system based on rules and events, including: a main computer room, a slave computer room and a kafka cluster;

[0005] The main computer room and the slave computer room are connected through the Kafka cluster;

[0006] The main computer room includes:

[0007] The first linkage center is used to receive linkage events, perform logical calculations, and issue linkage events;

[0008] The first rule engine server is used for dynamic management of linkage rules and reporting of rule instance data;

[0009] The first Goose server is used for data synchronization and event forwarding;

[0010] The first device agent cloud is used to wirelessly connect to the external device corresponding to the main computer room and establish a connection relationship between the external device and the first linkage center;

[0011] The first RabbitMQ module is used for message transfer;

[0012] The first rule engine server is connected to the first linkage center;

[0013] The first linkage center, the first Goose server, and the first device agent cloud are connected to the first RabbitMQ module.

[0014] The slave room is arranged in the same way as the master room. The slave room includes:

[0015] The second linkage center is used to receive linkage events, perform logical calculations, and issue linkage events;

[0016] The second rule engine server is used for dynamic management of linkage rules and reporting of rule instance data;

[0017] The second Goose server is used for data synchronization and event forwarding;

[0018] The second device agent cloud is used to wirelessly connect to the external device corresponding to the slave room and establish a connection relationship between the external device and the second linkage center;

[0019] The second RabbitMQ module is used for message transfer;

[0020] The second rule engine server is connected to the second linkage center;

[0021] The second linkage center, the second Goose server, and the second device proxy cloud are connected to the second RabbitMQ module.

[0022] Further, the external device in the main computer room reports the linkage event to the first device proxy cloud;

[0023] The first device agent cloud publishes the message to the first RabbitMQ module through the client of the first Goose server;

[0024] The first Goose server subscribes to the messages in the first RabbitMQ module;

[0025] The first Goose server publishes the subscribed message to the service queue corresponding to the first linkage center in the first RabbitMQ module.

[0026] Further, the first linkage center subscribes to the service queue corresponding to the first linkage center in the first RabbitMQ module through the client of the first Goose server;

[0027] The first linkage center calculates the subscribed message through the client of the first rule engine server;

[0028] The client of the first rule engine server reports each calculated instance to the first rule engine server;

[0029] The client of the first rule engine server triggers the corresponding interface through the rule script, and publishes the event that triggers the device action to the first RabbitMQ module through the client of the first Goose server.

[0030] Further, the first Goose server subscribes to the message corresponding to the first Goose server in the first RabbitMQ module;

[0031] The first Goose server publishes the subscribed message to the service queue corresponding to the first device proxy cloud in the first RabbitMQ module.

[0032] Furthermore, after receiving the event that triggers the device action, the first device agent cloud determines whether the external device receiving the event belongs to the main machine room or the slave machine room.

[0033] Furthermore, if the first device agent cloud determines that the external device receiving the event belongs to the main computer room, the message is directly sent to the external device corresponding to the main computer room.

[0034] Further, if the first device proxy cloud determines that the external device receiving the event belongs to the slave room, the message is published to the first RabbitMQ module through the client of the first Goose server;

[0035] The first Goose server subscribes to the messages in the first RabbitMQ module;

[0036] The first Goose server publishes the message to the specified topic area in the Kafka cluster according to the protocol information in the subscribed message.

[0037] Further, the second Goose server subscribes to the corresponding subject area;

[0038] The second Goose server publishes the subscribed message to the service queue corresponding to the second device proxy cloud in the second RabbitMQ module according to the message protocol.

[0039] Further, the second device proxy cloud subscribes to a service queue corresponding to the second device proxy cloud through a client of the second Goose server.

[0040] Furthermore, the second device agent cloud sends the subscribed message to the external device corresponding to the slave room.

[0041] The benefit of the present invention lies in the device linkage system based on rules and events. Users can dynamically configure device linkage rules. Under normal network conditions, dynamic changes to linkage rules can take effect in seconds, and linkage actions can be triggered in milliseconds under normal network environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a schematic diagram of a device linkage system based on rules and events of the present invention. DETAILED DESCRIPTION

[0043] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0044] like Figure 1 The device linkage system based on rules and events of the present application is shown, which includes: a main machine room, a slave machine room and a Kafka cluster. The main machine room and the slave machine room are connected through the Kafka cluster. The main machine room and the slave machine room have the same configuration.

[0045] Specifically, the main computer room includes: a first linkage center, a first rule engine server, a first Goose server, a first device proxy service, and a first RabbitMQ module. The first linkage center is used to receive linkage events, perform logical calculations, and issue linkage events. The first rule engine server is used for dynamic management of linkage rules and reporting of rule instance data. The first rule engine server is also used for configuration of linkage rules, and linkage rules can be quickly configured through the first rule engine server. The first Goose server is used for data synchronization and event forwarding. The first device proxy service is used to wirelessly connect to the external device corresponding to the main computer room and establish a connection relationship between the external device and the first linkage center. The first rule engine server is connected to the first linkage center. The first RabbitMQ module is used for message forwarding. The first linkage center, the first Goose server, and the first device proxy service are connected to the first RabbitMQ module.

[0046] The slave computer room is arranged in the same way as the master computer room. The slave computer room includes: a second linkage center, a second rule engine server, a second Goose server, a second device proxy cloud, and a second RabbitMQ module. The second linkage center is used to receive linkage events, perform logical calculations, and issue linkage events. The second rule engine server is used for dynamic management of linkage rules and reporting of rule instance data. The second Goose server is used for data synchronization and event forwarding. The second device proxy cloud is used to wirelessly connect to the external device corresponding to the slave computer room and establish a connection relationship between the external device and the second linkage center. The second RabbitMQ module is used for message forwarding. The second rule engine server is connected to the second linkage center. The second linkage center, the second Goose server, and the second device proxy cloud are connected to the second RabbitMQ module.

[0047] When the external device corresponding to the main computer room reports a linkage event, it reports the linkage event to the first device agent cloud.

[0048] The first device agent cloud publishes the message to the first RabbitMQ module in the computer room through the client (goose client) of the first Goose server.

[0049] The first Goose server subscribes to messages in the first RabbitMQ module.

[0050] The first Goose server publishes the subscribed message to the service queue corresponding to the first linkage center in the first RabbitMQ module.

[0051] Further, the first linkage center subscribes to the service queue corresponding to the first linkage center in the first RabbitMQ module through the client of the first Goose server.

[0052] The first linkage center calculates the subscribed message through the client (rule engine client) of the first rule engine server.

[0053] The client of the first rule engine server reports each calculated instance to the first rule engine server.

[0054] The client of the first rule engine server triggers the corresponding interface through the rule script, and publishes the event that triggers the device action to the first RabbitMQ module through the client of the first Goose server.

[0055] Furthermore, the first Goose server subscribes to the message corresponding to the first Goose server in the first RabbitMQ module.

[0056] The first Goose server publishes the subscribed message to the service queue corresponding to the first device proxy cloud in the first RabbitMQ module.

[0057] Next, after receiving the event that triggers the device action, the first device agent cloud determines whether the external device receiving the event belongs to the main machine room or the slave machine room.

[0058] If the first device agent cloud determines that the external device receiving the event belongs to the main computer room, the message is directly sent to the external device corresponding to the main computer room.

[0059] If the first device proxy cloud determines that the external device receiving the event belongs to the slave room, the message is published to the first RabbitMQ module through the client of the first Goose server.

[0060] The first Goose server subscribes to messages in the first RabbitMQ module.

[0061] The first Goose server publishes the message to the specified topic area (region topic) in the Kafka cluster according to the protocol information in the subscribed message.

[0062] Furthermore, the second Goose server subscribes to the corresponding subject area.

[0063] The second Goose server publishes the subscribed message to the service queue corresponding to the second device proxy cloud in the second RabbitMQ module according to the message protocol.

[0064] Further, the second device proxy cloud subscribes to a service queue corresponding to the second device proxy cloud through a client of the second Goose server.

[0065] The second device agent cloud sends the subscribed message to the external device corresponding to the slave room. At this point, the linkage of devices in different rooms is completed.

[0066] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the above embodiments do not limit the present invention in any form, and any technical solution obtained by equivalent replacement or equivalent transformation falls within the protection scope of the present invention.

Claims

1. A device linkage system based on rules and events, characterized in that: Includes: main computer room, slave computer room and Kafka cluster; The main computer room and the slave computer room are connected via the kafka cluster; The main machine room includes: The first linkage center is used to receive linkage events, perform logical calculations, and issue linkage events; The first rule engine server is used for dynamic management of linkage rules and reporting of rule instance data; The first Goose server is used for data synchronization and event forwarding; The first device agent cloud is used to wirelessly connect to the external device corresponding to the main computer room and establish a connection relationship between the external device and the first linkage center; The first RabbitMQ module is used for message transfer; The first rule engine server is connected to the first linkage center; The first linkage center, the first Goose server, and the first device proxy cloud are connected to the first RabbitMQ module; The slave machine room is arranged in the same manner as the master machine room, and the slave machine room includes: The second linkage center is used to receive linkage events, perform logical calculations, and issue linkage events; The second rule engine server is used for dynamic management of linkage rules and reporting of rule instance data; The second Goose server is used for data synchronization and event forwarding; The second device agent cloud is used to wirelessly connect to the external device corresponding to the slave room and establish a connection relationship between the external device and the second linkage center; The second RabbitMQ module is used for message transfer; The second rule engine server is connected to the second linkage center; The second linkage center, the second Goose server, and the second device agent cloud are connected to the second RabbitMQ module.

2. The device linkage system based on rules and events according to claim 1, characterized in that: The external device of the main computer room reports the linkage event to the first device agent cloud; The first device agent cloud publishes the message to the first RabbitMQ module through the client of the first Goose server; The first Goose server subscribes to messages in the first RabbitMQ module; The first Goose server publishes the subscribed message to the service queue corresponding to the first linkage center in the first RabbitMQ module.

3. The device linkage system based on rules and events according to claim 2 is characterized in that: The first linkage center subscribes to the service queue corresponding to the first linkage center in the first RabbitMQ module through the client of the first Goose server; The first linkage center calculates the subscribed message through the client of the first rule engine server; The client of the first rule engine server reports each instance of calculation to the first rule engine server; The client of the first rule engine server triggers the corresponding interface through the rule script, and publishes the event that triggers the device action to the first RabbitMQ module through the client of the first Goose server.

4. The device linkage system based on rules and events according to claim 3 is characterized in that: The first Goose server subscribes to the message corresponding to the first Goose server in the first RabbitMQ module; The first Goose server publishes the subscribed message to the service queue corresponding to the first device proxy cloud in the first RabbitMQ module.

5. The device linkage system based on rules and events according to claim 4 is characterized in that: After receiving the event that triggers the device action, the first device proxy cloud determines whether the external device receiving the event belongs to the main machine room or the slave machine room.

6. The device linkage system based on rules and events according to claim 5, characterized in that: If the first device agent cloud determines that the external device receiving the event belongs to the main computer room, the message is directly sent to the external device corresponding to the main computer room.

7. The device linkage system based on rules and events according to claim 6, characterized in that: If the first device proxy cloud determines that the external device receiving the event belongs to the slave room, the message is published to the first RabbitMQ module through the client of the first Goose server; The first Goose server subscribes to messages in the first RabbitMQ module; The first Goose server publishes the message to the subject area specified in the Kafka cluster according to the protocol information in the subscribed message.

8. The device linkage system based on rules and events according to claim 7, characterized in that: The second Goose server subscribes to the corresponding subject area; The second Goose server publishes the subscribed message to the service queue corresponding to the second device proxy cloud in the second RabbitMQ module according to the message protocol.

9. The device linkage system based on rules and events according to claim 8, characterized in that: The second device proxy cloud subscribes to a service queue corresponding to the second device proxy cloud through a client of the second Goose server.

10. The device linkage system based on rules and events according to claim 9, characterized in that: The second device agent cloud sends the subscribed message to the external device corresponding to the slave computer room.

Citation Information

Patent Citations

  • System for providing services of event-driven service-oriented internet of things and working method thereof

    CN103458033A

  • Event response system, method, device, and storage medium

    CN109040171A