Service architecture splitting method, device and system based on automatic identification service module and readable storage medium
Through the service architecture splitting method of automatically identifying business modules, the problem that a single application architecture in the ALG system is difficult to support the growth of user volume, and the automatic identification of service attributes and the reduction of module coupling are achieved, and the system performance and development efficiency are improved.
Patent Information
- Application Number
- CN202411897603.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-01
AI Technical Summary
The single application architecture of the existing ALG system is difficult to support the growth of user volume, resulting in a decline in system performance and high development and maintenance costs.
The service architecture splitting method based on automatic identification of business modules is adopted, and the full link and feature information of the service request is obtained, and the trained KNN classification model is used to identify and classify business modules, thereby building a service architecture.
It realizes automatic identification of service attributes, reduces module coupling, improves service architecture splitting efficiency, reduces development and maintenance costs, and improves system performance.
Smart Images

Figure CN119740132A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of business systems, and in particular relates to a method, device, system and readable storage medium for splitting a service architecture based on automatic identification of business modules. Background Art
[0002] ALG (Airline GUI) is an aviation business control system with a graphical management and operation interface. The target users mainly include flight plan entry personnel, flight revenue control personnel, and personnel who manage additional service products of airlines. This business system integrates the workflow of actual business scenarios such as flight planning, flight control, product management and sales control, and provides a graphical management and operation interface to airline control personnel. The corresponding functions are generally realized through the development of an open general control front end.
[0003] With the expansion of business and the popularity of users, the original single application architecture of the ALG system faces the following problems:
[0004] The number of users continued to grow, and the system's single application architecture could not support the ever-increasing number of users, resulting in a decline in system performance and user experience;
[0005] High development and maintenance costs. The traditional splitting and combination configuration of system functional modules requires developers to compare interfaces one by one, read codes, sort out logic, and split different interfaces into corresponding modules. This is time-consuming, labor-intensive and error-prone, increasing the complexity and cost of development and maintenance. Summary of the invention
[0006] In order to solve the above problems, a service architecture splitting solution based on automatic identification of business modules is proposed. According to the full link and feature information of user requests, each service in a single architecture is classified into split modules through model processing. Then, based on this classification information, the system is split into multiple business modules such as flight control at the code level. Specifically, it includes:
[0007] On the one hand, a service architecture splitting method based on automatic identification of business modules is provided, comprising:
[0008] Acquire, according to the service request, a link process characteristic of the entire process of processing the service request; wherein the link process characteristic is a characteristic embodied by a service path experienced by processing the service request;
[0009] According to the link process characteristics, the trained classification model is used to identify and classify the service modules;
[0010] Based on the classification results obtained by the identification and classification, a service architecture is constructed.
[0011] Furthermore, the link process characteristics include at least one or more of: the number of host instructions, function name, user operation path, business keywords, whether rules are used, the number of times defect detection services are called, and intermediate service classes.
[0012] Furthermore, the link process characteristics are obtained through log tracking.
[0013] Further, the link process characteristics of the whole process of processing the service request are obtained according to the service request, including:
[0014] According to the business request, obtaining data of the entire process of processing the business request;
[0015] Filtering, cleaning and analyzing the whole process data to obtain the link process characteristics;
[0016] The link process characteristics are normalized.
[0017] Furthermore, the classification model adopts a KNN model.
[0018] Furthermore, in the KNN model, the Euclidean distance method is used to calculate the distance between the samples. The Euclidean distance calculation formula in the Euclidean distance method is:
[0019] Among them, d represents the Euclidean distance, x i and i are the i-th coordinates of the two samples, and n represents the number of eigenvalues.
[0020] Furthermore, the classification results obtained by the identification and classification are output or displayed in the form of a template.
[0021] On the one hand, a service architecture splitting device based on automatic identification of business modules is provided, comprising:
[0022] A data collection module, used to obtain link process characteristics of the entire process of processing the service request according to the service request; wherein the link process characteristics are characteristics reflected by the service path experienced by processing the service request;
[0023] A classification module, used to identify and classify service modules using a trained classification model according to the link process characteristics;
[0024] The template module is used to construct a service architecture based on the classification results obtained by the identification and classification.
[0025] On the one hand, a service architecture splitting system based on automatic identification of business modules is provided, the system comprising a processor and a memory, the processor executing computer instructions stored in the memory to implement the above-mentioned service architecture splitting method based on automatic identification of business modules.
[0026] On the one hand, a computer-readable storage medium is provided, which stores computer instructions for causing a computer system to execute the service architecture splitting method based on automatic identification of business modules.
[0027] The solution provided by the present disclosure solves the deficiencies of the prior art and has the following beneficial effects:
[0028] Automatic identification of service attribution: Without affecting the normal use of the original system, the full link and feature information of user requests are saved in the form of tracking records based on the original system. By collecting and processing user request data, the service attribution is distinguished according to the KNN classification model.
[0029] Architecture adjustment: Adjust the architecture system according to the analysis results to achieve architecture adjustments that are imperceptible to users.
[0030] Reduced module coupling: The coupling between business function modules is greatly reduced, achieving the purpose of code reuse.
[0031] Automatically identify service-class business modules and sort out the completed business classifications in the entire system, which reduces the time developers spend on sorting out the original business processes during the service architecture splitting process and also reduces coupling in the split systems to a greater extent.
[0032] In addition, this technical solution adopts a modular design. For the service architecture splitting of all scenarios, as long as the corresponding business modules and sample data are sorted out, it can be used out of the box. When new requirements are established, developers can also quickly locate the needs based on the existing service classification model.
[0033] The disclosed technical solution has the advantages of batch realization of service classification function, high accuracy, improved efficiency of service architecture splitting, greatly reduced coupling of the system after splitting, and good adaptability.
[0034] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures indicated in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0036] Figure 1 A flow chart of a method for splitting a service architecture based on automatic identification of business modules according to an embodiment of the present application is shown;
[0037] Figure 2 A device structure diagram of a service architecture split based on automatic identification of business modules according to an embodiment of the present application is shown;
[0038] Figure 3 A structural diagram of a service architecture splitting system based on automatic identification of business modules according to an embodiment of the present application is shown;
[0039] Figure 4 A computer-readable storage medium structure diagram according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0041] There are many difficulties in the performance testing of asynchronous business software, which results in the inability to collect, count and analyze data for asynchronous requests as simply and quickly as synchronous business during the performance testing process. In response to this technical problem, this application provides the following technical solution.
[0042] On the one hand, the embodiment of the present application provides a method for splitting a service architecture based on automatic identification of business modules, such as Figure 1 As shown, including:
[0043] First, according to the service request, a link process feature of the entire process of processing the service request is obtained; wherein the link process feature is a feature reflected by the service path experienced by processing the service request;
[0044] In one embodiment, a service request generally reflects a user request of a user of the ALG system to use the system. According to the service request, the whole process data of processing the service request is obtained in the ALG system; for example, log points are buried in various logs of the ALG system, including but not limited to system logs, service logs, etc., to record and obtain the whole process data of processing the service request.
[0045] In one embodiment, firstly, according to the original system data flow of the ALG system, the business code of each branch is buried, and the feature value presets of different business processes are set. At the same time, according to the characteristics of the existing business module, the specified known service class feature values are preset, that is, a known sample is created.
[0046] In one embodiment, the whole process data is filtered, cleaned, and analyzed, and the link process characteristics are analyzed and obtained from the whole process data;
[0047] In one embodiment, the link process characteristics include at least one or more of: host instruction times, function name, user operation path, service keywords, whether rules are used, times of calling defect detection services, and intermediate service classes.
[0048] In one embodiment, the link process characteristics are normalized, the collected data are cleaned, field data that does not belong to the link process characteristics are filtered out, and characteristic data that does not meet the classification requirements are normalized.
[0049] In one embodiment, the service class file of the ALG system is used as the minimum granularity data, and the log collects the data called by each service class file as the basis for data classification, that is, the collected data is segmented with the service class as the minimum granularity.
[0050] In one embodiment, the real data obtained includes the service class name and the data information of calling other services within the service process. After statistics of various data in the data processing module, clear link process characteristic data such as the number of host instructions, business process values, whether rules are used, and the number of times defect detection services are called are finally obtained.
[0051] Second, according to the link process characteristics, the trained classification model is used to identify and classify the service modules;
[0052] In one embodiment, the classification model adopts a KNN model. The service-class business splitting is implemented according to the KNN model, which uses all known category samples as references, calculates the distance between the unknown sample and the known sample, selects the K known samples closest to the unknown sample, and classifies the unknown sample and the category to which the K closest samples belong to account for the largest proportion according to the voting principle of the minority obeys the majority.
[0053] In one embodiment, the classification model can adopt a classification model implemented by other algorithms, for example, a logistic regression algorithm classification model, a decision tree classification model, a support vector machine classification model, a random forest classification model, an AdaBoost classification model, a perceptron classification model, other K nearest neighbor classification models (KNN mode is a type of K nearest neighbor classification model), a naive Bayes classification model, a gradient boosting tree classification model, etc.
[0054] In one embodiment, the known categories in the ALG system are mainly business modules to be split, and their sample characteristics, namely link process characteristics, include but are not limited to the number of times host instructions are used, business process values, whether rules are used, the number of times defect detection services are called, the number of times decision services are called, etc.
[0055] In one embodiment, training the classification model includes two sub-processes: data labeling and data recognition, and classification training.
[0056] The data annotation sub-process includes defining the characteristics of several major business modules of the existing system and determining service-class characteristic data samples with known small data volumes.
[0057] The data identification and classification training sub-process includes training and testing the input sample data, determining the K value (K is the number of nearest sample instances to be selected), and finally determining the model to complete the business identification and classification of all service classes.
[0058] In one embodiment, the classification model uses the KNN model. When calculating the distance between samples, the attribute with the largest difference has the greatest impact on the calculation result, so it is necessary to process some feature value types with abnormal values. For example, when the feature value has a different value range such as the business process value, the value normalization process will be used. In this system, the Euclidean distance method is used to measure the distance between two points.
[0059] The calculation formula of Euclidean distance d is as follows:
[0060] Among them, x i and i are the i-th coordinates of the two points, n represents the number of eigenvalues, that is, the dimension. The true distance between the two points can be calculated by the formula.
[0061] After measuring the distance, you also need to determine the K value, that is, select the K data with the smallest distance; if the K value is too large, it is easy to underfitting, and if it is too small, it is easy to overfitting, so cross-validation is used (split the sample data into training data and validation data in a certain proportion, start with a small K value, continuously increase it, and then calculate the variance of the validation set to finally find a suitable K value) to determine it.
[0062] After selecting the K value, the data can be trained and the model evaluated. The model is initially tested by verifying the prediction accuracy, and then the real data is input to obtain the types of K data values that are closely related to each service class. The principle of minority obeys majority is adopted to finally complete the business classification, and the code-level business service module split is realized based on this model.
[0063] In one embodiment, taking a user's flight query service request as an example, the method flow is as follows:
[0064] Adjusting model parameters mainly includes the selection of distance algorithm, the selection of K value and the determination of the number of sample features. Split the known samples into validation data and training data in a ratio of 2:8. The KNN model specifies the distance algorithm, and then obtains the accuracy under different K values through cross-validation. On this basis, the KNN model is optimized by adjusting the number of sample features and the distance algorithm, and finally the optimal combination suitable for your business scenario is obtained and the model parameters are determined.
[0065] The query service request operation mainly involves calling host command query and some local basic dictionary query operations. During the data processing stage, the service classes in the flight query process are marked with characteristics, such as host command number: more than 20 times, usage rules: 0 times, call defect detection service: 0 times, business process value 10 (business module definition), etc.
[0066] When the query business request is input into the classification model with adjusted parameters, a point will be constructed in the corresponding dimension coordinate system according to the feature dimension and feature value. The Euclidean distance calculation method is then used to calculate the distance between the current point and other surrounding points, and a reverse order list of distances is obtained. The data with the set number of K values is selected, and then the category of the input data is distinguished according to the category proportion in these sample data. The flight query is finally classified into the revenue management business module. The more notable feature of this business module is that the host instruction is used and no other services are called.
[0067] Third, based on the classification results obtained by the identification and classification, a service architecture is constructed.
[0068] In one embodiment, a service architecture is constructed based on the classification results obtained by the identification and classification to achieve architecture adjustments that are imperceptible to users.
[0069] In one embodiment, the classification results obtained by the identification and classification are displayed to provide a data basis for the service architecture splitting; the module classification of all business service classes in the entire system is obtained, and when the service architecture is split, the classification data can be used for accurate splitting, thereby easily realizing module splitting.
[0070] On the one hand, the embodiment of the present application provides a device for splitting a service architecture based on automatic identification of business modules, such as Figure 2 As shown, including:
[0071] A data collection module, used to obtain link process characteristics of the entire process of processing the service request according to the service request; wherein the link process characteristics are characteristics reflected by the service path experienced by processing the service request;
[0072] A classification module, used to identify and classify service modules using a trained classification model according to the link process characteristics;
[0073] The template module is used to construct a service architecture based on the classification results obtained by the identification and classification.
[0074] In one embodiment, it also includes a data processing module for filtering, cleaning and analyzing the whole process data, and analyzing and obtaining the link process characteristics from the whole process data.
[0075] Among them, the service request generally reflects the user request of the ALG system user to use this system. According to the service request, the whole process data of processing the service request is obtained in the ALG system; for example, log points are buried in various logs of the ALG system, including but not limited to system logs, service logs, etc., to record and obtain the whole process data of processing the service request.
[0076] In one embodiment, the link process characteristics include at least one or more of: host instruction times, function name, user operation path, service keywords, whether rules are used, times of calling defect detection services, and intermediate service classes.
[0077] In one embodiment, the link process characteristics are normalized, the collected data are cleaned, field data that does not belong to the link process characteristics are filtered out, and characteristic data that does not meet the classification requirements are normalized.
[0078] In one embodiment, the service class file of the ALG system is used as the minimum granularity data, and the log collects the data called by each service class file as the basis for data classification, that is, the collected data is segmented with the service class as the minimum granularity.
[0079] In one embodiment, the real data obtained includes the service class name and the data information of calling other services within the service process. After statistics of various data in the data processing module, clear link process characteristic data such as the number of host instructions, business process values, whether rules are used, and the number of times defect detection services are called are finally obtained.
[0080] A classification module, used to identify and classify service modules using a trained classification model according to the link process characteristics;
[0081] In one embodiment, the classification model adopts a KNN model. The service-class business splitting is implemented according to the KNN model, which uses all known category samples as references, calculates the distance between the unknown sample and the known sample, selects the K known samples closest to the unknown sample, and classifies the unknown sample and the category to which the K closest samples belong to account for the largest proportion according to the voting principle of the minority obeys the majority.
[0082] In one embodiment, the classification model can adopt a classification model implemented by other algorithms, for example, a logistic regression algorithm classification model, a decision tree classification model, a support vector machine classification model, a random forest classification model, an AdaBoost classification model, a perceptron classification model, other K nearest neighbor classification models (KNN mode is a type of K nearest neighbor classification model), a naive Bayes classification model, a gradient boosting tree classification model, etc.
[0083] In one embodiment, the known categories in the ALG system are mainly business modules to be split, and their sample characteristics, namely link process characteristics, include but are not limited to the number of times host instructions are used, business process values, whether rules are used, the number of times defect detection services are called, the number of times decision services are called, etc.
[0084] In one embodiment, training the classification model includes two sub-processes: data labeling and data recognition, and classification training.
[0085] The data annotation sub-process includes defining the characteristics of several major business modules of the existing system and determining service-class characteristic data samples with known small data volumes.
[0086] The data identification and classification training sub-process includes training and testing the input sample data, determining the K value (K is the number of nearest sample instances to be selected), and finally determining the model to complete the business identification and classification of all service classes.
[0087] In one embodiment, the classification model uses the KNN model. When calculating the distance between samples, the attribute with the largest difference has the greatest impact on the calculation result, so it is necessary to process some feature value types with abnormal values. For example, when the feature value has a different value range such as the business process value, the value normalization process will be used. In this system, the Euclidean distance method is used to measure the distance between two points.
[0088] The calculation formula of Euclidean distance d is as follows:
[0089] Among them, x i and iare the i-th coordinates of the two points, n represents the number of eigenvalues, that is, the dimension. The true distance between the two points can be calculated by the formula.
[0090] After measuring the distance, you also need to determine the K value, that is, select the K data with the smallest distance; if the K value is too large, it is easy to underfitting, and if it is too small, it is easy to overfitting, so cross-validation is used (split the sample data into training data and validation data in a certain proportion, start with a small K value, continuously increase it, and then calculate the variance of the validation set to finally find a suitable K value) to determine it.
[0091] After selecting the K value, the data can be trained and the model evaluated. The model is initially tested by verifying the prediction accuracy, and then the real data is input to obtain the types of K data values that are closely related to each service class. The principle of minority obeys majority is adopted to finally complete the business classification, and the code-level business service module split is realized based on this model.
[0092] In one embodiment, taking a user's flight query service request as an example, the method flow is as follows:
[0093] Adjusting model parameters mainly includes the selection of distance algorithm, the selection of K value and the determination of the number of sample features. Split the known samples into validation data and training data in a ratio of 2:8. The KNN model specifies the distance algorithm, and then obtains the accuracy under different K values through cross-validation. On this basis, the KNN model is optimized by adjusting the number of sample features and the distance algorithm, and finally the optimal combination suitable for your business scenario is obtained and the model parameters are determined.
[0094] The query service request operation mainly involves calling host command query and some local basic dictionary query operations. During the data processing stage, the service classes in the flight query process are marked with characteristics, such as host command number: more than 20 times, usage rules: 0 times, call defect detection service: 0 times, business process value 10 (business module definition), etc.
[0095] When the query business request is input into the classification model with adjusted parameters, a point will be constructed in the corresponding dimension coordinate system according to the feature dimension and feature value. The Euclidean distance calculation method is then used to calculate the distance between the current point and other surrounding points, and a reverse order list of distances is obtained. The data with the set number of K values is selected, and then the category of the input data is distinguished according to the category proportion in these sample data. The flight query is finally classified into the revenue management business module. The more notable feature of this business module is that the host instruction is used and no other services are called.
[0096] The template module is used to construct a service architecture based on the classification results obtained by the identification and classification.
[0097] In one embodiment, a service architecture is constructed based on the classification results obtained by the identification and classification to achieve architecture adjustments that are imperceptible to users.
[0098] In one embodiment, the classification results obtained by the identification and classification are displayed to provide a data basis for the service architecture splitting; the module classification of all business service classes in the entire system is obtained, and when the service architecture is split, the classification data can be used for accurate splitting, thereby easily realizing module splitting.
[0099] On the one hand, if Figure 3 As shown, an embodiment of the present application provides a service architecture splitting system based on automatic identification of business modules, the system includes a processor and a memory, the processor executes computer instructions stored in the memory to implement the above-mentioned service architecture splitting method based on automatic identification of business modules.
[0100] On the one hand, if Figure 4 As shown, the embodiment of the present disclosure provides a computer-readable storage medium 40, on which non-transitory computer-readable instructions 41 are stored. When the non-transitory computer-readable instructions 41 are executed by a processor, the service architecture splitting method based on automatic identification of business modules of the above-mentioned embodiments of the present disclosure is executed.
[0101] The following advantages are achieved through the above disclosed embodiments:
[0102] Automatic identification of service attribution: Without affecting the normal use of the original system, the full link and feature information of user requests are saved in the form of tracking records based on the original system. By collecting and processing user request data, the service attribution is distinguished according to the KNN classification model.
[0103] Architecture adjustment: Adjust the architecture system according to the analysis results to achieve architecture adjustments that are imperceptible to users.
[0104] Reduced module coupling: The coupling between business function modules is greatly reduced, achieving the purpose of code reuse.
[0105] Automatically identify service-class business modules and sort out the completed business classifications in the entire system, which reduces the time developers spend on sorting out the original business processes during the service architecture splitting process and also reduces coupling in the split systems to a greater extent.
[0106] In addition, this technical solution adopts a modular design. For the service architecture splitting of all scenarios, as long as the corresponding business modules and sample data are sorted out, it can be used out of the box. When new requirements are established, developers can also quickly locate the needs based on the existing service classification model.
[0107] In summary, the above-disclosed technical solution has the advantages of batch realization of service classification function, high accuracy, improved efficiency of service architecture splitting, greatly reduced coupling of the system after splitting, and good adaptability.
[0108] Although the present application has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that it is still possible to modify the technical solutions described in the aforementioned embodiments, or to make equivalent replacements for some of the technical features therein; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A service architecture splitting method based on automatic identification of business modules, characterized in that: Acquire, according to the service request, a link process characteristic of the entire process of processing the service request; wherein the link process characteristic is a characteristic embodied by a service path experienced by processing the service request; According to the link process characteristics, the trained classification model is used to identify and classify the service modules; Based on the classification results obtained by the identification and classification, a service architecture is constructed.
2. The method according to claim 1, wherein: The link process characteristics include at least one or more of: host instruction times, function name, user operation path, service keywords, whether rules are used, times of calling defect detection services, and intermediate service classes.
3. The method according to claim 1, wherein: The link process characteristics are obtained through log tracking.
4. The method according to claim 1, wherein: The link process characteristics of the whole process of obtaining and processing the service request according to the service request include: According to the business request, obtaining data of the entire process of processing the business request; Filtering, cleaning and analyzing the whole process data to obtain the link process characteristics; The link process characteristics are normalized.
5. The method according to claim 1, wherein: The classification model adopts the KNN model.
6. The method according to claim 5, wherein: In the KNN model, the Euclidean distance method is used to calculate the distance between the samples. The Euclidean distance calculation formula in the Euclidean distance method is: Among them, d represents the Euclidean distance, x i and i are the i-th coordinates of the two samples, and n represents the number of eigenvalues.
7. The method according to claim 1, wherein the classification result obtained by the identification and classification is output or displayed in the form of a template.
8. A service architecture splitting device based on automatic identification of business modules, characterized in that: A data collection module, used to obtain link process characteristics of the entire process of processing the service request according to the service request; wherein the link process characteristics are characteristics reflected by the service path experienced by processing the service request; A classification module, used to identify and classify service modules using a trained classification model according to the link process characteristics; The template module is used to construct a service architecture based on the classification results obtained by the identification and classification.
9. A service architecture splitting system based on automatic identification of business modules, the system comprising a processor and a memory, the processor executing computer instructions stored in the memory to implement any of the methods described in claims 1-7.
10. A computer-readable storage medium storing computer instructions for causing a computer system to execute the method of any one of claims 1 to 7.