A method and apparatus for monitoring business rules
By embedding data points into the business rules engine to obtain operational and supplementary information, rapid feedback of abnormal information is achieved, solving the problem of complex processing procedures in existing technologies and improving the stability of business systems and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA UNITED NETWORK COMM GRP CO LTD
- Filing Date
- 2022-10-08
- Publication Date
- 2026-05-19
AI Technical Summary
In existing technologies, when problems arise in the operation of business rules, the processing flow is complex and time-consuming, affecting user experience and the success rate of business acceptance.
By embedding data points into the business rules engine, operational and supplementary information is obtained. The business rules are then monitored using analytics devices, and any anomalies are directly fed back to the relevant personnel.
It improved the efficiency of handling business rule exceptions, and enhanced the stability of the business system and the user experience.
Smart Images

Figure CN115525513B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data analysis technology, and in particular to a method and apparatus for monitoring business rules. Background Technology
[0002] When users conduct business, they trigger various business rules of the operating system. To ensure the user experience, the stability of the operation of business rules is an important indicator for evaluating the entire operating system.
[0003] However, various situations may occur when business rules are running, such as frequent false blocking or frequent error messages.
[0004] In existing technologies, when problems occur in the operation of business rules, front-line employees usually submit work orders to the corresponding interface personnel, and the issues are reported up level by level. The entire process is complex, time-consuming, and affects the user experience. Summary of the Invention
[0005] This application provides a method and apparatus for monitoring business rules, which can improve the efficiency of business monitoring, the stability of business systems, and the success rate of business processing, thereby enhancing the user experience.
[0006] Firstly, this application provides a method for monitoring business rules, including:
[0007] Obtain the operation information of the business rule, wherein the operation information is one of the following: the business rule is blocked, the business rule reports an error, or the business rule is checked for a duration of time.
[0008] Obtain supplementary information for the business rule, the supplementary information including at least one of the creator of the business rule, the scenario of the business rule, and the region to which the business rule belongs;
[0009] The business rules are monitored based on the operational information and the supplementary information.
[0010] Optionally, if the runtime information indicates that the business rule has been blocked, the step of monitoring the business rule based on the runtime information and the supplementary information includes:
[0011] The interception information of the business rules is statistically analyzed at preset time intervals to obtain statistical information;
[0012] If the difference between the number of statistical information items and the number of historical statistical information items is greater than a preset value, the statistical results and the supplementary information will be sent to the user terminal so that the user can process the blocked information of the business rules based on the statistical results.
[0013] Optionally, if the runtime information is the error information of the business rule, the supplementary information includes the scenario of the business rule; the monitoring of the business rule based on the runtime information and the supplementary information includes:
[0014] The business rule is taken offline from the scenario of the business rule, and the error information of the business rule and the supplementary information are sent to the user terminal.
[0015] Optionally, if the runtime information is the business rule verification duration information; the step of monitoring the business rule based on the runtime information and the supplementary information includes:
[0016] If the verification duration of the business rule exceeds the preset duration, the verification duration information and supplementary information of the business rule will be sent to the user terminal.
[0017] Optionally, the method further includes:
[0018] If the verification duration of the business rule is longer than the first preset duration, the verification duration information and supplementary information of the business rule will be sent to the user terminal.
[0019] If the verification time of the business rule is longer than the second preset time, the business rule is taken offline, and the verification time information and supplementary information of the business rule are sent to the user terminal, wherein the first preset time is shorter than the second preset time.
[0020] Optionally, the operational information of the business rule is information obtained by the business rule engine through data tracking.
[0021] The acquisition of operational information for business rules includes:
[0022] Obtain the operation information of the business rules forwarded by the relay unit from the KAFKA cluster.
[0023] Optionally, after obtaining the operation information of the service rules forwarded by the relay unit from the KAFKA cluster, the method further includes:
[0024] The relay unit obtains supplementary information of the business rules forwarded by the relay unit from the KAFKA cluster. After obtaining the running information of the business rules synchronized by the business rule engine, the relay unit obtains the supplementary information of the business rules from the business database.
[0025] Secondly, this application provides a monitoring device for business rules, comprising:
[0026] The first acquisition module is used to acquire the operation information of the business rule, wherein the operation information is one of the following: the business rule is blocked, the business rule reports an error, or the business rule is checked for a duration of time.
[0027] The second acquisition module is used to acquire supplementary information of the business rule, the supplementary information including at least one of the creator of the business rule, the scenario of the business rule, and the region to which the business rule belongs;
[0028] The monitoring module is used to monitor the business rules based on the operational information and the supplementary information.
[0029] Thirdly, this application provides an electronic device, including: a memory and a processor;
[0030] The memory is used to store computer instructions; the processor is used to execute the computer instructions stored in the memory to implement the method of any one of the first aspects.
[0031] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the method of any of the first aspects.
[0032] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the method of any one of the first aspects.
[0033] This application provides a method and apparatus for monitoring business rules. The method involves acquiring operational information of the business rules, which may be one of the following: interception information, error information, or verification duration information. Supplementary information of the business rules is also acquired, including at least one of the following: the creator of the business rule, the scenario of the business rule, and the region to which the business rule belongs. The business rules are then monitored based on the operational information and the supplementary information. This method monitors the operational process of business rules. When an anomaly occurs during the operation of a business rule, it can collect information corresponding to the anomaly and send it to the user terminal of the monitoring personnel. This allows the monitoring personnel to quickly handle the anomaly, improving the efficiency of business monitoring, the stability of the business system, and the success rate of business processing. Attached Figure Description
[0034] Figure 1 This is a schematic diagram of a scenario provided for an embodiment of this application;
[0035] Figure 2 Flowchart of the business rule monitoring method provided in the embodiments of this application Figure 1 ;
[0036] Figure 3 Flowchart of the business rule monitoring method provided in the embodiments of this application Figure 2 ;
[0037] Figure 4This is a schematic diagram of the structure of the analytical device provided in the embodiments of this application;
[0038] Figure 5 This is a schematic diagram of device interaction provided in an embodiment of this application;
[0039] Figure 6 A schematic diagram of the structure of the monitoring device for business rules provided in the embodiments of this application;
[0040] Figure 7 This is a schematic diagram of the structure of the electronic device for monitoring business rules provided in the embodiments of this application. Detailed Implementation
[0041] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0042] In the embodiments of this application, the terms "first" and "second" are used to distinguish identical or similar items with essentially the same function and effect, without limiting their order. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that the terms "first" and "second" do not necessarily imply that they are different.
[0043] It should be noted that, in the embodiments of this application, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design scheme described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0044] The monitoring method and apparatus for business rules provided in the embodiments of this application will be described in detail below with reference to the accompanying drawings. It should be noted that "at...time" in the embodiments of this application can refer to the instant when a certain situation occurs, or it can refer to a period of time after the occurrence of a certain situation. The embodiments of this application do not make specific limitations on this.
[0045] When users conduct business, they trigger various business rules of the operating system, such as user identity verification. To ensure user experience, the stability of the operation of business rules is an important indicator for evaluating the entire operating system.
[0046] However, various situations may occur when business rules are running, such as frequent false interceptions, frequent errors, and excessively long verification times.
[0047] In existing technologies, when problems occur in the operation of business rules, front-line employees usually submit work orders to the corresponding interface personnel, and the issues are reported up the chain of command until the appropriate personnel handle the problem. This process is complex and time-consuming, which affects the success rate of business processing and results in a poor user experience.
[0048] In view of this, embodiments of this application provide a method and apparatus for monitoring business rules. By embedding data points into the business rule engine, the operation information of the business rules is obtained. Based on the obtained business rule operation information and preset rules, the operation of the business rules is monitored. When problems occur in the operation of the business rules, feedback can be directly given to the corresponding personnel, thereby improving the efficiency of handling problems with business rules.
[0049] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be implemented independently or in combination with each other. The same or similar concepts or processes may not be described again in some embodiments.
[0050] Figure 1 This is a schematic diagram illustrating an application scenario of an embodiment of this application, such as... Figure 1 As shown, it includes a business system 101, an analysis device 102, and a terminal device 103.
[0051] The analysis device 102 can communicate with the business system 101 and the terminal device 103.
[0052] The analysis device 102 can obtain the operation information of various business rules in the business system 101 through communication with the business system 101. Based on the operation information of the business rule, it can determine whether there is a problem in the operation of the business rule, and if there is a problem, it can take corresponding actions on the business rule and issue a warning to the corresponding personnel through the terminal device 103.
[0053] In this embodiment of the application, the analysis device 102 can communicate with the business system 101 and the terminal device 103 through wired networks, wireless networks, etc., and this embodiment of the application does not impose any restrictions on this.
[0054] Optionally, the analysis device 102 may be a part of the business system 101 or an external device of the business system 101.
[0055] Terminal device 103 can be, but is not limited to, various electronic devices such as personal computers, laptops, smartphones, tablets, and portable wearable devices. This application embodiment does not limit this.
[0056] The application scenarios of the embodiments of this application have been described above. The following will use... Figure 1 Taking the analysis device shown in the figure as an example, this application provides a method for monitoring business rules.
[0057] Figure 2 A flowchart illustrating a business rule monitoring method provided in this application embodiment is shown below. Figure 2 As shown, it includes the following steps:
[0058] S201. Obtain the operation information of the business rule. The operation information is one of the following: business rule interception information, business rule error information, or business rule verification duration information.
[0059] In this application embodiment, business rules refer to the externalization or automation of business logic. They are a method for implementing and enforcing business strategies, that is, a representation of decision logic related to business functions. For example, when a user logs into a website, the user's username and password are verified.
[0060] Business rule interception information refers to the number of times a business rule is intercepted during operation within a preset time period, as well as information such as the name of the corresponding business rule; business rule error information refers to the specific information of an error that occurs during the operation of a business rule, such as the name of the business rule and the operation scenario; business rule verification time information refers to the time required for a business rule to be verified, as well as information such as the name of the corresponding business rule.
[0061] In this embodiment of the application, the analysis device can obtain the operation information of each business rule in the business system through interaction with the business system. For example, it can perform data entry processing on each business rule engine module in the business system and then obtain the operation information of each business rule through the message queue (MQ) component.
[0062] S202. Obtain supplementary information for the business rules, including at least one of the following: the creator of the business rules, the scenario of the business rules, and the region to which the business rules belong.
[0063] In this embodiment of the application, the supplementary information of the business rule refers to some non-essential information during the operation of the business rule. However, if the business rule encounters a problem during operation, the business rule can be located based on this supplementary information.
[0064] The supplementary information for business rules in this embodiment includes, but is not limited to, the creator of the business rule, the scenario of the business rule, and the region to which the business rule belongs. This supplementary information is generally set when the business rule is created and stored in the database of the business system.
[0065] In this embodiment, the analysis device obtains supplementary information about business rules from the business system database through interaction with the business system. For example, by using the identification information of the obtained business rules, the device retrieves the corresponding supplementary information from the business database based on the identification information.
[0066] S203. Monitor business rules based on operational information and supplementary information.
[0067] In this embodiment of the application, monitoring business rules refers to monitoring the operation of business rules.
[0068] After obtaining the operational information and supplementary information of the business rules, the analysis equipment can monitor the operation of the business rules based on the above two pieces of information, and handle the business rules when operational problems occur.
[0069] For example, for the blocked business rules, the number of blocked rules is counted based on the operation information of the business rules, and the statistical results and corresponding supplementary information are sent to the user terminal of the monitoring personnel. The monitoring personnel can process the blocked business rules based on the information received by the user terminal.
[0070] For business rules that report errors, the error rules, error content, and corresponding supplementary information will be sent to the monitoring personnel's user terminals. The monitoring personnel can then process the error rules based on the information received on the user terminals.
[0071] For business rules regarding the verification time, the verification time limit business rules and corresponding supplementary information are sent to the monitoring personnel's user terminal. The monitoring personnel can then process the verification time business rules based on the information received at the user terminal.
[0072] The business rule monitoring method provided in this application embodiment acquires the operational information of the business rule, which may be one of the following: business rule interception information, business rule error information, or business rule verification duration information. It also acquires supplementary information of the business rule, including at least one of the following: the creator of the business rule, the scenario of the business rule, and the region to which the business rule belongs. The method monitors the business rule based on the operational information and the supplementary information. By monitoring the operation process of the business rule, when an anomaly occurs, the method can collect the corresponding information and send it to the user terminal of the monitoring personnel, enabling them to quickly handle the anomaly. This improves the efficiency of business monitoring and enhances the stability and success rate of business processing.
[0073] Figure 3 Flowchart of the business rule monitoring method provided in the embodiments of this application Figure 2 ,exist Figure 2 Based on the illustrated embodiments, the monitoring method for business rules provided in this application will be further described, such as... Figure 3 As shown, it includes the following steps:
[0074] S301. Obtain the operation information of the business rules, and obtain supplementary information of the business rules based on the operation information of the business rules.
[0075] In this embodiment of the application, the analysis device can obtain the operation information of business rules and supplementary information of business rules from the business system.
[0076] Among them, such as Figure 4 As shown, the analysis device can include a relay unit (first-level consumer), a Kafka cluster, and an analysis unit (second-level consumer). The relay unit, Kafka cluster, and analysis unit can communicate with each other. Kafka is an open-source distributed message middleware, often used as a message transmission middleware due to its powerful and stable message passing and storage capabilities.
[0077] For example, the relay unit can send the acquired information to the Kafka cluster, and the analysis unit can use the Kafka cluster to obtain the information sent by the relay unit.
[0078] In this embodiment of the application, the execution entity can be an analysis unit. In this case, the corresponding information obtained from the analysis unit is the information obtained from the KAFKA cluster by the analysis unit to obtain the information about the operation of the business rules forwarded by the relay unit.
[0079] Among them, the operation information of business rules is the information obtained by the business rule engine through instrumentation. That is, by instrumenting the business rule engine in the business system, the operation information of the corresponding business rules can be obtained.
[0080] For example, Figure 5 This is a schematic diagram of device interaction provided in the embodiments of this application, such as... Figure 5 As shown, after embedding data points into the business rule engine, the operational information of the business rules can be collected. The business system interacts with the analysis device and sends the operational information of the business rules to the relay unit through the MQ component. The relay unit then further processes the operational information of the business rules.
[0081] Optionally, the business system can send the execution information of the business rules to the relay unit via asynchronous messages.
[0082] In this embodiment of the application, after receiving the operation information of the business rule, the relay unit will supplement the operation information of the business rule, that is, obtain the supplementary information of the business rule.
[0083] Please continue to refer to this. Figure 5 After receiving the operation information of the business rule, the relay unit retrieves the supplementary information of the business rule from the business system database based on the name and corresponding identifier of the business rule in the operation information.
[0084] In this embodiment of the application, after obtaining the operation information and supplementary information of the business rules, the relay unit sends the information to the KAFKA cluster.
[0085] Accordingly, when the execution subject of this application embodiment is the analysis unit, the corresponding acquisition of the business rule operation information is to obtain the supplementary information of the business rule forwarded by the relay unit from the KAFKA cluster. In this case, after the relay unit obtains the business rule operation information synchronized by the business rule engine, it obtains the supplementary information of the business rule from the business database.
[0086] Optionally, after obtaining the operational information and supplementary information of the business rules, the relay unit can merge the operational information and supplementary information of the business rules into a single message for forwarding.
[0087] In this embodiment of the application, the analysis unit can periodically obtain the operation information and supplementary information of the business rules from the KAFKA cluster, for example, information acquisition is performed at a cycle of 10 minutes.
[0088] In this embodiment, the operational information of the business rule includes: business rule interception information, business rule error information, and business rule verification duration information. Based on the operational information and supplementary information of the business rule, the operation of the business rule can be monitored in several possible ways:
[0089] Possible implementation method 1:
[0090] S302. Monitor the operation of business rules based on the information of blocked business rules and the corresponding supplementary business information.
[0091] If the running information is information indicating that a business rule has been blocked, then the blocked business rule information will be statistically analyzed at a preset time interval to obtain statistical information. If the difference between the number of statistical information and the number of historical statistical information is greater than a preset value, then the statistical results and supplementary information will be sent to the user terminal so that the user can process the blocked business rule information based on the statistical results.
[0092] In this embodiment of the application, when a business rule is blocked, it is necessary to count the number of blocks and determine whether the blocking of the business rule is a normal process based on the number of blocks. This is done by counting the blocks at a preset time period and comparing the count with historical statistics.
[0093] For example, statistics on blocked business rules are collected every 10 minutes, and the results are compared with those collected during the same time period. For instance, the statistics from 15:00 to 15:10 today are compared with those from 15:00 to 15:10 yesterday. If the difference is greater than a preset value, such as 20 entries, it indicates that the blocking of the business rule is an abnormal process. The statistics and supplementary information are then sent to the user terminal so that the user can process the blocked business rule information based on the statistics and supplementary information. The statistics and supplementary information can also serve as monitoring results.
[0094] Possible implementation method two:
[0095] S303. Monitor the operation of business rules based on error messages and corresponding supplementary business information.
[0096] If the running information is a business rule error message, then the business rule will be taken offline from the scenario of the business rule, and the error message and supplementary information of the business rule will be sent to the user terminal.
[0097] In this embodiment of the application, when a business rule error occurs, the scenario corresponding to the business rule needs to be taken offline immediately. When the running information is a business rule error message, the scenario corresponding to the business rule is obtained from the supplementary information of the business rule, and the business rule in the scenario is taken offline immediately to reduce the impact of the business rule on the stability of the business system. The error message and supplementary information are sent to the user terminal so that the user can process the business rule error message according to the statistical results.
[0098] Possible implementation method three:
[0099] S304. Monitor the operation of business rules by verifying the duration information and corresponding supplementary business information according to the business rules.
[0100] If the running information is business rule verification duration information, then if the business rule verification duration is longer than the preset duration, the business rule verification duration information and supplementary information will be sent to the user terminal.
[0101] In this embodiment, when the business rule verification time exceeds the preset time, it indicates that the processing flow of the business rule no longer meets the business operation requirements, that is, the processing time of the business has exceeded the time limit. This results in a poor user experience. Therefore, it is necessary to send the business rule verification time information and supplementary information to the user terminal so that the user (monitoring personnel) can process the business rule error information based on the statistical results, thereby improving the user (system user) experience.
[0102] Optionally, if the business rule verification time is longer than the first preset time, the verification time information and supplementary information of the business rule are sent to the user terminal; if the business rule verification time is longer than the second preset time, the business rule is taken offline, and the verification time and supplementary information of the business rule are sent to the user terminal, wherein the first preset time is shorter than the second preset time.
[0103] In this embodiment, if the business rule verification time is longer than the first preset time, it means that the verification of the business rule is only slow and can still run. At this time, the user experience is not particularly bad. Therefore, it is only necessary to send the verification time information and supplementary information of the business rule to the user terminal to process the business rule. If the business rule verification time is longer than the second preset time, it means that the verification of the business rule is basically in an unrunnable state. In this case, the business rule needs to be taken offline to reduce the impact on the user experience, and the verification time information and supplementary information of the business rule should be sent to the user terminal.
[0104] Optionally, in this embodiment of the application, after the monitoring results are sent to the user terminal, the user terminal can be controlled to remind the user, for example, by using a WeChat robot to notify the monitoring personnel to view the message.
[0105] The business rule monitoring method provided in this application acquires the operational information of the business rules and obtains supplementary information based on the operational information. It then monitors the operation of the business rules based on both the operational and supplementary information. By executing different processing procedures for anomalies occurring during the operation of different business rules and alerting monitoring personnel to handle these anomalies, the method not only improves the stability of the business system and the success rate of business processing but also enhances the efficiency of business monitoring.
[0106] Based on the above-described embodiments of the business rule monitoring method, this application also provides a business rule monitoring device.
[0107] Figure 6 A schematic diagram of the structure of the monitoring device for business rules provided in the embodiments of this application is shown below. Figure 6 As shown, it includes:
[0108] The first acquisition module 601 is used to acquire the operation information of the business rule. The operation information is one of the following: business rule interception information, business rule error information, or business rule verification duration information.
[0109] The second acquisition module 602 is used to acquire supplementary information of the business rule, including at least one of the creator of the business rule, the scenario of the business rule, and the region to which the business rule belongs.
[0110] The monitoring module 603 is used to monitor the business rules based on operational information and supplementary information.
[0111] Optionally, the first acquisition module 601 is also used to perform data entry processing on the business rule engine to obtain the running information of the business rules.
[0112] The second acquisition module 602 is also used to acquire the operation information of the business rules forwarded by the relay unit from the KAFKA cluster. Additionally, it acquires supplementary information of the business rules forwarded by the relay unit from the KAFKA cluster. Specifically, after acquiring the operation information of the business rules synchronized by the business rule engine, the relay unit acquires supplementary information of the business rules from the business database.
[0113] The monitoring module 603 is further configured to send the verification duration information and supplementary information of the business rule to the user terminal if the verification duration of the business rule is longer than the first preset duration; and to take the business rule offline if the verification duration of the business rule is longer than the second preset duration, and send the verification duration information and supplementary information of the business rule to the user terminal, wherein the first preset duration is shorter than the second preset duration.
[0114] The business rule monitoring device provided in this application embodiment can execute... Figure 2 and Figure 3 The technical solution of the business rule monitoring method shown in the embodiment has a similar implementation principle and technical effect, and will not be described again here.
[0115] Figure 7 This is a schematic diagram of the structure of the monitoring electronic device for business rules provided in an embodiment of this application. Figure 7 As shown, the electronic device 70 for monitoring business rules provided in this embodiment may include:
[0116] Processor 701.
[0117] Memory 702 is used to store executable instructions for the terminal device.
[0118] The technical solution of the monitoring method embodiment in which the processor is configured to execute the above-mentioned business rules by executing executable instructions has a similar implementation principle and technical effect, and will not be described again here.
[0119] This application also provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements the technical solution of the monitoring method embodiment for the above-mentioned business rules. Its implementation principle and technical effect are similar, and will not be repeated here.
[0120] In one possible implementation, a computer-readable medium may include random access memory (RAM), read-only memory (ROM), compact discread-only memory (CD-ROM) or other optical disc storage, disk storage or other magnetic storage devices, or any other medium targeted to carry or to store the required program code in the form of instructions or data structures, and accessible by a computer. Furthermore, any connection is appropriately referred to as a computer-readable medium. For example, if software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave, then coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. As used herein, disks and optical discs include optical discs, laser discs, optical discs, Digital Versatile Discs (DVDs), floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically, while optical discs optically reproduce data using lasers. The above combinations should also be included within the scope of computer-readable media.
[0121] This application also provides a computer program product, including a computer program, which, when executed by a processor, implements the technical solution of the monitoring method embodiment for the above-mentioned business rules. Its implementation principle and technical effects are similar, and will not be repeated here.
[0122] In the specific implementation of the aforementioned terminal device or server, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.
[0123] Those skilled in the art will understand that all or part of the steps in any of the above method embodiments can be implemented by hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium, and when the program is executed, all or part of the steps in the above method embodiments are performed.
[0124] If the technical solution of this application is implemented in software form and sold or used as a product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the technical solution of this application can be embodied in the form of a software product, which is stored in a storage medium and includes a computer program or several instructions. This computer software product causes a computer device (which may be a personal computer, server, network device, or similar electronic device) to execute all or part of the steps of the method described in the embodiments of this application.
[0125] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A method for monitoring business rules, characterized in that, include: Obtain the operation information of the business rules forwarded by the relay unit from the KAFKA cluster. The operation information is one of the following: the business rule is intercepted, the business rule is reported as an error, or the business rule is verified for a certain duration. The relay unit obtains supplementary information of the business rules forwarded by the relay unit from the KAFKA cluster. After obtaining the running information of the business rules synchronized by the business rule engine, the relay unit obtains supplementary information of the business rules from the business database. The supplementary information includes at least one of the following: the creator of the business rule, the scenario of the business rule, and the region to which the business rule belongs. Monitoring the business rules based on the operational information and the supplementary information includes: If the operational information is information indicating that the business rule has been blocked, then the blocked business rule information is statistically analyzed at a preset time interval to obtain statistical information; if the difference between the number of statistical information entries and the number of historical statistical information entries is greater than a preset value, then the statistical results and the supplementary information are sent to the user terminal so that the user can process the blocked business rule information based on the statistical results; or, If the operational information is an error message for the business rule, then the business rule is taken offline from the scenario of the business rule, and the error message and the supplementary information are sent to the user terminal; or, If the operation information is the business rule verification duration information, and the business rule verification duration is longer than the preset duration, then the business rule verification duration information and supplementary information are sent to the user terminal.
2. The method according to claim 1, characterized in that, The method further includes: If the verification duration of the business rule is longer than the first preset duration, the verification duration information and supplementary information of the business rule will be sent to the user terminal. If the verification time of the business rule is longer than the second preset time, the business rule is taken offline, and the verification time information and supplementary information of the business rule are sent to the user terminal, wherein the first preset time is shorter than the second preset time.
3. The method according to any one of claims 1-2, characterized in that, The operational information of the business rules is obtained by the business rule engine through data tracking.
4. A monitoring device for business rules, characterized in that, include: The first acquisition module is used to acquire the operation information of the business rules forwarded by the relay unit from the KAFKA cluster. The operation information is one of the following: the business rule is intercepted, the business rule is reported as an error, or the business rule is verified for a certain duration. The second acquisition module is used to acquire supplementary information of the business rules forwarded by the relay unit from the KAFKA cluster. The relay unit acquires the supplementary information of the business rules from the business database after acquiring the running information of the business rules synchronized by the business rule engine. The supplementary information includes at least one of the creator of the business rule, the scenario of the business rule, and the region to which the business rule belongs. The monitoring module is used to monitor the business rules based on the operational information and the supplementary information; The monitoring module is specifically configured to, if the operational information is information indicating that the business rule has been blocked, statistically analyze the blocked business rule information at a preset time interval to obtain statistical information; if the difference between the number of statistical information entries and the number of historical statistical information entries is greater than a preset value, send the statistical results and the supplementary information to the user terminal so that the user can process the blocked business rule information based on the statistical results; or, If the operational information is an error message for the business rule, then the business rule is taken offline from the scenario of the business rule, and the error message and the supplementary information are sent to the user terminal; or, If the operation information is the business rule verification duration information, and the business rule verification duration is longer than the preset duration, then the business rule verification duration information and supplementary information are sent to the user terminal.
5. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the method of any one of claims 1-3.
6. A computer-readable storage medium, characterized in that, It stores a computer program, which is executed by a processor to implement the method of any one of claims 1-3.