Interaction information acquisition, analysis method, device and equipment of business system

By merging the microservice manifest and the interaction information of the call requests, the analysis difficulties caused by the complexity of the interaction links in the microservice architecture are resolved, and the analysis efficiency of quickly locating the impact of interface changes or failures is improved.

CN116723113BActive Publication Date: 2026-04-21GREAT WALL MOTOR CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GREAT WALL MOTOR CO LTD
Filing Date
2023-05-19
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In a microservice architecture, the interaction links between microservices are complex, which means that changes to interfaces may affect the normal operation of multiple services, making it difficult to effectively analyze the scope of the impact.

Method used

By acquiring interaction information and call request information from the microservice manifest and merging them into an interaction information set, analysis methods and devices are provided to support the analysis of interfaces, microservices, and interaction methods.

Benefits of technology

It improves the efficiency of analyzing microservice architecture business systems and enables quick identification of the impact scope of interface changes or failures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116723113B_ABST
    Figure CN116723113B_ABST
Patent Text Reader

Abstract

This application provides a method, apparatus, and device for acquiring and analyzing interaction information of a business system. The interaction information acquisition method includes: acquiring first interaction information corresponding to each microservice in a microservice list of the business system to obtain a first interaction information set; acquiring second interaction information corresponding to each call request of the business system to obtain a second interaction information set; and merging the first and second interaction information sets to obtain an interaction information set. This application obtains an interaction information set that includes all interaction information corresponding to the business system by merging the first and second interaction information sets. This allows for the analysis of the business system using this interaction information set, improving the analysis efficiency for business systems based on a microservice architecture.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of microservice architecture, and in particular to a method, apparatus, and device for acquiring and analyzing interactive information of a business system. Background Technology

[0002] With the advancement of internet technology, microservice architecture has gradually emerged. Each microservice is a small functional block focused on a single responsibility and function, and several microservices are combined to form complex, large applications. Each microservice can be deployed independently, and the microservices are loosely coupled. Microservices call each other's interfaces to obtain expected data, ultimately forming complex interaction chains.

[0003] In scenarios with complex interaction links between microservices, a modification to a certain interface may affect the normal operation of multiple microservices. Therefore, it is necessary to analyze the scope of impact of daily online failures and interface changes in order to locate the scope of impact when making interface changes or microservice modifications. Summary of the Invention

[0004] This application provides a method, apparatus, and device for acquiring and analyzing interactive information of a business system, in order to solve the problem of how to acquire interactive information for analyzing a business system based on a microservice architecture.

[0005] In a first aspect, embodiments of this application provide a method for obtaining interactive information in a business system based on a microservice architecture, the method comprising:

[0006] Obtain the first interaction information corresponding to each microservice in the microservice list of the business system to obtain the first interaction information set.

[0007] Obtain the second interaction information corresponding to each call request of the business system to obtain the second interaction information set;

[0008] Merge the first set of interactive information and the second set of interactive information to obtain the second set of interactive information.

[0009] The set of interactive information includes interactive information between microservices that have interactive relationships among multiple microservices corresponding to the business system. Each interactive information includes at least a source microservice, a target microservice, an interaction method, and an interface. The source microservice and the target microservice are both microservices among the multiple microservices. The source microservice interacts with the target microservice by calling the interface in the interaction method.

[0010] Secondly, embodiments of this application also provide an analysis method for a business system based on a microservice architecture, the method comprising:

[0011] Receive an analysis request for a business system, wherein the analysis request carries an item to be analyzed, and the item to be analyzed is at least one of an interface, a source microservice, a target microservice, and an interaction method;

[0012] According to the analysis request, the interaction information associated with the project to be analyzed is searched from the interaction information set corresponding to the business system, and determined as the target interaction information set; wherein, the interaction information set is obtained by the interaction information acquisition method of the business system based on microservice architecture described above;

[0013] The set of interactive information includes interactive information between microservices that have interactive relationships among multiple microservices corresponding to the business system. Each interactive information includes at least a source microservice, a target microservice, an interaction method, and an interface. The source microservice and the target microservice are both microservices among the multiple microservices. The source microservice interacts with the target microservice by calling the interface in the interaction method.

[0014] Thirdly, embodiments of this application also provide an interactive information acquisition device for a business system based on a microservice architecture, comprising:

[0015] The first acquisition module is used to acquire the first interaction information corresponding to each microservice in the microservice list of the business system, and obtain the first interaction information set.

[0016] The second acquisition module is used to acquire the second interaction information corresponding to each call request of the business system, and obtain the second interaction information set.

[0017] The first processing module is used to merge the first set of interactive information and the second set of interactive information to obtain an interactive information set.

[0018] Fourthly, embodiments of this application also provide an analysis apparatus for a business system based on a microservice architecture, comprising:

