Error information processing method, device, storage medium and terminal

By receiving and processing the error stack of the web application, generating a unique identity and determining the target storage method, the resource occupation problem during error information storage in the web application is solved, and the filtering of the invalid error stack and efficient utilization of resources are achieved.

CN113157480BActive Publication Date: 2025-01-14GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110446926.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-23
Publication Date
2025-01-14
Estimated Expiration
2041-04-23

AI Technical Summary

Technical Problem

The problem of web applications occupying resources when storing error messages, especially the waste of resources and storage pressure caused by the storage of invalid error stacks.

Method used

By receiving the reported error stack, determine whether it meets the storage conditions. If it is satisfied, the format and structure will be processed, and a unique identity identification will be generated, and the target storage method will be determined based on the identity identification, so as to avoid the storage and unified storage method of invalid error stacks, and reduce storage pressure.

Benefits of technology

It effectively avoids the storage of invalid error stacks, reduces the waste of storage resources, reduces the space occupied by the error stack, and improves storage efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113157480B_ABST
    Figure CN113157480B_ABST
Patent Text Reader

Abstract

The present application discloses an error information processing method, device, storage medium and terminal, and relates to the field of computer technology. First, a reported error stack is received. If the error stack meets the storage conditions, the error stack is formatted and structured; then a unique identity of the error stack is generated; finally, the target storage method of the error stack is determined based on the unique identity, and the error stack is stored according to the target storage method. On the one hand, since the error stack is formatted and structured only when the error stack meets the storage conditions, the storage of invalid error stacks can be avoided, and the storage pressure caused by the format and structure of the error stack can be reduced; on the other hand, since the target storage method of the error stack is determined based on the unique identity of the error stack, it can be avoided that all error stacks are stored in the same storage method, which greatly reduces the space occupied by the error stack.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an error information processing method, device, storage medium and terminal. Background Art

[0002] With the development of science and technology, people have more and more opportunities to use electronic devices such as mobile terminals and computers in their lives. Software serves as the basis for realizing various functions in various electronic devices. For example, users can use applications to achieve entertainment, learning, and work. Therefore, how to ensure the stability of the application working process has also become one of the research focuses of people in this field.

[0003] A web application is an application that can be accessed through the web. The biggest advantage of this application is that users can easily access the application. Users only need a browser and do not need to install other software. However, in related technologies, web applications have the problem of occupying resources when storing error information. Summary of the invention

[0004] The present application provides an error information processing method, device, storage medium and terminal, which can solve the technical problem of occupying resources when storing error information in a Web application in the related art.

[0005] In a first aspect, an embodiment of the present application provides a method for processing error information, the method comprising:

[0006] Receiving a reported error stack, and if the error stack meets the storage condition, performing format and structure processing on the error stack;

[0007] Generate a unique identifier for the error stack;

[0008] A target storage mode of the error stack is determined based on the unique identification, and the error stack is stored according to the target storage mode.

[0009] Optionally, before receiving the reported error stack, the method further includes: acquiring a service configuration for an invalid error stack through a preset interface at preset intervals.

[0010] Optionally, if the error stack meets the storage condition, formatting and structural processing are performed on the error stack, including:

[0011] Based on the business configuration, determine whether the error stack is an invalid error stack; if the error stack is determined to be an invalid error stack, determine that the error stack does not meet the storage conditions, and do not store the error stack; if the error stack is determined not to be an invalid error stack, determine that the error stack meets the storage conditions, and perform format and structure processing on the error stack.

[0012] Optionally, the performing format and structure processing on the error stack includes: transforming the error stack according to a preset format, and extracting and merging repeated features in the error stack.

[0013] Optionally, generating the unique identity of the error stack includes: acquiring stack attributes corresponding to the error stack, and determining the unique identity of the error stack according to the stack attributes and a preset algorithm; wherein the stack attributes include but are not limited to business information, error information and stack information.

[0014] Optionally, determining the target storage mode of the error stack based on the unique identity identifier and storing the error stack according to the target storage mode includes: judging whether the unique identity identifier exists in an identity identifier database; if the unique identity identifier does not exist in the identity identifier database, determining that the error stack is reported for the first time, and determining that the storage mode of the error stack is a first target storage mode; storing the unique identity identifier in the identity identifier database based on the first target storage mode, and storing the error stack in a data storage database.

