A problem positioning method, device, apparatus and storage medium

By obtaining the machine code from the service call message, the service identifier and node sequence number can be quickly determined, solving the problem of low service node location efficiency in existing technologies and enabling rapid problem location in large clusters and PaaS cloud environments.

CN114461431BActive Publication Date: 2026-02-27AGRICULTURAL BANK OF CHINA
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210113883.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-30
Publication Date
2026-02-27
Estimated Expiration
2042-01-30

AI Technical Summary

Technical Problem

In existing technologies, the operating nodes of location service providers that experience service anomalies are inefficient, requiring each service node to be investigated individually.

Method used

By obtaining the machine code in the service call message, the service identifier and node sequence number can be determined, and the running node of the problematic service can be directly located.

Benefits of technology

It enables rapid location of the running nodes of problematic services in large clusters and PaaS cloud environments, avoiding the inefficient process of checking each node one by one.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114461431B_ABST
    Figure CN114461431B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a problem positioning method, device and equipment and a storage medium. The method comprises: in response to a problem positioning instruction, obtaining a service call message sent to a service invoker, wherein the service call message is generated when the service invoker calls a called service; obtaining a first machine code from the service call message, and determining a service identifier and a node serial number according to the first machine code, wherein the service identifier is an identifier of a problem service that has an issue in executing the called service, and the node serial number is a serial number of a running node that executes the problem service; and positioning to the running node according to the service identifier and the node serial number. The technical solution of the embodiments of the present application does not need to check each service node under a service provider one by one, but can directly position to the running node according to the first machine code in the service call message generated due to this service call, thereby achieving the effect of fast positioning of the running node, i.e. fast problem positioning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of computer applications, and in particular to a problem localization method, apparatus, device and storage medium. Background Technology

[0002] High availability is a basic performance requirement for application systems (i.e., service providers). When a service caller encounters an exception when calling a service provided by the service provider, the service provider needs to locate the location where the service execution occurred, i.e., the running node where the problem occurred when the service was executed.

[0003] Currently, the main method to find the problematic running node is to check each service node under the service provider one by one. Obviously, this method has the problem of low location efficiency. Summary of the Invention

[0004] This invention provides a problem localization method, apparatus, device, and storage medium to quickly locate the operational nodes where service providers encounter problems while providing services.

[0005] In a first aspect, embodiments of the present invention provide a problem localization method, which may include:

[0006] In response to a problem location command, retrieve the service call message sent to the service caller, where the service call message is the message generated when the service caller calls the called service;

[0007] Obtain the first machine code from the service call message, and determine the service identifier and node sequence number based on the first machine code. The service identifier is the identifier of the problematic service that caused the problem in executing the called service, and the node sequence number is the sequence number of the running node executing the problematic service.

[0008] Locate the running node based on the service identifier and node sequence number.

[0009] Optionally, the service invocation message is generated through the following steps:

[0010] In response to the message generation instruction, the first machine code is obtained, and a service log number is generated based on the first machine code. A service call message is then generated based on the service log number.

[0011] Obtaining the first machine code from the service call message may include:

[0012] Obtain the service log number from the service call message, and determine the first machine code based on the service log number.

[0013] Based on this, optionally, before responding to the message generation instruction, the above problem localization method may further include:

[0014] When initializing and executing the problem service on the running node, obtain the service identifier and the node identifier of the running node, and obtain the node sequence number from the node identifier;

[0015] The service identifier and node sequence number are concatenated to generate the first machine code.

[0016] Based on this, optionally, obtaining the node sequence number from the node identifier may include:

[0017] When the running node includes servers in an application server cluster, a preset number of node characters at the end of the node identifier will be used as the node sequence number; and / or,

[0018] When the running node includes a running instance in a Platform as a Service (PaaS) cloud environment, the last node character in the node identifier is used as the node sequence number.

[0019] Optionally, the running nodes are selected from the candidate nodes, which are nodes that can be used to execute the problem service. The configuration result of the candidate sequence number of each candidate node is as follows:

[0020] When each candidate node is a server in an application server cluster, the candidate sequence number of each candidate node is a non-repeating sequence number starting from a preset value; and / or,

[0021] When each candidate node is a running instance in a Platform as a Service (PaaS) cloud environment, the candidate number of each candidate node is an incremented number starting from 0.

[0022] Optionally, retrieve the service invocation message sent to the service caller:

[0023] Obtain a panoramic view, which includes the second machine code of each associated service executed sequentially for the execution of the called service. The called service and the problem service belong to each associated service. The second machine code includes the association identifier of the associated service and the association sequence number of the associated node executing the associated service.

[0024] Obtain the service call message sent to the service caller based on the panoramic view;

[0025] Obtain the first machine code from the service call message, including:

[0026] Each second machine code in the service call message is checked, and the first machine code is obtained from each second machine code based on the check results.

[0027] Optionally, when the called service is deployed through an application server cluster, the running node may include a server in the application server cluster; and / or, when the called service is deployed through a Platform as a Service (PaaS) cloud environment, the running node may include a running instance in the PaaS cloud environment.

[0028] Secondly, embodiments of the present invention also provide a problem localization device, which may include:

[0029] The service call message acquisition module is used to acquire the service call message sent to the service caller in response to the problem location instruction. The service call message includes the message generated when the service caller calls the called service.

[0030] The node sequence number determination module is used to obtain the first machine code from the service call message and determine the service identifier and node sequence number based on the first machine code. The service identifier is the identifier of the problematic service that encountered a problem in executing the called service, and the node sequence number is the sequence number of the running node executing the problematic service.

[0031] The running node location module is used to locate the running node based on the service identifier and node sequence number.

[0032] Thirdly, embodiments of the present invention also provide a problem location device, which may include:

[0033] One or more processors;

[0034] Memory, used to store one or more programs;

[0035] When one or more programs are executed by one or more processors, the one or more processors implement the problem localization method provided in any embodiment of the present invention.

[0036] Fourthly, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the problem localization method provided in any embodiment of the present invention.

[0037] The technical solution of this invention, in response to a problem location instruction, obtains a service call message sent to the service caller. This service call message can be a message generated when the service caller calls the called service. Since the service call message includes a first machine code that identifies the running node where the problematic service that caused the problem in executing the called service resides, the first machine code can be obtained from the service call message. Then, the service identifier and node sequence number are determined based on the obtained first machine code. Here, the service identifier can be the identifier of the problematic service, and the node sequence number can be the sequence number of the running node. In this way, the running node can be directly located based on the service identifier and node sequence number. The above technical solution, when locating the running node where the service provider is causing a problem in providing services, eliminates the need to check each service node under the service provider one by one. The running node can be directly located based on the first machine code in the service call message generated by this service call, thereby achieving rapid location of the running node, i.e., rapid problem location. This effect is particularly significant in large clusters and / or PaaS cloud environments. Attached Figure Description

[0038] Figure 1 This is a flowchart of a problem localization method according to Embodiment 1 of the present invention;

[0039] Figure 2 This is a flowchart of a problem localization method according to Embodiment 2 of the present invention;

[0040] Figure 3 This is a flowchart of a problem localization method according to Embodiment 3 of the present invention;

[0041] Figure 4 This is a structural block diagram of a problem location device according to Embodiment 4 of the present invention;

[0042] Figure 5 This is a schematic diagram of the structure of a problem location device according to Embodiment 5 of the present invention. Detailed Implementation

[0043] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.

[0044] Example 1

[0045] Figure 1This is a flowchart of a problem localization method provided in Embodiment 1 of the present invention. This embodiment is applicable to quickly locating the runtime node where a service provider is experiencing problems while providing services, and is particularly suitable for quickly locating the runtime node where a service provider is experiencing problems while providing services based on the machine code in the service call message. This method can be executed by the problem localization device provided in this embodiment of the present invention. The device can be implemented by software and / or hardware, and can be integrated into a problem localization equipment, which can be various user terminals or servers.

[0046] See Figure 1 The method of this invention specifically includes the following steps:

[0047] S110. In response to the problem location instruction, obtain the service call message sent to the service caller, wherein the service call message is the message generated when the service caller calls the called service.

[0048] The problem location instruction can be triggered when a service caller encounters an exception while invoking the called service. It's used to locate the running node where the service provider encountered a problem while providing the called service. The called service can be one of the various services provided by the service provider, and the running node can be the service node that actually executes the problematic service in this call, the one that encountered the problem while performing (i.e., providing) the called service. The problematic service and the called service can be the same or different services; no specific limitation is made here. Different services are suitable when the execution of the called service requires the cooperation of other services. It should be noted that the called service mentioned above can be understood as the called application. This called application can be an application or a microservice application, which can contain at least one sub-service. Each sub-service can be deployed on different service nodes, and the content executed by the sub-services deployed on different service nodes is the same. The situation is similar for the problematic service. Therefore, the running node can be understood as the service node where the sub-service executed in this call for implementing the problematic application resides, among the sub-services contained under the problematic service (which can also be called the problematic application). When a problem service contains at least two sub-services, the problem service can also be called the problem service provider; the situation of the called service is similar, and will not be elaborated here.

