Methods, devices, terminal equipment, and media for collecting and managing program exceptions

CN116166462BActive Publication Date: 2026-08-14SHENZHEN COOCAA NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-13
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0004]有鉴于此,本申请实施例提供了一种程序异常的收集管理方法、装置、终端设备及介质,以解决现有异常检查和异常位置定位的效率和准确率较低的问题

Benefits of technology

[0017]本申请实施例与现有技术相比存在的有益效果是:本申请获取目标程序发送的注册请求,注册请求为目标程序在安装捕获器后基于捕获器构建请求,对注册请求进行校验,并在校验通过后生成注册信息,将注册信息发送给目标程序,建立了与目标程序之间的双向连接,提高了异常收集管理的准确性;并接收捕获器发送的捕获信息,捕获信息为目标程序发生异常时捕获器捕获到的信息,对捕获信息进行异常分析,生成异常分析结果,将捕获信息与异常分析结果合并存储,便于对发生的异常进行集中管理,提高了异常收集管理的效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116166462B_ABST
    Figure CN116166462B_ABST
Patent Text Reader

Abstract

This application relates to the field of exception handling technology, and particularly to a method, apparatus, terminal device, and medium for collecting and managing program exceptions. The method acquires a registration request sent by a target program. This registration request is constructed by the target program based on the catcher after the catcher is installed. The method verifies the registration request and generates registration information upon successful verification. This registration information is then sent to the target program, establishing a bidirectional connection and improving the accuracy of exception collection and management. The method also receives capture information sent by the catcher, which is information captured by the catcher when an exception occurs in the target program. The method performs exception analysis on the capture information, generates exception analysis results, and merges and stores the capture information and the exception analysis results. This facilitates centralized management of occurring exceptions and improves the efficiency of exception collection and management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of exception handling technology, and in particular to a method, apparatus, terminal device and medium for collecting and managing program exceptions. Background Technology

[0002] Collecting, managing, and analyzing anomalies that occur during program development and application can provide important guidance for program optimization. Currently, in the process of program development and application, developers usually actively perform anomaly checks and location, which is inefficient, makes it difficult to detect program anomalies in a timely manner and accurately locate their positions, and greatly reduces the quality of program development and application.

[0003] Therefore, in the field of exception handling technology, how to detect program exceptions and locate their locations in a timely and accurate manner to improve the quality of program development and application has become an urgent problem to be solved. Summary of the Invention

[0004] In view of this, embodiments of this application provide a method, apparatus, terminal device, and medium for collecting and managing program anomalies, in order to solve the problem of low efficiency and accuracy of existing anomaly checks and anomaly location locators.

[0005] In a first aspect, embodiments of this application provide a method for collecting and managing program exceptions, the method comprising:

[0006] Obtain the registration request sent by the target program, wherein the registration request is a request built by the target program based on the capture program after the capture program is installed;

[0007] The registration request is verified, and registration information is generated after the verification is successful. The registration information is then sent to the target program.

[0008] Receive capture information sent by the capture device, wherein the capture information is the information captured by the capture device when the target program encounters an exception;

[0009] Anomaly analysis is performed on the captured information to generate anomaly analysis results, and the captured information and the anomaly analysis results are merged and stored.

[0010] Secondly, embodiments of this application provide a program exception collection and management device, the collection and management device comprising:

[0011] The registration request acquisition module is used to acquire the registration request sent by the target program. The registration request is a request constructed by the target program based on the module capturer after the module capturer is installed.

[0012] The registration request verification module is used to verify the registration request, generate registration information after the verification is successful, and send the registration information to the target program.

[0013] An exception information receiving module is used to receive capture information sent by the module catcher, wherein the capture information is the information captured by the module catcher when an exception occurs in the class of the target program;

[0014] An anomaly analysis and storage module is used to perform anomaly analysis on the captured information, generate anomaly analysis results, and merge and store the captured information and the anomaly analysis results.

[0015] Thirdly, embodiments of this application provide a terminal device, the terminal device including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it implements the program exception collection and management method as described in the first aspect.

[0016] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the program exception collection and management method described in the first aspect.