[0015] Optionally, determining the target storage mode of the error stack based on the unique identity identifier and storing the error stack according to the target storage mode also includes: if the unique identity identifier exists in the identity identifier database, determining that the error stack is not reported for the first time, and determining that the storage mode of the error stack is a second target storage mode; and updating the preset information in the error stack in the storage database based on the second target storage mode.

[0016] In a second aspect, an embodiment of the present application provides an error information processing device, the device comprising:

[0017] A preprocessing module, used for receiving a reported error stack, and if the error stack meets the storage condition, performing format and structure processing on the error stack;

[0018] An identity generation module, used to generate a unique identity of the error stack;

[0019] The stack storage module is used to determine a target storage mode of the error stack based on the unique identity identifier, and store the error stack according to the target storage mode.

[0020] In a third aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded and executed by a processor to implement the steps of the above-mentioned method.

[0021] In a fourth aspect, an embodiment of the present application provides a device, including 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 method when executing the program.

[0022] The beneficial effects brought about by the technical solutions provided by some embodiments of the present application include at least:

[0023] The present application provides an error information processing method, which first receives a reported error stack, and if the error stack meets the storage conditions, performs format and structure processing on the error stack; then generates a unique identity identifier of the error stack; finally, determines the target storage method of the error stack based on the unique identity identifier, and stores the error stack according to the target storage method. On the one hand, since the error stack is formatted and structured only when the error stack meets the storage conditions, it is possible to avoid storing invalid error stacks and reduce storage pressure caused by the format and structure of the error stack; on the other hand, since the target storage method of the error stack is determined based on the unique identity identifier of the error stack, it is possible to avoid storing all error stacks in the same storage method, greatly reducing the space occupied by the error stack. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0025] Figure 1 An exemplary system architecture diagram of an error information processing method provided in an embodiment of the present application;

[0026] Figure 2 A system interaction diagram of an error information processing method provided in an embodiment of the present application;

[0027] Figure 3 A flowchart of an error information processing method provided by another embodiment of the present application;

[0028] Figure 4A flowchart of an error information processing method provided by another embodiment of the present application;

[0029] Figure 5 A schematic diagram of the structure of an error information processing device provided by another embodiment of the present application;

[0030] Figure 6 A schematic diagram of the structure of an error information processing device provided by another embodiment of the present application;

[0031] Figure 7 A schematic diagram of the structure of a terminal is provided for an embodiment of the present application. DETAILED DESCRIPTION

[0032] In order to make the features and advantages of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0033] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.

[0034] Figure 1 An exemplary system architecture diagram of an error information processing method provided in an embodiment of the present application.

[0035] like Figure 1 As shown, the system architecture may include at least one terminal 110, a server 120, and a network 130, wherein the network 130 is used to provide a medium for a communication link between the terminal 110 and the server 120. The network 130 may include various types of wired communication links or wireless communication links, for example, the wired communication link includes an optical fiber, a twisted pair, or a coaxial cable, and the wireless communication link includes a Bluetooth communication link, a Wireless-Fidelity (Wi-Fi) communication link, or a microwave communication link.

[0036] The terminal 110 may be hardware or software. When the terminal 110 is hardware, it may be various electronic devices with a display screen, including but not limited to a smart phone, a tablet computer, a laptop computer, and a desktop computer. When the terminal 110 is software, it may be installed in the electronic devices listed above, and it may be implemented as multiple software or software modules (for example, to provide distributed services), or it may be implemented as a single software or software module, which is not specifically limited here.

[0037] The server 120 may be a business server that provides various services. It should be noted that the server 120 may be hardware or software. When the server 120 is hardware, it may be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When the server 120 is software, it may be implemented as multiple software or software modules (for example, for providing distributed services), or as a single software or software module, which is not specifically limited here.

[0038] It should be understood that Figure 1 The number of terminals, networks, and servers in the example is only for reference. Any number of terminals, networks, and servers can be used as required. Figure 2 , Figure 2 This is a system interaction diagram of an error information processing method provided in an embodiment of the present application. Figure 1 and Figure 2 This paper introduces the system interaction process in an error information processing method.

[0039] S201: After the client in the terminal monitors the error information, it generates an error stack based on the error information and reports the error stack to the server.

[0040] S202: The server receives the reported error stack, and if the error stack meets the storage condition, performs format and structure processing on the error stack.

[0041] Optionally, before receiving the reported error stack, the method further includes: acquiring a service configuration for the invalid error stack through a preset interface at preset intervals.