[0049] The system responds to problem location commands by obtaining a service call message generated by the service provider and sent to the service caller. This service call message can be generated when the service caller invokes the called service. In practice, optionally, the party where the problem location device is located can be the service provider; alternatively, the service call message can also be called a service response message, corresponding to the service request message.

[0050] S120. Obtain the first machine code from the service call message, and determine the service identifier and node sequence number based on the first machine code. The service identifier is the identifier of the problematic service that caused the problem in executing the called service, and the node sequence number is the sequence number of the running node executing the problematic service.

[0051] The first machine code can be a machine code used to uniquely identify the running node. When generating a service call message, the service provider can embed the first machine code in the service call message so that the running node can be located in a timely manner when a problem occurs during the service call. Therefore, after obtaining the service call message, the first machine code can be obtained from it, and then the service identifier and node sequence number can be determined based on the first machine code. The service identifier can be the identifier of the problematic service; the node sequence number can be the sequence number of the running node executing the problematic service. In practical applications, optionally, there can be multiple service nodes that can be used to execute the problematic service. These service nodes that can be used to execute the problematic service are called candidate nodes, and the running node can be the candidate node among the candidate nodes for executing the problematic service in this instance.

[0052] Considering the application scenarios that may be involved in the embodiments of the present invention, optionally, when the called service is deployed through an application server cluster, the running node may include a server in the application server cluster. This application server may be WAS (WebSphere Applications Services), Tomcat, WebLogic, etc., without specific limitations. It should be noted that, for the sake of visualization, the following description of application server clusters uses a WAS cluster as an example, but this is only an example of an application server cluster and not a specific limitation. Alternatively, when the called service is deployed through a Platform as a Service (PaaS) cloud environment, the running node may include a running instance (POD) in the PaaS cloud environment. In the PaaS cloud environment, a container image (i.e., creating an image of the program and runtime environment) is constructed in memory. At runtime, multiple copies of the image can be pulled out, which is equivalent to pulling out multiple running instances based on the image. Each running instance is a POD.

[0053] S130. Locate the running node based on the service identifier and node sequence number.

[0054] In this process, some service nodes under the service provider can execute the problematic service, while others cannot. Furthermore, there exists at least one service node (i.e., a candidate node) that can be used to execute the problematic service. Therefore, checking each of these service nodes one by one to locate the running node for the current problematic service would be extremely time-consuming. In contrast, since the combination of the service identifier and the node sequence number can uniquely identify the running node, the running node can be directly located based on these two factors. This achieves the effect of rapid node location, i.e., rapid problem location.

[0055] The technical solution of this invention, in response to a problem location instruction, obtains a service call message sent to the service caller. This service call message can be a message generated when the service caller calls the called service. Since the service call message includes a first machine code that identifies the running node where the problematic service that caused the problem in executing the called service resides, the first machine code can be obtained from the service call message. Then, the service identifier and node sequence number are determined based on the obtained first machine code. Here, the service identifier can be the identifier of the problematic service, and the node sequence number can be the sequence number of the running node. In this way, the running node can be directly located based on the service identifier and node sequence number. The above technical solution, when locating the running node where the service provider is causing a problem in providing services, eliminates the need to check each service node under the service provider one by one. The running node can be directly located based on the first machine code in the service call message generated by this service call, thereby achieving rapid location of the running node, i.e., rapid problem location. This effect is particularly significant in large clusters and / or PaaS cloud environments.

