CN115378810A - Rule dynamic updating method and device, computer equipment and storage medium - Google Patents

Rule dynamic updating method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN115378810A
CN115378810A CN202211007803.0A CN202211007803A CN115378810A CN 115378810 A CN115378810 A CN 115378810A CN 202211007803 A CN202211007803 A CN 202211007803A CN 115378810 A CN115378810 A CN 115378810A
Authority
CN
China
Prior art keywords
rule
strategy
execution
information
priority
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211007803.0A
Other languages
Chinese (zh)
Inventor
彭宏飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Miracle Intelligent Network Co Ltd
Original Assignee
Shenzhen Miracle Intelligent Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Miracle Intelligent Network Co Ltd filed Critical Shenzhen Miracle Intelligent Network Co Ltd
Priority to CN202211007803.0A priority Critical patent/CN115378810A/en
Publication of CN115378810A publication Critical patent/CN115378810A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0893Assignment of logical groups to network elements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application relates to a method and a device for dynamically updating rules, computer equipment and a storage medium. The method comprises the following steps: receiving a plurality of rule strategies transmitted by a server and storing the rule strategies in a rule base; circularly reading the rule information in the rule base, selecting a rule strategy according to the priority in the rule information, and controlling the operation of the execution equipment; monitoring the operation process of the execution equipment, and recording the information of the execution process; counting the execution process information, and acquiring the execution condition of each selected rule strategy and the statistical data of a trigger source; according to the statistical data, acquiring the activity of each rule strategy in the rule base, and dynamically updating the priority of the rule strategies in the rule information according to the activity; and generating a new rule strategy and writing the new rule strategy into a rule base. The invention dynamically modifies the rules and the execution priority thereof according to the activity statistics of the rule strategy, and schedules and executes the rules according to the adjusted rule information, thereby enabling each intelligent pole to have an independent control strategy.

Description