[0017] The beneficial effects of this application embodiment compared with the prior art are as follows: This application obtains the registration request sent by the target program. The registration request is a request built by the target program based on the capture device after the capture device is installed. The registration request is verified, and registration information is generated after the verification is passed. The registration information is sent to the target program, establishing a bidirectional connection with the target program and improving the accuracy of exception collection and management. It also receives the capture information sent by the capture device. The capture information is the information captured by the capture device when an exception occurs in the target program. The capture information is analyzed to generate an exception analysis result. The capture information and the exception analysis result are merged and stored, which facilitates centralized management of the occurrence of exceptions and improves the efficiency of exception collection and management. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a schematic diagram of an application environment for a method for collecting and managing program exceptions provided in Embodiment 1 of this application;

[0020] Figure 2This is a flowchart illustrating a method for collecting and managing program exceptions provided in Embodiment 2 of this application;

[0021] Figure 3 This is a schematic diagram of the structure of a program exception collection and management device provided in Embodiment 3 of this application;

[0022] Figure 4 This is a schematic diagram of the structure of a terminal device provided in Embodiment 4 of this application. Detailed Implementation

[0023] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0024] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0025] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0026] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0027] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0028] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0029] It should be understood that the sequence number of each step in the following embodiments does not imply 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 embodiments of this application.

[0030] To illustrate the technical solution of this application, specific embodiments are described below.

[0031] The method for collecting and managing program exceptions provided in Embodiment 1 of this application can be applied to applications such as... Figure 1 In this application environment, the front-end and back-end communicate with each other. The front-end includes, but is not limited to, smart TVs, PDAs, desktop computers, laptops, ultra-mobile personal computers (UMPCs), netbooks, cloud terminal devices, and personal digital assistants (PDAs). The back-end can be implemented using a dedicated server or a server cluster consisting of multiple servers.

[0032] See Figure 2 This is a flowchart illustrating a method for collecting and managing program exceptions according to Embodiment 2 of this application. The above-described collection and management method can be applied to... Figure 1 The client in the middle. For example, Figure 2 As shown, the collection and management method may include the following steps:

[0033] Step S201: Obtain the registration request sent by the target program. The registration request is a request built by the target program based on the capturer after the capturer is installed.

[0034] In order to collect exceptions in the development and application process of the target program, this embodiment installs a catcher on the target program to capture detailed information about the exceptions that occur in the target program, which serves as the basis for the collection and management of exceptions in the target program.

[0035] After constructing the registration request based on the catcher, the registration request sent by the target program is obtained to establish a connection with the target program, so that the exception collection and management task for the target program is not an illegal program.

[0036] The above-mentioned acquisition of the registration request sent by the target program is a step in which the target program constructs a request based on the capture tool after installing the capture tool. The capture tool is installed on the target program to capture detailed information about the exceptions that occur in the target program, which facilitates timely and accurate detection of program exceptions and location of exceptions, thereby improving the efficiency and accuracy of exception checking and exception location.

[0037] Step S202: Verify the registration request, generate registration information after successful verification, and send the registration information to the target program.

[0038] Specifically, after receiving the registration request sent by the target program, the registration request is verified, and registration information is generated after the verification is passed. The registration information is then sent to the target program to establish a two-way connection with the target program, which serves as the basis for anomaly collection and management of the target program, thereby improving the accuracy of anomaly collection and management.

[0039] The above steps of verifying the registration request, generating registration information after successful verification, and sending the registration information to the target program establish a bidirectional connection with the target program, thereby improving the accuracy of anomaly collection and management.

[0040] Step S203: Receive capture information sent by the capture device. The capture information is the information captured by the capture device when the target program encounters an exception.

[0041] In this embodiment, the capturer captures detailed exception information when an exception occurs in the target program, and obtains the capture information. The capture information sent by the capturer is used as the basis for analyzing the exception that occurred.

[0042] Optionally, before receiving the capture information sent by the capturer, the following is also included:

[0043] Obtain the interface connection token containing registration information sent by the capturer;

[0044] Verify the validity of the registration information in the interface connection token. If valid, connect to the capture device to receive the capture information sent by the capture device.

[0045] Before receiving the capture information sent by the capture device, the system obtains the interface connection token containing registration information sent by the capture device and verifies whether the registration information in the interface connection token is valid. If valid, the system connects to the capture device to receive the capture information sent by the capture device, thereby ensuring the legality of the capture information and improving the accuracy of anomaly collection and management.

[0046] Before receiving the capture information sent by the capture device, this embodiment verifies the validity of the registration information in the interface connection token sent by the capture device. If the registration information is valid, the capture device is connected and the capture information sent by the capture device is received, thus ensuring the legality of the capture information and improving the accuracy of anomaly collection and management.