[0056] An optional technical solution involves running nodes sourced from candidate nodes, including nodes capable of executing problem services. The candidate node sequence numbers are configured as follows: when each candidate node is a server in an application server cluster, the candidate node sequence number is a non-repeating sequence number starting from a preset value; and / or, when each candidate node is a running instance in a platform-as-a-service cloud environment, the candidate node sequence number is a sequentially incrementing sequence number starting from 0. Here, a candidate node can be a service node capable of executing problem services, and the running node can be one or more of the candidate nodes; furthermore, the candidate sequence number is the sequence number of the candidate node, and the node sequence number can be one or more of the candidate sequence numbers. The candidate sequence numbers are configured to be regular and non-repeating, so that each candidate node can be uniquely identified based on these candidate sequence numbers. Considering the application scenarios that may be involved in the embodiments of the present invention, the configuration results of each candidate sequence number can be as follows: When the candidate node is a server in a WAS cluster, each candidate sequence number can include a non-repeating sequence number starting from a preset value, such as 100, 110, 120, and 130 starting from 100. In particular, when the called service can be deployed under different WAS clusters, each candidate sequence number in each WAS cluster can start from a different preset value. For example, taking two WAS clusters as an example, each candidate sequence number under one WAS cluster can start from 100, while each candidate sequence number under another WAS cluster can start from 500. When each candidate node is a POD in a PaaS cloud environment, a StatefulSet deployment mode can be adopted, and each candidate sequence number can be a sequentially accumulated sequence number starting from 0, such as 0, 1, 2, and 3, etc. This can ensure the regularity (i.e., all starting from 0) and continuity of the candidate sequence numbers of each POD. The above technical solution can effectively ensure the regularity and non-repetition of the configured candidate numbers, and can also ensure continuity in the PaaS cloud environment.

[0057] Another optional technical solution, obtaining the service call message sent to the service caller, may include: obtaining a panoramic view, which includes the second machine codes of each associated service executed sequentially for the execution of the called service, wherein the called service and the problem service belong to each associated service, and the second machine code includes the association identifier of the associated service and the association sequence number of the associated node executing the associated service; obtaining the service call message sent to the service caller based on the panoramic view; and obtaining the first machine code from the service call message, which may include: checking each second machine code in the service call message respectively, and obtaining the first machine code from each second machine code based on the checking results.

[0058] As mentioned above, the execution of the called service may require the cooperation of other services. That is, the called service is considered to have executed successfully only when all other services and the called service have executed effectively. For example, when a service provider receives a service call request for a called service from a service caller, since the called service can only execute after the first service has executed successfully, and the first service can only execute after the second service has executed successfully, the service provider can execute the second service first, then execute the first service after the second service has executed successfully, and finally execute the called service after the first service has executed successfully. During this execution process, each associated service (such as the second service, the first service, and the called service executed sequentially in the example above) generates a corresponding service call message after execution. Furthermore, a panoramic view is generated after all associated services have executed. This panoramic view can include all the service call messages generated during this call, and these service call messages can be obtained from the panoramic view. These service call messages can reflect the second machine codes chained together according to the execution order. Furthermore, these second machine codes can be investigated separately to find the first machine code corresponding to the problematic service. In this way, the first machine code can be quickly obtained through a panoramic view of service execution.

[0059] Example 2

[0060] Figure 2 This is a flowchart of a problem localization method provided in Embodiment 2 of the present invention. This embodiment is based on and optimized from the above-mentioned technical solutions. In this embodiment, optionally, the service call message is generated through the following steps: in response to the message generation instruction, a first machine code is obtained, a service log number is generated based on the first machine code, and a service call message is generated based on the service log number; obtaining the first machine code from the service call message may include: obtaining the service log number from the service call message, and determining the first machine code based on the service log number. The explanations of terms that are the same as or corresponding to those in the above embodiments are not repeated.

[0061] See Figure 2 The method in this embodiment may specifically include the following steps:

[0062] S210. In response to the message generation instruction, obtain the first machine code, generate a service log number based on the first machine code, and generate a service call message based on the service log number. The message generation instruction is an instruction triggered when the service caller calls the called service.

[0063] The message generation instruction can be an instruction triggered when a service caller invokes a called service, used to generate a service call message. In response to this instruction, a first machine code is obtained, and then a service log number is generated based on the first machine code. This service log number can be understood as a unique identifier for the called service in this call. Subsequently, a service call message is generated based on the service log number.

[0064] S220. In response to the problem location instruction, obtain the service call message sent to the service caller.

[0065] S230. Obtain the service log number from the service call message, and determine the first machine code based on the service log number.

[0066] Since the service call message is generated based on the service log number, and the service log number is generated based on the first machine code, the service log number can be obtained from the service call message, and the first machine code can be determined based on the service log number.

[0067] S240. Determine the service identifier and node sequence number based on the first machine code, and locate the running node based on the service identifier and node sequence number. Here, the service identifier is the identifier of the problematic service that caused the problem in executing the called service, and the node sequence number is the sequence number of the running node executing the problematic service.

