A method, device, server and storage medium for business optimization processing
By obtaining and optimizing the total time consumption of business processing paths and optimizing the longest path, the problem of long processing time caused by complex paths in large business service platforms is solved, and the processing efficiency of the overall business platform is improved.
Patent Information
- Application Number
- CN202211405192.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-10
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2042-11-10
AI Technical Summary
In large-scale business service platforms, the existence of multiple business systems leads to complex business processing paths, making it difficult to effectively shorten processing time and affecting overall processing capabilities.
By obtaining the chain log in the business processing request, the total time consumed by each processing path is calculated, and the path with the longest processing time is optimized, and the optimized path is used to process the business.
It improves the processing capability of target business and enhances the processing efficiency of the overall business platform.
Smart Images

Figure CN115766879B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, server, and storage medium for service optimization processing. Background Art
[0002] In some large-scale business service platforms, the diverse needs of clients necessitate the presence of multiple business systems with corresponding functions on the server-side business platform. From the time a transaction is initiated by a user's client to its completion on the server-side business platform, the processing path often spans several business systems. Complex transactions require the coordinated implementation of multiple such paths. For a business platform, the shorter the transaction processing time, the greater the volume of transactions it can handle within a given period. Therefore, the processing time of a single transaction can impact the processing capacity of the entire business platform.
[0003] For a business that requires the coordinated processing of multiple processing paths, multiple processing paths need to be carried out simultaneously. How to effectively shorten the processing time of the business and thus optimize the processing capacity of the entire business platform has become a technical problem that urgently needs to be solved. Summary of the Invention
[0004] The present application provides a method, device, server and storage medium for optimizing business processing, which are used to solve the technical problem of low business platform processing efficiency caused by increasingly complex business processes in the prior art.
[0005] In a first aspect, the present application provides a service optimization processing method, comprising:
[0006] Obtaining a business processing request, wherein the business processing request includes: an identifier of a target business;
[0007] Obtaining, according to the service processing request, a chain log corresponding to the identifier of the target service, wherein the chain log includes a processing path corresponding to the target service and service execution time of each node corresponding to the processing path;
[0008] For each of the processing paths, obtaining a performance coefficient of the business system corresponding to each node in the processing path;
[0009] Obtain the total time consumption corresponding to each processing path based on the service execution time consumption of the node corresponding to each processing path and the performance coefficient of the service system corresponding to the service node, and select the processing path with the longest total time consumption as the processing path to be optimized;
[0010] The processing path to be optimized is optimized, and the target business is processed accordingly using the optimized processing path and other processing paths in the chain log except the processing path to be optimized.
[0011] In a specific embodiment, for each processing path, the service execution time t of the corresponding node i under the processing path is (i) , the performance coefficient k of the business system j corresponding to the business node i j(i) , using the following formula:
[0012] T=∑t (i) *k j(i)
[0013] Obtain the total time consumed by the processing path T;
[0014] Where i is a positive integer, k j(i) A positive number less than or equal to 1.
[0015] In a specific embodiment, the performance of the service system includes: the utilization rate of the central processing unit (CPU), the memory utilization rate, and the ratio of the number of users actually carried to the number of concurrent users that can be carried.
[0016] In a specific embodiment, the method further comprises:
[0017] Obtaining a chain log establishment request, the chain log establishment request including: a service identifier to be established, and a processing path corresponding to the service identifier to be established;
[0018] According to the chain log establishment request, for each processing path, obtain the burying point identifier of each first node and the first node that have a preset call relationship when executing the business corresponding to the business identifier to be established under the processing path, and obtain the first burying point log according to the burying point identifier of the first node;
[0019] According to the first burial point log corresponding to the first node under each processing path, a chain log corresponding to the business identifier to be established is generated.
[0020] In a specific embodiment, the method further comprises:
[0021] According to the chain log establishment request, for each processing path, obtain each second node that does not have a preset call relationship and the burying point identifier of the second node when the business corresponding to the business identifier to be established is executed under the processing path, and obtain a second burying point log according to the burying point identifier of the second node;
[0022] According to the first burial point log corresponding to the first node and the second burial point log corresponding to the second node under each processing path, a chain log corresponding to the business identifier to be established is generated.
[0023] In a specific embodiment, the first burial point log and the second burial point log respectively include parameters of the first node and the second node during the execution of the chain log creation request;
[0024] The parameters include: the time consumed for executing the service of the node, the success / error code of the service execution, and the number of times the service is executed.
[0025] In a specific embodiment, the first node includes: a client node, an open service platform node, a public basic server node, and a data access layer node;
[0026] The second node includes: an encapsulated business system internal microservice node and the microservice internal flow node.
[0027] In a second aspect, the present application provides a service optimization processing device, comprising:
[0028] An acquisition module, configured to acquire a service processing request, wherein the service processing request includes: an identifier of a target service;
[0029] The acquisition module is further configured to acquire, according to the business processing request, a chain log corresponding to the identifier of the target business, wherein the chain log includes a processing path corresponding to the target business and a business execution time of each node corresponding to the processing path;
[0030] The acquisition module is further configured to acquire, for each processing path, a performance coefficient of a business system corresponding to each node in the processing path;
[0031] A determination module is configured to obtain the total time consumption corresponding to each processing path based on the service execution time consumption of the node corresponding to each processing path and the performance coefficient of the service system corresponding to the service node, and select the processing path with the longest total time consumption as the processing path to be optimized;
[0032] A processing module is used to optimize the processing path to be optimized, and use the optimized processing path and other processing paths in the chain log except the processing path to be optimized to perform corresponding processing on the target business.
[0033] In a third aspect, the present application provides a server, comprising:
[0034] processor and memory;
[0035] The memory is used to store executable instructions of the processor;
[0036] The processor is configured to perform the method as described in the first aspect by executing the executable instructions.
[0037] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method described in the first aspect.
[0038] The present application provides a method, device, server and storage medium for business optimization processing. By obtaining a business request, and obtaining a chain log corresponding to the target business identifier carried in the business request, and the performance coefficient of the business system corresponding to each node under each processing path corresponding to the target business contained in the chain log, the total time corresponding to each processing path is obtained according to the business execution time of the corresponding node under each processing path, and the performance coefficient of the business system corresponding to the business node, and the processing path with the longest total time is used as the processing path to be optimized, and the processing path to be optimized is optimized, and the optimized processing path and other processing paths in the chain log except the processing path to be optimized are used to perform corresponding processing on the target business. Through the method provided by the present application, the processing path with the longest total time among the various processing paths of the target business can be determined, and the overall optimization of the target business can be achieved by optimizing the processing path, which can improve the processing capacity of the target business and the processing efficiency of the overall business platform. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0040] Figure 1 A flowchart of a first embodiment of a service optimization processing method provided by this application;
[0041] Figure 2 This is a flowchart of a second embodiment of a service optimization processing method provided by this application;
[0042] Figure 3 This is a flowchart of Example 3 of a service optimization processing method provided by this application;
[0043] Figure 4 A schematic diagram of the structure of an embodiment of a service optimization processing device provided by this application;
[0044] Figure 5A schematic diagram of the structure of a server embodiment provided in this application. DETAILED DESCRIPTION
[0045] To make the purpose, technical solutions, and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments made by ordinary technicians in this field based on the inspiration of these embodiments fall within the scope of protection of this application.
[0046] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the numbers used in this way are interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0047] In existing technologies, detailed division of responsibilities facilitates repeated calls to the same business system by complex businesses. Large, integrated business platforms often become large and complex due to the inclusion of multiple independent business systems. Once a business is initiated from a client, it must be executed across multiple paths and systems on the service platform to fulfill its needs. Complex business processing paths can make it difficult to ensure the timeliness of business execution. Existing technologies focus more on quickly locating and resolving faults when complex business processing flows fail. While this allows the business platform to maintain normal operation, it does not inherently improve the platform's business processing efficiency.
[0048] In view of this, the technical concept of this application is: how to find the critical path that most affects the efficiency of business processing, and optimize the processing path and the corresponding business system to improve the overall processing efficiency of the business platform.
[0049] The technical solution of the present application is described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0050] Figure 1This is a flowchart of the first embodiment of a service optimization processing method provided by this application. Figure 1 , the method comprising:
[0051] Step S101: Obtain a service processing request, where the service processing request includes: an identifier of a target service.
[0052] In this embodiment, the service processing request can be initiated by the service platform, and the target service refers to the service that needs to be optimized. The service platform includes multiple service systems that provide service support for the user client. The service platform can be the Haier Uhome Web Services (UWS) open platform, and the service system can be the Haier Uhome public basic service system.
[0053] Step S102: Obtain a chain log corresponding to the identifier of the target business according to the business processing request, wherein the chain log includes a processing path corresponding to the target business and the business execution time of the corresponding node under each processing path.
[0054] In this embodiment, the chain log corresponding to the target business identifier is obtained based on the chain tracing principle and stored on the business service platform's server. The target business includes multiple processing paths, each of which contains multiple nodes. The chain log contains the processing path corresponding to the target business and the execution time of the node corresponding to each processing path.
[0055] Step S103: For each processing path, obtain the performance coefficient of the business system corresponding to each node in the processing path.
[0056] In this embodiment, each processing path of the target business contains multiple nodes. Since the processing path may span multiple different business systems, each node may belong to a different business system. For each processing path, the performance coefficient of the business system corresponding to each node under the processing path is obtained.
[0057] In a possible implementation, the performance of the service system includes: the utilization of the central processing unit (CPU), the memory utilization, and the ratio of the number of users actually carried to the number of concurrent users that can be carried.
[0058] In this embodiment, the performance coefficient of the business system can be obtained from the data storage server of the business platform. It can be the CPU utilization, memory utilization, and the ratio of the actual number of users carried to the number of concurrent users that can be carried of the business system. It is a positive number less than or equal to 1. For example, if the business system load is close to saturation, the performance coefficient can be 1. If the business system still has a surplus, its performance coefficient should be in the range of (0, 1).
[0059] Step S104: Obtain the total time consumption corresponding to each processing path based on the service execution time consumption of the node corresponding to each processing path and the performance coefficient of the service system corresponding to the service node, and select the processing path with the longest total time consumption as the processing path to be optimized.
[0060] In this embodiment, during the processing of the target business, the processing time of the business is determined by the longest processing path among the various processing paths that collaboratively process the business. That is, the business execution time of the longest path in a business is the overall execution time of the business, and the business execution time of the corresponding node under each processing path is closely related to the performance coefficient of the business system corresponding to the business node. Based on the business execution time of the corresponding node under each processing path and the performance coefficient of the business system corresponding to the business node, the processing path with the longest total time is the processing path that most needs to be optimized among the various processing paths corresponding to the target business.
[0061] Step S105: Optimize the processing path to be optimized, and use the optimized processing path and other processing paths in the chain log except the processing path to be optimized to process the target business accordingly.
[0062] In this embodiment, after determining the processing path to be optimized, the business system to which the node belongs can be further determined based on the node corresponding to the processing path. Optimizing the processing path includes optimizing the performance of the business system to which the corresponding node belongs, such as configuring a server with greater computing or storage capabilities, and improving the software program of the internal processes or microservices of the business system. After optimizing the processing path to be optimized, the optimized processing path and other processing paths in the chain log other than the processing path to be optimized can be used to perform corresponding processing on the target business, thereby improving the overall processing capacity of the target business.
[0063] In this embodiment, by obtaining a business request and obtaining a chain log corresponding to the target business identifier carried in the business request, as well as the performance coefficient of the business system corresponding to each node under each processing path corresponding to the target business contained in the chain log, the total time corresponding to each processing path is obtained based on the business execution time of the corresponding node under each processing path and the performance coefficient of the business system corresponding to the business node, and the processing path with the longest total time consumption is used as the processing path to be optimized. The processing path to be optimized is optimized, and the optimized processing path and other processing paths in the chain log other than the processing path to be optimized are used to perform corresponding processing on the target business. Through the method provided in this embodiment, the processing path with the longest total time consumption among the various processing paths of the target business can be determined as the decisive path for the execution time of the target business, and the overall optimization of the target business can be achieved by optimizing the processing path, thereby improving the processing capacity of the target business and the processing efficiency of the overall business platform.
[0064] In the above Figure 1 Based on the embodiment, a specific implementation of the above step S104 is:
[0065] For each processing path, the execution time t of the business of the corresponding node i under the processing path is (i) , the performance coefficient k of business system j corresponding to business node i j(i) , using the following formula:
[0066] T=∑t (i) *k j(i) (1)
[0067] Get the total time T of the processing path; where i is a positive integer, k j(i) A positive number less than or equal to 1.
[0068] In this embodiment, the identifier of the target business carried in the business request corresponds to multiple processing paths, each processing path corresponds to multiple business nodes, and each business node can belong to different business systems under the business platform. The business system can be a public basic service system that is encapsulated by multiple microservices and can independently implement functions. For example, for a certain processing path of the target business, it contains business nodes A, B, C, and D, where A belongs to business system I, B belongs to business system II, C belongs to business system III, and D belongs to business system IV. The execution time of the A, B, C, and D business nodes under the processing path obtained from the chain log is t respectively. (A) , t (B) , t (c) and t (D) , and the performance coefficients of the business systems corresponding to the business nodes obtained from the business platform data storage server are k Ⅰ(A) 、kⅡ(B) 、k Ⅲ(C) and k Ⅳ(D) , then the total time consumption T of the processing path can be calculated by the following formula (2).
[0069] T=t (A) *k Ⅰ(A) +t (B) *k Ⅱ(B) +t (C) *k Ⅲ(C) +t (D) *k Ⅳ(D) (2)
[0070] Figure 2 This is a flowchart of Example 2 of a service optimization processing method provided by this application. Figure 1 Based on the embodiment, the method further includes:
[0071] Step S201: Obtain a chain log creation request, where the chain log creation request includes: a service identifier to be created, and a processing path corresponding to the service identifier to be created.
[0072] Step S202: According to the chain log establishment request, for each processing path, obtain each first node with a preset call relationship and the burial point identifier of the first node when executing the business corresponding to the business identifier to be established under the processing path, and obtain the first burial point log based on the burial point identifier of the first node.
[0073] Step S203: Generate a chain log corresponding to the business identifier to be established based on the first embedding log corresponding to the first node under each processing path.
[0074] In this embodiment, the chain log creation request can be considered as a business service request initiated by the user client, and the request includes its corresponding business identifier and the processing path corresponding to the business identifier.
[0075] In this embodiment, the first node is a node that has a calling relationship during the interaction between the client and the server, such as a public basic service system node, which is a preset node in the general business model. During the business execution process corresponding to the business identifier carried by the chain log establishment request, the first node under each processing path corresponding to the business and the burial point identifier of the first node are identified, and the first burial point log corresponding to the first node is obtained.
[0076] In a possible implementation, the first node includes: a client node, an open service platform node, a public basic service system node, and a data access layer node.
[0077] In this embodiment, a chain log corresponding to the business identifier to be established is generated based on the first burial point log corresponding to the first node under each processing path.
[0078] In this embodiment, by obtaining a chain log establishment request, according to the chain log establishment request, for each processing path, each first node with a preset call relationship and the first node's burial point identifier when executing the business corresponding to the business identifier to be established under the processing path are obtained, and according to the burial point identifier of the first node, the first burial point log is obtained; according to the first burial point log corresponding to the first node under each processing path, a chain log corresponding to the business identifier to be established is generated. The method of this embodiment can obtain the chain log of the target business, which contains the processing path corresponding to the target business and the business execution time of the first node corresponding to each processing path. The processing path to be optimized can be calculated, laying the foundation for the optimized processing of the target business and the business platform.
[0079] In the above Figure 2 Based on the embodiment, after step S201, the following steps are further included:
[0080] According to the chain log establishment request, for each processing path, the burial point identifier of each second node and the second node that do not have a preset call relationship when executing the business corresponding to the business identifier to be established under the processing path is obtained, and the second burial point log is obtained based on the burial point identifier of the second node.
[0081] According to the first burial point log corresponding to the first node and the second burial point log corresponding to the second node under each processing path, a chain log corresponding to the business identifier to be established is generated.
[0082] In this embodiment, the second node is a node that has no calling relationship during the interaction between the client and the server, such as a microservice interface within an encapsulated business system, which is a node that can be customized.
[0083] In a possible implementation, the second node includes: an encapsulated business system internal microservice node and a microservice internal flow node.
[0084] In this embodiment, according to the chain log establishment request, for each processing path, the second node and the second node's tracking log when the business corresponding to the business identifier to be established is executed under the processing path are obtained, and according to the first tracking log corresponding to the first node and the second tracking log corresponding to the second node under each processing path, a chain log corresponding to the business identifier to be established is generated.
[0085] In one possible implementation, the first burial point log and the second burial point log respectively include parameters of the first node and the second node during the execution of the chain log establishment request; the parameters include: the business execution time of the node, the success / error code of the business execution, and the number of business executions.
[0086] In this embodiment, by tracking the second node that does not have a calling relationship during the interaction between the client and the server when executing the business corresponding to the business identifier to be established, and obtaining the tracking log of the second node, the nodes involved in the calculation of the total processing time of the target business can be made more detailed, which is conducive to improving the accuracy of the determined processing path to be optimized.
[0087] Figure 3 This is a flowchart of the third embodiment of a business optimization processing method provided by this application. The node calling process when the chain log establishment request business is executed is as follows Figure 3 As shown in the figure, the business passes through the following nodes: application (Application, abbreviated as: APP) / smart terminal, UWS open service, public basic service A, public basic service B, public basic service C and data access layer (including DB storage, Redis cache and MQ server).
[0088] In this embodiment, the data that needs to be transmitted in the network for the chain log establishment request include the identifier uTraceId of the service and the location identifier uSpanId of the called service node. For a call between any two nodes, two points are buried on the calling side and the service side, respectively. Among them, Client Send (CS) indicates the burial point when the client initiates the request, and the data passed to the lower-level node include uTraceId and uSpanId. Server Receive (SR) indicates the burial point when the server receives the request, obtains the uTraceId and uSpanId passed by the request, and puts them into the processing context. Server Send (SS) indicates the burial point when the server sends the request processing result to the client. Client Recieve (CR) indicates the burial point when the client receives the response from the server. The SS and SR, CS and CR of the same calling end and the same service end have the same burial point identifier respectively. Custom nodes can be identified separately. The burial point log corresponding to the burial point identifier records the timestamp of the interface call and the service return. The time marked by the timestamp corresponding to the node interface SS minus the time marked by the timestamp corresponding to the SR is the execution time of the service node.
[0089] In this embodiment, by tracking the interface corresponding to the business node in the process of establishing a chain log for the target business, and recording the timestamp of the interface call and return in the tracking log corresponding to the tracking identifier during the execution of the target business, a chain log for the target business is generated, which can improve the accuracy of the path to be optimized in the acquired target business.
[0090] Figure 4 This is a schematic diagram of the structure of an embodiment of a service optimization processing device provided by this application. Figure 4The apparatus 400 includes: an acquisition module 401, a determination module 402, a processing module 403, and a log generation module 404. The acquisition module 401 is configured to acquire a business processing request, wherein the business processing request includes an identifier of a target business. The acquisition module 401 is further configured to acquire, based on the business processing request, a chain log corresponding to the identifier of the target business, wherein the chain log includes a processing path corresponding to the target business and the business execution time of the node corresponding to each processing path. The acquisition module 401 is further configured to acquire, for each processing path, a performance coefficient of the business system corresponding to each node in the processing path. The determination module 402 is configured to acquire the total time corresponding to each processing path based on the business execution time of the node corresponding to each processing path and the performance coefficient of the business system corresponding to the business node, and select the processing path with the longest total time as the processing path to be optimized. The processing module 403 is configured to optimize the processing path to be optimized and use the optimized processing path and other processing paths in the chain log, except for the processing path to be optimized, to process the target business accordingly.
[0091] In addition, optionally, the determination module 402 is specifically configured to determine, for each processing path, the service execution time t of the corresponding node i under the processing path. (i) , the performance coefficient k of business system j corresponding to business node i j(i) , using the following formula:
[0092] T=∑t (i) *k j(i)
[0093] Get the total time T of the processing path; where i is a positive integer, k j(i) A positive number less than or equal to 1.
[0094] The log generation module 404 is used to obtain a chain log establishment request, which includes: a business identifier to be established, and a processing path corresponding to the business identifier to be established; according to the chain log establishment request, for each processing path, each first node with a preset call relationship and the burial point identifier of the first node when executing the business corresponding to the business identifier to be established under the processing path is obtained, and the first burial point log is obtained according to the burial point identifier of the first node; according to the first burial point log corresponding to the first node under each processing path, a chain log corresponding to the business identifier to be established is generated.
[0095] The log generation module 404 is also used to establish a request based on the chain log. For each processing path, it obtains the burial point identifiers of each second node and the second node that do not have a preset call relationship when executing the business corresponding to the business identifier to be established under the processing path, and obtains the second burial point log based on the burial point identifier of the second node; based on the first burial point log corresponding to the first node and the second burial point log corresponding to the second node under each processing path, it generates a chain log corresponding to the business identifier to be established.
[0096] The service optimization processing device provided in the embodiment of the present application can perform the above Figure 1 、 Figure 2 and Figure 3 The implementation principles and beneficial effects of the method embodiment and technical solutions shown are similar and will not be repeated here.
[0097] Figure 5 This is a schematic diagram of the structure of a server embodiment provided by this application. Figure 5 The server 500 includes a processor 501 and a memory 502. The memory 502 is used to store executable instructions of the processor 501; wherein the processor 501 is configured to execute the technical solution in the above method embodiment by executing the executable instructions.
[0098] The server provided in this application is used to execute the technical solution in the aforementioned method embodiment. Its implementation principle and technical effects are similar and will not be repeated here.
[0099] An embodiment of the present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the technical solution provided by any of the aforementioned method embodiments.
[0100] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0101] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A service optimization processing method, characterized in that: include: Obtaining a business processing request, wherein the business processing request includes: an identifier of a target business; Obtaining, according to the service processing request, a chain log corresponding to the identifier of the target service, wherein the chain log includes a processing path corresponding to the target service and service execution time of a node corresponding to each processing path; wherein the target service includes multiple processing paths; For each processing path, obtain the performance coefficient of the business system corresponding to each node in the processing path; wherein the performance of the business system includes: CPU utilization, memory utilization, and the ratio of the number of users actually carried to the number of concurrent users that can be carried; For each processing path, according to the corresponding node under the processing path Time-consuming business execution , the business node Corresponding business system Coefficient of performance , using the following formula: Get the total time taken for the processing path ; in, is a positive integer, is a positive number less than or equal to 1, and the processing path with the longest total time consumption is taken as the processing path to be optimized; The processing path to be optimized is optimized, and the target business is processed accordingly using the optimized processing path and other processing paths in the chain log except the processing path to be optimized.
2. The method according to claim 1, characterized in that Also includes: Obtaining a chain log establishment request, the chain log establishment request including: a service identifier to be established, and a processing path corresponding to the service identifier to be established; According to the chain log establishment request, for each processing path, obtain the burying point identifier of each first node and the first node that have a preset call relationship when executing the business corresponding to the business identifier to be established under the processing path, and obtain the first burying point log according to the burying point identifier of the first node; According to the first burial point log corresponding to the first node under each processing path, a chain log corresponding to the business identifier to be established is generated.
3. The method according to claim 2, characterized in that Also includes: According to the chain log establishment request, for each processing path, obtain each second node that does not have a preset call relationship and the burying point identifier of the second node when the business corresponding to the business identifier to be established is executed under the processing path, and obtain a second burying point log according to the burying point identifier of the second node; According to the first burial point log corresponding to the first node and the second burial point log corresponding to the second node under each processing path, a chain log corresponding to the business identifier to be established is generated.
4. The method according to claim 2 or 3, characterized in that The first burial point log and the second burial point log respectively include parameters of the first node and the second node during the execution of the chain log creation request; The parameters include: the time consumed for executing the service of the node, the success / error code of the service execution, and the number of times the service is executed.
5. The method according to claim 4, characterized in that The first nodes include: client nodes, open service platform nodes, public basic service end nodes, and data access layer nodes; The second node includes: an encapsulated business system internal microservice node and the microservice internal flow node.
6. A service optimization processing device, characterized in that: include: An acquisition module, configured to acquire a service processing request, wherein the service processing request includes: an identifier of a target service; The acquisition module is further configured to acquire, based on the business processing request, a chain log corresponding to the identifier of the target business, wherein the chain log includes a processing path corresponding to the target business and a business execution time consumed by a node corresponding to each processing path; wherein the target business includes multiple processing paths; The acquisition module is further configured to obtain, for each processing path, a performance coefficient of the business system corresponding to each node in the processing path; wherein the performance of the business system includes: CPU utilization, memory utilization, and the ratio of the number of users actually carried to the number of concurrent users that can be carried; A determination module is used to determine, for each processing path, the corresponding node under the processing path Time-consuming business execution , the business node Corresponding business system Coefficient of performance , using the following formula: Get the total time taken for the processing path ;in, is a positive integer, is a positive number less than or equal to 1, and the processing path with the longest total time consumption is taken as the processing path to be optimized; A processing module is used to optimize the processing path to be optimized, and use the optimized processing path and other processing paths in the chain log except the processing path to be optimized to perform corresponding processing on the target business.
7. A server, characterized in that: include: processor and memory; The memory is used to store executable instructions of the processor; The processor is configured to perform the method according to any one of claims 1 to 5 by executing the executable instructions.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 5 when executed by a processor.
9. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Micro-service performance real-time monitoring method based on flink
CN111078499A
Quality inspection node optimization method and device, computer equipment and storage medium
CN114186699A