[0047] The above steps involve receiving capture information sent by the capture device, which is the information captured by the capture device when an exception occurs in the target program. The capture device captures exception-related information when an exception occurs in the target program, eliminating the need for the user to actively perform exception checks on the target program, thus improving the efficiency of exception collection and management.

[0048] Step S204: Perform anomaly analysis on the captured information, generate anomaly analysis results, and merge and store the captured information and anomaly analysis results.

[0049] After receiving the capture information sent by the capture device, the capture information is analyzed to generate anomaly analysis results, which are used to indicate the severity of the anomaly. The capture information and the anomaly analysis results are merged and stored to facilitate centralized management of the anomalies and improve the efficiency of anomaly collection and management.

[0050] Optionally, the catcher includes a first module catcher and a second module catcher. The first module catcher is used to catch exception class information when an exception occurs in a class of the target program, and the second module catcher is used to catch exception method information when an exception occurs in a method of the class of the target program.

[0051] The capture information sent by the receiver includes:

[0052] Receive exception class information sent by the first module catcher and exception method information sent by the second module catcher;

[0053] Accordingly, anomaly analysis is performed on the captured information to generate anomaly analysis results, and the captured information and anomaly analysis results are merged and stored, including:

[0054] Anomaly analysis is performed on anomaly class information and anomaly method information respectively, generating corresponding anomaly analysis results. The anomaly class information and anomaly method information are then merged and stored with the corresponding anomaly analysis results.

[0055] In this embodiment, class exceptions and method exceptions of the target program are collected and managed. Correspondingly, the catcher includes a first module catcher and a second module catcher. The first module catcher is used to capture exception class information when an exception occurs in a class of the target program, and the second module catcher is used to capture exception method information when an exception occurs in a method of the target program.

[0056] After receiving the exception class information sent by the first module capturer and the exception method information sent by the second module capturer, the exception class information and exception method information are analyzed respectively to generate corresponding exception analysis results. The exception class information and exception method information are then merged and stored with the corresponding exception analysis results for centralized management of the exceptions that occur.

[0057] The capture device in this embodiment includes a first module capture device and a second module capture device, which capture exception class information when exceptions occur in the class and method of the target program, respectively, and analyze and generate corresponding exception analysis results. The exception class information and exception method information are merged and stored with the corresponding exception analysis results, which can centrally manage the class exceptions and method exceptions of the target program and improve the efficiency of program exception collection and management.

[0058] Optionally, storing exception class information and exception method information along with the corresponding exception analysis results includes:

[0059] Extract the project name, program name, package name, class name, and capture date of the exception class information, and map the corresponding exception analysis results;

[0060] Extract the project name, program name, package name, class name, method name, and capture date of the exception method, and map the corresponding exception analysis results;

[0061] Create a storage table and write the project name, program name, package name, class name, method name, capture date, and corresponding exception analysis results into the storage table.

[0062] In order to record exceptions occurring in the target program in detail, so as to facilitate users in locating and repairing exceptions, this embodiment extracts the project name, program name, package name, class name and capture date of the exception class information, and maps them to the corresponding exception analysis results. It also extracts the project name, program name, package name, class name, method name and capture date of the exception method information, maps them to the corresponding exception analysis results, and constructs a storage table. The project name, program name, package name, class name, method name, capture date and the corresponding exception analysis results of the captured exception are written into the storage table. This facilitates centralized management of class exceptions and method exceptions of the target program, thereby improving the efficiency of program exception collection and management.

[0063] In one implementation, the anomaly analysis results include detailed anomaly information and anomaly severity level. The project name, program name, package name, class name, method name, capture date, and corresponding detailed anomaly information and anomaly severity level are written into a storage table. The storage format can be as shown in the table below:

[0064]

[0065] In this table, exception number 01 corresponds to the capture information and analysis result of the first captured exception, exception number 02 corresponds to the capture information and analysis result of the second captured exception, and so on. A is the project name of the target program, B is the program name of the target program, C is the package name of the exception class or the package name of the exception method, D is the class name of the exception class or the class name of the exception method, E is the method name of the exception method (where the method name corresponding to the exception class is empty), F is the detailed exception information corresponding to the exception class or the exception method, G is the exception severity level corresponding to the exception class or the exception method, and H is the capture time corresponding to the exception class or the exception method.

[0066] The severity level of the anomaly can be set according to the actual situation. In this embodiment, the severity level of the anomaly is set to high or low to characterize the severity of the anomaly of the corresponding anomaly class or anomaly method.

[0067] Optionally, after merging and storing the captured information with the anomaly analysis results, it also includes:

