CN116455794A - Micro service node debugging method, device, equipment and storage medium - Google Patents

Micro service node debugging method, device, equipment and storage medium Download PDF

Info

Publication number
CN116455794A
CN116455794A CN202310071826.6A CN202310071826A CN116455794A CN 116455794 A CN116455794 A CN 116455794A CN 202310071826 A CN202310071826 A CN 202310071826A CN 116455794 A CN116455794 A CN 116455794A
Authority
CN
China
Prior art keywords
node
information
micro
debugging
service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310071826.6A
Other languages
Chinese (zh)
Inventor
胡文涛
罗剑平
陈鹏翼
邹大卫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202310071826.6A priority Critical patent/CN116455794A/en
Publication of CN116455794A publication Critical patent/CN116455794A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Environmental & Geological Engineering (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The disclosure provides a method, a device, equipment and a storage medium for debugging a micro service node, which can be applied to the technical field of micro service and the technical field of finance. The method comprises the following steps: responding to the detection of micro-service error information of a first node in a test environment, and acquiring identification information of a second node, identification information of the first node and debugging information of the first node, wherein the second node represents a micro-service node for triggering the first node to generate the micro-service error information; inquiring to obtain node address information of a second node from a routing association spectrogram of the micro service according to the identification information of the first node and the identification information of the second node, wherein the routing association spectrogram of the micro service is constructed according to micro service calling relations among different nodes; acquiring debugging information of the second node from a tracking stack of the second node based on the node address information; and executing debugging operation on the first node based on the debugging information of the first node and the debugging information of the second node.

Description

Micro service node debugging method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of micro-service technology and the field of financial technology, and in particular, to a method, an apparatus, a device, a medium, and a program product for debugging a micro-service node.
Background
In the related art, the distributed transaction tracking of the full link depends on the chain tracking stack which is commonly generated based on different subsystems, and currently, all tracking stack information is generally collected in full quantity and then processed and processed.
In the process of realizing the inventive concept, the inventor finds that under the condition that a certain micro service reports errors, the micro service needs to be debugged and debugged by calling full-link information, and the efficiency is low.
Disclosure of Invention
In view of the foregoing, the present disclosure provides a method, apparatus, device, medium, and program product for debugging a micro service node.
According to a first aspect of the present disclosure, there is provided a method for debugging a micro service node, including: responding to the detection of micro-service error information of a first node in a test environment, and acquiring identification information of a second node, the identification information of the first node and debugging information of the first node, wherein the second node represents a micro-service node for triggering the first node to generate the micro-service error information; inquiring node address information of the second node from a routing correlation spectrogram of the micro service according to the identification information of the first node and the identification information of the second node, wherein the routing correlation spectrogram of the micro service is constructed according to micro service calling relations among different nodes; acquiring debugging information of the second node from a tracking stack of the second node based on the node address information; and executing a debugging operation on the first node based on the debugging information of the first node and the debugging information of the second node.
According to an embodiment of the present disclosure, the routing correlation spectrogram of the micro service includes I nodes, I is a positive integer, and the querying, from the routing correlation spectrogram of the micro service, the node address information of the second node according to the identification information of the first node and the identification information of the second node includes: aiming at the ith node, obtaining routing distance information between the first node and the ith node according to the identification information of the first node and the identification information of the ith node, wherein I is more than or equal to 1 and less than or equal to I, and I is a positive integer; inquiring and obtaining target level information from a route correlation spectrogram of the micro service according to the route distance information; under the condition that the routing distance information is determined to be larger than the distance information between the last node and the first node in the target level information, according to the target level information, a target node which is farthest from the first node on a target level is inquired from a routing correlation spectrogram of the micro service; returning to perform an operation of determining routing distance information between the target node and the first node based on the target node, and incrementing i; and inquiring node address information of the second node from a route correlation spectrogram of the micro service according to the target level information under the condition that the route distance information is smaller than the distance information between the last node and the first node in the target level information.
According to an embodiment of the disclosure, a route correlation spectrogram of a micro service includes M layer nodes, M is a positive integer, and the obtaining, according to the route distance information, target level information from the route correlation spectrogram of the micro service includes: aiming at the M-th layer node, obtaining the distance range between the M-th layer node and the first node according to the level information of the M-th layer node, wherein M is more than or equal to 1 and less than or equal to M, and M is a positive integer; returning to perform an operation of determining the distance range information and incrementing m in the case where it is determined that the routing distance information exceeds the distance range; and obtaining the target level information when the routing distance information is determined to be within the distance range.
According to an embodiment of the present disclosure, the obtaining, based on the node address information, debug information of the second node from a trace stack of the second node includes: inquiring and obtaining a tracking stack of the second node according to the node address information; and obtaining the debugging information of the second node from the tracking stack of the second node based on the user datagram protocol.
According to an embodiment of the present disclosure, the performing, on the first node, a debug operation based on the debug information of the first node and the debug information of the second node includes: splicing the debugging information of the first node and the debugging information of the second node to obtain target debugging information; and executing debugging operation on the first node based on the target debugging information.
According to an embodiment of the disclosure, the performing a stitching process on the debug information of the first node and the debug information of the second node to obtain target debug information includes: screening the first debugging information from the debugging information of the first node based on a screening strategy, and screening the second debugging information from the debugging information of the second node; and performing splicing processing on the first debugging information and the second debugging information to obtain the target debugging information.
According to an embodiment of the present disclosure, the method for constructing a route correlation spectrogram of the micro service includes: acquiring node quantity information, node calling relation information and node address information; constructing a micro-service call topology structure diagram according to the call relation; processing the micro-service call topology structure diagram by using a target algorithm to obtain a linear sequence of the micro-service call relationship; binary coding is carried out on the nodes according to the linear sequence of the micro-service call relationship and the node quantity information, so that node level information is obtained; and constructing a route correlation spectrogram of the micro service according to the node level information and the node address information, wherein the route correlation spectrogram of the micro service comprises a plurality of levels, node address information of a plurality of target nodes is stored in nodes on each level, and the level distances between the plurality of target nodes and the nodes are determined according to the level information of the nodes in the route correlation spectrogram of the micro service.
A second aspect of the present disclosure provides a commissioning device of a micro service node, including: the first acquisition module is used for responding to the detection of the micro-service error information of the first node in the test environment and acquiring the identification information of the second node, the identification information of the first node and the debugging information of the first node, wherein the second node represents the micro-service node for triggering the first node to generate the micro-service error information; the query module is used for querying and obtaining node address information of the second node from a routing correlation spectrogram of the micro service according to the identification information of the first node and the identification information of the second node, wherein the routing correlation spectrogram of the micro service is constructed according to micro service calling relations among different nodes; the second acquisition module is used for acquiring the debugging information of the second node from the tracking stack of the second node based on the node address information; and an execution module for executing a debugging operation on the first node based on the debugging information of the first node and the debugging information of the second node.
A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method described above.
A fourth aspect of the present disclosure also provides a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the above-described method.
A fifth aspect of the present disclosure also provides a computer program product comprising a computer program which, when executed by a processor, implements the above method.
According to the method, the device, the equipment, the medium and the program product for debugging the micro-service node, under the condition that the micro-service error information of a certain node in a test environment is detected, the identification of other nodes causing the node to report errors and the debugging information of the node are obtained, then according to the node identification, the node address information of the other nodes causing the node to report errors is obtained from the routing association spectrogram query of the micro-service, then according to the node address information, the corresponding debugging information is obtained from the tracking stack, and then according to the debugging information of two nodes, the debugging is carried out on the node reporting errors, and as the debugging information of the node related to the error information is only called to debug the node reporting errors, the debugging and debugging of all link information in the micro-service are avoided, and the debugging efficiency of the node reporting errors is improved.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be more apparent from the following description of embodiments of the disclosure with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates an application scenario diagram of a method of commissioning of a micro service node according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a method of commissioning of a micro service node according to an embodiment of the present disclosure;
FIG. 3 schematically illustrates a schematic diagram of a micro service invocation topology structure according to an embodiment of the disclosure;
FIG. 4 schematically illustrates a schematic diagram of a micro service invocation relationship linear sequence, in accordance with an embodiment of the disclosure;
FIG. 5 schematically illustrates a schematic diagram of a micro service node structure according to an embodiment of the present disclosure;
FIG. 6 schematically illustrates a flow chart of a method of querying node address information in accordance with an embodiment of the present disclosure;
fig. 7 schematically illustrates a schematic diagram of a route correlation spectrogram according to an embodiment of the present disclosure;
fig. 8 schematically illustrates a schematic diagram of an example of routing information according to an embodiment of the present disclosure;
FIG. 9 schematically illustrates a block diagram of a commissioning apparatus of a micro service node according to an embodiment of the present disclosure; and
fig. 10 schematically illustrates a block diagram of an electronic device adapted to implement a method of commissioning of a micro service node according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is only exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where expressions like at least one of "A, B and C, etc. are used, the expressions should generally be interpreted in accordance with the meaning as commonly understood by those skilled in the art (e.g.," a system having at least one of A, B and C "shall include, but not be limited to, a system having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
In the technical scheme of the disclosure, the related data (such as including but not limited to personal information of a user) are collected, stored, used, processed, transmitted, provided, disclosed, applied and the like, all conform to the regulations of related laws and regulations, necessary security measures are adopted, and the public welcome is not violated.
In the related art, the distributed transaction tracking of the full link depends on the chain tracking stack which is commonly generated based on different subsystems, and currently, all tracking stack information is generally collected in full quantity and then processed and processed.
However, for the test environment of the micro-service, the version update is usually aimed at a certain application, a certain node or a certain service in the micro-service, and in the case of debugging the test case, all tracking stacks are not required to be acquired, and only links associated with the service related to the version update are recorded and tracked.
In addition, when a problem occurs in a component corresponding to log4j (a java log) and the like, the micro-link information needs to be called to debug and debug the micro-service, so that the micro-link with the problem is difficult to quickly analyze the link and locate, and the efficiency is low.
In view of this, an embodiment of the present disclosure provides a method for debugging a micro service node, including:
responding to the detection of micro-service error information of a first node in a test environment, and acquiring identification information of a second node, identification information of the first node and debugging information of the first node, wherein the second node represents a micro-service node for triggering the first node to generate the micro-service error information;
inquiring to obtain node address information of a second node from a routing association spectrogram of the micro service according to the identification information of the first node and the identification information of the second node, wherein the routing association spectrogram of the micro service is constructed according to micro service calling relations among different nodes;
acquiring debugging information of the second node from a tracking stack of the second node based on the node address information; and
and executing debugging operation on the first node based on the debugging information of the first node and the debugging information of the second node.
Fig. 1 schematically illustrates an application scenario diagram of a method of debugging a micro service node according to an embodiment of the present disclosure.
As shown in fig. 1, an application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is a medium used to provide a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 through the network 104 using at least one of the first terminal device 101, the second terminal device 102, the third terminal device 103, to receive or send messages, etc. Various communication client applications, such as a shopping class application, a web browser application, a search class application, an instant messaging tool, a mailbox client, social platform software, etc. (by way of example only) may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103.
The first terminal device 101, the second terminal device 102, the third terminal device 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (by way of example only) providing support for websites browsed by the user using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that, the method for debugging a micro service node provided in the embodiments of the present disclosure may be generally performed by the server 105. Accordingly, the debugging device of the micro service node provided in the embodiments of the present disclosure may be generally disposed in the server 105. The method for debugging a micro service node provided by the embodiments of the present disclosure may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103 and/or the server 105. Accordingly, the debugging device of the micro service node provided by the embodiments of the present disclosure may also be provided in a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103 and/or the server 105.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The debugging method of the micro service node of the disclosed embodiment will be described in detail with reference to fig. 2 to 6 based on the scenario described in fig. 1.
Fig. 2 schematically illustrates a flow chart of a method of commissioning of a micro service node according to an embodiment of the present disclosure.
As shown in fig. 2, the debugging method of the micro service node of this embodiment includes operations S210 to S240.
In operation S210, in response to detecting the micro service error information of the first node in the test environment, the identification information of the second node, the identification information of the first node, and the debug information of the first node are obtained, where the second node characterizes the micro service node for triggering the first node to generate the micro service error information.
According to an embodiment of the present disclosure, the first node may be a micro service node in which an error occurs, and the micro service error information may include identification information of the second node, for example, according to the micro service error information generated by the first node, the micro service node triggering the first node to generate the micro service error information may be determined.
According to the embodiment of the disclosure, the debug information of the first node may be information for debugging the first node, and the first node may be debugged through the debug information of the first node in case that the first node generates the micro service error information.
In operation S220, according to the identification information of the first node and the identification information of the second node, node address information of the second node is obtained by inquiring from a routing association spectrogram of the micro service, wherein the routing association spectrogram of the micro service is constructed according to the micro service call relationship between different nodes.
According to the embodiment of the disclosure, the node address information of the second node may be address information of the second node in the route correlation spectrogram, and the node address of the second node may be obtained by querying the route correlation spectrogram through the address information.
According to an embodiment of the present disclosure, in case node address information of the second node is determined, a call operation may be performed on the second node.
According to embodiments of the present disclosure, a route correlation spectrogram may include a plurality of nodes and call relationships between the plurality of nodes. For example, in the case of querying the node B through the node a, the routing distance between the node a and the node B may be determined through the identification information of the node a and the identification information of the node B, and then the node address of the node B may be determined according to the routing distance, and the call operation may be performed on the node B through the node address of the node B.
In operation S230, debug information of the second node is acquired from a trace stack of the second node based on the node address information.
According to an embodiment of the present disclosure, the debug information of the second node may include partial debug information that may debug the first node, and partial debug information that may debug the second node. Since the node address information is obtained by inquiring the identification information of the first node and the second node, the debug information of the second node obtained based on the node address information may be obtained by debugging the first node.
According to embodiments of the present disclosure, a trace stack may be configured on a node, in which some debug information may be stored for that node, as well as debug information may be stored for other nodes. For example, the information amount of debug information of other nodes included in the node may be determined according to the routing distance between the nodes. For example, if the routing distance between the a node and the B node is smaller than the routing distance between the a node and the C node, the amount of information that can debug the B node and that is included in the trace stack of the a node may be larger than the amount of information that can debug the C node and that is included in the trace stack of the a node.
In operation S240, a debugging operation is performed on the first node based on the debugging information of the first node and the debugging information of the second node.
According to the embodiment of the disclosure, for example, in the case of obtaining the debug information of the first node and the debug information from the second node which can debug the first node, the debug information of the first node and the debug information of the second node can be integrated to perform a debug operation on the first node.
According to the embodiment of the disclosure, under the condition that micro service error information of a certain node in a test environment is detected, the identification of other nodes causing the node to report errors and the debugging information of the node are obtained, then according to the node identification, the node address information of the other nodes causing the node to report errors is obtained from a routing association spectrogram query of the micro service, then according to the node address information, corresponding debugging information is obtained from a tracking stack, and then according to the debugging information of two nodes, the nodes with the errors are debugged, and because only the debugging information of the node associated with the error information is called to debug the nodes with the errors, the debugging of all link information in the micro service is avoided, and the debugging efficiency of the nodes with the errors is improved.
According to embodiments of the present disclosure, for example, debug information for debugging an error represented in microservice error information generated by a first node may be determined according to the error occurring at the first node. The node identification corresponding to the debugging information can be obtained by inquiring from the database, then the node address information corresponding to the node identification is obtained by inquiring from the routing correlation spectrogram of the micro service according to the node identification, and the debugging operation can be executed on the first node based on the debugging information of the node corresponding to the node address information and the first node.
According to embodiments of the present disclosure, node call relationship information, node number information, and node address information may be stored, for example, at a service registry. For example, the node number information, node call relationship information, and node address information may be obtained based on all micro-service nodes in the micro-service.
According to an embodiment of the present disclosure, a method for constructing a route correlation spectrogram of a micro service includes:
acquiring node quantity information, node calling relation information and node address information;
constructing a micro-service call topology structure diagram according to the call relation;
processing the micro-service call topology structure diagram by utilizing a target algorithm to obtain a linear sequence of the micro-service call relationship;
Binary coding is carried out on the nodes according to the linear sequence of the micro-service call relationship and the node quantity information, so that node level information is obtained; and
and constructing a routing correlation spectrogram of the micro service according to the node level information and the node address information, wherein the routing correlation spectrogram of the micro service comprises a plurality of levels, the node address information of a plurality of target nodes is stored in the nodes on each level, and the level distances between the plurality of target nodes and the nodes are determined according to the level information of the nodes in the routing correlation spectrogram of the micro service.
According to embodiments of the present disclosure, for example, the topology of a micro-service invocation topology may characterize the invocation relationship of nodes to each other. For example, the micro service invocation topology structure may include a plurality of micro service nodes, invocation relationships between the plurality of micro service nodes, and the like.
According to embodiments of the present disclosure, for example, the calling relationship may be converted into a sparse matrix for storage and processing. Because a large number of empty array elements exist, the calling relation is converted into a sparse matrix, and the storage and processing efficiency can be improved.
According to an embodiment of the disclosure, for example, because the call relationship mainly exists between an upper layer and a lower layer of the topological graph in a hierarchical design background common to the micro service architecture, based on this, the call relationship between micro services may be represented by a DAG graph (directed acyclic graph), and the micro service call topological structure graph may be the DAG graph.
Fig. 3 schematically illustrates a schematic diagram of a micro service invocation topology structure according to an embodiment of the disclosure.
As shown in fig. 3, the nodes may include C1, C2, C3, C4, C5, C6, C7, C8, and C9, C1 may call C8 and C3, C2 may call C3 and C5, and C1 and C2 may be partitioned into the service first layer; c8 may call C9, C3 and C5 may call C4, C8, C3 and C5 may be divided into service layer 2; c9 and C4 may call C7, C4 and C5 may call C6, C4 and C9 may be divided into service layer 3; c7 and C6 may be divided into service layer 4.
According to embodiments of the present disclosure, for example, the call relationship between nodes may be represented by a two-dimensional array (array) of "caller+callee", e.g., C1 call C8 may be represented as array (C1, C8), C1 call C3 may be represented as array (C1, C3), C8 call C9 may be represented as array (C8, C9), C3 call C4 may be represented as array (C3, C4), and C9 call C7 may be represented as array (C9, C7). The element values between the arrays may be 1, indicating that there is a call relationship.
According to embodiments of the present disclosure, for example, the target algorithm may include a greedy algorithm and a depth-first algorithm by which the micro-service invocation topology structure graph may be processed into a linear sequence of micro-service invocation relationships.
According to embodiments of the present disclosure, for example, a micro service invocation relationship linear sequence may include a plurality of micro service nodes, and a linear invocation relationship between the plurality of micro service nodes.
Fig. 4 schematically illustrates a schematic diagram of a micro service invocation relationship linear sequence, according to an embodiment of the disclosure.
As shown in FIG. 4, the micro service call relationship linear sequence may include node C1, node C2, node C3, node C4, node C5, node C6, node C7, node C8 and node C9, and the arrangement order of the nodes may be node C1, node C2, node C3, node C5, node C8, node C4, node C9, node C6 and node C7.
According to embodiments of the present disclosure, for example, the number of bits of binary encoding may be determined according to the total number of nodes in the node number information, and the nodes may be binary encoded. And the node level information can be obtained by dividing the node level after binary coding according to the linear node call relation reflected by the linear sequence of the micro-service call relation. For example, a node may include 1111, 1101, 1100, 1011, 1010, 1001, and 1000, etc., where 1111 may be partitioned to layer 1, 1101 and 1100 may be partitioned to layer 2, 1011, 1010, 1001, and 1000 may be partitioned to layer 3.
According to an embodiment of the present disclosure, as shown in table 1, taking node C3 as an example, ordered as 3 in fig. 4, and binary value as 1101, the corresponding binary code is xxxx1101. The number of bits of xxxxxx is determined by the number of micro services, for example, if the number of micro services is 65356 or less, the binary code is 16 bits, and 216 micro service information can be recorded. For example, the correspondence between the full-scale micro-service names and the binary codes may be placed in a service registry or server for all nodes to read.
TABLE 1
MicroSer Name (micro service Name) XXXXXXXX
MicroSer Num (code of microservice in DAG) C3
Key (microservice binary code) xxxx1101
IP Adress, port (node address information) XXX.XXX.XXX.XXX:X
Value (tracking stack information) XXXXXX
Route Info (routing distance information) XXXXXX
According to the embodiment of the disclosure, the micro service call topology structure diagram is constructed according to the call relation, the micro service call topology structure diagram is processed into the linear sequence, the nodes are binary coded according to the linear sequence and the node quantity information to obtain the node level information, and the route association spectrogram capable of representing the node route relation is constructed according to the node level information and the node address information, so that the accurate representation of the route relation among the nodes is realized.
According to an embodiment of the present disclosure, for example, a micro service side car, a micro service module, and a network protocol stack may be set in a micro service node, a JVM (Java Virtual Machine ) agent (agent) -based debug information interceptor and a routing information area may be set in the micro service side car, and a trace stack may be set in the network protocol stack of the node. In the case that the micro-service is invoked for execution, debug information of the micro-service may be obtained by the interceptor and stored in the trace stack. The routing information area can be used for recording information such as names and codes of the micro services, and the codes can be codes of the micro service nodes in a routing association spectrogram.
According to an embodiment of the present disclosure, for example, one node may include a plurality of micro services, and each micro Service node may implement functions such as Service discovery, traffic management, load balancing, health checking, circuit breaker and failover, and authentication, that is, the micro Service side car mode, by deploying a Service Proxy (Service Proxy).
According to the embodiment of the disclosure, a data stack area can be set in a data structure area of a network protocol stack to serve as a tracking stack, and debug information related to all micro services in corresponding nodes can be stored in the tracking stack.
Fig. 5 schematically illustrates a schematic diagram of a micro service node structure according to an embodiment of the present disclosure.
As shown in fig. 5, the micro service node 510 may include a micro service module 520, a micro service sidecar 530, and a network protocol stack 540. Wherein the micro service module 520 may include a business logic module 521; the micro service sidecar 530 may include a service discovery module 531, a routing information area 532, and a debug information interceptor 533; the network protocol stack 540 may include a flow control module 541 and a trace stack 542. Wherein the micro service module 520, the micro service sidecar 530, and the network protocol stack 540 may be communicatively connected to each other.
The micro service nodes 510 and other nodes may be communicatively coupled to each other, and each micro service node 510 may include a plurality of micro service sidecars 530.
It should be noted that, each micro service node 510 may include a plurality of micro service modules 520, a plurality of micro service sidecars 530, and the like, and the micro service modules 520 and the micro service sidecars 530 may be communicatively connected to each other, so that those skilled in the art may adjust the internal structure of the micro service node 510 according to actual requirements.
According to an embodiment of the disclosure, the routing association spectrum of the micro service includes I nodes, where I is a positive integer.
Fig. 6 schematically illustrates a flowchart of a method of querying node address information according to an embodiment of the present disclosure.
As shown in fig. 6, the method for querying node address information of this embodiment includes: operations S610 to S650.
In operation S610, for the ith node, route distance information between the first node and the ith node is obtained according to the identification information of the first node and the identification information of the ith node, I is greater than or equal to 1 and less than or equal to I, and I is a positive integer.
According to the embodiment of the disclosure, the routing distance between the first node and the ith node can be determined from the routing correlation spectrogram of the micro service according to the identification information of the first node and the identification information of the ith node. The node address of the ith node may be queried according to the routing distance.
According to embodiments of the present disclosure, the routing distance information may be calculated by an exclusive-or operation, for example. For example, if the result of the exclusive or operation between the node 1110 and the node 1001 is 0111=7, the routing distance information between the node 1110 and the node 1001 may be 7.
In operation S620, according to the routing distance information, the target level information is queried from the routing correlation spectrogram of the micro service.
According to an embodiment of the present disclosure, the target hierarchy may be a hierarchy at which the i-th node is located. By determining the target hierarchy information, the node address of the i-th node can be determined from the target hierarchy.
In operation S630, in case it is determined that the routing distance information is greater than the distance information between the last node and the first node in the target hierarchy information, a target node farthest from the first node on the target hierarchy is queried from the routing correlation spectrogram of the micro service according to the target hierarchy information.
According to embodiments of the present disclosure, for example, the distance information between the last node and the first node in the target hierarchy information may be [2 ] m-1 ,2 m ) M may be a hierarchy, m is a positive integer, for example, in the case where the target hierarchy is layer 3, the routing distance information between the last node and the first node in the hierarchy may be [2 ] 2 ,2 3 ) I.e., [4, 8), the routing distance between the last node and the first node in the hierarchy may be [4,8 ]. Further, the target node farthest from the first node on the target level may be a node having routing information of 7 with respect to the first node.
According to embodiments of the present disclosure, for example, in the case of binary encoding of 32 bits, then there may be layer 1 to layer 32 routing information for the routing information area of the node in the micro service. That is, the routing information area in the micro-service sidecar of each node can store the distance interval between the routing information area and the micro-service sidecar of each node in [2 ] m-1 ,2 m ) Node address information of k micro service nodes in the network, wherein k is a positive integer. k may be related to a balance of spatial and temporal complexity of the route correlation spectrogram. The greater k, the greater the spatial complexity may be the strain and the less the temporal complexity may be the strain. For each micro-service node, only the call information of k micro-service nodes nearest to the node itself may be stored. For example, the value of k may be less than the number of nodes that a level contains.
According to embodiments of the present disclosure, for example, it may be determined whether the routing distance is greater than a section of the mth layerPoint route corresponding 2 m-1 +k, i.e., the sum of k and the lower limit of the routing distance of the m-th layer node; if yes, iteratively searching the target node in a tail pointer mode; if not, node address information of the target node may be determined from the k micro service nodes based on the k micro service nodes associated with the target node queried by the layer.
In operation S640, based on the target node, an operation for determining routing distance information between the target node and the first node is returned to be performed, and i is incremented.
According to the embodiment of the disclosure, since the routing distance information is greater than the number of nodes corresponding to the target level information, the operation of determining the routing distance information between the target node and the first node can be performed based on the target node, and i is increased in an increasing manner, so that the routing distance between the target node and the first node is reduced, the searched target node is more and more close to the second node, and the node address of the second node is obtained by inquiry.
Fig. 7 schematically illustrates a schematic diagram of a route correlation spectrogram according to an embodiment of the present disclosure.
As shown in fig. 7, the routing relationship spectrogram may be displayed in the form of a binary tree, and the microservice node may be displayed as a leaf node of the binary tree. Node address information may not be presented in the binary tree. The routing graph may include node 1111, node 1110, node 1101, node 1100, node 1011, node 1010, node 1001, and node 1000. Wherein the hierarchical information of node 1111 may characterize layer 1; the hierarchical information of node 1101 and node 1100 may characterize layer 2; node 1011, node 1010, node 1001, and node 1000 may represent layer 3. The nth bit of the binary corresponds to the nth layer of the binary tree, e.g., in the case where bit 1 is 0 and bit 2 is 0, node 1100 may be determined from the 2 nd layer of the binary tree; in the case where bit 1 is 0, bit 2 is 0, and bit 3 is 0, node 1000 may be determined from layer 3 of the binary tree. The routing distance information may be according to [2 ] i-1 ,2 i ) It is determined that the routing distance range of layer 1 may be [2 0 ,2 1 ) I.e., [1, 2); layer 2 routing distanceThe range of departure may be [2 ] 1 ,2 2 ) I.e., [2, 4); the routing distance range of layer 3 may be [2 ] 2 ,2 3 ) I.e. [4, 8).
According to an embodiment of the present disclosure, for example, the node address corresponding to node 1001 is looked up from node 1110, and the k parameter is set to 2. The result of the exclusive-or operation of node 1110 and node 1001 is 0111=7, then the layer 3 routing distance range is within [4,8 ] and greater than 2 3 -1+k=6, then the search 1001 can be continued through 1011 pointed to by the tail pointer of the layer of routing information, i.e. the exclusive or distance of 1011 and 1001 is calculated again, and the above-described search process is repeated through the routing information of 1011.
Fig. 8 schematically illustrates a schematic diagram of an example of routing information according to an embodiment of the present disclosure.
As shown in fig. 8, the routing information may include a binary code of the node and an address corresponding to the node. Layer 1 routing information may include node 1111 and node addresses corresponding to node 1111, and the routing distance range may be [1, 2); the layer 2 routing information may include node addresses corresponding to the node 1101 and the node 1101, and node addresses corresponding to the node 1100 and the node 1100, and the routing distance range may be [2, 4); the layer 3 routing information may include node addresses corresponding to the node 1010 and the node 1010, node addresses corresponding to the node 1011 and the node 1011, node addresses corresponding to the node 1000 and the node 1000, and node addresses corresponding to the node 1001 and the node 1001, and the routing distance range may be [4,8 ].
According to an embodiment of the present disclosure, for example, the k parameter may be set to 4, and then 1001 may be found directly from the head pointer to the tail of the layer.
According to the embodiment of the disclosure, for example, each time the target node is searched by adopting the tail pointer method, the probability of the target node appearing in the m-th layer routing information used in each iteration is larger and larger. For the debugging test environment of any n micro service nodes, only log is required to be queried 2 (n) times, n is a positive integer, the target node can be found.
It should be noted that fig. 7 and 8 are only schematically shown, and the number of actual micro service nodes, the distance range, the number of tiers, and the like are not limited.
In operation S650, in case it is determined that the routing distance information is smaller than the distance information between the last node and the first node in the target hierarchy information, node address information of the second node is queried from the routing correlation spectrogram of the micro service according to the target hierarchy information.
According to the embodiment of the disclosure, in the case that the routing distance information is determined to be smaller than the number of nodes corresponding to the target level information, it may be determined that the second node is among the nodes corresponding to the target level information, the second node may be obtained by querying in the target level, and the second node may be obtained by querying in a routing association spectrogram of the micro service.
According to an embodiment of the present disclosure, for example, in determining that the routing distance is smaller than 2 corresponding to the node route of the mth layer m-1 In the case of +k, node address information of the target node may be determined from among k micro service nodes based on k micro service nodes associated with the target node queried by the layer.
According to the embodiment of the disclosure, since the routing distance between the target node and the first node is determined by returning to perform iteration to determine the second node, the determination of the second node by calling the full link information is avoided, the computer resources required to be occupied by the determination of the second node are reduced, and the efficiency of determining the second node is improved.
According to an embodiment of the present disclosure, a routing correlation spectrogram of a micro service includes M layer nodes, where M is a positive integer, and according to routing distance information, obtaining target level information from the routing correlation spectrogram of the micro service by querying includes:
aiming at the M-th layer node, obtaining a distance range between the M-th layer node and the first node according to the level information of the M-th layer node, wherein M is more than or equal to 1 and less than or equal to M, and M is a positive integer;
returning to perform the operation of determining the distance range information and incrementing m in the case that the determined routing distance information exceeds the distance range; and
And under the condition that the routing distance information is determined to be within the distance range, obtaining the target level information.
According to the embodiment of the disclosure, for the mth layer node, a distance range between the mth layer node and the first node is obtained according to the level information of the mth layer node, for example, the distance range may represent a distance between levels, and the level distance between the mth layer node and the first node may be determined according to the level information of the mth layer node and the level information of the first node, so as to obtain a distance range between the levels.
According to the embodiments of the present disclosure, since the operation of determining the distance range information is performed again in a case where it is determined that the routing distance information exceeds the distance range, and m is incremented, the hierarchical range between the first node and the mth layer node can be narrowed. In the case that the routing distance information is determined to be within the distance range, the level at which the second node is located may be determined, and further, the level at which the second node is located may be determined as the target level.
According to the embodiment of the disclosure, the hierarchy distance range between the nodes is determined by returning to execute the iterative operation, so that the determination of the hierarchy of the target node by calling the full-link information is avoided, the computer resources required to be occupied by the determination of the hierarchy of the target node are reduced, and the efficiency of determining the target hierarchy is improved.
According to an embodiment of the present disclosure, obtaining debug information of a second node from a trace stack of the second node based on node address information includes:
inquiring to obtain a tracking stack of the second node according to the node address information; and
and obtaining the debugging information of the second node from the tracking stack of the second node based on the user datagram protocol.
According to the embodiment of the disclosure, the second node can be queried through the node address information, and then the tracking stack configured on the second node can be obtained.
According to the embodiment of the disclosure, the debug information of the second node is obtained from the trace stack of the second node based on the user datagram protocol, and the part of debug information capable of debugging the first node is obtained from the trace stack of the second node based on the user datagram protocol.
According to the embodiment of the disclosure, for example, the user datagram protocol is used for recording related information, so that the transmission of the user datagram protocol is facilitated, and a protocol framework of a P2P platform can be adopted, so that the suitability of micro services is improved.
According to the embodiment of the disclosure, the tracing stack of the second node is obtained by inquiring according to the node address information, and the debugging information of the second node is obtained from the tracing stack of the second node based on the user datagram protocol, so that the efficiency of obtaining the debugging information of the second node is improved.
According to an embodiment of the present disclosure, performing a debug operation on a first node based on debug information of the first node and debug information of a second node, includes:
splicing the debugging information of the first node and the debugging information of the second node to obtain target debugging information; and
and executing debugging operation on the first node based on the target debugging information.
According to the embodiment of the disclosure, the debug information of the first node and the debug information of the second node are subjected to splicing processing to obtain target debug information, for example, part of debug information capable of debugging the first node can be obtained from the first node, part of debug information capable of debugging the first node can be obtained from the second node, the two parts of debug information are subjected to splicing processing to obtain target debug information, and the first node can be subjected to complete debugging through the spliced target debug information, so that the first node can solve the problems.
According to the embodiment of the disclosure, the target debugging information for debugging the first node is obtained by performing splicing processing on the debugging information of the first node and the debugging information of the second node, and then the first node is subjected to debugging operation based on the target debugging information, so that dependence on related functions of a server is reduced, and execution pressure of the server is relieved. In addition, as the debugging information is respectively arranged at different nodes, and then the debugging information is searched and spliced under the condition of need, the flexibility of micro service deployment is improved, the global risk caused by information leakage is avoided, and the safety of the debugging information of the storage node is improved.
According to an embodiment of the present disclosure, performing a stitching process on debug information of a first node and debug information of a second node to obtain target debug information, including:
screening the first debugging information from the debugging information of the first node based on a screening strategy, and screening the second debugging information from the debugging information of the second node; and
and performing splicing processing on the first debugging information and the second debugging information to obtain target debugging information.
According to embodiments of the present disclosure, for example, the filtering policy may be a resolution policy corresponding to the micro-service error information, which may be used to solve the problem of generating the micro-service error information. According to the solution strategy, first debug information corresponding to the error can be screened from debug information of the first node, and second debug information corresponding to the error can be screened from debug information of the second node.
According to embodiments of the present disclosure, for example, the screening policy may be determined according to an error-reporting period or the number of error-reporting events, or the like. The call information may be screened by a screening policy. Information related to the screening strategy such as the error reporting time period and the calling information can be spliced and integrated for reference of a debugger.
According to an embodiment of the present disclosure, for example, the first debug information may be partial debug information for handling errors obtained from the first node, and the second debug information may be partial debug information for handling errors obtained from the second node.
According to the embodiment of the disclosure, for example, the first debug information and the second debug information are spliced, so that complete target debug information for processing errors can be obtained, and the first node can be debugged through the target debug information, so that the errors of the first node are solved.
According to the embodiment of the disclosure, the first debug information is obtained by screening from the debug information of the first node based on the screening strategy, the second debug information is obtained by screening from the debug information of the second node, and the first debug information and the second debug information are spliced to obtain the target debug information, so that the screening efficiency of the debug information is improved, and the efficiency of obtaining the target debug information is further improved.
Based on the method for debugging the micro service node, the disclosure also provides a device for debugging the micro service node. The device will be described in detail below in connection with fig. 9.
Fig. 9 schematically illustrates a block diagram of a debugging apparatus of a micro service node according to an embodiment of the present disclosure.
As shown in fig. 9, the debugging device 900 of the micro service node of this embodiment includes a first acquisition module 910, a query module 920, a second acquisition module 930, and an execution module 940.
The first obtaining module 910 is configured to obtain, in response to detecting the micro service error information of the first node in the test environment, identification information of a second node, identification information of the first node, and debug information of the first node, where the second node characterizes a micro service node that is used to trigger the first node to generate the micro service error information. In an embodiment, the first obtaining module 910 may be configured to perform the operation S210 described above, which is not described herein.
The query module 920 is configured to query and obtain node address information of the second node from a routing association spectrogram of the micro service according to the identification information of the first node and the identification information of the second node, where the routing association spectrogram of the micro service is constructed according to a micro service call relationship between different nodes. In an embodiment, the query module 920 may be configured to perform the operation S220 described above, which is not described herein.
The second obtaining module 930 is configured to obtain, based on the node address information, debug information of the second node from a trace stack of the second node. In an embodiment, the second obtaining module 930 may be configured to perform the operation S230 described above, which is not described herein.
The execution module 940 is configured to execute a debug operation on the first node based on the debug information of the first node and the debug information of the second node. In an embodiment, the execution module 940 may be configured to execute the operation S240 described above, which is not described herein.
According to an embodiment of the present disclosure, the query module 920 includes a first acquisition sub-module, a first query sub-module, a second query sub-module, an execution sub-module, and a third query sub-module. The first acquisition submodule is used for obtaining routing distance information between the first node and the ith node according to the identification information of the first node and the identification information of the ith node, wherein I is more than or equal to 1 and less than or equal to I, and I is a positive integer; the first inquiring submodule is used for inquiring and obtaining target level information from a route correlation spectrogram of the micro service according to the route distance information; the second query sub-module is used for querying a target node which is farthest from the first node on the target level from a route correlation spectrogram of the micro service according to the target level information under the condition that the route distance information is determined to be larger than the distance information between the last node and the first node in the target level information; the execution submodule is used for returning to execute the operation of determining the routing distance information between the target node and the first node based on the target node, and increasing i; and the third inquiring sub-module is used for inquiring and obtaining the node address information of the second node from the routing association spectrogram of the micro service according to the target level information under the condition that the routing distance information is smaller than the distance information between the last node and the first node in the target level information.
According to an embodiment of the disclosure, the first query sub-module includes a first acquisition unit, an execution unit, and a second acquisition unit. The first acquisition unit is used for obtaining a distance range between the mth layer node and the first node according to the level information of the mth layer node aiming at the mth layer node, wherein M is more than or equal to 1 and less than or equal to M, and M is a positive integer; the execution unit is used for returning to execute the operation of determining the distance range information and increasing m under the condition that the determined routing distance information exceeds the distance range; the second obtaining unit is used for obtaining the target level information under the condition that the routing distance information is determined to be within the distance range.
According to an embodiment of the present disclosure, the second acquisition module 930 includes a fourth query sub-module and a second acquisition sub-module. The fourth query sub-module is used for querying and obtaining a tracking stack of the second node according to the node address information; the second obtaining sub-module is used for obtaining the debugging information of the second node from the tracking stack of the second node based on the user datagram protocol.
According to an embodiment of the present disclosure, the execution module 940 includes a stitching sub-module and a debugging sub-module. The splicing sub-module is used for splicing the debugging information of the first node and the debugging information of the second node to obtain target debugging information; the debugging submodule is used for executing debugging operation on the first node based on the target debugging information.
According to an embodiment of the present disclosure, a splice sub-module includes a screening unit and a splice unit. The screening unit is used for screening the first debugging information from the debugging information of the first node based on a screening strategy, and screening the second debugging information from the debugging information of the second node; the splicing unit is used for carrying out splicing processing on the first debugging information and the second debugging information to obtain target debugging information.
According to an embodiment of the present disclosure, the query module 920 further includes a third acquisition sub-module, a first construction sub-module, a utilization sub-module, a coding sub-module, and a second construction sub-module. The third acquisition sub-module is used for acquiring node quantity information, node calling relation information and node address information; the first construction submodule is used for constructing a micro-service call topology structure diagram according to the call relation; the sub-module is used for processing the micro-service call topology structure diagram by utilizing a target algorithm to obtain a linear sequence of the micro-service call relationship; the encoding submodule is used for binary encoding the nodes according to the linear sequence of the micro-service call relation and the node quantity information to obtain node level information; the sub-module is used for constructing a routing correlation spectrogram of the micro-service according to node level information and node address information, the routing correlation spectrogram of the micro-service comprises a plurality of levels, node address information of a plurality of target nodes is stored in nodes on each level, and the level distances between the plurality of target nodes and the nodes are determined according to the level information of the nodes in the routing correlation spectrogram of the micro-service.
According to embodiments of the present disclosure, any of the plurality of modules of the first acquisition module 910, the query module 920, the second acquisition module 930, and the execution module 940 may be combined in one module to be implemented, or any of the plurality of modules may be split into a plurality of modules. Alternatively, at least some of the functionality of one or more of the modules may be combined with at least some of the functionality of other modules and implemented in one module. According to embodiments of the present disclosure, at least one of the first acquisition module 910, the query module 920, the second acquisition module 930, and the execution module 940 may be implemented at least in part as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable manner of integrating or packaging the circuitry, or in any one of or a suitable combination of three of software, hardware, and firmware. Alternatively, at least one of the first acquisition module 910, the query module 920, the second acquisition module 930, and the execution module 940 may be at least partially implemented as computer program modules that, when executed, may perform the corresponding functions.
Fig. 10 schematically illustrates a block diagram of an electronic device adapted to implement a method of commissioning of a micro service node according to an embodiment of the present disclosure.
As shown in fig. 10, an electronic device 1000 according to an embodiment of the present disclosure includes a processor 1001 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 1002 or a program loaded from a storage section 1008 into a Random Access Memory (RAM) 1003. The processor 1001 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. The processor 1001 may also include on-board memory for caching purposes. The processor 1001 may include a single processing unit or multiple processing units for performing different actions of the method flows according to embodiments of the present disclosure.
In the RAM 1003, various programs and data necessary for the operation of the electronic apparatus 1000 are stored. The processor 1001, the ROM 1002, and the RAM 1003 are connected to each other by a bus 1004. The processor 1001 performs various operations of the method flow according to the embodiment of the present disclosure by executing programs in the ROM 1002 and/or the RAM 1003. Note that the program may be stored in one or more memories other than the ROM 1002 and the RAM 1003. The processor 1001 may also perform various operations of the method flow according to the embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the disclosure, the electronic device 1000 may also include an input/output (I/O) interface 1005, the input/output (I/O) interface 1005 also being connected to the bus 1004. The electronic device 1000 may also include one or more of the following components connected to the I/O interface 1005: an input section 1006 including a keyboard, a mouse, and the like; an output portion 1007 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), etc., and a speaker, etc.; a storage portion 1008 including a hard disk or the like; and a communication section 1009 including a network interface card such as a LAN card, a modem, or the like. The communication section 1009 performs communication processing via a network such as the internet. The drive 1010 is also connected to the I/O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is installed as needed in the drive 1010, so that a computer program read out therefrom is installed as needed in the storage section 1008.
The present disclosure also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example, but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, the computer-readable storage medium may include ROM 1002 and/or RAM1003 and/or one or more memories other than ROM 1002 and RAM1003 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowcharts. When the computer program product runs in a computer system, the program code is used for enabling the computer system to realize the debugging method of the micro service node provided by the embodiment of the disclosure.
The above-described functions defined in the system/apparatus of the embodiments of the present disclosure are performed when the computer program is executed by the processor 1001. The systems, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted in the form of signals on a network medium, distributed, and downloaded and installed via the communication section 1009, and/or installed from the removable medium 1011. The computer program may include program code that may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 1009, and/or installed from the removable medium 1011. The above-described functions defined in the system of the embodiments of the present disclosure are performed when the computer program is executed by the processor 1001. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
According to embodiments of the present disclosure, program code for performing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, such computer programs may be implemented in high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. Programming languages include, but are not limited to, such as Java, c++, python, "C" or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that the features recited in the various embodiments of the disclosure and/or in the claims may be provided in a variety of combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.
The embodiments of the present disclosure are described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the disclosure, and such alternatives and modifications are intended to fall within the scope of the disclosure.

