Business process monitoring method, device, computer equipment and storage medium
By using the section-oriented programming technology to insert the sections in the business process, monitoring and intercepting the state changes and abnormal information of the nodes, the time-consuming and inefficient problems of the business process blocked in the existing technology are solved, and automatic monitoring and efficient problem solving are achieved.
Patent Information
- Application Number
- CN202210746702.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-29
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2042-06-29
AI Technical Summary
The existing technology takes time and is inefficient to solve the problem of blocking business processes. Technical personnel need to actively query logs and technical analysis to locate the cause of blocking.
Through the section-oriented programming technology, the sections are inserted at each node of the target business process, and the sections are used to monitor and intercept the state changes and key information generated during the operation of the node, and upload the exception information to the monitoring and alarm platform through the message queue.
It realizes automatic monitoring of the reasons why business processes are blocked, improves monitoring flexibility and problem-solving efficiency, and reduces the time for technicians to investigate.
Smart Images

Figure CN114936136B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data monitoring technology, and in particular to a business process monitoring method, device, computer equipment and storage medium. Background Art
[0002] When users are performing business processes in various web applications, they are often blocked from performing business processes. The blocking of users from performing business processes is not only caused by the program code of the web application, but also by other reasons such as unreasonable logic design and poor network environment. The blocking of business processes greatly reduces the user experience, and technical personnel can only locate the cause of the blocking by actively querying logs and performing technical analysis, which is not only time-consuming but also inefficient. Summary of the invention
[0003] The embodiments of the present invention provide a business process monitoring method, device, computer equipment and storage medium to solve the problem that the prior art solves the problem of business process blocking in a time-consuming and inefficient manner.
[0004] In a first aspect of the present application, a business process monitoring method is provided, comprising:
[0005] According to the logical order of the target business process, obtain the target node and the type of the target node in the target business process;
[0006] Generate an aspect processor of the target business process, and add a business interception function of the target node in the aspect processor;
[0007] Adding a first aspect annotation of a corresponding type to the business interception function according to the type of the target node, wherein the first aspect annotation also includes a code path corresponding to the target business node;
[0008] Using the business interception function to monitor the execution process of the target business process, intercepting the first keyword and / or the first exception generated by the code corresponding to the code path during operation, and obtaining a business process exception;
[0009] The exception type of the business process exception is determined according to a preset business process exception classification set, and the monitoring exception information generated according to the target business process, the target node, the business process exception and the exception type is uploaded to the monitoring alarm platform through a message queue.
[0010] A second aspect of the present application provides a business process monitoring device, comprising:
[0011] A node acquisition module, used to acquire a target node and a type of the target node in the target business process according to the logical order of the target business process;
[0012] Aspect processor module, used to generate the aspect processor of the target business process and add the business interception function of the target node in the aspect processor;
[0013] A first aspect annotation module, used to add a first aspect annotation of a corresponding type to the business interception function according to the type of the target node, wherein the first aspect annotation also includes a code path corresponding to the target business node;
[0014] A business process exception module, used to use the business interception function to monitor the execution process of the target business process, intercept the first keyword and / or the first exception generated by the code corresponding to the code path during operation, and obtain the business process exception;
[0015] The exception uploading module is used to determine the exception type of the business process exception according to the preset business process exception classification set, and upload the monitoring exception information generated according to the target business process, the target node, the business process exception and the exception type to the monitoring alarm platform through the message queue.
[0016] According to a third aspect of the present application, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned business process monitoring method when executing the computer program.
[0017] According to a fourth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned business process monitoring method are implemented.
[0018] The above-mentioned business process monitoring method, device, computer equipment and storage medium use aspect-oriented programming technology in the program code corresponding to the target business process to insert aspects into each node of the target business process, use the aspects to monitor and intercept the state changes and key information generated during the operation of each node of the target business process, and send the abnormal information or target key information generated by each node of the target business process during the operation as alarm information to the monitoring alarm platform through the message queue, and obtain the monitoring abnormal statistical information of the target business process through the monitoring alarm platform. At the same time, the abnormal information of the target business process is sent to relevant personnel through the monitoring alarm platform. The technicians of the prior art actively investigate the reasons why the target business process is blocked, convert them into automatic monitoring of the reasons why the target business process is blocked, and perform abnormal statistics and send alarm information, which not only improves the flexibility of monitoring the target business process, but also improves the efficiency of solving problems in the target business process. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0020] Figure 1 is a schematic diagram of an application environment of a business process monitoring method in one embodiment of the present invention;
[0021] Figure 2 is a flow chart of a business process monitoring method in one embodiment of the present invention;
[0022] Figure 3 is a schematic diagram of the structure of a business process monitoring device in one embodiment of the present invention;
[0023] Figure 4 is a schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] The business process monitoring method provided in this application can be applied in Figure 1 In the application environment, the computer device can be but not limited to various personal computers and laptops. The computer device can also be a server. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. It is understandable that Figure 1 The number of computer devices in the figure is only for reference and can be expanded to any number according to actual needs.
[0026] In one embodiment, if Figure 2 As shown, a business process monitoring method is provided, which is applied in Figure 1 The computer device in the example is used to illustrate, and the method includes the following steps S101 to S105:
[0027] S101. Acquire target nodes and types of target nodes in the target business process according to the logical order of the target business process.
[0028] Among them, the target node in the target business process is each step or process that the target business process advances in a logical order, that is, the target node corresponds to the step or process in the target business process. It should be specially noted that the correspondence between the target node and the step or process in the target business process is a one-to-one relationship or a one-to-many relationship, and the specific implementation method is determined according to the monitoring requirements of the target business process. Further, considering the design of the target node from the perspective of software engineering, the target business process in the corresponding software project is a series of code blocks that work together to complete the target business process, that is, the target node corresponds to at least one code block in the software project. Among them, each code block has a fixed relative code path in the software project (the relative code path of each code block in the software project is determined according to the root path of the software project).
[0029] Furthermore, if the target business process is a branching business process, the entire branch is acquired according to a pre-set branch acquisition rule. For example, the branch acquisition rule acquires the nodes in order from large to small in terms of the number of branch nodes. The nodes on the branch process with a larger number of branch nodes are acquired first, and then the nodes on the branch process with a smaller number of branch nodes are acquired.
[0030] The type of the target node is abstractly designed after feature extraction based on the specific type of the target business process and the requirements of the target business process, to obtain at least one type of the target node. For example, the type of the target node is designed as a filling type and a non-filling type, that is, the corresponding target node needs to be filled by the user and the target node does not need to be filled by the user.
[0031] Furthermore, the target node includes at least one node type. Specifically, according to the aforementioned node type design method, at least one type of node type is designed for all the target nodes in the target business process, and each type of node type includes at least one node type. For example, the first type of the target node is designed as a filling type and a non-filling type, and the second type of the target node is newly added as a judgment type and a non-judgment type. Then, the target node is correspondingly bound to a node type in each type of node type. It should be particularly noted that each node type in each type of node type is mutually exclusive, such as the aforementioned filling type and non-filling type node types.
[0032] S102: Generate an aspect processor of the target business process, and add a business interception function of the target node in the aspect processor.
[0033] Among them, the target business process is monitored and processed by an aspect-oriented programming method, that is, an aspect is inserted into each link or step of the target business process for corresponding monitoring. The aspect-oriented programming (AOP, AspectOriented Programming) adds an additional notification mechanism on the basis of the existing program code to uniformly manage and decorate the code blocks declared as point cuts. The detailed technical details of the aspect-oriented programming technology are not the core part of this application, so they are not repeated here. At the same time, different programming languages also have different implementation methods of aspect-oriented programming. For example, Python, Go, Java, JavaScript, etc. already have implementation methods or frameworks for aspect-oriented programming. Therefore, the monitoring of the target business process in this application can be implemented using different computer language programs according to the design principles of aspect-oriented programming, the project code type where the target business process is located, and the method of this application.
[0034] Among them, the aspect processor is a specific aspect processing program class designed for the target business process, that is, the aspect processing content for the target business is all performed in the aspect processor, for example, a TargetAspect class is generated in the project code corresponding to the target business process, and the aspect processing content for the target business process is placed in the TargetAspect class. It should be noted that different aspect processors can be generated for business processes of different types, for example, a registration process aspect processor is generated for the registration process, a login process aspect processor is generated for the login process, and a purchase process aspect processor is generated for the purchase process.
[0035] Specifically, firstly, it is detected whether there is a dependency library for generating the aspect processor. If not, the dependency library download tool is used to download the dependency library. Among them, the dependency library is a tool library for implementing the program functions designed by the aforementioned aspect-oriented programming method. If the dependency library exists, the aspect processor of the target business process is generated, and the second aspect annotation contained in the dependency library is added to the aspect processor. Among them, the second aspect annotation is used to mark the aspect processor as a program class that uses the aspect-oriented programming method to perform aspect processing on the target business process. For example, in the Spring framework implemented based on the Java language, the "@Aspect" annotation is used to represent the second aspect annotation, that is, the program class annotated with the "@Aspect" annotation uses the aspect-oriented programming method in the software project based on the Spring framework. Finally, according to the monitoring requirements of the business process, at least one business interception function of the target node is added to the aspect processor. Furthermore, it is determined whether to set a service interception function for a node according to the importance of each node in the business process. For example, in the registration process, a service interception function is not set for the node where the user views the registration agreement in a pop-up window, but a service interception function is set for the node where the user fills in the registration information. Furthermore, according to the various characteristics of the aspect-oriented programming method, at least two service interception functions are designed for the target node to monitor the different states of the current node. For example, in the payment node for user payment in the purchase process, a first payment node service interception function for monitoring user information before payment and a second payment node service interception function for monitoring user information after payment are added.
[0036] S103. Add a first aspect annotation of a corresponding type to the business interception function according to the type of the target node, wherein the first aspect annotation also includes a code path corresponding to the target business node.
[0037] Specifically, first, according to the type of the target node and the function of the business interception function, the type of the first aspect annotation is determined. Among them, the types of the first aspect annotation include but are not limited to: pre-notification type, post-notification type, return notification type, exception notification type and surround notification type. The pre-notification type is used to issue a monitoring notification before the business interception function is executed, and the post-notification type is used to issue a monitoring notification after the business interception function is executed. The functions of the return notification type, the exception notification type and the surround notification type are similar to this and will not be repeated here. For example, adding a pre-notification type to the registration request interception function corresponding to the registration node is used to monitor the registration information filled in by the user before registration, and for example, adding a post-notification type to the payment result interception function corresponding to the payment node is used to monitor whether the user's payment is successful. In a more specific embodiment based on the Spring framework, the types of the first aspect annotation include: @Before, @After, @AfterRunning, @AfterThrowing and @Around. The usage of the different types of the first aspect annotations contained in the Spring framework is not repeated here. Finally, the code path corresponding to the target node is obtained, and according to the monitoring requirements of the target node, the corresponding annotation matching operator is selected, and the code path is added as a parameter of the annotation matching operator. Among them, the code path is a code path based on a regular expression, that is, the target code path set obtained after regular matching according to the code path may have multiple target code paths, and it also means that the business interception function will act on the code blocks of multiple target code paths, that is, in this application, the business interception function is used to monitor the operation of at least two of the target nodes at the same time. At the same time, according to the different annotation matching operators provided by the dependent library, the code path is added as a parameter of the annotation matching operator to realize the monitoring of the target node under different business needs. For example, in the Spring framework, the annotation matching operator execution and the parameter (public*com.user.UserService.*(..)) are used to match all common functions in the com.user.UserService class. Other annotation matching operators with similar functions to the execution annotation matching operator include but are not limited to: within, this, target, bean, point, args, etc. The specific functions and usage of each annotation matching operator are not repeated here.
[0038] S104: Use the business interception function to monitor the execution process of the target business process, intercept the first keyword and / or the first exception generated by the code corresponding to the code path during runtime, and obtain a business process exception.
[0039] Specifically, firstly, the annotation matching operator and the code path are used to perform a matching operation to obtain a matching code fragment. Then, the business interception function is used to monitor whether the running process of the code fragment generates the first keyword and / or the first exception. If it is generated, the exception information of the first keyword and / or the first exception is obtained as a business process exception. It should be further explained that the business interception function not only intercepts the exceptions thrown by the program code that would be intercepted in the conventional technical method, but also intercepts the keywords designed according to business needs. For example, in the payment business interception function corresponding to the user payment node, not only all exceptions thrown by the support business interception function during execution are monitored, but also whether the payment information obtained in the payment business interception function contains the preset payment channel target keyword. Among them, using the business interception function to intercept the first keyword after monitoring not only meets the business demand design, such as meeting the needs of data statistics, but also can identify unreasonable requests, such as identifying some injection attack requests.
[0040] S105. Determine the exception type of the business process exception according to a preset business process exception classification set, and upload the monitoring exception information generated according to the target business process, the target node, the business process exception and the exception type to a monitoring alarm platform through a message queue.
[0041] Among them, the business process anomalies in the preset business process anomaly classification set are pre-designed based on historical process anomalies that occur during the operation of the target business process, as well as conventional anomalies in the field where the business process is located. For example, in the insurance business process, there are both underwriting verification nodes that are unique to the insurance business field and conventional user information verification nodes. The anomalies that occur at the underwriting verification nodes and the user information verification nodes are added to the preset business process anomaly classification set as a business process anomaly. Furthermore, the business process anomaly is designed from the perspective of software engineering, and the anomalies generated by the code block running the target business process or the intercepted key information are taken as a corresponding type of business process anomaly.
[0042] Specifically, first use the business process exception to match the type with the preset business process exception classification set to obtain the exception type of the business process exception. If the type matching fails, the business process exception is used as a new exception type, and the new exception type is added to the preset business process exception classification set. Among them, the elements in the preset business process exception classification set are manually added, deleted, and modified by relevant personnel during the execution of the method of this application. Then, the target business process, the target node, the business process exception and the exception type are sent to the message queue as monitoring exception information. Among them, the message queue (Message Queue) can not only use RabbitMQ, RocketMQ, ActiveMQ, Kafka, ZeroMQ, MetaMQ and other message queue components or middleware, but also use Redis, MySQL or phxsql and other databases to implement the function of the message queue, and can also be a self-developed message queue component or middleware designed and developed by technicians according to needs. The specific working principle and use method of the message queue are already prior art, so it will not be repeated here. Finally, the message queue uploads the monitoring exception information to the monitoring alarm platform according to the preset upload rules. Among them, there are two ways to retrieve the monitoring exception information in the message queue. One is that after the monitoring exception information in the message queue meets the preset conditions (for example, the monitoring exception information reaches 20 pieces), the monitoring alarm platform (consumer) is actively notified to obtain it. The other is that the monitoring alarm platform continuously polls and accesses the message queue to check whether the monitoring exception information in the message queue meets the preset conditions, and obtains it if it does.
[0043] Furthermore, the abnormal type of the business process abnormality is determined according to the preset business process abnormality classification set, and after uploading the target business process, the target node, the business process abnormality and the abnormal type as monitoring abnormality information to the monitoring alarm platform through the message queue, a statistical command is also sent to the monitoring alarm platform. After receiving the statistical command, the monitoring alarm platform uses the monitoring abnormality information to generate a business process monitoring abnormality statistical graph and / or table according to the preset report type. Finally, the monitoring alarm platform sends the business process monitoring abnormality statistical graph and / or table to the preset first associated user of the business process. Furthermore, after the monitoring abnormality information is transmitted to the monitoring alarm platform, it is stored in a pre-deployed full-text search engine, and the business process monitoring abnormality statistical graph and / or table is quickly generated by the analysis engine of the full-text search engine. Among them, the full-text search engine uses but is not limited to: Elasticsearch, Lucene, Solr, Nutch, etc.
[0044] Furthermore, the abnormality type of the business process abnormality is determined according to the preset business process abnormality classification set, and after uploading the target business process, the target node, the business process abnormality and the abnormality type as monitoring abnormality information to the monitoring alarm platform through the message queue, an alarm command is also sent to the monitoring alarm platform. After receiving the alarm command, the monitoring alarm platform determines whether each type of the monitoring abnormality information triggers an alarm according to the preset abnormality type and the preset abnormality type threshold corresponding to the preset abnormality type. If an alarm is triggered, the monitoring alarm platform sends the target monitoring abnormality information that triggers the alarm, the target abnormality type corresponding to the target monitoring abnormality information, and the abnormality type threshold corresponding to the target abnormality type as alarm information to the preset second associated user of the business process. Wherein, the method of sending the alarm information includes but is not limited to: email, short message, communication software message, etc. Furthermore, at least two target exception types are selected and corresponding second exception type thresholds are defined, the target exception types are associated and added to the exception type set, and when each target exception type in the exception type set reaches its corresponding second exception type threshold, the monitoring alarm platform sends the target exception type and the corresponding second exception type threshold as alarm information to the preset second associated user of the business process.
[0045] The business process monitoring method proposed in this embodiment uses aspect-oriented programming technology to insert aspects into each node of the target business process in the program code corresponding to the target business process, uses the aspects to monitor and intercept the state changes and key information generated during the operation of each node of the target business process, and sends the abnormal information or target key information generated during the operation of each node of the target business process to the monitoring and alarm platform as alarm information through the message queue, and obtains the monitoring abnormality statistics of the target business process through the monitoring and alarm platform. At the same time, the abnormal information of the target business process is sent to relevant personnel through the monitoring and alarm platform. The technicians of the prior art actively investigate the reasons why the target business process is blocked, convert them into automatic monitoring of the reasons why the target business process is blocked, and perform abnormal statistics and send alarm information, which not only improves the flexibility of monitoring the target business process, but also improves the efficiency of solving problems in the target business process.
[0046] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0047] In one embodiment, a business process monitoring device 100 is provided, and the business process monitoring device 100 corresponds one-to-one to the business process monitoring method in the above embodiment. Figure 3 As shown, the business process monitoring device 100 includes a node acquisition module 11, a section processor module 12, a first section annotation module 13, a business process exception module 14 and an exception upload module 15. The functional modules are described in detail as follows:
[0048] The node acquisition module 11 is used to acquire the target node and the type of the target node in the target business process according to the logical order of the target business process;
[0049] Aspect processor module 12, used to generate an aspect processor of the target business process and add a business interception function of the target node in the aspect processor;
[0050] A first aspect annotation module 13, configured to add a first aspect annotation of a corresponding type to the business interception function according to the type of the target node, wherein the first aspect annotation also includes a code path corresponding to the target business node;
[0051] A business process exception module 14 is used to use the business interception function to monitor the execution process of the target business process, intercept the first keyword and / or the first exception generated by the code corresponding to the code path during operation, and obtain the business process exception;
[0052] The exception uploading module 15 is used to determine the exception type of the business process exception according to the preset business process exception classification set, and upload the monitoring exception information generated according to the target business process, the target node, the business process exception and the exception type to the monitoring alarm platform through the message queue.
[0053] Furthermore, the section processor module 12 also includes:
[0054] A dependency library detection submodule is used to detect whether there is a dependency library for generating the aspect processor, and if not, use a dependency library download tool to download the dependency library;
[0055] A second aspect annotation submodule is used to generate an aspect processor of the target business process if the dependent library exists, and add the second aspect annotation contained in the dependent library to the aspect processor;
[0056] The business interception function submodule is used to add at least one business interception function of the target node in the aspect processor according to the monitoring requirements of the business process.
[0057] Furthermore, the first section annotation module 13 also includes:
[0058] A section annotation type submodule, used to determine the type of the first section annotation according to the type of the target node and the function of the business interception function;
[0059] The code path submodule is used to obtain the code path corresponding to the target node, and select the corresponding annotation matching operator according to the monitoring requirements of the target node, and add the code path as a parameter of the annotation matching operator.
[0060] Furthermore, the business process exception module 14 includes:
[0061] A matching code snippet submodule, used to perform a matching operation using the annotation matching operator and the code path to obtain a matching code snippet;
[0062] A keyword or exception submodule, used to use the business interception function to monitor whether the running process of the code snippet generates the first keyword and / or the first exception;
[0063] The exception information submodule is used to obtain the exception information of the first keyword and / or the first exception as a business process exception if it occurs.
[0064] Furthermore, the abnormal uploading module 15 further includes:
[0065] An exception type matching submodule, used to perform type matching between the business process exception and the preset business process exception classification set to obtain the exception type of the business process exception;
[0066] An exception type adding submodule is used to treat the business process exception as a new exception type if the type matching fails, and add the new exception type to the preset business process exception classification set;
[0067] A message queue submodule, used for sending the target business process, the target node, the business process exception and the exception type as monitoring exception information to the message queue;
[0068] The abnormal information uploading submodule is used for the message queue to upload the monitoring abnormal information to the monitoring alarm platform according to the preset uploading rules.
[0069] Furthermore, the abnormal uploading module 15 further includes:
[0070] A statistical command subunit, used for sending statistical commands to the monitoring alarm platform;
[0071] The abnormality statistics chart subunit is used for generating a business process monitoring abnormality statistics chart and / or table according to a preset report type using the monitoring abnormality information after the monitoring alarm platform receives the statistical command;
[0072] The statistical chart sending subunit is used to send the business process monitoring abnormal statistical chart and / or table to the preset first associated user of the business process.
[0073] Furthermore, the abnormal uploading module 15 further includes:
[0074] An alarm command submodule, used for sending an alarm command to the monitoring alarm platform;
[0075] An alarm trigger judgment submodule is used to judge whether each type of monitoring abnormal information triggers an alarm according to a preset abnormal type and a preset abnormal type threshold corresponding to the preset abnormal type after the monitoring alarm platform receives the alarm command;
[0076] The alarm information sending submodule is used to send the target monitoring exception information that triggers the alarm, the target exception type corresponding to the target monitoring exception information, and the exception type threshold corresponding to the target exception type as alarm information to the preset second associated user of the business process if an alarm is triggered.
[0077] The meaning of "first" and "second" in the above modules / units is only to distinguish different modules / units, and is not used to define which module / unit has a higher priority or other limiting meanings. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or modules is not necessarily limited to those steps or modules clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products or devices. The division of modules in this application is only a logical division, and there may be other division methods when implemented in actual applications.
[0078] For the specific definition of the business process monitoring device, please refer to the definition of the business process monitoring method above, which will not be repeated here. Each module in the above-mentioned business process monitoring device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0079] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile 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 the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data involved in the business process monitoring method. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a business process monitoring method is implemented.
[0080] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the business process monitoring method in the above embodiment are implemented, such as Figure 2 Alternatively, when the processor executes the computer program, the functions of each module / unit of the business process monitoring device in the above embodiment are realized, for example, Figure 3 The functions of modules 11 to 15 are shown in Figure 1. To avoid repetition, they will not be described here.
[0081] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the computer device, and various interfaces and lines are used to connect various parts of the entire computer device.
[0082] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the computer device by running or executing the computer program and / or module stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, video data, etc.), etc.
[0083] The memory may be integrated into the processor or may be arranged separately from the processor.
[0084] In one embodiment, a computer-readable storage medium is provided on which a computer program is stored. When the computer program is executed by a processor, the steps of the business process monitoring method in the above embodiment are implemented, such as Figure 2 Alternatively, when the computer program is executed by the processor, the functions of each module / unit of the business process monitoring device in the above embodiment are realized, for example, Figure 3 The functions of modules 11 to 15 are shown in Figure 1. To avoid repetition, they will not be described here.
[0085] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application 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. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0086] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0087] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A business process monitoring method, characterized in that: include: According to the logical order of the target business process, obtain the target node and the type of the target node in the target business process; Generate an aspect processor of the target business process, and add a business interception function of the target node in the aspect processor; Adding a first aspect annotation of a corresponding type to the business interception function according to the type of the target node, wherein the first aspect annotation also includes a code path corresponding to the target node; Using the business interception function to monitor the execution process of the target business process, intercepting the first keyword and / or the first exception generated by the code corresponding to the code path during operation, and obtaining a business process exception; Determine the exception type of the business process exception according to a preset business process exception classification set, and upload the monitoring exception information generated according to the target business process, the target node, the business process exception and the exception type to the monitoring alarm platform through a message queue; Wherein, adding a first aspect annotation of a corresponding type to the business interception function according to the type of the target node, wherein the first aspect annotation also includes a code path corresponding to the target node, including: determining the type of the first aspect annotation according to the type of the target node and the function of the business interception function; obtaining the code path corresponding to the target node, and selecting a corresponding annotation matching operator symbol according to the monitoring requirements of the target node, and adding the code path as a parameter of the annotation matching operator symbol; Among them, the use of the business interception function to monitor the execution process of the target business process, intercepting the first keyword and / or the first exception generated by the code corresponding to the code path during runtime, and obtaining the business process exception includes: using the annotation matching operator and the code path to perform a matching operation to obtain a matching code fragment; using the business interception function to monitor whether the running process of the code fragment generates the first keyword and / or the first exception; if generated, obtaining the exception information of the first keyword and / or the first exception as the business process exception.
2. The business process monitoring method according to claim 1, characterized in that: The generating of the aspect processor of the target business process and adding the business interception function of the target node in the aspect processor comprises: Detect whether there is a dependency library for generating the aspect processor, and if not, use a dependency library download tool to download the dependency library; If the dependent library exists, generate an aspect processor for the target business process, and add the second aspect annotation contained in the dependent library to the aspect processor; According to the monitoring requirements of the business process, at least one business interception function of the target node is added in the aspect processor.
3. The business process monitoring method according to claim 1, characterized in that: The determining the exception type of the business process exception according to the preset business process exception classification set, and uploading the monitoring exception information generated according to the target business process, the target node, the business process exception and the exception type to the monitoring alarm platform through the message queue includes: Use the business process exception to perform type matching with the preset business process exception classification set to obtain the exception type of the business process exception; If the type matching fails, the business process exception is taken as a new exception type, and the new exception type is added to the preset business process exception classification set; Sending the target business process, the target node, the business process exception and the exception type as monitoring exception information to the message queue; The message queue uploads the monitoring exception information to the monitoring alarm platform according to the preset uploading rules.
4. The business process monitoring method according to claim 3, characterized in that: After determining the exception type of the business process exception according to the preset business process exception classification set, and uploading the monitoring exception information generated according to the target business process, the target node, the business process exception and the exception type to the monitoring alarm platform through the message queue, it also includes: Sending statistical commands to the monitoring and alarm platform; After receiving the statistical command, the monitoring alarm platform uses the monitoring exception information to generate a business process monitoring exception statistical graph and / or table according to a preset report type; The business process monitoring abnormal statistical graph and / or table is sent to a preset first associated user of the business process.
5. The business process monitoring method according to claim 1, characterized in that: After determining the exception type of the business process exception according to the preset business process exception classification set, and uploading the monitoring exception information generated according to the target business process, the target node, the business process exception and the exception type to the monitoring alarm platform through the message queue, it also includes: Sending an alarm command to the monitoring alarm platform; After receiving the alarm command, the monitoring alarm platform determines whether each type of monitoring abnormal information triggers an alarm according to a preset abnormal type and a preset abnormal type threshold corresponding to the preset abnormal type; If an alarm is triggered, the target monitoring exception information that triggers the alarm, the target exception type corresponding to the target monitoring exception information, and the exception type threshold corresponding to the target exception type are sent as alarm information to the preset second associated user of the business process.
6. A business process monitoring device, characterized in that: include: A node acquisition module, used to acquire a target node and a type of the target node in the target business process according to the logical order of the target business process; Aspect processor module, used to generate the aspect processor of the target business process and add the business interception function of the target node in the aspect processor; A first aspect annotation module, used to add a first aspect annotation of a corresponding type to the business interception function according to the type of the target node, wherein the first aspect annotation also includes a code path corresponding to the target node; A business process exception module, used to use the business interception function to monitor the execution process of the target business process, intercept the first keyword and / or the first exception generated by the code corresponding to the code path during operation, and obtain the business process exception; An exception uploading module is used to determine the exception type of the business process exception according to a preset business process exception classification set, and upload the monitoring exception information generated according to the target business process, the target node, the business process exception and the exception type to the monitoring alarm platform through a message queue; The first aspect annotation module includes: an aspect annotation type submodule, which is used to determine the type of the first aspect annotation according to the type of the target node and the function of the business interception function; a code path submodule, which is used to obtain the code path corresponding to the target node, and select the corresponding annotation matching operator symbol according to the monitoring requirements of the target node, and add the code path as a parameter of the annotation matching operator symbol; Among them, the business process exception module includes: a matching code fragment sub-module, which is used to use the annotation matching operator and the code path to perform matching operations to obtain a matching code fragment; a keyword or exception sub-module, which is used to use the business interception function to monitor whether the running process of the code fragment generates the first keyword and / or the first exception; an exception information sub-module, which is used to obtain the exception information of the first keyword and / or the first exception as a business process exception if generated.
7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the business process monitoring method according to any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the business process monitoring method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
System abnormity alarm method and system, electronic equipment and storage medium
CN113434361A
System running state monitoring method and device, computer equipment and storage medium
CN114416489A