[0068] Read the stored capture information and anomaly analysis results, and check whether the anomaly analysis results meet the first preset condition;

[0069] If the detected anomaly analysis result meets the first preset condition, then capture information and anomaly analysis result are sent to the first user.

[0070] Specifically, when managing anomalies, the system reads the stored capture information and anomaly analysis results, compares the anomaly analysis results with a first preset condition, and if the anomaly analysis results meet the first preset condition, it sends the capture information and anomaly analysis results to the first user, so that the first user can locate and repair the anomaly in a timely manner, thereby improving the efficiency of anomaly collection and management.

[0071] In one embodiment, the severity level of the anomaly is set to high or low. Correspondingly, the first preset condition is that the severity level of the anomaly in the anomaly analysis result is high, indicating that the anomaly is relatively serious. In this case, the captured information and the anomaly analysis result are sent to the first user in real time, so that the first user can locate and repair the anomaly in a timely manner, thereby improving the efficiency of anomaly collection and management.

[0072] Optionally, after merging and storing the captured information with the anomaly analysis results, it also includes:

[0073] Read the stored capture information and anomaly analysis results, and check whether the anomaly analysis results meet the second preset condition;

[0074] If the detected anomaly analysis result meets the second preset condition, the current time is obtained, and when the current time reaches the preset time node, the capture information and the anomaly analysis result are sent to the second user.

[0075] Specifically, after reading the stored capture information and anomaly analysis results, the anomaly analysis results are compared with the second preset conditions. If the anomaly analysis results meet the second preset conditions, the current time is obtained, and when the current time reaches the preset time node, the capture information and anomaly analysis results are sent to the second user, so that the second user can manage anomalies in a unified manner, thereby reducing the workload of the second user and improving the work efficiency of the second user.

[0076] In one embodiment, the severity level of the anomaly is set to high or low. Correspondingly, the second preset condition is that the severity level of the anomaly in the anomaly analysis result is low, indicating that the severity of the anomaly is low. Then, the current time is obtained, and when the current time reaches the preset time node, the capture information and the anomaly analysis result are sent to the second user, so that the second user can manage the anomaly in a unified manner, reducing the workload of the second user and improving the work efficiency of the second user.

[0077] The steps described above—analyzing the captured information, generating anomaly analysis results, and merging and storing the captured information and anomaly analysis results—use the anomaly analysis results to represent the severity of the anomaly, and merge and store the captured information and anomaly analysis results to facilitate centralized management of the anomalies that occur, thereby improving the efficiency of anomaly collection and management.

[0078] This application embodiment obtains the registration request sent by the target program. The registration request is built by the target program based on the capture device after the capture device is installed. The registration request is verified, and registration information is generated after the verification is passed. The registration information is sent to the target program, establishing a bidirectional connection with the target program and improving the accuracy of exception collection and management. It also receives the capture information sent by the capture device. The capture information is the information captured by the capture device when an exception occurs in the target program. The capture information is analyzed to generate an exception analysis result. The capture information and the exception analysis result are merged and stored to facilitate centralized management of the occurrence of exceptions and improve the efficiency of exception collection and management.

[0079] Corresponding to the program exception collection and management method in the above embodiment, Figure 3A structural block diagram of the program exception collection and management device provided in Embodiment 3 of this application is shown. For ease of explanation, only the parts relevant to the embodiments of this application are shown.

[0080] See Figure 3 The collection and management device includes:

[0081] The registration request acquisition module 31 is used to acquire the registration request sent by the target program. The registration request is a request built by the target program based on the capturer after the capturer is installed.

[0082] The registration request verification module 32 is used to verify the registration request, and generate registration information after the verification is passed, and send the registration information to the target program;

[0083] The exception information receiving module 33 is used to receive the capture information sent by the capture device. The capture information is the information captured by the capture device when an exception occurs in the target program.

[0084] The anomaly analysis storage module 34 is used to perform anomaly analysis on the captured information, generate anomaly analysis results, and merge and store the captured information and the anomaly analysis results.

[0085] Optionally, the above-mentioned abnormal information receiving module 33 includes:

[0086] The token acquisition submodule is used to acquire the interface connection token containing registration information sent by the capturer;

[0087] The token verification submodule is used to verify whether the registration information in the interface connection token is valid. If it is valid, it connects to the capture device to receive the capture information sent by the capture device.