[0042] Optionally, if the error stack meets the storage conditions, the error stack is formatted and structurally processed, including: judging whether the error stack is an invalid error stack based on the business configuration; if the error stack is judged to be an invalid error stack, determining that the error stack does not meet the storage conditions, and not performing storage processing on the error stack; if the error stack is judged not to be an invalid error stack, determining that the error stack meets the storage conditions, and performing format and structural processing on the error stack.

[0043] Furthermore, the error stack is formatted and structured, including: transforming the error stack according to a preset format, and extracting and merging repeated features in the error stack.

[0044] S203: The server generates a unique identifier for the error stack.

[0045] Optionally, generating a unique identity of an error stack includes: obtaining stack attributes corresponding to the error stack, and determining the unique identity of the error stack according to the stack attributes and a preset algorithm; wherein the stack attributes include but are not limited to business information, error information, and stack information.

[0046] S204: The server determines a target storage mode of the error stack based on the unique identity identifier, and stores the error stack according to the target storage mode.

[0047] Optionally, a target storage mode of the error stack is determined based on the unique identity identifier, and the error stack is stored according to the target storage mode, including: determining whether there is a unique identity identifier in the identity identifier database; if the unique identity identifier does not exist in the identity identifier database, determining that the error stack is reported for the first time, and determining that the storage mode of the error stack is the first target storage mode; based on the first target storage mode, storing the unique identity identifier in the identity identifier database, and storing the error stack in the data storage database.

[0048] Optionally, determining a target storage mode of the error stack based on a unique identity identifier and storing the error stack according to the target storage mode also includes: if a unique identity identifier exists in an identity identifier database, determining that the error stack is not reported for the first time, and determining that the storage mode of the error stack is a second target storage mode; and updating the preset information in the error stack in the storage database based on the second target storage mode.

[0049] In an embodiment of the present application, the reported error stack is first received. If the error stack meets the storage conditions, the error stack is formatted and structured; then a unique identity of the error stack is generated; finally, the target storage method of the error stack is determined based on the unique identity, and the error stack is stored according to the target storage method. On the one hand, since the error stack is formatted and structured only when the error stack meets the storage conditions, the storage of invalid error stacks can be avoided, and the storage pressure caused by the format and structure of the error stack can be reduced; on the other hand, since the target storage method of the error stack is determined based on the unique identity of the error stack, it is possible to avoid storing all error stacks in the same storage method, greatly reducing the space occupied by the error stack.

[0050] See also Figure 3 , Figure 3A flowchart of an error information processing method provided in another embodiment of the present application.

[0051] like Figure 3 As shown, the method includes:

[0052] S301: receiving a reported error stack, and if the error stack meets a storage condition, performing format and structure processing on the error stack.

[0053] It can be understood that the error information processing method provided in the embodiment of the present application can be applied to various applications, scripts or execution commands. For the convenience of description, the specific implementation process of the error information processing method is introduced below by taking the application in a Web application as an example.

[0054] A web application is a computer program that uses web browsers and web technologies to perform tasks over the Internet. Web applications are usually written in languages ​​supported by browsers, such as JavaScript and HTML, because these languages ​​rely on the browser to render the program executable files. Web applications require a web server to manage requests from clients, an application server to perform the requested tasks, and sometimes a database to store information.

[0055] The following is a typical web application flow: 1. The user triggers a request to the web server through the Internet through a web browser or the application's user interface; 2. The web server forwards this request to the appropriate web server; 3. The web server performs the requested task (such as querying a database or processing data) and then generates the result of the requested data; 4. The web server sends the processed data or the requested information or the result of the processed data to the web server; 5. The web server responds to the client with the requested information, which then appears on the user's display screen.

[0056] From the above-mentioned Web application process, the Web application includes at least a client and a server. The following takes the client being set in the terminal as an example to introduce the interaction between the terminal and the server. The client in the terminal can be set with a front-end monitoring system. The front-end monitoring system is a one-stop systematic industry solution for error monitoring of major Web sites. The business only needs to be simply configured on the web front-end script to realize script error reporting. The alarm threshold can be customized for monitoring. At the same time, it includes a visual query system, which can quickly locate error information through simple queries. The number of Web application scripts is huge, and it becomes difficult for developers to locate a problem in so many scripts. The front-end monitoring system can quickly find detailed error logs through various query conditions, and provide developers with JavaScript, AJAX request error diagnosis and page loading in-depth analysis to help developers deeply locate each problem detail and help locate the error script code. Generally speaking, a front-end monitoring system generally includes four steps: log collection, log storage, statistical analysis, monitoring and alarm. This application mainly focuses on the log storage stage, and optimizes the abnormal error stack when the front-end javascript language is running to reduce the problem of occupying resources when the error stack is stored.

