Method and device for acquiring network service state information, equipment and storage medium

By building a network model and generating a service status display chart, the problem of difficulty in evaluating network service stability and potential risks in the prior art is solved, and more efficient operation and maintenance and better service quality are achieved.

CN119728447APending Publication Date: 2025-03-28BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411836635.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The prior art is difficult to accurately evaluate the stability and potential risks of network services, and it is impossible to determine reasonable thresholds for performance performance based on the importance of service interfaces, resulting in limited operation and maintenance efficiency and service quality.

Method used

By extracting the target field information of the access request from the service log of the network service, a network model with the request identification as an edge and the service interface as a node is constructed, the resource consumption parameters and network analysis parameters of each target node are determined, and the network model is imaged to generate a service status display diagram.

Benefits of technology

It achieves more accurate determination of the stability and potential risks of network services, improves the operation and maintenance efficiency and service quality of network services, and can intuitively reflect the relationship between the importance of services and performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119728447A_ABST
    Figure CN119728447A_ABST
Patent Text Reader

Abstract

The invention provides a method and device for acquiring network service state information, equipment and a storage medium, and relates to the technical field of computers, in particular to the technical field of Internet, data analysis and network security. The specific implementation scheme is as follows: extracting target field information of a plurality of access requests from a service log of a network service; constructing a network model by taking the request identifier corresponding to the access request as an edge and the service interface as a node; determining a resource consumption parameter and a network analysis parameter of each target node in the network model; according to the resource consumption parameters and the network analysis parameters, performing visualized processing on the network model to obtain a service state display diagram; wherein the visual feature parameters of the labels corresponding to the target nodes in the service state display diagram are respectively related to the resource consumption parameters and the network analysis parameters. According to the embodiment of the invention, the stability and the potential risk of the network service can be more accurately determined, and the operation and maintenance efficiency and the service quality of the network service are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to the field of the Internet, data analysis, and network security technology. Background Art

[0002] With the popularization and rapid development of the Internet, online services have become an indispensable part of people's daily life and work. While providing convenience to users, these online services also face many technical challenges, one of which is how to ensure the stability of backend services. Summary of the invention

[0003] The present disclosure provides a method, apparatus, device and storage medium for acquiring network service status information.

[0004] According to one aspect of the present disclosure, a method for obtaining network service status information is provided, comprising:

[0005] Extracting target field information of multiple access requests from a service log of a network service; wherein the target field information includes at least a request identifier and a service interface;

[0006] A network model is constructed with the request identifier corresponding to the access request as the edge and the service interface as the node;

[0007] Determine resource consumption parameters and network analysis parameters for each target node in the network model;

[0008] According to resource consumption parameters and network analysis parameters, the network model is processed graphically to obtain a service status display diagram;

[0009] Among them, the visual feature parameters of the label corresponding to the target node in the service status display diagram are respectively related to the resource consumption parameters and the network analysis parameters.

[0010] According to another aspect of the present disclosure, there is provided a device for acquiring network service status information, including:

[0011] An extraction module, used to extract target field information of multiple access requests from a service log of a network service; wherein the target field information at least includes a request identifier and a service interface;

[0012] A construction module, used to construct a network model with the request identifier corresponding to the access request as an edge and the service interface as a node;

[0013] A calculation module, used to determine resource consumption parameters and network analysis parameters of each target node in the network model;

[0014] A graphical module is used to graphically process the network model according to resource consumption parameters and network analysis parameters to obtain a service status display diagram;

[0015] Among them, the visual feature parameters of the label corresponding to the target node in the service status display diagram are respectively related to the resource consumption parameters and the network analysis parameters.

[0016] According to another aspect of the present disclosure, there is provided an electronic device, comprising:

[0017] at least one processor; and

[0018] a memory communicatively connected to the at least one processor; wherein,

[0019] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute any method in the embodiments of the present disclosure.

[0020] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute any method according to the embodiments of the present disclosure.

[0021] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, which implements any method according to the embodiments of the present disclosure when executed by a processor.

[0022] According to the embodiments of the present disclosure, the stability and potential risks of network services can be determined more accurately, thereby improving the operation and maintenance efficiency and service quality of network services.

[0023] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0025] Figure 1 is a flowchart of a method for obtaining network service status information according to an embodiment of the present disclosure;

[0026] Figure 2 is a service status display diagram provided according to an embodiment of the present disclosure;

[0027] Figure 3 is a service status display diagram provided according to an embodiment of the present disclosure;

[0028] Figure 4 is a service status display diagram provided according to an embodiment of the present disclosure;

[0029] Figure 5 is a service status display diagram provided according to an embodiment of the present disclosure;

[0030] Figure 6 is a structural diagram of an apparatus for obtaining network service status information according to an embodiment of the present disclosure;

[0031] Figure 7 is a block diagram of an electronic device for implementing an embodiment of the present disclosure. DETAILED DESCRIPTION

[0032] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0033] Log data is very valuable in ensuring the stability of online Internet services. By deeply mining and analyzing log data, we can find the association and rules between access requests and backend services, so as to predict and prevent potential problems and failures. At the same time, by real-time monitoring and analysis of log data, we can promptly discover and solve problems and hidden dangers in backend services, so as to ensure the stability and availability of services.

