Rule engine method and system for smart poles

By using a rule engine method and system for smart poles, supporting both manual and automatic modes, and combining graph databases and relational databases, the system dynamically adjusts device resource control, solving the rule configuration problem of smart pole systems in complex scenarios and enabling flexible event handling and device control.

CN115544093BActive Publication Date: 2026-03-20SHENZHEN MIRACLE WISDOM NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-25
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

Existing smart pole systems cannot quickly and flexibly handle scenarios with a wide variety of rules and complexities. Their rule configuration interfaces are limited and cannot adapt to ever-changing business needs.

Method used

A rule engine method and system for smart poles are provided, which has manual and automatic modes. By determining the device control rights of external terminals, temporary manual rule mode and automatic linkage rule mode are realized. By combining graphical database and relational database, the control and execution priority of device resources are dynamically adjusted, and multi-mode switching is supported.

Benefits of technology

It enables flexible rule configuration and rapid event handling for smart poles in various scenarios, enhancing the adaptability and immediacy of smart poles, and improving the flexibility and security of device control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115544093B_ABST
    Figure CN115544093B_ABST
Patent Text Reader

Abstract

A rule engine method of a smart pole, having a manual mode and an automatic mode, the rule engine method comprising: judging whether an external terminal associated with the smart pole executes a device control right through an interactive operation interface, if yes, proceeding with the manual mode, if no, proceeding with the automatic mode; in the automatic mode, judging whether the rule engine receives a temporary manual event sent by the external terminal, if no, proceeding with an automatic linkage rule mode; when the rule engine receives the temporary manual event sent by the external terminal, proceeding with a temporary manual rule mode and executing the device control right, wherein a priority of the temporary manual rule mode is higher than a priority of the automatic linkage rule mode. The rule engine method proposed in the application enables the smart pole to have an automatic event handling capability under multi-mode switching through the rule engine.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of communication security, in particular to a rule engine method of an intelligent pole. BACKGROUND

[0002] With the progress of science and technology, the intelligent pole system can integrate various intelligent devices, control and manage various intelligent devices on the intelligent pole through an intelligent platform, and realize video recognition of fixed scenes through the Internet to achieve environmental monitoring and information network sharing. However, the rule strategy of the intelligent scene and automatic control scene of the existing street lamp pole is relatively simple, the rule application business scene is relatively simple, the business is relatively professional, and the business is relatively fixed for the scene, such as timer, trigger rule execution, and disposal relative business scene. The current intelligent pole cannot provide a complex rule configuration interface, the configuration type is relatively simple, and it cannot quickly and flexibly dispose of scenes with rich and complex rule types. SUMMARY

[0003] Therefore, the purpose of the present application is to provide a rule engine method and system of an intelligent pole to solve the problem that the intelligent pole in the prior art cannot quickly and flexibly dispose of scenes with rich and complex rule types.

[0004] To achieve the above-mentioned purpose, the technical solution of the present application is as follows:

[0005] In a first aspect, the present application provides a rule engine method of an intelligent pole, which has a manual mode and an automatic mode, and the rule engine method comprises:

[0006] determining whether an external terminal associated with the intelligent pole executes device control right through an interactive operation interface, if yes, performing the manual mode, and if no, performing the automatic mode;

[0007] In the automatic mode, determining whether the rule engine receives a temporary manual event sent by the external terminal, if no, performing an automatic linkage rule mode;

[0008] When the rule engine receives the temporary manual event sent by the external terminal, performing a temporary manual rule mode and executing the device control right, wherein the priority of the temporary manual rule mode is higher than the priority of the automatic linkage rule mode.

[0009] In an embodiment, in the step of performing an automatic linkage rule mode and executing the device control right, the rule engine method comprises:

[0010] starting a service device of a device service group by the rule engine, and the device service group reads device knowledge of a graph database;

[0011] According to the device knowledge, starting a device listener, a device timer and monitoring a device attribute threshold, the device service group automatically triggers a device event according to the device listener, the device timer and the device attribute threshold;

[0012] The device service group sends the device event including the device knowledge to the rule engine through HTTP;

[0013] Determining whether the rule file sent by the relational database to the rule engine matches the device event, if not, ignoring the event;

[0014] When the rule file and the device event are matched, obtaining the associated device resource of the current rule file of the rule file;

[0015] Determining whether the associated device resource is occupied by other rule files of the rule file, if not, setting the state information of the current rule file to an active state;

[0016] When the associated device resource is occupied by other rule files of the rule file, determining whether the current rule file is the first priority, if not, ignoring the event;

[0017] When the current rule file is the highest priority, determining whether the current rule file is in the active state, if yes, ignoring the event;

[0018] When the current rule file with the first priority is not activated, terminating the associated device resource of other rule files with the second priority, and returning to setting the state information of the current rule file to the active state;

[0019] Calling the method of the associated device resource of the current rule file;

