CN112506799A - Business abnormity positioning method and device, electronic equipment, medium and product - Google Patents

Business abnormity positioning method and device, electronic equipment, medium and product Download PDF

Info

Publication number
CN112506799A
CN112506799A CN202011526955.2A CN202011526955A CN112506799A CN 112506799 A CN112506799 A CN 112506799A CN 202011526955 A CN202011526955 A CN 202011526955A CN 112506799 A CN112506799 A CN 112506799A
Authority
CN
China
Prior art keywords
service
abnormal
positioning
information
anomaly
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.)
Granted
Application number
CN202011526955.2A
Other languages
Chinese (zh)
Other versions
CN112506799B (en
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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202011526955.2A priority Critical patent/CN112506799B/en
Publication of CN112506799A publication Critical patent/CN112506799A/en
Application granted granted Critical
Publication of CN112506799B publication Critical patent/CN112506799B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The application provides a business abnormity positioning method, which relates to the technical field of computers, in particular to the technical field of Internet, and the specific implementation scheme is as follows: receiving a service path identifier sent by a first scheduler, acquiring service link information corresponding to the service path identifier according to a call chain acquisition probe, wherein the service link information comprises module information related to a service path and example information of the module, and acquiring a log of a corresponding example according to the example information; determining a service abnormal positioning result according to an abnormal positioning strategy and a log of an instance, wherein the service abnormal positioning result at least comprises an abnormal root cause module and an abnormal cause; the application also provides a business anomaly positioning device, electronic equipment, a computer readable medium and a computer program product.

Description

Business abnormity positioning method and device, electronic equipment, medium and product
Technical Field
The present application relates to the field of computer technologies, and in particular, to the field of internet technologies, and in particular, to a method and an apparatus for locating a business anomaly, an electronic device, a computer-readable medium, and a computer program product.
Background
In the Development and testing process of the business end, when a code library has a new code submitted, RD (Research and Development engineer) & QA (Quality Assurance) needs to execute a business exception automated test case set at a rear-end interface level through a platform to judge whether the newly submitted code can be integrated into the code library. Once the execution of the service exception automatic test case set fails, the RD & QA is often needed to investigate and locate the service exception root cause.
Due to numerous back-end service modules and complex dependency relationship, the request of one abnormal service automatic test case often needs more modules, and related personnel need to log in the offline environment one by one to troubleshoot the problem. After the abnormal root cause module is located, the abnormal cause needs to be determined. However, the reasons for the interface abnormality are numerous, and various situations such as dependence on abnormality (storage, database, third-party service), code abnormality, configuration abnormality and the like exist, so that a lot of manpower is required to locate the reason for the abnormality, how to automatically locate the business abnormality root for the automatic test case is achieved, project research and development test time can be greatly saved, and the method is an important means for improving project delivery efficiency.
The traditional service exception location is currently and generally solved by adopting the following scheme:
(1) the manual testing scheme needs to manually analyze the system call flow, starts from a possibly abnormal place by combining with experience, gradually carries out abnormal investigation, and gives a investigation conclusion after the investigation is finished. The manual test service abnormity positioning consumes a long time, depends on the familiarity and positioning experience of the manual work on the system, has high requirements on positioning personnel, cannot accumulate the experience of the system, cannot realize general use of the whole system, and cannot provide good support for the continuous development of the service.
(2) The automatic test scheme can give a preliminary abnormal prompt, such as the failure of the operation of an automatic case or the failure of a case in a certain scene, but cannot give the root cause of the abnormal service, and needs to manually check the abnormal cause. Even if the abnormal reason marking is completed through manual positioning subsequently, the service line cannot see the distribution condition of the abnormal service, and powerful guarantee cannot be provided for the development of a service system.
Disclosure of Invention
A method and a device for positioning business abnormity, electronic equipment, a computer readable medium and a computer program product are provided.
According to a first aspect, a method for locating a service anomaly is provided, which includes:
receiving a service path identifier sent by a first scheduler, wherein the service path identifier is determined by the first scheduler according to abnormal information in an abnormal positioning request after the first scheduler receives the abnormal positioning request;
acquiring service link information corresponding to the service path identification according to a calling chain acquisition probe, wherein the service link information comprises module information related to a service path and instance information of the module;
acquiring a log of a corresponding instance according to the instance information;
and determining a service abnormal positioning result according to the abnormal positioning strategy and the log of the instance, wherein the service abnormal positioning result at least comprises an abnormal root cause module and an abnormal cause.
According to a second aspect, there is provided a service anomaly locating device, including: the system comprises a receiving module, an obtaining module and an abnormal positioning module, wherein the receiving module is used for receiving a service path identifier sent by a first scheduler, and the service path identifier is determined by the first scheduler according to abnormal information in an abnormal positioning request after the first scheduler receives the abnormal positioning request;
the acquisition module is used for acquiring service link information corresponding to the service path identifier according to a calling chain acquisition probe, wherein the service link information comprises module information related to the service path and instance information of the module; acquiring a log of a corresponding instance according to the instance information;
and the abnormal positioning module is used for determining a service abnormal positioning result according to an abnormal positioning strategy and the log of the instance, wherein the service abnormal positioning result at least comprises an abnormal root cause module and an abnormal cause.
According to a third aspect, there is provided an electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any of the business anomaly locating methods.
According to a fourth aspect, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any of the above-described traffic anomaly locating methods.
According to a fifth aspect, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method of any of the above-described traffic anomaly locating methods.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:
FIG. 1 is a system architecture diagram of an embodiment of the present application;
fig. 2 is a flowchart of a method for locating a service anomaly according to an embodiment of the present application;
fig. 3 is a flowchart for determining a service abnormal location result according to an abnormal location policy and an example log according to an embodiment of the present application;
FIG. 4 is a schematic diagram of generating an anomaly locating policy provided by an embodiment of the present application;
fig. 5 is a flowchart of another service anomaly positioning method provided in the embodiment of the present application;
fig. 6 is a block diagram illustrating a service anomaly locating apparatus according to an embodiment of the present disclosure;
fig. 7 is a block diagram illustrating another service anomaly locating apparatus according to an embodiment of the present disclosure;
fig. 8 is a block diagram illustrating a further apparatus for locating a service anomaly according to an embodiment of the present application;
fig. 9 is a block diagram illustrating a further apparatus for locating a service anomaly according to an embodiment of the present application;
fig. 10 is a block diagram illustrating a further service anomaly locating apparatus according to an embodiment of the present application;
fig. 11 is a block diagram of an electronic device for implementing service anomaly location according to an embodiment of the present application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The embodiments and features of the embodiments of the present application may be combined with each other without conflict.
As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
In a first aspect, an embodiment of the present application provides a method for locating a service exception, where the method is applied to the system shown in fig. 1. Fig. 1 is a schematic diagram of a system architecture according to an embodiment of the present application, and as shown in fig. 1, the system includes: the system comprises a service abnormity positioning device 1, a first scheduler 2, a second scheduler 3 and a positioning source device 4, wherein the positioning source device 4 is used for monitoring service operation conditions and initiating an abnormity positioning request to the first scheduler 2 when the service abnormity is detected; the first scheduler 2 is configured to parse the exception information in the exception positioning request to obtain a service path identifier (traceID); the service exception positioning device 4 is used for determining modules related to exception services and examples thereof, acquiring logs of the examples, and determining a service exception positioning result based on a positioning strategy and the logs; the second scheduler 3 is configured to determine a callback operation according to the exception information and the service exception location result.
Fig. 2 is a flowchart of a service anomaly positioning method according to an embodiment of the present application, and with reference to fig. 1 and fig. 2, the service anomaly positioning method includes the following steps:
and step 11, receiving the service path identifier sent by the first scheduler.
The service path identifier is a service path identifier of an abnormal service, and the positioning source device 4 initiates an abnormal positioning request to the first scheduler 2 when detecting that the service is abnormal, where the abnormal positioning request carries abnormal information, and the abnormal information is related information of the abnormal service, and may include, for example, a time period in which the abnormality occurs, an operation (such as a specific operation and an operation object executed on a service platform) that causes the service to be abnormal, and the like. After receiving the abnormal positioning request sent by the positioning source device 4, the first scheduler 2 determines a service path identifier according to the abnormal information therein, and sends the service path identifier to the service abnormal positioning device 1.
And step 12, acquiring service link information corresponding to the service path identification according to the call chain acquisition probe, wherein the service link information comprises module information related to the service path and example information of the module.
An instance refers to an application instance (i.e., an automation test case) capable of implementing a specific service function, one service path relates to a plurality of modules, each module implements a different service function, and one module may include a plurality of instances.
In this step, the service anomaly positioning apparatus 1 automatically acquires the execution path (i.e., service path) of the abnormal service by using the call chain acquisition probe in the offline test environment. When receiving a traffic path identifier (traceID), the traffic anomaly positioning apparatus 1 performs service association using the traffic path identifier, and determines traffic link information including module information and instance information corresponding to the module information.
And step 13, acquiring the log of the corresponding instance according to the instance information.
Logs are stored on the instances and are used for recording the execution conditions of the instances, such as instance calling time, calling operation, execution exception and other information. In this step, the service anomaly locating device 1 calls the log stored in the corresponding instance according to the instance information (i.e. the information of the instance related to the anomaly service) acquired in step 12.
And step 14, determining a service abnormal positioning result according to the abnormal positioning strategy and the log of the instance, wherein the service abnormal positioning result at least comprises an abnormal root cause module and an abnormal cause.
In this step, the service anomaly locating apparatus 1 determines an anomaly root cause module and an anomaly cause of the abnormal service according to the locally configured anomaly locating policy and the log obtained in step 13, where the anomaly root cause module is a module in which a service anomaly occurs on a service path of the abnormal service, and the anomaly cause is a specific cause of the service anomaly.
In the embodiment of the present application, a method for locating a service anomaly includes: receiving a service path identifier sent by a first scheduler, acquiring service link information corresponding to the service path identifier according to a call chain acquisition probe, wherein the service link information comprises module information related to a service path and example information of the module, and acquiring a log of a corresponding example according to the example information; determining a service abnormal positioning result according to an abnormal positioning strategy and a log of an instance, wherein the service abnormal positioning result at least comprises an abnormal root cause module and an abnormal cause; according to the method and the device, the link information of the abnormal service is automatically acquired based on the calling chain acquisition probe, the root cause module and the abnormal cause of the failure of the automatic test case can be rapidly determined according to the abnormal positioning strategy and the link information of the abnormal service, and related personnel do not need to log in the offline environment troubleshooting problem one by one, so that the time consumed by troubleshooting of the abnormal service is reduced, the requirements of the related personnel are reduced, the method and the device can be applied to various service systems, and have universality; the method can directly position the reasons of the abnormal business to obtain the distribution condition of the abnormal business, is convenient for system maintenance personnel to carry out overall management, and really realizes the automatic positioning of the abnormal business.
In some embodiments, the exception positioning policy includes an exception definition, and the exception definition may include exception description information and an exception cause corresponding to the exception description information, where the exception description information is a description of an exception and the exception cause is a cause of the exception. Fig. 3 is a flowchart for determining a service abnormal location result according to an abnormal location policy and an example log according to an embodiment of the present application. As shown in fig. 3, the determining a service abnormal location result according to the abnormal location policy and the log of the instance (i.e. step 14) includes the following steps:
step 141, the log of each instance is scanned according to the abnormal location policy.
In this step, the service anomaly locating device 1 scans the log of each instance according to the anomaly description information in the anomaly locating policy.
And 142, responding to the same abnormal description information matched in the log, determining an abnormal root cause module to which the corresponding instance belongs, and determining an abnormal cause corresponding to the abnormal description information according to an abnormal positioning strategy.
In this step, if the service anomaly locating device 1 matches the anomaly description information in the log of each instance, which is the same as the anomaly description information in the anomaly locating policy, indicating that the service anomaly locating is successful, the module to which the matched instance belongs is considered to be the anomaly root cause module, and the anomaly locating policy is queried according to the anomaly description information, so as to determine the anomaly cause corresponding to the anomaly description information. In the step, the information such as abnormity, time consumption, error codes and the like in the log can be checked by utilizing an abnormity positioning strategy.
In some embodiments, the service link information is a tree structure, and the scanning the log of each instance according to the anomaly locating policy (i.e. step 141) includes the following steps: and according to the abnormal positioning strategy, traversing and scanning the logs of each instance in a reverse order according to the tree structure of the service link information. That is, in this step, the log of each instance is scanned in a reverse order traversal order of tracing back from the child node to the root node by using a back-tracing traversal method. It should be noted that, during the scanning process, a high-frequency scene of a service anomaly may also be recorded. In the service operation process, the sub-node of the tree structure in the service link is usually the sub-node where the service exception occurs, so that the exception positioning is performed in a reverse order traversal scanning mode, the time required by exception positioning can be saved, and the exception positioning efficiency is improved.
In some embodiments, before the acquiring the service link information corresponding to the service path identifier according to the call chain acquisition probe (i.e. step 12), the method further includes the following steps: and receiving the abnormal information sent by the first scheduler 2, wherein the abnormal information is acquired by the first scheduler 2 according to the received abnormal positioning request.
The exception positioning policy further includes an exception solution corresponding to the exception definition. The service exception positioning result further includes an exception solution, and after determining an exception cause corresponding to the exception description information according to the exception positioning policy (i.e., step 142), the method further includes the following steps: and determining an exception solution corresponding to the exception description information according to the exception positioning strategy.
Correspondingly, after determining the service abnormal positioning result according to the abnormal positioning strategy and the log of the instance (namely step 14), the method further comprises the following steps: and sending the abnormal information and the service abnormal positioning result to a second scheduler so that the second scheduler determines callback operation according to the abnormal solution in the abnormal information and the service abnormal positioning result.
In the embodiment of the present application, the basic capability of the service exception location is centralized, the capability of determining the service exception location result according to the exception location policy and the log of the instance is used as the core capability of the service exception location device 1, the called entry parameter is normalized by the first scheduler 2, and the second scheduler 3 performs the post-processing of the exit parameter, thereby realizing the capability multiplexing among the systems.
The use of the first scheduler 2 enables the inclusion of specifications between the systems and some other parameter preparation may be done during this time. The first scheduler 2 may directly complete parameter preparation (i.e., obtain the service path identifier) by using the preprocessing base class, and if the abnormal information is the abnormal occurrence time period, the first scheduler 2 may determine the service path identifier by monitoring other parameters of the service, for example, interface information, DIFF (differential function) information, and the like. The second scheduler 3 may determine the callback operation directly by using the preprocessing base class, or may determine the callback operation by monitoring other parameters of the service, for example, interface test information, DIFF (contrast test) information, and the like.
In some embodiments, the method for locating the service anomaly further includes a step of generating an anomaly location policy, where the step of generating the anomaly location policy includes: and responding to the received service program code, statically scanning the log specification of the service program code, and generating an abnormal positioning strategy. Fig. 4 is a schematic diagram of generating an exception positioning policy according to an embodiment of the present application, and as shown in fig. 4, after the RD submits the service program code, the service exception positioning apparatus 1 performs static Scan (SA) on the log specification, thereby generating a policy file. The scan entries in the log specification may include, but are not limited to: log level definitions (log levels may include errors, warnings, etc.), exception definitions, exception handling, print specifications, etc. After the policy file is generated, the policy file may be audited by the relevant personnel, and the audit may be configured in the service anomaly positioning apparatus 1 after passing. The anomaly location strategy may be stored in the form of a YAML (YAML Ain't Markup Language, another Markup Language) file. According to the method and the device, the abnormal positioning strategy can be automatically generated in the service development process, and the new increase or stock strategy automatic accumulation is completed in the static scanning process of the log specification.
In some embodiments, after determining the service abnormal positioning result according to the abnormal positioning strategy and the example log (step 14), the method further comprises the following steps: and storing the mapping relation between the service path identifier and the service abnormity positioning result. In this step, after determining the service anomaly positioning result, the service anomaly positioning apparatus 1 locally stores the service anomaly positioning result by using the storage time as an index, that is, stores the mapping relationship between the service path identifier and the service anomaly positioning result, so that it is convenient to directly query the service anomaly positioning result in the subsequent service anomaly positioning.
In a case that the service anomaly positioning apparatus 1 locally stores a mapping relationship between the service path identifier and the service anomaly positioning result, in some embodiments, the acquiring, according to the call chain acquisition probe, service link information corresponding to the service path identifier (i.e. step 12) includes the following steps: and responding to the situation that the service path identification is not inquired within the preset time before the current moment, and acquiring service link information corresponding to the service path identification according to the calling chain acquisition probe. The preset time length may be set as required, for example, 1 hour, that is, after receiving the service path identifier and before performing service exception positioning, it is first queried whether exception positioning has been performed on the same service exception within a short time before, and if the service path identifier is not queried, it indicates that exception positioning has not been performed on a corresponding exception service within a short time before, then service exception positioning is performed according to the foregoing scheme of the embodiment of the present application.
Fig. 5 is a flowchart of another service anomaly positioning method according to the embodiment of the present application. As shown in fig. 5, in some embodiments, after receiving the traffic path identifier sent by the first scheduler (i.e. step 11), the method further includes the following steps:
and step 12', responding to the service path identification inquired in the preset time before the current time, and determining a service abnormity positioning result corresponding to the service path identification according to the mapping relation between the locally stored service path identification and the service abnormity positioning result.
In this step, if the service path identifier is queried, which indicates that abnormal positioning has been performed for the corresponding abnormal service in a short time before, the determined service abnormal positioning result is directly obtained. By inquiring and judging whether the same abnormal service is subjected to abnormal positioning before, repeated abnormal positioning for the same abnormal service for a plurality of times in a short period can be avoided, the processing capacity of the service abnormal positioning device 1 is reduced, and system resources are saved.
According to an embodiment of the present application, there is also provided a service anomaly locating apparatus, and fig. 6 is a block diagram of a service anomaly locating apparatus provided in an embodiment of the present application, where as shown in fig. 6, the service anomaly locating apparatus includes: the system comprises a receiving module 101, an obtaining module 102 and an abnormal positioning module 103, wherein the receiving module 101 is configured to receive a service path identifier sent by a first scheduler, and the service path identifier is determined by the first scheduler according to abnormal information in an abnormal positioning request after the first scheduler receives the abnormal positioning request.
The obtaining module 102 is configured to obtain service link information corresponding to the service path identifier according to a call chain acquisition probe, where the service link information includes module information related to a service path and instance information of the module; and acquiring the log of the corresponding instance according to the instance information.
The abnormal positioning module 103 is configured to determine a service abnormal positioning result according to the abnormal positioning policy and the log of the instance, where the service abnormal positioning result at least includes an abnormal root cause module and an abnormal cause.
In some embodiments, the anomaly locating policy includes an anomaly definition including anomaly descriptive information and an anomaly cause corresponding to the anomaly descriptive information. The abnormal positioning module 103 is used for scanning the logs of the instances according to an abnormal positioning strategy; and in response to the same abnormal description information matched in the log, determining an abnormal root cause module to which the corresponding instance belongs, and determining an abnormal cause corresponding to the abnormal description information according to the abnormal positioning strategy.
In some embodiments, the data structure of the service link information is a tree structure, and the exception positioning module 103 is configured to traverse and scan logs of each instance according to an exception positioning policy and in a reverse order according to the tree structure of the service link information.
Fig. 7 is a block diagram of another service anomaly locating device provided in this embodiment, as shown in fig. 7, in some embodiments, the service anomaly locating device further includes a sending module 104.
The receiving module 101 is further configured to receive the exception information sent by the first scheduler. The abnormal positioning strategy also comprises an abnormal solution corresponding to the abnormal definition, and the service abnormal positioning result also comprises an abnormal solution.
The anomaly positioning module 103 is further configured to, after determining an anomaly cause corresponding to the anomaly description information according to the anomaly positioning policy, determine an anomaly solution corresponding to the anomaly description information according to the anomaly positioning policy.
The sending module 104 is configured to send the exception information and the service exception positioning result to a second scheduler, so that the second scheduler determines a callback operation according to an exception solution in the exception information and the service exception positioning result.
Fig. 8 is a block diagram of another service exception location apparatus provided in an embodiment of the present application, and as shown in fig. 8, in some embodiments, the service exception location apparatus further includes a policy generation module 105, and the policy generation module 105 is configured to, in response to receiving a service program code, statically scan a log specification of the service program code, and generate an exception location policy.
Fig. 9 is a block diagram of another service anomaly positioning apparatus provided in an embodiment of the present application, and as shown in fig. 9, in some embodiments, the service anomaly positioning apparatus further includes a storage module 106, where the storage module 106 is configured to, after the anomaly positioning module 103 determines a service anomaly positioning result according to an anomaly positioning policy and a log of the example, store a mapping relationship between the service path identifier and the service anomaly positioning result.
Fig. 10 is a block diagram of another service anomaly positioning apparatus provided in an embodiment of the present application, and as shown in fig. 10, in some embodiments, the service anomaly positioning apparatus further includes a query module 107, and the obtaining module 102 is configured to, in response to that the query module 107 does not query the service path identifier within a preset time before the current time, obtain service link information corresponding to the service path identifier according to a call chain acquisition probe.
In some embodiments, the query module 107 is further configured to, in response to querying the service path identifier within a preset time before the current time, determine a service anomaly positioning result corresponding to the service path identifier according to a mapping relationship between the locally stored service path identifier and the service anomaly positioning result.
According to an embodiment of the present application, an electronic device and a readable storage medium are also provided.
Fig. 11 is a block diagram of an electronic device according to a service anomaly positioning method in an embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 11, the electronic apparatus includes: one or more processors 201, memory 202, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions for execution within the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input/output apparatus (such as a display device coupled to the interface). In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, as desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). Fig. 11 illustrates an example of a processor 201.
Memory 202 is a non-transitory computer readable storage medium as provided herein. The memory stores instructions executable by at least one processor, so that the at least one processor executes the service exception positioning method provided by the application. A non-transitory computer-readable storage medium of the present application stores computer instructions for causing a computer to perform the business anomaly locating method provided herein.
The memory 202, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the business anomaly locating method in the embodiments of the present application. The processor 201 executes various functional applications and data processing of the server by running non-transitory software programs, instructions and modules stored in the memory 202, that is, implements the service exception location method in the above method embodiment.
The memory 202 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the electronic device located by the traffic abnormality, and the like. Further, the memory 202 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 202 may optionally include memory located remotely from processor 201, and these remote memories may be connected to the electronic device for which the traffic anomaly is located over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device of the service anomaly positioning method may further include: an input device 203 and an output device 204. The processor 201, the memory 202, the input device 203 and the output device 204 may be connected by a bus or other means, and the bus connection is exemplified in fig. 11.
The input device 203 may receive input numeric or character information and generate key signal inputs related to user settings and function controls of the electronic equipment for which the business anomaly is located, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointer, one or more mouse buttons, a track ball, a joystick, or other input device. The output devices 204 may include a display device, auxiliary lighting devices (e.g., LEDs), and tactile feedback devices (e.g., vibrating motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device can be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
These computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. A server may also be a server in a distributed system, or a server in a combination blockchain, with the relationship of client and server arising from computer programs running on the respective computers and having a client-server relationship to each other.
The business abnormity positioning scheme provided by the embodiment of the application can automatically position the reason of failure of the automatic test case and the abnormal root cause module by combining an abnormity positioning strategy and through a specific point analysis algorithm based on the business link information of the abnormal business acquired by the calling chain acquisition probe, thereby greatly saving time of research and development and testing personnel, reducing time consumed by business abnormity troubleshooting and shortening project delivery cycle.
According to an embodiment of the present application, the present disclosure also provides a computer program product, including a computer program, which when executed by a processor, implements any one of the above-mentioned service anomaly locating methods.
The business abnormity positioning scheme provided by the embodiment of the application does not need to log in offline environment inspection abnormal nodes one by one through manpower, can eliminate the influence of human factors on business abnormity positioning, and can directly position abnormity reasons, thereby providing more accurate business abnormity investigation records and result display. The abnormal positioning strategy uniformly inspects the frame from the bottommost layer by scanning the example, so that the service abnormality can be quickly positioned, and the positioning time consumption is further shortened; the first invoker and the second invoker may implement capability multiplexing between systems.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, and the present invention is not limited thereto as long as the desired results of the technical solutions disclosed in the present application can be achieved.
The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (12)

1. A method for locating a service exception, comprising:
receiving a service path identifier sent by a first scheduler, wherein the service path identifier is determined by the first scheduler according to abnormal information in an abnormal positioning request after the first scheduler receives the abnormal positioning request;
acquiring service link information corresponding to the service path identification according to a calling chain acquisition probe, wherein the service link information comprises module information related to a service path and instance information of the module;
acquiring a log of a corresponding instance according to the instance information;
and determining a service abnormal positioning result according to the abnormal positioning strategy and the log of the instance, wherein the service abnormal positioning result at least comprises an abnormal root cause module and an abnormal cause.
2. The method according to claim 1, wherein the anomaly locating policy comprises an anomaly definition, the anomaly definition comprising anomaly description information and an anomaly cause corresponding to the anomaly description information; the determining a service abnormal positioning result according to the abnormal positioning strategy and the log of the instance comprises the following steps:
scanning logs of each instance according to an abnormal positioning strategy;
and in response to the same abnormal description information matched in the log, determining an abnormal root cause module to which the corresponding instance belongs, and determining an abnormal cause corresponding to the abnormal description information according to the abnormal positioning strategy.
3. The method of claim 2, wherein the data structure of the traffic link information is a tree structure, and wherein scanning the log of each instance according to the anomaly locating policy comprises: and according to an abnormal positioning strategy, traversing and scanning the logs of the instances in a reverse order according to the tree structure of the service link information.
4. The method according to claim 2, wherein before the acquiring the service link information corresponding to the service path identifier according to the call chain acquisition probe, the method further comprises: receiving the abnormal information sent by a first scheduler;
the exception positioning policy further includes an exception solution corresponding to the exception definition, the service exception positioning result further includes an exception solution, and after determining an exception cause corresponding to the exception description information according to the exception positioning policy, the method further includes: determining an exception solution corresponding to the exception description information according to the exception positioning strategy;
after determining the service abnormal positioning result according to the abnormal positioning strategy and the log of the instance, the method further comprises the following steps:
and sending the abnormal information and the service abnormal positioning result to a second scheduler so that the second scheduler determines callback operation according to an abnormal solution in the abnormal information and the service abnormal positioning result.
5. The method of claim 1, further comprising the step of generating the anomalous positioning strategy, the step of generating the anomalous positioning strategy comprising:
and responding to the received service program code, statically scanning the log specification of the service program code, and generating an abnormal positioning strategy.
6. The method according to any of claims 1-5, wherein after determining the service anomaly location result according to the anomaly location policy and the log of the instance, further comprising: and storing the mapping relation between the service path identifier and the service abnormity positioning result.
7. The method according to claim 6, wherein the obtaining the service link information corresponding to the service path identifier according to the call chain acquisition probe comprises:
and responding to the situation that the service path identification is not inquired within a preset time before the current moment, and acquiring service link information corresponding to the service path identification according to a calling chain acquisition probe.
8. The method of claim 6, wherein after receiving the traffic path identifier sent by the first scheduler, the method further comprises:
and responding to the service path identification queried in a preset time before the current time, and determining a service abnormity positioning result corresponding to the service path identification according to a mapping relation between the locally stored service path identification and the service abnormity positioning result.
9. A service anomaly locating device, comprising: the system comprises a receiving module, an obtaining module and an abnormal positioning module, wherein the receiving module is used for receiving a service path identifier sent by a first scheduler, and the service path identifier is determined by the first scheduler according to abnormal information in an abnormal positioning request after the first scheduler receives the abnormal positioning request;
the acquisition module is used for acquiring service link information corresponding to the service path identifier according to a calling chain acquisition probe, wherein the service link information comprises module information related to the service path and instance information of the module; acquiring a log of a corresponding instance according to the instance information;
and the abnormal positioning module is used for determining a service abnormal positioning result according to an abnormal positioning strategy and the log of the instance, wherein the service abnormal positioning result at least comprises an abnormal root cause module and an abnormal cause.
10. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
11. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-8.
12. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-8.
CN202011526955.2A 2020-12-22 2020-12-22 Business abnormality positioning method and device, electronic equipment, medium and product Active CN112506799B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011526955.2A CN112506799B (en) 2020-12-22 2020-12-22 Business abnormality positioning method and device, electronic equipment, medium and product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011526955.2A CN112506799B (en) 2020-12-22 2020-12-22 Business abnormality positioning method and device, electronic equipment, medium and product

Publications (2)

Publication Number Publication Date
CN112506799A true CN112506799A (en) 2021-03-16
CN112506799B CN112506799B (en) 2023-11-10

Family

ID=74921920

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011526955.2A Active CN112506799B (en) 2020-12-22 2020-12-22 Business abnormality positioning method and device, electronic equipment, medium and product

Country Status (1)

Country Link
CN (1) CN112506799B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113204467A (en) * 2021-05-12 2021-08-03 北京百度网讯科技有限公司 Monitoring method, device, equipment and storage medium of online business system
CN113516174A (en) * 2021-06-03 2021-10-19 清华大学 Call chain abnormality detection method, computer device, and readable storage medium
CN114143221A (en) * 2021-11-29 2022-03-04 重庆富民银行股份有限公司 Service asset management method, platform and storage medium based on full link monitoring
CN114301765A (en) * 2021-12-29 2022-04-08 中国电信股份有限公司 Fault positioning method and device, computer readable medium and electronic equipment
CN114500326A (en) * 2022-02-25 2022-05-13 北京百度网讯科技有限公司 Abnormality detection method, abnormality detection device, electronic apparatus, and storage medium
CN114567573A (en) * 2022-03-10 2022-05-31 平安普惠企业管理有限公司 Abnormal data positioning method, device, server and storage medium
CN114936930A (en) * 2022-07-21 2022-08-23 平安银行股份有限公司 Method for managing abnormal timeliness service of network node, computer equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160088006A1 (en) * 2014-09-23 2016-03-24 Chaitali GUPTA Predictive model for anomaly detection and feedback-based scheduling
CN106250199A (en) * 2016-07-26 2016-12-21 北京北森云计算股份有限公司 The dynamic micro services call method of a kind of multilingual cloud compiling and device
CN107678933A (en) * 2017-09-28 2018-02-09 中国平安人寿保险股份有限公司 Daily record generation management method, device, equipment and computer-readable recording medium
CN109376056A (en) * 2018-10-17 2019-02-22 Oppo广东移动通信有限公司 Abnormal log analysis method, device, storage medium, mobile terminal and server
CN110012005A (en) * 2019-03-29 2019-07-12 新华三大数据技术有限公司 Identify method, apparatus, electronic equipment and the storage medium of abnormal data
CN110245035A (en) * 2019-05-20 2019-09-17 平安普惠企业管理有限公司 A kind of link trace method and device
CN112035318A (en) * 2020-08-28 2020-12-04 北京浪潮数据技术有限公司 Abnormal process positioning method, system and related device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160088006A1 (en) * 2014-09-23 2016-03-24 Chaitali GUPTA Predictive model for anomaly detection and feedback-based scheduling
CN106250199A (en) * 2016-07-26 2016-12-21 北京北森云计算股份有限公司 The dynamic micro services call method of a kind of multilingual cloud compiling and device
CN107678933A (en) * 2017-09-28 2018-02-09 中国平安人寿保险股份有限公司 Daily record generation management method, device, equipment and computer-readable recording medium
CN109376056A (en) * 2018-10-17 2019-02-22 Oppo广东移动通信有限公司 Abnormal log analysis method, device, storage medium, mobile terminal and server
CN110012005A (en) * 2019-03-29 2019-07-12 新华三大数据技术有限公司 Identify method, apparatus, electronic equipment and the storage medium of abnormal data
CN110245035A (en) * 2019-05-20 2019-09-17 平安普惠企业管理有限公司 A kind of link trace method and device
WO2020233015A1 (en) * 2019-05-20 2020-11-26 平安普惠企业管理有限公司 Link tracking method and apparatus
CN112035318A (en) * 2020-08-28 2020-12-04 北京浪潮数据技术有限公司 Abnormal process positioning method, system and related device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
许刚;王展;臧大伟;安学军;: "基于链路状态数据库的数据中心网络异常检测算法", 计算机研究与发展, no. 04 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113204467A (en) * 2021-05-12 2021-08-03 北京百度网讯科技有限公司 Monitoring method, device, equipment and storage medium of online business system
CN113204467B (en) * 2021-05-12 2024-01-30 北京百度网讯科技有限公司 Method, device, equipment and storage medium for monitoring online service system
CN113516174A (en) * 2021-06-03 2021-10-19 清华大学 Call chain abnormality detection method, computer device, and readable storage medium
CN113516174B (en) * 2021-06-03 2022-04-19 清华大学 Call chain abnormality detection method, computer device, and readable storage medium
CN114143221A (en) * 2021-11-29 2022-03-04 重庆富民银行股份有限公司 Service asset management method, platform and storage medium based on full link monitoring
CN114301765A (en) * 2021-12-29 2022-04-08 中国电信股份有限公司 Fault positioning method and device, computer readable medium and electronic equipment
CN114500326A (en) * 2022-02-25 2022-05-13 北京百度网讯科技有限公司 Abnormality detection method, abnormality detection device, electronic apparatus, and storage medium
CN114500326B (en) * 2022-02-25 2023-08-11 北京百度网讯科技有限公司 Abnormality detection method, abnormality detection device, electronic device, and storage medium
CN114567573A (en) * 2022-03-10 2022-05-31 平安普惠企业管理有限公司 Abnormal data positioning method, device, server and storage medium
CN114567573B (en) * 2022-03-10 2023-12-15 贵州中融信通科技有限公司 Abnormal data positioning method, device, server and storage medium
CN114936930A (en) * 2022-07-21 2022-08-23 平安银行股份有限公司 Method for managing abnormal timeliness service of network node, computer equipment and storage medium

Also Published As

Publication number Publication date
CN112506799B (en) 2023-11-10

Similar Documents

Publication Publication Date Title
CN112506799B (en) Business abnormality positioning method and device, electronic equipment, medium and product
US9824002B2 (en) Tracking of code base and defect diagnostic coupling with automated triage
US9576037B2 (en) Self-analyzing data processing job to determine data quality issues
JP7289334B2 (en) Methods and apparatus, electronic devices, storage media and computer programs for testing code
US20200117587A1 (en) Log File Analysis
WO2021097824A1 (en) Code quality and defect analysis method, server and storage medium
US10528456B2 (en) Determining idle testing periods
CN112491617A (en) Link tracking method, device, electronic equipment and medium
CN110740071A (en) network interface monitoring method, device and system
CN116166536A (en) Test method, test device, electronic equipment and storage medium
CN115509714A (en) Task processing method and device, electronic equipment and storage medium
CN115658478A (en) Test case screening method and device, electronic equipment and storage medium
CN111831317B (en) Method and device for acquiring dependency relationship between services, electronic equipment and storage medium
CN115437961A (en) Data processing method and device, electronic equipment and storage medium
CN111694686B (en) Processing method and device for abnormal service, electronic equipment and storage medium
CN115017047A (en) Test method, system, equipment and medium based on B/S architecture
CN114693116A (en) Method and device for detecting code review validity and electronic equipment
CN113626288A (en) Fault processing method, system, device, storage medium and electronic equipment
CN113434382A (en) Database performance monitoring method and device, electronic equipment and computer readable medium
CN113468218A (en) Method and device for monitoring and managing database slow SQL
CN112286754A (en) Method and system for realizing modular construction of IT (information technology) resource inspection automation
CN111290870A (en) Method and device for detecting abnormity
CN117130945B (en) Test method and device
CN111078543B (en) System dynamic test method and test device
Lu et al. Parallelization Framework of Root Cause Analysis Based on Global Cache and Global Lock

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
GR01 Patent grant
GR01 Patent grant