[0034] In related technologies, the stability and performance of online services can only be analyzed by statistically analyzing preset indicators such as the processing time of the service interface, the status response code, and the probability of service failure, and drawing the year-on-year and month-on-month values ​​of the indicators to form a historical trend chart. Similar technical solutions can only estimate a threshold for the monitored indicators based on historical indicators and issue an alarm when the indicator exceeds the threshold. It is impossible to determine what kind of performance is reasonable based on the importance of the interface or service in the entire system.

[0035] In order to at least partially solve one or more of the above-mentioned problems and other potential problems, the embodiments of the present invention provide a method for obtaining network service status information. Utilizing the technical solutions of the embodiments of the present invention, the correlation between the importance of the service and the performance can be intuitively reflected, and the stability and potential risks of the service can be more accurately evaluated, which helps to ensure the overall performance of the service.

[0036] Figure 1 FIG. 1 is a flow chart of a method for obtaining network service status information provided by an embodiment of the present disclosure. Figure 1 As shown, the method comprises at least the following steps:

[0037] S101, extracting target field information of multiple access requests from a service log of a network service, wherein the target field information at least includes a request identifier and a service interface.

[0038] In the disclosed embodiments, the service log is a file that records events, operations, errors, requests, and other information generated during the operation of the network service. The service log is collected from the online network service. An access request is a request issued by a user or client to a network service, requesting access to a resource or to perform an operation. An access request typically includes the requested URL (Uniform Resource Locator), request method (GET, POST, etc.), request header, request body, etc. Target field information refers to the information field that needs special attention and extraction in each log record of the service log, which can be understood as a key field. The field information of the log record may include, but is not limited to:

[0039] Timestamp: The time when the request occurred.

[0040] Request ID (LogID): A unique identifier used to track and identify a single request (such as 1536662211).

[0041] Path: The URL path of the request.

[0042] Method: HTTP method (such as GET, POST).

[0043] Status Code: HTTP response status code, indicating the result of request processing.

[0044] Cost: The time it takes to process the request.

[0045] User Agent: Client information (such as browser type, operating system).

[0046] IP Address: The IP address of the request initiator.

[0047] Response Size: The size of the response data.

[0048] Error Message: If an error occurs during request processing, the error message is recorded.

[0049] Application name (Appname): The name of the backend module (such as G-go).

[0050] Protocol: The protocol used by the backend service network for transmission.

[0051] In network services, an interface (Application Programming Interface, API) usually refers to the interface (i.e., service interface) provided by the backend service, which allows external applications or front-ends to interact with the backend service and can be used as a unique name to identify the backend service. APIs can be interfaces of different styles such as RESTful API, SOAP API, GraphQL API, etc. In RESTful API design, the path is part of the API, specifically the endpoint of the API. Each API endpoint has its own specific path to identify a specific resource or service. In other words, the service interface can be obtained from the path information of each log record. The extracted data examples are as follows: 10001582749917312677, MidwayService / bifrost, 404, go-graph, PRPC, POST. The above fields are Logid, api, cost, appname, protocol, and method, respectively.

[0052] S102: Build a network model with the request identifier corresponding to the access request as an edge and the service interface as a node.

[0053] In the embodiment of the present disclosure, when analyzing a complex network system, each service interface of the backend service is used as a node, and the access request between nodes is used as an edge for modeling, that is, the definition of a node is the service interface of each accessed backend service, and the definition of an edge is that each time a request is triggered, an edge is recorded. The edge data can be the logid and the API of the backend service it accesses.

[0054] The node data can be the attribute information of the API, such as the interface name, application name, protocol, and time consumption. The network model (also called a graph) constructed in this way can reflect the number of access requests to each API.

[0055] S103: Determine resource consumption parameters and network analysis parameters of each target node in the network model.

[0056] In the disclosed embodiments, the resource consumption parameter may be obtained based on the time taken by the service interface to process the access request, or may be the status code of the service response. The resource consumption parameter may also be understood as a parameter that reflects the performance of the interface. The network analysis parameter may be various indicators used in network analysis or graph theory to describe the position, importance, connectivity and other characteristics of a node in a network, such as degree, PageRank (PR value), and indicators obtained by analyzing nodes using a centrality algorithm. Degree refers to the number of edges connected to a node. The network analysis parameter may also be understood as a parameter that reflects the importance of the service interface.

[0057] S104: Graphically process the network model according to the resource consumption parameters and network analysis parameters of the target node to obtain a service status display diagram.

[0058] Among them, the visual feature parameters of the label corresponding to the target node in the service status display diagram are related to the resource consumption parameters and the network analysis parameters.

[0059] In the embodiment of the present disclosure, when the constructed network model is generated as a visual service status display diagram, the resource consumption parameters and network analysis parameters of each target node affect the visual feature parameters of the label corresponding to the node, so that the service status display Figure 1 On the one hand, it can intuitively reflect the relationship between the service interfaces corresponding to each node, and on the other hand, it can simultaneously show the performance and importance of the service interface.

[0060] According to the solution of the embodiment of the present disclosure, complex network system modeling is used to analyze the log data of network services. By calculating parameters such as the degree and PR value in the graph and analyzing the node roles, a service status display graph is generated using a visualization tool. The service status display graph can be used to more accurately determine the stability and potential risks of network services, thereby improving the operation and maintenance efficiency and service quality of network services.