[0020] Determining whether the execution of the current rule file exceeds a time threshold, if not, after the method of the associated device resource of the current rule file is executed, setting the current rule file to an inactive state;

[0021] Terminating the execution of the other rule files;

[0022] Setting the current rule file to the inactive state.

[0023] In an embodiment, when the rule engine serves the device service group, the device service group reads the device knowledge of the graph database, and the rule engine method comprises:

[0024] loading rule information including rule matching conditions, rule execution methods, rule execution priorities, and rule running timeout times from the relational database, parsing the rule information and automatically converting the rule information into a rule file;

[0025] The relational database loads the rule file to the rule engine.

[0026] The rule engine starts the device service group to read device knowledge of device event triples of a graph database.

[0027] In an embodiment, in a temporary manual rule mode, the rule engine method comprises:

[0028] After the device service group receives an external instruction of the temporary manual event through the rule engine, the temporary manual rule mode is activated and a device timer is started.

[0029] The rule engine receives an external device trigger event of the temporary manual event sent by the external terminal.

[0030] It is determined whether the external device trigger event matches a rule file sent by a relational database to the rule engine, and if not, the event is ignored.

[0031] When the external device trigger event matches the rule file, it is determined whether the priority of the rule file can be executed, and if not, the event is ignored.

[0032] When the priority of the rule file can be executed, it is determined whether the rule file is in an activated state, and if not, the event is ignored.

[0033] When the rule file is in the activated state, the rule engine re-modifies a time stamp of the activated state of the temporary manual rule mode.

[0034] A method of calling associated device resources of the rule file is called.

[0035] A preset time is timed by the device timer.

[0036] It is determined whether the time range in the temporary manual rule mode exceeds the preset time, and if so, the temporary manual rule mode is set to an inactivated state.

[0037] When the time range in the temporary manual rule mode does not exceed the preset time, the temporary manual rule mode is continued.

[0038] In an embodiment, the time unit of the preset time is second, minute or hour; the smart stick at least comprises a smart stick edge computing unit or a smart stick gateway, and the time unit of the preset time is dynamically adjusted according to program content metadata of a playing unit connected to the smart stick edge computing unit or the smart stick gateway.

[0039] In a second aspect, the application provides a rule engine system of a smart stick, which has a manual mode and an automatic mode, and comprises:

[0040] An execution module is configured to determine whether an external terminal associated with the smart stick executes a device control right through an interactive operation interface, and if yes, the manual mode is performed, and if no, the automatic mode is performed.

[0041] A determination module is configured to determine whether the rule engine receives a temporary manual event sent by the external terminal in the automatic mode, and if no, an automatic linkage rule mode is performed.

[0042] A receiving module is configured to perform a temporary manual rule mode and execute the device control right when the rule engine receives the temporary manual event sent by the external terminal, wherein the priority of the temporary manual rule mode is higher than that of the automatic linkage rule mode.

[0043] In an embodiment, the rule engine system comprises:

[0044] A performing module is configured to control the rule engine to perform service device start on a device service group, and the device service group reads device knowledge of a graph database.

[0045] A first starting module is configured to start a device listener, a device timer and a monitoring device attribute threshold according to the device knowledge, and the device service group automatically triggers a device event according to the device listener, the device timer and the device attribute threshold.

[0046] A first sending module is configured to control the device service group to send a device event comprising device knowledge to the rule engine through an HTTP mode.

[0047] A first matching module is configured to determine whether a rule file sent by a relational database to the rule engine matches the device event, and if no, the event is ignored.

[0048] An obtaining module is configured to obtain associated device resources of a current rule file of the rule file when the rule file and the device event are matched.

[0049] The first occupation module is configured to determine whether the associated device resource is occupied by other rule files of the rule file, and if not, set state information of the current rule file to an active state.

[0050] The second occupation module is configured to determine whether the current rule file is of a first priority when the associated device resource is occupied by other rule files of the rule file, and if not, ignore the event.

[0051] The first activation module is configured to determine whether the current rule file is in the active state when the current rule file is of the highest priority, and if so, ignore the event.

[0052] The first termination module is configured to terminate the associated device resource of other rule files of the second priority when the current rule file of the first priority is not activated, and return to setting the state information of the current rule file to the active state.

[0053] The first calling module is configured to call a method of the associated device resource of the current rule file.

[0054] The first setting module is configured to determine whether execution of the current rule file exceeds a time threshold, and if not, set the current rule file to an inactive state after the method of the associated device resource of the current rule file is executed.

[0055] The second termination module is configured to terminate execution of the other rule files.

[0056] The second setting module is configured to set the current rule file to the inactive state.

[0057] In an embodiment, the rule engine system comprises:

[0058] The parsing module is configured to load rule information including rule matching conditions, rule execution methods, rule execution priorities, and rule running timeout times from the relational database, parse the rule information, and automatically convert the rule information into rule files.