[0068] The technical solution of this invention uses a service log number generated based on a first machine code as part of a service call message. This service log number can uniquely identify the called service in this call. Therefore, the first machine code can be directly obtained from the service log number obtained from the service call message, thereby achieving the effect of fast and accurate determination of the first machine code.

[0069] An optional technical solution, before responding to the message generation command, further includes the following steps in the problem localization method: When initializing (i.e., starting) the problem service on the running node, obtaining the service identifier and the node identifier of the running node, and obtaining the node sequence number from the node identifier; concatenating the service identifier and the node sequence number to generate a first machine code. Specifically, when initializing (i.e., starting) the problem service on the running node, the service identifier and the node identifier of the running node can be obtained. This node identifier can also be called the node name, which is the result of identifying the running node, such as the POD name, server name, etc. Since the node identifier includes the node sequence number, the node sequence number can be obtained from the node identifier, and the service identifier and the node sequence number can be concatenated to generate the first machine code, thereby achieving the effect of rapid generation of the first machine code. For example, assuming the service identifier is A and the node identifier is server110, where 110 is the identifier sequence number, then the first machine code can be A110; as another example, assuming the service identifier is B and the node identifier is POD-0, where 0 is the identifier sequence number, then the first machine code can be B000. This is an example of the first machine code requiring a 3-digit identifier sequence number, with 0s added if necessary.

[0070] Optionally, obtaining the node sequence number from the node identifier can include: when the running node is a server in an application server cluster, using a preset number of node characters at the end of the node identifier as the node sequence number; and / or, when the running node is a running instance in a Platform as a Service (PaaS) cloud environment, using the last node character in the node identifier as the node sequence number. Specifically, when the running node is a server, the last preset number of node characters in the node identifier can be used as the node sequence number. For example, if the preset number is 3, assuming the node identifier is server110 and the last three digits are 110, then 110 can be used as the identifier sequence number. When the running node is a POD, the last node character can be used as the node sequence number. For example, assuming the node identifier is POD-0 and the last node character is 0, when the node sequence number requires 3 digits, the zeros can be padded with 000 to form the node symbol. The above technical solution can accurately determine the node symbol in various operating environments.

[0071] Example 3

[0072] Figure 3 This is a flowchart of a problem localization method provided in Embodiment 3 of the present invention. This embodiment is an optimization based on the technical solutions in Embodiment 2 above. The explanations of terms that are the same as or corresponding to those in the above embodiments will not be repeated here.

[0073] See Figure 3 The method in this embodiment may specifically include the following steps:

[0074] S310. Divide the callable services under the service provider, and for each callable service, configure the first identifier of the callable service and the second identifier of the service node on which the callable service is deployed.

[0075] In this context, the callable service can be a service obtained by dividing the service provider into callable services. Considering the application scenarios that may be involved in the embodiments of this invention, the service can also be called an application. Taking the term "application" as an example, the service provider (i.e., the application system) is divided according to the application granularity to obtain various callable applications (application granularities). For example, in a PaaS cloud environment, each microservice application can be divided into one application granularity; similarly, in a WAS cluster, each cluster can be divided into one application granularity, or at least two clusters can be divided into one application granularity, meaning that the same application granularity can be deployed in at least one cluster. Thus, an application system is split into multiple application granularities, each application granularity is deployed separately, and each is configured with its own first identifier, which is similar to the service identifier of the called service.

[0076] For service nodes deploying callable services, a second identifier is configured for each service node, similar to the node identifier of a running node. For example, when a callable service is deployed in a PaaS cloud environment, the StatefulSet deployment mode can be used. This ensures that the identifier sequence number in the second identifier of each service node executing the callable service is a sequentially incrementing number starting from 0, effectively guaranteeing the regularity and continuity of each identifier sequence number. In other words, the node sequence number of each service node corresponding to each callable service starts from 0, so each callable service can be distinguished by its first identifier. As another example, when a callable service is deployed under a WAS cluster, the name of the server under the WAS cluster (i.e., the second sequence number) can be directly specified, with the last 3-4 digits being a regular and non-repeating identifier sequence number.

[0077] S320. For each service node, when initializing the callable service executed on the service node, obtain the identifier sequence number in the second identifier of the service node and the first identifier of the callable service executed on the service node, concatenate the first identifier and the identifier sequence number, and generate the third machine code.