[0061] The network service related information obtained in this embodiment is information that has been made public or authorized to be obtained and used, complies with the provisions of relevant laws and regulations, and does not violate public order and good morals.

[0062] In a possible implementation, S102 constructs a network model with the request identifier corresponding to the access request as an edge and the service interface as a node, further comprising the steps of:

[0063] S1021. Determine multiple target nodes according to the service interface.

[0064] S1022. According to the request identifier associated with each target node, construct a target edge connected to the corresponding target node.

[0065] S1023. Construct a network model according to the target nodes and target edges.

[0066] In the disclosed embodiment, firstly, the access identifier and the corresponding service interface are determined according to the target field information of each access request, and all the service interfaces found are taken as a service interface set, from which at least some service interfaces are selected as target nodes. For each target node, each request to access the service interface corresponding to the target node is taken as a target edge of the target node.

[0067] After determining the target nodes and target edges, you can use a graph layout algorithm to determine the position of each target node in the graph. Graph layout can optimize the arrangement of nodes so that the graph is both beautiful and clearly displays the relationship between nodes. Common layout algorithms include force-directed layout, hierarchical layout, circular layout, and tree layout. You can also manually adjust the node position according to specific business needs or data characteristics, or use predefined rules to determine the node spacing. For example, frequently accessed nodes may be placed in the center, and nodes with less frequent access may be placed at the edge.

[0068] It should be noted that abnormal data, noise data, invalid data, etc. in the service log can be filtered, and the filtered data can be used to build a network model.

[0069] According to the solution of the embodiment of the present disclosure, the association and regularity between access requests and backend services are mined from access logs through a network model, thereby improving the accuracy and timeliness of obtaining network service status information.

[0070] In a possible implementation, S1023 constructs a network model according to the target node and the target edge, further comprising the steps of:

[0071] When any access request involves accessing multiple service interfaces, an edge pointing to the node is constructed for each node corresponding to the multiple service interfaces, wherein the request identifiers of the edges are the same.

[0072] A directed graph type network model is constructed based on the target node, target edge and the direction of the target edge.

[0073] In the disclosed embodiment, when an access request involves multiple services of the backend, an edge is constructed for each related node, thereby more accurately reflecting the access volume of each service interface. At the same time, each edge points to the node to be accessed, forming a directed graph. Correspondingly, the service status display diagram generated by S104 is also a directed graph. In a directed graph, the number of edges pointing to the node is called the in-degree; otherwise, it is called the out-degree. The size of the degree is equal to the sum of the in-degree and out-degree of a certain point. The in-degree of a node indicates the number of times the node is visited. The weight of the edge indicates the number of repeated visits in a request. The directed graph can clearly define the in-degree and out-degree of a node, and the in-degree can reflect the relative access frequency of the service interface in the system. At the same time, the in-degree is an important component of PageRank, and the PR value can well reflect the value of the service interface in the entire backend service network. Although the out-degree is not a factor that directly determines the PR value, it affects the weight distribution of the link. Each page evenly distributes its PR value to the pages it links to. Therefore, a page that links to many pages (high out-degree) will disperse its PR value to multiple pages, so that each linked page will get a smaller PR value.

[0074] According to the solution of the embodiment of the present disclosure, the directed graph can better reflect the relative access frequency of each service interface or the value it possesses in the network.

[0075] In a possible implementation, S1023 obtains a network model according to the target node and the target edge, further including:

[0076] In the case where any access request involves accessing multiple service interfaces, a target edge connecting the corresponding multiple service interfaces is constructed according to the dependency relationship between the multiple service interfaces.

[0077] According to the target nodes and target edges, an undirected graph type network model is constructed.

[0078] In the disclosed embodiment, for the analysis of network services, the nodes corresponding to the backend services, that is, the network relationship between APIs, need to be focused on. In one example, an access request logid_0 is initiated by user U, and the request involves three service interfaces S1, S2, and S3 at the same time, which can be described as: logid_0->S1, logid_0->S2, logid_0->S3. In the directed graph, logid_0 requested the backend service three times, and the corresponding backend services are S1, S2, and S3, respectively. An edge is constructed for each of these three nodes, and the request identifiers of the three edges are the same. In the directed graph, S1, S2, and S3 are not related. But in reality, there may be an association or dependency relationship between the three service interfaces. For example, it is necessary to access S1 first, then S2, and finally S3, S1->S2->S3. In this example, S2 serves as an intermediate bridge between S1 and S3. Therefore, using an undirected graph to analyze the network can dig out more community characteristics between nodes.

[0079] According to the solution of the embodiment of the present disclosure, the community characteristics between nodes and the nodes that play a bridge role can be mined using an undirected graph, thereby improving the accuracy of obtaining the association relationship between service interfaces.

[0080] In a possible implementation, S1022 constructs a target edge connected to the corresponding target node according to the request identifier associated with each target node, including the steps of:

[0081] According to the request identifier associated with each target node, a target edge is constructed with a first end connected to the target node.

[0082] Based on the sequence number of the request identifier and / or the continuity of the corresponding timestamp, the previous node of the target edge is determined.

[0083] The second end of the target edge is connected to the previous node to obtain a connection relationship between the target node and the previous node.

