CN113157480A - Error information processing method, device, storage medium and terminal - Google Patents

Error information processing method, device, storage medium and terminal Download PDF

Info

Publication number
CN113157480A
CN113157480A CN202110446926.3A CN202110446926A CN113157480A CN 113157480 A CN113157480 A CN 113157480A CN 202110446926 A CN202110446926 A CN 202110446926A CN 113157480 A CN113157480 A CN 113157480A
Authority
CN
China
Prior art keywords
error
error stack
stack
determining
unique identity
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110446926.3A
Other languages
Chinese (zh)
Inventor
林玮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202110446926.3A priority Critical patent/CN113157480A/en
Publication of CN113157480A publication Critical patent/CN113157480A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/0709Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a distributed system consisting of a plurality of standalone computer nodes, e.g. clusters, client-server systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/0727Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a storage system, e.g. in a DASD or network based storage system

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses an error information processing method, an error information processing device, a storage medium and a terminal, and relates to the technical field of computers. Firstly, receiving a reported error stack, and if the error stack meets the storage condition, performing format and structure processing on the error stack; then generating a unique identity of the error stack; and finally, determining a target storage mode of the error stack based on the unique identity, and storing the error stack according to the target storage mode. On one hand, because the error stack is subjected to format and structure processing when the error stack meets the storage condition, the invalid error stack can be prevented from being stored, and the storage pressure caused by the format and the structure of the error stack is reduced; on the other hand, the target storage mode of the error stack is determined based on the unique identity of the error stack, so that all the error stacks can be prevented from being stored according to the same storage mode, and the occupied space of the error stack is greatly reduced.

Description