Claims (11)

1. A method of commissioning a micro service node, comprising:
responding to the detection of micro-service error information of a first node in a test environment, and acquiring identification information of a second node, the identification information of the first node and debugging information of the first node, wherein the second node represents a micro-service node for triggering the first node to generate the micro-service error information;
Inquiring node address information of the second node from a routing correlation spectrogram of the micro service according to the identification information of the first node and the identification information of the second node, wherein the routing correlation spectrogram of the micro service is constructed according to micro service calling relations among different nodes;
acquiring debugging information of the second node from a tracking stack of the second node based on the node address information; and
and executing debugging operation on the first node based on the debugging information of the first node and the debugging information of the second node.
2. The method of claim 1, wherein the routing correlation spectrogram of the micro service includes I nodes, I is a positive integer, and the querying, according to the identification information of the first node and the identification information of the second node, node address information of the second node from the routing correlation spectrogram of the micro service includes:
aiming at the ith node, obtaining routing distance information between the first node and the ith node according to the identification information of the first node and the identification information of the ith node, wherein I is more than or equal to 1 and less than or equal to I, and I is a positive integer;
Inquiring and obtaining target level information from a route correlation spectrogram of the micro service according to the route distance information;
under the condition that the routing distance information is larger than the distance information between the last node and the first node in the target hierarchy information, according to the target hierarchy information, inquiring to obtain a target node which is farthest from the first node on a target hierarchy from a routing correlation spectrogram of the micro service;
returning to perform an operation of determining routing distance information between the target node and the first node based on the target node, and incrementing i; and
and under the condition that the routing distance information is smaller than the distance information between the last node and the first node in the target level information, inquiring from a routing correlation spectrogram of the micro service according to the target level information to obtain the node address information of the second node.
3. The method of claim 2, wherein the routing correlation spectrogram of the micro service includes M-layer nodes, M is a positive integer, and the querying, according to the routing distance information, from the routing correlation spectrogram of the micro service includes:
Aiming at an mth layer node, obtaining a distance range between the mth layer node and the first node according to the level information of the mth layer node, wherein M is more than or equal to 1 and less than or equal to M, and M is a positive integer;
returning to perform an operation of determining distance range information and incrementing m in the case where it is determined that the routing distance information exceeds the distance range; and
and obtaining the target level information under the condition that the routing distance information is determined to be within the distance range.
4. The method of claim 1, wherein the obtaining debug information for the second node from a trace stack for the second node based on the node address information comprises:
inquiring to obtain a tracking stack of the second node according to the node address information; and
and obtaining the debugging information of the second node from the tracking stack of the second node based on the user datagram protocol.
5. The method of claim 1, wherein the performing a debug operation on the first node based on the debug information of the first node and the debug information of the second node comprises:
splicing the debugging information of the first node and the debugging information of the second node to obtain target debugging information; and
And executing debugging operation on the first node based on the target debugging information.
6. The method of claim 5, wherein the performing the stitching of the debug information of the first node and the debug information of the second node to obtain the target debug information comprises:
screening the first debugging information from the debugging information of the first node based on a screening strategy, and screening the second debugging information from the debugging information of the second node; and
and performing splicing processing on the first debugging information and the second debugging information to obtain the target debugging information.
7. The method of claim 1, wherein the method for constructing the routing association spectrum of the micro service comprises:
acquiring node quantity information, node calling relation information and node address information;
constructing a micro-service call topology structure diagram according to the call relation;
processing the micro-service call topology structure diagram by utilizing a target algorithm to obtain a linear sequence of a micro-service call relationship;
binary coding is carried out on the nodes according to the linear sequence of the micro-service call relationship and the node quantity information, so that node level information is obtained; and
And constructing a route correlation spectrogram of the micro service according to the node level information and the node address information, wherein the route correlation spectrogram of the micro service comprises a plurality of levels, node address information of a plurality of target nodes is stored in nodes on each level, and the level distances between the plurality of target nodes and the nodes are determined according to the level information of the nodes in the route correlation spectrogram of the micro service.
8. A method and device for debugging a micro service node comprise the following steps:
the first acquisition module is used for responding to the detection of the micro-service error information of the first node in the test environment and acquiring the identification information of the second node, the identification information of the first node and the debugging information of the first node, wherein the second node represents the micro-service node for triggering the first node to generate the micro-service error information;
the query module is used for querying and obtaining node address information of the second node from a micro-service routing correlation spectrogram according to the identification information of the first node and the identification information of the second node, wherein the micro-service routing correlation spectrogram is constructed according to micro-service calling relations among different nodes;
The second acquisition module is used for acquiring the debugging information of the second node from the tracking stack of the second node based on the node address information; and
and the execution module is used for executing debugging operation on the first node based on the debugging information of the first node and the debugging information of the second node.
9. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-7.
10. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method according to any of claims 1-7.
11. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 7.
CN202310071826.6A 2023-01-13 2023-01-13 Micro service node debugging method, device, equipment and storage medium Pending CN116455794A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310071826.6A CN116455794A (en) 2023-01-13 2023-01-13 Micro service node debugging method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310071826.6A CN116455794A (en) 2023-01-13 2023-01-13 Micro service node debugging method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116455794A true CN116455794A (en) 2023-07-18