[0019] The receiving module is used to receive analysis requests for the business system. The analysis request carries items to be analyzed, and the items to be analyzed are at least one of the following: interface, source microservice, target microservice, and interaction method.

[0020] The second processing module is used to search for interaction information associated with the project to be analyzed from the interaction information set corresponding to the business system according to the analysis request, and determine it as the target interaction information set.

[0021] Fifthly, embodiments of this application provide an electronic device, which includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0022] Memory, used to store computer programs;

[0023] When a processor executes a program stored in memory, it implements the steps in the above-mentioned method for obtaining interactive information of a business system based on a microservice architecture or the method for analyzing a business system based on a microservice architecture.

[0024] Sixthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the above-described method for obtaining interactive information of a business system based on a microservice architecture or the method for analyzing a business system based on a microservice architecture.

[0025] The embodiments of this application include at least the following technical effects:

[0026] The technical solution of this application embodiment obtains an interaction information set that includes all interaction information corresponding to the business system by merging a first interaction information set that includes the first interaction information corresponding to each microservice of the business system and a second interaction information set that includes the second interaction information corresponding to each call request of the business system. This interaction information set can then be used to analyze the business system, thereby improving the analysis efficiency for business systems based on microservice architecture. Attached Figure Description

[0027] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.

[0028] Figure 1 This is a flowchart illustrating the method for obtaining interactive information in a business system based on a microservice architecture, as provided in an embodiment of this application.

[0029] Figure 2 This is a flowchart illustrating the analysis method for a business system based on a microservice architecture provided in this application embodiment;

[0030] Figure 3 This is a schematic diagram of the structure of the interactive information acquisition device for a business system based on a microservice architecture provided in this application embodiment;

[0031] Figure 4 This is a schematic diagram of the structure of the analysis device for a business system based on a microservice architecture provided in the embodiments of this application;

[0032] Figure 5 A block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0033] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0034] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments.

[0035] In the various embodiments of this application, it should be understood that the sequence number of each process described below does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0036] This application provides a method for obtaining interaction information of a business system based on a microservice architecture. This method is applied to a microservice architecture analysis system, which stores interaction information sets corresponding to multiple business systems. The analysis system analyzes the business systems based on these interaction information sets. When analyzing each business system, the analysis system needs to obtain the interaction information set corresponding to that business system, such as... Figure 1 As shown, the interactive information acquisition method includes:

[0037] Step 101: Obtain the first interaction information corresponding to each microservice in the microservice list of the business system, and obtain the first interaction information set.

[0038] The business system here adopts a microservice architecture, which includes multiple microservices. Each microservice is deployed independently and is used to implement different functions in the business system. The microservices are integrated with each other and form a complex interaction chain through interfaces, messages, databases and other means.

[0039] Specifically, the microservice architecture analysis system can obtain the first interaction information set by acquiring the first interaction information corresponding to each microservice in the microservice list of the business system. The first interaction information set stores all the interaction information in the business system. The first interaction information in the first interaction information set includes at least the source microservice, the target microservice, the interface, and the interaction method.

[0040] Considering that the business system will be continuously updated and maintained after its launch, and new microservices will be added based on the required new functional blocks, the interaction information acquisition method provided in this application embodiment can preset an interval period to periodically acquire the first interaction information set corresponding to the business system. This preset interval period needs to be set according to the actual business system situation, and this application does not impose specific limitations. Different preset interval periods can be set for different business systems.

[0041] Step 102: Obtain the second interaction information corresponding to each call request of the business system, and obtain the second interaction information set.

[0042] Specifically, the first set of interaction information stores all interaction information in the business system, including some useless interaction information, that is, interaction information that has not been used during the operation of the business system. Through this step, the second set of interaction information corresponding to each call request of the business system can be obtained, and the interaction information in the obtained second set of interaction information is the interaction information that has actually been used. The second set of interaction information also includes the call count corresponding to each interaction information. Therefore, the interaction information in the second set of interaction information includes at least the source microservice, the target microservice, the interface, the interaction method, and the call count.

[0043] Considering the increased number of call requests in the business system after its launch, and the increased interaction information in the interaction system, the interaction information acquisition method provided in this application can preset an interval period to periodically acquire the second set of interaction information corresponding to the business system. This preset interval period needs to be set according to the actual business system situation, and this application does not impose specific limitations. Different preset interval periods can be set for different business systems.

[0044] Step 103: Merge the first set of interactive information and the second set of interactive information to obtain the second set of interactive information.

[0045] The set of interactive information includes interactive information between microservices that have an interactive relationship among multiple microservices corresponding to the business system. Each interactive information includes at least a source microservice, a target microservice, an interaction method, and the number of interface calls. The source microservice and the target microservice are both microservices among the multiple microservices. The source microservice interacts with the target microservice by calling the interface in the interaction method.