Rule dynamic updating method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of intelligent system technologies, and in particular, to a method and an apparatus for dynamically updating rules, a computer device, and a storage medium.
Background
The rule engines of the existing intelligent rod system in the intelligent garden, no matter the rule engines at the cloud end or the edge end are statically solidified in the execution equipment, and the information of the rule engines can be only modified manually. The rule engine information comprises a device service for executing the rule and calling the handling rule, the priority for executing the rule and the execution time period of the rule.
Thus at least the drawbacks with existing rule engine configurations include: all the rule engines are statically stored in the execution equipment in a manual configuration mode; static rule information is modified in an artificial subjective mode, and cannot be dynamically changed according to a certain reference basis; the rule change basis is that log changes can only be performed manually by the rule.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a dynamic rule updating method, apparatus, computer device and storage medium for dynamically updating the execution priority of a rule by counting the rule activity within a predetermined time, and generating a new association rule, so as to reschedule and execute the rule according to the updated rule.
A dynamic rule updating method is applied to an edge end, the edge end is connected with a server end, and the edge end is used for controlling at least one execution device on an intelligent rod to operate; the dynamic rule updating method comprises the following steps:
receiving a plurality of rule strategies transmitted by a server, and storing the rule strategies and corresponding rule information in a rule base;
circularly reading the rule information in the rule base by adopting a polling algorithm, selecting a rule strategy according to the priority in the rule information, and controlling the execution equipment to operate according to the selected rule strategy;
monitoring the operation process of the execution equipment, and recording the execution process information of the selected rule strategy during execution;
counting the execution process information in a preset period to obtain the execution condition of each selected rule strategy and the statistical data of a trigger source;
according to the statistical data, after the activity of each rule strategy in a rule base is obtained, the priority of the rule strategy in the rule information is dynamically updated according to the activity of each rule strategy;
and generating a new rule strategy according to the statistical data of the trigger source, and writing the new rule strategy into a rule base.
In one embodiment, the step of selecting a rule policy according to the priority in the rule information and controlling the execution device to operate according to the selected rule policy includes:
and aiming at the same execution equipment, in a preset period, when more than two rule strategies are met, selecting the rule strategy with high priority according to the priority of the rule strategy so as to control the execution equipment to operate.
In one embodiment, the step of selecting a rule policy according to the priority in the rule information and controlling the execution device to operate according to the selected rule policy includes: when more than two rule strategies need to call the same equipment service resource at the same time, the rule strategy with high priority is selected to call the equipment service resource so as to control the execution equipment to operate.
In one embodiment, the executing the process information includes: the selected rule policies are, when executed, start and stop times, timestamps, execution start status, execution result status, device GIS location, and priority.
In one embodiment, the step of counting the execution process information in a predetermined period to obtain the execution condition of each selected rule policy and the statistical data of the trigger source includes:
according to the execution starting state and the execution result state in the execution process information, acquiring statistical data of the execution conditions including complete execution and interrupted execution in a preset period to determine the activity of each rule strategy in the preset period; and
and comparing the execution process information with the rule information in the rule base to obtain a trigger source of the selected rule strategy.
In one embodiment, the step of raising or lowering the priority of the rule policy comprises:
acquiring the activity of each rule strategy in the rule base in a preset period;
aiming at more than two rule strategies for controlling the operation of the same execution equipment;
when the activity of the rule strategy with the low priority is higher than that of the rule strategy with the high priority, the priority of the rule strategy with the high activity is improved and is higher than that of the rule strategy with the high priority;
and when the activity of the rule strategy with the low priority is lower than that of the rule strategy with the high priority, the priority of the rule strategy with the low priority is adjusted to be lowest or deleted.
In one embodiment, the step of generating a new rule policy based on the statistics of the trigger source comprises:
acquiring statistical data of the selected rule strategy triggered and executed according to a trigger source;
and when the trigger source exceeds a preset threshold value in the preset period and the statistical data executed by the trigger rule strategy, dynamically generating a trigger linkage disposal rule strategy, and writing the trigger linkage disposal rule strategy into a rule base.
An apparatus for dynamically updating rules, the apparatus comprising: the rule updating system comprises a rule receiving module, a rule engine module, a rule monitoring module, a data statistics module, a rule updating module and a rule generating module;
the rule receiving module is used for receiving a plurality of rule strategies transmitted by the server and storing the rule strategies and corresponding rule information in a rule base;
the rule engine module is used for circularly reading the rule information in the rule base by adopting a polling algorithm, selecting a rule strategy according to the priority in the rule information and controlling the execution equipment to operate according to the selected rule strategy;
the rule monitoring module is used for monitoring the operation process of the execution equipment and recording the execution process information of the selected rule strategy during execution;
the data statistics module is used for carrying out statistics on the execution process information in a preset period so as to obtain the execution condition of each selected rule strategy and the statistical data of the trigger source;
the rule updating module is used for dynamically updating the priority of the rule strategies in the rule information according to the activity of each rule strategy after acquiring the activity of each rule strategy in the rule base according to the statistical data;
and the rule generating module is used for generating a new rule strategy according to the statistical data of the trigger source and writing the new rule strategy into the rule base.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
receiving a plurality of rule strategies transmitted by a server, and storing the rule strategies and corresponding rule information in a rule base;
circularly reading the rule information in the rule base by adopting a polling algorithm, selecting a rule strategy according to the priority in the rule information, and controlling the execution equipment to operate according to the selected rule strategy;
monitoring the operation process of the execution equipment, and recording the execution process information of the selected rule strategy during execution;
counting the execution process information in a preset period to obtain the execution condition of each selected rule strategy and the statistical data of a trigger source;
according to the statistical data, after the activity of each rule strategy in the rule base is obtained, the priority of the rule strategy in the rule information in the rule base is dynamically updated according to the activity of each rule strategy;
and generating a new rule strategy according to the statistical data of the trigger source, and writing the new rule strategy into a rule base.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
receiving a plurality of rule strategies transmitted by a server, and storing the rule strategies and corresponding rule information in a rule base;
circularly reading the rule information in the rule base by adopting a polling algorithm, selecting a rule strategy according to the priority in the rule information, and controlling the execution equipment to operate according to the selected rule strategy;
monitoring the operation process of the execution equipment, and recording the execution process information of the selected rule strategy during execution;
counting the execution process information in a preset period to obtain the execution condition of each selected rule strategy and the statistical data of a trigger source;
according to the statistical data, after the activity of each rule strategy in the rule base is obtained, the priority of the rule strategy in the rule information is dynamically updated according to the activity of each rule strategy;
and generating a new rule strategy according to the statistical data of the trigger source, and writing the new rule strategy into a rule base.
By adopting the rule dynamic updating method, the rule dynamic updating device, the computer equipment and the storage medium, the following beneficial effects are achieved:
by receiving the rule strategies transmitted by the server side, unified deployment control of the server side on all the intelligent pole execution devices can be obtained, further the workload is reduced, and the initial rule strategies corresponding to the execution devices can be obtained only by carrying out unified deployment on the server.
The rule information is stored in the rule base and is stored in a fixed format, so that various rule strategies can be conveniently stored, modified and called.
By adopting the polling algorithm to circularly read the rule information in the rule base, the missing use of the rule strategies is reduced, and meanwhile, the distribution control is balanced, so that each rule strategy can be executed when the triggering condition is met. And the priority is set for each rule strategy, when two rule strategies conflict in the execution process, the rule strategy with high priority can be called preferentially, and the rule strategy with low priority in the effective time can be stopped or suspended.
By monitoring the execution equipment, the rule strategies used by the execution equipment in the operation process and the execution process information corresponding to the rule strategies are conveniently recorded, and thus the activity statistics of various rule strategies before the dynamic update of the rules is facilitated.
The execution process information in the preset period is counted, so that different statistical data can be obtained for different time periods, and different modification and updating strategies are adopted.
Due to the adoption of the statistical data of the activity of the rule strategies in the preset period, the priority of each rule strategy is modified and updated according to different activities, so that the operation of the execution equipment is controlled conveniently, unnecessary analysis and judgment are reduced, for example, the priority of the rule strategy with low activity and low priority can be adjusted to the lowest level due to the dynamic updating rule of the application, or the rule strategy is deleted, so that the consumption of resources is reduced.
Drawings
FIG. 1 is a diagram of an application environment of a dynamic rule update method in one embodiment;
FIG. 2 is a flow diagram illustrating a dynamic rule update method in accordance with one embodiment;
FIG. 3 is a block diagram of an apparatus for dynamically updating rules in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
As shown in fig. 1, an embodiment of the present application provides a rule dynamic update method, which is applied to an edge. The edge end is applied to the smart pole system. The intelligent pole system comprises a client 10, a server 20 and a plurality of edge terminals 30, wherein the edge terminals 30 are connected with the server 20, and each edge terminal 30 is used for controlling the operation of at least one execution device on the intelligent pole. The client 10 is connected to the server, and the client 10 may be a desktop computer, a notebook computer, a tablet computer, a smart phone, or other electronic devices capable of implementing network connection, which is not limited herein. The server 20 and the edge 30 establish network connection, which may be established in a 2G/3G/4G/5G, WIFI, or other manners, and is used to uniformly deploy the initial rule policies that may be required by the intelligent poles to the edge 30 of each intelligent pole.
Further, since the execution devices with different requirements are deployed on the smart poles at different positions, if the rule policies required by the corresponding execution devices are deployed for each smart pole, a large amount of manpower and material resources are consumed, in the embodiment, during the early operation, the server 20 is directly utilized to uniformly deploy the rule policies, that is, a plurality of rule policies for different execution devices are established on the server 20 in advance through the client 10, and then all the edge ends 30 are uniformly deployed through the server 20, so that the rule policies received by the edge ends 30 on the smart poles at any positions from the server 20 are all consistent. Also, the rule policies received from the server 20 correspond to all types of enforcement devices possible, regardless of whether there is no corresponding enforcement device on the smart stick.
The execution device in this embodiment may include, but is not limited to, at least one of an intelligent light, an information publishing screen, a sound post, a camera, a sensor, an intelligent door lock, and an intelligent air switch. For the above execution device, the rule policy in this embodiment may include, but is not limited to: the intelligent control system comprises a lamp control timing strategy, an information release timing strategy, a sound post broadcasting timing strategy, a camera shooting identification linkage disposal strategy, a temperature sensor threshold value linkage strategy, an intelligent door lock opening and closing linkage strategy and an intelligent air switch energy consumption statistics linkage strategy.
In one embodiment, as shown in fig. 2, the present application provides a dynamic rule updating method including the following steps.
Step S100, receiving a plurality of rule strategies transmitted by a server, and storing the rule strategies and corresponding rule information in a rule base;
step S200, circularly reading the rule information in the rule base by adopting a polling algorithm, selecting a rule strategy according to the priority in the rule information, and controlling the execution equipment to operate according to the selected rule strategy;
step S300, monitoring the operation process of the execution equipment, and recording the execution process information of the selected rule strategy during execution;
step S400, counting the execution process information in a preset period to obtain the execution condition of each selected rule strategy and the statistical data of a trigger source;
step S500, after the activity of each rule strategy in the rule base is obtained according to the statistical data, the priority of the rule strategy in the rule information is dynamically updated according to the activity of each rule strategy;
step S600, generating a new rule strategy according to the statistical data of the trigger source, and writing the new rule strategy into a rule base.
In step S100, a plurality of rule policies transmitted by the server are received, and the rule policies and corresponding rule information are stored in a rule base.
In one embodiment, the rule information corresponding to the rule policy is stored in the rule base according to a predetermined RDF format. The RDF format is an abbreviation of resource description framework (resource description framework), and is a language for expressing information about resources on the world wide Web (WorldWideWeb), and is used for expressing metadata about Web resources, such as an available schedule of a Web page, and the like.
In one embodiment, the rule policy may include: the intelligent control system comprises a lamp control timing strategy, an information release timing strategy, a sound post broadcasting timing strategy, a camera shooting identification linkage disposal strategy, a temperature sensor threshold value linkage strategy, an intelligent door lock opening and closing linkage strategy and an intelligent air switch energy consumption statistics linkage strategy, namely, the execution equipment on the intelligent rod can comprise one or more of an intelligent lamp, an information release screen, a sound post, a camera, a sensor, an intelligent door lock and an intelligent air switch.
In step S200, a polling algorithm is used to cyclically read the rule information in the rule base, select a rule policy according to the priority in the rule information, and control the execution device to operate according to the selected rule policy.
In one embodiment, the rule information includes a priority of the rule policy in addition to the control instruction corresponding to the rule policy. Rule information of a rule policy for controlling smart lamps as shown in table 1 below:
rule policy name Trigger source Execution policy Priority level GIS location
Lamp controlled timing strategy Control instruction 18 o 'clock-21 o' clock start Level 1 Coordinates [ a, b, c ]]
Lamp sound control strategy Sound sensor 3 minutes Stage 2 Coordinates [ a, b, c ]]
TABLE 1
When the same equipment service resource is involved, or different rule policies of the same executive equipment are executed according to priority configuration aiming at different rule policies of different executive equipment. For example, different rule policies for controlling an execution device include a policy one and a policy two, where the priority of the policy one is higher than that of the policy two, and when the policy one and the policy two all satisfy a condition for controlling the execution device to operate, the policy one is preferentially adopted to control the execution device to operate.
Further, the polling algorithm in this embodiment means that the CPU at the edge sends out an inquiry at regular time, sequentially inquires each rule policy, determines whether the start condition of the operation of the execution device is satisfied currently, and controls the operation of the execution device according to the rule policy if the start condition is satisfied, otherwise, continues the inquiry of the next rule policy, and then continuously and repeatedly controls the execution device on the smart stick.
Aiming at the operation or calling of the same execution equipment, two rule strategies are avoided being adopted at the same time.
In one embodiment, the step of selecting the rule policy according to the priority in the rule information and controlling the execution device to operate according to the selected rule policy comprises: and aiming at the same execution equipment, in a preset period, when more than two rule strategies are met, selecting the rule strategy with high priority according to the priority of the rule strategy so as to control the execution equipment to operate.
In one embodiment, the step of selecting a rule policy according to the priority in the rule information and controlling the execution device to operate according to the selected rule policy further includes: when the same equipment service resource needs to be called at the same time by more than two rule strategies, the rule strategy with the high priority is selected to call the equipment service resource so as to control the execution equipment to operate.
In step S300, the operation process of the execution device is monitored, and the execution process information of the selected rule policy during execution is recorded.
In the process of controlling the execution device to operate by using the rule policy, the edge terminal in this embodiment also monitors the operating execution device, obtains the rule policy adopted by the execution device in the operation process, and records the start-stop time, the timestamp, the execution start state, the execution result state, the device GIS position, and the priority of the rule policy in the execution process. That is, the execution procedure information includes: the selected rule policies include start-stop time when executed, timestamp, execution start status, execution result status, device GIS location, and priority.
The starting time and the ending time represent a starting time node and an ending time node of the rule strategy; the time stamp represents the time period for which the current rule policy is executed, and the time period may or may not be the time period for which the rule policy is completely executed; the execution starting state represents the state of the execution equipment before the rule strategy is utilized, and may be the state of being operated by utilizing another rule strategy or not being started to operate; the execution result state represents that the rule strategy is completely executed or not completely executed; the priority corresponds to a priority in the rule information of the rule policy in the rule base.
In step S400, statistics is performed on the execution process information in a predetermined period, and the execution condition of each selected rule policy and the statistical data of the trigger source are obtained.
In one example, the execution process information includes start and end times, timestamps, execution start status, execution result status, device GIS location, and priority of each rule policy in the execution process. Such as one of the lamp control implementation procedures information shown in table 2 below.
Start and end time Time stamp Execution start state Execution result state Device GIS location Priority level
18:00;21:00 18:00-21:00 The intelligent lamp is started Complete execution Coordinates [ a, b, c ]] Level 1
17:58;18:00 17:58-18:00 Smart light off Is broken down Coordinates [ a, b, c ]] Stage 2
TABLE 2
The execution situation of the selected rule strategy can be known through the execution process information, such as complete execution and interrupted execution, wherein the interrupted execution is represented as the execution situation interrupted by the rule strategy with high priority in the execution process. And the complete execution is expressed as the starting and ending time and the timestamp are consistent with the preset rule information. An example of interruption by a high priority rule policy during execution is as follows:
the priority of the lamp control timing strategy is 1 level, and the time is 18 to 00; the priority of the lamp sound control strategy is level 2, and the triggering reasons are that the light value is lower than the preset light threshold value, the pedestrian passes through the sound, and the sound lasts for three minutes after the pedestrian passes through the sound. When in 17. And further, when the conditions of the lamp control timing strategy and the lamp control sound strategy are analyzed, the numerical expression is as follows, the activity value when the execution condition of the rule strategy is met is 1, the activity value of the complete execution is 1, the activity value when the execution process is interrupted is 0.5, and the like, so that the activity of the rule strategy prestored in the rule base in the preset period can be obtained.
In another example, the execution process information of each selected rule policy is compared and analyzed through a rule base, and the trigger source of the selected rule policy is obtained. The trigger source in this embodiment may be some emergency event detected by the sensor. For example, the well lid position sensor is used for detecting the overturning angle of the well lid, and when the overturning angle is smaller than 15 degrees, the current well lid is in a low risk state; when the well lid is turned over at 15-30 degrees, the current well lid is in a danger state; when the well lid upset is higher than 30 degrees, indicate that present well lid is in high risk state. If the well lid is detected to be in the high risk state, the information issuing screen is required to remind the user. Therefore, the event that the information issuing screen issues the notice reminding is obtained, the triggering source is the fact that the overturning angle of the well lid is in the middle and high risk, and then the triggering source for issuing the notice reminding by the information issuing screen is counted, namely the event that the well lid is overturned to be in the middle and high risk is counted.
Further, in the embodiment, the rule strategy is dynamically updated, not all historical data but the closest time period is selected, which is beneficial to the control and adjustment of the intelligent pole aiming at the current environment. For example, different dark periods in winter and summer may require outdoor lighting to control the start of the intelligent lamp, so that statistical data in a closest cycle time may be selected to regulate and control the current rule policy.
In this embodiment, the step of counting the execution process information in the predetermined period to obtain the execution condition of each selected rule policy and the statistical data of the trigger source includes:
according to the execution starting state and the execution result state in the execution process information, acquiring statistical data of the execution conditions including complete execution and interrupted execution in a preset period to determine the activity of each rule strategy in the preset period; and
and comparing the execution process information with the rule information in the rule base to obtain a trigger source of the selected rule strategy.
Further, when an execution situation occurs in which a rule policy is interrupted during execution, which is equivalent to control or invocation on the same execution device, at least two associated rule policies occur, and the priority of the rule policy executed in the front is lower than that of the rule policy executed in the back. When the rule strategy with low priority executed at the present time controls the execution equipment to operate, the rule strategy with high priority at the back also meets the requirement of controlling the execution equipment to operate, and the rule strategy with high priority at the present time interrupts the execution state of the rule strategy with low priority, namely, the execution process of the rule strategy with low priority at the front is interrupted, and the rule strategy with high priority at the back completely executes the control execution equipment when no rule strategy with higher priority is met. Therefore, the execution starting state of the rule policy with the lower priority may be none, or the rule policy with the lower priority may be before, and the execution result state in the execution case may be interrupted or incomplete. The execution starting state of the rule policy with the higher priority at the back can be that the rule policy with the lower priority at the front controls the execution equipment to operate, and the execution result state can be complete execution or interrupted by the rule policy with the higher priority at the back.
The execution devices in this embodiment all have a trigger source when being controlled and run by the rule policy, for example, a preset timing control instruction, a light voice control instruction, and a light instruction. For example, utilize light instruction control intelligence lamp to start, the intelligence lamp starts according to light, so the trigger source can be the light that light sensor detected, for example again, utilize light acoustic control instruction control intelligence lamp to start, the intelligence lamp starts according to light and acoustic control, so the trigger source can be the light that light sensor detected to and the sound signal that acoustic control sensor detected. In the execution process information, a trigger source is not provided, and in this embodiment, the execution process information is compared with the rule base to obtain the trigger source of the selected rule policy, that is, the starting condition of the intelligent lamp.
In step S500, after the activity of each rule policy in the rule base is obtained according to the statistical data, the priority of the rule policy in the rule information is dynamically updated according to the activity of each rule policy. And acquiring the activity of each rule strategy in the rule base of the current intelligent pole in a preset period according to the statistical data, wherein the activity comprises the complete execution times and the interrupted execution times of each rule strategy.
In one embodiment, the step of raising or lowering the priority of the rule policy comprises:
acquiring the activity of each rule strategy in the rule base in a preset period; aiming at more than two rule strategies for controlling the operation of the same executing equipment, when the activity degree of the rule strategy with low priority is higher than that of the rule strategy with high priority, the priority of the rule strategy with high activity degree is improved and is higher than that of the rule strategy with high priority, so that the control switching of the executing equipment is reduced, the power consumption is reduced, and each intelligent pole has a control strategy suitable for the current position; when the activity of the rule strategy with the low priority is lower than that of the rule strategy with the high priority, the priority of the rule strategy with the low priority is adjusted to be the lowest or deleted, and therefore consumption of equipment resources is reduced.
In step S500, a new rule policy is generated according to the statistical data of the trigger source, and is written into the rule base. And acquiring the activity of each rule strategy in the rule base of the current intelligent pole in a preset period according to the statistical data, wherein the activity comprises the triggering and starting times of each rule strategy.
In one embodiment, the step of generating a new rule policy based on the statistics of the trigger source comprises:
and acquiring statistical data triggered and executed by the selected rule strategy according to the trigger source, and dynamically generating a trigger linkage disposal rule strategy and writing the trigger linkage disposal rule strategy into a rule base when the trigger source triggers and executes the statistical data of the rule strategy in a preset period and the statistical data of the trigger rule strategy exceeds a preset threshold value.
In addition, the step of the dynamic rule updating method in this embodiment further includes: and transmitting the dynamically updated rule information to the server side so that the server side deploys the rule information corresponding to the rule strategy according to the intelligent pole of the same application scene. Namely, according to the activity of the rule strategy and the GIS position information, the intelligent poles of the same type of GIS position information are configured with the rule strategy.
In one embodiment, as shown in fig. 3, there is provided a dynamic rule updating apparatus, including: the rule updating system comprises a rule receiving module 100, a rule engine module 200, a rule monitoring module 300, a data statistics module 400, a rule updating module 500 and a rule generating module 600. Wherein:
the rule receiving module 100 is configured to receive a plurality of rule policies transmitted by a server, and store the rule policies and corresponding rule information in a rule base.
And the rule engine module 200 is configured to cyclically read the rule information in the rule base by using a polling algorithm, select a rule policy according to a priority in the rule information, and control the execution device to operate according to the selected rule policy.
The rule monitoring module 300 is configured to monitor an operation process of the execution device, and record execution process information of the selected rule policy during execution.
The data statistics module 400 is configured to perform statistics on the execution process information in a predetermined period to obtain the execution conditions of the selected rule policies and the statistical data of the trigger sources.
And the rule updating module 500 is configured to, after obtaining the activity of each rule policy in the rule base according to the statistical data, dynamically update the priority of the rule policy in the rule information according to the activity of each rule policy.
And a rule generating module 600, configured to generate a new rule policy according to the statistical data of the trigger source, and write the new rule policy into the rule base.
For the specific definition of the dynamic rule updating apparatus, reference may be made to the above definition of the dynamic rule updating method, which is not described herein again. The various modules in the dynamic update of rules apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is for storing rule information data of the rule policy. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method for dynamic update of rules.
In one embodiment, a computer device is provided, which may be a terminal including a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method for dynamic update of rules. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the configurations presented in this example do not constitute a limitation of the computing devices to which the present solution applies, and that a particular computing device may include more or less components than those shown, or some components may be combined, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
receiving a plurality of rule strategies transmitted by a server, and storing the rule strategies and corresponding rule information in a rule base;
circularly reading the rule information in the rule base by adopting a polling algorithm, selecting a rule strategy according to the priority in the rule information, and controlling the execution equipment to operate according to the selected rule strategy;
monitoring the operation process of the execution equipment, and recording the execution process information of the selected rule strategy during execution;
counting the execution process information in a preset period to obtain the execution condition of each selected rule strategy and the statistical data of a trigger source;
and after the activity of each rule strategy in the rule base is obtained according to the statistical data, the priority of the rule strategy in the rule information is dynamically updated according to the activity of each rule strategy, and a new rule strategy is generated according to the statistical data of the trigger source and written into the rule base.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, performs the steps of:
receiving a plurality of rule strategies transmitted by a server, and storing the rule strategies and corresponding rule information in a rule base;
circularly reading the rule information in the rule base by adopting a polling algorithm, selecting a rule strategy according to the priority in the rule information, and controlling the execution equipment to operate according to the selected rule strategy;
monitoring the operation process of the execution equipment, and recording the execution process information of the selected rule strategy during execution;
counting the execution process information in a preset period to obtain the execution condition of each selected rule strategy and the statistical data of a trigger source;
according to the statistical data, after the activity degree of each rule strategy in the rule base is obtained, the priority of the rule strategy in the rule information is dynamically updated according to the activity degree of each rule strategy;
and generating a new rule strategy according to the statistical data of the trigger source, and writing the new rule strategy into a rule base.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by hardware that is instructed by a computer program, and the computer program may be stored in a non-volatile computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above examples only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A rule dynamic updating method is applied to an edge end, and the edge end is used for controlling at least one executing device on a smart pole to operate; the dynamic rule updating method is characterized by comprising the following steps:
receiving a plurality of rule strategies transmitted by a server, and storing the rule strategies and corresponding rule information in a rule base;
circularly reading the rule information in the rule base by adopting a polling algorithm, selecting the rule strategy according to the priority in the rule information, and controlling the execution equipment to operate according to the selected rule strategy;
monitoring the operation process of the execution equipment, and recording the execution process information of the selected rule strategy during execution;
counting the execution process information in a preset period to obtain the execution condition of each selected rule strategy and the statistical data of a trigger source;
according to the statistical data, after the activity degree of each rule strategy in the rule base is obtained, the priority of the rule strategy in the rule information is dynamically updated according to the activity degree of each rule strategy;
and generating a new rule strategy according to the statistical data of the trigger source, and writing the new rule strategy into the rule base.
2. The dynamic rule updating method according to claim 1, wherein the step of selecting the rule policy according to the priority in the rule information and controlling the execution device to operate according to the selected rule policy comprises:
and aiming at the same execution equipment, in a preset period, when more than two rule strategies are met, selecting the rule strategy with high priority according to the priority of the rule strategy so as to control the execution equipment to operate.
3. The dynamic rule updating method according to claim 1, wherein the step of selecting the rule policy according to the priority in the rule information and controlling the execution device to operate according to the selected rule policy comprises:
when the same equipment service resource needs to be called at the same time by more than two rule strategies, the rule strategy with the higher priority is selected to call the equipment service resource so as to control the execution equipment to operate.
4. The dynamic rule updating method of claim 1, wherein the execution procedure information comprises: the rule policies selected include start and stop times when executed, timestamps, execution start status, execution result status, device GIS location, and priority.
5. The dynamic rule updating method according to claim 1, wherein the step of performing statistics on the execution procedure information in a predetermined period to obtain the execution status of each selected rule policy and the statistical data of the trigger source comprises:
according to the execution starting state and the execution result state in the execution process information, acquiring statistical data of the execution conditions including complete execution and interrupted execution in a preset period to determine the activity of each rule strategy in the preset period; and
and comparing the execution process information with the rule information in the rule base to obtain a trigger source of the selected rule strategy.
6. The dynamic rule updating method according to claim 1, wherein the step of dynamically updating the priority of the rule policy in the rule information comprises:
acquiring the activity of each rule strategy in the rule base in a preset period;
for more than two of said rule policies controlling the operation of the same said enforcement device,
when the activity of the rule strategy with low priority is higher than that of the rule strategy with high priority, the priority of the rule strategy with high activity is improved and is higher than the original rule strategy with high priority;
when the activity of the rule strategy with low priority is lower than that of the rule strategy with high priority, the priority of the rule strategy with low priority is adjusted to be lowest or deleted.
7. The dynamic rule updating method of claim 1, wherein the step of generating a new rule policy based on the statistics of the trigger source comprises:
acquiring statistical data of the trigger execution of the selected rule strategy according to the trigger source;
and when the trigger source triggers the statistical data executed by the rule strategy to exceed a preset threshold value in a preset period, dynamically generating a trigger linkage disposal rule strategy, and writing the trigger linkage disposal rule strategy into the rule base.
8. An apparatus for dynamically updating rules, the apparatus comprising:
the rule receiving module is used for receiving a plurality of rule strategies transmitted by the server and storing the rule strategies and corresponding rule information in a rule base;
the rule engine module is used for circularly reading the rule information in the rule base by adopting a polling algorithm, selecting the rule strategy according to the priority in the rule information and controlling the execution equipment to operate according to the selected rule strategy;
the rule monitoring module is used for monitoring the operation process of the execution equipment and recording the execution process information of the selected rule strategy during execution;
the data statistics module is used for carrying out statistics on the execution process information in a preset period so as to obtain the execution condition of each selected rule strategy and the statistical data of a trigger source;
a rule updating module, configured to dynamically update the priority of the rule policy in the rule information according to the activity of each rule policy after obtaining the activity of each rule policy in the rule base according to the statistical data;
and the rule generating module is used for generating a new rule strategy according to the statistical data of the trigger source and writing the new rule strategy into the rule base.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN202211007803.0A 2022-08-22 2022-08-22 Rule dynamic updating method and device, computer equipment and storage medium Pending CN115378810A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211007803.0A CN115378810A (en) 2022-08-22 2022-08-22 Rule dynamic updating method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211007803.0A CN115378810A (en) 2022-08-22 2022-08-22 Rule dynamic updating method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115378810A true CN115378810A (en) 2022-11-22

