Link anomaly positioning method, device, computer equipment and storage medium
By building a mapping relationship between target service identification and target link identification in the microservice architecture, the problem of difficulty in abnormal positioning in the microservice architecture is solved, and the accurate positioning of abnormal service nodes and user information is achieved, and processing efficiency is improved.
Patent Information
- Application Number
- CN202211684395.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-27
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2042-12-27
AI Technical Summary
In the microservice architecture, it is difficult to accurately locate the service nodes that have abnormalities and their corresponding user information, resulting in low exception handling efficiency.
By determining the target link corresponding to the service request, a identification mapping relationship between the target service identification and the target link identification is constructed, exception positioning of the target link is achieved, and abnormal service nodes and user information are accurately located.
It improves the rapid repair of exception service nodes and the rapid notification of abnormal service requests corresponding to users, reduces the impact of exceptions and improves processing efficiency.
Smart Images

Figure CN115987771B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a link anomaly locating method, apparatus, computer equipment, and storage medium. Background Art
[0002] As the scale of enterprises continues to grow, more and more enterprises are beginning to build and use microservice architectures that suit their actual conditions. With the emergence of microservice architectures, the difficulty of infrastructure management for enterprises has been greatly reduced.
[0003] Since the microservice architecture contains multiple service nodes and each service node has multiple instances, when an exception occurs during the execution of a business request by the microservice architecture, it is difficult to locate the abnormal service node and the user information corresponding to the business request in a timely and accurate manner. Summary of the invention
[0004] Based on this, it is necessary to provide a method, device, computer equipment and storage medium for accurately locating the service node where the abnormality occurs, as well as the link abnormality positioning of the user information corresponding to the business request when an abnormality occurs in the process of executing a business request in a microservice architecture, in response to the above technical problems.
[0005] In a first aspect, the present application provides a link abnormality location method. The method comprises:
[0006] Based on the service request sent by the user, determine the target link corresponding to the service request;
[0007] Determine the target service identifier corresponding to the service request and the target link identifier corresponding to each service node in the target link, and establish an identifier mapping relationship between the target service identifier and the target link identifier;
[0008] In the process of processing a service request based on a target link, if an abnormality is detected in the target link, the target link is abnormally located based on the identification mapping relationship to obtain an abnormality location result.
[0009] In one of the embodiments, based on the identification mapping relationship, an abnormality location is performed on the target link to obtain an abnormality location result, including:
[0010] Determine the positioning target based on the abnormal positioning requirements corresponding to the target link;
[0011] Based on the mapping relationship between the positioning target and the identifier, the target link is abnormally located to obtain the abnormal location result corresponding to the positioning target.
[0012] In one of the embodiments, based on the mapping relationship between the positioning target and the identifier, abnormality positioning is performed on the target link to obtain an abnormality positioning result corresponding to the positioning target, including:
[0013] If the positioning target is the user corresponding to the target link, determining a first abnormal link identifier corresponding to the target link;
[0014] Based on the identifier mapping relationship, determine a first abnormal service identifier corresponding to the first abnormal link identifier;
[0015] Based on the first abnormal service identifier, an abnormal positioning result corresponding to the positioning target is determined.
[0016] In one of the embodiments, based on the mapping relationship between the positioning target and the identifier, abnormality positioning is performed on the target link to obtain an abnormality positioning result corresponding to the positioning target, including:
[0017] If the positioning target is a service node in which an abnormality occurs in the target link, determining a second abnormal service identifier corresponding to the service request;
[0018] Based on the identifier mapping relationship, determine a second abnormal link identifier corresponding to the second abnormal service identifier;
[0019] Based on the second abnormal link identifier, an abnormal positioning result corresponding to the positioning target is determined.
[0020] In one embodiment, determining a target link corresponding to a service request based on a service request sent by a user includes:
[0021] Based on the service request sent by the user, determine the standard link and the link to be detected corresponding to the service request;
[0022] Based on the standard links, the structure of the links to be detected is detected, and the target links in the links to be detected are determined.
[0023] In one embodiment, based on the standard link, a structure detection is performed on the link to be detected, and a target link in the link to be detected is determined, including:
[0024] Superimpose the standard link and the link to be detected;
[0025] Based on the superposition processing results, the structure of the link to be detected is detected, and the target link in the link to be detected is determined.
[0026] In one embodiment, based on a service request sent by a user, determining a standard link and a link to be detected corresponding to the service request includes:
[0027] Determine the standard link corresponding to the service request based on the type of service request sent by the user;
[0028] Based on the semantic information of the service request sent by the user, determine whether it complies with the semantic formulation rules;
[0029] If they match, the link to be detected corresponding to the service request is determined based on the semantic information and the standard link.
[0030] In a second aspect, the present application also provides a link anomaly locating device. The device comprises:
[0031] A first determination module, configured to determine a target link corresponding to a service request based on a service request sent by a user;
[0032] The second determination module is used to determine the target service identifier corresponding to the service request and the target link identifier corresponding to each service node in the target link, and to establish an identifier mapping relationship between the target service identifier and the target link identifier;
[0033] The positioning module is used to locate the abnormality of the target link based on the identification mapping relationship if an abnormality is detected in the target link during the process of processing the service request based on the target link to obtain the abnormality positioning result.
[0034] In a third aspect, the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the link anomaly locating method according to any one of the embodiments of the first aspect is implemented.
[0035] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the link abnormality locating method according to any embodiment of the first aspect is implemented.
[0036] In a fifth aspect, the present application further provides a computer program product, including a computer program, which, when executed by a processor, implements the link anomaly locating method according to any one of the embodiments of the first aspect.
[0037] According to the technical solution of the present application, by determining the target link corresponding to the business request, it is ensured that the target link identifier can be determined based on the target link, and then the target link abnormality can be located based on the target link identifier to obtain the abnormality location result, thereby ensuring the accuracy of the abnormality location result; by determining the target business identifier, the target link identifier and the identifier mapping relationship, it is ensured that when an abnormality occurs in the target link, the abnormality location result can be determined based on the target business identifier, the target link identifier and the identifier mapping relationship, thereby achieving accurate location of the service node where the abnormality occurs and the user information corresponding to the business request when an abnormality occurs in the process of executing the business request in the microservice architecture, further ensuring the rapid repair of the abnormal service node and the rapid notification of the user corresponding to the abnormal business request, reducing the abnormal impact caused when the target link is abnormal, and improving the efficiency of handling the abnormality. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 An application environment diagram of a link anomaly locating method provided in an embodiment of the present application;
[0039] Figure 2 A flowchart of a link abnormality locating method provided in an embodiment of the present application;
[0040] Figure 3 A flowchart of the steps for determining an abnormal location result provided in an embodiment of the present application;
[0041] Figure 4 A flowchart of the steps for determining a target link provided in an embodiment of the present application;
[0042] Figure 5 An overlay diagram of a standard link and a link to be detected provided in an embodiment of the present application;
[0043] Figure 6 A flowchart of another link abnormality locating method provided in an embodiment of the present application;
[0044] Figure 7 A structural block diagram of a first link anomaly locating device provided in an embodiment of the present application;
[0045] Figure 8 A structural block diagram of a second link anomaly locating device provided in an embodiment of the present application;
[0046] Fig. 9 A structural block diagram of a third link anomaly locating device provided in an embodiment of the present application;
[0047] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0048] 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.
[0049] It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. In the description of the present application, the description of the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms is not necessarily for the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples without contradicting each other.
[0050] As the scale of enterprises continues to grow, more and more enterprises are beginning to build and use microservice architectures that suit their actual conditions. With the emergence of microservice architectures, the difficulty of infrastructure management for enterprises has been greatly reduced.
[0051] Since the microservice architecture contains multiple service nodes and each service node has multiple instances, when an exception occurs during the execution of a business request by the microservice architecture, it is difficult to locate the abnormal service node and the user information corresponding to the business request in a timely and accurate manner.
[0052] The link anomaly locating method provided in the embodiment of the present application can be applied to Figure 1 In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in FIG. Figure 1 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. 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, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the acquired data of link anomaly positioning. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a link anomaly positioning method is implemented.
[0053] The present application discloses a link anomaly location method, device, computer equipment and storage medium. The computer equipment of the staff determines the target link corresponding to the service request, and based on the target link, determines the target service identifier and the target link identifier; determines the identifier mapping relationship between the target service identifier and the target link identifier, and when an abnormality is detected in the target link, the target link is abnormally located according to the target service identifier, the target link identifier and the identifier mapping relationship, and an abnormal location result is obtained.
[0054] In one embodiment, Figure 2 As shown, Figure 2 A flowchart of a link abnormality locating method provided in an embodiment of the present application provides a link abnormality locating method. Figure 1 The link anomaly locating method executed by the computer device in the embodiment may include the following steps:
[0055] Step 201: Based on the service request sent by the user, determine the target link corresponding to the service request.
[0056] It should be noted that the target link includes the various processing flows included in the business request, and the processing order corresponding to each processing flow; therefore, when it is necessary to determine the target link corresponding to the business request, it is necessary to determine the various processing flows corresponding to the business request, and the processing order corresponding to each processing flow, based on the business request sent by the user; further, based on the various processing flows corresponding to the business request, and the processing order corresponding to each processing flow, determine the target link corresponding to the business request.
[0057] To further explain, before determining the target link corresponding to the business request, it is necessary to verify the legitimacy of the business request sent by the user; determine whether the semantic information corresponding to the business request is legal. If the semantic information corresponding to the business request is legal, the target link corresponding to the business request can be determined based on the business request sent by the user, and information feedback is provided to the user to indicate that the target link corresponding to the business request has been determined; if the semantic information corresponding to the business request is illegal, information feedback is provided to the user to indicate that the semantic information corresponding to the business request is illegal and the target link cannot be determined.
[0058] Step 202: determine the target service identifier corresponding to the service request and the target link identifier corresponding to each service node in the target link, and construct an identifier mapping relationship between the target service identifier and the target link identifier.
[0059] It should be noted that the target service identifier is used to mark the service request sent by the user to ensure that the target of sending the service request can be determined based on the target service identifier. Furthermore, the target service identifier may include relevant information of the user sending the service request; based on the relevant information of the user sending the service request, rapid positioning of the user can be achieved.
[0060] The relevant information of the user sending the service request may include, but is not limited to: a service serial number corresponding to the service request, an identity identifier corresponding to the user, and a sending time corresponding to the service request.
[0061] In one embodiment of the present application, when it is necessary to determine the target service identifier corresponding to the service request, the identifier baggage (which is composed of several<key,value> key-value pair), and then store the target business identifier corresponding to the determined business request in the identified luggage.
[0062] It should be noted that the target link identifier is used to indicate the operating status of each service node in the target link. Furthermore, based on the operating status of each service node in the target link identifier, it can be used to determine whether an abnormal service node appears in the target link, and the abnormal location of the abnormal service node when an abnormal service node appears in the target link.
[0063] Further explanation: in order to ensure that the target link can be located abnormally based on the target service identifier and the target link identifier, it is necessary to be able to determine the target service identifier corresponding to the abnormal target link identifier based on the abnormal target link identifier when an abnormality occurs in the target link; and, when an abnormality occurs in the target link, determine the target link identifier corresponding to the abnormal target service identifier based on the abnormal target service identifier; therefore, it is necessary to create an identifier mapping relationship between the target service identifier and the target link identifier to ensure that, based on the identifier mapping relationship, the target service identifier corresponding to the abnormal target link identifier is determined based on the abnormal target link identifier, and, based on the abnormal target service identifier, the target link identifier corresponding to the abnormal target service identifier is determined.
[0064] Step 203: During the process of processing the service request based on the target link, if it is detected that the target link is abnormal, the target link is abnormally located based on the identification mapping relationship to obtain an abnormality location result.
[0065] In one embodiment of the present application, when it is necessary to locate an abnormality of a target link for a user and obtain an abnormal location result, the abnormal target link identifier can be determined based on the identifier mapping relationship, and the target service identifier corresponding to the abnormal target link identifier can be determined; and then the abnormal location result can be determined based on the target service identifier.
[0066] In one embodiment of the present application, when it is necessary to locate the abnormality of the service node in the target link and obtain the abnormal location result, the target link identifier corresponding to the abnormal target service identifier can be determined based on the identifier mapping relationship and the abnormal target service identifier; and then the abnormal location result is determined based on the target link identifier.
[0067] According to the link anomaly locating method of the present application, by determining the target link corresponding to the business request, it is ensured that the target link identifier can be determined based on the target link, and then the target link anomaly is located based on the target link identifier to obtain the anomaly locating result, thereby ensuring the accuracy of the anomaly locating result; by determining the target business identifier, the target link identifier and the identifier mapping relationship, it is ensured that when an anomaly occurs in the target link, the anomaly locating result can be determined based on the target business identifier, the target link identifier and the identifier mapping relationship, thereby achieving accurate locating of the service node where the anomaly occurs and the user information corresponding to the business request when an anomaly occurs in the process of executing the business request in the microservice architecture, further ensuring the rapid repair of the service node where the anomaly occurs and the rapid notification of the user corresponding to the abnormal business request, reducing the abnormal impact caused when the target link anomaly occurs and improving the efficiency of handling the anomaly.
[0068] It should be noted that the abnormal positioning result can be determined by determining the positioning target and then according to the mapping relationship between the positioning target and the identifier. Figure 3 As shown, Figure 3 A flowchart of the steps for determining an abnormal location result provided in an embodiment of the present application. Specifically, determining the abnormal location result may include the following steps:
[0069] Step 301: determine a positioning target based on an abnormal positioning requirement corresponding to a target link.
[0070] It should be noted that the abnormal positioning requirement at least includes the positioning target that needs to be positioned, wherein the positioning target can be: the user corresponding to the target link or the service node with an abnormality in the target link. Since different positioning targets have different corresponding identifiers, before determining the abnormal positioning result, it is necessary to determine the positioning target according to the abnormal positioning requirement corresponding to the target link.
[0071] To further explain, if the target link where the abnormality occurs is known, but the user corresponding to the abnormal target link is unknown, then the positioning target is the user corresponding to the target link; if the user corresponding to the abnormal service request is known, but the service node where the abnormality occurs is unknown, then the positioning target is the service node where the abnormality occurs in the target link.
[0072] Step 302: Based on the mapping relationship between the positioning target and the identifier, abnormality positioning is performed on the target link to obtain an abnormality positioning result corresponding to the positioning target.
[0073] It should be noted that determining the abnormal positioning result may specifically include the following steps: if the positioning target is the user corresponding to the target link, determining the first abnormal link identifier corresponding to the target link; based on the identifier mapping relationship, determining the first abnormal service identifier corresponding to the first abnormal link identifier; based on the first abnormal service identifier, determining the abnormal positioning result corresponding to the positioning target.
[0074] In one embodiment of the present application, when an abnormality occurs in a target link, the first abnormal link identifier corresponding to the target link is determined; since the positioning target is the user corresponding to the target link, it is necessary to determine the first abnormal service identifier corresponding to the user; then, based on the identifier mapping relationship, the first abnormal service identifier corresponding to the first abnormal link identifier can be determined, and based on the first abnormal service identifier, the user corresponding to the target link can be determined, and the user corresponding to the target link is the abnormal positioning result.
[0075] It should be noted that determining the abnormal positioning result may specifically include the following steps: if the positioning target is a service node where an abnormality occurs in the target link, determining the second abnormal service identifier corresponding to the service request; based on the identifier mapping relationship, determining the second abnormal link identifier corresponding to the second abnormal service identifier; based on the second abnormal link identifier, determining the abnormal positioning result corresponding to the positioning target.
[0076] In one embodiment of the present application, when an abnormality occurs in a service request, a second abnormal service identifier corresponding to the service request is determined; since the positioning target is a service node where an abnormality occurs in a target link, it is necessary to determine the second abnormal link identifier corresponding to the target link; then, based on the identifier mapping relationship, the second abnormal link identifier corresponding to the second abnormal service identifier can be determined; based on the second abnormal link identifier, the service node where the abnormality occurs in the target link can be determined, and the service node where the abnormality occurs in the target link is the abnormal positioning result.
[0077] According to the link abnormality positioning method of the present application, the positioning target is determined through the abnormal positioning demand, and it is ensured that the target service identifier or the target link identifier can be determined according to different positioning targets and identifier mapping relationships, and then the abnormal positioning result is determined according to the target service identifier or the target link identifier; the accuracy of the abnormal positioning result is ensured, so that the abnormal positioning result can meet the positioning target in the abnormal positioning demand; it is further explained that by determining the first abnormal link identifier, a data basis is provided for the subsequent determination of the first abnormal service identifier, and it is ensured that the user corresponding to the target link can be accurately obtained, and when the positioning target is the user corresponding to the target link, the abnormal positioning result is quickly determined; and by determining the second abnormal service identifier, a data basis is provided for the subsequent determination of the second abnormal link identifier, and it is ensured that the service node with an abnormality in the target link can be accurately located, and when the positioning target is the service node with an abnormality in the target link, the abnormal positioning result is quickly determined.
[0078] It should be noted that the target link in the link to be detected can be determined by determining the standard link and the link to be detected. Figure 4 As shown, Figure 4 A flowchart of the steps of determining a target link provided in an embodiment of the present application. Specifically, determining the target link may include the following steps:
[0079] Step 401: Based on a service request sent by a user, a standard link and a link to be detected corresponding to the service request are determined.
[0080] The standard link refers to a template link corresponding to the service category of the service request; the link to be detected refers to a link whose structure detection has not been completed and is determined according to the service request sent by the user.
[0081] It should be noted that the links to be detected corresponding to the service requests of the same service category have the same structure as the standard links of the service category; therefore, the links to be detected can be screened by performing structural detection on the links to be detected and the standard links.
[0082] It should be noted that when it is necessary to determine the standard link and the link to be tested, the following steps may be specifically included: based on the type of business request sent by the user, determine the standard link corresponding to the business request; based on the semantic information of the business request sent by the user, determine whether it complies with the semantic formulation rules; if it does, determine the link to be tested corresponding to the business request based on the semantic information and the standard link.
[0083] To further illustrate, when it is necessary to determine the link to be detected, it is necessary to ensure that the link to be detected meets the semantic information of the service request, and the link to be detected needs to include the service node in the standard link. Therefore, it is necessary to determine the link to be detected based on the semantic information and the standard link.
[0084] Step 402: Based on the standard link, perform structure detection on the link to be detected, and determine the target link in the link to be detected.
[0085] It should be noted that when performing structural detection on the link to be detected, the following steps may be specifically included: superimposing the standard link and the link to be detected; based on the superimposed processing result, performing structural detection on the link to be detected, and determining the target link in the link to be detected.
[0086] To further explain, when a structural detection is performed on the link to be detected based on the superposition processing results, it is necessary to determine that the structure of the link to be detected in the superposition processing results is exactly the same as that of the standard link. If the structure of the link to be detected in the superposition processing results is exactly the same as that of the standard link, it means that the structural detection of the link to be detected has passed; if the structure of the link to be detected in the superposition processing results is not exactly the same as that of the standard link, it means that the structural detection of the link to be detected has failed.
[0087] In one embodiment of the present application, after the standard link and the link to be detected are superimposed, the superimposed standard link and the link to be detected can be as follows: Figure 5 As shown, Figure 5 An overlay diagram of a standard link and a link to be detected provided in an embodiment of the present application, wherein step 01 to step 08 refer to different service nodes, and, Figure 5 The solid line part in the figure is the standard link. Figure 5 The dotted part in the figure is the link to be detected. When it is necessary to perform structural detection on the link to be detected, it can be determined that the link to be detected only includes step01, step02, and step04; while the standard link also includes step05, step06, and step08. Therefore, it can be determined that the structure of the link to be detected in the superposition processing result is not exactly the same as that of the standard link, which means that the structural detection of the link to be detected has failed.
[0088] According to the link anomaly positioning method of the present application, by determining the standard link and the link to be detected, it is ensured that the standard link can subsequently perform structural detection on the link to be detected, thereby achieving the determination of the target link, ensuring that the target link has the same structure as the standard link, ensuring the accuracy of the target link, ensuring the smooth execution of user service requests, and preventing the failure of user service requests to be smoothly executed due to structural errors in the target link. Further explanation, by superimposing the standard link and the link to be detected, it is ensured that the structure of the link to be detected can be more accurately detected, the efficiency of the structure detection of the link to be detected is improved, and it is possible to quickly determine whether there is a structural difference between the link to be detected and the standard link.
[0089] In one embodiment of the present application, Figure 6 As shown, Figure 6 A flowchart of another link anomaly locating method provided in an embodiment of the present application, when locating anomalies on a target link, may specifically include the following steps:
[0090] Step 601: Determine a standard link corresponding to the service request based on the type of the service request sent by the user.
[0091] Step 602: Determine whether the semantics-making rules are met based on the semantic information of the service request sent by the user.
[0092] Step 603: If it is in compliance, the link to be detected corresponding to the service request is determined based on the semantic information and the standard link.
[0093] Step 604: superimpose the standard link and the link to be detected.
[0094] Step 605: Based on the superposition processing result, perform structural detection on the link to be detected, and determine the target link in the link to be detected.
[0095] Step 606: determine the target service identifier corresponding to the service request and the target link identifier corresponding to each service node in the target link, and construct an identifier mapping relationship between the target service identifier and the target link identifier.
[0096] Step 607: During the process of processing the service request based on the target link, if an abnormality is detected on the target link, a positioning target is determined based on the abnormality positioning requirement corresponding to the target link.
[0097] Step 608: Based on the mapping relationship between the positioning target and the identifier, abnormality positioning is performed on the target link to obtain an abnormality positioning result corresponding to the positioning target.
[0098] In one embodiment of the present application, if the positioning target is the user corresponding to the target link, the first abnormal link identifier corresponding to the target link is determined; based on the identifier mapping relationship, the first abnormal service identifier corresponding to the first abnormal link identifier is determined; based on the first abnormal service identifier, the abnormal positioning result corresponding to the positioning target is determined.
[0099] In another embodiment of the present application, if the positioning target is a service node where an abnormality occurs in the target link, the second abnormal service identifier corresponding to the service request is determined; based on the identifier mapping relationship, the second abnormal link identifier corresponding to the second abnormal service identifier is determined; based on the second abnormal link identifier, the abnormal positioning result corresponding to the positioning target is determined.
[0100] According to the link anomaly locating method of the present application, by determining the target link corresponding to the business request, it is ensured that the target link identifier can be determined based on the target link, and then the target link anomaly is located based on the target link identifier to obtain the anomaly locating result, thereby ensuring the accuracy of the anomaly locating result; by determining the target business identifier, the target link identifier and the identifier mapping relationship, it is ensured that when an anomaly occurs in the target link, the anomaly locating result can be determined based on the target business identifier, the target link identifier and the identifier mapping relationship, thereby achieving accurate locating of the service node where the anomaly occurs and the user information corresponding to the business request when an anomaly occurs in the process of executing the business request in the microservice architecture, further ensuring the rapid repair of the service node where the anomaly occurs and the rapid notification of the user corresponding to the abnormal business request, reducing the abnormal impact caused when the target link anomaly occurs and improving the efficiency of handling the anomaly.
[0101] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0102] Based on the same inventive concept, the embodiment of the present application also provides a link anomaly locating device for implementing the link anomaly locating method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more link anomaly locating device embodiments provided below can refer to the limitations of the link anomaly locating method above, and will not be repeated here.
[0103] In one embodiment, Figure 7 As shown, Figure 7 The structural block diagram of the first link anomaly locating device provided in the embodiment of the present application provides a link anomaly locating device, including: a first determination module 10, a second determination module 20 and a locating module 30, wherein:
[0104] The first determination module 10 is used to determine a target link corresponding to a service request based on a service request sent by a user.
[0105] The second determination module 20 is used to determine the target service identifier corresponding to the service request and the target link identifier corresponding to each service node in the target link, and to construct an identifier mapping relationship between the target service identifier and the target link identifier.
[0106] The positioning module 30 is used to locate the abnormality of the target link based on the identification mapping relationship to obtain the abnormality positioning result if it is detected that the target link is abnormal during the process of processing the service request based on the target link.
[0107] According to the link anomaly locating device of the present application, by determining the target link corresponding to the business request, it is ensured that the target link identifier can be determined based on the target link, and then the target link is abnormally located according to the target link identifier to obtain the anomaly locating result, thereby ensuring the accuracy of the anomaly locating result; by determining the target business identifier, the target link identifier and the identifier mapping relationship, it is ensured that when an abnormality occurs in the target link, the anomaly locating result can be determined based on the target business identifier, the target link identifier and the identifier mapping relationship, thereby achieving accurate locating of the service node where the abnormality occurs and the user information corresponding to the business request when an abnormality occurs in the process of executing the business request in the microservice architecture, further ensuring the rapid repair of the abnormal service node and the rapid notification of the user corresponding to the abnormal business request, reducing the abnormal impact caused when the target link is abnormal, and improving the efficiency of handling the abnormality.
[0108] In one embodiment, Figure 8 As shown, Figure 8 The structural block diagram of the second link anomaly locating device provided in the embodiment of the present application provides a link anomaly locating device, in which the locating module 30 includes: a first determining unit 31 and a locating unit 32, wherein:
[0109] The first determining unit 31 is configured to determine a positioning target based on an abnormal positioning requirement corresponding to a target link.
[0110] The positioning unit 32 is used to perform abnormal positioning on the target link based on the positioning target and the identification mapping relationship, and obtain the abnormal positioning result corresponding to the positioning target.
[0111] In one embodiment of the present application, if the positioning target is the user corresponding to the target link, the first abnormal link identifier corresponding to the target link is determined; based on the identifier mapping relationship, the first abnormal service identifier corresponding to the first abnormal link identifier is determined; based on the first abnormal service identifier, the abnormal positioning result corresponding to the positioning target is determined.
[0112] In one embodiment of the present application, if the positioning target is a service node where an abnormality occurs in the target link, the second abnormal service identifier corresponding to the service request is determined; based on the identifier mapping relationship, the second abnormal link identifier corresponding to the second abnormal service identifier is determined; based on the second abnormal link identifier, the abnormal positioning result corresponding to the positioning target is determined.
[0113] According to the link abnormality positioning device of the present application, the positioning target is determined through the abnormal positioning demand, and it is ensured that the target service identifier or the target link identifier can be determined according to different positioning targets and identifier mapping relationships, and then the abnormal positioning result is determined according to the target service identifier or the target link identifier; the accuracy of the abnormal positioning result is ensured, so that the abnormal positioning result can meet the positioning target in the abnormal positioning demand; it is further explained that by determining the first abnormal link identifier, a data basis is provided for the subsequent determination of the first abnormal service identifier, and it is ensured that the user corresponding to the target link can be accurately obtained, and when the positioning target is the user corresponding to the target link, the abnormal positioning result is quickly determined; and, by determining the second abnormal service identifier, a data basis is provided for the subsequent determination of the second abnormal link identifier, and it is ensured that the service node with an abnormality in the target link can be accurately located, and when the positioning target is the service node with an abnormality in the target link, the abnormal positioning result is quickly determined.
[0114] In one embodiment, Fig. 9 As shown, Fig. 9 The structural block diagram of the third link anomaly locating device provided in the embodiment of the present application provides a link anomaly locating device, in which the first determining module 10 includes: a second determining unit 11 and a third determining unit 12, wherein:
[0115] The second determining unit 11 is configured to determine, based on a service request sent by a user, a standard link and a link to be detected corresponding to the service request.
[0116] It should be noted that based on the type of business request sent by the user, the standard link corresponding to the business request is determined; based on the semantic information of the business request sent by the user, it is determined whether it complies with the semantic formulation rules; if it does, the link to be detected corresponding to the business request is determined based on the semantic information and the standard link.
[0117] The third determining unit 12 is configured to perform structure detection on the links to be detected based on the standard links, and determine a target link in the links to be detected.
[0118] It should be noted that the standard link and the link to be detected are superimposed; based on the superimposed processing result, the structure of the link to be detected is detected to determine the target link in the link to be detected.
[0119] According to the link anomaly locating device of the present application, by determining the standard link and the link to be detected, it is ensured that the standard link can subsequently perform structural detection on the link to be detected, thereby achieving the determination of the target link, ensuring that the target link has the same structure as the standard link, ensuring the accuracy of the target link, ensuring the smooth execution of the user's service request, and preventing the user's service request from being unable to be executed smoothly due to structural errors in the target link. Further explanation, by superimposing the standard link and the link to be detected, it is ensured that the structure of the link to be detected can be more accurately detected, the efficiency of the structure detection of the link to be detected is improved, and it is possible to quickly determine whether there is a structural difference between the link to be detected and the standard link.
[0120] Each module in the above-mentioned link anomaly locating device can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.
[0121] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.10 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. 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 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 achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a link anomaly positioning method is implemented. The display screen of the computer device 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 covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0122] Those skilled in the art will understand that Fig.10 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.
[0123] In one 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:
[0124] Based on the service request sent by the user, determine the target link corresponding to the service request;
[0125] Determine the target service identifier corresponding to the service request and the target link identifier corresponding to each service node in the target link, and establish an identifier mapping relationship between the target service identifier and the target link identifier;
[0126] In the process of processing a service request based on a target link, if an abnormality is detected in the target link, the target link is abnormally located based on the identification mapping relationship to obtain an abnormality location result.
[0127] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0128] Determine the positioning target based on the abnormal positioning requirements corresponding to the target link;
[0129] Based on the mapping relationship between the positioning target and the identifier, the target link is abnormally located to obtain the abnormal location result corresponding to the positioning target.
[0130] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0131] If the positioning target is the user corresponding to the target link, determining a first abnormal link identifier corresponding to the target link;
[0132] Based on the identifier mapping relationship, determine a first abnormal service identifier corresponding to the first abnormal link identifier;
[0133] Based on the first abnormal service identifier, an abnormal positioning result corresponding to the positioning target is determined.
[0134] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0135] If the positioning target is a service node in which an abnormality occurs in the target link, determining a second abnormal service identifier corresponding to the service request;
[0136] Based on the identifier mapping relationship, determine a second abnormal link identifier corresponding to the second abnormal service identifier;
[0137] Based on the second abnormal link identifier, an abnormal positioning result corresponding to the positioning target is determined.
[0138] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0139] Based on the service request sent by the user, determine the standard link and the link to be detected corresponding to the service request;
[0140] Based on the standard links, the structure of the links to be detected is detected, and the target links in the links to be detected are determined.
[0141] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0142] Superimpose the standard link and the link to be detected;
[0143] Based on the superposition processing results, the structure of the link to be detected is detected, and the target link in the link to be detected is determined.
[0144] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0145] Determine the standard link corresponding to the service request based on the type of service request sent by the user;
[0146] Based on the semantic information of the service request sent by the user, determine whether it complies with the semantic formulation rules;
[0147] If they match, the link to be detected corresponding to the service request is determined based on the semantic information and the standard link.
[0148] 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:
[0149] Based on the service request sent by the user, determine the target link corresponding to the service request;
[0150] Determine the target service identifier corresponding to the service request and the target link identifier corresponding to each service node in the target link, and establish an identifier mapping relationship between the target service identifier and the target link identifier;
[0151] In the process of processing a service request based on a target link, if an abnormality is detected in the target link, the target link is abnormally located based on the identification mapping relationship to obtain an abnormality location result.
[0152] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0153] Determine the positioning target based on the abnormal positioning requirements corresponding to the target link;
[0154] Based on the mapping relationship between the positioning target and the identifier, the target link is abnormally located to obtain the abnormal location result corresponding to the positioning target.
[0155] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0156] If the positioning target is the user corresponding to the target link, determining a first abnormal link identifier corresponding to the target link;
[0157] Based on the identifier mapping relationship, determine a first abnormal service identifier corresponding to the first abnormal link identifier;
[0158] Based on the first abnormal service identifier, an abnormal positioning result corresponding to the positioning target is determined.
[0159] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0160] If the positioning target is a service node in which an abnormality occurs in the target link, determining a second abnormal service identifier corresponding to the service request;
[0161] Based on the identifier mapping relationship, determine a second abnormal link identifier corresponding to the second abnormal service identifier;
[0162] Based on the second abnormal link identifier, an abnormal positioning result corresponding to the positioning target is determined.
[0163] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0164] Based on the service request sent by the user, determine the standard link and the link to be detected corresponding to the service request;
[0165] Based on the standard links, the structure of the links to be detected is detected, and the target links in the links to be detected are determined.
[0166] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0167] Superimpose the standard link and the link to be detected;
[0168] Based on the superposition processing results, the structure of the link to be detected is detected, and the target link in the link to be detected is determined.
[0169] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0170] Determine the standard link corresponding to the service request based on the type of service request sent by the user;
[0171] Based on the semantic information of the service request sent by the user, determine whether it complies with the semantic formulation rules;
[0172] If they match, the link to be detected corresponding to the service request is determined based on the semantic information and the standard link.
[0173] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0174] Based on the service request sent by the user, determine the target link corresponding to the service request;
[0175] Determine the target service identifier corresponding to the service request and the target link identifier corresponding to each service node in the target link, and establish an identifier mapping relationship between the target service identifier and the target link identifier;
[0176] In the process of processing a service request based on a target link, if an abnormality is detected in the target link, the target link is abnormally located based on the identification mapping relationship to obtain an abnormality location result.
[0177] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0178] Determine the positioning target based on the abnormal positioning requirements corresponding to the target link;
[0179] Based on the mapping relationship between the positioning target and the identifier, the target link is abnormally located to obtain the abnormal location result corresponding to the positioning target.
[0180] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0181] If the positioning target is the user corresponding to the target link, determining a first abnormal link identifier corresponding to the target link;
[0182] Based on the identifier mapping relationship, determine a first abnormal service identifier corresponding to the first abnormal link identifier;
[0183] Based on the first abnormal service identifier, an abnormal positioning result corresponding to the positioning target is determined.
[0184] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0185] If the positioning target is a service node in which an abnormality occurs in the target link, determining a second abnormal service identifier corresponding to the service request;
[0186] Based on the identifier mapping relationship, determine a second abnormal link identifier corresponding to the second abnormal service identifier;
[0187] Based on the second abnormal link identifier, an abnormal positioning result corresponding to the positioning target is determined.
[0188] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0189] Based on the service request sent by the user, determine the standard link and the link to be detected corresponding to the service request;
[0190] Based on the standard links, the structure of the links to be detected is detected, and the target links in the links to be detected are determined.
[0191] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0192] Superimpose the standard link and the link to be detected;
[0193] Based on the superposition processing results, the structure of the link to be detected is detected, and the target link in the link to be detected is determined.
[0194] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0195] Determine the standard link corresponding to the service request based on the type of service request sent by the user;
[0196] Based on the semantic information of the service request sent by the user, determine whether it complies with the semantic formulation rules;
[0197] If they match, the link to be detected corresponding to the service request is determined based on the semantic information and the standard link.
[0198] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0199] 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.
[0200] 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.
[0201] The above 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 link anomaly locating method, characterized in that: The method comprises: Based on the service request sent by the user, determining a target link corresponding to the service request; Determine a target service identifier corresponding to the service request and a target link identifier corresponding to each service node in the target link, and construct an identifier mapping relationship between the target service identifier and the target link identifier, wherein the target link identifier is used to characterize the operating status of each service node in the target link; In the process of processing the service request based on the target link, if it is detected that the target link is abnormal, the target link is abnormally located based on the identification mapping relationship to obtain an abnormality location result, The performing abnormality location on the target link based on the identification mapping relationship to obtain the abnormality location result includes: Determining a positioning target based on the abnormal positioning requirement corresponding to the target link; Based on the positioning target and the identification mapping relationship, the target link is abnormally positioned to obtain the abnormal positioning result corresponding to the positioning target, wherein the positioning target includes a user corresponding to the target link or a service node with an abnormality in the target link, Wherein, determining the target link corresponding to the service request based on the service request sent by the user includes: Based on the service request sent by the user, determine the standard link and the link to be detected corresponding to the service request, wherein the standard link is a template link corresponding to the service category of the service request; Superimposing the standard link and the link to be detected; Based on the superposition processing result, a structural detection is performed on the link to be detected to determine a target link in the link to be detected.
2. The method according to claim 1, characterized in that The performing abnormality positioning on the target link based on the positioning target and the identification mapping relationship to obtain the abnormality positioning result corresponding to the positioning target includes: If the positioning target is the user corresponding to the target link, determining a first abnormal link identifier corresponding to the target link; Based on the identifier mapping relationship, determine a first abnormal service identifier corresponding to the first abnormal link identifier; Based on the first abnormal service identifier, the abnormal positioning result corresponding to the positioning target is determined.
3. The method according to claim 1, characterized in that The performing abnormality positioning on the target link based on the positioning target and the identification mapping relationship to obtain the abnormality positioning result corresponding to the positioning target includes: If the positioning target is a service node in which an abnormality occurs in the target link, determining a second abnormal service identifier corresponding to the service request; Based on the identifier mapping relationship, determine a second abnormal link identifier corresponding to the second abnormal service identifier; Based on the second abnormal link identifier, the abnormal positioning result corresponding to the positioning target is determined.
4. The method according to claim 1, characterized in that: The determining, based on the service request sent by the user, a standard link and a link to be detected corresponding to the service request includes: Determining a standard link corresponding to the service request based on the type of the service request sent by the user; Determining whether the service request sent by the user complies with the semantic formulation rules based on the semantic information of the service request sent by the user; If so, the link to be detected corresponding to the service request is determined based on the semantic information and the standard link.
5. A link anomaly locating device, characterized in that: The device comprises: A first determination module, configured to determine a target link corresponding to a service request sent by a user; A second determination module is used to determine a target service identifier corresponding to the service request and a target link identifier corresponding to each service node in the target link, and to construct an identifier mapping relationship between the target service identifier and the target link identifier, wherein the target link identifier is used to characterize the operating status of each service node in the target link; A positioning module is used to locate the abnormality of the target link based on the identification mapping relationship if the target link is detected to be abnormal during the process of processing the service request based on the target link to obtain an abnormality positioning result. The positioning module is also used to determine a positioning target based on the abnormal positioning requirement corresponding to the target link; based on the positioning target and the identification mapping relationship, perform abnormal positioning on the target link to obtain the abnormal positioning result corresponding to the positioning target, wherein the positioning target includes a user corresponding to the target link or a service node with an abnormality in the target link; The first determination module is also used to determine the standard link and the link to be detected corresponding to the service request sent by the user; superimpose the standard link and the link to be detected; and based on the superposition processing result, perform structural detection on the link to be detected to determine the target link in the link to be detected.
6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
7. 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 4 are implemented.
8. A computer program product, comprising a computer program, 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 4 are implemented.
Citation Information
Patent Citations
Method and device for tracking service execution process in distributed system
CN113169900A