[0057] Since the client in the terminal can be equipped with a front-end monitoring system, the front-end monitoring system monitors various error information during the operation of the Web application, generates an error stack based on the error information, and sends the error stack to the server through http requests, etc., so the server can first receive the reported error stack.

[0058] In the related art, the server directly stores the error and exception data in the database, and then calculates the average value, total number of errors, maximum (minimum) value, number, etc. and stores them in the database. However, most of the stored error stacks are script errors or container script injections, terminal manufacturer script injections, etc., which are irrelevant to the actual business in the Web application. Therefore, it is necessary to provide an efficient filtering mechanism to filter invalid error stacks.

[0059] In an embodiment of the present application, after receiving the reported error stack, it can be determined that the error stack meets the storage condition, wherein the storage condition can be set according to the actual business in the Web application to filter out the error stack that is not related to the actual business in the Web application. If the error stack meets the storage condition, it means that the error stack is related to the actual business in the Web application, and other related operations can be performed. If the error stack does not meet the storage condition, it means that the error stack is not related to the actual business in the Web application, and the error stack can be ignored, that is, the error stack is not stored, so that the server can avoid storing some error stacks that are not related to the actual business in the Web application, reducing the storage pressure of the server.

[0060] In the related art, the error stack formats of different browsers are different, and there are various repeated bytes, domain names or parameters in the error stacks. If these error stacks are directly stored, it will also cause high storage pressure on the server. Therefore, in the embodiment of the present application, after the error stack meets the storage conditions, the error stack can be formatted and structured so that the format of each error stack remains unified, some unnecessary formats are removed, and repeated bytes, domain names or parameters in each error stack are removed to reduce the storage pressure of the server.

[0061] S302: Generate a unique identifier for the error stack.

[0062] In the related art, the repetition rate of the same error in the whole network is relatively high. If it is not determined whether it is the same error, the abnormal data of the client is directly stored in the server background, which will waste the database storage resources of the server background.

[0063] In the embodiment of the present application, since the error stack is formatted in the above steps, a unique identifier of the error stack can be easily generated according to a unified format, which facilitates the subsequent determination of the form in which the error stack needs to be stored according to the unique identifier of the error stack.

[0064] S303: Determine a target storage mode of the error stack based on the unique identity identifier, and store the error stack according to the target storage mode.

[0065] After obtaining the unique identifier of the error stack, it can be determined based on the unique identifier whether the error stack has been reported before. If the error stack has not been reported before, the complete information and data of the error stack can be stored; if the error stack has been reported before, the server will store the complete information and data about the error stack, so only the relevant attribute information of the error stack needs to be stored, and there is no need to repeatedly store the complete information and data of the error stack. It can be understood that the space occupied by the relevant attribute information of the error stack is much smaller than the space occupied by the complete information and data of the error stack, so the waste of database storage resources in the server background can be greatly reduced.

[0066] In an embodiment of the present application, the reported error stack is first received. If the error stack meets the storage conditions, the error stack is formatted and structured; then a unique identity of the error stack is generated; finally, the target storage method of the error stack is determined based on the unique identity, and the error stack is stored according to the target storage method. On the one hand, since the error stack is formatted and structured only when the error stack meets the storage conditions, the storage of invalid error stacks can be avoided, and the storage pressure caused by the format and structure of the error stack can be reduced; on the other hand, since the target storage method of the error stack is determined based on the unique identity of the error stack, it is possible to avoid storing all error stacks in the same storage method, greatly reducing the space occupied by the error stack.

[0067] See also Figure 4 , Figure 4 A flowchart of an error information processing method provided in another embodiment of the present application.

[0068] like Figure 4 As shown, the method includes:

[0069] S401. Obtaining a service configuration for an invalid error stack through a preset interface at preset intervals.

[0070] In an embodiment of the present application, in order to facilitate the subsequent accurate and rapid determination of whether the error stack meets the storage conditions, the business configuration for the invalid error stack can be pre-set. The business configuration can be configured on a third-party system or a system similar to cloud storage. Then, the server can obtain the business configuration for the invalid error stack through a preset interface at preset time intervals. For example, the server can configure the system to pull the business configuration through an http interface at regular intervals (for example, every 10 minutes).

[0071] S402: Receive a reported error stack, and determine whether the error stack is an invalid error stack based on the service configuration.