[0059] The loading module is configured to control the relational database to load the rule files to the rule engine.

[0060] The reading module is configured to control the rule engine to start the device service group to read device knowledge of device event triples of the graph database.

[0061] In an embodiment, the rule engine system comprises:

[0062] The second startup module is used to control the device service group to activate the temporary manual rule mode and start the device timer after receiving the external instruction of the temporary manual event through the rule engine;

[0063] The second sending module is used to control the rule engine to receive the external device triggering event of the temporary manual event sent by the external terminal;

[0064] The third sending module is used to determine whether the external device triggering event matches the rule file sent from the relational database to the rule engine; if not, the event is ignored.

[0065] The second matching module is used to determine whether the priority of the rule file can be executed when the event triggered by the external device matches the rule file; if not, the event is ignored.

[0066] The second activation module is used to determine whether the rule file is in an active state when the priority of the rule file can be executed; if not, the event is ignored.

[0067] The modification module is used to control the rule engine to re-modify the timestamp of the activation state of the temporary manual rule mode when the rule file is in an active state.

[0068] The second calling module is used to call the associated device resources of the rule file;

[0069] The timing module is used to control the device's timer to preset the time.

[0070] The third setting module is used to determine whether the time range of the temporary manual rule mode exceeds the preset time. If so, the temporary manual rule mode is set to an inactive state.

[0071] The continuation module is used to continue the temporary manual rule mode when the time range of the temporary manual rule mode does not exceed the preset time.

[0072] In one embodiment, the preset time is in seconds, minutes, or hours; the smart pole includes at least a smart pole edge computing unit or a smart pole gateway, and the preset time is dynamically adjusted based on the program content metadata of the playback unit connected to the smart pole edge computing unit or the smart pole gateway.

[0073] According to the above, the application provides a rule engine method of a smart pole, which has a manual mode and an automatic mode, and the rule engine method comprises: judging whether an external terminal associated with the smart pole executes a device control right through an interactive operation interface, if yes, the manual mode is performed, and if no, the automatic mode is performed; in the automatic mode, judging whether the rule engine receives a temporary manual event sent by the external terminal, if no, an automatic linkage rule mode is performed; when the rule engine receives the temporary manual event sent by the external terminal, a temporary manual rule mode is performed and the device control right is executed, wherein the priority of the temporary manual rule mode is higher than the priority of the automatic linkage rule mode. The rule engine method provided by the application defines and realizes an intelligent rule engine system of a smart pole scene according to an application scene of an external terminal associated with the smart pole, and endows the smart pole with an automatic event processing capability in a multi-mode switching mode through a rule engine, a graph database and an associative database. BRIEF DESCRIPTION OF DRAWINGS

[0074] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly introduced as follows. It should be understood that the following drawings only show some of the embodiments of the present application, and therefore should not be regarded as a limitation on the scope, and for those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.

[0075] Figure 1 The method flowchart of the rule engine method of the smart pole provided by the present application.

[0076] Figure 2 Another method flowchart of the rule engine method of the smart pole provided by the present application.

[0077] Figure 3 Still another method flowchart of the rule engine method of the smart pole provided by the present application.

[0078] Figure 4 The functional framework diagram of the rule engine method of the smart pole provided by the present application.

[0079] Figure 5 The block schematic diagram of the rule engine system of the smart pole provided by the present application. DETAILED DESCRIPTION

[0080] The specific embodiments of the present application will be described in detail below with reference to the drawings. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the description of the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0081] In the description of the present application, unless specifically defined and limited otherwise, the terms "set", "mounted", "connected" and the like should be broadly understood, for example, can be fixedly connected, can be detachably connected, or integrally connected; can be mechanically connected, can be electrically connected; can be directly connected, or indirectly connected through an intermediate medium. For those skilled in the art, the specific meanings of the above terms can be understood according to the specific circumstances.

[0082] The terms "first", "second", "third" and the like are only used to distinguish similar attributes or elements, and do not indicate or imply relative importance or a specific order.

[0083] The term "including", "containing" or any other variant thereof, is intended to cover non-exclusive inclusion, in addition to including the listed elements, other elements not explicitly listed can also be included.

[0084] Please also refer to Figure 1 , Figure 2 , Figure 3 and Figure 4 , Figure 1 The method flow chart of the rule engine method of the intelligent rod provided in the present application (hereinafter referred to as "rule engine method"). Figure 2 Another method flow chart of the rule engine method of the intelligent rod provided in the present application. Figure 3 Still another method flow chart of the rule engine method of the intelligent rod provided in the present application. Figure 4 The functional framework diagram of the rule engine method of the intelligent rod provided in the present application.

[0085] The present application provides a rule engine method of an intelligent rod, which has a manual mode and an automatic mode, and the rule engine method comprises:

[0086] S1, judging whether the external terminal associated with the intelligent rod executes the device control right through the interactive operation interface, if yes, performing the manual mode, if not, performing the automatic mode.