Error information processing method, device, storage medium and terminal
Technical Field
The present application relates to the field of computer technologies, and in particular, to an error information processing method, an error information processing apparatus, a storage medium, and a terminal.
Background
With the development of science and technology, people have more and more chances to use electronic devices such as mobile terminals and computers in life, and software is used as a basis for realizing various functions in various electronic devices, for example, a user can realize entertainment, learning, work and the like through an application program, so that how to ensure the stability of the working process of the application program becomes one of the important research points of people in the field.
The Web application program is an application program which can be accessed through Web, and the maximum benefit of the program is that a user can easily access the application program, the user only needs to have a browser and does not need to install other software, but in the related technology, the Web application program has the problem that resources are occupied when error information is stored.
Disclosure of Invention
The application provides an error information processing method, an error information processing device, a storage medium and a terminal, which can solve the technical problem that resources are occupied when a Web application program stores error information in the related technology.
In a first aspect, an embodiment of the present application provides an error information processing method, where the method includes:
receiving a reported error stack, and if the error stack meets the storage condition, performing format and structure processing on the error stack;
generating a unique identity of the error stack;
and determining a target storage mode of the error stack based on the unique identity, and storing the error stack according to the target storage mode.
Optionally, before receiving the reported error stack, the method further includes: and acquiring the service configuration aiming at the invalid error stack through a preset interface at preset time intervals.
Optionally, if the error stack satisfies the storage condition, performing format and structure processing on the error stack, including:
determining whether the error stack is an invalid error stack based on the service configuration; if the error stack is judged to be an invalid error stack, determining that the error stack does not meet the storage condition, and not storing the error stack; and if the error stack is judged not to be an invalid error stack, determining that the error stack meets the storage condition, and performing format and structure processing on the error stack.
Optionally, the performing format and structure processing on the error stack includes: and transforming the error stack according to a preset format, and extracting and combining the repeated features in the error stack.
Optionally, the generating the unique identifier of the error stack includes: acquiring a stack attribute corresponding to the error stack, and determining a unique identity of the error stack according to the stack attribute and a preset algorithm; wherein the stack attributes include, but are not limited to, traffic information, error information, and stack information.
Optionally, the determining a target storage manner of the error stack based on the unique identity and storing the error stack according to the target storage manner includes: judging whether the unique identity exists in an identity database or not; if the unique identity does not exist in the identity database, determining the error stack as a first reported state, and determining the storage mode of the error stack as a first target storage mode; and storing the unique identity into an identity database based on the first target storage mode, and storing the error stack into a data storage database.
Optionally, the determining a target storage manner of the error stack based on the unique identity, and storing the error stack according to the target storage manner further includes: if the unique identity exists in the identity 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 preset information in the error stack in the storage database based on the second target storage mode.
In a second aspect, an embodiment of the present application provides an error information processing apparatus, including:
the preprocessing module is used for receiving the reported error stack, and if the error stack meets the storage condition, performing format and structure processing on the error stack;
the identity generating module is used for generating the unique identity of the error stack;
and the stack storage module is used for determining a target storage mode of the error stack based on the unique identity and storing the error stack according to the target storage mode.
In a third aspect, an embodiment of the present application provides a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to execute steps implementing the above-mentioned method.
In a fourth aspect, embodiments of the present application provide an apparatus comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method described above.
The beneficial effects brought by the technical scheme provided by some embodiments of the application at least comprise:
the application provides a method for processing error information, firstly receiving a reported error stack, and if the error stack meets storage conditions, performing format and structure processing on the error stack; then generating a unique identity of the error stack; and finally, determining a target storage mode of the error stack based on the unique identity, and storing the error stack according to the target storage mode. On one hand, because the error stack is subjected to format and structure processing when the error stack meets the storage condition, the invalid error stack can be prevented from being stored, and the storage pressure caused by the format and the structure of the error stack is reduced; on the other hand, the target storage mode of the error stack is determined based on the unique identity of the error stack, so that all the error stacks can be prevented from being stored according to the same storage mode, and the occupied space of the error stack is greatly reduced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is an exemplary system architecture diagram of an error information processing method according to an embodiment of the present application;
fig. 2 is a system interaction diagram of an error information processing method according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating an error information processing method according to another embodiment of the present application;
fig. 4 is a schematic flowchart of an error information processing method according to another embodiment of the present application;
FIG. 5 is a schematic structural diagram of an error information processing apparatus according to another embodiment of the present application;
FIG. 6 is a schematic structural diagram of an error information processing apparatus according to another embodiment of the present application;
fig. 7 is a schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
In order to make the features and advantages of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims.
Fig. 1 is an exemplary system architecture diagram of an error information processing method according to an embodiment of the present application.
As shown in fig. 1, the system architecture may include at least one terminal 110, a server 120, and a network 130, the network 130 being used to provide a medium for communication links between the terminal 110 and the server 120. The network 130 may include various types of wired or wireless communication links, such as: the wired communication link includes an optical fiber, a twisted pair wire or a coaxial cable, and the Wireless communication link includes a bluetooth communication link, a Wireless-Fidelity (Wi-Fi) communication link, a microwave communication link, or the like.
The terminal 110 may be hardware or software. When the terminal 110 is hardware, it may be various electronic devices having a display screen, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like. When the terminal 110 is software, it may be installed in the electronic devices listed above, and it may be implemented as a plurality of software or software modules (for example, for providing distributed services), or may be implemented as a single software or software module, and is not limited in this respect.
The server 120 may be a business server providing various services. The server 120 may be hardware or software. When the server 120 is hardware, it may be implemented as a distributed server cluster composed of a plurality of servers, or may be implemented as a single server. When the server 120 is software, it may be implemented as a plurality of software or software modules (for example, to provide distributed services), or may be implemented as a single software or software module, and is not limited in particular herein.
It should be understood that the number of terminals, networks, and servers in fig. 1 is merely illustrative. Any number of terminals, networks, and servers may be used, as desired for an implementation. Referring to fig. 2, fig. 2 is a system interaction diagram of an error information processing method according to an embodiment of the present application, and a system interaction process in the error information processing method will be described with reference to fig. 1 and fig. 2.
S201, after the client in the terminal monitors the error information, an error stack is generated based on the error information and the error stack is reported to the server.
S202, the server receives the reported error stack, and if the error stack meets the storage condition, format and structure processing is carried out on the error stack.
Optionally, before receiving the reported error stack, the method further includes: and acquiring the service configuration aiming at the invalid error stack through a preset interface at preset time intervals.
Optionally, if the error stack satisfies the storage condition, performing format and structure processing on the error stack, including: judging whether the error stack is an invalid error stack based on the service configuration; if the error stack is judged to be an invalid error stack, determining that the error stack does not meet the storage condition, and not storing the error stack; if the error stack is not judged to be an invalid error stack, determining that the error stack meets the storage condition, and performing format and structure processing on the error stack.
Further, format and structure processing is performed on the error stack, including: and transforming the error stack according to a preset format, and extracting and combining the repeated features in the error stack.
S203, the server generates the unique identity of the error stack.
Optionally, generating the unique identifier of the error stack includes: acquiring a stack attribute corresponding to the error stack, and determining the unique identity of the error stack according to the stack attribute and a preset algorithm; including but not limited to traffic information, error information, and stack information.
S204, the server determines a target storage mode of the error stack based on the unique identity and stores the error stack according to the target storage mode.
Optionally, determining a target storage manner of the error stack based on the unique identity, and storing the error stack according to the target storage manner, including: judging whether the unique identity exists in the identity database or not; if the unique identity does not exist in the identity 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; and storing the unique identity to an identity database based on the first target storage mode, and storing the error stack to a data storage database.
Optionally, determining a target storage manner of the error stack based on the unique identity, and storing the error stack according to the target storage manner, further comprising: if the unique identity exists in the identity 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 preset information in the error stack in the storage database based on the second target storage mode.
In the embodiment of the application, firstly, the reported error stack is received, and if the error stack meets the storage condition, the format and structure processing is carried out on the error stack; then generating a unique identity of the error stack; and finally, determining a target storage mode of the error stack based on the unique identity, and storing the error stack according to the target storage mode. On one hand, because the error stack is subjected to format and structure processing when the error stack meets the storage condition, the invalid error stack can be prevented from being stored, and the storage pressure caused by the format and the structure of the error stack is reduced; on the other hand, the target storage mode of the error stack is determined based on the unique identity of the error stack, so that all the error stacks can be prevented from being stored according to the same storage mode, and the occupied space of the error stack is greatly reduced.
Referring to fig. 3, fig. 3 is a schematic flowchart illustrating an error information processing method according to another embodiment of the present application.
As shown in fig. 3, the method includes:
s301, receiving the reported error stack, and if the error stack meets the storage condition, performing format and structure processing on the error stack.
It is understood that the error information processing method provided in the embodiments of the present application may be applied to various applications, scripts or execution commands, and for convenience of description, a specific implementation process of the error information processing method is described below by taking application to a Web application as an example.
A Web application is a computer program that performs tasks on the internet using a Web browser and Web technology. Web applications are typically written in browser-supported languages (e.g., JavaScript and HTML) because these languages rely on a browser to render program executables. Web applications require a Web server to manage requests from clients, an application server to perform requested tasks, and sometimes a database to store information.
The following is a typical Web application flow: 1. a user triggers a request to a network server through the internet through a user interface of a network browser or an application program; 2. the Web server forwards the request to the appropriate Web server; 3. the Web server performs the requested task (e.g., querying a database or processing data) and then generates a result of the requested data; 4. the Web server sends the processed data or the requested information or the processed data result 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.
From the above Web application program flow, the Web application program at least includes a client and a server, and the following describes the interaction between the terminal and the server by taking the client as an example. The client in the terminal can be provided with a front-end monitoring system, the front-end monitoring system is a one-stop systematic industry solution for error monitoring of each large Web site, service can be reported by script errors only by simple configuration on a Web front-end script, an alarm threshold value can be set by user-definition for monitoring, and meanwhile, the terminal comprises a visual query system, and error information can be positioned quickly by simple query. The number of the scripts of the Web application program is huge, a developer can difficultly locate a certain problem in many scripts, the front-end monitoring system can quickly find a detailed error log through various query conditions, JavaScript and AJAX request error diagnosis and page loading depth analysis are provided for the developer, the developer is helped to deeply locate each problem detail, and error script codes are helped to be located. Generally, a front-end monitoring system generally comprises four steps: log collection, log storage, statistical analysis, monitoring and alarming. The method and the device mainly focus on the log storage stage, and carry out optimization processing on the abnormal error stack when the front-end javascript language runs so as to reduce the problem that resources are occupied when the error stack is stored.
Because the client in the terminal can be provided with the front-end monitoring system, the front-end monitoring system monitors various error information of the Web application program in the running process, generates an error stack according to the error information, and sends the error stack to the server in a http request or the like, the server can firstly receive the reported error stack.
In the related art, the server directly stores error abnormal data into the database, and then calculates an average value, a total number of errors, a maximum (small) value, a number and the like, and stores the error abnormal data into the database, but most of stored error stacks are script error or container script injection, terminal manufacturer script injection and the like, and are not related to actual services in the Web application program, so that an efficient filtering mechanism needs to be provided to filter invalid error stacks.
In the embodiment of the application, after the reported error stack is received, it can be determined that the error stack meets the storage condition, where the storage condition may be set according to the actual service in the Web application program to filter out an error stack unrelated to the actual service in the Web application program, and when the error stack meets the storage condition, it represents that the error stack is related to the actual service in the Web application program, and other related operations may be performed. If the error stack does not meet the storage condition, the error stack is represented to be irrelevant to the actual service in the Web application program, the error stack can be ignored, that is, the storage processing is not performed on the error stack, so that the server can be prevented from storing some error stacks irrelevant to the actual service in the Web application program, and the storage pressure of the server is reduced.
In the related art, the error stack formats of different browsers are different, and various repeated bytes, domain names or parameters exist in the error stack, which also causes high storage pressure of a server if the error stack is directly stored. Therefore, in the embodiment of the present application, after the error stack meets the storage condition, format and structure processing may be performed on the error stack, so that the format of each error stack is kept uniform, some unnecessary formats are removed, and repeated bytes, domain names or parameters in each error stack are removed, so as to reduce the storage pressure of the server.
S302, generating the unique identity of the error stack.
In the related technology, the repeatability of the same error occurring in the whole network is higher, and if the same error is not judged, the abnormal data of the client is directly stored in the server background, which wastes the database storage resource of the server background.
In the embodiment of the application, because the error stack is subjected to format processing in the steps, the unique identity of the error stack can be easily generated according to a uniform format, and it is convenient to subsequently judge what form of storage needs to be performed on the error stack according to the unique identity of the error stack.
S303, determining a target storage mode of the error stack based on the unique identity, and storing the error stack according to the target storage mode.
After the unique identity of the error stack is acquired, whether the error stack is reported before can be determined according to the unique identity, and if the error stack is not reported before, the complete information and data of the error stack can be stored; if the error stack is reported before, the server stores complete information and data about the error stack, and only the related attribute information of the error stack needs to be stored, but the complete information and data of the error stack do not need to be stored repeatedly.
In the embodiment of the application, firstly, the reported error stack is received, and if the error stack meets the storage condition, the format and structure processing is carried out on the error stack; then generating a unique identity of the error stack; and finally, determining a target storage mode of the error stack based on the unique identity, and storing the error stack according to the target storage mode. On one hand, because the error stack is subjected to format and structure processing when the error stack meets the storage condition, the invalid error stack can be prevented from being stored, and the storage pressure caused by the format and the structure of the error stack is reduced; on the other hand, the target storage mode of the error stack is determined based on the unique identity of the error stack, so that all the error stacks can be prevented from being stored according to the same storage mode, and the occupied space of the error stack is greatly reduced.
Referring to fig. 4, fig. 4 is a schematic flowchart illustrating an error information processing method according to another embodiment of the present application.
As shown in fig. 4, the method includes:
s401, acquiring service configuration aiming at invalid error stacks through a preset interface at preset time intervals.
In this embodiment of the application, in order to facilitate accurate and fast determination of whether the error stack meets the storage condition in the following, a service configuration for the invalid error stack may be preset, where the service configuration may be configured on a third-party system or a system similar to cloud storage, and then the server may obtain the service configuration for the invalid error stack through a preset interface at preset intervals, for example, the server may pull the service configuration through an http interface to a configuration system at regular time (for example, every 10 minutes).
S402, receiving the reported error stack, and judging whether the error stack is an invalid error stack based on the service configuration.
Since the invalid error stack in the above steps can be regarded as an error stack unrelated to the actual service in the Web application program, and the invalid error stack can be set according to the actual service in the Web application program, the service configuration can store the characteristics corresponding to the actual service, and after the reported error stack is received, it can be determined whether the error stack meets the storage condition according to the characteristics, that is, it is determined whether the error stack is an invalid error stack based on the service configuration.
S403, if the error stack is judged to be an invalid error stack, determining that the error stack does not meet the storage condition, and not storing the error stack.
If the error stack is judged to be an invalid error stack, the error stack is determined not to meet the storage condition, and the error stack is represented to be irrelevant to the actual service in the Web application program, so that the error stack can be ignored, that is, the storage processing is not carried out on the error stack, the server can be prevented from storing some error stacks irrelevant to the actual service in the Web application program, and the storage pressure of the server is reduced.
S404, if the error stack is judged not to be the invalid error stack, determining that the error stack meets the storage condition, and performing format and structure processing on the error stack.
If the error stack is determined not to be an invalid error stack, determining that the error stack satisfies the storage condition, which represents that the error stack is related to actual services in the Web application, then format and structure processing may be performed on the error stack to reduce the storage pressure of the server.
Specifically, when the format processing is performed on the error stack, the error stack may be specifically converted according to a preset format, and some unnecessary formats may be removed, so that each error stack is converted into a uniform format after the format conversion. For example, the preset format may be:
Figure BDA0003035571580000101
by the storage format of the error stack, the format difference of the error stack in different browsers can be smoothed, so that the storage pressure of the server is reduced.
Further, when the error stack is subjected to structure processing, repeated features in the error stack can be extracted and merged, wherein the repeated features can be repeated bytes, domain names or parameters, for example, the repeated features can be repeated CDN domain names with scripts, and the repeated features in each error stack can be removed by merging the repeated features in the error stack, so as to reduce the storage pressure of the server.
S405, acquiring a stack attribute corresponding to the error stack, and determining the unique identity of the error stack according to the stack attribute and a preset algorithm.
In the process of generating the unique identifier of the error stack, a stack attribute corresponding to the error stack may be obtained first, and then the unique identifier of the error stack is determined according to the stack attribute and a preset algorithm, where the stack attribute includes, but is not limited to, service information, error information, and stack information, the preset algorithm may be a symmetric encryption algorithm, such as DES, 3DES, AES, or an asymmetric algorithm, such as RSA, DSA, or a hash algorithm, such as SHA-1, MD 5.
S406, judging whether the unique identity exists in the identity database.
After the unique identity of the error stack is obtained, whether the error stack is reported before can be determined according to the unique identity.
S407, if the unique identity does not exist in the identity 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.
Because the identity identification database is a database for storing the identity identification corresponding to the reported error stack, if the unique identity identification does not exist in the identity identification database, the error stack is determined to be reported for the first time, and the storage mode of the error stack is determined to be a first target storage mode, so that the error stack can be processed according to the first target storage mode in the following process.
S408, storing the unique identity into an identity database based on the first target storage mode, and storing the error stack into a data storage database.
After the storage mode of the error stack is determined to be the first target storage mode, the unique identity can be stored in the identity database based on the first target storage mode, so that whether the uploaded error stack is reported for the first time or not can be judged conveniently, the error stack can be stored in the data storage database, and the server can store complete information and data of the error stack at the moment.
The identity database may be a database of a resident memory to ensure that the server determines whether the uploaded error stack is reported for the first time, for example, the identity database is a redis database, and may also specify a certain expiration time (for example, 3 months) for each identity of the identity database to ensure timeliness of each identity; the data storage database may be a non-memory-resident database to ensure stability of the server storage error stack, e.g., the data storage database may be a mongo database.
Further, the generated unique identifier of the error stack can be used as an index key value of the error stack in the data storage database, so as to improve the speed of querying the error stack in the data storage database.
S409, if the unique identity exists in the identity 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.
Because the identity identification database is a database for storing the identity identification corresponding to the reported error stack, if the unique identity identification exists in the identity identification database, the error stack is determined to be reported for the non-first time, and the storage mode of the error stack is determined to be a second target storage mode, so that the error stack is processed according to the second target storage mode in the follow-up process.
And S410, updating preset information in an error stack in the storage database based on the second target storage mode.
After the storage mode of the error stack is determined to be the second target storage mode, since the error stack is reported before, the data storage database in the server stores complete information and data about the error stack, and only the relevant attribute information of the error stack, that is, the preset information, needs to be stored, and the complete information and data of the error stack do not need to be stored repeatedly, for example, the preset information may be the number of error stacks, the region of the user, the occurrence time, the version number of the service front end where the error occurs, and the like.
It can be understood that the occupied space of the preset information of the error stack is far smaller than the occupied space of the complete information and data of the error stack, so that the waste of database storage resources of the server background can be greatly reduced.
In the embodiment of the application, firstly, the reported error stack is received, and if the error stack meets the storage condition, the format and structure processing is carried out on the error stack; then generating a unique identity of the error stack; and finally, determining a target storage mode of the error stack based on the unique identity, and storing the error stack according to the target storage mode. On one hand, because the error stack is subjected to format and structure processing when the error stack meets the storage condition, the invalid error stack can be prevented from being stored, and the storage pressure caused by the format and the structure of the error stack is reduced; on the other hand, the target storage mode of the error stack is determined based on the unique identity of the error stack, so that all the error stacks can be prevented from being stored according to the same storage mode, and the occupied space of the error stack is greatly reduced.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an error information processing apparatus according to another embodiment of the present application.
As shown in fig. 5, the error information processing apparatus 500 includes:
the preprocessing module 510 is configured to receive the reported error stack, and perform format and structure processing on the error stack if the error stack meets the storage condition.
And an identity generation module 520, configured to generate a unique identity of the error stack.
And the stack storage module 530 is used for determining a target storage mode of the error stack based on the unique identity and storing the error stack according to the target storage mode.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an error information processing apparatus according to another embodiment of the present application.
As shown in fig. 6, the error information processing apparatus 600 includes:
a service configuration obtaining module 610, configured to obtain, at preset intervals, a service configuration for the invalid error stack through a preset interface.
The invalid stack determining module 620 is configured to receive the reported error stack, and determine whether the error stack is an invalid error stack based on the service configuration.
The first preprocessing module 630 is configured to determine that the error stack does not satisfy the storage condition if the error stack is determined to be an invalid error stack, and not store the error stack.
The second preprocessing module 640 is configured to determine that the error stack satisfies the storage condition if the error stack is determined not to be an invalid error stack, and perform format and structure processing on the error stack.
Wherein format and structure processing is performed on the error stack, comprising: and transforming the error stack according to a preset format, and extracting and combining the repeated features in the error stack.
The id generation module 650 is configured to obtain a stack attribute corresponding to the error stack, and determine the unique id of the error stack according to the stack attribute and a preset algorithm.
Including but not limited to traffic information, error information, and stack information.
The identity judgment module 660 is configured to judge whether the unique identity exists in the identity database.
The first storage determining module 670 is configured to determine that the error stack is reported for the first time if the unique identity does not exist in the identity database, and determine that the storage manner of the error stack is the first target storage manner.
The first storage execution module 680 is configured to store the unique identifier to the identifier database based on the first target storage manner, and store the error stack to the data storage database.
The second storage determining module 690 is configured to determine that the error stack is not reported for the first time if the unique identity exists in the identity database, and determine that the storage manner of the error stack is the second target storage manner.
The second memory executing module 6100 is configured to update the default information in the error stack in the memory database based on the second target storage manner.
In an embodiment of the present application, an error information processing apparatus includes: the preprocessing module is used for receiving the reported error stack, and if the error stack meets the storage condition, performing format and structure processing on the error stack; the identity generating module is used for generating a unique identity of the error stack; and the stack storage module is used for determining a target storage mode of the error stack based on the unique identity and storing the error stack according to the target storage mode. On one hand, because the error stack is subjected to format and structure processing when the error stack meets the storage condition, the invalid error stack can be prevented from being stored, and the storage pressure caused by the format and the structure of the error stack is reduced; on the other hand, the target storage mode of the error stack is determined based on the unique identity of the error stack, so that all the error stacks can be prevented from being stored according to the same storage mode, and the occupied space of the error stack is greatly reduced.
Embodiments of the present application also provide a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the steps of the method according to any of the above embodiments.
Further, please refer to fig. 7, where fig. 7 is a schematic structural diagram of a terminal according to an embodiment of the present application. As shown in fig. 7, the terminal 700 may include: at least one central processor 701, at least one network interface 704, a user interface 703, a memory 705, at least one communication bus 702.
Wherein a communication bus 702 is used to enable connective communication between these components.
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 standard wireless interface.
The network interface 704 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
The central processor 701 may include one or more processing cores. The central processor 701 connects various parts within the entire terminal 700 using various interfaces and lines, and performs various functions of the terminal 700 and processes data by executing 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 may be implemented in at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The CPU 701 may integrate one or a combination of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the cpu 701, and may be implemented by a single chip.
The Memory 705 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 705 includes a non-transitory computer-readable medium. The memory 705 may be used to store instructions, programs, 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 playing function, an image playing function, etc.), instructions for implementing the various method embodiments described above, and the like; the storage data area may store data and the like referred to in the above respective method embodiments. The memory 705 may optionally be at least one memory device located remotely from the central processor 701. As shown in fig. 7, the memory 705, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and an error information processing program.
In the terminal 700 shown in fig. 7, the user interface 703 is mainly used to provide an input interface for a user to obtain data input by the user; the central processing unit 701 may be configured to call the error information processing program stored in the memory 705, and specifically perform the following operations:
receiving the reported error stack, and if the error stack meets the storage condition, performing format and structure processing on the error stack;
generating a unique identity of the error stack;
and determining a target storage mode of the error stack based on the unique identity, and storing the error stack according to the target storage mode.
In one embodiment, before executing the error stack for receiving the report, the cpu 701 further specifically executes the following steps: and acquiring the service configuration aiming at the invalid error stack through a preset interface at preset time intervals.
In one embodiment, when the central processing unit 701 executes the format and structure processing on the error stack if the error stack satisfies the storage condition, the following steps are specifically executed:
judging whether the error stack is an invalid error stack based on the service configuration; if the error stack is judged to be an invalid error stack, determining that the error stack does not meet the storage condition, and not storing the error stack; if the error stack is not judged to be an invalid error stack, determining that the error stack meets the storage condition, and performing format and structure processing on the error stack.
In one embodiment, when performing format and structure processing on the error stack, the central processing unit 701 specifically performs the following steps:
and transforming the error stack according to a preset format, and extracting and combining the repeated features in the error stack.
In one embodiment, when the central processing unit 701 executes the unique identifier for generating the error stack, the following steps are specifically executed:
acquiring a stack attribute corresponding to the error stack, and determining the unique identity of the error stack according to the stack attribute and a preset algorithm; including but not limited to traffic information, error information, and stack information.
In one embodiment, when the central processing unit 701 executes the target storage mode for determining the error stack based on the unique identity and stores the error stack according to the target storage mode, the following steps are specifically executed:
judging whether the unique identity exists in the identity database or not; if the unique identity does not exist in the identity 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; and storing the unique identity to an identity database based on the first target storage mode, and storing the error stack to a data storage database.
In one embodiment, when the central processing unit 701 executes the target storage mode for determining the error stack based on the unique identity and stores the error stack according to the target storage mode, the following steps are further specifically executed:
if the unique identity exists in the identity 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 preset information in the error stack in the storage database based on the second target storage mode.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of modules is merely a division of logical functions, and an actual implementation may have another division, for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
Modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present application is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In view of the above description of the error information processing method, apparatus, storage medium and terminal provided by the present application, those skilled in the art will recognize that there are variations in the embodiments and applications of the method and apparatus provided by the present application.