Family

ID=87122682

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310071826.6A Pending CN116455794A (en) 2023-01-13 2023-01-13 Micro service node debugging method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116455794A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117640413A (en) * 2024-01-26 2024-03-01 国网湖北省电力有限公司信息通信公司 Micro-service and database joint deployment method based on reinforcement learning in fog calculation

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117640413A (en) * 2024-01-26 2024-03-01 国网湖北省电力有限公司信息通信公司 Micro-service and database joint deployment method based on reinforcement learning in fog calculation
CN117640413B (en) * 2024-01-26 2024-04-26 国网湖北省电力有限公司信息通信公司 Micro-service and database joint deployment method based on reinforcement learning in fog calculation

Similar Documents

Publication Publication Date Title
US11269718B1 (en) Root cause detection and corrective action diagnosis system
CN101258708A (en) Performance evaluation of a network-based application
CN116455794A (en) Micro service node debugging method, device, equipment and storage medium
CN114490268A (en) Full link monitoring method, device, equipment, storage medium and program product
CN102662838B (en) The adjustment method of Flash and system in a kind of browser
CN115705190A (en) Method and device for determining dependence degree
CN116155628B (en) Network security detection method, training device, electronic equipment and medium
US20200117572A1 (en) Problem diagnosis technique of memory corruption based on regular expression generated during application compiling
CN109977005B (en) End-to-end test method, medium, device and computing equipment
CN114860732A (en) Key report processing method and device, computer equipment and storage medium
CN114116509A (en) Program analysis method, program analysis device, electronic device, and storage medium
CN112765100A (en) Method, system, computing device and medium for querying logs
CN114760233B (en) Service processing method, device, electronic equipment and storage medium
CN113535568B (en) Verification method, device, equipment and medium for application deployment version
CN116450533B (en) Security detection method and device for application program, electronic equipment and medium
CN114938341B (en) Environment detection method and device, electronic equipment and storage medium
CN117632445B (en) Request processing method and device, task execution method and device
US11645137B2 (en) Exception management in heterogenous computing environment
US20220291987A1 (en) Multi-tenant integration environment
CN115629983A (en) Test case set generation method, device, equipment and medium
CN112711487A (en) Data source management and control method and device, management and control server and storage medium
CN115529313A (en) Determination method and device of call link, electronic equipment and medium
CN115168089A (en) Fault processing method and device, electronic equipment and computer readable storage medium
CN114064484A (en) Interface testing method and device, electronic equipment and readable storage medium
CN115470076A (en) Code monitoring method and device, electronic equipment and computer storage medium

Legal Events

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