[0072] Since the invalid error stack in the above steps can be considered as an error stack that is irrelevant to the actual business in the Web application, and the invalid error stack can be set according to the actual business in the Web application, the business configuration can save the characteristics corresponding to the actual business. Therefore, after receiving the reported error stack, it can be determined based on the characteristics whether the error stack meets the storage conditions, that is, whether the error stack is an invalid error stack can be determined based on the business configuration.

[0073] S403: If it is determined that the error stack is an invalid error stack, it is determined that the error stack does not meet the storage condition, and the error stack is not stored.

[0074] If the error stack is judged to be an invalid error stack, it is determined that the error stack does not meet the storage conditions, which means that the error stack is irrelevant to the actual business in the Web application. In this case, the error stack can be ignored, that is, the error stack is not stored. This can avoid the server from storing some error stacks that are irrelevant to the actual business in the Web application, thereby reducing the storage pressure on the server.

[0075] S404: If it is determined that the error stack is not an invalid error stack, it is determined that the error stack meets the storage condition, and the error stack is formatted and structured.

[0076] If it is determined that the error stack is not an invalid error stack, it is determined that the error stack meets the storage condition, which means that the error stack is related to the actual business in the Web application. Then, the error stack can be formatted and structured to reduce the storage pressure of the server.

[0077] Specifically, when formatting the error stack, the error stack may be transformed according to a preset format, and some unnecessary formats may be removed, so that each error stack has a unified format after format transformation. For example, the preset format may be:

[0078]

[0079] Through the above storage format of the error stack, the format differences of the error stacks in different browsers can be smoothed out to reduce the storage pressure of the server.

[0080] Furthermore, when performing structural processing on the error stack, repeated features in the error stack can be extracted and merged, where the repeated features can be repeated bytes, domain names or parameters. For example, the repeated features can be repeated CDN domain names with scripts. By merging the repeated features in the error stack, the repeated features in each error stack can be removed to reduce the storage pressure on the server.

[0081] S405: Obtain stack attributes corresponding to the error stack, and determine a unique identifier of the error stack according to the stack attributes and a preset algorithm.

[0082] In the process of generating a unique identifier of an error stack, the stack attributes corresponding to the error stack can be obtained first, and then the unique identifier of the error stack can be determined based on the stack attributes and a preset algorithm, where the stack attributes include but are not limited to business information, error information, and stack information. The preset algorithm can be a symmetric encryption algorithm, such as DES, 3DES, AES, an asymmetric algorithm, such as RSA, DSA, or a hash algorithm, such as SHA-1, MD5.

[0083] S406: Determine whether there is a unique identity in the identity database.

[0084] After obtaining the unique identifier of the error stack, it is possible to determine whether the error stack has been reported before based on the unique identifier. A feasible implementation method is to determine whether the unique identifier exists in an identifier database, where the identifier database is a database that stores the identifier corresponding to the reported error stack.

[0085] S407: If the unique identity does not exist in the identity database, determine that the error stack is reported for the first time, and determine that the storage mode of the error stack is the first target storage mode.

[0086] Since the identity database is a database that stores the identity corresponding to the reported error stack, if there is no unique identity in the identity database, it is determined that the error stack is reported for the first time, and the storage method of the error stack is determined to be the first target storage method, so that the error stack can be processed subsequently according to the first target storage method.

[0087] S408: Store the unique identity in an identity database based on the first target storage method, and store the error stack in a data storage database.

[0088] After determining that the storage method of the error stack is the first target storage method, the unique identity identifier can be stored in the identity identifier database based on the first target storage method to facilitate subsequent judgment of whether the uploaded error stack is reported for the first time. The error stack can also be stored in the data storage database. At this time, the server can store the complete information and data of the error stack.

[0089] Among them, the identity identification database can be a resident memory database to ensure the speed of the server in determining whether the uploaded error stack is reported for the first time. For example, the identity identification database is a redis database, and a certain expiration time (for example, 3 months) can be specified for each identity in the identity identification database to ensure the timeliness of each identity. The data storage database can be a non-resident memory database to ensure the stability of the server storing the error stack. For example, the data storage database can be a mongo database.

[0090] Furthermore, the unique identification of the error stack generated above can be used as an index key value of the error stack in the data storage database to improve the speed of querying the error stack in the data storage database.

[0091] S409: If there is a unique identity in the identity database, determine that the error stack is not reported for the first time, and determine that the storage method of the error stack is the second target storage method.