Claims (10)

1. An error information processing method, characterized by comprising:
receiving a reported error stack, and if the error stack meets the storage condition, performing format and structure processing on the error stack;
generating a unique identity of the error stack;
and determining a target storage mode of the error stack based on the unique identity, and storing the error stack according to the target storage mode.
2. The method of claim 1, wherein prior to receiving the reported error stack, further comprising:
and acquiring the service configuration aiming at the invalid error stack through a preset interface at preset time intervals.
3. The method of claim 2, wherein the formatting and structuring the error stack if the error stack satisfies a storage condition comprises:
determining whether the error stack is an invalid error stack based on the service configuration;
if the error stack is judged to be an invalid error stack, determining that the error stack does not meet the storage condition, and not storing the error stack;
and if the error stack is judged not to be an invalid error stack, determining that the error stack meets the storage condition, and performing format and structure processing on the error stack.
4. The method of any of claims 1 to 3, wherein said formatting and structuring said error stack comprises:
and transforming the error stack according to a preset format, and extracting and combining the repeated features in the error stack.
5. The method of claim 1, wherein generating the unique identity of the error stack comprises:
acquiring a stack attribute corresponding to the error stack, and determining a unique identity of the error stack according to the stack attribute and a preset algorithm;
wherein the stack attributes include, but are not limited to, traffic information, error information, and stack information.
6. The method of claim 1, wherein determining a target storage manner for the error stack based on the unique identity and storing the error stack in the target storage manner comprises:
judging whether the unique identity exists in an identity database or not;
if the unique identity does not exist in the identity database, determining the error stack as a first reported state, and determining the storage mode of the error stack as a first target storage mode;
and storing the unique identity into an identity database based on the first target storage mode, and storing the error stack into a data storage database.
7. The method of claim 6, wherein determining a target storage manner for the error stack based on the unique identity and storing the error stack in the target storage manner further comprises:
if the unique identity exists in the identity 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 preset information in the error stack in the storage database based on the second target storage mode.
8. An error information processing apparatus, characterized in that the apparatus comprises:
the preprocessing module is used for receiving the reported error stack, and if the error stack meets the storage condition, performing format and structure processing on the error stack;
the identity generating module is used for generating the unique identity of the error stack;
and the stack storage module is used for determining a target storage mode of the error stack based on the unique identity and storing the error stack according to the target storage mode.
9. A computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the steps of the method according to any of claims 1 to 7.
10. A terminal comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor when executing the program implementing the steps of the method according to any of claims 1 to 7.
CN202110446926.3A 2021-04-23 2021-04-23 Error information processing method, device, storage medium and terminal Pending CN113157480A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110446926.3A CN113157480A (en) 2021-04-23 2021-04-23 Error information processing method, device, storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110446926.3A CN113157480A (en) 2021-04-23 2021-04-23 Error information processing method, device, storage medium and terminal