[0078] Specifically, the following operation is performed on each service node: when initializing the callable service on the service node, the identifier sequence number in the second identifier of the service node and the first identifier of the callable service executed on the service node are obtained. Then, the first identifier and the identifier sequence number are concatenated to obtain the third machine code, which is similar to the first machine code corresponding to the running node executing the problematic service.

[0079] S330. In response to the message generation instruction, obtain the fourth machine code from each third machine code, generate a service log number based on the fourth machine code, and generate a service call message based on the service log number. This message generation instruction is triggered when the service caller calls the called service among the callable services.

[0080] In response to the message generation instruction, based on the service node currently executing the called service, a matching fourth machine code is obtained from each third machine code, that is, the third machine code that matches the called service and the service node executing the called service. Then, the service log number generated based on the fourth machine code is returned to the service caller as part of the service call message.

[0081] S340. In response to the problem location instruction, obtain the service call message sent to the service caller, obtain the service log number from the service call message, determine the fourth machine code based on the service log number, and use the fourth machine code as the first machine code.

[0082] If a problem occurs during the execution of the called service, the called service is treated as the problematic service. The service log number is obtained from the service call message, and the fourth machine code is determined based on the service log number. The fourth machine code is then used as the first machine code, because the first machine code is the machine code corresponding to the problematic service and the running node executing the problematic service.

[0083] S350. Determine the service identifier and node sequence number based on the first machine code, and locate the running node based on the service identifier and node sequence number. Here, the service identifier is the identifier of the called service that is the problem service, and the node sequence number is the sequence number of the running node that executes the problem service.

[0084] The technical solution of this invention, through the pre-complete division of each callable service, the configuration of its identifier, and the generation of third machine codes corresponding to the callable services running on each service node during service initialization, can quickly locate the running node of the problematic service based on the corresponding third machine code (i.e., the first machine code) when a service call encounters a problem, thus achieving the effect of rapid problem location.

[0085] It should be noted that the callable service, called service, and associated service described in the above embodiments are all essentially services. These names are used to distinguish services in different situations and are not intended to limit their actual content. Similarly, the service node, running node, candidate node, and associated node described in the above embodiments are all nodes. The service identifier, association identifier, and first identifier are all service-specific identifiers. The node identifier and second identifier are all node-specific identifiers. The node sequence number, candidate sequence number, association sequence number, and identifier sequence number are all node-specific sequence numbers. The first machine code, second machine code, third machine code, and fourth machine code are all machine codes generated based on the sequence number and the service-specific identifier. These names are merely used to distinguish different situations and are not intended to limit their actual content.

[0086] Example 4

[0087] Figure 4 This is a structural block diagram of a problem localization device provided in Embodiment 4 of the present invention. This device is used to execute the problem localization method provided in any of the above embodiments. This device and the problem localization methods of the above embodiments belong to the same inventive concept. Details not described in detail in the embodiments of the problem localization device can be found in the embodiments of the above problem localization methods. See also... Figure 4 The device may specifically include: a service call message acquisition module 410, a node sequence number determination module 420, and a running node location module 430.

[0088] The service call message acquisition module 410 is used to acquire the service call message sent to the service caller in response to the problem location instruction. The service call message is a message generated when the service caller calls the called service.

[0089] The node sequence number determination module 420 is used to obtain the first machine code from the service call message and determine the service identifier and node sequence number based on the first machine code. The service identifier is the identifier of the problematic service that caused the problem in executing the called service, and the node sequence number is the sequence number of the running node executing the problematic service.

[0090] The running node positioning module 430 is used to locate the running node based on the service identifier and node sequence number.

[0091] Optionally, the service call message is generated through the following modules:

[0092] The service call message generation module is used to respond to the message generation instruction, obtain the first machine code, generate a service log number based on the first machine code, and generate a service call message based on the service log number.

[0093] The node sequence number determination module 420 may include:

[0094] The first machine code determination unit is used to obtain the service log number from the service call message and determine the first machine code based on the service log number.

[0095] Optionally, based on the above-described apparatus, the apparatus may further include:

[0096] The node sequence number acquisition module is used to obtain the service identifier and the node identifier of the running node when initializing and executing the problem service on the running node, and to obtain the node sequence number from the node identifier;

[0097] The first machine code generation module is used to concatenate the service identifier and the node sequence number to generate the first machine code.