[0092] Since the identity database is a database that stores the identity corresponding to the reported error stack, if there is a unique identity in the identity database, it is determined that the error stack is not reported for the first time, and the storage method of the error stack is determined to be the second target storage method, so that the error stack can be processed subsequently according to the second target storage method.

[0093] S410: Update preset information in the error stack in the storage database based on the second target storage method.

[0094] After determining that the storage method of the error stack is the second target storage method, since the error stack has been reported before, the data storage database in the server will store complete information and data about the error stack. Therefore, only the relevant attribute information of the error stack, that is, the preset information, needs to be stored, and there is no need to repeatedly store the complete information and data of the error stack. For example, the preset information can be the number of error stacks, the user's region, the time of occurrence, the version number of the business front-end where the error occurred, etc.

[0095] It can be understood that the space occupied by the preset information of the error stack is much smaller than the space occupied by the complete information and data of the error stack, so the waste of database storage resources in the server background can be greatly reduced.

[0096] In an embodiment of the present application, the reported error stack is first received. If the error stack meets the storage conditions, the error stack is formatted and structured; then a unique identity of the error stack is generated; finally, the target storage method of the error stack is determined based on the unique identity, and the error stack is stored according to the target storage method. On the one hand, since the error stack is formatted and structured only when the error stack meets the storage conditions, the storage of invalid error stacks can be avoided, and the storage pressure caused by the format and structure of the error stack can be reduced; on the other hand, since the target storage method of the error stack is determined based on the unique identity of the error stack, it is possible to avoid storing all error stacks in the same storage method, greatly reducing the space occupied by the error stack.

[0097] See also Figure 5 , Figure 5 A schematic diagram of the structure of an error information processing device provided in another embodiment of the present application.

[0098] like Figure 5 As shown, the error information processing device 500 includes:

[0099] The preprocessing module 510 is used to receive the reported error stack, and if the error stack meets the storage condition, perform format and structure processing on the error stack.

[0100] The identity generating module 520 is used to generate a unique identity of the error stack.

[0101] The stack storage module 530 is used to determine a target storage mode of the error stack based on the unique identity identifier, and store the error stack according to the target storage mode.

[0102] See also Figure 6 , Figure 6 A schematic diagram of the structure of an error information processing device provided in another embodiment of the present application.

[0103] like Figure 6 As shown, the error information processing device 600 includes:

[0104] The service configuration acquisition module 610 is used to acquire the service configuration for the invalid error stack through a preset interface at a preset time interval.

[0105] The invalid stack determination module 620 is configured to receive a reported error stack and determine whether the error stack is an invalid error stack based on the service configuration.

[0106] The first pre-processing module 630 is used to determine that the error stack does not meet the storage condition and does not perform storage processing on the error stack if the error stack is determined to be an invalid error stack.

[0107] The second pre-processing module 640 is used to determine that the error stack meets the storage condition if it is determined that the error stack is not an invalid error stack, and perform format and structure processing on the error stack.

[0108] The error stack is formatted and structured, including: transforming the error stack according to a preset format, and extracting and merging repeated features in the error stack.

[0109] The identity generating module 650 is used to obtain the stack attributes corresponding to the error stack, and determine the unique identity of the error stack according to the stack attributes and a preset algorithm.

[0110] The stack attributes include but are not limited to business information, error information and stack information.

[0111] The identity identification determination module 660 is used to determine whether there is a unique identity identification in the identity identification database.

[0112] The first storage determination module 670 is configured to determine that the error stack is reported for the first time if there is no unique identity in the identity database, and to determine that the storage mode of the error stack is the first target storage mode.

[0113] The first storage execution module 680 is used to store the unique identity in the identity database based on the first target storage method, and store the error stack in the data storage database.

[0114] The second storage determination module 690 is configured to determine that the error stack is not reported for the first time if there is a unique identity in the identity database, and to determine that the storage mode of the error stack is the second target storage mode.

[0115] The second storage execution module 6100 is used to update the preset information in the error stack in the storage database based on the second target storage mode.

[0116] In an embodiment of the present application, an error information processing device includes: a preprocessing module, which is used to receive a reported error stack, and if the error stack meets the storage conditions, the error stack is formatted and structured; an identity generation module, which is used to generate a unique identity of the error stack; a stack storage module, which is used to determine the target storage method of the error stack based on the unique identity, and store the error stack according to the target storage method. On the one hand, since the error stack is formatted and structured only when the error stack meets the storage conditions, it is possible to avoid storing invalid error stacks and reduce the storage pressure caused by the format and structure of the error stack; on the other hand, since the target storage method of the error stack is determined based on the unique identity of the error stack, it is possible to avoid storing all error stacks in the same storage method, greatly reducing the space occupied by the error stack.