[0046] By merging the first set of interactive information and the second set of interactive information, the merged set of interactive information can include all interactive information corresponding to the business system. Optionally, each set of interactive information can also include the corresponding number of calls.

[0047] This application embodiment obtains an interaction information set that includes all interaction information corresponding to the business system by merging a first interaction information set that includes the first interaction information corresponding to each microservice of the business system and a second interaction information set that includes the second interaction information corresponding to each call request of the business system. This interaction information set can then be used to analyze the business system, thereby improving the analysis efficiency for business systems based on microservice architecture.

[0048] In an optional embodiment of this application, obtaining the first interaction information corresponding to each microservice in the microservice list of the business system includes:

[0049] Obtain the list of microservices corresponding to the business system;

[0050] For each microservice in the microservice list, obtain the target microservice with the interface annotation set from the service container corresponding to the microservice;

[0051] For each microservice in the microservice list, obtain the interface and interaction method corresponding to the target microservice of the microservice, and obtain the first interaction information corresponding to the microservice.

[0052] Specifically, when the analysis system obtains the first interaction information corresponding to each microservice in the microservice list of the business system, it obtains the microservice list corresponding to the business system, which includes all microservices of the business system. Then, for each microservice in the microservice list, it obtains the target microservice with interface annotations set from the service container corresponding to each microservice. The target microservice has an interaction relationship with the current microservice. Then, it parses out the interface and interaction method between the target microservice and the current microservice to obtain the first interaction information corresponding to each microservice in the microservice list.

[0053] The above implementation scheme of this application obtains the first set of interaction information corresponding to the business system by acquiring the interaction information corresponding to each microservice in the microservice list. The first set of interaction information obtained in this way includes all the interaction information involved in the business system, which can avoid the situation of missing any interaction information.

[0054] In an optional embodiment of this application, obtaining the second interaction information corresponding to each call request of the business system includes:

[0055] Install a dynamic information acquisition component on the business system;

[0056] During the operation of the business system, the system receives the second interactive information corresponding to each call request collected by the dynamic information collection component.

[0057] When obtaining the second interaction information corresponding to a call request, a preset dynamic information collection component can be installed in the business system, and this component can be used to obtain the second interaction information corresponding to each call request. This preset dynamic information collection component can be an existing dynamic proxy component such as Skywalking.

[0058] The above-described implementation scheme of this application installs a preset dynamic information collection component in the business system, and then receives the second interactive information corresponding to each call request collected by the preset dynamic information collection component. This makes the second interactive information set include the number of calls corresponding to each interactive information, thereby obtaining the actual number of times the interactive information is used. This allows users to not only obtain the interactive information associated with the project to be analyzed, but also to know the number of times this interactive information has been called.

[0059] In an optional embodiment of this application, the interaction information in the interaction information set further includes the number of calls;

[0060] The step of obtaining the second interaction information corresponding to each call request of the business system, and obtaining the second interaction information set, includes:

[0061] After obtaining the second interaction information, determine whether the second interaction information set includes interaction information that matches the second interaction information;

[0062] When the second set of interactive information includes interactive information that matches the second interactive information, the number of calls corresponding to the interactive information that matches the second interactive information is incremented by one;

[0063] If the second set of interactive information does not contain any interactive information that matches the second interactive information, the second interactive information is added to the second set of interactive information, and the number of calls corresponding to the second interactive information is set to one.

[0064] After obtaining the second interaction information corresponding to the call request, it is determined whether the set of second interaction information includes interaction information that matches the second interaction information. Here, matching means that the source microservice, target microservice, interface, and interaction method in the interaction information are all the same. If it does, it means that the second interaction information corresponding to the call request is not being used for the first time, so the call count corresponding to the interaction information that matches the second interaction information is incremented by one. If it does not, it means that the second interaction information corresponding to the call request is being used for the first time, so the second interaction information is added to the set of second interaction information, and the call count corresponding to the second interaction information is set to one.

[0065] The interaction information in the second set of interaction information that can be obtained through this embodiment includes at least: source microservice, target microservice, interface, interaction method, and number of calls. The number of calls can reflect the frequency of use of the corresponding interaction information and whether it is frequently used interaction information, which facilitates further analysis and judgment.

[0066] The above-described implementation scheme of this application can obtain a second set of interactive information, including the number of times the interactive information is called, so that users can not only obtain the interactive information associated with the project to be analyzed, but also know the number of times this interactive information has been called.

[0067] This application also provides an analysis method for a business system based on a microservice architecture. This method utilizes a microservice architecture analysis system, which can analyze business systems based on microservice architecture. When an interface or microservice in the business system needs modification, maintenance, or experiences a failure, this analysis system can determine the scope of impact corresponding to that interface or microservice, thereby improving troubleshooting and analysis efficiency. Figure 2 As shown, the analytical method includes:

[0068] Step 201: Receive an analysis request for the business system. The analysis request carries an item to be analyzed, which is at least one of an interface, a source microservice, a target microservice, and an interaction method.

[0069] The business system here adopts a microservice architecture, comprising multiple microservices. Each microservice is deployed independently and performs different functions within the business system. These microservices are integrated with each other, forming complex interaction chains through interfaces, messages, and databases. During daily use, when the business system malfunctions or requires changes to a specific microservice or interface, users can send analysis requests for that business system through the interface provided by the microservice architecture analysis system. These users can include developers and maintenance personnel of the business system.

[0070] Specifically, the analysis system in this application embodiment can analyze multiple business systems. The user first selects the business system to be analyzed on the operation interface provided by the analysis system, and then selects the project to be analyzed. The project here is at least one of interface, source microservice, target microservice and interaction method. Specifically, the project to be analyzed can be one of interface, source microservice, target microservice and interaction method, or a combination of at least two of them.

[0071] After the user identifies the item to be analyzed, the analysis system will receive an analysis request for the business system, which includes the item to be analyzed.

[0072] Step 202: Based on the analysis request, search for the interaction information associated with the project to be analyzed from the interaction information set corresponding to the business system, and determine it as the target interaction information set.

[0073] The interaction information set is obtained by the interaction information acquisition method of the business system based on the microservice architecture described above.

[0074] The set of interactive information in this application embodiment includes interactive information between microservices that have interactive relationships among multiple microservices corresponding to the business system. Each interactive information includes at least a source microservice, a target microservice, an interaction method, and an interface. The source microservice and the target microservice are both microservices among the multiple microservices. The source microservice interacts with the target microservice by calling the interface in the interaction method.

[0075] After receiving an analysis request from a user regarding a business system, the analysis system retrieves the corresponding set of interaction information for that business system, as well as the item to be analyzed carried in the analysis request. It then searches the interaction information set for interactions associated with the item to be analyzed, defining this set as the target interaction information set. All interactions in this target set are associated with the item to be analyzed. In other words, if the item to be analyzed changes or malfunctions, the impact extends to the source microservice, target microservice, interaction method, and interface corresponding to each interaction in the target interaction information set. Users can understand the scope of impact for the item to be analyzed by viewing the target interaction information set.

[0076] When the project to be analyzed is an interface, the interaction information using that interface can be quickly located, thus revealing that the interface called by the microservices in the interaction information is the interface to be analyzed. When the project to be analyzed is a microservice, the interaction information using that microservice can be quickly located, thus revealing that there is interaction between the microservices in the interaction information. When the project to be analyzed is an interaction method, the interaction information using that interaction method can be quickly located, thus revealing that the microservices in the interaction information use that interaction method to interact.

[0077] This application embodiment improves the analysis efficiency for microservice-based business systems by searching for and determining the interaction information associated with the project to be analyzed carried in the analysis request within the interaction information set corresponding to the business system, and identifying it as the target interaction information set.

[0078] In an optional embodiment of this application, based on the analysis request, interaction information associated with the project to be analyzed is searched from the interaction information set corresponding to the business system, and determined as the target interaction information set, including one of the following schemes:

[0079] When the item to be analyzed is one of the following: interface, source microservice, target microservice, and interaction method, the interaction information including the item to be analyzed is searched from the interaction information set and determined as the target interaction information set;

[0080] When the item to be analyzed is a combination of at least two of the following: interface, source microservice, target microservice, and interaction method, the first combination of items included in the item to be analyzed is searched in the interaction information set to obtain a subset of interaction information. The search steps are continued based on the subset of interaction information until the last combination of items included in the item to be analyzed is searched and the search ends. The last subset of interaction information obtained is then determined as the target interaction information set.

[0081] In this embodiment of the application, the operation interface provided by the analysis system may include multiple options, which correspond to the source microservice, target microservice, interaction method, and interface included in the interaction information. For each option, a drop-down menu can be set for the user to select, and a search box can also be set. The user can directly select the item to be analyzed from the options listed in the drop-down menu, or search for the item to be analyzed in the search box. The item to be analyzed can be one of the interface, source microservice, target microservice, and interaction method, or it can be a combination of at least two of the interface, source microservice, target microservice, and interaction method.

[0082] The following sections will introduce how to find the interactions associated with the item to be analyzed, both when the item to be analyzed is a single item and when the item is a combination of items.

[0083] When the item to be analyzed is one of the following: interface, source microservice, target microservice, and interaction method, the interaction information that includes the item to be analyzed can be directly searched from the interaction information set. For example, when the item to be analyzed is an interface, and the interface is the first interface, by searching for the first interface in the interaction information set, if two interaction information items include the first interface, then these two interaction information items are determined as the target interaction information set.

[0084] When the item to be analyzed is a combination of at least two of the following: interface, source microservice, target microservice, and interaction method, the following steps are required: First, search for the first combination item included in the item to be analyzed within the interaction information set. Then, continue searching based on the subset of interaction information until the last combination item included in the item to be analyzed is searched. The last obtained subset of interaction information is then determined as the target interaction information set. The number of searches is the same as the number of combination items in the item to be analyzed. For example, when the item to be analyzed is a combination of an interface and a source microservice, and the interface is the first interface and the source microservice is the first microservice, the first interface can be set as the first combination item, and the first source microservice as the second... For each combination item, a first interface is searched from the set of interaction information to obtain a first subset of interaction information. Each interaction information in this first subset of interaction information corresponds to the first interface. Then, a second set of interaction information is searched from the first subset of interaction information to obtain a first source microservice. Each interaction information in this second subset of interaction information corresponds to the first microservice. Since the first source microservice is the last combination item included in the item to be analyzed, the search ends. The last obtained subset of interaction information (i.e., the second subset of interaction information) is determined as the target set of interaction information. At this time, each interaction information in the target set of interaction information corresponds to the first interface and the corresponding source microservice is the first source microservice.

[0085] In the above implementation scheme of this application, the item to be analyzed can be one item or a combination of at least two items in the set of interactive information corresponding to the business system. This allows the user to determine the composition of the item to be analyzed according to the actual analysis needs, and then return the corresponding target interactive information set according to the analysis request, thereby improving the analysis efficiency of the business system.

[0086] In an optional embodiment of this application, after searching for interaction information associated with the project to be analyzed from the interaction information set corresponding to the business system according to the analysis request, and determining it as the target interaction information set, the method further includes:

[0087] The target interactive information set is displayed according to a preset style.

[0088] After the analysis system searches for the interaction information associated with the project to be analyzed from the interaction information set corresponding to the business system according to the analysis request, and determines it as the target interaction information set, it can display the target interaction information set according to a preset style. For example, the interaction information in the target interaction information set can be displayed in a table style on the display interface provided by the analysis system, or the items included in the interaction information in the target interaction information set can be categorized and displayed on the display interface provided by the analysis system. For example, when the project to be analyzed is the first interface, the target interaction information set is found to include the first interaction information and the second interaction information. The first interaction information includes the first source microservice, the first target microservice, the first interface, and the first interaction method. The second interaction information includes the second source microservice, the second target microservice, the first interface, and the second interaction method. At this time, the first interaction information and the second interaction information can be displayed in a table style on the display interface for users to view, or they can be categorized and displayed according to the items included in the interaction information. For example, the source microservices affected by the first interface include the first source microservice and the second source microservice, the target microservices affected by the first interface include the first target microservice and the second target microservice, and the interaction methods affected by the first interface include the first interaction method and the interaction method, and these can be displayed on the display interface for users to view.

[0089] Specifically, the aforementioned display interface can be a pop-up display box after the user selects the item to be analyzed in the operation interface, or it can be a separate interface independent of the operation interface. The preset style is not limited to the two methods mentioned above, and can be set as needed. This application does not impose any specific limitations.

[0090] The above-described implementation scheme of this application displays the target interaction information set according to a preset style, directly showing the interaction information related to the project to be analyzed, as well as the various sub-items (at least including source microservice, target microservice, interface and interaction method) included in each interaction information to the user, so that the user can quickly know the scope of influence of the project to be analyzed.

[0091] The overall implementation process of this application embodiment is described below. In order to realize the user's analysis request for the project to be analyzed in the business system, the analysis method provided by this application embodiment specifically includes the following stages: preparation stage, static data collection stage, dynamic data collection stage, and visualization analysis stage. Each stage is described below.

[0092] 1. Preparation stage

[0093] The preparation phase refers to integrating static data collection components and dynamic proxy data collection components into the business system, running services, and obtaining a microservice manifest. Running services ensures that both integrated components are operational, and the microservice manifest needs to include the unique names of the microservices.

[0094] The static data acquisition component may include the following steps:

[0095] Step 311: Obtain all target microservices that use interface annotations in the service container corresponding to the current microservice.

[0096] Step 312: Parse all interface addresses of the application in the target microservice.

[0097] Step 313: Summarize the interaction information. Each interaction information includes: source microservice, target microservice, interface, and interaction method.

[0098] Step 314: Output the summarized interaction information.

[0099] Integrating static data collection components can be done by embedding them into various service projects and starting all microservices in the runtime environment, thus keeping the corresponding data collection program running.

[0100] Dynamic proxy data collection components refer to components that can collect data generated by upstream and downstream calls during program runtime. An agent needs to be pre-installed on the business system. The agent collects request information and stores it in an interaction information set. Then, an information aggregation function is used to statistically analyze the call chain corresponding to each microservice and summarize the interaction information. Each interaction information includes: source microservice, target microservice, interface, interaction method, and call frequency.

[0101] 2. Static data acquisition phase

[0102] The static information collection task can be started manually or by a timer. The microservice list obtained in the preparation phase is called, and the static collection component scans the microservices in the microservice list in turn to obtain the interaction information corresponding to each microservice. The interaction information corresponding to each microservice is stored in the interaction information set to complete the static interaction information collection.

[0103] The interaction information obtained during the static data collection phase includes: source microservice, target microservice, target interface, and interaction method.

[0104] 3. Dynamic data acquisition phase

[0105] The dynamic information collection task is initiated manually or on a schedule, calling interfaces in the dynamic information collection component to collect dynamic interactive information. The interactive information obtained during the dynamic collection phase includes: source microservice, target microservice, target interface, source interface, and call count. This dynamic information is then added to the interactive information set, resulting in a final set containing: source microservice, target microservice, target interface, source interface, call count, and collection method. The dynamic collection phase enriches the interactive information in the set. Specifically, the interactive information obtained during the static collection phase is collected using the static collection method, while the interactive information obtained during the dynamic collection phase is collected using the dynamic collection method.

[0106] 4. Visualization and Analysis Stage

[0107] Through the three stages described above, the analysis system stores a set of interaction information corresponding to the business systems. At this point, users can use the operation interface provided by the analysis system to query the scope of impact of the project to be analyzed and track it. The specific content can be displayed on the display interface provided by the analysis system. Through querying, it is possible to search based on conditions such as target service, target interface, and interaction method, and quickly locate the upstream and downstream microservices or interfaces related to this service or interface.

[0108] This application embodiment uses a static data collection component to initially identify the interaction links between microservices and store basic interaction information. Then, a dynamic proxy data collection component collects the actual links generated by real requests, enabling the storage of interaction links between microservices in the production environment. This supplements the real-world scenarios of interaction links between microservices and allows for historical information recording and interface lifecycle analysis. The analysis method provided in this application embodiment can be used by developers to analyze upstream and downstream dependencies of interfaces, view interaction link information within the business system, and provide basic data for platform fault analysis. When a middleware, database, or service goes down, the scope of impact can be quickly analyzed, improving the efficiency of platform-side troubleshooting and analysis.

[0109] The above describes the method for obtaining and analyzing interactive information of a business system based on a microservice architecture provided by the embodiments of this application. The following will describe the device for obtaining and analyzing interactive information of a business system based on a microservice architecture provided by the embodiments of this application in conjunction with the accompanying drawings.

[0110] like Figure 3 As shown in the illustration, this application also provides an interactive information acquisition device for a business system based on a microservice architecture, comprising:

[0111] The first acquisition module 301 is used to acquire the first interaction information corresponding to each microservice in the microservice list of the business system, and obtain the first interaction information set.

[0112] The second acquisition module 302 is used to acquire the second interaction information corresponding to each call request of the business system, and obtain the second interaction information set.

[0113] The first processing module 303 is used to merge the first interactive information set and the second interactive information set to obtain an interactive information set;

[0114] The set of interactive information includes interactive information between microservices that have interactive relationships among multiple microservices corresponding to the business system. Each interactive information includes at least a source microservice, a target microservice, an interaction method, and an interface. The source microservice and the target microservice are both microservices among the multiple microservices. The source microservice interacts with the target microservice by calling the interface in the interaction method.

[0115] Optionally, the first acquisition module includes:

[0116] The first acquisition submodule is used to acquire the list of microservices corresponding to the business system;

[0117] The second acquisition submodule is used to acquire the target microservice with interface annotations set from the service container corresponding to each microservice in the microservice list.

[0118] The first processing submodule is used to obtain the interface and interaction method corresponding to the target microservice for each microservice in the microservice list, and obtain the first interaction information corresponding to the microservice.

[0119] Optionally, the second acquisition module includes:

[0120] The installation submodule module is used to install the dynamic information collection component on the business system.

[0121] The receiving submodule is used to receive the second interaction information corresponding to each call request collected by the dynamic information collection component during the operation of the business system.

[0122] Optionally, the interaction information in the interaction information set may also include the number of calls;

[0123] The second acquisition module also includes:

[0124] The judgment submodule is used to determine, after obtaining the second interaction information, whether the second interaction information set includes interaction information that matches the second interaction information;

[0125] The second processing submodule is used to increment the number of calls corresponding to the interaction information that matches the second interaction information when the second interaction information set includes interaction information that matches the second interaction information.

[0126] The third processing submodule is used to add the second interaction information to the second interaction information set when the second interaction information set does not contain interaction information that matches the second interaction information, and to set the call count corresponding to the second interaction information to one.

[0127] The interaction information acquisition device for a microservice-based business system provided in this application obtains an interaction information set that includes all interaction information of the business system by merging a first interaction information set that includes first interaction information corresponding to each microservice of the business system and a second interaction information set that includes second interaction information corresponding to each call request of the business system. This interaction information set can then be used to analyze the business system, thereby improving the analysis efficiency for microservice-based business systems.