Publications (1)

Publication Number Publication Date
CN113157480A true CN113157480A (en) 2021-07-23

Family

ID=76870311

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110446926.3A Pending CN113157480A (en) 2021-04-23 2021-04-23 Error information processing method, device, storage medium and terminal

Country Status (1)

Country Link
CN (1) CN113157480A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114356434A (en) * 2021-11-26 2022-04-15 北京达佳互联信息技术有限公司 Page loading method, equipment, device, storage medium and program product
CN115577145A (en) * 2022-10-26 2023-01-06 北京国电通网络技术有限公司 Transportation information storage method, transportation information storage apparatus, electronic device, transportation information storage medium, and program product

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104216822A (en) * 2014-09-24 2014-12-17 北京国双科技有限公司 Abnormal information processing method and device
CN108052431A (en) * 2017-12-08 2018-05-18 北京奇虎科技有限公司 Terminal program exception closing information processing method, device, terminal
CN112650613A (en) * 2020-12-29 2021-04-13 北京天融信网络安全技术有限公司 Error information processing method and device, electronic equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104216822A (en) * 2014-09-24 2014-12-17 北京国双科技有限公司 Abnormal information processing method and device
CN108052431A (en) * 2017-12-08 2018-05-18 北京奇虎科技有限公司 Terminal program exception closing information processing method, device, terminal
CN112650613A (en) * 2020-12-29 2021-04-13 北京天融信网络安全技术有限公司 Error information processing method and device, electronic equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114356434A (en) * 2021-11-26 2022-04-15 北京达佳互联信息技术有限公司 Page loading method, equipment, device, storage medium and program product
CN114356434B (en) * 2021-11-26 2024-03-26 北京达佳互联信息技术有限公司 Page loading method, device, apparatus, storage medium and program product
CN115577145A (en) * 2022-10-26 2023-01-06 北京国电通网络技术有限公司 Transportation information storage method, transportation information storage apparatus, electronic device, transportation information storage medium, and program product