[0117] An embodiment of the present application further provides a computer storage medium, which stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the steps of any method in the above embodiments.

[0118] For further information, see Figure 7 , Figure 7 A schematic diagram of the structure of a terminal is provided for an embodiment of the present application. Figure 7 As shown, the terminal 700 may include: at least one central processor 701 , at least one network interface 704 , a user interface 703 , a memory 705 , and at least one communication bus 702 .

[0119] The communication bus 702 is used to realize the connection and communication between these components.

[0120] The user interface 703 may include a display screen (Display) and a camera (Camera), and the optional user interface 703 may also include a standard wired interface and a wireless interface.

[0121] The network interface 704 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0122] Among them, the central processing unit 701 may include one or more processing cores. The central processing unit 701 uses various interfaces and lines to connect various parts in the entire terminal 700, and executes various functions and processes data of the terminal 700 by running or executing instructions, programs, code sets or instruction sets stored in the memory 705, and calling data stored in the memory 705. Optionally, the central processing unit 701 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The central processing unit 701 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communication. It can be understood that the above-mentioned modem may not be integrated into the central processing unit 701, and it can be implemented separately through a chip.

[0123] Among them, the memory 705 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 705 includes a non-transitory computer-readable storage medium. The memory 705 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 705 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned method embodiments, etc.; the data storage area may store data involved in the above-mentioned method embodiments, etc. The memory 705 may optionally be at least one storage device located away from the aforementioned central processor 701. As Figure 7 As shown, the memory 705 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an error information processing program.

[0124] exist Figure 7In the terminal 700 shown, the user interface 703 is mainly used to provide an input interface for the user and obtain the data input by the user; and the central processor 701 can be used to call the error information processing program stored in the memory 705, and specifically perform the following operations:

[0125] Receive the reported error stack, and if the error stack meets the storage conditions, perform format and structure processing on the error stack;

[0126] Generates a unique identifier for the error stack;

[0127] A target storage mode of the error stack is determined based on the unique identifier, and the error stack is stored according to the target storage mode.

[0128] In one embodiment, before receiving the reported error stack, the central processor 701 further specifically performs the following steps: obtaining a service configuration for an invalid error stack through a preset interface at a preset time interval.

[0129] In one embodiment, when the central processor 701 performs format and structure processing on the error stack if the error stack meets the storage condition, the following steps are specifically performed:

[0130] Based on the business configuration, determine whether the error stack is an invalid error stack; if the error stack is determined to be an invalid error stack, determine that the error stack does not meet the storage conditions, and the error stack will not be stored; if the error stack is determined not to be an invalid error stack, determine that the error stack meets the storage conditions, and the error stack will be formatted and structured.

[0131] In one embodiment, when the central processing unit 701 performs format and structure processing on the error stack, it specifically performs the following steps:

[0132] The error stack is transformed into a preset format, and repeated features in the error stack are extracted and merged.

[0133] In one embodiment, the central processor 701 specifically performs the following steps when executing to generate a unique identification mark of an error stack:

[0134] Obtain stack attributes corresponding to the error stack, and determine a unique identifier of the error stack according to the stack attributes and a preset algorithm; wherein the stack attributes include but are not limited to business information, error information, and stack information.

[0135] In one embodiment, when the central processor 701 determines the target storage mode of the error stack based on the unique identity identifier and stores the error stack according to the target storage mode, the central processor 701 specifically performs the following steps:

[0136] Determine whether there is a unique identity in the identity database; if the unique identity does not exist in the identity database, determine that the error stack is reported for the first time, and determine that the storage method of the error stack is the first target storage method; store the unique identity in the identity database based on the first target storage method, and store the error stack in the data storage database.

[0137] In one embodiment, when the central processor 701 determines the target storage mode of the error stack based on the unique identity identifier and stores the error stack according to the target storage mode, it further specifically performs the following steps:

[0138] If there is a unique identity in the identity database, it is determined that the error stack is not reported for the first time, and the storage method of the error stack is determined to be the second target storage method; based on the second target storage method, the preset information in the error stack in the storage database is updated.

[0139] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0140] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0141] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.