[0098] Based on this, the optional node sequence number acquisition module may include:

[0099] The first node sequence number acquisition unit is used to, when the running node includes servers in the application server cluster, use a preset number of node characters at the end of the node identifier as the node sequence number; and / or,

[0100] The second node sequence number acquisition unit is used to take the last node character in the node identifier as the node sequence number when the running node includes a running instance in the platform as a service cloud environment.

[0101] Optionally, the running nodes are selected from the candidate nodes, which are nodes that can be used to execute the problem service. The configuration result of the candidate sequence number of each candidate node is as follows:

[0102] When each candidate node is a server in an application server cluster, the candidate sequence number of each candidate node is a non-repeating sequence number starting from a preset value; and / or,

[0103] When each candidate node is a running instance in a Platform as a Service (PaaS) cloud environment, the candidate number of each candidate node is an incremented number starting from 0.

[0104] Optionally, service call messages can be generated using the following modules:

[0105] The panoramic view acquisition module is used to acquire a panoramic view in response to the second message generation instruction. The panoramic view includes the second machine code of each associated service that is executed sequentially for the execution of the called service. The called service and the problem service belong to each associated service. The second machine code includes the association identifier of the associated service and the association sequence number of the associated node executing the associated service.

[0106] The second service call message generation module is used to generate service call messages based on the panoramic view.

[0107] The node sequence number determination module 420 may include:

[0108] The first machine code obtaining unit is used to check each second machine code in the service call message and obtain the first machine code from each second machine code based on the check results.

[0109] Optionally, when the invoked service is deployed through an application server cluster, the running node includes servers in the application server cluster; and / or, when the invoked service is deployed through a Platform as a Service (PaaS) cloud environment, the running node may include running instances in the PaaS cloud environment.

[0110] The problem location device provided in Embodiment 4 of this invention, in response to a problem location instruction, obtains a service call message sent to the service caller through a service call message acquisition module. This service call message can be a message generated when the service caller calls the called service. Since the service call message includes a first machine code identifying the running node where the problematic service is located, the node sequence number determination module can obtain the first machine code from the service call message and determine the service identifier and node sequence number based on the obtained first machine code. The service identifier can be the identifier of the problematic service, and the node sequence number can be the sequence number of the running node. Thus, the running node can be directly located by the running node location module based on the service identifier and node sequence number. This device, when locating the running node where the service provider is providing services and a problem occurs, does not require checking each service node under the service provider one by one. It can directly locate the running node based on the first machine code in the service call message generated by this service call, thereby achieving rapid location of the running node, i.e., rapid problem location. This effect is particularly significant in large clusters and / or PaaS cloud environments.

[0111] The problem localization device provided in the embodiments of the present invention can execute the problem localization method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method execution.

[0112] It is worth noting that in the embodiments of the above-mentioned problem location device, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of the present invention.

[0113] Example 5

[0114] Figure 5 This is a schematic diagram of a problem location device provided in Embodiment 5 of the present invention. See also... Figure 5The device includes a memory 510, a processor 520, an input device 530, and an output device 540. The number of processors 520 in the device can be one or more. Figure 5 Taking a processor 520 as an example; the memory 510, processor 520, input device 530, and output device 540 in the device can be connected via a bus or other means. Figure 5 Taking the connection via bus 550 as an example.

[0115] The memory 510, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the problem localization method in this embodiment of the invention (e.g., the service call message acquisition module 410, the node sequence number determination module 420, and the running node localization module 430 in the problem localization device). The processor 520 executes various functional applications and data processing of the device by running the software programs, instructions, and modules stored in the memory 510, thereby implementing the aforementioned problem localization method.

[0116] The memory 510 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on device usage. Furthermore, the memory 510 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 510 may further include memory remotely located relative to the processor 520, which can be connected to the device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0117] Input device 530 can be used to receive input digital or character information, and to generate key signal inputs related to user settings and function control of the device. Output device 540 may include display devices such as a display screen.

[0118] Example 6

[0119] Embodiment 6 of the present invention provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform a problem localization method, the method comprising:

[0120] In response to a problem location command, retrieve the service call message sent to the service caller, where the service call message is the message generated when the service caller calls the called service;

[0121] Obtain the first machine code from the service call message, and determine the service identifier and node sequence number based on the first machine code. The service identifier is the identifier of the problematic service that caused the problem in executing the called service, and the node sequence number is the sequence number of the running node executing the problematic service.