Family

ID=84067938

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211007803.0A Pending CN115378810A (en) 2022-08-22 2022-08-22 Rule dynamic updating method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115378810A (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5671361A (en) * 1995-09-28 1997-09-23 University Of Central Florida Priority rule search technique for resource constrained project scheduling
US20060010217A1 (en) * 2004-06-04 2006-01-12 Business Instruments Corp. System and method for dynamic adaptive user-based prioritization and display of electronic messages
CN101739248A (en) * 2008-11-13 2010-06-16 国际商业机器公司 Method and system for executing rule set
CN103365871A (en) * 2012-03-29 2013-10-23 北京恒安永通科技有限公司 Automatic generation method of rules
WO2013186851A1 (en) * 2012-06-12 2013-12-19 三菱電機株式会社 Information processing system
CN104376365A (en) * 2014-11-28 2015-02-25 国家电网公司 Method for constructing information system running rule libraries on basis of association rule mining
US20180113979A1 (en) * 2016-10-24 2018-04-26 Caradigm Usa Llc Safe parallelized ingestion of data update messages, such as hl7 messages
CN109783202A (en) * 2017-11-15 2019-05-21 阿里巴巴集团控股有限公司 Event-handling method, system, equipment and storage medium
US20190294475A1 (en) * 2018-03-23 2019-09-26 Imagination Technologies Limited Common Priority Information for Multiple Resource Arbitration
CN110704037A (en) * 2019-08-28 2020-01-17 贵州医渡云技术有限公司 Rule engine implementation method and device
CN114757645A (en) * 2022-04-15 2022-07-15 深圳奇迹智慧网络有限公司 Intelligent rod system
CN114785601A (en) * 2022-04-25 2022-07-22 中国农业银行股份有限公司 Rule matching optimization method and device

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5671361A (en) * 1995-09-28 1997-09-23 University Of Central Florida Priority rule search technique for resource constrained project scheduling
US20060010217A1 (en) * 2004-06-04 2006-01-12 Business Instruments Corp. System and method for dynamic adaptive user-based prioritization and display of electronic messages
CN101739248A (en) * 2008-11-13 2010-06-16 国际商业机器公司 Method and system for executing rule set
CN103365871A (en) * 2012-03-29 2013-10-23 北京恒安永通科技有限公司 Automatic generation method of rules
WO2013186851A1 (en) * 2012-06-12 2013-12-19 三菱電機株式会社 Information processing system
CN104376365A (en) * 2014-11-28 2015-02-25 国家电网公司 Method for constructing information system running rule libraries on basis of association rule mining
US20180113979A1 (en) * 2016-10-24 2018-04-26 Caradigm Usa Llc Safe parallelized ingestion of data update messages, such as hl7 messages
CN109783202A (en) * 2017-11-15 2019-05-21 阿里巴巴集团控股有限公司 Event-handling method, system, equipment and storage medium
US20190294475A1 (en) * 2018-03-23 2019-09-26 Imagination Technologies Limited Common Priority Information for Multiple Resource Arbitration
CN110704037A (en) * 2019-08-28 2020-01-17 贵州医渡云技术有限公司 Rule engine implementation method and device
CN114757645A (en) * 2022-04-15 2022-07-15 深圳奇迹智慧网络有限公司 Intelligent rod system
CN114785601A (en) * 2022-04-25 2022-07-22 中国农业银行股份有限公司 Rule matching optimization method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
JOONSOO BAE等: "Automatic control of workflow processes using ECA rules", IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, vol. 16, no. 08, 2 August 2004 (2004-08-02) *
周丽华等: "Snort规则集优化算法研究", 广西轻工业, 15 March 2010 (2010-03-15) *

Similar Documents

Publication Publication Date Title
CN108418862B (en) Micro-service management method and system based on artificial intelligence service cloud platform
CN100550766C (en) Preplanned mission manner of execution and management role manner of execution and terminal equipment thereof
CN110198558B (en) Standby optimization method and device, computer equipment and storage medium
CN110069572A (en) HIVE method for scheduling task, device, equipment and storage medium based on big data platform
CN110768807B (en) Virtual resource method and device, virtual resource processing network element and storage medium
CN106844047B (en) Application program optimization method of intelligent terminal
US11755098B2 (en) Intelligent terminal energy saving method and device based on AI prediction
CN108111559B (en) Application software deployment system and method
CN109857612A (en) A kind of monitoring method and its terminal of data write operation
CN111857777A (en) System updating method and device based on double-core intelligent electric meter and computer equipment
CN108763046A (en) Thread operation and monitoring method, device, computer equipment and storage medium
CN115378810A (en) Rule dynamic updating method and device, computer equipment and storage medium
CN113672263B (en) Firmware parameter updating control method and device and electronic equipment
CN108628705B (en) Database recovery method and device, computer equipment and storage medium
CN106030539A (en) Software-installed apparatus, and software updating method
CN108306790B (en) Application flow monitoring method and device and Android equipment
CN107563166B (en) Fingerprint module dormancy awakening method and device
CN110032397B (en) Application processing method and device, electronic equipment and computer readable storage medium
CN111045809A (en) Application control method and device, electronic equipment and computer readable medium
CN109388391A (en) Programmable inter-linked controlling method and device based on Internet of Things
CN113766611B (en) Low-power consumption control optimization method and device, mobile terminal and storage medium
CN110298587B (en) Public resource scheduling method and system, electronic equipment and storage medium
CN114625603A (en) Abnormality prompting method, electronic device, and computer-readable storage medium
US20220075667A1 (en) Workload identification and capture
CN110046031B (en) Application processing method and device, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination