Method, device, equipment and storage medium for determining operation data in business system
By determining the call information and historical call data of each object in the business system, the problem of limited number of interfaces is solved, and the refined analysis of the operation data of the business system is realized, ensuring the accuracy and detail of the data.
Patent Information
- Application Number
- CN202110871869.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-30
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2041-07-30
AI Technical Summary
The number of externally exposed interfaces in the existing business system is limited, which makes it impossible to obtain refined operation data, and thus cannot accurately analyze the actual business processing of the business system.
By determining the number of calls to each object (method or interface) in each business system in each scenario, obtaining call information and updating historical call data, generating call timing charts, and achieving refined analysis of business system operation data.
It realizes refined data statistics for each object and interface in the business system, can accurately analyze the actual business processing situation of the business system, and improves the accuracy and detail of the data.
Smart Images

Figure CN113760930B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method, device, equipment and storage medium for determining operating data in a business system. Background Art
[0002] The business processing of many companies depends on business systems, which can provide a variety of businesses and services.
[0003] In actual application, the operation data of the business system is usually collected regularly, and the actual business processing of the business system is analyzed based on the operation data, for example, the number of times a certain module in the business system is called by a certain business line is analyzed. In related technologies, an externally exposed interface is usually set in the business system, and the actual business processing of the business system can be analyzed based on the situation of the interface being called.
[0004] However, in the process of implementing this application, the inventor discovered that the number of interfaces exposed to the outside is limited, so that the detailed operation data of the business system cannot be obtained based on the calls of the limited number of interfaces, and thus the actual business processing situation of the business system cannot be accurately analyzed. Summary of the invention
[0005] The present application provides a method, device, equipment and storage medium for determining operating data in a business system, so as to obtain operating data of the business system with high accuracy.
[0006] In a first aspect, the present application provides a method for determining operation data in business data, comprising:
[0007] Determining that a first object in the business system is called, where the first object is a method or an interface in the business system;
[0008] Determine calling information corresponding to the first object, where the calling information includes a service identifier and a scenario identifier for calling the first object;
[0009] Acquire historical call data corresponding to the first object, the historical call data including the number of times the first object was called by each scenario in each business in the business system within a historical period;
[0010] The historical call data is updated according to the call information to obtain the call data corresponding to the first object.
[0011] In a possible implementation manner, determining the call information corresponding to the first object includes:
[0012] Acquire the type of the first object, where the type of the first object is a first object or an intermediate object, where the first object is the first object in the call chain, and the intermediate object is another object in the call chain except the first object;
[0013] Determine call information corresponding to the first object according to the type of the first object.
[0014] In a possible implementation, the type of the first object is a head object; and determining the call information corresponding to the first object according to the type of the first object includes:
[0015] Obtaining a call request corresponding to the first object, wherein the call request includes at least one input parameter;
[0016] Determine call information corresponding to the first object according to the at least one input parameter.
[0017] In a possible implementation, determining the call information corresponding to the first object according to the at least one input parameter includes:
[0018] Obtain a first corresponding relationship and a second corresponding relationship; wherein the first corresponding relationship is used to indicate the corresponding relationship between different input parameters and different service identifiers, and the second corresponding relationship is used to indicate the corresponding relationship between different input parameters and different scenario identifiers;
[0019] Determining a service identifier for calling the first object according to the at least one input parameter and the first corresponding relationship;
[0020] A scene identifier for calling the first object is determined according to the at least one input parameter and the second corresponding relationship.
[0021] In a possible implementation, the type of the first object is an intermediate object; and determining the call information corresponding to the first object according to the type of the first object includes:
[0022] Determine the upper-level call information corresponding to the first object, wherein the upper-level call information includes a service identifier and a scenario identifier, the upper-level call information is the call information of the upper object of the first object, and the calls to the first object and the upper object are in the same call chain;
[0023] It is determined that the calling information corresponding to the first object includes the service identifier and the object identifier in the upper-level calling information.
[0024] In a possible implementation, updating the historical call data according to the call information to obtain the call data corresponding to the first object includes:
[0025] Determining the number of calls corresponding to the service identifier and the scenario identifier in the historical call data;
[0026] The number of calls corresponding to the business identifier and the scene identifier is increased by one, and other call data in the historical call data are kept unchanged, to obtain the call data corresponding to the first object, wherein the call data corresponding to the first object includes the number of times the first object is called by each scene in each business of the business system within the latest historical period.
[0027] In a possible implementation, the call data corresponding to the first object also includes a call distribution graph corresponding to the first object; and the method further includes:
[0028] Acquire a historical call distribution graph corresponding to the first object, where the historical call distribution graph includes the number of times the first object was called by each scenario in each business in the business system within the historical period;
[0029] The historical call distribution graph is updated according to the number of times the first object is called in each scenario in each business of the business system within the latest historical period.
[0030] In a possible implementation, the call information further includes a call chain identifier; and the method further includes:
[0031] Acquire call information corresponding to multiple objects called by the business system during the historical period;
[0032] Determine at least one call chain according to the call information corresponding to the multiple objects, each call chain includes at least two objects and a call sequence of the at least two objects, and the call chain identifiers in the call information corresponding to the objects included in the same call chain are the same;
[0033] A call sequence diagram is generated according to the at least one call chain, wherein the call sequence diagram includes objects in the business system and call lines corresponding to each call chain, and a call line corresponding to a call chain is used to connect at least two objects included in the call chain.
[0034] In a second aspect, the present application provides a device for determining operation data in a business system, comprising:
[0035] A first determining module, used to determine that a first object in the business system is called, where the first object is a method or an interface in the business system;
[0036] A second determining module, configured to determine calling information corresponding to the first object, the calling information including a service identifier and a scenario identifier for calling the first object;
[0037] A processing module, configured to obtain historical call data corresponding to the first object, wherein the historical call data includes the number of times the first object is called by each scenario in each business in the business system within a historical period;
[0038] The processing module is further used to update the historical calling data according to the calling information to obtain the calling data corresponding to the first object.
[0039] In a possible implementation manner, the second determining module is specifically configured to:
[0040] Acquire the type of the first object, where the type of the first object is a first object or an intermediate object, where the first object is the first object in the call chain, and the intermediate object is another object in the call chain except the first object;
[0041] Determine call information corresponding to the first object according to the type of the first object.
[0042] In a possible implementation, the type of the first object is a head object; and the second determining module is specifically configured to:
[0043] Obtaining a call request corresponding to the first object, wherein the call request includes at least one input parameter;
[0044] Determine call information corresponding to the first object according to the at least one input parameter.
[0045] In a possible implementation manner, the second determining module is specifically configured to:
[0046] Obtain a first corresponding relationship and a second corresponding relationship; wherein the first corresponding relationship is used to indicate the corresponding relationship between different input parameters and different service identifiers, and the second corresponding relationship is used to indicate the corresponding relationship between different input parameters and different scenario identifiers;
[0047] Determining a service identifier for calling the first object according to the at least one input parameter and the first corresponding relationship;
[0048] A scene identifier for calling the first object is determined according to the at least one input parameter and the second corresponding relationship.
[0049] In a possible implementation, the type of the first object is an intermediate object; and the second determining module is specifically configured to:
[0050] Determine the upper-level call information corresponding to the first object, wherein the upper-level call information includes a service identifier and a scenario identifier, the upper-level call information is the call information of the upper object of the first object, and the calls to the first object and the upper object are in the same call chain;
[0051] It is determined that the calling information corresponding to the first object includes the service identifier and the object identifier in the upper-level calling information.
[0052] In a possible implementation, the processing module is specifically used to:
[0053] Determining the number of calls corresponding to the service identifier and the scenario identifier in the historical call data;
[0054] The number of calls corresponding to the business identifier and the scene identifier is increased by one, and other call data in the historical call data are kept unchanged, to obtain the call data corresponding to the first object, wherein the call data corresponding to the first object includes the number of times the first object is called by each scene in each business of the business system within the latest historical period.
[0055] In a possible implementation, the call data corresponding to the first object also includes a call distribution graph corresponding to the first object; and the processing module is further configured to:
[0056] Acquire a historical call distribution graph corresponding to the first object, where the historical call distribution graph includes the number of times the first object was called by each scenario in each business in the business system within the historical period;
[0057] The historical call distribution graph is updated according to the number of times the first object is called in each scenario in each business of the business system within the latest historical period.
[0058] In a possible implementation, the call information further includes a call chain identifier; and the processing module is further configured to:
[0059] Acquire call information corresponding to multiple objects called by the business system during the historical period;
[0060] Determine at least one call chain according to the call information corresponding to the multiple objects, each call chain includes at least two objects and a call sequence of the at least two objects, and the call chain identifiers in the call information corresponding to the objects included in the same call chain are the same;
[0061] A call sequence diagram is generated according to the at least one call chain, wherein the call sequence diagram includes objects in the business system and call lines corresponding to each call chain, and a call line corresponding to a call chain is used to connect at least two objects included in the call chain.
[0062] In a third aspect, the present application provides an electronic device, comprising: a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to implement the method as described in any one of the first aspects.
[0063] In a fourth aspect, the present application provides a computer-readable storage medium, comprising: a computer program, wherein when the computer program is executed by a processor, the method as described in any one of the first aspects is implemented.
[0064] In a fifth aspect, the present application provides a computer program product, comprising: a computer program, wherein when the computer program is executed by a processor, the method as described in any one of the first aspects is implemented.
[0065] The method, device, equipment and storage medium for determining the operation data in the business system provided by the present application, when determining that the first object in the business system is called, determine the call information corresponding to the first object, the call information includes the business identifier and scenario identifier of the call first object, and then update the historical call data of the first object according to the call information to obtain the call data corresponding to the first object. Through the above process, the number of calls of each object (each method and interface) in the business system in each scenario in each business can be determined. On the one hand, it enables the statistics of the calls of all interfaces and methods in the business system, and on the other hand, it enables the statistics of the calls of each interface and method in each scenario in each business. Therefore, it ensures that the operation data in the business system obtained is more refined, so that the actual business processing of the business system can be accurately analyzed. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0067] Figure 1 A schematic diagram of a business system provided in an embodiment of the present application;
[0068] Figure 2 A flowchart of a method for determining operating data in a business system provided in an embodiment of the present application;
[0069] Figure 3 A flowchart of another method for determining operating data in a business system provided in an embodiment of the present application;
[0070] Figure 4 A schematic diagram of the calling process of the business system provided in an embodiment of the present application;
[0071] Figure 5 A schematic diagram of the generation process of the call chain provided in the embodiment of the present application;
[0072] Figure 6 A schematic diagram of a call distribution graph update process provided in an embodiment of the present application;
[0073] Figure 7 A schematic diagram of a calling timing diagram provided in an embodiment of the present application;
[0074] Figure 8 A schematic diagram of another calling timing diagram provided in an embodiment of the present application;
[0075] Fig. 9 for Figure 8 Schematic diagram of call distribution of each node in;
[0076] Fig.10 A schematic diagram of a configuration service scenario provided in an embodiment of the present application;
[0077] Fig.11 A schematic diagram of the update process of the business scenario configuration provided in the embodiment of the present application;
[0078] Fig.12 A schematic diagram of the structure of a device for determining operation data in a business system provided in an embodiment of the present application;
[0079] Fig.13 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0080] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0081] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. 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.
[0082] To facilitate understanding, the business system involved in the embodiments of the present application is first described.
[0083] Figure 1A schematic diagram of a business system provided in an embodiment of the present application. The business system can interact with one or more other external systems. For example, the business system can provide one or more services to external system 1, and the business system can also call one or more services provided by external system 2.
[0084] See also Figure 1 The business system provides "interfaces exposed by the business system to the outside", "interfaces for accessing external systems", and "methods within the business system". An interface may include one or more methods.
[0085] For example, when other external systems need to access services provided by the business system, they can access the services of the business system by calling the above-mentioned "interfaces exposed by the business system". When the business system needs to access services of other external systems, it can access the services of other external systems by calling the above-mentioned "interfaces for accessing external systems". When the business system is processing internal business processes, it can call the above-mentioned "methods within the business system".
[0086] In some possible scenarios, the business system may be a business system based on Remote Procedure Call (RPC).
[0087] In actual applications, the operation data of the business system is usually collected regularly, and the actual business processing of the business system is analyzed based on the operation data. For example, the actual business processing of the business system can be analyzed by counting the number of calls to the interface exposed by the business system.
[0088] However, in the process of implementing this application, the inventor discovered that the number of interfaces exposed by the business system is limited, so that the detailed operation data of the business system cannot be obtained based on the calls of the limited number of interfaces, and thus the actual business processing situation of the business system cannot be accurately analyzed.
[0089] In order to solve the above technical problems, the embodiments of the present application provide a method, device, equipment, storage medium and program for determining operation data in a business system. In the technical solution of the present application, the actual application scenario can be divided from the business dimension and the scenario dimension to obtain multiple businesses and multiple scenarios. For each interface or method, the number of calls of the interface or method in different scenarios of different businesses can be determined respectively. In this way, the operation data in the acquired business system is more refined, so that the actual business processing situation of the business system can be accurately analyzed.
[0090] The technical solution of the present application is described in detail with specific embodiments below. 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.
[0091] Figure 2 The present invention provides a flowchart of a method for determining operation data in a business system according to an embodiment of the present invention. The method of this embodiment can be executed by an electronic device deployed with a business system. Figure 2 As shown, the method of this embodiment includes:
[0092] S201: Determine that a first object in the business system is called, where the first object is a method or an interface in the business system.
[0093] Specifically, during the operation of the business system, the operation status of the business system can be monitored, for example, whether the first object in the business system is called can be monitored. When the first object is called, the method of this embodiment is triggered to execute.
[0094] The first object may be any method or any interface in the business system. For example, the first object may be Figure 1 For example, the first object can be any method or any interface in Figure 1 The first object can also be the "interface exposed by the business system" or the method in the "interface exposed by the business system". Figure 1 The first object may also be an "interface for accessing an external system" or a method in an "interface for accessing an external system". Figure 1 "Methods used to be called within the business system" in.
[0095] S202: Determine calling information corresponding to the first object, where the calling information includes a service identifier and a scenario identifier for calling the first object.
[0096] In this embodiment, the business scenarios of actual applications can be divided from the business dimension to obtain multiple businesses. It should be understood that different division methods can be used for different business scenarios. For example, for e-commerce business scenarios, the multiple businesses obtained by division may include: key customer business, distribution business, etc.
[0097] Furthermore, the business scenarios of actual applications can be divided from the scenario dimension to obtain multiple scenarios. It should be understood that different division methods can be used for different business scenarios. For example, for e-commerce business scenarios, the multiple scenarios obtained by division may include: querying product information scenarios, updating product attribute scenarios, etc.
[0098] Each service may include multiple scenarios. The scenarios included in different services may be the same or different. For example, service 1 includes scenario 1, scenario 2, and scenario 3. Service 2 includes scenario 2, scenario 3, and scenario 4. Service 3 includes scenario 5 and scenario 6. And so on.
[0099] After monitoring that the first object is called, it can be determined by which service and which scenario the first object is called, thereby obtaining call information corresponding to the first object, which may include a service identifier and a scenario identifier for calling the first object.
[0100] S203: Acquire historical call data corresponding to the first object, where the historical call data includes the number of times the first object is called by each scenario in each business in the business system within a historical period.
[0101] S204: Update the historical calling data according to the calling information to obtain calling data corresponding to the first object.
[0102] In this embodiment, the call data of each object can be maintained. The call data of each object includes the number of times the object is called by each business in each scenario in the business system. When the first object is detected to be called, the historical call data of the first object can be updated according to the call information of the first object, so as to obtain the current call data corresponding to the first object. The current call data is used as the historical call data when the first object is called next time.
[0103] For example, when it is detected that the first object is called for the first time, assuming that the first object is called by scenario 1 in business 1, the calling data of the first object is updated to:
[0104] Called once by scenario 1 in business 1.
[0105] When it is detected that the first object is called for the second time, assuming that the first object is called by scenario 2 in business 1, the calling data of the first object is updated to:
[0106] Called once by scenario 1 in business 1.
[0107] Called once by scenario 2 in business 1.
[0108] When it is detected that the first object is called for the third time, assuming that the first object is called by scenario 2 in business 2, the calling data of the first object is updated to:
[0109] Called once by scenario 1 in business 1.
[0110] Called once by scenario 2 in business 1.
[0111] Called once by scenario 2 in business 2.
[0112] When it is detected that the first object is called for the fourth time, assuming that the first object is called by scenario 1 in business 1, the calling data of the first object is updated to:
[0113] Called twice by scenario 1 in business 1,
[0114] Called once by scenario 2 in business 1.
[0115] Called once by scenario 2 in business 2.
[0116] The method for determining the operation data in the business system provided in this embodiment includes: when determining that the first object in the business system is called, determining the call information corresponding to the first object, the call information includes the business identifier and the scenario identifier for calling the first object, and then, updating the historical call data of the first object according to the call information to obtain the call data corresponding to the first object. Through the above process, the number of calls of each object (each method and interface) in the business system in each scenario in each business can be determined. On the one hand, it enables statistics on the calls of all interfaces and methods in the business system, and on the other hand, it enables statistics on the calls of each interface and method in each scenario in each business. Therefore, it ensures that the operation data obtained in the business system is more refined, so that the actual business processing of the business system can be accurately analyzed.
[0117] Based on the above embodiments, the present application scheme is described in more detail below in conjunction with a specific embodiment.
[0118] Figure 3 A flowchart of another method for determining operation data in a business system provided in an embodiment of the present application. Figure 3 As shown, the method of this embodiment includes:
[0119] S301: Determine that a first object in a business system is called, where the first object is a method or an interface in the business system.
[0120] S302: Obtain the type of the first object, where the type of the first object is a first object or an intermediate object. The first object is the first object in the call chain, and the intermediate object is other objects in the call chain except the first object.
[0121] A call chain represents the execution process of a transaction or process in a business system. The first object in a call chain is the head object, and the other objects in the call chain except the first object are intermediate objects. Figure 4 Give an example.
[0122] Figure 4Schematic diagram of the calling process of the business system provided in the embodiment of the present application. Figure 4 As shown, suppose method 1.1 in interface 1 exposed by the business system is called, method 1.1 calls method a inside the business system, method a calls method c, method c calls method b, method b calls method 2.1 in interface 2 for accessing the external system, and method 2.1 calls method 2 in the external system. In this way, the above process constitutes a call chain. In the call chain, "method 1.1 in interface 1 exposed by the business system" is the first object. In the call chain, other objects except the first object are intermediate objects.
[0123] In this way, the call information corresponding to the first object can be determined according to the type of the first object. When the type of the first object is the head object, S303 and S304 are executed. When the type of the first object is the intermediate object, S305 and S306 are executed.
[0124] S303: If the type of the first object is a head object, obtain a call request corresponding to the first object, where the call request includes at least one incoming parameter.
[0125] S304: Determine calling information corresponding to the first object according to the at least one input parameter.
[0126] Specifically, the business corresponding to different input parameters and the scenarios corresponding to different input parameters can be analyzed and counted in advance, and then the corresponding relationship between the input parameters and the business identifier, and the input parameters and the scenario identifier can be generated according to the statistical results. In this way, when a call request corresponding to the first object is received, the business identifier and scenario identifier of the first object can be determined according to the input parameters in the call request.
[0127] In a possible implementation, the following feasible method can be used to determine the call information corresponding to the first object: obtain a first corresponding relationship and a second corresponding relationship; wherein the first corresponding relationship is used to indicate the correspondence between different input parameters and different business identifiers, and the second corresponding relationship is used to indicate the correspondence between different input parameters and different scene identifiers; based on the at least one input parameter and the first corresponding relationship, determine the business identifier for calling the first object; based on the at least one input parameter and the second corresponding relationship, determine the scene identifier for calling the first object.
[0128] Combine the following Figure 4 The calling process shown describes the generation process of the call chain.
[0129] Figure 5 The following is a schematic diagram of the generation process of the call chain provided in the embodiment of the present application. Figure 5As shown, when it is detected that method 1.1 in interface 1 exposed by the business system is called, a call chain can be generated for this call, and the identifier traceId of the call chain is randomly generated, and the identifier of the call chain is written into the call chain. According to the incoming parameters in the call request of this call (i.e., method 1.1), the business identifier and scenario identifier of this call are determined. The business identifier and scenario identifier are written into the call chain. Furthermore, a new first object node (corresponding to method 1.1) is created in the call chain, and the resulting call chain is as follows: Figure 5 As shown in 501.
[0130] S305: If the type of the first object is an intermediate object, determine the upper-level calling information corresponding to the first object, where the upper-level calling information includes a service identifier and a scenario identifier.
[0131] The upper-level calling information is the calling information of the previous object of the first object, and the calling of the first object and the previous object are located in the same calling chain.
[0132] S306: Determine that the calling information corresponding to the first object includes the service identifier and the object identifier in the upper-level calling information.
[0133] Exemplary, combined Figure 4 and Figure 5 As shown, when it is detected that method a is called, since method a is an intermediate object, the superior call information corresponding to method a (that is, the call information of method 1.1) can be obtained. For example, the parent thread information corresponding to method a can be obtained through the TransmittableThreadLocal technology, thereby obtaining the superior call information. The superior call information may include a call chain identifier, a business identifier, a scene identifier, etc. In this way, the business identifier and the scene identifier in the superior call information can be determined as the call information of method a. In this way, a new intermediate object node (corresponding to method a) can be created in the call chain, and the resulting call chain is as follows: Figure 5 As shown in 502.
[0134] Similarly, when it is detected that method c is called, since method c is an intermediate object, the superior call information corresponding to method c (that is, the call information of method a) can be obtained. For example, the parent thread information corresponding to method c can be obtained through the TransmittableThreadLocal technology to obtain the superior call information. The superior call information may include a call chain identifier, a business identifier, a scene identifier, etc. In this way, the business identifier and the scene identifier in the superior call information can be determined as the call information of method c. In this way, a new intermediate object node (corresponding to method c) can be created in the call chain, and the resulting call chain is as follows: Figure 5 As shown in 503.
[0135] It should be understood that the calling process of other methods is similar, and this embodiment will not illustrate them one by one.
[0136] S307: Acquire historical call data corresponding to the first object, where the historical call data includes the number of times the first object is called by each scenario in each business in the business system within a historical period.
[0137] Specifically, when the first object is called for the first time, there is no historical call data corresponding to the first object in the cache, and a new call data may be created, and the number of calls in each scenario in each business in the call data is set to 0. The newly created call data is used as the historical call data.
[0138] S308: Determine the number of calls corresponding to the service identifier and the scenario identifier in the historical call data, increase the number of calls corresponding to the service identifier and the scenario identifier by one, and keep other call data in the historical call data unchanged, to obtain the call data corresponding to the first object.
[0139] The call data corresponding to the first object includes the number of times the first object is called in each scenario in each business of the business system within the latest historical period.
[0140] For example, assume that the historical call data of the first object is as shown in Table 1. Assume that the first object is called by scene 2 in business 1, then the call count (5 times) corresponding to scene 2 in business 1 is obtained from Table 1, and the call count is increased by 1, and the call counts corresponding to other business identifiers and scene identifiers remain unchanged, and the call data corresponding to the first object is obtained as shown in Table 2. Referring to Table 2, the call count corresponding to business identifier 1 and scene identifier 2 is updated to 6 times.
[0141] Table 1
[0142] Business Logo Scene Identification Number of calls Business 1 Scenario 1 3 times Business 1 Scenario 2 5 times Business 1 Scene 3 4 times Business 2 Scenario 2 3 times Business 2 Scene 3 5 times Business 2 Scene 4 6 times … … …
[0143] Table 2
[0144]
[0145]
[0146] In some possible implementations, the call data corresponding to the first object in this embodiment may also include: a call distribution graph corresponding to the first object. In this way, after determining the call information of the first object, the call distribution graph corresponding to the first object may also be obtained according to the call information of the first object. This is described below in conjunction with S309 and S310.
[0147] S309: Obtain a historical call distribution graph corresponding to the first object, where the historical call distribution graph includes the number of times the first object is called by each scenario in each business in the business system within the historical period.
[0148] S310: updating the historical call distribution graph according to the number of times the first object is called in each scenario in each business of the business system within the latest historical period.
[0149] The call distribution graph in this embodiment refers to a graph used to describe the distribution of the number of times each object is called by each business scenario in a business system within a period of time. This embodiment does not limit the form of the call distribution graph, which can be a bar graph, a line graph, an area graph, etc. The following is an example of a bar graph.
[0150] Figure 6 A schematic diagram of a call distribution graph update process provided in an embodiment of the present application. Figure 6 In this section, only the scenarios in business 1 are used as examples. Figure 6 As shown in 601 in FIG. 1 , it is assumed that in the historical call distribution graph, the first object is called 3 times, 5 times, and 4 times by scenario 1, scenario 2, and scenario 3 in business 1, respectively. It is assumed that the call counts of scenario 1, scenario 2, and scenario 3 in business 1 in the latest historical period are 3 times, 6 times, and 4 times, respectively. The updated call distribution graph is as follows: Figure 6 As shown in 602.
[0151] It should be understood that this embodiment is described by taking the calling process of an object as an example. For each object in the business system, the calling process can be tracked in the manner of this embodiment.
[0152] On the basis of the above-mentioned embodiments, the embodiments of the present application can also generate a call sequence diagram. Specifically, the call information corresponding to the multiple objects called by the business system in the historical period is obtained. The call information of each object may include the identifier of the call chain. According to the call information corresponding to the multiple objects, at least one call chain can be determined, each call chain includes at least two objects and the call order of the at least two objects, and the call chain identifiers in the call information corresponding to the objects included in the same call chain are the same. According to the at least one call chain, a call sequence diagram is generated, and the call sequence diagram includes the objects in the business system and the call lines corresponding to each call chain, and the call line corresponding to a call chain is used to connect the at least two objects included in the call chain.
[0153] For example, Figure 7 A schematic diagram of a calling sequence diagram provided in an embodiment of the present application. Figure 7As shown, the call sequence diagram includes each object in the business system and also includes the call lines between each object in each call chain. It should be understood that in actual applications, each object in the call sequence diagram can be called for different businesses and scenarios, and can also be called multiple times.
[0154] Based on the call sequence diagram, you can obtain the call chain information corresponding to different businesses and scenarios. You can also obtain the call distribution diagram when each object in each call chain is called. Figure 8 A schematic diagram of another calling sequence diagram provided for an embodiment of the present application. Figure 8 Taking business 1 as an example, the call chains corresponding to scenarios 1, 2, and 3 in business 1 are illustrated. Fig. 9 for Figure 8 Schematic diagram of the call distribution of each node in . Fig. 9 The call distribution graphs of each object in each call chain are shown as examples.
[0155] The method for processing operation data in the business system provided in this embodiment can determine the number of calls of each object (each method and interface) in the business system in each scenario in each business. On the one hand, it enables statistics on the calls of all interfaces and methods in the business system, and on the other hand, it enables statistics on the calls of each interface and method in each scenario in each business. Therefore, it is ensured that the operation data obtained in the business system is more refined, so that the actual business processing situation of the business system can be accurately analyzed.
[0156] On the basis of any of the above embodiments, since different business scenarios have different ways of dividing services and scenarios, in order to make the technical solution of this application applicable to various business scenarios, this application also provides a method for configuring a business system. The configuration process of the business system is introduced below.
[0157] In some possible examples, this embodiment may provide a business scenario configuration page to the user so that the user can configure multiple services and multiple scenarios according to actual business scenarios. Fig.10 This is a schematic diagram of a configuration service scenario provided in an embodiment of the present application. Fig.10 As shown, it can include primary configuration, secondary configuration, tertiary configuration and subsequent custom configuration.
[0158] Among them, the first-level configuration allows users to configure multiple services. Fig.10 In the figure, a user configures service 1, service 2, and service 3 as an example.
[0159] Secondary configuration allows users to configure multiple scenarios for each service. For example Fig.10In the example, scenario 1, scenario 2, and scenario 3 are configured for service 1; scenario 1, scenario 2, scenario 3, and scenario 4 are configured for service 2; and scenario 1 and scenario 2 are configured for service 3.
[0160] The three-level configuration allows users to configure more fine-grained scenarios for each scenario. For example Fig.10 In the example, scenario 1.1 and scenario 1.2 are configured for scenario 1. Similarly, users can also perform more fine-grained configurations in subsequent configurations.
[0161] Through the above configuration process of the business scenario, we can build Fig.10 The business-scenario relationship tree shown. It should be noted that Fig.10 The above is only an example. In actual application, different configuration modes may be used for different business scenarios, which is not limited in this embodiment. Through the above configuration process of business scenarios, customized configuration of business and scenarios is supported, making the application of this embodiment more flexible.
[0162] Furthermore, after obtaining the service and scene information configured by the user, it is also possible to monitor in real time whether the service and scene information are updated. If there is an update, the updated service and scene information is used when determining the call data of the object.
[0163] In some examples, when updating the configuration of a business scenario, there may be new non-independent scenarios. Fig.11 Schematic diagram of the update process of the business scenario configuration provided in the embodiment of the present application. Fig.11 As shown in the figure, it is assumed that the user has configured scenario 1, scenario 2, and scenario 3 for service 1. When the user updates the service scenario configuration, scenario 4 is added, and scenario 4 overlaps with scenario 1. In this case, the overlapping part of scenario 1 and scenario 4 can be used as the new scenario 1, and the original scenario 1 and the newly added scenario 4 can be downgraded to the secondary configuration, that is, corresponding to Fig.11 The sub-scenario configurations are downgraded in sequence. Furthermore, the call statistics data of the original scene 1 that overlap with the scene 4 are allocated to the new scene 1.2, and this part of the data is deleted in the new scene 1.1. After the update is completed, after this point in time, the two new scenes can collect call statistics data independently.
[0164] In some other possible examples, this embodiment can also provide users with a point-of-sale configuration page. Users can use this page to configure the path of the object (method or interface) where the point-of-sale is required. The configurable object here can be a method or interface exposed to the outside, a method within the business system, or a method or interface for accessing an external system. When an object is detected to be called, the path where the object is located is used to identify whether the object is a point-of-sale object. If it is a point-of-sale object, the trigger Figure 2 or Figure 3 The embodiment shown is used to obtain the calling data of the object.
[0165] By configuring the tracking points, it is possible to implement tracking point processing on the business system without intruding into the internal code of the business system, thus ensuring the security of the business system.
[0166] Fig.12 This is a schematic diagram of the structure of a device for determining operation data in a business system provided in an embodiment of the present application. The device of this embodiment may be in the form of software and / or hardware. Fig.12 As shown, the device 1200 for determining operation data in a business system provided in this embodiment may include: a first determining module 1201 , a second determining module 1202 and a processing module 1203 .
[0167] The first determining module 1201 is used to determine that a first object in the business system is called, where the first object is a method or an interface in the business system;
[0168] A second determining module 1202 is used to determine calling information corresponding to the first object, where the calling information includes a service identifier and a scenario identifier for calling the first object;
[0169] The processing module 1203 is used to obtain historical call data corresponding to the first object, where the historical call data includes the number of times the first object is called by each scenario in each business in the business system within a historical period;
[0170] The processing module 1203 is further configured to update the historical calling data according to the calling information to obtain the calling data corresponding to the first object.
[0171] In a possible implementation, the second determining module 1202 is specifically configured to:
[0172] Acquire the type of the first object, where the type of the first object is a first object or an intermediate object, where the first object is the first object in the call chain, and the intermediate object is another object in the call chain except the first object;
[0173] Determine call information corresponding to the first object according to the type of the first object.
[0174] In a possible implementation, the type of the first object is a head object; and the second determining module 1202 is specifically configured to:
[0175] Obtaining a call request corresponding to the first object, wherein the call request includes at least one input parameter;
[0176] Determine call information corresponding to the first object according to the at least one input parameter.
[0177] In a possible implementation, the second determining module 1202 is specifically configured to:
[0178] Obtain a first corresponding relationship and a second corresponding relationship; wherein the first corresponding relationship is used to indicate the corresponding relationship between different input parameters and different service identifiers, and the second corresponding relationship is used to indicate the corresponding relationship between different input parameters and different scenario identifiers;
[0179] Determining a service identifier for calling the first object according to the at least one input parameter and the first corresponding relationship;
[0180] A scene identifier for calling the first object is determined according to the at least one input parameter and the second corresponding relationship.
[0181] In a possible implementation, the type of the first object is an intermediate object; and the second determining module 1202 is specifically configured to:
[0182] Determine the upper-level call information corresponding to the first object, wherein the upper-level call information includes a service identifier and a scenario identifier, the upper-level call information is the call information of the upper object of the first object, and the calls to the first object and the upper object are in the same call chain;
[0183] It is determined that the calling information corresponding to the first object includes the service identifier and the object identifier in the upper-level calling information.
[0184] In a possible implementation, the processing module 1203 is specifically configured to:
[0185] Determining the number of calls corresponding to the service identifier and the scenario identifier in the historical call data;
[0186] The number of calls corresponding to the business identifier and the scene identifier is increased by one, and other call data in the historical call data are kept unchanged, to obtain the call data corresponding to the first object, wherein the call data corresponding to the first object includes the number of times the first object is called by each scene in each business of the business system within the latest historical period.
[0187] In a possible implementation, the call data corresponding to the first object also includes a call distribution graph corresponding to the first object; and the processing module 1203 is further configured to:
[0188] Acquire a historical call distribution graph corresponding to the first object, where the historical call distribution graph includes the number of times the first object was called by each scenario in each business in the business system within the historical period;
[0189] The historical call distribution graph is updated according to the number of times the first object is called in each scenario in each business of the business system within the latest historical period.
[0190] In a possible implementation, the call information further includes a call chain identifier; and the processing module 1203 is further configured to:
[0191] Acquire call information corresponding to multiple objects called by the business system during the historical period;
[0192] Determine at least one call chain according to the call information corresponding to the multiple objects, each call chain includes at least two objects and a call sequence of the at least two objects, and the call chain identifiers in the call information corresponding to the objects included in the same call chain are the same;
[0193] A call sequence diagram is generated according to the at least one call chain, wherein the call sequence diagram includes objects in the business system and call lines corresponding to each call chain, and a call line corresponding to a call chain is used to connect at least two objects included in the call chain.
[0194] The device provided in this embodiment can be used to execute the technical solution in any of the above method embodiments. Its implementation principle and technical effects are similar and will not be described in detail here.
[0195] Fig.13 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may be an electronic device with a business system deployed. Fig.13 As shown, the electronic device 1300 provided in this embodiment includes: a processor 1301 and a memory 1302 .
[0196] The memory 1302 is used to store computer programs; the processor 1301 is used to execute the computer programs stored in the memory to implement one or more steps of the method for determining the operation data in the business system in the above embodiment. For details, please refer to the relevant description in the above method embodiment, the implementation principle and technical effect are similar, and this embodiment will not be repeated here.
[0197] Optionally, the memory 1302 may be independent or integrated with the processor 1301 .
[0198] When the memory 1302 is a device independent of the processor 1301 , the electronic device 1300 may further include: a bus 1303 for connecting the memory 1302 and the processor 1301 .
[0199] An embodiment of the present application also provides a computer-readable storage medium, which includes a computer program. The computer program is used to implement one or more steps in the method for determining operating data in a business system in any of the above method embodiments. The implementation principles and technical effects are similar and will not be repeated here.
[0200] An embodiment of the present application also provides a chip, including: a memory and a processor, wherein the memory stores a computer program, and the processor runs the computer program to execute one or more steps of the method for determining operating data in a business system in any of the above method embodiments. The implementation principles and technical effects are similar and will not be elaborated here.
[0201] An embodiment of the present application also provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements one or more steps of the method for determining operating data in a business system in any of the above method embodiments. Its implementation principles and technical effects are similar and will not be repeated here.
[0202] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0203] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0204] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The above-mentioned module-composed unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
[0205] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present application.
[0206] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the application may be directly implemented as being executed by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.
[0207] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.
[0208] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0209] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0210] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic device or a main control device.
[0211] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0212] 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 it. 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 method for determining operation data in a business system, characterized in that: include: Determining that a first object in the business system is called, where the first object is a method or an interface in the business system; Determine calling information corresponding to the first object, where the calling information includes a service identifier and a scenario identifier for calling the first object; Acquire historical call data corresponding to the first object, the historical call data including the number of times the first object was called by each scenario in each business in the business system within a historical period; The historical call data is updated according to the call information to obtain the call data corresponding to the first object.
2. The method according to claim 1, characterized in that Determining the call information corresponding to the first object includes: Acquire the type of the first object, where the type of the first object is a first object or an intermediate object, where the first object is the first object in the call chain, and the intermediate object is another object in the call chain except the first object; Determine call information corresponding to the first object according to the type of the first object.
3. The method according to claim 2, characterized in that The type of the first object is a head object; and according to the type of the first object, determining the call information corresponding to the first object includes: Obtaining a call request corresponding to the first object, wherein the call request includes at least one input parameter; Determine call information corresponding to the first object according to the at least one input parameter.
4. The method according to claim 3, characterized in that Determining, according to the at least one input parameter, call information corresponding to the first object, includes: Obtain a first corresponding relationship and a second corresponding relationship; wherein the first corresponding relationship is used to indicate the corresponding relationship between different input parameters and different service identifiers, and the second corresponding relationship is used to indicate the corresponding relationship between different input parameters and different scenario identifiers; Determining a service identifier for calling the first object according to the at least one input parameter and the first corresponding relationship; A scene identifier for calling the first object is determined according to the at least one input parameter and the second corresponding relationship.
5. The method according to claim 2, characterized in that: The type of the first object is an intermediate object; and according to the type of the first object, determining the call information corresponding to the first object includes: Determine the upper-level call information corresponding to the first object, wherein the upper-level call information includes a service identifier and a scenario identifier, the upper-level call information is the call information of the upper object of the first object, and the calls to the first object and the upper object are in the same call chain; It is determined that the calling information corresponding to the first object includes the service identifier and the object identifier in the upper-level calling information.
6. The method according to any one of claims 1 to 5, characterized in that: Updating the historical call data according to the call information to obtain the call data corresponding to the first object includes: Determining the number of calls corresponding to the service identifier and the scenario identifier in the historical call data; The number of calls corresponding to the business identifier and the scene identifier is increased by one, and other call data in the historical call data are kept unchanged, to obtain the call data corresponding to the first object, wherein the call data corresponding to the first object includes the number of times the first object is called by each scene in each business of the business system within the latest historical period.
7. The method according to claim 6, characterized in that The call data corresponding to the first object also includes a call distribution graph corresponding to the first object; and the method further includes: Acquire a historical call distribution graph corresponding to the first object, where the historical call distribution graph includes the number of times the first object was called by each scenario in each business in the business system within the historical period; The historical call distribution graph is updated according to the number of times the first object is called in each scenario in each business of the business system within the latest historical period.
8. The method according to any one of claims 1 to 5, characterized in that: The call information also includes a call chain identifier; the method also includes: Acquire call information corresponding to multiple objects called by the business system during the historical period; Determine at least one call chain according to the call information corresponding to the multiple objects, each call chain includes at least two objects and a call sequence of the at least two objects, and the call chain identifiers in the call information corresponding to the objects included in the same call chain are the same; A call sequence diagram is generated according to the at least one call chain, wherein the call sequence diagram includes objects in the business system and call lines corresponding to each call chain, and a call line corresponding to a call chain is used to connect at least two objects included in the call chain.
9. A device for determining operation data in a business system, characterized in that: include: A first determining module, used to determine that a first object in the business system is called, where the first object is a method or an interface in the business system; A second determining module, configured to determine calling information corresponding to the first object, the calling information including a service identifier and a scenario identifier for calling the first object; A processing module, configured to obtain historical call data corresponding to the first object, wherein the historical call data includes the number of times the first object is called by each scenario in each business in the business system within a historical period; The processing module is further used to update the historical calling data according to the calling information to obtain the calling data corresponding to the first object.
10. An electronic device, characterized in that: include: A memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to implement the method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: include: A computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 8.
12. A computer program product, characterized in that include: A computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Method and device for adding budget completed information and budget control system
CN101650803A
Generation method and device for system interface call records
CN104731564A