Method, device, equipment, medium and program product for generating data call record
By generating globally unique request identifiers and service call records for operation requests in the asset securitization system, the problem of difficult system fault location is solved, and efficient fault diagnosis and auditing are achieved.
Patent Information
- Application Number
- CN202210250126.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-14
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2042-03-14
Smart Images

Figure CN114661382B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, equipment, medium and program product for generating data call records. Background Art
[0002] Asset securitization refers to the process of issuing asset-backed securities (ABS) based on future cash flows from underlying assets, enhanced through structured credit enhancement, and backed by the future cash flows of underlying assets. Asset securitization is a form of financing that involves issuing tradable securities backed by a specific asset portfolio or specific cash flows. The asset securitization system often involves multiple institutions, such as financial institutions, securities firms, and rating agencies, and is a distributed system.
[0003] In related technologies, asset securitization systems can often only record system operations. When there are problems with the system, such as when a failure occurs, due to the complex internal system call logic, a system operation may involve multiple layers of service programs, making it impossible to directly locate the root cause of the problem based on the recorded system operations, resulting in inefficient system troubleshooting.
[0004] In view of the above phenomenon, how to improve the efficiency of the procedures for identifying problems in the asset securitization system is an issue that needs to be addressed urgently. Summary of the Invention
[0005] The embodiments of the present invention provide a method, apparatus, device, medium and program product for generating data call records, which realize recording the call link of system operations and basic information of the calls, provide a data basis for problem troubleshooting, and thus improve the efficiency of system problem troubleshooting.
[0006] In a first aspect, an embodiment of the present invention provides a method for generating a data call record, the method comprising:
[0007] In response to an operation request, a request identifier of the operation request is generated; in response to the operation request, a service call is made, and for each service call corresponding to the operation request, a call identifier of the service call is generated and basic information of the service call is recorded; based on the request identifier of the operation request, the call identifiers of each service call corresponding to the operation request and the basic information of each service call, a call record of the operation request is generated.
[0008] In a specific implementation, for each service call corresponding to the operation request, generating a call identifier of the service call and recording basic information of the service call include:
[0009] For each service call corresponding to the operation request, obtain the call identifier of the previous service call of the service call; generate the call identifier of the service call; obtain the information generated by the service call during the call process; and determine the call identifier of the previous service call of the service call and the information generated by the service call during the call process as the basic information of the service call.
[0010] In a specific implementation, generating the call identifier of the service call includes:
[0011] The call identifier of the service call is generated according to the call identifier of the previous service call of the service call.
[0012] In a specific implementation, obtaining information generated during the service call includes:
[0013] Generate a dynamic proxy class for the service call; and obtain information generated during the service call based on the dynamic proxy class.
[0014] In a specific implementation, generating a request identifier of the operation request in response to the operation request includes:
[0015] In response to the operation request, a request identifier of the operation request is generated according to the type of the operation request.
[0016] In a specific embodiment, the basic information of the service call includes one or more of the service identifier of the service call, the call identifier of the previous service call of the service call, the call type, the call failure mark, the call start time, the call end time, the calling user, the scheduling system, the calling host, the call data and the call result.
[0017] In a specific embodiment, after generating a call record of the operation request based on the request identifier of the operation request, the call identifiers of each service call corresponding to the operation request, and the basic information of each service call, the method further includes:
[0018] Determine the call score of each service based on the call failure mark of each service call in the call record of each operation request and the difference between the call end time and the call start time of each service call; and generate an evaluation result based on the call score of each service.
[0019] In a specific embodiment, after generating a call record of the operation request based on the request identifier of the operation request, the call identifiers of each service call corresponding to the operation request, and the basic information of each service call, the method further includes:
[0020] A system call relationship graph is generated and displayed according to the request identifier of each operation request, the call identifier of each service call and the call identifier of the previous service call of each service call in the call record of each operation request.
[0021] In a specific embodiment, after generating a call record of the operation request based on the request identifier of the operation request, the call identifiers of each service call corresponding to the operation request, and the basic information of each service call, the method further includes:
[0022] According to the call type, service identifier, scheduled system and called host in the call record of each operation request, the call volume of each service within a preset time period is counted; according to the call volume of each service, the server scheduling instruction is generated.
[0023] In a second aspect, an embodiment of the present invention provides a device for generating a data call record, the device comprising:
[0024] A request identifier generation module is used to generate a request identifier for the operation request in response to the operation request; a call tracking module is used to make a service call in response to the operation request, and for each service call corresponding to the operation request, generate a call identifier for the service call and record basic information of the service call; a call record generation module is used to generate a call record for the operation request based on the request identifier of the operation request, the call identifiers of each service call corresponding to the operation request and the basic information of each service call.
[0025] In a third aspect, an embodiment of the present invention provides a device for generating a data call record, including:
[0026] A processor, a memory, and a communication interface; the memory is used to store executable instructions of the processor; wherein the processor is configured to execute the method for generating a data call record as described in any one of the first aspects by executing the executable instructions.
[0027] In a fourth aspect, an embodiment of the present invention provides a readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method for generating a data call record as described in any one of the first aspects is implemented.
[0028] In a fifth aspect, an embodiment of the present invention provides a computer program product, including a computer program, which, when executed by a processor, is used to implement the method for generating a data call record as described in any one of the first aspects.
[0029] The data call record generation method, apparatus, equipment, medium and program product provided by the embodiments of the present invention are for a distributed system. When an operation request of the distributed system is received, a globally unique request identifier of the operation request is generated to distinguish each operation request. Then, when the distributed system responds to the operation request and performs service calls on each server, a call identifier of the service call is generated for each service call, and basic information of the service call is obtained by intercepting the code, thereby generating a call record including the request identifier of the operation request, the call identifiers of each service call corresponding to the operation request and their basic information. By recording the call records of each operation request, a data basis is provided for post-processing operations of the distributed system, such as problem troubleshooting and auditing, thereby improving the traceability of the distributed system, thereby improving the efficiency and accuracy of operations such as problem troubleshooting and auditing of the distributed system. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction 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 invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0031] Figure 1 A schematic diagram of the architecture of an asset securitization system provided by an embodiment of the present invention;
[0032] Figure 2 A flowchart of a first embodiment of a method for generating a data call record according to an embodiment of the present invention;
[0033] Figure 3 For the present invention Figure 2 A schematic diagram of the calling identifiers of each service node in the illustrated embodiment;
[0034] Figure 4 A flowchart of a second embodiment of a method for generating a data call record according to an embodiment of the present invention;
[0035] Figure 5 A schematic structural diagram of a first embodiment of a device for generating data call records according to an embodiment of the present invention;
[0036] Figure 6 A schematic structural diagram of a device for generating data call records provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0037] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments made by ordinary technicians in this field based on the inspiration of these embodiments fall within the scope of protection of the present invention.
[0038] The terms "first", "second", "third", "fourth", etc. (if any) in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way are interchangeable where appropriate, so that the embodiments of the invention described herein can be implemented in orders 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 apparatus 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 apparatus.
[0039] With the development of Internet technology, more and more systems adopt distributed deployment. Compared with the traditional monolithic architecture, distributed systems increase the system capacity and processing speed by horizontally or vertically splitting businesses and running multiple businesses in parallel.
[0040] Figure 1 The schematic diagram of the architecture of the asset securitization system provided by the embodiment of the present invention is as follows: Figure 1 As shown, an asset securitization system is usually a distributed system, which often has one or more services, such as login service, project details service, data storage service, purchase service, settlement service, etc. Different services may correspond to different server ends, such as Figure 1 In the example of Servers 1 to N, data can be distributed and stored across multiple servers. When a user performs an operation through the asset securitization system's user interface, the interface generates an operation request and sends it to a backend server, such as the master server. The master server receives the operation request and, based on the service calls required by the operation request, generates call requests for each server, thereby requesting return data from each server to obtain response data for the operation request. The response data is then displayed through the interface, thereby completing the response to the operation request.
[0041] In some embodiments, the user may access the operation interface of the main server through the user terminal, such as accessing the operation interface of the main server through a browser, application, etc. of the user terminal.
[0042] In some embodiments, the aforementioned server may be a computer, a server, or other device.
[0043] In some embodiments, data can be exchanged between various servers based on a set network transmission protocol, such as HTTP (Hyper Text Transfer Protocol), TCP / IP (Transmission Control Protocol / Internet Protocol), and other protocols.
[0044] Existing asset securitization systems can only record user operations, such as time, operation type, and user information. When there are performance issues or system failures in the system, due to the complex calling relationships between various services in the distributed system, it is impossible to quickly locate the location of the anomaly, resulting in inefficient problem investigation. Moreover, only recording the operation itself makes it impossible to perform related audit tasks based on this record for financial systems.
[0045] In response to the problems existing in the prior art, the present invention provides a method for generating data call records for tracking call links. The main concept is: generating a globally unique request identifier for an operation request, and during the service call in response to the operation request, generating a call identifier for each service call, and recording the basic information of the service call at the same time to obtain a call record for each operation request, so as to perform auditing, problem troubleshooting and other operations based on the call record, thereby improving the efficiency of auditing and problem troubleshooting.
[0046] In combination with the above scenarios and systems, the technical solution of the method for generating data call records provided by the present invention is described in detail below through several specific embodiments.
[0047] Figure 2 The flow chart of the first embodiment of the method for generating a data call record provided by the embodiment of the present invention is as follows. The method for generating a data call record can be executed by a terminal for generating a data call record. The terminal for generating a data call record can be a server, a computer, or other device. Figure 2 As shown, the method for generating the data call record specifically includes the following steps:
[0048] S201: In response to an operation request, generate a request identifier of the operation request.
[0049] The request identifier may be a global variable used to uniquely identify a user's operation.
[0050] Specifically, the user can perform operations on the interactive interface of the system through the user terminal or the main service terminal, such as the asset securitization system, the banking service system, the online shopping system, etc., thereby generating an operation request for the operation, and sending the operation request to the main server and the data call record generation terminal, and then the data call record generation terminal generates a request identifier for the operation request, and the distributed system composed of the main server and various other servers responds to the operation request.
[0051] Specifically, the request identifier of the operation request can be generated based on one or more factors such as the user performing the operation, the IP (Internet Protocol Address) of the server generating the operation request, the time when the operation request is generated, the type of the operation request, and an auto-increment sequence.
[0052] Optionally, in response to the operation request, generating a request identifier of the operation request includes:
[0053] In response to the operation request, a request identifier of the operation request is generated according to the type of the operation request.
[0054] The types of operation requests are divided based on the actions corresponding to the operations, and can be divided into purchase type, settlement type, view type, collection type, etc.
[0055] Specifically, the request identifier of the operation request can be generated according to the type of operation request, the IP of the server generating the operation request, and a preset auto-increment sequence. The request identifier of each operation request is different, and the request identifier is a global variable.
[0056] S202: In response to the operation request, a service call is made, and for each service call corresponding to the operation request, a call identifier of the service call is generated and basic information of the service call is recorded.
[0057] Specifically, the call identifier of the service call may be generated according to one or more of the request identifier of the operation request corresponding to the service call, the server making the service call, the called service, and the auto-increment sequence.
[0058] Specifically, when an operation request corresponds to multiple service calls, the service gateway can determine the service corresponding to each service call and issue the corresponding service call instructions to the service. If a service call needs to call another service call, the service call is called the parent node of the other service call, or the service call is the previous service call of the other service call.
[0059] For example, if the service call situation of the operation request is: server A receives the user's operation, calls service A10 of server A based on the operation, and then service A10 continues to call service A11 of server A, then the service call that calls service A10 is the parent node or previous service call of the service call that calls service A11.
[0060] Optionally, the basic information of the service call includes one or more of the service identifier of the service call, the call identifier of the previous service call of the service call, the call type, the call failure mark, the call start time, the call end time, the calling user, the scheduling system, the calling host, the call data and the call result.
[0061] The service identifier can be the service identifier of the service being called. This identifier is used to distinguish different services, such as service014 and serviceA11. Call types can be categorized based on the service call method, which can include event-driven, RPC (Remote Procedure Call), or both remote and local calls. When a service call fails, a call failure flag is added to the basic information of the service call. This call failure flag can be generated based on the type of failure, such as fail or F004. The called system and called host represent the system and host where the service being called resides, respectively. The called system type or identifier can be used to represent the called system, such as sys001 or ios. The called host machine identifier can be used to identify the called host. The call start time and call end time represent the start and end times of the service call, respectively. The time the service call is triggered is the call start time, and the call end time can be the time when the service call succeeds. The calling user can be represented by the user identifier of the user initiating the service call. The call data is the data required for the service call, such as a project list. The call result can be either a success or a failure.
[0062] Specifically, the service call code can be obtained based on an interceptor in a device generating the data call record, and then basic information of the service call can be extracted during the service call.
[0063] When the system responds to an operation request, i.e., when making related service calls, it is necessary to track and record the links of each service call. Specifically, for each service call corresponding to the operation request, a call identifier is generated before the call is made. During the service call, basic information about the service call is recorded. After the service call ends, the end time and call failure flag are added to the basic information of the service call, thus obtaining complete basic information about the service call.
[0064] In some embodiments, the basic information of the service call may further include a request identifier of the operation request corresponding to the service call.
[0065] Specifically, for the current service call, the request identifier of the operation request can be obtained from the basic information of the previous service call, and the request identifier of the operation request can be stored in the basic information of the current service call. If the current service call is the first call, the request identifier of the operation request is generated based on any of the above methods and stored in the basic information of the current service call.
[0066] Optionally, for each service call corresponding to the operation request, generating a call identifier of the service call and recording basic information of the service call include:
[0067] For each service call corresponding to the operation request, obtain the call identifier of the previous service call of the service call; generate the call identifier of the service call; obtain the information generated by the service call during the call process, and determine the call identifier of the previous service call of the service call and the information generated by the service call during the call process as the basic information of the service call.
[0068] The service node corresponding to the previous service call of the service call is the parent node of the service node of the service call, and the service node of the previous service call can initiate a call request to the service node of the service call. The call identifier of the previous service call can be generated when the request corresponding to the previous service call is generated.
[0069] Specifically, at the start time of the current service call, the call identifier of the current service call can be generated, and the call identifier of the previous service call of the current service call can be obtained, and the call identifier, call type, scheduling system, call start time, call host, call user, call parameters and the call identifier of the previous service call of the current service call can be stored in the basic information of the current service call, and during the period when the current service call is called, the call failure mark, call end time, call data and call result of the current service call obtained can be stored in the basic information of the current service call to obtain the value of each call parameter. Among them, the call parameter is the input parameter when the service is called.
[0070] Optionally, generating a call identifier for the service call includes:
[0071] The call identifier of the service call is generated according to the call identifier of the previous service call of the service call.
[0072] Specifically, at the starting moment of the service call, the call identifier of the previous service call of the service call can be obtained, and then the call identifier of the service call can be generated based on the call identifier of the previous service call of the service call, such as by automatically incrementing the call identifier of the previous service call of the service call to generate the call identifier of the service call, or by adding an extra digit to the call identifier of the previous service call of the service call to generate the call identifier of the service call, or by other methods to generate the call identifier of the service call.
[0073] For example, if the call identifier of the previous service call is "1001", the call identifier of the current service call may be "1002", "10011" or "10012", etc.
[0074] Furthermore, before generating the call identifier of the service call, the process further includes: determining whether the current service call is the first call of the operation request; if so, determining the preset identifier as the call identifier of the previous service call before the current service call. The preset identifier can be any set identifier, such as "1", "H1", "First", etc., to indicate that the current service call is the first call of the corresponding operation request.
[0075] Specifically, a call variable with an initial value of 0 can be generated. Each time the operation request makes a service call, the call variable increases by 1. When each service call of the operation request is completed, the value of the call variable is reset to 0. Based on the value of the call variable, it can be determined whether the current service call is the first call of the operation request.
[0076] For example, Figure 3 For the present invention Figure 2 The schematic diagram of the calling identifier of each service node in the embodiment shown is as follows: Figure 3 As shown in FIG, the distributed system consists of three systems: system A, system B, and system C. System A is the main system. The user operates on the preset interface of system A, thereby sending the operation request to system A (such as the background server). The data call record generation device (not shown in the figure) generates a request identifier 101 for the operation request. The call identifiers of the service calls of operation 101 in the distributed system are 1001, 1002, 1003, 1004, 1005, and 1006 in sequence. The system called by service call 1001 is system A, and the service identifier is A10. It is the first call, so the call identifier of its previous service call is the preset identifier, i.e., "1"; the system called by service call 1002 is The system is system A, the service identifier is service A11, and the service call identifier of its parent node is 1001; the system called by service call 1003 is system B, the service identifier is service B10, and the service call identifier of its parent node is 1001; the system called by service call 1004 is system C, the service identifier is service C10, and the service call identifier of its parent node is 1003; the system called by service call 1005 is system B, the service identifier is service B11, and the service call identifier of its parent node is 1003; the system called by service call 1006 is system B, the service identifier is service B12, and the service call identifier of its parent node is 1005. Figure 3 The straight arrow in the middle indicates the direction of the call request, and the curved arrow indicates the direction of the returned data or structure.
[0077] S203: Generate a call record of the operation request according to the request identifier of the operation request, the call identifiers of each service call corresponding to the operation request, and basic information of each service call.
[0078] Specifically, the request identifier of the operation request, the call identifiers of the various service calls corresponding to the operation request, and the basic information of each service call can be stored in the call record table corresponding to the operation request, thereby obtaining a call record table for each operation request of the distributed system. When a fault occurs in the distributed system, the problem can be troubleshooted based on each call record table, thereby quickly locating the node where the service to which the fault is sent is located, facilitating system maintenance. And when an audit is required, it can be conducted based on the stored call record table, thereby avoiding the need for frequent data exchanges between various systems and improving the efficiency of the audit.
[0079] Furthermore, after the call record of the operation request is generated, the call record may be encrypted to prevent data leakage.
[0080] In some embodiments, basic information of each service call of the operation request may be directly aggregated to obtain a call record of the operation request.
[0081] The method for generating data call records provided in this embodiment is for a distributed system. When an operation request of the distributed system is received, a globally unique request identifier of the operation request is generated to distinguish each operation request. Then, when the distributed system responds to the operation request and performs service calls on each server, a call identifier of the service call is generated for each service call, and basic information of the service call is obtained by intercepting the code, thereby generating a call record including the request identifier of the operation request, the call identifiers of each service call corresponding to the operation request and their basic information. By recording the call records of each operation request, a data basis is provided for post-processing operations of the distributed system, such as problem troubleshooting and auditing, thereby improving the traceability of the distributed system, thereby improving the efficiency and accuracy of operations such as problem troubleshooting and auditing of the distributed system.
[0082] Optionally, after generating a call record of the operation request according to the request identifier of the operation request, the call identifiers of each service call corresponding to the operation request, and basic information of each service call, the method further includes:
[0083] A system call relationship graph is generated and displayed according to the request identifier of each operation request, the call identifier of each service call and the call identifier of the previous service call of each service call in the call record of each operation request.
[0084] In order to describe the calling relationship of the distributed system more intuitively and vividly, so as to facilitate system improvement or maintenance, a calling relationship diagram of each type of operation can be generated for each type of operation through the request identifier in the call record of each operation request generated, the call identifier of each service call, and the call identifier of the previous service call of each service call, so as to facilitate logical review and system improvement.
[0085] Furthermore, after obtaining the call records for each operation request, statistics can be collected for each user based on the calling user in the call records, thereby obtaining each user's operation record. This allows users to understand their historical operation records according to the called services. Furthermore, for each service call, the performance of each service call can be evaluated based on the difference between the call end time and the call start time in the call record, thereby facilitating improvements to the server side of service calls with poor performance. Furthermore, statistics can be collected for each first service call with a call failure flag at a set period, and prompt information for each first service call can be generated and sent to the service node for each first service call. This allows maintenance personnel at the corresponding service node to troubleshoot and maintain the service call program corresponding to that service node, thereby reducing the number of call failures.
[0086] Furthermore, the call volume of various services of each system in the distributed system can be counted and displayed based on information such as the scheduled system, the called host, the call data and the called service identifier in the call record, such as displaying the call volume of various services of each system in the distributed system through the main server.
[0087] Figure 4 The flowchart of the second embodiment of the method for generating data call records provided by the embodiment of the present invention is as follows. Based on the above embodiment, the system of step S202 is further improved, and the steps of service call evaluation and call volume statistics are added after step S203. Figure 4 As shown, the method for generating the data call record may include the following steps:
[0088] S401: In response to an operation request, generate a request identifier of the operation request.
[0089] S402: In response to the operation request, a service call is made. For each service call corresponding to the operation request, a call identifier of a previous service call of the service call is obtained, and a call identifier of the service call is generated.
[0090] S403: For each service call corresponding to the operation request, a dynamic proxy class of the service call is generated, and based on the dynamic proxy class, information generated during the service call is acquired.
[0091] When a distributed system is coded in Java, an interceptor can be generated based on a dynamic proxy class, thereby intercepting the code of each service call during each service call to obtain information generated by each service call during the call process.
[0092] Specifically, a dynamic proxy class for the service call may be generated based on the interface and implementation class corresponding to the service call, thereby obtaining information generated during the service call based on the constructor of the dynamic proxy class.
[0093] Furthermore, based on the dynamic proxy in AOP (Aspect Oriented Programming), a dynamic proxy class for each service call can be generated to obtain an interceptor for each service call, and then based on the interceptor for each service call, information generated during the call process of each service call can be obtained.
[0094] The use of dynamic proxy classes makes the proxy logic and business logic (service call logic) independent of each other, reducing the intrusiveness of service call link tracking on the system.
[0095] S404: Generate a call record of the operation request according to the request identifier of the operation request, the call identifiers of each service call corresponding to the operation request, and basic information of each service call.
[0096] S405: Determine a call score for each service according to the call failure mark of each service call and the difference between the call end time and the call start time of each service call in the call record of each operation request.
[0097] Specifically, the service call duration can be obtained based on the difference between the service call end time and the service call start time, and then the call score of each service can be determined based on the failure mark and duration of each service call.
[0098] In some embodiments, the call score S corresponding to service i i The calculation relationship can be:
[0099] S i =100-w1×(T i -T i0 )-w2×N i
[0100] In the formula, w1 and w2 are two set weight values, T i is the average time taken by each service call corresponding to service i, T i0 N is the minimum value of the occupied time of each service call corresponding to service i or the ideal value of the set occupied time, i The ratio of service calls that include call failure marks among all service calls corresponding to service i.
[0101] S406: Generate an evaluation result based on the call score of each service.
[0102] Specifically, only for each service whose call score is less than a preset score, an evaluation result of each service can be generated based on the call score of each service and / or the call record corresponding to each service, and the evaluation result of each service can be sent to the corresponding server to facilitate the maintenance and improvement of each server, so as to improve the overall performance of the distributed system and thus improve the user operation experience.
[0103] S407: Counting the call volume of each service within a preset time period according to the call type, service identifier, scheduled system and called host in the call record of each operation request.
[0104] The preset time period may be 24 hours, one week or other time intervals, and may be determined according to the business volume of the system.
[0105] In some embodiments, the type of service can be divided based on one or more of the call type, the called system, the called host, the call type, etc.
[0106] Furthermore, after obtaining the call volume of each service within the preset time period, the call volume of each service within the preset time period can be sent to the main server, so that the call volume of each service is displayed on the main server.
[0107] S408: Generate server scheduling instructions based on the call volume of each service.
[0108] Among them, a server can be composed of one or more servers.
[0109] Specifically, after obtaining the call volume of each type of service, it can be determined whether the call volume of each type of service is in the corresponding call volume range. If not, a server scheduling instruction is generated based on the call volume of each type of service to increase the number of servers for services whose call volume is greater than the upper limit value of the corresponding call volume range, and reduce the number of servers for services whose call volume is less than the lower limit value of the corresponding call volume area, so as to improve the resource utilization of the distributed system and improve the performance of high-call volume service calls.
[0110] Figure 5 Schematic diagram of the structure of the first embodiment of the device for generating data call records provided by the embodiment of the present invention; Figure 5 As shown, the data call record generation device 500 includes: a request identifier generation module 510, a call tracking module 520 and a call record generation module 530.
[0111] Among them, the request identifier generation module 510 is used to generate a request identifier of the operation request in response to the operation request; the call tracking module 520 is used to make a service call in response to the operation request, and generate a call identifier of the service call and record the basic information of the service call for each service call corresponding to the operation request; the call record generation module 530 is used to generate a call record of the operation request based on the request identifier of the operation request, the call identifiers of each service call corresponding to the operation request and the basic information of each service call.
[0112] Optionally, the call tracking module 520 includes:
[0113] A call identifier acquisition unit is used to obtain the call identifier of the previous service call of each service call corresponding to the operation request; a call identifier generation unit is used to generate the call identifier of the service call; an information acquisition unit is used to obtain information generated during the calling process of the service call; a basic information determination unit is used to determine the call identifier of the previous service call of the service call and the information generated during the calling process of the service call as the basic information of the service call.
[0114] Optionally, call the identifier generation unit, specifically for:
[0115] The call identifier of the service call is generated according to the call identifier of the previous service call of the service call.
[0116] Optionally, the information acquisition unit is specifically used to:
[0117] Generate a dynamic proxy class for the service call; and obtain information generated during the service call based on the dynamic proxy class.
[0118] Optionally, the request identifier generation module 510 is specifically configured to:
[0119] In response to the operation request, a request identifier of the operation request is generated according to the type of the operation request.
[0120] Optionally, the basic information of the service call includes one or more of the service identifier of the service call, the call identifier of the previous service call of the service call, the call type, the call failure mark, the call start time, the call end time, the calling user, the scheduling system, the calling host, the call data and the call result.
[0121] Optionally, the device further includes:
[0122] The service evaluation module is used to generate a call record of the operation request based on the request identifier of the operation request, the call identifier of each service call corresponding to the operation request, and the basic information of each service call, and then determine the call score of each service based on the call failure mark of each service call in the call record of each operation request and the difference between the call end time and the call start time of each service call; and generate an evaluation result based on the call score of each service.
[0123] Optionally, the device further includes:
[0124] A call relationship graph generation module is used to generate a call record of the operation request based on the request identifier of the operation request, the call identifier of each service call corresponding to the operation request and the basic information of each service call, and then generate and display the call relationship graph of the system based on the request identifier of each operation request, the call identifier of each service call and the call identifier of the previous service call of each service call in the call record of each operation request.
[0125] Optionally, the device further includes:
[0126] The server scheduling module is used to generate a call record of the operation request based on the request identifier of the operation request, the call identifier of each service call corresponding to the operation request and the basic information of each service call, and then count the call volume of each type of service within a preset time period according to the call type, service identifier, scheduled system and called host in the call record of each operation request; and generate a server scheduling instruction based on the call volume of each type of service.
[0127] The data call record generation device provided in this embodiment can execute the data call record generation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0128] Figure 6 A schematic diagram of a data call record generation device provided by an embodiment of the present invention. Figure 6 As shown, the device generating the data call record includes:
[0129] Processor 111, memory 112, and communication interface 113;
[0130] The memory 112 is used to store executable instructions of the processor 111;
[0131] The processor 111 is configured to execute the method for generating a data call record provided by any embodiment of the present invention by executing the executable instructions.
[0132] Optionally, the memory 112 may be independent or integrated with the processor 111 .
[0133] Optionally, when the memory 112 is a device independent of the processor 111, the data call record generation device may further include:
[0134] A bus is used to connect the above devices.
[0135] For related instructions, please refer to Figure 2 as well as Figure 4 You can understand the relevant descriptions and effects corresponding to the steps, and will not go into details here.
[0136] An embodiment of the present invention further provides a readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for generating a data call record provided by any embodiment of the present invention is implemented.
[0137] An embodiment of the present invention further provides a computer program product, including a computer program. When the computer program is executed by a processor, it is used to implement the method for generating a data call record provided by any embodiment of the present invention.
[0138] 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.
[0139] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above 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 invention.
Claims
1. A method for generating a data call record, characterized in that: The method comprises: In response to the operation request, generate a request identifier for the operation request based on the user of the operation, the IP address of the server generating the operation request, the time when the operation request was generated, the type of the operation request, and an auto-increment sequence; In response to the operation request, a service call is made. For each service call corresponding to the operation request, at the start time of the service call, a call identifier of a previous service call of the service call is obtained, and a call identifier of the service call is generated according to the call identifier of the previous service call of the service call, the request identifier of the operation request corresponding to the service call, the server performing the service call, the service called by the service call, and the auto-increment sequence; wherein, when the service call is the first call of the operation request, the call identifier of the previous service call of the service call is a preset identifier; During the service call, a dynamic proxy class for the service call is generated based on the interface and implementation class corresponding to the service call; an interceptor is generated based on the dynamic proxy class; the interceptor intercepts the service call code and obtains information generated during the service call; After the service call ends, obtaining the call end time when the service call is successful, or the call failure mark when the service call fails; Determine the call identifier of the previous service call of the service call, the information generated during the call process of the service call, and the call end time or call failure mark as the basic information of the service call; Generate a call record of the operation request according to the request identifier of the operation request, the call identifiers of each service call corresponding to the operation request, and basic information of each service call; Determining, based on the call failure marks of the respective service calls in the call records of the respective operation requests, a proportion of the service calls including the call failure marks in the respective service calls; Determine, based on the call end time and call start time of each service call in the call record of each operation request, an average value of the occupied time of each service call and a minimum value of the occupied time of each service call; Determine a call score for each service based on a preset weight value, a difference between an average value of the occupied time of each service call and a minimum value of the occupied time of each service call, and a proportion of service calls including call failure marks among the service calls; Generate evaluation results based on the call scores of each service.
2. The method according to claim 1, characterized in that The basic information of the service call includes the service identifier of the service call, the call identifier of the previous service call of the service call, the call type, the call failure mark, the call start time, the call end time, the calling user, the scheduling system, the calling host, the call data and the call result.
3. The method according to claim 2, characterized in that After generating a call record of the operation request according to the request identifier of the operation request, the call identifiers of each service call corresponding to the operation request, and basic information of each service call, the method further includes: A system call relationship graph is generated and displayed according to the request identifier of each operation request, the call identifier of each service call and the call identifier of the previous service call of each service call in the call record of each operation request.
4. The method according to claim 2, characterized in that After generating a call record of the operation request according to the request identifier of the operation request, the call identifiers of each service call corresponding to the operation request, and basic information of each service call, the method further includes: According to the call type, service identifier, scheduled system and called host in the call record of each operation request, the call volume of each service within a preset time period is counted; according to the call volume of each service, the server scheduling instruction is generated.
5. A device for generating data call records, characterized in that: include: A request identifier generation module is used to generate a request identifier for the operation request in response to the operation request based on the user of the operation, the IP address of the server generating the operation request, the time when the operation request is generated, the type of the operation request, and the auto-increment sequence; a call tracking module for making a service call in response to the operation request, obtaining a call identifier of a previous service call of the service call for each service call corresponding to the operation request at the start time of the service call, and generating a call identifier of the service call based on the call identifier of the previous service call of the service call, the request identifier of the operation request corresponding to the service call, the server making the service call, the service called by the service call, and the auto-increment sequence; wherein, when the service call is the first call of the operation request, the call identifier of the previous service call of the service call is a preset identifier; during the service call, generating a dynamic proxy class for the service call based on the interface and implementation class corresponding to the service call; generating an interceptor based on the dynamic proxy class; intercepting the code of the service call by the interceptor to obtain information generated during the call process of the service call; after the service call ends, obtaining the call end time when the service call is successful, or the call failure mark when the service call fails; determining the call identifier of the previous service call of the service call, the information generated during the call process of the service call, and the call end time or call failure mark as basic information of the service call; a call record generating module, configured to generate a call record of the operation request according to the request identifier of the operation request, the call identifiers of each service call corresponding to the operation request, and basic information of each service call; The service evaluation module is used to determine the proportion of service calls including call failure marks in each service call based on the call failure marks of each service call in the call records of each operation request; determine the average value of the occupied time of each service call and the minimum value of the occupied time of each service call based on the call end time and the call start time of each service call in the call records of each operation request; determine the call score of each service based on a preset weight value, the difference between the average value of the occupied time of each service call and the minimum value of the occupied time of each service call, and the proportion of service calls including call failure marks in each service call; and generate an evaluation result based on the call score of each service.
6. A device for generating data call records, characterized in that: include: Processor, memory, and communication interface; The memory is used to store executable instructions of the processor; The processor is configured to execute the method for generating a data call record according to any one of claims 1 to 4 by executing the executable instructions.
7. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for generating a data call record according to any one of claims 1 to 4 is implemented.
8. A computer program product, characterized in that The invention comprises a computer program, which is used to implement the method for generating a data call record according to any one of claims 1 to 4 when executed by a processor.
Citation Information
Patent Citations
Service calling method and device
CN107181675A
Monitoring system for micro-service architecture
CN108600012A
Service calling method and device, electronic equipment and storage medium
CN112783629A
System service repairing method and device and server
CN113342556A