[0128] like Figure 4 As shown in the illustration, this application also provides an analysis device for a business system based on a microservice architecture, comprising:

[0129] The receiving module 401 is used to receive an analysis request for a business system, wherein the analysis request carries an item to be analyzed, and the item to be analyzed is at least one of an interface, a source microservice, a target microservice, and an interaction method.

[0130] The second processing module 402 is used to search for interaction information associated with the project to be analyzed from the interaction information set corresponding to the business system according to the analysis request, and determine it as the target interaction information set; wherein, the interaction information set includes interaction information between microservices with interaction relationships among multiple microservices corresponding to the business system, and each interaction information includes at least a first microservice, a second microservice, an interaction method, and an interface, wherein the first microservice and the second microservice are both microservices among the multiple microservices, and the first microservice interacts with the second microservice by calling the interface in the interaction method.

[0131] Optionally, the second processing module includes one of the following sub-modules:

[0132] The fourth processing submodule is used to, when the item to be analyzed is one of an interface, a source microservice, a target microservice, and an interaction method, search for interaction information including the item to be analyzed from the interaction information set, and determine it as the target interaction information set.

[0133] The fifth processing submodule is used to, when the item to be analyzed is a combination of at least two of the following: interface, source microservice, target microservice, and interaction method, search for the first combination item included in the item to be analyzed in the interaction information set to obtain a subset of interaction information, and continue to perform the search step based on the subset of interaction information until the last combination item included in the item to be analyzed is searched and the search ends, and the last obtained subset of interaction information is determined as the target interaction information set.

[0134] Optionally, the device further includes:

[0135] The display module is used to display the target interactive information set according to a preset style.

[0136] The business system analysis device based on microservice architecture provided in this application can determine the scope of influence of the project to be analyzed in the business system, i.e. the target interaction information set, by searching for the interaction information associated with the project to be analyzed carried in the analysis request in the interaction information set corresponding to the business system, thereby improving the analysis efficiency of business systems based on microservice architecture.

[0137] This application also provides an electronic device, such as... Figure 5 As shown, the electronic device may include a processor 510, a communications interface 520, a memory 530, and a communication bus 540. The processor 510, communications interface 520, and memory 530 communicate with each other via the communication bus 540. The processor 510 can call logical instructions stored in the memory 530. The processor 510 is used to execute various processes of the above-described embodiments of the interactive information acquisition method for a microservice-based business system or the analysis method for a microservice-based business system, achieving the same technical effects. To avoid repetition, further details are omitted here.

[0138] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0139] This application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described embodiments of the interactive information acquisition method for a business system based on a microservice architecture or the various processes of the analysis method for a business system based on a microservice architecture, and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0140] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).

[0141] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0142] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0143] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.

Claims

1. A method for obtaining interactive information in a business system based on a microservice architecture, characterized in that, The method includes: Obtain the first interaction information corresponding to each microservice in the microservice list of the business system to obtain a first interaction information set; the first interaction information set includes interaction information that has not been used during the operation of the business system. Obtain the second interaction information corresponding to each call request of the business system to obtain the second interaction information set; Merge the first set of interactive information and the second set of interactive information to obtain the second set of interactive information. The set of interactive information includes interactive information between microservices that have interactive relationships among multiple microservices corresponding to the business system. Each set of interactive information includes at least a source microservice, a target microservice, an interaction method, and an interface. The source microservice and the target microservice are both microservices among the multiple microservices. The source microservice interacts with the target microservice by calling the interface in the interaction method. The step of obtaining the second interaction information corresponding to each call request of the business system includes: Install a dynamic information acquisition component on the business system; During the operation of the business system, the second interactive information corresponding to each call request collected by the dynamic information collection component is received. The second set of interactive information includes the number of times each interactive information is invoked; The step of obtaining the first interaction information corresponding to each microservice in the microservice list of the business system includes: Obtain the list of microservices corresponding to the business system; For each microservice in the microservice list, obtain the target microservice with the interface annotation set from the service container corresponding to the microservice; For each microservice in the microservice list, obtain the interface and interaction method corresponding to the target microservice of the microservice, and obtain the first interaction information corresponding to the microservice.

2. The method for obtaining interactive information in a business system based on a microservice architecture according to claim 1, characterized in that, The interaction information set also includes the number of times the interaction was called. The step of obtaining the second interaction information corresponding to each call request of the business system, and obtaining the second interaction information set, includes: After obtaining the second interaction information, determine whether the second interaction information set includes interaction information that matches the second interaction information; When the second set of interactive information includes interactive information that matches the second interactive information, the number of calls corresponding to the interactive information that matches the second interactive information is incremented by one; If the second set of interactive information does not contain any interactive information that matches the second interactive information, the second interactive information is added to the second set of interactive information, and the number of calls corresponding to the second interactive information is set to one.