[0087] In an embodiment, the external terminal associated with the smart pole can be a computer device with input functions, and a user can execute device control right through an interactive interface (for example, an API interface). For example, the device control right can refer to the control right of the camera, light-emitting unit, temperature and humidity sensor, and other electronic devices of the smart pole. When the device control right is obtained, the manual mode is executed. On the other hand, when the device control right is not obtained, the automatic mode is executed. In other words, the rule engine method proposed in the present application supports both manual mode and automatic mode, and the two modes are in a mutually exclusive relationship. At any moment, the rule engine method and system can only run one of the two modes. In the manual mode, the rule engine is in a disabled state, and the device control right is transferred to the device itself. The device provides an external interactive interface, and the rule engine method has multiple operating modes (which can also include a semi-automatic mode). The rule engine method can implement complex rule strategy execution and configuration, and fast rule strategy matching and execution, so that the smart pole has the ability to automatically handle events in the multi-mode switching function.

[0088] S2, in the automatic mode, it is judged whether the rule engine receives a temporary manual event sent by the external terminal. If not, the automatic linkage rule mode is executed.

[0089] In an embodiment, the rule engine originates from a rule-based expert system, which is one branch of expert systems. The expert system belongs to the category of artificial intelligence, can imitate the reasoning method of human beings, use a heuristic method for reasoning, and use terms understandable by human beings to explain and prove the reasoning conclusion. The rule engine applied to the smart pole has pre-set calculation logic (rule information stored in a relational database) loaded in the rule engine, accepts fact data (device knowledge stored in a graph database) in the business, brings the fact data as parameters into the rules, and obtains the result through logical calculation. The rule engine method of the present application is a smart pole rule engine based on the rete algorithm. The rule matching is independent of the number of rules, and the basic idea of the rete algorithm is to save all the information left in the past matching process, so as to exchange the execution efficiency for space cost. It is judged whether the rule engine receives a temporary manual event sent by the external terminal. When no temporary manual event is received, the automatic linkage rule mode is entered. The rule to which the temporary manual event belongs has the highest priority, and the automatic linkage rule cannot interrupt or preempt the device control right locked by the temporary manual rule. For example, the temporary manual rule can mainly implement the temporary takeover of the device for 10 minutes, so that the smart pole has the ability to temporarily handle events in the multi-mode switching function, and increases the immediacy.

[0090] S210, the rule engine performs service device opening on a device service group, and the device service group reads the device knowledge of the graph database.

[0091] In an embodiment, please seeFigure 2 When the rule engine does not receive the temporary manual event sent by the external terminal, the rule engine starts the service device group to open the device service group, and the device service group reads the device knowledge of the graph database. For example, the graph database is Neo4j-DB, which is a high-performance NOSQL graph database, stores structured data on the network, and is an embedded, disk-based, full-transaction Java persistence engine.

[0092] It should be noted that before S210, the rule engine method further comprises: loading rule information including rule matching conditions, rule execution methods, rule execution priorities and rule running timeout times from a relational database (Mysql), parsing the rule information and automatically converting it into a rule file; the relational database loads the rule file to the rule engine; the rule engine starts the device service group to read the device knowledge of the device event triple of the graph database. In other words, the rule engine is in the automatic mode by default after each start, and the system does not save the flag of the running mode. In addition, the rule engine loads the rule information from the Mysql database and parses the rule information after starting, and each rule locks the device control resource in a preemptive manner according to the execution timeout time, the rule priority and the mutual exclusivity of the device resource. For example, the SQL language used by the relational database (Mysql) is the most commonly used standardized language for accessing databases, which adopts a dual authorization policy and is divided into community and commercial versions. Due to its small size, speed and low total cost of ownership, the Mysql database stores the linkage rules in the form of JSON (Java Script Object Notation, which is a lightweight data exchange format). For example, the device event triple can be a violation event composed of one or more rules (for example, a car stopping in a prohibited parking area) and one or more devices (for example, a car) participating in the event at a certain time point or time period and in a certain geographical range associated with the camera of the intelligent pole.

[0093] S220, according to the device knowledge, start the device listener, the device timer and the monitoring device attribute threshold, and the device service group automatically triggers the device event according to the device listener, the device timer and the monitoring device attribute threshold.

[0094] S230, the device service group sends the device event including the device knowledge to the rule engine through the HTTP mode.

[0095] The device service group further starts a device listener, a device listening timer and a monitoring device attribute threshold according to the device knowledge sent by the graph database, and after the device event is automatically triggered, the device event including the device knowledge is sent to the rete algorithm of the rule engine through the HTTP (Hypertext Transfer Protocol Secure) mode for processing operation.

[0096] S240, whether the rule file (including rule information) sent by the relational database to the rule engine matches the device event is judged, if not, the event is ignored.

[0097] S250, when the rule file and the device event are matched, the associated device resource of the current rule file of the rule file is obtained.