[0122] Locate the running node based on the service identifier and node sequence number.

[0123] Of course, the computer-executable instructions provided in the embodiments of the present invention are not limited to the method operations described above, but can also perform related operations in the problem localization method provided in any embodiment of the present invention.

[0124] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. According to this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0125] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A method of problem localization, the method comprising: The method comprises the following steps: In response to a problem positioning instruction, a service call message sent to a service caller is obtained, wherein the service call message is a message generated when the service caller calls a called service; A first machine code is obtained from the service call message, and a service identifier and a node sequence number are determined according to the first machine code, wherein the service identifier is an identifier of a problem service that has a problem in executing the called service, the node sequence number is a sequence number of a running node that executes the problem service, and the first machine code is a machine code used to uniquely identify the running node; According to the service identifier and the node sequence number, the running node is located; The service call message is generated by the following steps: In response to a message generation instruction, the first machine code is obtained, and a service log number is generated according to the first machine code, and the service call message is generated according to the service log number; The first machine code is obtained from the service call message, comprising: The service log number is obtained from the service call message, and the first machine code is determined according to the service log number; Before the response to the message generation instruction, it further comprises: When the problem service executing on the running node is initialized, the service identifier and the node identifier of the running node are obtained, and the node sequence number is obtained from the node identifier; The service identifier and the node sequence number are spliced to generate the first machine code.

2. The method of claim 1, wherein, The node sequence number is obtained from the node identifier, comprising: When the running node is a server in an application server cluster, the last preset number of node characters in the node identifier is taken as the node sequence number; and / or, When the running node is a running instance in a platform as a service cloud environment, the last node character in the node identifier is taken as the node sequence number.

3. The method of claim 1, wherein, The running node is from each candidate node, and the candidate node is a node that can be used to execute the problem service, and the configuration result of the candidate sequence number of each candidate node is as follows: When the candidate nodes are servers in an application server cluster, the candidate sequence numbers of the candidate nodes are non-repeating sequence numbers starting from a preset value; and / or, When the candidate nodes are running instances in a platform as a service cloud environment, the candidate sequence numbers of the candidate nodes are sequentially accumulated sequence numbers starting from 0.

4. The method of claim 1, wherein, The service call message sent to the service caller is obtained: A panoramic view is obtained, wherein the panoramic view comprises second machine codes of each associated service executed in sequence for executing the called service, the called service and the problem service belong to the associated services, and the second machine code comprises an associated identifier of the associated service and an associated sequence number of an associated node executing the associated service; The service call message sent to the service caller is obtained according to the panoramic view; The first machine code is obtained from the service call message, comprising: Each second machine code in the service call message is respectively investigated, and the first machine code is obtained from each second machine code according to the investigation result.

5. The method of claim 1, wherein, When the invoked service is deployed through an application server cluster, the running node is a server in the application server cluster; and / or when the invoked service is deployed through a platform as a service cloud environment, the running node is a running instance in the platform as a service cloud environment.

6. A problem locating apparatus characterized by comprising: Comprising: a service call message obtaining module, configured to obtain a service call message sent to a service caller in response to a problem positioning instruction, wherein the service call message is a message generated when the service caller invokes an invoked service; a node sequence number determining module, configured to obtain a first machine code from the service call message, and determine a service identity and a node sequence number according to the first machine code, wherein the service identity is an identity of a problem service in which a problem occurs during execution of the invoked service, the node sequence number is a sequence number of a running node that executes the problem service, and the first machine code is a machine code used to uniquely identify a running node; a running node positioning module, configured to locate the running node according to the service identity and the node sequence number; wherein the service call message is generated by the following module: a service call message generating module, configured to obtain the first machine code in response to a message generating instruction, generate a service log number according to the first machine code, and generate the service call message according to the service log number; the node sequence number determining module comprises: a first machine code determining unit, configured to obtain the service log number from the service call message, and determine a first machine code according to the service log number; the apparatus further comprises: a node sequence number obtaining module, configured to obtain the service identity and a node identity of the running node when initializing execution of the problem service on the running node, and obtain the node sequence number from the node identity; a first machine code generating module, configured to splice the service identity and the node sequence number to generate the first machine code.

7. A problem locating device characterized by Comprising: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the problem positioning method according to any one of claims 1-5.

8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by a processor to implement the problem positioning method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Fault positioning and analyzing method of trading system and relevant servers

    CN107992415A