[0142] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0143] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0144] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0145] The above is a description of an error information processing method, device, storage medium and terminal provided in the present application. For technicians in this field, according to the ideas of the embodiments of the present application, there may be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for processing error information, characterized in that: The method comprises: Receiving a reported error stack, and if the error stack meets a storage condition, performing format processing and structure processing on the error stack to obtain an error stack in a unified format; wherein the storage condition is used to select the error stack related to the actual business of a target object; the target object is an application, a script, or an execution command; Based on the error stack in the unified format, generating a unique identification corresponding to the error stack in the unified format; Determine a target storage mode of the error stack in the unified format based on the unique identity, and store the error stack in the unified format according to the target storage mode; If the error stack meets the storage condition, the error stack is formatted and structured to obtain an error stack in a unified format, including: Determining whether the error stack is an invalid error stack based on the service configuration; If it is determined that the error stack is not the invalid error stack, it is determined that the error stack meets the storage condition, and the error stack is formatted and structured to obtain the error stack in the unified format; The step of determining a target storage mode of the error stack in a unified format based on the unique identity identifier, and storing the error stack in a unified format according to the target storage mode, includes: Determine whether the unique identity exists in the identity database; If the unique identity does not exist in the identity database, determining that the error stack in the unified format is reported for the first time, and determining that the storage method of the error stack in the unified format is the first target storage method; based on the first target storage method, storing the unique identity in the identity database, and storing the error stack in the unified format in the data storage database; If the unique identity exists in the identity database, it is determined that the error stack in the unified format is not reported for the first time, and the storage method of the error stack in the unified format is determined to be the second target storage method; based on the second target storage method, the preset information in the error stack in the unified format in the data storage database is updated.

2. The method according to claim 1, characterized in that Before receiving the reported error stack, the method further includes: The service configuration for the invalid error stack is obtained through a preset interface at preset intervals.

3. The method according to claim 1, characterized in that If the error stack meets the storage condition, the error stack is formatted and structured to obtain an error stack in a unified format, further comprising: If it is determined that the error stack is the invalid error stack, it is determined that the error stack does not meet the storage condition, and the error stack is not stored.

4. The method according to any one of claims 1 to 3, characterized in that: The step of performing format processing and structure processing on the error stack includes: The error stack is transformed according to a preset format, and repeated features in the error stack are extracted and merged.

5. The method according to claim 1, characterized in that The generating a unique identifier corresponding to the error stack in the unified format includes: Acquire a stack attribute corresponding to the error stack in the unified format, and determine a unique identifier of the error stack in the unified format according to the stack attribute and a preset algorithm; The stack attributes include service information, error information and stack information.

6. An error information processing device, characterized in that: The device comprises: A preprocessing module, used for receiving a reported error stack, and if the error stack meets a storage condition, performing format processing and structural processing on the error stack to obtain an error stack in a unified format; wherein the storage condition is used to select the error stack related to the actual business of the target object; the target object is an application, a script or an execution command; if the error stack meets the storage condition, performing format processing and structural processing on the error stack to obtain an error stack in a unified format, including: judging whether the error stack is an invalid error stack based on the business configuration; if the error stack is judged not to be the invalid error stack, determining that the error stack meets the storage condition, performing format processing and structural processing on the error stack to obtain the error stack in the unified format; An identity generation module, configured to generate a unique identity corresponding to the error stack in the unified format based on the error stack in the unified format; A stack storage module, used to determine the target storage mode of the error stack in the unified format based on the unique identity, and store the error stack in the unified format according to the target storage mode; the determination of the target storage mode of the error stack in the unified format based on the unique identity, and the storage of the error stack in the unified format according to the target storage mode, including: judging whether the unique identity exists in the identity database; if the unique identity does not exist in the identity database, determining that the error stack in the unified format is reported for the first time, and determining that the storage mode of the error stack in the unified format is the first target storage mode; storing the unique identity in the identity database based on the first target storage mode, and storing the error stack in the unified format in the data storage database; if the unique identity exists in the identity database, determining that the error stack in the unified format is not reported for the first time, and determining that the storage mode of the error stack in the unified format is the second target storage mode; updating the preset information in the error stack in the unified format in the data storage database based on the second target storage mode.

7. A computer storage medium, characterized in that: The computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the steps of the method according to any one of claims 1 to 5.

8. A terminal, characterized in that: The method comprises 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 method according to any one of claims 1 to 5 when executing the program.

Citation Information

Patent Citations

  • Terminal program exception closing information processing method and apparatus, and terminal

    CN108052431A

  • Collapse exception information collection method and device, computer equipment and storage medium

    CN108132852A