Similar Documents

Publication Publication Date Title
CN107844324B (en) Client page jump processing method and device
WO2021189953A1 (en) Log data processing method and apparatus, computer device, and storage medium
CN111125057B (en) Method and device for processing service request and computer system
CN111193633B (en) Method and device for detecting abnormal network connection
CN113157480A (en) Error information processing method, device, storage medium and terminal
CN111046311A (en) Method and device for realizing traceless iteration version of PC (personal computer) end, computer equipment and storage medium
WO2017143747A1 (en) Network request method and system for network terminal
CN114528517A (en) View processing method and device, electronic equipment and computer readable medium
US20230269304A1 (en) Method and apparatus for processing notification trigger message
CN113946816A (en) Cloud service-based authentication method and device, electronic equipment and storage medium
CN113778565A (en) Interface data processing method and device
CN111414154A (en) Method and device for front-end development, electronic equipment and storage medium
CN113590447B (en) Buried point processing method and device
CN115001967A (en) Data acquisition method and device, electronic equipment and storage medium
CN112948733A (en) Interface maintenance method, device, computing equipment and medium
CN113132447A (en) Reverse proxy method and system
CN113779018A (en) Data processing method and device
CN116861455B (en) Event data processing method, system, electronic device and storage medium
CN116720023B (en) Browser operation data processing method and device and electronic equipment
US20220391808A1 (en) Data processing method, electronic device and storage medium
CN115840604B (en) Data processing method, device, electronic equipment and computer readable storage medium
CN112527802B (en) Soft link method and device based on key value database
CN112560462B (en) Event extraction service generation method, device, server and medium
CN109933573B (en) Database service updating method, device and system
CN113760886B (en) Method, apparatus, device and computer readable medium for providing data service

Legal Events

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