[0084] In the disclosed embodiment, identifying and establishing connections between nodes can better reflect the association relationship between nodes. In contrast, it can be implemented based on logid or timestamp continuity. Specifically, based on logid continuity: logid can be used as a key to identify the request flow path. By analyzing the logid field in the log, it can be determined: which requests belong to the same user operation or service call chain. How each request flows between different service interfaces. Based on timestamp: Use the timestamp of the request to help determine the order and flow path of the access request. Requests that are adjacent in time are usually part of the same request chain.

[0085] You can also analyze the logid of each request to see how they go from one service interface to another, thereby establishing edges. For example, if the log shows a request from service A to service B and then to service C, then there should be edges from A to B and from B to C in the graph. Similarly, you can identify the calling relationship between services by analyzing the log. For example, service A calls service B, which may appear in the log as a request for service A followed by a request for service B.

[0086] For a target edge whose previous node cannot be determined, its second end is set as a free end, and the position of the second end point in the image can be determined according to the graph layout algorithm.

[0087] According to the solution of the embodiment of the present disclosure, a network model with service interfaces as nodes and access requests as edges can be accurately and effectively constructed and analyzed.

[0088] In a possible implementation, S103 determines the resource consumption parameters and network analysis parameters of each target node in the network model, further comprising the steps of:

[0089] S1031. Determine a resource consumption parameter according to the processing time of the access request corresponding to the target node.

[0090] S1032. Determine network analysis parameters according to the topological structure of the network model.

[0091] In the embodiment of the present disclosure, the processing time can be any statistical indicator of the time consumed by the target node to process all access requests, which can be an average value, a median value, or an extreme value. Taking the average value as an example, the average value of the cost of each service interface processing all access requests is counted as the resource consumption parameter of this node, in milliseconds. In one example, the code script to implement S1031 can be:

[0092] #search_server.csv contains the original request data of each service log;

[0093] #d_3.csv is to intercept the data except cost;

[0094] do