[0098] For example, the rule file at least includes the current rule file and other rule files, when the rule file and the device knowledge in the device event are matched, the associated device resource (such as device A, device B or device C) of the current rule file of the rule file is obtained.

[0099] S260, whether the associated device resource is occupied by other rule files of the rule file is judged, if not, S261 is entered, the state information of the current rule file is set to active state.

[0100] S270, when the associated device resource is occupied by other rule files of the rule file, whether the current rule file is the first priority is judged, if not, the event is ignored;

[0101] S280, when the current rule file is the highest priority, whether the current rule file is in the active state is judged, if yes, the event is ignored;

[0102] S290, when the current rule file with the first priority is not activated, the associated device resource of other rule files with the second priority is terminated, and the state information of the current rule file is set to the active state in S261;

[0103] S262, the method of the associated device resource of the current rule file is called.

[0104] S263, whether the execution of the current rule file exceeds the time threshold is judged, if not, S264 is entered, after the method execution of the associated device resource of the current rule file is completed, the current rule file is set to the inactive state.

[0105] S265, the execution of the other rule files is terminated.

[0106] S266, set the current rule file to an inactive state.

[0107] For example, when the current rule file with the first priority is not activated, the associated device resources (including device A and device B) of the other rule file with the second priority are terminated first, and the associated device resources (including device B and device C) of the current rule file are returned to S261. In other words, the associated device resources (including device B and device C) of the current rule file with the first priority are replaced by the associated device resources (including device A and device B) of the other rule file with the second priority, effectively achieving the mutual exclusivity of rule priority and device resources, and preemptively locking the function of the associated device resources including multiple devices. The method of calling the associated device resources of the current rule file, for example, the operation method of calling device B and device C, judges whether the execution of the current rule file exceeds the time threshold (for example, 0.1-3 hours). When the event threshold is not exceeded, the operation method of the associated device resources of the current rule file is executed (for example, the completed instructions of the camera and the temperature and humidity sensor of the intelligent rod), and after the operation method of the associated device resources of the current rule file is executed, the current rule file is set to an inactive state, the execution of the other rule file is terminated, and the function instructions of the associated device resources of the next priority can be executed, increasing flexibility.

[0108] In an embodiment, please see Figure 3 In S3, the rule engine method includes:

[0109] S310, after the device service group receives the external instruction of the temporary manual event through the rule engine, the temporary manual rule mode is activated and a device timer is started.

[0110] For example, the temporary manual rule mode can be set as the highest priority by default, the timeout time of rule execution is infinite time, the automatic linkage rule mode cannot terminate the temporary manual rule mode, and the trigger source of the temporary manual is the external terminal event input to trigger the temporary manual rule mode to be activated and the device timer to be started.

[0111] S320, the rule engine receives the external device trigger event of the temporary manual event sent by the external terminal.

[0112] S330, it is judged whether the external device trigger event matches the rule file sent by the relational database to the rule engine, and if not, the event is ignored. For example, ignoring the event means that the external device trigger event and the rule are ignored in the processing of the device right because they do not match.

[0113] S340, when the external device trigger event matches the rule file, it is judged whether the priority of the rule file can be executed, and if not, the event is ignored.

[0114] S350, when the priority of the rule file can be executed, judging whether the rule file is in an active state, if not, ignoring the event.

[0115] S360, when the rule file is in the active state, the rule engine re-modifies the time stamp of the active state of the temporary manual rule mode. Effectively increase the flexibility of the active state of the temporary manual rule mode.

[0116] S370, calling the method of the associated device resource of the rule file.

[0117] S380, preset time is timed by the device timer.

[0118] For example, the time unit of the preset time is second, minute or hour; the intelligent rod at least includes an intelligent rod edge computing unit or an intelligent rod gateway, and the time unit of the preset time is dynamically adjusted according to the program content metadata of the playing unit connected to the intelligent rod edge computing unit or the intelligent rod gateway. The intelligent rod can also include other electronic devices with computing capability. The time unit of the preset time can be dynamically adjusted according to the program content metadata of the playing unit connected to the intelligent rod edge computing unit or the intelligent rod gateway, for example, the time unit of the preset time can be second when the program content metadata is about traffic accidents, the time unit of the preset time can be minute when the program content metadata is about traffic jams, and the time unit of the preset time can be hour when the program content metadata is about weather forecasts, effectively increasing the flexibility and immediacy of the rule engine applied to the intelligent rod function.

[0119] S390, judging whether the time range in the temporary manual rule mode exceeds the preset time, if yes, S391, setting the temporary manual rule mode to an inactive state. For example, switching the rule engine method from the temporary manual rule mode to the automatic linkage rule mode, returning to Figure 2 S210 of the rule engine, the device service group reads the device knowledge of the graph database to achieve the event capability of the intelligent rod under the automatic disposal of multiple situations under the multi-mode switching.