3. An analysis method for business systems based on a microservice architecture, characterized in that, The method includes: Receive an analysis request for a business system, wherein the analysis request carries an item to be analyzed, and the item to be analyzed is at least one of an interface, a source microservice, a target microservice, and an interaction method; According to the analysis request, the interaction information associated with the project to be analyzed is searched from the interaction information set corresponding to the business system, and determined as the target interaction information set; wherein, the interaction information set is obtained by the interaction information acquisition method of the business system based on microservice architecture as described in any one of claims 1 to 2; The set of interactive information includes interactive information between microservices that have interactive relationships among multiple microservices corresponding to the business system. Each interactive information includes at least a source microservice, a target microservice, an interaction method, and an interface. The source microservice and the target microservice are both microservices among the multiple microservices. The source microservice interacts with the target microservice by calling the interface in the interaction method.

4. The analysis method for a business system based on a microservice architecture according to claim 3, characterized in that, Based on the analysis request, the interaction information associated with the project to be analyzed is retrieved from the interaction information set corresponding to the business system, and determined as the target interaction information set, including one of the following schemes: When the item to be analyzed is one of the following: interface, source microservice, target microservice, and interaction method, the interaction information including the item to be analyzed is searched from the interaction information set and determined as the target interaction information set; When the item to be analyzed is a combination of at least two of the following: interface, source microservice, target microservice, and interaction method, the first combination of items included in the item to be analyzed is searched in the interaction information set to obtain a subset of interaction information. The search steps are continued based on the subset of interaction information until the last combination of items included in the item to be analyzed is searched and the search ends. The last subset of interaction information obtained is then determined as the target interaction information set.

5. The analysis method for a business system based on a microservice architecture according to claim 3, characterized in that, Based on the analysis request, after searching for interaction information associated with the project to be analyzed from the interaction information set corresponding to the business system, and determining it as the target interaction information set, the method further includes: The target interactive information set is displayed according to a preset style.

6. An interactive information acquisition device for a business system based on a microservice architecture, characterized in that, include: The first acquisition module is used to acquire the first interaction information corresponding to each microservice in the microservice list of the business system, and obtain the first interaction information set. The first set of interactive information includes interactive information that has not been used during the operation of the business system; The second acquisition module is used to acquire the second interaction information corresponding to each call request of the business system, and obtain the second interaction information set. The first processing module merges the first set of interactive information and the second set of interactive information to obtain a set of interactive information. The set of interactive information includes interactive information between microservices that have interactive relationships among multiple microservices corresponding to the business system. Each set of interactive information includes at least a source microservice, a target microservice, an interaction method, and an interface. The source microservice and the target microservice are both microservices among the multiple microservices. The source microservice interacts with the target microservice by calling the interface in the interaction method. The second acquisition module includes: The installation submodule module is used to install the dynamic information collection component on the business system. The receiving submodule is used to receive the second interaction information corresponding to each call request collected by the dynamic information collection component during the operation of the business system. The second set of interactive information also includes the number of times each interactive information is called; The first acquisition module includes: The first acquisition submodule is used to acquire the list of microservices corresponding to the business system; The second acquisition submodule is used to acquire the target microservice with interface annotations set from the service container corresponding to each microservice in the microservice list. The first processing submodule is used to obtain the interface and interaction method corresponding to the target microservice for each microservice in the microservice list, and obtain the first interaction information corresponding to the microservice.

7. An analysis device for a business system based on a microservice architecture, characterized in that, include: The receiving module is used to receive analysis requests for the business system. The analysis request carries items to be analyzed, and the items to be analyzed are at least one of the following: interface, source microservice, target microservice, and interaction method. The second processing module is used to search for interaction information associated with the project to be analyzed from the interaction information set corresponding to the business system according to the analysis request, and determine it as the target interaction information set; wherein, the interaction information set is obtained by the interaction information acquisition method of the business system based on microservice architecture as described in any one of claims 1 to 2; The set of interactive information includes interactive information between microservices that have interactive relationships among multiple microservices corresponding to the business system. Each interactive information includes at least a source microservice, a target microservice, an interaction method, and an interface. The source microservice and the target microservice are both microservices among the multiple microservices. The source microservice interacts with the target microservice by calling the interface in the interaction method.

8. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; When a processor executes a program stored in memory, it implements the interactive information acquisition method for a business system based on a microservice architecture as described in any one of claims 1 to 2, or the business system analysis method based on a microservice architecture as described in any one of claims 3 to 5.

Citation Information

Patent Citations

  • Information processing method, device and system

    CN109582471A

  • Micro-service calling relationship establishing method and device, computer equipment and storage medium

    CN112612595A

  • Micro-service calling relation management method and device

    CN115237632A