[0095] uri=`echo$line|awk'{print$1}'';

[0096] avg_time=`grep"$uri"search_server.csv|awk-F',"BEGIN{sum=0}{sum=sum+$3;}END{print sum / NR}'`

[0097] echo "$line$avg_time"

[0098] done<d_3.csv> d_4.csv

[0099] The input file in the above script is search_server.csv: contains the original request data, each line may include URL, other fields and response time (cost). d_3.csv: intercepts the data except cost from search_server.csv. search_server.csv can be the service log, and d_3.csv can be obtained in step S101.

[0100] Script logic: Use a do loop to read each line from d_3.csv and assign it to the line variable. Extract the first field ($1) of the current line, assuming it is a URL, and assign it to uri. Use the grep command to find all lines matching uri in search_server.csv. Use the awk command to calculate the average value of the third column (assuming it is cost) of the matching lines:

[0101] BEGIN{sum=0}: Initialize a variable sum to 0.

[0102] {sum=sum+$3;}: For each row, add the value of the third column to sum.

[0103] END{print sum / NR}: After processing all rows, output the sum divided by the number of rows (NR), which is the average value.

[0104] Output the original line (line) plus the calculated average time (avg_time) to d_4.csv.

[0105] Thus, for each URL in d_3.csv, calculate the average response time for all requests to that URL in search_server.csv. Add the calculated average response time to each row of data in d_3.csv to generate a new CSV file d_4.csv, which contains the original data plus the average response time.

[0106] According to the solution of the embodiment of the present disclosure, the average time consumed by each service interface to process an access request is used as a resource consumption parameter, which improves the data richness of the data set and simplifies the data acquisition process.

[0107] In a possible implementation, S1032 determines the network analysis parameters according to the topological structure of the network model, including at least one of the following methods:

[0108] At least one of an in-degree parameter, an out-degree parameter, and a degree centrality parameter of each target node is determined according to the number of edges connected to the target node in the network model.

[0109] According to the web page level information corresponding to the target node, the importance parameter of the target node is determined.

[0110] According to the distance information between the target node and its adjacent nodes, the closeness centrality parameter of the target node is determined.

[0111] According to the node information connected to the target node, the betweenness centrality parameter of the target node is determined.

[0112] In the disclosed embodiment, degree refers to the number of edges connected to a node. In a directed graph, the number of edges pointing to the node is called in-degree; otherwise, it is called out-degree. The size of the degree is equal to the sum of the in-degree and out-degree of a point. It can be regarded as a node's access parameter or connectivity parameter.

[0113] Page level information: that is, PR value, an indicator for evaluating the importance of a web page, which can be regarded as an importance parameter or an influence parameter.

[0114] Centrality Algorithms: Used to identify the role of specific nodes in the graph and their impact on the network. They can be used to identify the most important nodes, including:

[0115] Degree Centrality: Using degree as the standard centrality indicator, Degree counts the number of edges directly connected to a node, including out-degree and in-degree, which can also be regarded as a connectivity parameter or a visit volume parameter.

[0116] Closeness: is a method to detect nodes that can effectively propagate information through subgraphs. Closeness centrality measures the closeness of a node to all other nodes (the inverse of the distance). A node with high closeness centrality has the minimum distance to all other nodes. It can be used to indicate the closeness of a node to other nodes and can be regarded as a location parameter or a propagation capacity parameter.

[0117] Betweenness: is a method to detect the degree of influence of a node on the flow of information or resources in a graph. It is usually used to find bridge nodes that connect two parts of a graph. Because many times, the most important "gears" of a system are not those nodes with the best status and performance, but some seemingly inconspicuous "media" nodes that control the flow of resources or information. It can be used to represent the "bridge" role of a node in a network, and can be regarded as an influence parameter or a control parameter.

[0118] Network analysis parameters include but are not limited to the above parameter indicators.

[0119] According to the solution of the embodiment of the present disclosure, the location, importance, connectivity and other characteristics of the node in the network are analyzed by parameters of multiple dimensions, which improves the accuracy of the analysis results and more accurately obtains the importance of the service interface in the network model.

[0120] In a possible implementation, S104 graphically processes the network model according to the resource consumption parameter and the network analysis parameter to obtain a service status display diagram, further comprising the steps of:

[0121] S1041. Determine visual feature parameters of the label corresponding to the target node according to the resource consumption parameters and the network analysis parameters.

[0122] S1042. Use visualization tools to graphically process network models;

[0123] S1043. Generate a label of the target node according to the visual feature parameters to obtain a service status display diagram.

[0124] In the disclosed embodiment, the resource consumption parameters and network analysis parameters of the target node are directly reflected in the visual feature parameters of the label corresponding to the target node, so that the resource consumption parameters and network analysis parameters of the node can be intuitively known from the visual features of the label in the service status display diagram. The visual feature parameters of the label may include: color, font size, thickness, opacity, shadow, highlight, etc. The resource consumption parameters and network analysis parameters can each determine a visual feature parameter, so as to be reflected in the service status display diagram from different angles. For example, the thickness is determined according to the resource consumption parameter, and the font size is determined according to the network analysis parameter. The same visual feature parameter can also be determined jointly, for example, a visual feature parameter is determined according to the sum of the two, or a visual feature parameter is determined by taking the larger of the two.

[0125] The network model can be graphically processed using visualization tools such as Graphviz, D3.js, Gephi, Cytoscape, etc., so as to visualize the network model. When defining the node, the corresponding attributes of the label corresponding to the target node are set according to the visual feature parameters determined by the resource consumption parameters and the network analysis parameters. The network model graph is generated using the rendering function of the tool.

[0126] In one example, the font size of the label corresponding to the target node is determined according to the PR value of the target node; the network model is visualized using a visualization tool and the label of the target node is generated according to the visual feature parameters of the target node to obtain a service status display diagram, such as Figure 2 As shown in the figure. The font size of the label of each node in the figure is obtained according to the PR value. The larger the PR value, the larger the label. Therefore, according to the label size, it is very intuitive to see which important nodes need to focus on the characteristics.

[0127] Resource consumption parameters can affect other visual features of labels, such as color, thickness, transparency, and highlight. For example, the opacity of labels is set according to resource consumption parameters. The lower the value of resource consumption parameters, the lower the opacity, so that the labels of nodes with excellent performance are closer to transparent and difficult to identify in the graph. In this way, nodes that do not need to be optimized and paid attention to can be filtered out. Conversely, the labels of nodes with poor performance have higher opacity and are easier to identify and recognize. Combined with the font size of the label, it is easier to identify nodes that deserve attention and optimization from the service status display diagram.

[0128] According to the solution of the embodiment of the present disclosure, the performance and importance of the service interface are intuitively reflected in the visual features of the labels in the service status display diagram, so as to obtain an information-rich and easy-to-understand network model graph. The overall status of the network model can be quickly grasped without in-depth data analysis. Users can identify key nodes or service interfaces that need attention more quickly and easily, thereby improving user experience.

[0129] In a possible implementation, S1041 determines the visual feature parameters of the label corresponding to the target node according to the resource consumption parameter and the network analysis parameter, further comprising:

[0130] According to the network analysis parameters, the font size parameters of the corresponding labels of the target nodes in the service status display diagram are determined.

[0131] According to the resource consumption parameters, the font color parameters of the corresponding labels of the target nodes in the service status display diagram are determined.

[0132] Among them, the value of the font size parameter is positively correlated with the value of the network analysis parameter. The depth of the font color parameter is positively correlated with the value of the resource consumption parameter.

[0133] In the disclosed embodiment, the font size of the label is set by the network analysis parameter. For example, when the network analysis parameter is the in-degree, the larger the value of the in-degree of the node, the larger the font size of the label, which can indicate that the node is highly important from the perspective of access frequency. For another example, when the network analysis parameter is Betweenness, the larger the value of Betweenness, the larger the font size of the label, which can indicate that the node is highly important from the perspective of bridge function and influence.

[0134] The color of the label is set based on the resource consumption parameter. For example, when the resource consumption parameter is the cost value, the larger the cost value, the darker the color of the label, which indicates that the performance of the node is poor. Combined with the font size of the node label, if the font size of the label is also large, then this node is a service that needs to be focused on and optimized. On the contrary, if the font is large but the color is light (best to be invisible), it means that the node plays a very critical role in practice and performs well online. Resource consumption parameters and network analysis parameters can be selected from the above-mentioned parameters according to business needs to analyze network services from a variety of different dimensions.

[0135] In one example, Figure 2 Based on the example, cost is used as the resource consumption parameter, and the color depth of the label is set according to the cost value. The service status diagram obtained by combining cost is as follows Figure 3 As shown. Figure 3 It can be determined which important services take a long time to process. This can help identify the core services in the system that need performance improvements, maximize front-end response, and thus expand throughput and service capabilities.

[0136] According to the solution of the embodiment of the present disclosure, by associating the font size and color of the label with the resource consumption parameters and the network analysis parameters, the service interface that needs to be optimized can be intuitively seen from the service status display diagram, thereby increasing the information density of the graphic and reducing the amount of text information that the user needs to browse. The user can obtain more information in a single view, so as to quickly make decisions on resource allocation, performance optimization, troubleshooting, etc. based on visual features.

[0137] In a possible implementation, the method for obtaining network service status information further includes: determining an optimization solution according to a service status display diagram.

[0138] In the embodiment of the present disclosure, Figure 3 In the example, to more easily view the service name, Figure 3 After removing the edges in Figure 4 .exist Figure 3 All the labels that can be seen clearly (dark color, large node font) are services that need to be paid special attention to. Figure 5 is a screenshot of its corresponding undirected graph, from Figure 5 It can be seen that the four services api_bdbox, s, exgraph_upload_naquestion, and ajax_question form a strongly related network, but at the same time, the overall performance processing capabilities of these four services are not high, not as good as the overall average performance. In terms of architecture, it can be considered that the subsystem composed of these services should have a lot of room for optimization, both in terms of performance and dependencies. Figure 3 , 4 , 5 can also be seen:

[0139] 1. ajax_similardetailnew and img_query are the two best backend services. Their processing performance is also very high, and the overall service throughput is large. The design and actual performance of these two services are very good.

[0140] 2. The ajax_node service has a high PageRank ranking, but the service processing time is relatively long. This high-value service has room for independent performance improvement.

[0141] 3. The three services exgraph_upload_naquestion, vsapi_na_question, and vsapi_na_upload are high-value services, but their overall performance is poor. At the same time, they are closely related and can be designed as a whole to improve overall performance.

[0142] 4. The api_zyb_message service has the highest intermediary centrality in the entire backend service system, which means that the security value of this service is very high. Its failure may cause other services in the system to fail to work properly, and the correlation is relatively large. In the design and operation and maintenance, this service should maintain a certain redundancy or have a backup service. In addition, from the analysis, the performance of the current service is still very good.

[0143] 5. api_bdbox is a backend service that also has a high degree of intermediary centrality. In addition to ensuring service redundancy, it is also necessary to pay attention to improving performance. Its improvement can increase the throughput of the overall system.

[0144] 6. The four services of api_bdbox, s, exgraph_upload_naquestion, and ajax_question are a strongly coupled subsystem, which plays an important role in the service network formed by the overall backend. However, this subsystem processes requests relatively slowly, which has a long-tail effect on the overall performance. At the same time, the subnetwork formed by these services is the biggest instability factor and risk point of the entire backend service. You can consider refactoring these services to reduce the dependency coupling between systems and improve the processing capacity of a single service.

[0145] Therefore, through analysis, we found out the services with security risks in the overall system of network services, as well as the evaluation effects of key services. In addition, through network characteristics, we found that the services with key bridging functions had poor performance; at the same time, some of the system designs also had strong dependencies, resulting in weak subsystem service capabilities. If improvements are made based on the analysis, the overall performance of the service will be greatly improved, and the service stability will also be greatly improved.

[0146] According to the scheme of the embodiment of the present disclosure, complex network system modeling is used to analyze data, and the node roles are analyzed by calculating the degree, pagerank, and centrality algorithms in the graph. Then, visualization tools are used to intuitively reflect the correlation and role of the data in the entire network. Multi-dimensional data comparison can be used to derive systematic optimization and improvement measures, and non-traditional single indicators can be analyzed. Multi-dimensional data analysis can better characterize the current status of the display system.

[0147] Utilizing efficient complex network science for analysis, it has lower costs than knowledge graphs and deep learning modeling, does not rely on external professional experience data, does not rely heavily on complex data management and processing, and does not rely heavily on other technologies such as log processing such as collection and storage.

[0148] It should be noted that in related technologies, the importance of services is often determined through manual labeling. In addition, for data that need to be observed, a threshold is estimated based on historical indicators and an alarm is issued. This operation is highly subjective, and with product iterations, the importance may shift. In addition, for the data analysis middle platform, it is usually difficult to obtain the importance of specific business interfaces. Therefore, related technologies can only make conclusions and analyze the current results, and do not have predictions and long-term improvement suggestions. Only simple improvement suggestions for the current interface can be given based on the current low stability or increased time consumption of a certain interface. On the other hand, since many service interfaces have internal exchange characteristics, isolated analysis of individual interfaces can only solve some problems to a limited extent.

[0149] Figure 6 FIG. 1 is a schematic diagram of a structure of a network service stability analysis device provided according to an embodiment of the present disclosure. Figure 6 As shown, the device at least includes:

[0150] The extraction module 601 is used to extract target field information of multiple access requests from the service log of the network service, wherein the target field information at least includes a request identifier and a service interface.

[0151] The construction module 602 is used to construct a network model with the request identifier corresponding to the access request as an edge and the service interface as a node.

[0152] The calculation module 603 is used to determine the resource consumption parameters and network analysis parameters of each target node in the network model.

[0153] The graphical module 604 is used to graphically process the network model according to the resource consumption parameters and the network analysis parameters to obtain a service status display diagram.

[0154] Among them, the visual feature parameters of the label corresponding to the target node in the service status display diagram are related to the resource consumption parameters and the network analysis parameters.

[0155] In a possible implementation, the construction module 602 is used to:

[0156] According to the service interface, determining a plurality of target nodes;

[0157] According to the request identifier associated with each of the target nodes, construct a target edge connected to the corresponding target node;

[0158] The network model is constructed according to the target node and the target edge.

[0159] In a possible implementation, the construction module 602 is used to:

[0160] In the case where any of the access requests involves accessing multiple service interfaces, for the target nodes corresponding to the multiple service interfaces, construct a target edge pointing to the target node respectively; wherein the request identifiers of the target edges are the same;

[0161] The network model of the directed graph type is constructed according to the target node, the target edge and the direction of the target edge.

[0162] In a possible implementation, the construction module 602 is used to:

[0163] In the case where any of the access requests involves accessing a plurality of the service interfaces, constructing the target edges corresponding to the service interfaces according to the dependency relationships between the plurality of service interfaces;

[0164] According to the target node and the target edge, the network model of undirected graph type is constructed.

[0165] In a possible implementation, the construction module 602 is used to:

[0166] According to each request identifier associated with each target node, construct a target edge whose first end is connected to the target node;

[0167] Determine a previous node of the target edge based on at least one of a sequence number of the request identifier and continuity of a corresponding timestamp;

[0168] The second end of the target edge is connected to the previous node to obtain a connection relationship between the target node and the previous node.

[0169] In a possible implementation, the calculation module 603 is used to:

[0170] Determining the resource consumption parameter according to the processing time of the access request corresponding to the target node;

[0171] The network analysis parameters are determined according to the topological structure of the network model.

[0172] In a possible implementation, the calculation module 603 is used to:

[0173] Determine at least one of an in-degree parameter, an out-degree parameter, and a degree centrality parameter of each target node according to the number of target edges connected to the target node in the network model;

[0174] Determining an importance parameter of the target node according to the web page level information corresponding to the target node;

[0175] Determine the closeness centrality parameter of the target node according to the distance information between the target node and the adjacent nodes;

[0176] According to the node information connected to the target node, a betweenness centrality parameter of the target node is determined.

[0177] In a possible implementation, the graphical module 604 is used to:

[0178] Determining the visual feature parameter of the label corresponding to the target node according to the resource consumption parameter and the network analysis parameter;

[0179] Using visualization tools to graphically process the network model;

[0180] A label of the target node is generated according to the visual feature parameters to obtain the service status display diagram.

[0181] In a possible implementation, the graphical module 604 is used to:

[0182] Determine, according to the network analysis parameter, a font size parameter of a label corresponding to the target node in the service status display diagram;

[0183] According to the resource consumption parameter, a font color parameter of a label corresponding to the target node in the service status display diagram is determined.

[0184] Among them, the value of the font size parameter is positively correlated with the value of the network analysis parameter. The depth of the font color parameter is positively correlated with the value of the resource consumption parameter.

[0185] For the description of specific functions and examples of each module and submodule of the device in the embodiment of the present disclosure, reference can be made to the relevant description of the corresponding steps in the above method embodiment, which will not be repeated here.

[0186] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0187] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0188] Figure 7A schematic block diagram of an example electronic device 700 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0189] like Figure 7 As shown, the device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0190] A number of components in the device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0191] The computing unit 701 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods and processes described above, such as a method for obtaining network service status information. For example, in some embodiments, the method for obtaining network service status information may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 700 via ROM 702 and / or communication unit 709. When the computer program is loaded into RAM 703 and executed by the computing unit 701, one or more steps of the method for obtaining network service status information described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform a method for obtaining network service status information in any other appropriate manner (e.g., by means of firmware).

[0192] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0193] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0194] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0195] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0196] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0197] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0198] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0199] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the principles of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A method for obtaining network service status information, comprising: Extracting target field information of multiple access requests from a service log of a network service; wherein the target field information at least includes a request identifier and a service interface; Constructing a network model with the request identifier corresponding to the access request as an edge and the service interface as a node; Determining resource consumption parameters and network analysis parameters for each target node in the network model; According to the resource consumption parameter and the network analysis parameter, the network model is processed graphically to obtain a service status display diagram; Among them, the visual feature parameters of the label corresponding to the target node in the service status display diagram are respectively related to the resource consumption parameter and the network analysis parameter.

2. The method according to claim 1, wherein: The step of constructing a network model with the request identifier corresponding to the access request as an edge and the service interface as a node includes: According to the service interface, determining a plurality of target nodes; According to the request identifier associated with each of the target nodes, construct a target edge connected to the corresponding target node; The network model is constructed according to the target node and the target edge.

3. The method according to claim 2, wherein: The step of constructing the network model according to the target node and the target edge includes: In the case where any of the access requests involves accessing multiple service interfaces, for each of the target nodes corresponding to the service interfaces, a target edge pointing to the target node is constructed; wherein the request identifiers of the target edges are the same; The network model of the directed graph type is constructed according to the target node, the target edge and the direction of the target edge.

4. The method according to claim 2, wherein: The step of constructing the network model according to the target node and the target edge includes: In the case where any of the access requests involves accessing a plurality of the service interfaces, constructing the target edges corresponding to the service interfaces according to the dependency relationships between the service interfaces; According to the target node and the target edge, the network model of undirected graph type is constructed.

5. The method according to any one of claims 2 to 4, wherein: The step of constructing a target edge connected to the corresponding target node according to the request identifier associated with each target node includes: According to each request identifier associated with each target node, construct a target edge whose first end is connected to the target node; Determine a previous node of the target edge based on at least one of a sequence number of the request identifier and continuity of a corresponding timestamp; The second end of the target edge is connected to the previous node to obtain a connection relationship between the target node and the previous node.

6. The method according to claim 1, wherein: The determining of resource consumption parameters and network analysis parameters of each target node in the network model includes: Determining the resource consumption parameter according to the processing time of the access request corresponding to the target node; The network analysis parameters are determined according to the topological structure of the network model.

7. The method according to claim 6, wherein: Determining the network analysis parameters according to the topological structure of the network model includes at least one of the following methods: Determine at least one of an in-degree parameter, an out-degree parameter, and a degree centrality parameter of each target node according to the number of target edges connected to the target node in the network model; Determining an importance parameter of the target node according to the web page level information corresponding to the target node; Determine the closeness centrality parameter of the target node according to the distance information between the target node and the adjacent nodes; According to the node information connected to the target node, a betweenness centrality parameter of the target node is determined.

8. The method according to claim 1, wherein: The processing of the network model by graphics according to the resource consumption parameter and the network analysis parameter to obtain a service status display diagram includes: Determining the visual feature parameter of the label corresponding to the target node according to the resource consumption parameter and the network analysis parameter; Using visualization tools to graphically process the network model; A label of the target node is generated according to the visual feature parameters to obtain the service status display diagram.

9. The method according to claim 8, wherein: The step of determining the visual feature parameter of the label corresponding to the target node according to the resource consumption parameter and the network analysis parameter includes: Determine, according to the network analysis parameter, a font size parameter of a label corresponding to the target node in the service status display diagram; According to the resource consumption parameter, a font color parameter of a label corresponding to the target node in the service status display diagram is determined.

10. A device for obtaining network service status information, comprising: An extraction module, used to extract target field information of multiple access requests from a service log of a network service; wherein the target field information at least includes a request identifier and a service interface; A construction module, used to construct a network model with the request identifier corresponding to the access request as an edge and the service interface as a node; A calculation module, used to determine resource consumption parameters and network analysis parameters of each target node in the network model; A graphical module, used for graphically processing the network model according to the resource consumption parameters and the network analysis parameters to obtain a service status display diagram; Among them, the visual feature parameters of the label corresponding to the target node in the service status display diagram are respectively related to the resource consumption parameter and the network analysis parameter.

11. The device according to claim 10, wherein: The building blocks are used to: According to the service interface, determining a plurality of target nodes; According to the request identifier associated with each of the target nodes, construct a target edge connected to the corresponding target node; The network model is constructed according to the target node and the target edge.

12. The device according to claim 11, wherein The building blocks are used to: In the case where any of the access requests involves accessing multiple service interfaces, for the target nodes corresponding to the multiple service interfaces, construct a target edge pointing to the target node respectively; wherein the request identifiers of the target edges are the same; The network model of the directed graph type is constructed according to the target node, the target edge and the direction of the target edge.

13. The device according to claim 11, wherein: The building blocks are used to: In the case where any of the access requests involves accessing a plurality of the service interfaces, constructing the target edges corresponding to the service interfaces according to the dependency relationships between the plurality of service interfaces; According to the target node and the target edge, the network model of undirected graph type is constructed.

14. The device according to any one of claims 11 to 13, wherein: The building blocks are used to: According to each request identifier associated with each target node, construct a target edge whose first end is connected to the target node; Determine the previous node of the target edge based on at least one of the sequence number of the request identifier and the continuity of the corresponding timestamp; The second end of the target edge is connected to the previous node to obtain a connection relationship between the target node and the previous node.

15. The device according to claim 10, wherein: The calculation module is used for: Determining the resource consumption parameter according to the processing time of the access request corresponding to the target node; The network analysis parameters are determined according to the topological structure of the network model.

16. The device according to claim 15, wherein: The calculation module is used for: Determine at least one of an in-degree parameter, an out-degree parameter, and a degree centrality parameter of each target node according to the number of target edges connected to the target node in the network model; Determining an importance parameter of the target node according to the web page level information corresponding to the target node; Determine the closeness centrality parameter of the target node according to the distance information between the target node and the adjacent nodes; According to the node information connected to the target node, a betweenness centrality parameter of the target node is determined.

17. The device according to claim 10, wherein: The graphical module is used for: Determining the visual feature parameter of the label corresponding to the target node according to the resource consumption parameter and the network analysis parameter; Using visualization tools to graphically process the network model; A label of the target node is generated according to the visual feature parameters to obtain the service status display diagram.

18. The device according to claim 17, wherein: The graphical module is used for: Determine, according to the network analysis parameter, a font size parameter of a label corresponding to the target node in the service status display diagram; According to the resource consumption parameter, a font color parameter of a label corresponding to the target node in the service status display diagram is determined.

19. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 9.

20. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-9.

21. 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 9.