[0088] Optionally, the catcher includes a first module catcher and a second module catcher. The first module catcher is used to catch exception class information when an exception occurs in a class of the target program, and the second module catcher is used to catch exception method information when an exception occurs in a method of the target program. The exception information receiving module 33 includes:

[0089] The exception information receiving submodule is used to receive exception class information sent by the first module catcher and exception method information sent by the second module catcher.

[0090] Correspondingly, the above-mentioned anomaly analysis storage module 34 includes:

[0091] The exception analysis and storage submodule is used to perform exception analysis on exception class information and exception method information respectively, generate corresponding exception analysis results, and merge and store the exception class information and exception method information with the corresponding exception analysis results.

[0092] Optionally, the above-mentioned anomaly analysis storage submodule includes:

[0093] The exception information extraction unit is used to extract the project name, program name, package name, class name, and capture date of the exception information, and map the corresponding exception analysis results.

[0094] The exception method information extraction unit is used to extract the project name, program name, package name, class name, method name, and capture date of the exception method information, and map the corresponding exception analysis results.

[0095] The exception information storage submodule is used to build a storage table and write the project name, program name, package name, class name, method name, capture date, and corresponding exception analysis results into the storage table.

[0096] Optionally, after the aforementioned anomaly analysis storage module 34, the following may also be included:

[0097] The first anomaly information reading module is used to read the stored capture information and anomaly analysis results, and to detect whether the anomaly analysis results meet the first preset conditions.

[0098] The first anomaly information sending module is used to send capture information and anomaly analysis results to the first user if the detected anomaly analysis results meet the first preset conditions.

[0099] Optionally, after the aforementioned anomaly analysis storage module 34, the following may also be included:

[0100] The second anomaly information reading module is used to read the stored capture information and anomaly analysis results, and to detect whether the anomaly analysis results meet the second preset conditions.

[0101] The second anomaly information sending module is used to obtain the current time if the detected anomaly analysis result meets the second preset condition, and send the capture information and anomaly analysis result to the second user when the current time reaches the preset time node.

[0102] It should be noted that the information interaction and execution process between the above modules are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, which will not be repeated here.

[0103] Figure 4 This is a schematic diagram of the structure of a terminal device provided in Embodiment 4 of this application. Figure 4 As shown, the terminal device of this embodiment includes: at least one processor ( Figure 4 Only one is shown in the diagram), a memory, and a computer program stored in the memory and capable of running on at least one processor, wherein the processor executes the computer program to implement the steps in the embodiments of the methods for collecting and managing any of the above-described program exceptions.

[0104] The terminal device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that... Figure 4 This is merely an example of a terminal device and does not constitute a limitation on the terminal device. A terminal device may include more or fewer components than shown in the figure, or a combination of certain components, or different components, such as network interfaces, displays, and input devices.

[0105] The processor referred to can be a CPU, but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0106] The memory includes readable storage media, internal memory, etc., wherein the internal memory can be the main memory of the terminal device, and the internal memory provides an environment for the operation of the operating system and computer-readable instructions stored in the readable storage media. The readable storage media can be the hard drive of the terminal device, or in some embodiments, it can be an external storage device of the terminal device, such as a plug-in hard drive, a Smart Media Card (SMC), a Secure Digital Card (SD), or a Flash Card. Furthermore, the memory can include both internal storage units and external storage devices of the terminal device. The memory is used to store the operating system, applications, bootloader, data, and other programs, such as program code for computer programs. The memory can also be used to temporarily store data that has been output or will be output.

[0107] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to 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. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above device can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here. If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the above method embodiments. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. A computer-readable medium can include at least: any entity or device capable of carrying computer program code, a recording medium, a computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0108] The implementation of all or part of the processes in the methods of the above embodiments can also be accomplished by a computer program product. When the computer program product is run on a terminal device, the terminal device executes the steps in the above method embodiments.

