Abnormal information determination method and device, computer equipment and storage medium
By capturing the data flow to be detected in the system and applying a variety of exception judgment logic, a variety of exception information is extracted, and the problem of single exception information in the prior art is solved, and a more comprehensive system failure analysis is achieved.
Patent Information
- Application Number
- CN202311377028.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-23
- Publication Date
- 2025-04-25
AI Technical Summary
When collecting system exceptions in the prior art, the exception information obtained is relatively single, making it difficult to fully understand the various abnormal situations of system failures.
By capturing the data flow to be detected by the front-end device, and determining whether the data flow is abnormal data based on various types of exception judgment logic, a variety of exception information including user name, route, function name, data table name, status code, exception parameters, exception description, and exception occurrence time are extracted.
It realizes the effective determination of multiple exception information in the data flow, provides more comprehensive exception information, and helps researchers better solve system failures.
Smart Images

Figure CN119892689A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of computer equipment, and in particular to a method, device, computer equipment and storage medium for determining abnormal information. Background Art
[0002] When users browse system applications, system failures often occur. The method to solve the system failures is to first collect system anomalies, and then process the collected system anomalies to solve the system failures.
[0003] Collecting system anomalies is an important part of solving system failures and plays an indispensable role in solving system failures. The methods for collecting system anomalies in related technologies mainly collect anomalies based on traditional log records or collect anomalies based on user feedback.
[0004] However, the abnormal information obtained through the above collection method is relatively simple. Summary of the invention
[0005] Based on this, it is necessary to provide a method, device, computer equipment and storage medium for determining abnormal information that can obtain multiple abnormal information in response to the above technical problems.
[0006] In a first aspect, the present application provides a method for determining abnormal information, comprising:
[0007] Capture the data stream to be detected from the front-end device;
[0008] According to the abnormal judgment condition, determine whether the data stream to be detected is abnormal data; the abnormal judgment condition includes judgment logic of various types of abnormalities;
[0009] When it is determined that the data stream to be detected is abnormal data, abnormal information is extracted from the data stream to be detected; the abnormal information includes user name, route, function name, data table name, status code, abnormal parameter, abnormal description, and abnormal occurrence time.
[0010] The above method realizes the effective determination of multiple abnormal information in a data stream, that is, the abnormal data is determined through the judgment logic of multiple types of abnormalities, and then the abnormal information of the data stream to be detected is extracted as detailed as possible according to the abnormal data. Compared with the existing collection of single abnormal information, the above method can obtain multiple abnormal information of the data stream to a certain extent, thus laying the foundation for researchers to solve system failures based on these abnormal information.
[0011] In one embodiment, the extracting of abnormal information from the data stream to be detected includes:
[0012] According to the judgment logic of various types of exceptions, determine the abnormal type of the data flow to be detected; various types of exceptions include parameter transmission error exception, authentication exception, permission exception, non-existence exception, missing exception, conflict exception and overflow exception;
[0013] The exception class function corresponding to the exception type is called to extract information from the data stream to be detected to obtain exception information.
[0014] The method for determining abnormal information provided in the embodiment of the present application determines the abnormal type of the data stream to be detected based on the type of judgment logic, and then extracts the abnormal information according to the abnormal class function corresponding to the abnormal type, so that the abnormal class function only corresponds to one type of abnormal type, thereby making the extracted abnormal information more accurate.
[0015] In one embodiment, the above-mentioned determination of the abnormality type of the data flow to be detected according to the judgment logic of multiple types of abnormalities includes:
[0016] According to the judgment logic of parameter transmission error exception, authentication exception, permission exception, non-existence exception, missing exception, conflict exception and overflow exception, the exception type of the data stream to be detected is determined.
[0017] The method for determining abnormal information provided in the embodiment of the present application determines the abnormal type of the data stream to be detected based on different types of judgment logic, laying a foundation for subsequently determining accurate abnormal information based on the abnormal type of the data stream to be detected.
[0018] In one embodiment, the above-mentioned determination of the abnormality type of the data stream to be detected according to the judgment logic of the parameter transmission error abnormality, the judgment logic of the authentication abnormality, the judgment logic of the permission abnormality, the judgment logic of the non-existence abnormality, the judgment logic of the missing abnormality, the judgment logic of the conflict abnormality and the judgment logic of the overflow abnormality includes:
[0019] If the data stream to be detected meets the judgment logic of parameter transmission error exception, then the exception type of the data to be detected is determined to be parameter transmission error exception;
[0020] If the data flow to be detected meets the judgment logic of authentication anomaly, it is determined that the anomaly type of the data to be detected is authentication anomaly;
[0021] If the data flow to be detected meets the judgment logic of permission anomaly, it is determined that the anomaly type of the data to be detected is permission anomaly;
[0022] If the data stream to be detected meets the judgment logic of no abnormality, then the abnormality type of the data to be detected is determined to be no abnormality;
[0023] If the data stream to be detected meets the judgment logic of missing anomaly, then the anomaly type of the data to be detected is determined to be missing anomaly;
[0024] If the data stream to be detected meets the judgment logic of conflict anomaly, then the anomaly type of the data to be detected is determined to be a conflict anomaly;
[0025] If the data stream to be detected meets the judgment logic of the overflow exception, it is determined that the exception type of the data to be detected is an overflow exception.
[0026] The method for determining abnormal information provided in the embodiment of the present application determines the abnormal type of the data stream to be detected based on different types of judgment logic, laying a foundation for subsequently determining accurate abnormal information based on the abnormal type of the data stream to be detected.
[0027] In one embodiment, the method further comprises:
[0028] The exception information is recorded in a preset exception data table; the header information in the exception data table includes: at least one of: user name, route, function name, data table name, status code, exception parameter, exception description, and exception occurrence time.
[0029] The method for determining abnormal information provided in the embodiment of the present application can record the abnormal information in a preset abnormal data table, so that the abnormal information of the data to be detected can be intuitively obtained later according to the information recorded in the preset abnormal data table.
[0030] In one embodiment, the method further comprises:
[0031] When the exception acquisition instruction sent by the front-end device is received, the exception data table is sent to the front-end device for display.
[0032] The method for determining abnormal information provided in the embodiment of the present application can send the abnormal data table to the front-end device for display, so that the user of the later front-end device can intuitively obtain the abnormal information of the data to be detected based on the information recorded in the preset abnormal data table.
[0033] In one embodiment, the method further comprises:
[0034] Send the exception description and status code to the front-end device for display.
[0035] The method for determining abnormal information provided in the embodiment of the present application can send the abnormal data table to the front-end device for display, so that the user of the later front-end device can intuitively obtain the abnormal information of the data to be detected based on the information recorded in the preset abnormal data table.
[0036] In a second aspect, the present application also provides a device for determining abnormal information, including:
[0037] A capture module, used to capture the data stream to be detected of the front-end device;
[0038] A determination module is used to determine whether the data stream to be detected is abnormal data according to an abnormal judgment condition; the abnormal judgment condition includes judgment logic of various types of abnormalities;
[0039] The extraction module is used to extract abnormal information from the data stream to be detected when it is determined that the data stream to be detected is abnormal data; the abnormal information includes user name, route, function name, data table name, status code, abnormal parameter, abnormal description, and abnormal occurrence time.
[0040] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0041] Capture the data stream to be detected from the front-end device;
[0042] According to the abnormal judgment condition, determine whether the data stream to be detected is abnormal data; the abnormal judgment condition includes judgment logic of various types of abnormalities;
[0043] When it is determined that the data stream to be detected is abnormal data, abnormal information is extracted from the data stream to be detected; the abnormal information includes user name, route, function name, data table name, status code, abnormal parameter, abnormal description, and abnormal occurrence time.
[0044] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0045] Capture the data stream to be detected from the front-end device;
[0046] According to the abnormal judgment condition, determine whether the data stream to be detected is abnormal data; the abnormal judgment condition includes judgment logic of various types of abnormalities;
[0047] When it is determined that the data stream to be detected is abnormal data, abnormal information is extracted from the data stream to be detected; the abnormal information includes user name, route, function name, data table name, status code, abnormal parameter, abnormal description, and abnormal occurrence time.
[0048] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0049] Capture the data stream to be detected from the front-end device;
[0050] According to the abnormal judgment condition, determine whether the data stream to be detected is abnormal data; the abnormal judgment condition includes judgment logic of various types of abnormalities;
[0051] When it is determined that the data stream to be detected is abnormal data, abnormal information is extracted from the data stream to be detected; the abnormal information includes user name, route, function name, data table name, status code, abnormal parameter, abnormal description, and abnormal occurrence time.
[0052] The above-mentioned method, device, computer equipment and storage medium for determining abnormal information, the back-end device can capture the data stream to be detected of the front-end device, and determine whether the data stream to be detected is abnormal data according to the abnormal judgment conditions; the abnormal judgment conditions include the judgment logic of various types of abnormalities, and in the case of determining that the data stream to be detected is abnormal data, extract abnormal information from the data stream to be detected; the abnormal information includes user name, route, function name, data table name, status code, abnormal parameter, abnormal description, and abnormal occurrence time. The above-mentioned method realizes the effective determination of multiple abnormal information in a data stream, that is, the abnormal data is determined by the judgment logic of various types of abnormalities, and then the abnormal information of the data stream to be detected is extracted as detailed as possible according to the abnormal data. Compared with the existing collection of single abnormal information, the above-mentioned method can obtain multiple abnormal information of the data stream to a certain extent, thereby laying a foundation for researchers to solve system failures based on these abnormal information. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0054] Figure 1 A diagram of an application environment of a method for determining abnormal information in an embodiment;
[0055] Figure 2 is a flow chart of a method for determining abnormal information in one embodiment;
[0056] Figure 3 is a flow chart of a method for determining abnormal information in another embodiment;
[0057] Figure 4 is a flow chart of a method for determining abnormal information in another embodiment;
[0058] Figure 5 is a flow chart of a method for determining abnormal information in another embodiment;
[0059] Figure 6 is a flow chart of a method for determining abnormal information in another embodiment;
[0060] Figure 7 is a flow chart of a method for determining abnormal information in another embodiment;
[0061] Figure 8 is a flow chart of a method for determining abnormal information in another embodiment;
[0062] Fig. 9 is a structural block diagram of a device for determining abnormal information in an embodiment;
[0063] Fig.10 is a structural block diagram of a device for determining abnormal information in an embodiment;
[0064] Fig.11 is a structural block diagram of a device for determining abnormal information in an embodiment;
[0065] Fig.12 is a structural block diagram of a device for determining abnormal information in an embodiment;
[0066] Fig.13 FIG. 4 is a structural block diagram of a device for determining abnormal information in an embodiment. DETAILED DESCRIPTION
[0067] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0068] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.
[0069] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.
[0070] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0071] When users browse system applications, system failures often occur. The method to solve system failures is to first collect system exceptions, and then process the collected system exceptions to solve the system failures. Collecting system exceptions is an important part of solving system failures and plays an indispensable role in the process of solving system failures. The method of collecting system exceptions in related technologies is mainly based on traditional log records for exception collection, or statistical collection of exceptions based on user feedback. However, the exception information obtained by the above collection method is relatively simple. The present application aims to solve this problem.
[0072] After introducing the background technology of the method for determining abnormal information provided by the embodiment of the present application, the implementation environment involved in the method for determining abnormal information provided by the embodiment of the present application will be briefly described below. The method for determining abnormal information provided by the embodiment of the present application can be applied to Figure 1 The computer device shown in FIG. 1 may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 1As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for determining abnormal information is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0073] Those skilled in the art will understand that Figure 1 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific terminal may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0074] After introducing the application scenarios of the method for determining abnormal information provided by the embodiments of the present application, the following focuses on introducing the method for determining abnormal information described in the present application.
[0075] In one embodiment, Figure 2 As shown, a method for determining abnormal information is provided, and the method is applied to Figure 1 The computer device in the example is used to illustrate, including the following steps:
[0076] S201, capturing the data stream to be detected of the front-end device.
[0077] The front-end device is a device on which the user can browse the information presented on the page, for example, a device on which the user can browse some style layout pages, or a device on which the user can browse some functional logic, etc. The front-end device may include a mobile phone device, a computer device, a tablet computer, etc. The data to be detected is the data stream generated by the front-end device when the user browses the page of the front-end device or the front-end device is in standby mode.
[0078] In an embodiment of the present application, when a user browses a front-end device page, or the front-end device is in standby mode, the front-end device will generate multiple data streams to be detected. The generation of the data streams to be detected may cause invasion of external viruses, etc. Therefore, it is necessary to detect the data streams to be detected generated by the front-end device and process the detected abnormal information. Therefore, when the back-end device needs to collect abnormal data information in the data streams to be detected generated by the front-end device, it is necessary to first send an acquisition instruction to the front-end device, so that after the front-end device receives the acquisition instruction sent by the back-end device, it sends the data streams to be detected and the data streams generated in the request process to the back-end device. After the front-end device sends the data streams to be detected and the data streams generated in the request process to the back-end device, the back-end device captures the data streams to be detected and the data streams generated in the request process of the front-end device.
[0079] S202: Determine whether the data stream to be detected is abnormal data according to an abnormality judgment condition.
[0080] Among them, the exception judgment conditions include the judgment logic of various types of exceptions, for example, various types of exceptions include parameter transmission error exception, authentication exception, permission exception, non-existence exception, missing exception, conflict exception and overflow exception, etc.; parameter transmission error exception refers to the exception that the parameter transmission data request issued and the parameter transmission data received are different; authentication exception refers to the exception caused by authentication, which is often used in scenarios such as Token (a string of encrypted strings generated by the server as a "token" for client requests) user token authentication expiration / invalidity, single sign-on (Single Sign On, SSO) login, etc.; permission exception refers to the exception caused by the lack of certain permissions or the lack of a certain role. When certain operations on the website have special restrictions, for example, background data management usually requires users to have the system administrator role or have corresponding permissions to access and operate; non-existence exception refers to the exception caused by null / non-existence, that is, the value is an empty string or an empty list, or the data does not exist in the database, or the function method does not pass parameters, etc.; missing exception refers to the request processing method corresponding to the lack of resources; conflict exception refers to the exception caused by data dependency. It means that when users perform certain operations, they may need to meet certain conditions before they can proceed; overflow exception or database exception refers to exceptions caused by data tables or servers, for example, memory overflow that may be encountered when saving / deleting data tables or uploading files to the server.
[0081] In an embodiment of the present application, after the data stream to be detected of the front-end device is captured as mentioned above, the data stream to be detected can be detected based on a preset abnormal judgment condition, and then it can be obtained that the data stream to be detected is abnormal data or the data stream to be detected is normal data, and the detection is stopped when it is detected that the data stream to be detected is abnormal data. Optionally, if the abnormal judgment condition includes the judgment logic of parameter transmission error exception, then the data stream to be detected is detected based on the judgment logic of parameter transmission error exception to obtain whether the data stream to be detected is parameter transmission error exception data, and the detection is stopped when it is detected that the data stream to be detected is parameter transmission error exception data; Optionally, if the abnormal judgment condition includes the judgment logic of authentication exception, then the data stream to be detected is detected based on the judgment logic of authentication exception to obtain whether the data stream to be detected is authentication exception data, and the detection is stopped when it is detected that the data stream to be detected is authentication exception data; Optionally, the abnormal judgment condition includes the judgment logic of authentication exception and the judgment logic of parameter transmission error exception, then the data stream to be detected is detected based on the judgment logic of authentication exception and the judgment logic of parameter transmission error exception at the same time, and it is obtained that the data stream to be detected is authentication exception data, or parameter transmission error exception data, or both authentication exception data and parameter error exception data, or the data stream to be detected is normal data, and the detection is stopped when it is detected that the data stream to be detected is authentication exception data, or parameter transmission error exception data, or both authentication exception data and parameter error exception data.
[0082] S203: When it is determined that the data stream to be detected is abnormal data, extract abnormal information from the data stream to be detected.
[0083] Among them, the exception information includes user name, route, function name, data table name, status code, exception parameters, exception description, and exception occurrence time; the user name refers to the identifier of the user corresponding to the data flow where the exception occurs; the route refers to the route when the user accesses the abnormal location; the function name refers to the function name where the exception occurs, and the function name is specific and unique; the data table name refers to the data table name when the exception occurs, for example, the user data table name and the role data table name, etc.; the status code refers to the response status code when the exception occurs, which is used to distinguish the exception type. Different exception types correspond to different status codes. For example, the status code corresponding to the authentication exception is 401, the status code corresponding to the missing exception is 403, and the status code corresponding to the non-existent exception is 404. The status code for an exception is 404, the status code for a conflict exception is 409, the status code for an overflow exception or a database exception is 500, etc.; exception parameters refer to exception fields and their values; exception description refers to the explanation / description of the exception, that is, when a clear judgment is made, the user can clearly understand the cause of the exception. When the exception is unpredictable or complex and diverse, the English expression of the programming language can be used. In addition, under normal circumstances, the exception description information is equivalent to the prompt presented to the user in the response to the web page. In particular, when the status code is 500, the description information stores the English expression automatically captured by the programming language; the exception occurrence time refers to the time when the exception occurred, that is, the time when the route was accessed.
[0084] In the embodiment of the present application, when it is determined that the data stream to be detected is abnormal data, an extraction function is called from the database, and abnormal information is extracted from the data stream to be detected based on the extraction function. It should be noted that the extraction function is stored in the database of the computer device and is used to extract abnormal information of the abnormal data stream from the data stream to be detected.
[0085] The method for determining abnormal information provided by the embodiment of the present application is that the back-end device can capture the data stream to be detected of the front-end device, and determine whether the data stream to be detected is abnormal data according to the abnormal judgment condition; the abnormal judgment condition includes the judgment logic of various types of abnormalities, and in the case of determining that the data stream to be detected is abnormal data, extract abnormal information from the data stream to be detected; the abnormal information includes user name, route, function name, data table name, status code, abnormal parameter, abnormal description, and abnormal occurrence time. The above method realizes the effective determination of multiple abnormal information in a data stream, that is, the abnormal data is determined by the judgment logic of various types of abnormalities, and then the abnormal information of the data stream to be detected is extracted as detailed as possible according to the abnormal data. Compared with the existing collection of single abnormal information, the above method can obtain multiple abnormal information of the data stream to a certain extent, thereby laying a foundation for researchers to solve system failures based on these abnormal information.
[0086] In one embodiment, a method for extracting abnormal information from a data stream to be detected is provided, namely, the “extracting abnormal information from a data stream to be detected” in the above S203, such as Figure 3 As shown, including:
[0087] S301. Determine the abnormal type of the data flow to be detected according to the judgment logic of multiple types of abnormalities.
[0088] Among them, various types of exceptions include parameter transmission error exception, authentication exception, permission exception, non-existence exception, missing exception, conflict exception and overflow exception.
[0089] In an embodiment of the present application, after determining the judgment logic of multiple types of exceptions in the above S202, the computer device can determine the abnormal type of the data stream to be detected according to the judgment logic of multiple types of exceptions. For example, if the abnormal judgment condition (i.e., the judgment logic of the abnormality) determined in the above S202 is the judgment logic of the parameter transmission error exception, then the abnormal type of the data stream to be detected is determined to be the parameter transmission error exception; for another example, if the abnormal judgment condition (i.e., the judgment logic of the abnormality) determined in the above S202 is the judgment logic of the parameter transmission error exception, then the abnormal type of the data stream to be detected is determined to be the parameter transmission error exception; for another example, if the abnormal judgment condition (i.e., the judgment logic of the abnormality) determined in the above S202 is the judgment logic of the permission exception, then the abnormal type of the data stream to be detected is determined to be the permission exception.
[0090] S302: Call an exception class function corresponding to the exception type to extract information from the data stream to be detected to obtain exception information.
[0091] Among them, the exception class function refers to a function that can extract exception information from the data stream to be detected, and one exception type corresponds to one exception class function, that is, the parameter transmission error exception corresponds to the parameter transmission error exception class function, the authentication exception corresponds to the authentication exception class function, the permission exception corresponds to the permission exception class function, and the non-existence exception corresponds to the non-existence exception class function, etc. For example, the permission exception class function can be expressed as:
[0092] {
[0093] class FORBIDDEN(Forbidden):
[0094] def_init_(self, description=None, response=None, msg=None, extra={}):
[0095] super()._init_(description,response)
[0096] self.extra = extra
[0097] self.msg=msg if msg else description
[0098] }
[0099] Among them, "class FORBIDDEN(Forbidden)" refers to the definition of the permission exception class function, "def_init_(self,description=None,response=None,msg=None,extra={})" represents the description of the permission exception class provided by werkzeug.exceptions (refers to a submodule in the Python Web (language web page) development framework Werkzeug, which mainly provides classes and functions related to exceptions). It should be noted that the description of the permission exception class provided by werkzeug.exceptions cannot add or supplement additional information; "super()._init_(description,response)" refers to the inheritance description of the original permission exception class provided by werkzeug.exceptions, which is also a collection description; "self.extra=extra" and "self.msg=msg if msg elsedescription" refer to rewriting the description of the original permission exception class provided by werkzeug.exceptions, that is, rewriting the prompt information. In most cases, the prompt information is the information required by the front-end device to prompt the user with a more intuitive and easy-to-understand exception.
[0100] In the embodiment of the present application, after the abnormal type of the data stream to be detected is obtained, the computer device can also call the abnormal class function corresponding to the abnormal type to extract information from the data stream to be detected to obtain abnormal information. It should be noted that the abnormal class function corresponding to the abnormal type is pre-stored in the computer device so that the computer can call these abnormal class functions to extract abnormal information from the data stream to be detected. It should be noted that as for routing, it can be obtained through the request path of Flask (for example, request.path).
[0101] The method for determining abnormal information provided in the embodiment of the present application determines the abnormal type of the data stream to be detected based on the type of judgment logic, and then extracts the abnormal information according to the abnormal class function corresponding to the abnormal type, so that the abnormal class function only corresponds to one type of abnormal type, thereby making the extracted abnormal information more accurate.
[0102] In one embodiment, a method for determining the abnormal type of the data stream to be detected based on the judgment logic of multiple types of abnormalities is also provided, that is, the "determining the abnormal type of the data stream to be detected based on the judgment logic of multiple types of abnormalities" in the above S301 includes:
[0103] According to the judgment logic of parameter transmission error exception, authentication exception, permission exception, non-existence exception, missing exception, conflict exception and overflow exception, the exception type of the data stream to be detected is determined.
[0104] In the embodiment of the present application, when the computer device receives the data stream to be detected sent by the front-end device, it can first determine whether the data stream to be detected is a parameter transmission error exception according to the judgment logic of the parameter transmission error exception. If the judgment result is yes, the data stream to be detected is a parameter transmission error exception. If the judgment result is no, then continue to determine whether the data stream to be detected is an authentication exception. If the judgment result is yes, the data stream to be detected is an authentication exception. If the judgment result is no, then continue to determine whether the data stream to be detected is a permission exception. If the judgment result is yes, the data stream to be detected is a permission exception. If the judgment result is no, then continue to determine whether the data stream to be detected is a permission exception. Check whether the data stream does not have an exception. If the judgment result is yes, the data stream to be detected does not have an exception. If the judgment result is no, continue to judge whether the data stream to be detected is a missing exception. If the judgment result is yes, the data stream to be detected is a missing exception. If the judgment result is no, continue to judge whether the data stream to be detected is a conflict exception. If the judgment result is yes, the data stream to be detected is a conflict exception. If the judgment result is no, continue to judge whether the data stream to be detected is an overflow exception. If the judgment result is yes, the data stream to be detected is an overflow exception. If the judgment result is no, it means that the data stream to be detected is not abnormal.
[0105] The method for determining abnormal information provided in the embodiment of the present application determines the abnormal type of the data stream to be detected based on different types of judgment logic, laying a foundation for subsequently determining accurate abnormal information based on the abnormal type of the data stream to be detected.
[0106] In one embodiment, an implementation method for determining the abnormal type of the data flow to be detected is also provided, that is, the above-mentioned "determining the abnormal type of the data flow to be detected according to the judgment logic of the parameter transmission error abnormality, the judgment logic of the authentication abnormality, the judgment logic of the permission abnormality, the judgment logic of the non-existence abnormality, the judgment logic of the missing abnormality, the judgment logic of the conflict abnormality and the judgment logic of the overflow abnormality", such as Figure 4 As shown, including:
[0107] S401: If the data stream to be detected meets the judgment logic of parameter transmission error exception, determine that the exception type of the data to be detected is parameter transmission error exception;
[0108] S402: If the data flow to be detected meets the judgment logic of authentication anomaly, determine that the anomaly type of the data to be detected is authentication anomaly;
[0109] S403: If the data flow to be detected meets the judgment logic of permission anomaly, determine that the anomaly type of the data to be detected is permission anomaly;
[0110] S404: If the data stream to be detected meets the judgment logic of no abnormality, then determine that the abnormality type of the data to be detected is no abnormality;
[0111] S405: If the data stream to be detected meets the judgment logic of missing anomaly, determine that the anomaly type of the data to be detected is missing anomaly;
[0112] S406: If the data stream to be detected meets the judgment logic of conflict anomaly, determine that the anomaly type of the data to be detected is a conflict anomaly;
[0113] S407: If the data flow to be detected meets the judgment logic of overflow exception, determine that the exception type of the data to be detected is overflow exception.
[0114] In an embodiment of the present application, when a computer device receives a data stream to be detected sent by a front-end device, it can determine whether the data stream to be detected is a parameter transmission error exception according to the judgment logic of the parameter transmission error exception. If the judgment result is yes, the data stream to be detected is a parameter transmission error exception; determine whether the data stream to be detected is an authentication exception according to the judgment logic of the authentication exception. If the judgment result is yes, the data stream to be detected is an authentication exception; determine whether the data stream to be detected is a permission exception according to the judgment logic of the authentication exception. If the judgment result is yes, the data stream to be detected is a permission exception; determine whether the data stream to be detected is a non-existence exception according to the judgment logic of the authentication exception. If the judgment result is yes, the data stream to be detected is a non-existence exception; determine whether the data stream to be detected is a missing exception according to the judgment logic of the authentication exception. If the judgment result is yes, the data stream to be detected is a missing exception; determine whether the data stream to be detected is a conflict exception according to the judgment logic of the authentication exception. If the judgment result is yes, the data stream to be detected is a conflict exception; determine whether the data stream to be detected is an overflow exception according to the judgment logic of the authentication exception. If the judgment result is yes, the data stream to be detected is an overflow exception.
[0115] The method for determining abnormal information provided in the embodiment of the present application determines the abnormal type of the data stream to be detected based on different types of judgment logic, laying a foundation for subsequently determining accurate abnormal information based on the abnormal type of the data stream to be detected.
[0116] In one embodiment, Figure 5 As shown, the above method also includes:
[0117] S204: Record the abnormal information in a preset abnormal data table.
[0118] The header information in the abnormal data table includes at least one of: user name, route, function name, data table name, status code, abnormal parameter, abnormal description, and abnormal occurrence time.
[0119] In an embodiment of the present application, a preset exception data table including information such as user name, route, function name, data table name, status code, exception parameter, exception description, exception occurrence time, etc. can be pre-constructed. After the exception information is obtained as described above, the exception information can be recorded in the preset exception data table accordingly, so that the exception information of the data to be detected can be intuitively obtained later according to the information recorded in the preset exception data table.
[0120] The method for determining abnormal information provided in the embodiment of the present application can record the abnormal information in a preset abnormal data table, so that the abnormal information of the data to be detected can be intuitively obtained later according to the information recorded in the preset abnormal data table.
[0121] In one embodiment, in the above Figure 5 On the basis of Figure 6 As shown, the above method also includes:
[0122] S205. When receiving the exception acquisition instruction sent by the front-end device, the exception data table is sent to the front-end device for display.
[0123] In an embodiment of the present application, after the exception information is recorded in the preset exception data table, when an exception acquisition instruction sent by the front-end device is received, the exception data table can be sent to the front-end device for display, so that the user of the front-end device can intuitively obtain the exception information of the data to be detected.
[0124] The method for determining abnormal information provided in the embodiment of the present application can send the abnormal data table to the front-end device for display, so that the user of the later front-end device can intuitively obtain the abnormal information of the data to be detected based on the information recorded in the preset abnormal data table.
[0125] In one embodiment, Figure 7 As shown, the above method also includes:
[0126] S206: Send the exception description and status code to the front-end device for display.
[0127] In an embodiment of the present application, after the abnormal information of the data stream to be detected is obtained as described above, the abnormal description and status code in the abnormal information can be bound, and the bound abnormal description and status code can be sent to the front-end device for display, so that the user of the front-end device can intuitively obtain the abnormal information of the data to be detected based on the information recorded in the preset abnormal data table.
[0128] The method for determining abnormal information provided in the embodiment of the present application can send the abnormal data table to the front-end device for display, so that the user of the later front-end device can intuitively obtain the abnormal information of the data to be detected based on the information recorded in the preset abnormal data table.
[0129] In one embodiment, Figure 8 As shown, a complete method for determining abnormal information is provided, including:
[0130] S10, capturing the data stream to be detected of the front-end device;
[0131] S11, determining whether the data stream to be detected is abnormal data according to the judgment logic of various types of abnormalities;
[0132] S12. When it is determined that the data stream to be detected is abnormal data, determine the abnormal type of the data stream to be detected according to the judgment logic of parameter transmission error abnormality, the judgment logic of authentication abnormality, the judgment logic of authority abnormality, the judgment logic of non-existence abnormality, the judgment logic of missing abnormality, the judgment logic of conflict abnormality and the judgment logic of overflow abnormality;
[0133] S13, calling the exception class function corresponding to the exception type to extract information from the data stream to be detected, and obtaining exception information;
[0134] S14, recording the abnormal information in a preset abnormal data table;
[0135] S15. When receiving the exception acquisition instruction sent by the front-end device, the exception data table is sent to the front-end device for display.
[0136] The above method realizes the effective determination of multiple abnormal information in a data stream, that is, the abnormal data is determined through the judgment logic of multiple types of abnormalities, and then the abnormal information of the data stream to be detected is extracted as detailed as possible according to the abnormal data. Compared with the existing collection of single abnormal information, the above method can obtain multiple abnormal information of the data stream to a certain extent, thus laying the foundation for researchers to solve system failures based on these abnormal information.
[0137] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are shown according to the indication of the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these steps or stages is not necessarily performed, but can be performed in turn or alternately with other steps or at least a portion of the steps or stages in other steps.
[0138] Based on the same inventive concept, the embodiment of the present application also provides a device for determining abnormal information for implementing the above-mentioned method for determining abnormal information. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in the embodiments of one or more devices for determining abnormal information provided below can refer to the limitations of the method for determining abnormal information above, and will not be repeated here.
[0139] In an exemplary embodiment, Fig. 9 As shown, a device for determining abnormal information is provided, comprising: a capture module 10, a determination module 11 and an extraction module 12, wherein:
[0140] The capture module 10 is used to capture the data stream to be detected of the front-end device.
[0141] The determination module 11 is used to determine whether the data stream to be detected is abnormal data according to an abnormality judgment condition; the abnormality judgment condition includes judgment logic of various types of abnormalities.
[0142] The extraction module 12 is used to extract abnormal information from the data stream to be detected when it is determined that the data stream to be detected is abnormal data; the abnormal information includes user name, route, function name, data table name, status code, abnormal parameter, abnormal description, and abnormal occurrence time.
[0143] In an exemplary embodiment, Fig.10 As shown, the extraction module 12 includes: a determination unit 120 and an acquisition unit 121, wherein:
[0144] The determination unit 120 is specifically used to determine the abnormal type of the data flow to be detected according to the judgment logic of various types of abnormalities; the various types of abnormalities include parameter transmission error abnormality, authentication abnormality, permission abnormality, non-existence abnormality, missing abnormality, conflict abnormality and overflow abnormality;
[0145] The acquisition unit 121 is specifically configured to call an exception class function corresponding to an exception type to extract information from the data stream to be detected, and obtain exception information.
[0146] In an exemplary embodiment, the above-mentioned determination unit 120 is specifically used to determine the exception type of the data stream to be detected based on the judgment logic of parameter transmission error exception, authentication exception judgment logic, permission exception judgment logic, non-existence exception judgment logic, missing exception judgment logic, conflict exception judgment logic and overflow exception judgment logic.
[0147] In an exemplary embodiment, the above-mentioned determination unit 120 is specifically used to determine that the exception type of the data to be detected is a parameter error exception if the data flow to be detected meets the judgment logic of the parameter transmission error exception; if the data flow to be detected meets the judgment logic of the authentication exception, the exception type of the data to be detected is determined to be an authentication exception; if the data flow to be detected meets the judgment logic of the permission exception, the exception type of the data to be detected is determined to be a permission exception; if the data flow to be detected meets the judgment logic of the non-existence exception, the exception type of the data to be detected is determined to be a non-existence exception; if the data flow to be detected meets the judgment logic of the missing exception, the exception type of the data to be detected is determined to be a missing exception; if the data flow to be detected meets the judgment logic of the conflict exception, the exception type of the data to be detected is determined to be a conflict exception; if the data flow to be detected meets the judgment logic of the overflow exception, the exception type of the data to be detected is determined to be an overflow exception.
[0148] In an exemplary embodiment, Fig.11 As shown, the above-mentioned device also includes: a recording module 13, which is used to record the exception information in a preset exception data table; the header information in the exception data table includes: at least one of: user name, route, function name, data table name, status code, exception parameter, exception description, and exception occurrence time.
[0149] In an exemplary embodiment, Fig.12 As shown, the above-mentioned apparatus further includes: a first sending module 14, which is used to send the abnormal data table to the front-end device for display when receiving the abnormal acquisition instruction sent by the front-end device.
[0150] In an exemplary embodiment, Fig.13 As shown, the above-mentioned device also includes: a second sending module 15, which sends the exception description and status code to the front-end device for display.
[0151] Each module in the above-mentioned abnormal information determination device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0152] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 1 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for determining abnormal information is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0153] Those skilled in the art will understand that Figure 1 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0154] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0155] Capture the data stream to be detected from the front-end device;
[0156] According to the abnormal judgment condition, determine whether the data stream to be detected is abnormal data; the abnormal judgment condition includes judgment logic of various types of abnormalities;
[0157] When it is determined that the data stream to be detected is abnormal data, abnormal information is extracted from the data stream to be detected; the abnormal information includes user name, route, function name, data table name, status code, abnormal parameter, abnormal description, and abnormal occurrence time.
[0158] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0159] According to the judgment logic of various types of exceptions, determine the abnormal type of the data flow to be detected; various types of exceptions include parameter transmission error exception, authentication exception, permission exception, non-existence exception, missing exception, conflict exception and overflow exception;
[0160] The exception class function corresponding to the exception type is called to extract information from the data stream to be detected to obtain exception information.
[0161] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0162] According to the judgment logic of parameter transmission error exception, authentication exception, permission exception, non-existence exception, missing exception, conflict exception and overflow exception, the exception type of the data stream to be detected is determined.
[0163] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0164] If the data stream to be detected meets the judgment logic of parameter transmission error exception, then the exception type of the data to be detected is determined to be parameter transmission error exception;
[0165] If the data flow to be detected meets the judgment logic of authentication anomaly, it is determined that the anomaly type of the data to be detected is authentication anomaly;
[0166] If the data flow to be detected meets the judgment logic of permission anomaly, it is determined that the anomaly type of the data to be detected is permission anomaly;
[0167] If the data stream to be detected meets the judgment logic of no abnormality, then the abnormality type of the data to be detected is determined to be no abnormality;
[0168] If the data stream to be detected meets the judgment logic of missing anomaly, then the anomaly type of the data to be detected is determined to be missing anomaly;
[0169] If the data stream to be detected meets the judgment logic of conflict anomaly, then the anomaly type of the data to be detected is determined to be a conflict anomaly;
[0170] If the data stream to be detected meets the judgment logic of the overflow exception, it is determined that the exception type of the data to be detected is an overflow exception.
[0171] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0172] The exception information is recorded in a preset exception data table; the header information in the exception data table includes: at least one of: user name, route, function name, data table name, status code, exception parameter, exception description, and exception occurrence time.
[0173] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0174] When the exception acquisition instruction sent by the front-end device is received, the exception data table is sent to the front-end device for display.
[0175] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0176] Send the exception description and status code to the front-end device for display.
[0177] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0178] Capture the data stream to be detected from the front-end device;
[0179] According to the abnormal judgment condition, determine whether the data stream to be detected is abnormal data; the abnormal judgment condition includes judgment logic of various types of abnormalities;
[0180] When it is determined that the data stream to be detected is abnormal data, abnormal information is extracted from the data stream to be detected; the abnormal information includes user name, route, function name, data table name, status code, abnormal parameter, abnormal description, and abnormal occurrence time.
[0181] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0182] According to the judgment logic of various types of exceptions, determine the abnormal type of the data flow to be detected; various types of exceptions include parameter transmission error exception, authentication exception, permission exception, non-existence exception, missing exception, conflict exception and overflow exception;
[0183] The exception class function corresponding to the exception type is called to extract information from the data stream to be detected to obtain exception information.
[0184] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0185] According to the judgment logic of parameter transmission error exception, authentication exception, permission exception, non-existence exception, missing exception, conflict exception and overflow exception, the exception type of the data stream to be detected is determined.
[0186] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0187] If the data stream to be detected meets the judgment logic of parameter transmission error exception, then the exception type of the data to be detected is determined to be parameter transmission error exception;
[0188] If the data flow to be detected meets the judgment logic of authentication anomaly, it is determined that the anomaly type of the data to be detected is authentication anomaly;
[0189] If the data flow to be detected meets the judgment logic of permission anomaly, it is determined that the anomaly type of the data to be detected is permission anomaly;
[0190] If the data stream to be detected meets the judgment logic of no abnormality, then the abnormality type of the data to be detected is determined to be no abnormality;
[0191] If the data stream to be detected meets the judgment logic of missing anomaly, then the anomaly type of the data to be detected is determined to be missing anomaly;
[0192] If the data stream to be detected meets the judgment logic of conflict anomaly, then the anomaly type of the data to be detected is determined to be a conflict anomaly;
[0193] If the data stream to be detected meets the judgment logic of the overflow exception, it is determined that the exception type of the data to be detected is an overflow exception.
[0194] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0195] The exception information is recorded in a preset exception data table; the header information in the exception data table includes: at least one of: user name, route, function name, data table name, status code, exception parameter, exception description, and exception occurrence time.
[0196] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0197] When the exception acquisition instruction sent by the front-end device is received, the exception data table is sent to the front-end device for display.
[0198] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0199] Send the exception description and status code to the front-end device for display.
[0200] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0201] Capture the data stream to be detected from the front-end device;
[0202] According to the abnormal judgment condition, determine whether the data stream to be detected is abnormal data; the abnormal judgment condition includes judgment logic of various types of abnormalities;
[0203] When it is determined that the data stream to be detected is abnormal data, abnormal information is extracted from the data stream to be detected; the abnormal information includes user name, route, function name, data table name, status code, abnormal parameter, abnormal description, and abnormal occurrence time.
[0204] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0205] According to the judgment logic of various types of exceptions, determine the abnormal type of the data flow to be detected; various types of exceptions include parameter transmission error exception, authentication exception, permission exception, non-existence exception, missing exception, conflict exception and overflow exception;
[0206] The exception class function corresponding to the exception type is called to extract information from the data stream to be detected to obtain exception information.
[0207] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0208] According to the judgment logic of parameter transmission error exception, authentication exception, permission exception, non-existence exception, missing exception, conflict exception and overflow exception, the exception type of the data stream to be detected is determined.
[0209] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0210] If the data stream to be detected meets the judgment logic of parameter transmission error exception, then the exception type of the data to be detected is determined to be parameter transmission error exception;
[0211] If the data flow to be detected meets the judgment logic of authentication anomaly, it is determined that the anomaly type of the data to be detected is authentication anomaly;
[0212] If the data flow to be detected meets the judgment logic of permission anomaly, it is determined that the anomaly type of the data to be detected is permission anomaly;
[0213] If the data stream to be detected meets the judgment logic of no abnormality, then the abnormality type of the data to be detected is determined to be no abnormality;
[0214] If the data stream to be detected meets the judgment logic of missing anomaly, then the anomaly type of the data to be detected is determined to be missing anomaly;
[0215] If the data stream to be detected meets the judgment logic of conflict anomaly, then the anomaly type of the data to be detected is determined to be a conflict anomaly;
[0216] If the data stream to be detected meets the judgment logic of the overflow exception, it is determined that the exception type of the data to be detected is an overflow exception.
[0217] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0218] The exception information is recorded in a preset exception data table; the header information in the exception data table includes: at least one of: user name, route, function name, data table name, status code, exception parameter, exception description, and exception occurrence time.
[0219] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0220] When the exception acquisition instruction sent by the front-end device is received, the exception data table is sent to the front-end device for display.
[0221] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0222] Send the exception description and status code to the front-end device for display.
[0223] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0224] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0225] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for determining abnormal information, characterized in that: The method is applied to a backend device, and the method comprises: Capture the data stream to be detected from the front-end device; Determine whether the data stream to be detected is abnormal data according to an abnormal judgment condition; the abnormal judgment condition includes judgment logic of multiple types of abnormalities; When it is determined that the data stream to be detected is abnormal data, abnormal information is extracted from the data stream to be detected; the abnormal information includes user name, route, function name, data table name, status code, abnormal parameter, abnormal description, and abnormal occurrence time.
2. The method according to claim 1, characterized in that The extracting abnormal information from the data stream to be detected includes: Determine the abnormal type of the data stream to be detected according to the judgment logic of the multiple types of abnormalities; the multiple types of abnormalities include parameter transmission error abnormality, authentication abnormality, permission abnormality, non-existence abnormality, missing abnormality, conflict abnormality and overflow abnormality; The exception class function corresponding to the exception type is called to extract information from the data stream to be detected to obtain the exception information.
3. The method according to claim 2, characterized in that The determining the abnormality type of the data stream to be detected according to the judgment logic of the multiple types of abnormalities includes: According to the judgment logic of parameter transmission error exception, authentication exception, permission exception, non-existence exception, missing exception, conflict exception and overflow exception, the exception type of the data stream to be detected is determined.
4. The method according to claim 3, characterized in that Determining the abnormality type of the data stream to be detected according to the judgment logic of the parameter transmission error exception, the judgment logic of the authentication exception, the judgment logic of the permission exception, the judgment logic of the non-existence exception, the judgment logic of the missing exception, the judgment logic of the conflict exception and the judgment logic of the overflow exception includes: If the data stream to be detected meets the judgment logic of the parameter transmission error exception, determining that the exception type of the data to be detected is the parameter transmission error exception; If the data flow to be detected meets the judgment logic of the authentication anomaly, determining that the anomaly type of the data to be detected is the authentication anomaly; If the data flow to be detected meets the judgment logic of the permission anomaly, determining that the anomaly type of the data to be detected is the permission anomaly; If the data stream to be detected meets the judgment logic of no abnormality, determining the abnormality type of the data to be detected as no abnormality; If the data stream to be detected meets the judgment logic of the missing anomaly, determining that the anomaly type of the data to be detected is the missing anomaly; If the data stream to be detected meets the judgment logic of the conflict anomaly, determining that the anomaly type of the data to be detected is the conflict anomaly; If the data flow to be detected meets the judgment logic of the overflow exception, it is determined that the exception type of the data to be detected is the overflow exception.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: The exception information is recorded in a preset exception data table; the header information in the exception data table includes: at least one of: user name, route, function name, data table name, status code, exception parameter, exception description, and exception occurrence time.
6. The method according to claim 5, characterized in that The method further comprises: When the exception acquisition instruction sent by the front-end device is received, the exception data table is sent to the front-end device for display.
7. The method according to claim 1, characterized in that The method further comprises: The exception description and the status code are sent to the front-end device for display.
8. A device for determining abnormal information, characterized in that: The device comprises: A capture module, used to capture the data stream to be detected of the front-end device; A determination module, used to determine whether the data stream to be detected is abnormal data according to an abnormal judgment condition; the abnormal judgment condition includes judgment logic of multiple types of abnormalities; The extraction module is used to extract abnormal information from the data stream to be detected when it is determined that the data stream to be detected is abnormal data; the abnormal information includes user name, route, function name, data table name, status code, abnormal parameter, abnormal description, and abnormal occurrence time.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Abnormal information processing method and device and storage medium
CN112181696A
Abnormal information prompting method and device, electronic equipment and storage medium
CN114237960A
Information processing method, device and equipment and computer readable storage medium
CN115603995A
Webpage running state monitoring method and device, storage medium and computer equipment
CN116260704A
Methods and apparatus for automatic anomaly detection
US20220382833A1