[0120] S392, when the time range in the temporary manual rule mode does not exceed the preset time, continue the temporary manual rule mode.

[0121] The rule engine method provided by the application defines and realizes the automatic disposal event capability of the intelligent rod under the multi-mode switching by the engine system, the rule engine, the graph database and the associated database according to the application scene of the external terminal associated with the intelligent rod, can randomly modify the automatic disposal event, increase the convenience, make the disposal event capability safer and more flexible.

[0122] Please refer to Figure 5 , Figure 5 The block diagram of the rule engine system of the smart pole provided in the present application.

[0123] A rule engine system of a smart pole, having a manual mode and an automatic mode, the rule engine system 500 comprising:

[0124] An execution module 510 for judging whether an external terminal associated with the smart pole executes a device control right through an interactive operation interface, if yes, proceeding with the manual mode, if no, proceeding with the automatic mode;

[0125] A judging module 520 for judging whether the rule engine receives a temporary manual event sent by the external terminal in the automatic mode, if no, proceeding with an automatic linkage rule mode;

[0126] A receiving module 530 for proceeding with a temporary manual rule mode and executing the device control right when the rule engine receives the temporary manual event sent by the external terminal, wherein the priority of the temporary manual rule mode is higher than that of the automatic linkage rule mode.

[0127] In an embodiment, the rule engine system 500 (the following module diagram is not shown) comprises:

[0128] A proceeding module for controlling the rule engine to perform service device start on a device service group, the device service group reading device knowledge of a graph database;

[0129] A first starting module for starting a device listener, a device timer and a monitoring device attribute threshold according to the device knowledge, the device service group automatically triggering a device event according to the device listener, the device timer and the device attribute threshold;

[0130] A first sending module for controlling the device service group to send a device event comprising device knowledge to the rule engine through HTTP;

[0131] A first matching module for judging whether a rule file sent by a relational database to the rule engine matches the device event, if no, ignoring the event;

[0132] An obtaining module for obtaining associated device resources of a current rule file of the rule file when the rule file and the device event are matched;

[0133] The first occupation module is configured to determine whether the associated device resource is occupied by other rule files of the rule file, and if not, set state information of the current rule file to an active state.

[0134] The second occupation module is configured to determine whether the current rule file is of a first priority when the associated device resource is occupied by other rule files of the rule file, and if not, ignore the event.

[0135] The first activation module is configured to determine whether the current rule file is in the active state when the current rule file is of the highest priority, and if so, ignore the event.

[0136] The first termination module is configured to terminate the associated device resource of other rule files of a second priority when the current rule file of the first priority is not activated, and return to setting the state information of the current rule file to the active state.

[0137] The first calling module is configured to call a method of the associated device resource of the current rule file.

[0138] The first setting module is configured to determine whether execution of the current rule file exceeds a time threshold, and if not, set the current rule file to an inactive state after the method of the associated device resource of the current rule file is executed.

[0139] The second termination module is configured to terminate execution of the other rule files.

[0140] The second setting module is configured to set the current rule file to the inactive state.

[0141] In an embodiment, the rule engine system 500 (the following module diagram is not shown) includes:

[0142] The parsing module is configured to load rule information including rule matching conditions, rule execution methods, rule execution priorities, and rule running timeout times from the relational database, parse the rule information, and automatically convert the rule information into rule files.

[0143] The loading module is configured to control the relational database to load the rule files to the rule engine.

[0144] The reading module is configured to control the rule engine to start the device service group to read device knowledge of device event triples of the graph database.

[0145] In an embodiment, the rule engine system 500 (the following module diagram is not shown) includes:

[0146] A second starting module is configured to control the device service group to activate the temporary manual rule mode and start a device timer after the device service group receives the external instruction of the temporary manual event through the rule engine.

[0147] A second sending module is configured to control the rule engine to receive the external device trigger event of the temporary manual event sent by the external terminal.

[0148] A third sending module is configured to determine whether the external device trigger event matches a rule file sent to the rule engine by a relational database, and ignore the event if not.

[0149] A second matching module is configured to determine whether a priority of the rule file can be executed when the external device trigger event matches the rule file, and ignore the event if not.

[0150] A second activation module is configured to determine whether the rule file is in an activated state when the priority of the rule file can be executed, and ignore the event if not.

[0151] A modification module is configured to control the rule engine to modify a time stamp of the activated state of the temporary manual rule mode again when the rule file is in the activated state.

[0152] A second calling module is configured to call a method of an associated device resource of the rule file.

[0153] A timing module is configured to control the device timer to time a preset time.

[0154] A third setting module is configured to determine whether a time range in the temporary manual rule mode exceeds the preset time, and set the temporary manual rule mode to an inactivated state if yes.

[0155] A continuing module is configured to continue the temporary manual rule mode when the time range in the temporary manual rule mode does not exceed the preset time.