[0109] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0110] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0111] In the embodiments provided in this application, it should be understood that the disclosed apparatus / terminal devices and methods can be implemented in other ways. For example, the apparatus / terminal device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0112] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0113] 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 of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method for collecting and managing program exceptions, characterized in that, The collection and management method includes: Obtain the registration request sent by the target program, which is a request built by the target program based on the capturer after the capturer is installed; wherein, the capturer is installed for the target program to capture detailed information of the exceptions that occur in the target program, which serves as the basis for the collection and management of exceptions in the target program; The registration request is verified, and registration information is generated after the verification is successful. The registration information is then sent to the target program. Receive capture information sent by the capture device, wherein the capture information is the information captured by the capture device when the target program encounters an exception; Anomaly analysis is performed on the captured information to generate anomaly analysis results, and the captured information and the anomaly analysis results are merged and stored. The catcher includes a first module catcher and a second module catcher. The first module catcher is used to catch exception class information when an exception occurs in a class of the target program, and the second module catcher is used to catch exception method information when an exception occurs in a method of the class of the target program. Receiving the capture information sent by the capture device includes: Receive exception class information sent by the first module catcher and receive exception method information sent by the second module catcher; Accordingly, anomaly analysis is performed on the captured information to generate anomaly analysis results, and the captured information and the anomaly analysis results are merged and stored, including: Anomaly analysis is performed on the anomaly class information and the anomaly method information respectively to generate corresponding anomaly analysis results. The anomaly class information and the anomaly method information are then merged and stored with the corresponding anomaly analysis results.

2. The collection and management method according to claim 1, characterized in that, The process of merging and storing the anomaly class information and the anomaly method information with the corresponding anomaly analysis results includes: Extract the project name, program name, package name, class name, and capture date to which the exception class information belongs, and map the corresponding exception analysis results; Extract the project name, program name, package name, class name, method name, and capture date of the abnormal method information, and map the corresponding exception analysis results; Construct a storage table and write the project name, program name, package name, class name, method name, capture date, and corresponding exception analysis results into the storage table.

3. The collection and management method according to claim 1, characterized in that, Before receiving the capture information sent by the capture device, the process also includes: Obtain the interface connection token containing registration information sent by the capture device; Verify the validity of the registration information in the interface connection token. If valid, connect to the capture device to receive the capture information sent by the capture device.

4. The collection and management method according to claim 1, characterized in that, After merging and storing the captured information with the anomaly analysis results, the method further includes: Read the stored capture information and the anomaly analysis results, and detect whether the anomaly analysis results meet the first preset condition; If the anomaly analysis result is detected to meet the first preset condition, the capture information and the anomaly analysis result are sent to the first user.

5. The collection and management method according to claim 1, characterized in that, After merging and storing the captured information with the anomaly analysis results, the method further includes: Read the stored capture information and the anomaly analysis results, and detect whether the anomaly analysis results meet the second preset condition; If the anomaly analysis result is detected to meet the second preset condition, the current time is obtained, and when the current time reaches a preset time node, the capture information and the anomaly analysis result are sent to the second user.

6. A device for collecting and managing program anomalies, characterized in that, The collection and management device includes: The registration request acquisition module is used to acquire the registration request sent by the target program. The registration request is a request built by the target program based on the capture device after the capture device is installed. The capture device is installed for the target program to capture detailed information about the exceptions that occur in the target program, which serves as the basis for the collection and management of exceptions in the target program. The registration request verification module is used to verify the registration request, generate registration information after the verification is successful, and send the registration information to the target program. An exception information receiving module is used to receive capture information sent by the capture device, wherein the capture information is the information captured by the capture device when the target program encounters an exception; An anomaly analysis and storage module is used to perform anomaly analysis on the captured information, generate anomaly analysis results, and merge and store the captured information and the anomaly analysis results. The exception catcher includes a first module catcher and a second module catcher. The first module catcher is used to catch exception class information when an exception occurs in a class of the target program, and the second module catcher is used to catch exception method information when an exception occurs in a method of the target program's class. The exception information receiving module includes: The exception information receiving submodule is used to receive exception class information sent by the first module catcher and exception method information sent by the second module catcher. Correspondingly, the anomaly analysis storage module includes: The exception analysis and storage submodule is used to perform exception analysis on exception class information and exception method information respectively, generate corresponding exception analysis results, and merge and store the exception class information and exception method information with the corresponding exception analysis results.

7. The collection and management device according to claim 6, characterized in that, The anomaly analysis storage module includes: The exception type information extraction submodule is used to extract the project name, program name, package name, class name and capture date to which the exception type information belongs, and map the corresponding exception analysis results; The exception method information extraction submodule is used to extract the project name, program name, package name, class name, method name, and capture date of the exception method information, and map the corresponding exception analysis results. The exception information storage submodule is used to build a storage table and write the project name, program name, package name, class name, method name, capture date, and corresponding exception analysis results into the storage table.

8. A terminal device, characterized in that, The terminal device includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the collection and management method as described in any one of claims 1 to 5.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the collection and management method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Code exception processing method and device, storage medium and computer equipment

    CN115587046A

  • Exception raised notification

    US20100287414A1