A microservice generation method and system based on semantic matching
By extracting and clustering service information, building a dependency model, and combining semantic matching technology to generate association combination services, the problem of insufficient correlation and interface matching in business process construction in the existing technology is solved, and high cohesion and convenient management are achieved microservice generation method.
Patent Information
- Application Number
- CN202011017226.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-24
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2040-09-24
AI Technical Summary
The existing technology fails to effectively consider the business logical correlation between services and the semantic matching of input and output interfaces when constructing industrial production business processes, resulting in the lack of business cohesion and intelligent recommendations of the process.
By extracting service information, analyzing and clustering service attributes, building a service dependency model, using semantic matching technology to generate combined services associated with business processes, and encapsulating them into microservices for release.
It realizes a more accurate and convenient business process construction, improves the business cohesion and operating state management of microservices, reduces the probability of errors, and reduces the difficulty of management.
Smart Images

Figure CN112286567B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information technology processing technology, and in particular to a microservice generation method and system based on semantic matching. Background Art
[0002] In the construction of the Industrial Internet, it is necessary to build an Industrial Internet system, build an edge computing architecture for IoT devices, and research and design edge node microservice management platform technology. In the design of the microservice platform architecture, there are clear and strict requirements for the packaging and release of services. It is necessary to support different organizational departments within the platform to define the business and match service resources according to business-specific needs, and flexibly release applications through the packaging and combination of several microservices. In industrial Internet manufacturing, the processing, inspection, optimization and other processes of various types of workpieces mostly use operation instruction type services, which have exploded with the increase of equipment; most services have a sequential or parallel relationship, or are upstream and downstream processes of the same production line, or are several necessary conditions for the next process, that is, there is a temporal or causal relationship between services; at the same time, in industrial production, multiple production lines will use the same production equipment, and the same production instructions will appear in different assembly lines. The relationship between services is not limited to the same business scenario, and the relationship between services is more complex; in summary, there are many instruction services in industrial production, which are interrelated and complex. Therefore, it is particularly important to build a digital model of production business processes and realize digital management of industrial production. In this process, it is extremely important to accurately and intuitively describe the relationship and dependency between instruction services.
[0003] Through literature search, it is found that Ding Zhijun et al. wrote in "A Review of Web Service Composition Testing [J]. Journal of Software, 2018, 29(02): 299-319" that "Web service composition is achieved by determining the execution order of component Web services and the interaction between component Web services... Web service composition has the characteristics of hierarchy, dynamics, loose coupling and scalability." Drawing on this idea, operation instructions can be encapsulated into Web services, and dependency and association models between services can be built based on various business scenarios in industrial production. The digital construction of business processes can be realized by using service composition, and finally the business process can be encapsulated into microservices for deployment and release to realize the digital management of industrial production processes. Existing service composition technologies do not take into account the business logic association between services and the semantic matching of input and output interfaces between services. In the process of building business processes, selection must be made from the entire service set, and business processes are created based on developer experience or production guidelines, lacking intelligent recommendations. In addition, similar services that do not belong to the pipeline may be selected during the service composition process, resulting in a lack of business cohesion in the resulting process. Summary of the invention
[0004] The technical problem solved by the present invention is to overcome the deficiencies of the prior art and provide a microservice generation method and system based on semantic matching.
[0005] In order to solve the above technical problems, an embodiment of the present invention provides a microservice generation method based on semantic matching, including:
[0006] Extract service information from pre-built service libraries;
[0007] Parsing the service information to obtain service attributes corresponding to the service information;
[0008] Performing clustering processing on the service attributes to obtain a service attribute clustering result;
[0009] Calculating service dependencies based on the clustering results, building a service dependency model, and recording correlation information between services;
[0010] Matching the attributes of the service based on semantic matching, and generating a composite service associated with the business process in combination with the service dependency model;
[0011] Based on the composite service, the composite service instance corresponding to the business process is encapsulated, and the composite service instance is published.
[0012] Optionally, before extracting the service information in the pre-built service library, the method further includes:
[0013] Establishing the initial service library;
[0014] Obtain the function description file and data resource description file input by the user;
[0015] Processing the function description file and the data resource description file to obtain function service information corresponding to the function description file and data service information corresponding to the data resource description file;
[0016] The function service information and the data service information are added to the initial service library to generate the service library.
[0017] Optionally, clustering the service attributes to obtain a service attribute clustering result includes:
[0018] Based on a bottom-up hierarchical clustering algorithm, calculating the Euclidean distance between the service attributes;
[0019] The service attributes are clustered according to the Euclidean distance to generate a service attribute cluster set, and the service attribute cluster set is used as the service attribute clustering result.
[0020] Optionally, matching the attributes of the service in a semantic matching manner and combining the service dependency model to generate a composite service associated with the business process includes:
[0021] Performing word sense disambiguation, semantic association and semantic fusion operations on the attributes of the service to obtain a semantic processing result;
[0022] Recommend the services in terms of relevance, and build a list of services with strong relevance to the current services based on the service dependency model;
[0023] Services are combined based on the semantic processing results and the service dependency model to generate a combined service associated with the business process.
[0024] Optionally, encapsulating the composite service instance corresponding to the business process based on the composite service and publishing the composite service instance includes:
[0025] Obtaining a composite service associated with the business process;
[0026] Deploy and package the composite service instance according to the running instance of the business process;
[0027] The packaged composite service instance is published.
[0028] Optionally, after encapsulating the composite service instance corresponding to the business process based on the composite service and publishing the composite service instance, the method further includes:
[0029] During the operation of the composite service instance, a service interface corresponding to the composite service is provided to the user to realize visualization of the operation of the composite service instance.
[0030] In order to solve the above technical problems, an embodiment of the present invention further provides a microservice generation system based on semantic matching, including:
[0031] A service information extraction module, used to extract service information from a pre-built service library;
[0032] A service attribute extraction module, used to parse the service information and obtain the service attributes corresponding to the service information;
[0033] A service attribute clustering module, used for clustering the service attributes to obtain a service attribute clustering result;
[0034] A relationship model building module, used to calculate service dependencies based on the clustering results, build a service dependency relationship model, and record the association information between services;
[0035] A composite service building module, used to match the attributes of the service based on semantic matching, and generate a composite service associated with the business process in combination with the service dependency model;
[0036] The composite service publishing module is used to encapsulate the composite service instance corresponding to the business process based on the composite service, and publish the composite service instance.
[0037] Optionally, it also includes:
[0038] An initial service library establishment module is used to establish an initial service library;
[0039] A description file acquisition module is used to acquire the function description file and data resource description file input by the user;
[0040] A service information extraction module, used to process the function description file and the data resource description file to obtain the function service information corresponding to the function description file and the data service information corresponding to the data resource description file;
[0041] The service library generation module is used to add the functional service information and the data service information to the initial service library to generate the service library.
[0042] Optionally, the service attribute clustering module includes:
[0043] A Euclidean distance calculation unit, used for calculating the Euclidean distance between the service attributes based on a bottom-up hierarchical clustering algorithm;
[0044] The service attribute clustering unit is used to perform clustering processing on the service attributes according to the Euclidean distance, generate a service attribute clustering set, and use the service attribute clustering set as the service attribute clustering result.
[0045] Optionally, the combined service building module includes:
[0046] A semantic matching unit, used to perform word sense disambiguation, semantic association and semantic fusion operations on the service attributes to obtain a semantic processing result;
[0047] A service dependency recommendation unit is used to recommend the services by relevance, and to build a list of services with strong relevance to the current services in combination with a service dependency model;
[0048] The service composition unit is used to combine services based on the semantic processing result and the service dependency model to generate a composite service associated with the business process.
[0049] Optionally, the combined service publishing module includes:
[0050] A composite service acquisition unit, used to acquire a composite service instance associated with the business process;
[0051] A composite service deployment unit, configured to deploy and package the composite service instance according to the running instance of the business process;
[0052] The composite service publishing unit is used to publish the packaged composite service instance.
[0053] Optionally, it also includes:
[0054] The service interface providing module is used to provide the service interface corresponding to the composite service to the user during the operation of the composite service instance, so as to realize the visualization of the operation of the composite service instance.
[0055] The advantages of the present invention compared with the prior art are:
[0056] The embodiment of the present invention classifies, parses and stores three different business requirements, namely, business function descriptions in a standard format input by users, business function descriptions in a custom format, and data resource descriptions, and extracts and clusters service attributes, classifies attributes with strong correlation and dependence into an attribute group, and calculates the dependency between services based on this result, thereby constructing a service dependency model; at the same time, semantic matching is performed on the service input and output interfaces, and a more accurate business process is constructed from both semantic logic and business logic aspects in combination with the service dependency model, and the constructed business process is encapsulated into a microservice, deployed and released, and its microservice management interface is output to achieve a more convenient and clear display of the microservice running status and management of the running process. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 A flowchart of a method for generating microservices based on semantic matching provided by an embodiment of the present invention;
[0058] Figure 2 A structural diagram of a microservice generation system based on semantic matching provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0059] Reference Figure 1 , which shows a flowchart of a method for generating microservices based on semantic matching provided by an embodiment of the present invention, such as Figure 1 As shown, the microservice generation method based on semantic matching may include the following steps:
[0060] Step 101: extract service information from a pre-built service library.
[0061] The embodiments of the present invention can be applied to scenarios where microservices corresponding to business processes are constructed.
[0062] The service library refers to a pre-built database for storing microservice information. The process of establishing the service library can be described in detail in combination with the following specific implementation methods.
[0063] In this embodiment, a detailed description may be given in conjunction with the modules provided by the provided microservice generation system.
[0064] In a specific implementation of the present invention, before the above step 101, the following steps may also be included:
[0065] Step A1: Create an initial service library.
[0066] In the embodiment of the present invention, the initial service database refers to a database that is pre-established by business personnel and only has a table structure but no data information is stored.
[0067] When the service information needs to be saved, an initial service library can be established in advance, and then step A2 is executed.
[0068] Step A2: Obtain the function description file and data resource description file input by the user.
[0069] The system provided by the embodiment of the present invention may include a business requirement input module, wherein the business requirement input module may be used to receive a function description file and a data resource description file input by a user.
[0070] After obtaining the function description file and data resource description file input by the user, step A3 is executed.
[0071] Step A3: Process the function description file and the data resource description file to obtain function service information corresponding to the function description file and data service information corresponding to the data resource description file.
[0072] The system provided by the embodiment of the present invention may further include a business information storage module. After receiving the function description file and the data resource description file input by the user, the business information storage module may process this information. Specifically, the business information storage module may obtain the function service information of the function description file and the data service information of the data resource description file according to the file types of the function description file and the data resource description file, and then execute step A4.
[0073] Step A4: Add the function service information and the data service information to the initial service library to generate the service library.
[0074] After the function service information and the data service information are acquired, the function service information and the data service information may be saved in an initial service library to generate a service library.
[0075] The service library contains all functional services and data service description files that have been published in the microservice platform.
[0076] After the service library is generated, the service information in the service library may be extracted, and then step 102 is executed.
[0077] Step 102: parse the service information to obtain service attributes corresponding to the service information.
[0078] The system provided by the present invention may also include a service dependency building support module, which includes a service attribute extraction module and a service association extraction module. After obtaining the service information, the service attribute extraction module may be used to extract the service attributes in the service information.
[0079] After the service information is parsed to obtain the service attributes corresponding to the service information, step 103 is executed.
[0080] Step 103: clustering the service attributes to obtain a service attribute clustering result.
[0081] Step 104: Calculate service dependencies according to the clustering results, build a service dependency model, and record the correlation information between services.
[0082] After obtaining the service attributes, the service association extraction module can be used to cluster the service attribute set based on the data dictionary using a clustering algorithm, and the service attributes with high correlation and strong dependence can be divided into an attribute group. The dependency between services is calculated based on the clustering results, and the calculation results are used to update the service dependency model, thereby obtaining the service attribute clustering results and the service dependency model.
[0083] After clustering the service attributes to obtain the service attribute clustering results, calculating the service dependencies, and updating the service dependency relationship model, step 105 is executed.
[0084] Step 105: Matching the attributes of the service based on semantic matching, combining the service dependency model, and generating a composite service associated with the business process.
[0085] The system provided by the embodiment of the present invention may also include a semantic matching module, which can perform word sense disambiguation, semantic association and semantic fusion operations on service attribute names for two different services, namely functional services and data services (where data services can only be used as input), to match the combined services of the business process.
[0086] After the composite service associated with the business process is generated, step 105 is executed.
[0087] Step 105: Based on the composite service, encapsulate the composite service instance corresponding to the business process, and publish the composite service instance.
[0088] After generating the composite service, you can build a composite service instance corresponding to the business process based on the composite service and publish the composite service instance. Specifically, the microservice encapsulation module uses the technical support of semantic matching and service dependency model to combine services, that is, build business processes, build services with high correlation and input-output matching into a complete business process, and encapsulate, package and deploy this business process instance; the microservice publishing module exposes the service interface in the running microservice instance to the system user, through which the operation status of the microservice can be visualized, and the status data and logs can be viewed and managed.
[0089] Next, the clustering process provided by the embodiment of the present invention is described as follows in combination with specific implementations.
[0090] In a specific implementation of the present invention, the above step 103 may include:
[0091] Sub-step B1: calculating the Euclidean distance between the service attributes based on a bottom-up hierarchical clustering algorithm;
[0092] Sub-step B2: clustering the service attributes according to the Euclidean distance to generate a service attribute cluster set, and using the service attribute cluster set as the service attribute clustering result.
[0093] In the embodiment of the present invention, service attribute clustering is based on a bottom-up hierarchical clustering algorithm, which regards each attribute as a different cluster, and uses the Euclidean distance to calculate the distance between clusters of different categories, that is, the similarity, and merges the closest pair of clusters into a new cluster, repeating this step until all parsed service attributes are clustered, and a set of attribute clusters of classification results is obtained. The distance between clusters of different categories is determined by the probability and frequency that the attributes in the two clusters appear in the same service interface, in the same business process, and are applied by the same service at the same time. The higher the frequency, the smaller the distance, thereby defining the correlation between the two service attributes.
[0094] The following is a detailed description based on the specific implementation method.
[0095] In another specific implementation of the present invention, the above step 104 may include:
[0096] Sub-step C1: performing word sense disambiguation, semantic association and semantic fusion operations on the attributes of the service to obtain a semantic processing result;
[0097] Sub-step C2: recommending the services in terms of relevance, and building a list of services with strong relevance to the current services in combination with the service dependency model;
[0098] Sub-step C3: Combining service attributes based on the semantic processing result and the service dependency model to generate a composite service associated with the business process.
[0099] In the embodiment of the present invention, the service dependency is calculated by calculating the frequency of each attribute in the two services appearing in the same cluster. When calculating the frequency, it is necessary to consider whether the attribute is a common and basic attribute, that is, whether it is involved in most services; and whether the association of each attribute is unique, that is, whether the attribute cluster only contains attributes in the two services or only contains very few other irrelevant attributes. The influence of these two factors can be reflected by the proportion of service attributes in the attribute cluster. These two factors are taken into account as weighted factors in the calculation of service dependency, so the calculation formula of the dependency weight between services can be obtained as follows: Among them, WS1 and WS2 are two services, Dep is the calculated dependency between the two services, i represents each attribute cluster, N is the total number of clusters, and a i and b i are the number of attributes of the two services that appear in the same cluster, cr i is the total number of service attributes in the cluster where the same attributes of the two services appear, S1 and S2 are the number of attributes in the two services respectively. After the calculation is completed, it is recorded in the service dependency model in the form of a triple (WS1, WS2, dep), where WS1 and WS2 are the unique identifiers of the two services respectively, dep is a non-negative integer representing the weight of the association, and 0 means there is no direct association between the two services.
[0100] The data dictionary contains the definitions of all services and service attributes of the microservice platform.
[0101] The service dependency model defines the degree of dependency between all services in the microservice platform, and records whether there is an association between two services and the weight of the association in the form of a triple.
[0102] The semantic matching unit is based on the knowledge graph for the industrial Internet production field, and performs semantic matching of short texts, including word sense disambiguation, semantic association, and semantic fusion. It is necessary to first classify the two types of services - data resource services and functional services. When matching contexts, data resource services only provide input attributes, while functional services provide input and output attributes; different semantic representations of the same service attribute are disambiguated and semantically fused, and then semantic matching is performed on the service attributes; the semantic matching module can use algorithms to Calculate the text similarity of the attributes of the two services, where WS0 is the given service, WS1 is the service to be matched with it, Similarity is the calculated matching similarity, sa is the number of attributes matched between the two services, S0 and S1 represent the number of attributes in WS0 and WS1 respectively. The larger value of the two is taken because of the diversity of relationships between services in the business process, such as parallel relationships, conditional relationships, etc. A given service may match multiple services or match the same service together with other services, so the algorithm only targets some of the attributes that have been matched in the two services.
[0103] The specific function of the semantic matching module is to provide semantic support for business process construction, and to realize service combination more accurately when the following situations occur: in the business scenario of sequential execution, when filtering services through service dependencies, several services with strong business associations will be generated, such as the functional services WS1(a,b) and WS2(a,b,c) (a, b, c in brackets represent the attributes contained in the service) with high business logic association with the data resource type service DS1(a,b). One of the reasons for the same association of the three services is that the c attribute is not in the same category as the a and b attributes when clustered, so the attribute has no effect on the calculation of similarity or the effect is very small and can be ignored; however, semantically DS1 and WS1 are the matching context services, and the service WS2 has an additional attribute c, which makes it impossible to match DS1 sequentially. This reflects the necessity of semantic matching. For complex business scenarios such as business logic executed in parallel, WS2(a,b,c) in the above example may be a summary of the two service branches WS1(a,b) and WS3(c). As the output of WS1 and WS3, one-to-many and many-to-one matching between services in parallel scenarios also requires semantic matching to achieve accurate service logic construction.
[0104] Next, the publishing process of the composite service is described in detail in combination with the specific implementation method.
[0105] In another specific implementation of the present invention, the above step 105 may include:
[0106] Sub-step D1: obtaining the composite service associated with the business process;
[0107] Sub-step D2: deploying and packaging the composite service instance according to the running instance of the business process;
[0108] Sub-step D3: publishing the packaged composite service instance.
[0109] In an embodiment of the present invention, the microservice instance deployment unit includes microservice image packaging and deployment and startup of the microservice image in a Docker container, and also includes monitoring of the running status of the microservice.
[0110] The microservice management interface includes a detailed description of all service interfaces contained in the microservice, including the name, call path, parameter list, request body and response information of each type of service interface. The interface can be connected to the system platform and can also be published to users in WADL format.
[0111] The technical indicators of the embodiments of the present invention compared with the prior art can be shown in Table 1:
[0112]
[0113]
[0114] Compared with the existing technology, this embodiment is based on the matching of various services and service attributes in the business process, digitally constructs the business process from two aspects: semantic logic and business logic, encapsulates and publishes the business process at the granularity of microservices, and realizes a method for generating microservices with high business cohesion. From the perspective of system functions, two types of services and three service formats can be parsed and stored separately, enriching the diversity of the service composition process; by parsing and clustering service attributes, calculating the dependencies between services, and building a service dependency model, the construction of business processes can be assisted from the level of business cohesion, ensuring that the services in the constructed process are highly relevant in terms of function and application scenarios; by semantically matching service attributes based on the knowledge graph in the industrial production field, business processes can be constructed from the semantic level to ensure that the constructed process is smooth in the context environment and that the input and output interfaces between services are matched; by encapsulating the generated business process into a single microservice, the running status of the business process can be monitored and managed at a more appropriate granularity; from the perspective of system efficiency, more accurate service composition can be achieved through the service dependency model and semantic matching of service attributes, reducing the probability of errors in business process construction; at the same time, business processes are managed in a microservice style, with higher business cohesion within microservices, more independence between microservices, lower coupling, and lower management difficulty. At the same time, each business instance has independent resources and better isolation between instances.
[0115] The semantic matching-based microservice generation method provided in the embodiment of the present invention extracts service information from a pre-built service library, parses the service information, obtains service attributes corresponding to the service information, clusters the service attributes, obtains service attribute clustering results, calculates service dependencies, and builds a service dependency model. The service attributes are matched based on semantic matching, and a composite service associated with a business process is constructed based on the strength of the service dependency. Based on the composite service, a composite service instance corresponding to the business process is encapsulated, and the composite service instance is published. The embodiment of the present invention classifies, parses and stores three different business requirements, namely, business function descriptions in a standard format input by users, business function descriptions in a custom format, and data resource descriptions, and extracts and clusters service attributes, classifies attributes with strong correlation and dependence into an attribute group, and calculates the dependency between services based on this result, thereby constructing a service dependency model; at the same time, semantic matching is performed on the service input and output interfaces, and a more accurate business process is constructed from both semantic logic and business logic aspects in combination with the service dependency model, and the constructed business process is encapsulated into a microservice, deployed and released, and its microservice management interface is output to achieve a more convenient and clear display of the microservice running status and management of the running process.
[0116] Reference Figure 2 , which shows a structural diagram of a microservice generation system based on semantic matching provided by an embodiment of the present invention, such as Figure 2 As shown, the semantic matching-based microservice generation system 200 may include the following modules:
[0117] A service information extraction module 210 is used to extract service information from a pre-built service library;
[0118] A service attribute extraction module 220 is used to parse the service information and obtain service attributes corresponding to the service information;
[0119] The service attribute clustering module 230 is used to perform clustering processing on the service attributes to obtain a service attribute clustering result;
[0120] A relationship model building module 240 is used to calculate service dependencies based on the clustering results, and to build a service dependency relationship model to record the association information between services;
[0121] A composite service construction module 250 is used to match the attributes of the service based on semantic matching, and generate a composite service associated with the business process in combination with the service dependency model;
[0122] The composite service publishing module 260 is used to encapsulate the composite service instance corresponding to the business process based on the composite service, and publish the composite service instance.
[0123] Optionally, it also includes:
[0124] An initial service library establishment module is used to establish an initial service library;
[0125] A description file acquisition module is used to acquire the function description file and data resource description file input by the user;
[0126] A service information extraction module, used to process the function description file and the data resource description file to obtain the function service information corresponding to the function description file and the data service information corresponding to the data resource description file;
[0127] The service library generation module is used to add the functional service information and the data service information to the initial service library to generate the service library.
[0128] Optionally, the service attribute clustering module includes:
[0129] A Euclidean distance calculation unit, used for calculating the Euclidean distance between the service attributes based on a bottom-up hierarchical clustering algorithm;
[0130] The service attribute clustering unit is used to perform clustering processing on the service attributes according to the Euclidean distance, generate a service attribute clustering set, and use the service attribute clustering set as the service attribute clustering result.
[0131] Optionally, the combined service building module includes:
[0132] A semantic matching unit, used to perform word sense disambiguation, semantic association and semantic fusion operations on the service attributes to obtain a semantic processing result;
[0133] A service dependency recommendation unit is used to recommend the services by relevance, and to build a list of services with strong relevance to the current services in combination with a service dependency model;
[0134] The service composition unit is used to combine services based on the semantic processing result and the service dependency model to generate a composite service associated with the business process.
[0135] Optionally, the combined service publishing module includes:
[0136] A composite service acquisition unit, used to acquire a composite service instance associated with the business process;
[0137] A composite service deployment unit, configured to deploy and package the composite service instance according to the running instance of the business process;
[0138] The composite service publishing unit is used to publish the packaged composite service instance.
[0139] Optionally, it also includes:
[0140] The service interface providing module is used to provide the service interface corresponding to the composite service to the user during the operation of the composite service instance, so as to realize the visualization of the operation of the composite service instance.
[0141] The semantic matching-based microservice generation system provided by the embodiment of the present invention extracts service information from a pre-built service library, parses the service information, obtains service attributes corresponding to the service information, clusters the service attributes, obtains service attribute clustering results, calculates service dependencies, and builds a service dependency model. The service attributes are matched based on semantic matching, and a composite service associated with a business process is constructed based on the strength of the service dependency. Based on the composite service, a composite service instance corresponding to the business process is encapsulated, and the composite service instance is released. The embodiment of the present invention classifies, parses and stores three different business requirements, namely, business function descriptions in a standard format input by users, business function descriptions in a custom format, and data resource descriptions, and extracts and clusters service attributes, classifies attributes with strong correlation and dependence into an attribute group, and calculates the dependency between services based on this result, thereby constructing a service dependency model; at the same time, semantic matching is performed on the service input and output interfaces, and a more accurate business process is constructed from both semantic logic and business logic aspects in combination with the service dependency model, and the constructed business process is encapsulated into a microservice, deployed and released, and its microservice management interface is output to achieve a more convenient and clear display of the microservice running status and management of the running process.
[0142] The contents not described in detail in the specification of the present invention belong to the common knowledge of those skilled in the art.
Claims
1. A microservice generation method based on semantic matching, characterized in that: include: Extract service information from pre-built service libraries; Parsing the service information to obtain service attributes corresponding to the service information; Performing clustering processing on the service attributes to obtain a service attribute clustering result; Calculating service dependencies based on the clustering results, building a service dependency model, and recording correlation information between services; Matching the attributes of the service based on semantic matching, and generating a composite service associated with the business process in combination with the service dependency model; Based on the composite service, encapsulate the composite service instance corresponding to the business process, and publish the composite service instance; The clustering process of the service attributes to obtain a service attribute clustering result includes: Based on a bottom-up hierarchical clustering algorithm, calculating the Euclidean distance between the service attributes; The service attributes are clustered according to the Euclidean distance to generate a service attribute cluster set, and the service attribute cluster set is used as the service attribute clustering result.
2. The method according to claim 1, characterized in that: Before extracting the service information in the pre-built service library, the method further includes: Establishing the initial service library; Obtain the function description file and data resource description file input by the user; Processing the function description file and the data resource description file to obtain function service information corresponding to the function description file and data service information corresponding to the data resource description file; The function service information and the data service information are added to the initial service library to generate the service library.
3. The method according to claim 1, characterized in that The semantic matching-based method matches the attributes of the service and generates a composite service associated with the business process in combination with the service dependency model, including: Performing word sense disambiguation, semantic association and semantic fusion operations on the attributes of the service to obtain a semantic processing result; Recommend the services in terms of relevance, and build a list of services with strong relevance to the current services based on the service dependency model; Service attributes are combined based on the semantic processing result and the service dependency model to generate a composite service associated with the business process.
4. The method according to claim 1, characterized in that: The encapsulating the composite service instance corresponding to the business process based on the composite service and publishing the composite service instance includes: Obtaining a composite service associated with the business process; Deploy and package the composite service instance according to the running instance of the business process; The packaged composite service instance is published.
5. The method according to claim 4, characterized in that After encapsulating the composite service instance corresponding to the business process based on the composite service and publishing the composite service instance, the method further includes: During the operation of the composite service instance, a service interface corresponding to the composite service is provided to the user to realize visualization of the operation of the composite service instance.
6. A microservice generation system based on semantic matching, characterized in that: include: A service information extraction module, used to extract service information from a pre-built service library; A service attribute extraction module, used to parse the service information and obtain the service attributes corresponding to the service information; A service attribute clustering module, used for clustering the service attributes to obtain a service attribute clustering result; A relationship model building module, used to calculate service dependencies based on the clustering results, build a service dependency relationship model, and record the association information between services; A composite service building module, used to match the attributes of the service based on semantic matching, and generate a composite service associated with the business process in combination with the service dependency model; A composite service publishing module, used to encapsulate the composite service instance corresponding to the business process based on the composite service, and publish the composite service instance; The service attribute clustering module includes: A Euclidean distance calculation unit, used for calculating the Euclidean distance between the service attributes based on a bottom-up hierarchical clustering algorithm; The service attribute clustering unit is used to perform clustering processing on the service attributes according to the Euclidean distance, generate a service attribute clustering set, and use the service attribute clustering set as the service attribute clustering result.
7. The system according to claim 6, characterized in that Also includes: An initial service library establishment module is used to establish an initial service library; A description file acquisition module is used to acquire the function description file and data resource description file input by the user; A service information extraction module, used to process the function description file and the data resource description file to obtain the function service information corresponding to the function description file and the data service information corresponding to the data resource description file; The service library generation module is used to add the functional service information and the data service information to the initial service library to generate the service library.
8. The system according to claim 6, characterized in that The composite service building block includes: A semantic matching unit, used for performing word sense disambiguation, semantic association and semantic fusion operations on the service attributes to obtain a semantic processing result; A service dependency recommendation unit is used to recommend the services by relevance, and to build a list of services with strong relevance to the current services in combination with a service dependency model; The service composition unit is used to combine services based on the semantic processing result and the service dependency model to generate a composite service associated with the business process.
9. The system according to claim 6, characterized in that The composite service publishing module includes: A composite service acquisition unit, used to acquire a composite service instance associated with the business process; A composite service deployment unit, configured to deploy and package the composite service instance according to the running instance of the business process; The composite service publishing unit is used to publish the packaged composite service instance.
10. The system according to claim 9, characterized in that Also includes: The service interface providing module is used to provide the service interface corresponding to the composite service to the user during the operation of the composite service instance, so as to realize the visualization of the operation of the composite service instance.
Citation Information
Patent Citations
A semantic telecommunication network capability service gateway component, network system and work method
CN101217521A
Recommending method based on demand-based service organization
CN102880725A
Network system of web services based on semantics and relationships
US20110208848A1
Semantic broker system and semantic broker service method
WO2010128711A1