[0156] In an embodiment, a time unit of the preset time is a second, a minute or an hour; the intelligent rod at least includes an intelligent rod edge computing unit or an intelligent rod gateway, and the time unit of the preset time is dynamically adjusted according to program content metadata of a playing unit connected to the intelligent rod edge computing unit or the intelligent rod gateway.

[0157] The embodiment of the present application further provides a computer device including a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor implements the rule engine method of the intelligent rod when executing the computer program.

[0158] The embodiments of the present application also provide a computer readable storage medium storing a computer program for executing the rule engine method of the intelligent rod.

[0159] The present application is described in reference to the flowchart and / or block diagram of the method, apparatus (which can also be system or device) and computer program product according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of the flows and / or blocks in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus generate a means for implementing the functions specified in the flowchart and / or block diagram. Figure 1 one or more flows and / or blocks Figure 1 an apparatus for performing the functions specified in the flowchart and / or block diagram.

[0160] These computer program instructions can also be stored in a computer readable memory that can direct the computer or other programmable data processing apparatus to work in a specific manner, so that the instructions stored in the computer readable memory produce a manufacture product including instruction apparatus, which implements the functions specified in the flowchart and / or block diagram. Figure 1 one or more flows and / or blocks Figure 1 an apparatus for performing the functions specified in the flowchart and / or block diagram.

[0161] These computer program instructions can also be loaded into a computer or other programmable data processing apparatus, so that a series of operation steps are performed on the computer or other programmable data processing apparatus to produce a computer implemented process, so that the instructions executed on the computer or other programmable data processing apparatus provide a means for implementing the functions specified in the flowchart and / or block diagram. Figure 1 one or more flows and / or blocks Figure 1 an apparatus for performing the functions specified in the flowchart and / or block diagram.

[0162] The above description is only a specific embodiment of the present application, but the protection scope of the present application is not limited to this. Any changes or replacements within the technical range disclosed by the present application can be easily thought by those skilled in the art, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A rule engine method for a smart pole, characterized in that, The rule engine method, which includes both manual and automatic modes, comprises: Determine whether an external terminal associated with the smart pole has exercised control over the device through an interactive operation interface. If yes, proceed to the manual mode; otherwise, proceed to the automatic mode. In the automatic mode, it is determined whether the rule engine receives a temporary manual event sent by the external terminal. If not, the automatic linkage rule mode is activated. When the rule engine receives the temporary manual event sent by the external terminal, it performs a temporary manual rule mode and executes the device control, wherein the priority of the temporary manual rule mode is higher than the priority of the automatic linkage rule mode; In the automatic linkage rule mode and in executing the device control rights, the rule engine method includes: The rule engine enables the service devices of the device service group, and the device service group reads device knowledge from the graph database. Based on the device knowledge, the device listener, the device timer, and the device attribute thresholds are activated. The device service group automatically triggers device events based on the device listener, the device timer, and the device attribute thresholds. The device service group sends device events, including device knowledge, to the rule engine via HTTP. Determine whether the rule file sent from the relational database to the rule engine matches the device event; if not, ignore the event. When the rule file and the device event match, obtain the associated device resources of the current rule file of the rule file; Determine whether the associated device resources are occupied by other rule files of the rule file; if not, set the status information of the current rule file to active state. When the associated device resource is occupied by other rule files of the rule file, determine whether the current rule file has the first priority; if not, ignore the event. When the current rule file has the highest priority, determine whether the current rule file is active. If it is, ignore the event. When the current rule file with the first priority is not activated, terminate the associated device resources of other rule files with the second priority, and return to the state where the status information of the current rule file is set to the activated state. A method for invoking the associated device resources of the current rule file; Determine whether the execution of the current rule file exceeds a time threshold. If not, after the method for associating the current rule file with device resources is completed, set the current rule file to an inactive state. Terminate the execution of the other rule files; Set the current rule file to an inactive state.

2. The rule engine method as described in claim 1, characterized in that, In the process of enabling service devices for the device service group by the rule engine, and the device service group reading device knowledge from the graph database, the rule engine method includes: Load rule information, including rule matching conditions, rule execution methods, rule execution priorities, and rule execution timeouts, from the relational database; parse the rule information and automatically convert it into a rule file; The relational database loads the rule file into the rule engine; The rule engine initiates the device service group to read device knowledge from the device event triples in the graph database.

3. The rule engine method as described in claim 1, characterized in that, In the temporary manual rule mode, the rule engine method includes: After the device service group receives the external instruction for the temporary manual event through the rule engine, the temporary manual rule mode is activated and the device timer is started; The rule engine receives the external device trigger event of the temporary manual event sent by the external terminal; Determine whether the event triggered by the external device matches the rule file sent from the relational database to the rule engine; if not, ignore the event. When the event triggered by the external device matches the rule file, it is determined whether the priority of the rule file allows for execution; if not, the event is ignored. If the priority of the rule file is sufficient for execution, determine whether the rule file is active; if not, ignore the event. When the rule file is active, the rule engine re-modifies the timestamp of the activation state of the temporary manual rule mode; A method for invoking the associated device resources of the rule file; The device timer is used to preset a time; Determine whether the time range of the temporary manual rule mode exceeds the preset time; if so, set the temporary manual rule mode to an inactive state. If the time range of the temporary manual rule mode does not exceed the preset time, the temporary manual rule mode continues.

4. The rule engine method as described in claim 3, characterized in that, The preset time is in seconds, minutes, or hours; the smart pole includes at least a smart pole edge computing unit or a smart pole gateway, and the preset time is dynamically adjusted based on the program content metadata of the playback unit connected to the smart pole edge computing unit or the smart pole gateway.

5. A rule engine system for a smart pole, characterized in that, The rule engine system, which features both manual and automatic modes, includes: The execution module is used to determine whether an external terminal associated with the smart pole has exercised control over the device through an interactive operation interface. If yes, it enters the manual mode; otherwise, it enters the automatic mode. The judgment module is used to determine whether the rule engine receives a temporary manual event sent by the external terminal in the automatic mode; if not, it performs automatic linkage rule mode. The receiving module, when the rule engine receives the temporary manual event sent by the external terminal, performs a temporary manual rule mode and executes the device control, wherein the priority of the temporary manual rule mode is higher than the priority of the automatic linkage rule mode; The module is used to control the rule engine to enable service devices for the device service group, and the device service group reads device knowledge from the graph database; The first startup module is used to start a device listener, a device timer, and a device attribute threshold based on the device knowledge. The device service group automatically triggers device events based on the device listener, the device timer, and the device attribute threshold. The first sending module is used to control the device service group to send device events, including device knowledge, to the rule engine via HTTP. The first matching module is used to determine whether the rule file sent from the relational database to the rule engine matches the device event; if not, the event is ignored. The acquisition module is used to acquire the associated device resources of the current rule file of the rule file when the rule file and the device event match. The first occupancy module is used to determine whether the associated device resources are occupied by other rule files of the rule file. If not, the status information of the current rule file is set to active. The second occupancy module is used to determine whether the current rule file is the first priority when the associated device resource is occupied by other rule files of the rule file; if not, the event is ignored. The first activation module is used to determine whether the current rule file is active when the current rule file has the highest priority; if so, the event is ignored. The first termination module is used to terminate the associated device resources of other rule files with second priority when the current rule file with first priority is not activated, and return to the state of setting the current rule file to the activated state. The first calling module is used to call the associated device resources of the current rule file; The first setting module is used to determine whether the execution of the current rule file exceeds a time threshold. If not, after the method for associating the device resources of the current rule file is completed, the current rule file is set to an inactive state. The second termination module is used to terminate the execution of the other rule files; The second setting module is used to set the current rule file to an inactive state.

6. The rule engine system as described in claim 5, characterized in that, The rule engine system includes: The parsing module is used to load rule information, including rule matching conditions, rule execution methods, rule execution priorities, and rule execution timeouts, from the relational database, parse the rule information, and automatically convert it into a rule file; A loading module is used to control the relational database to load the rule file into the rule engine; The reading module is used to control the rule engine to start the device service group to read the device knowledge of the device event triples in the graph database.

7. The rule engine system as described in claim 5, characterized in that, The rule engine system includes: The second startup module is used to control the device service group to activate the temporary manual rule mode and start the device timer after receiving the external instruction of the temporary manual event through the rule engine; The second sending module is used to control the rule engine to receive the external device triggering event of the temporary manual event sent by the external terminal; The third sending module is used to determine whether the external device triggering event matches the rule file sent from the relational database to the rule engine; if not, the event is ignored. The second matching module is used to determine whether the priority of the rule file can be executed when the event triggered by the external device matches the rule file; if not, the event is ignored. The second activation module is used to determine whether the rule file is in an active state when the priority of the rule file can be executed; if not, the event is ignored. The modification module is used to control the rule engine to re-modify the timestamp of the activation state of the temporary manual rule mode when the rule file is in an active state. The second calling module is used to call the associated device resources of the rule file; The timing module is used to control the device's timer to preset the time. The third setting module is used to determine whether the time range of the temporary manual rule mode exceeds the preset time. If so, the temporary manual rule mode is set to an inactive state. The continuation module is used to continue the temporary manual rule mode when the time range of the temporary manual rule mode does not exceed the preset time.

8. The rule engine system as described in claim 7, characterized in that, The preset time is in seconds, minutes, or hours; the smart pole includes at least a smart pole edge computing unit or a smart pole gateway, and the preset time is dynamically adjusted based on the program content metadata of the playback unit connected to the smart pole edge computing unit or the smart pole gateway.

Citation Information

Patent Citations

  • Control device of electrically operated valve of nuclear power station and control method

    CN101783194A

  • Photographing processing method, device and equipment

    CN105933596A