Service combination method and apparatus, computer device, and storage medium
By adjusting and clustering operations using genetic algorithms, a standard service composition is constructed, which solves the problem of inaccurate Web service composition, achieves more accurate service composition, and meets the needs of complex network services.
Patent Information
- Application Number
- CN202411792397.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-07
- Publication Date
- 2026-01-20
- Estimated Expiration
- 2044-12-07
AI Technical Summary
In existing technologies, Web service composition methods suffer from inaccurate composition determination, making it difficult to meet complex network service requirements.
A genetic algorithm is used to adjust the selection status of each reference service in the reference service portfolio. Through clustering and reflection expansion operations, a set of standard service portfolios is constructed. Finally, the standard service portfolio with the smallest portfolio evaluation value is selected as the target service portfolio.
It improves the accuracy and certainty of service combinations, meeting the needs of complex network services.
Smart Images

Figure CN119583526B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to a service combination method and device, computer equipment and storage medium. BACKGROUND
[0002] With the continuous development of Internet technology, the number of Internet users is growing explosively. In order to meet the growing and complex network demand, a large number of Web services have emerged. However, as the needs of enterprises and users become more complex, a single Web service cannot meet the complex network service demand. Therefore, how to combine the existing various types of Web services to form new and value-added services and meet the various network service demands proposed by users.
[0003] In the traditional technology, the Web service combination optimization method mainly includes particle swarm algorithm, ant colony algorithm, genetic algorithm, etc. The Web service combination maximizing the service quality index is calculated as the final training result. Although this method can determine the service combination, it has the problem of inaccurate service combination determination. SUMMARY
[0004] Therefore, it is necessary to provide a service combination method, device, computer equipment and storage medium capable of accurately determining the service combination to solve the above technical problems.
[0005] In a first aspect, the present application provides a service combination method, comprising:
[0006] obtaining a reference service combination set; the reference service combination set includes at least one reference service combination; the reference service combination is used to meet a preset Web service (Web Service) demand;
[0007] adjusting the selection state of each reference service in the reference service combination based on a genetic algorithm to update the reference service combination set;
[0008] selecting at least one reference service combination from the updated reference service combination set to construct a standard service combination set; the combination evaluation value of the reference service combination is determined based on the service quality index of each reference service in the reference service combination;
[0009] updating the standard service combination set according to a preset updating mode;
[0010] selecting the standard service combination with the smallest combination evaluation value from the updated standard combination set as the target service combination.
[0011] In one embodiment, obtaining the reference service combination set comprises:
[0012] obtaining at least one initial service and each initial service quality index corresponding to each initial service;
[0013] For each initial service quality index, clustering each initial service under the initial service quality index to obtain at least one initial service hierarchy under the initial service quality index; the initial service hierarchy includes at least one initial service; the order of the initial service hierarchy is negatively correlated with the average of the service quality index corresponding to each initial service in the initial service hierarchy;
[0014] According to the preset Web service requirement, selecting at least one target service quality index from each initial service quality index;
[0015] According to the initial service of the first initial service hierarchy under each target service quality index, constructing a reference service combination set.
[0016] In one embodiment, clustering each initial service under the initial service quality index to obtain at least one initial service hierarchy under the initial service quality index includes:
[0017] According to the distance between each initial service and the center point corresponding to other initial services, determining the initial clustering cluster to which each initial service belongs and the cluster number of the initial clustering cluster;
[0018] According to the cluster number, clustering each initial service under the initial service quality index to obtain at least one initial service hierarchy under the initial service quality index.
[0019] In one embodiment, according to the distance between each initial service and the center point corresponding to other initial services, determining the initial clustering cluster to which each initial service belongs and the cluster number of the initial clustering cluster includes:
[0020] For each initial service, determining the distance between the initial service and the center point corresponding to other initial services;
[0021] If the distance is less than a first distance threshold, it is determined that the initial service belongs to the initial clustering cluster;
[0022] If the distance is greater than the first distance threshold and less than a second distance threshold, the initial service is deleted;
[0023] If the distance is greater than the second distance threshold, a new initial clustering cluster is generated, and the initial service is added to the new initial clustering cluster.
[0024] In one embodiment, according to the initial service of the first initial service hierarchy under each target service quality index, determining the reference service combination set includes:
[0025] For each target service quality index, an initial service satisfying a preset selection condition is selected from the initial service hierarchy as a reference service corresponding to the target service quality index;
[0026] The reference services corresponding to the target service quality indexes are combined to obtain at least one reference service combination;
[0027] A reference service combination set is constructed according to the at least one reference service combination.
[0028] In one embodiment, the standard service combination set is updated according to a preset updating mode, including:
[0029] At least one standard service combination in the standard service combination set is reflected according to a preset reflection coefficient to update the standard service combination set;
[0030] At least one standard service combination in the updated standard service combination set is expanded according to a preset expansion coefficient to update the standard service combination set again; the preset reflection coefficient is less than the preset expansion coefficient.
[0031] In one embodiment, at least one standard service combination in the standard service combination set is reflected according to a preset reflection coefficient to update the standard service combination set, including:
[0032] The standard service combination with the minimum combination evaluation value in the standard service combination set is regarded as a worst point;
[0033] The center point of all standard service combinations in the standard service combination set except the standard service combination corresponding to the worst point is determined;
[0034] The reflection point in the standard service combination set is determined according to the preset reflection coefficient, the worst point and the center point;
[0035] In the case that the combination evaluation value corresponding to the reflection point is less than the combination evaluation value corresponding to the worst point, the reflection point is used to replace the worst point to update the standard service combination set.
[0036] In a second aspect, the application further provides a service combination device, including:
[0037] A set acquisition module is configured to acquire a reference service combination set; the reference service combination set includes at least one reference service combination; the reference service combination is used to satisfy a preset Web service requirement;
[0038] A combination adjustment module is configured to adjust the selection state of each reference service in the reference service combination based on a genetic algorithm to update the reference service combination set;
[0039] The combination selection module is configured to select at least one reference service combination according to a combination evaluation value of each reference service combination in the updated reference service combination set, and to construct a standard service combination set; the combination evaluation value of the reference service combination is determined based on a service quality index of each reference service in the reference service combination;
[0040] The set updating module is configured to update the standard service combination set according to a preset updating mode;
[0041] The target selection module is configured to select a standard service combination with a minimum combination evaluation value from the updated standard combination set as a target service combination.
[0042] In a third aspect, the present application further provides a computer device, comprising a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0043] The reference service combination set is obtained; the reference service combination set comprises at least one reference service combination; the reference service combination is used to meet a preset Web Service requirement;
[0044] The selection state of each reference service in the reference service combination is adjusted based on a genetic algorithm, so as to update the reference service combination set;
[0045] At least one reference service combination is selected according to a combination evaluation value of each reference service combination in the updated reference service combination set, and a standard service combination set is constructed; the combination evaluation value of the reference service combination is determined based on a service quality index of each reference service in the reference service combination;
[0046] The standard service combination set is updated according to a preset updating mode;
[0047] A standard service combination with a minimum combination evaluation value is selected from the updated standard combination set as a target service combination.
[0048] In a fourth aspect, the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the following steps:
[0049] The reference service combination set is obtained; the reference service combination set comprises at least one reference service combination; the reference service combination is used to meet a preset Web Service requirement;
[0050] The selection state of each reference service in the reference service combination is adjusted based on a genetic algorithm, so as to update the reference service combination set;
[0051] According to the combination evaluation values of the reference service combinations in the updated reference service combination set, at least one reference service combination is selected to construct a standard service combination set; the combination evaluation value of the reference service combination is determined based on the service quality indexes of the reference services in the reference service combination;
[0052] The standard service combination set is updated according to a preset updating mode;
[0053] A standard service combination with the minimum combination evaluation value is selected from the updated standard combination set as the target service combination.
[0054] In a fifth aspect, the present application further provides a computer program product, comprising a computer program which, when executed by a processor, implements the following steps:
[0055] A reference service combination set is acquired; the reference service combination set comprises at least one reference service combination; the reference service combination is used to satisfy a preset Web Service requirement;
[0056] Based on a genetic algorithm, the selection state of each reference service in the reference service combination is adjusted to update the reference service combination set;
[0057] According to the combination evaluation values of the reference service combinations in the updated reference service combination set, at least one reference service combination is selected to construct a standard service combination set; the combination evaluation value of the reference service combination is determined based on the service quality indexes of the reference services in the reference service combination;
[0058] The standard service combination set is updated according to a preset updating mode;
[0059] A standard service combination with the minimum combination evaluation value is selected from the updated standard combination set as the target service combination.
[0060] The service combination method, device, computer device and storage medium, obtain a reference service combination set; the reference service combination set comprises at least one reference service combination; the reference service combination is used to meet a preset Web service (WebService) requirement; based on a genetic algorithm, the selection state of each reference service in the reference service combination is adjusted to update the reference service combination set; at least one reference service combination is selected from the updated reference service combination set according to the combination evaluation value of each reference service combination in the reference service combination set, and a standard service combination set is constructed; the combination evaluation value of the reference service combination is determined based on the service quality index of each reference service in the reference service combination; the standard service combination set is updated according to a preset update mode; and the standard service combination with the minimum combination evaluation value is selected from the updated standard combination set as the target service combination. After the reference service combination set is updated according to the genetic algorithm, the reference service combination set is further adjusted according to the combination evaluation value in this embodiment, and the target service combination is obtained, so that the accuracy of the target service combination is improved. BRIEF DESCRIPTION OF DRAWINGS
[0061] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the embodiments or the related art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0062] Figure 1 An application environment diagram of a service combination method provided by the present embodiment;
[0063] Figure 2 A flowchart of a first service combination method provided by the present embodiment;
[0064] Figure 3 A flowchart of a second service combination method provided by the present embodiment;
[0065] Figure 4 A structural block diagram of a service combination device provided by the present embodiment;
[0066] Figure 5 An internal structure diagram of a first computer device provided by the present embodiment;
[0067] Figure 6 An internal structure diagram of a second computer device provided by the present embodiment. DETAILED DESCRIPTION
[0068] In order to make the purposes, technical solutions and advantages of the present application clearer, further detailed description will be given below in combination with the drawings and examples. It should be understood that the specific examples described herein are only used to explain the present application and not to limit the present application.
[0069] The service combination method provided by the embodiments of the present application can be applied to the application environment as shown in Figure 1 The terminal 102 communicates with the server 104 through the network. The data storage system can store the data required to be processed by the server 104. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers. The computer device obtains a reference service combination set; the reference service combination set includes at least one reference service combination; the reference service combination is used to meet a preset Web Service requirement; based on a genetic algorithm, the selection state of each reference service in the reference service combination is adjusted to update the reference service combination set; at least one reference service combination is selected according to the combination evaluation value of each reference service combination in the updated reference service combination set to construct a standard service combination set; the combination evaluation value of the reference service combination is determined based on the service quality indicators of each reference service in the reference service combination; the standard service combination set is updated according to a preset updating mode; and the standard service combination with the smallest combination evaluation value is selected from the updated standard combination set as the target service combination. The computer device can be a terminal or a server. The terminal 102 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things device can be a smart speaker, a smart television, a smart air conditioner, a smart vehicle device, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers.
[0070] In an exemplary embodiment, as shown in Figure 2 A service combination method is provided, and the method is applied to the computer device in Figure 1 for example, including the following steps 201 to 205. Wherein:
[0071] Step 201, obtaining a reference service combination set.
[0072] The reference service combination set includes at least one reference service combination; the reference service combination is used to meet a preset Web Service requirement.
[0073] Specifically, the reference services are combined according to a preset Web Service requirement to obtain at least one reference service combination; and the reference service combinations are combined to obtain a reference service combination set.
[0074] In step 202, the selection state of each reference service in the reference service combination is adjusted based on a genetic algorithm to update the reference service combination set.
[0075] Specifically, a target function (such as a combination evaluation value) of each reference service combination in the reference service combination set is determined; at least one reference service combination is selected from the reference service combinations for selection, crossover and mutation operations according to the target function, the selection state of each reference service in the reference service combination is adjusted, a new reference service combination is formed, and the reference service combination set is updated; and the reference service combination set is determined to be updated when the reference service combination set meets a threshold value. The advantage of this setting is that the genetic algorithm has the advantages of strong global optimization ability and high accuracy, and can increase the diversity of the reference service combination set.
[0076] In step 203, at least one reference service combination is selected according to the combination evaluation value of each reference service combination in the updated reference service combination set to construct a standard service combination set.
[0077] The combination evaluation value of the reference service combination is determined based on the Quality of Service (QOS) indicators of each reference service in the reference service combination. The QOS indicators are used to evaluate the advantages and disadvantages of a Web service or a Web service combination under the indicators. The QOS indicators mainly include response time, service price, service performance, integrity, reliability, availability, throughput, security, reputation, etc. The initial QOS indicator value of each Web service can be calculated by an expression or obtained from a trusted third party. The combination evaluation value is used to represent the comprehensive advantages and disadvantages of a Web service combination.
[0078] Specifically, the combination evaluation value of each reference service combination in the updated reference service combination set is determined by formula (1-1); the reference service combination with the smallest combination evaluation value is selected as the optimal service combination; the reference service combination with the second smallest combination evaluation value is selected as the suboptimal service combination; the reference service combination with the largest combination evaluation value is selected as the worst service combination; and the standard service combination set is constructed according to the optimal service combination, the suboptimal service combination and the worst service combination.
[0079] (1-1)
[0080] wherein, a combination evaluation value of the ith QOS index, that is, a calculation expression of a minimum target QOS or a reciprocal thereof, a jth constraint condition.
[0081] In step 204, the standard service combination set is updated according to a preset updating mode.
[0082] Specifically, the optimal service combination, the suboptimal service combination, and the worst service combination are determined to determine a reflection service combination; the optimal service combination, the suboptimal service combination, the worst service combination, and the reflection service combination are subjected to reflection operation and expansion operation to update the standard service combination set.
[0083] In step 205, a standard service combination with the minimum combination evaluation value is selected from the updated standard combination set as the target service combination.
[0084] The service combination method includes the following steps. A reference service combination set is obtained; the reference service combination set includes at least one reference service combination; the reference service combination is used to meet a preset Web Service requirement; based on a genetic algorithm, a selection state of each reference service in the reference service combination is adjusted to update the reference service combination set; at least one reference service combination is selected from the updated reference service combination set to construct a standard service combination set; a combination evaluation value of the reference service combination is determined based on service quality indexes of each reference service in the reference service combination; the standard service combination set is updated according to a preset updating mode; and a standard service combination with the minimum combination evaluation value is selected from the updated standard combination set as a target service combination. After the reference service combination set is updated based on the genetic algorithm, the reference service combination set is further adjusted based on the combination evaluation value to obtain the target service combination, so that the accuracy of the target service combination is improved.
[0085] In one embodiment, the reference service combination set is obtained, including: obtaining at least one initial service and each initial service quality index corresponding to each initial service; clustering each initial service under each initial service quality index to obtain at least one initial service echelon under each initial service quality index; selecting at least one target service quality index from each initial service quality index according to a preset Web Service requirement; and constructing the reference service combination set according to the initial service of the first initial service echelon under each target service quality index.
[0086] The initial service queue includes at least one initial service, and the order of the initial service queue is negatively correlated with the average of the service quality indicators corresponding to each initial service in the initial service queue. The preset Web service requirement can be generated according to the preset service quality indicators corresponding to the preset Web service type, or can be generated according to the threshold range of the QOS indicators in the actual scene.
[0087] Specifically, at least one initial service is obtained, for each initial service, each initial service quality indicator of the initial service is determined, for each initial service quality indicator, each initial service under the initial service quality indicator is clustered to obtain at least one initial service queue under the initial service quality indicator, at least one target service quality indicator is selected from each initial service quality indicator according to the preset Web service requirement, for each target service quality indicator, the initial service of the first initial service queue under the target service quality indicator is determined, and each selected initial service is combined to obtain a reference service combination set.
[0088] In one embodiment, clustering each initial service under the initial service quality indicator to obtain at least one initial service queue under the initial service quality indicator includes: determining the initial clustering cluster to which each initial service belongs and the cluster number of the initial clustering cluster according to the distance between each initial service and the center point corresponding to other initial services, and clustering each initial service under the initial service quality indicator according to the cluster number to obtain at least one initial service queue under the initial service quality indicator.
[0089] Specifically, the initial clustering cluster to which each initial service belongs and the cluster number of the initial clustering cluster are determined according to the distance between each initial service and the center point corresponding to other initial services, the cluster number is taken as the K value, and each initial service under the initial service quality indicator is clustered based on a clustering algorithm (such as the K-means algorithm) to obtain at least one initial service queue under the initial service quality indicator.
[0090] In one embodiment, the initial clustering cluster to which each initial service belongs and the cluster number of the initial clustering cluster are determined according to the distance between each initial service and the center point corresponding to other initial services, including: for each initial service, the distance between the initial service and the center point corresponding to other initial services is determined, if the distance is less than a first distance threshold, it is determined that the initial service belongs to the initial clustering cluster, if the distance is greater than the first distance threshold and less than a second distance threshold, the initial service is deleted, and if the distance is greater than the second distance threshold, a new initial clustering cluster is generated, and the initial service is added to the new initial clustering cluster.
[0091] In one embodiment, the reference service combination set is determined according to the initial services in the first initial service hierarchy under each target service quality indicator, including: for each target service quality indicator, selecting an initial service satisfying a preset selection condition from the initial service hierarchy as the reference service corresponding to the target service quality indicator; combining the reference services corresponding to each target service quality indicator to obtain at least one reference service combination; and constructing the reference service combination set according to the at least one reference service combination. The preset selection condition can be that the QOS indicator of the target service quality indicator is less than a preset indicator threshold.
[0092] Specifically, for each target service quality indicator, an initial service satisfying a preset selection condition is selected from the first initial service hierarchy under the target service quality indicator as the reference service corresponding to the target service quality indicator; the reference services are randomly combined to obtain at least one reference service combination; and the reference service combination set is constructed from the reference service combinations.
[0093] In this embodiment, at least one initial service and each initial service quality indicator corresponding to the initial service are obtained; for each initial service quality indicator, each initial service under the initial service quality indicator is clustered to obtain at least one initial service hierarchy under the initial service quality indicator; the initial service hierarchy includes at least one initial service; the order of the initial service hierarchy is negatively correlated with the average of the service quality indicators corresponding to each initial service in the initial service hierarchy; at least one target service quality indicator is selected from each initial service quality indicator according to a preset Web service requirement; and the reference service combination set is constructed according to the initial services in the first initial service hierarchy under each target service quality indicator, which can quickly and accurately determine the reference service combination set.
[0094] In one embodiment, the standard service combination set is updated according to a preset updating mode, including: performing reflection processing on at least one standard service combination in the standard service combination set according to a preset reflection coefficient to update the standard service combination set; and performing expansion processing on at least one standard service combination in the updated standard service combination set according to a preset expansion coefficient to update the standard service combination set again; the preset reflection coefficient is less than the preset expansion coefficient.
[0095] Specifically, a reflection point is determined from the standard service combination set; reflection processing is performed on the standard service combination set according to a preset reflection coefficient and the standard service combination to update the standard service combination set; and expansion processing is performed on at least one standard service combination in the updated standard service combination set according to a preset expansion coefficient and the reflection point to update the standard service combination set again.
[0096] In one embodiment, at least one of the standard service combinations in the standard service combination set is subjected to reflection processing according to a preset reflection coefficient, to update the standard service combination set, including: taking the standard service combination with the minimum combination evaluation value in the standard service combination set as the worst point; determining the gravity point of all the standard service combinations in the standard service combination set except the standard service combination corresponding to the worst point; determining the reflection point in the standard service combination set according to the preset reflection coefficient, the worst point and the gravity point; and replacing the worst point with the reflection point to update the standard service combination set, in the case that the combination evaluation value corresponding to the reflection point is less than the combination evaluation value corresponding to the worst point.
[0097] In one embodiment, the reflection point in the standard service combination set is determined according to the preset reflection coefficient, the worst point and the gravity point, including: determining the first difference value between the gravity point and the worst point; determining the product value between the preset reflection coefficient and the first difference value; determining the second difference value between the gravity point and the product value, and taking the corresponding point of the second difference value as the reflection point in the standard service combination set.
[0098] In this embodiment, at least one of the standard service combinations in the standard service combination set is subjected to reflection processing according to a preset reflection coefficient, to update the standard service combination set; and at least one of the standard service combinations in the updated standard service combination set is subjected to expansion processing according to a preset expansion coefficient, to update the standard service combination set again, which can improve the convergence of the standard service combinations in the standard service combination set.
[0099] In one exemplary embodiment, as shown in Figure 3 , a service combination method is provided, which is applied to a computer device in Figure 1 for example, including the following steps 301 to 312. Wherein:
[0100] Step 301, at least one initial service and each initial service quality index corresponding to each initial service are obtained.
[0101] Step 302, the initial clustering cluster to which each initial service belongs and the number of initial clustering clusters are determined according to the distance between each initial service and the center point corresponding to other initial services.
[0102] Step 303, each initial service under the initial service quality index is clustered according to the number of clustering clusters, to obtain at least one initial service echelon under the initial service quality index. The initial service echelon includes at least one initial service; the order of the initial service echelon is negatively correlated with the average of the service quality index corresponding to each initial service in the initial service echelon.
[0103] Step 304, at least one target service quality index is selected from each initial service quality index according to a preset Web service requirement.
[0104] Step 305, for each target service quality index, selecting an initial service satisfying a preset selection condition from the initial service hierarchy as a reference service corresponding to the target service quality index.
[0105] Step 306, combining the reference services corresponding to the target service quality indexes to obtain at least one reference service combination.
[0106] Step 307, constructing a reference service combination set according to the at least one reference service combination. The reference service combination set includes at least one reference service combination.
[0107] Step 308, adjusting the selection state of each reference service in the reference service combination based on a genetic algorithm to update the reference service combination set.
[0108] Step 309, selecting at least one reference service combination according to the combination evaluation value of each reference service combination in the updated reference service combination set to construct a standard service combination set; the combination evaluation value of the reference service combination is determined based on the service quality indexes of each reference service in the reference service combination.
[0109] Step 310, performing reflection processing on at least one standard service combination in the standard service combination set according to a preset reflection coefficient to update the standard service combination set.
[0110] Step 311, performing expansion processing on at least one standard service combination in the updated standard service combination set according to a preset expansion coefficient to update the standard service combination set again; the preset reflection coefficient is smaller than the preset expansion coefficient.
[0111] Step 312, selecting a standard service combination with the smallest combination evaluation value from the updated standard combination set as a target service combination.
[0112] It should be understood that although each step in the flowchart involved in each embodiment as described above is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, at least part of the steps in the flowchart involved in each embodiment as described above can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or stages in other steps.
[0113] Based on the same inventive concept, the embodiments of the present application further provide a service combination device for implementing the service combination method described above. The device provides a solution to the implementation scheme as described in the above method, and therefore the specific limitations in one or more service combination device embodiments provided below can refer to the limitations of the service combination method described above, which will not be repeated here.
[0114] In one exemplary embodiment, as shown in Figure 4 a service combination device is provided, comprising: a set obtaining module 10, a combination adjusting module 11, a combination selecting module 12, a set updating module 13 and a target selecting module 14, wherein:
[0115] The set obtaining module 10 is configured to obtain a reference service combination set; the reference service combination set comprises at least one reference service combination; the reference service combination is used to meet a preset Web Service requirement;
[0116] The combination adjusting module 11 is configured to adjust the selection state of each reference service in the reference service combination based on a genetic algorithm, so as to update the reference service combination set;
[0117] The combination selecting module 12 is configured to select at least one reference service combination from the updated reference service combination set according to the combination evaluation value of each reference service combination in the updated reference service combination set, so as to construct a standard service combination set; the combination evaluation value of the reference service combination is determined based on the service quality indicators of each reference service in the reference service combination;
[0118] The set updating module 13 is configured to update the standard service combination set according to a preset updating mode;
[0119] The target selecting module 14 is configured to select a standard service combination with the smallest combination evaluation value from the updated standard combination set as a target service combination.
[0120] In one embodiment, the set obtaining module 10 is further configured to determine the initial clustering cluster to which each initial service belongs and the clustering number of the initial clustering cluster according to the distance between each initial service and the corresponding center point of other initial services; and cluster each initial service under the initial service quality indicator according to the clustering number, so as to obtain at least one initial service echelon under the initial service quality indicator.
[0121] In an embodiment, the collection obtaining module 10 is further configured to determine, for each initial service, a distance between the initial service and a center point corresponding to other initial services; if the distance is less than a first distance threshold, determine that the initial service belongs to an initial cluster; if the distance is greater than the first distance threshold and less than a second distance threshold, delete the initial service; and if the distance is greater than the second distance threshold, generate a new initial cluster and add the initial service to the new initial cluster.
[0122] In an embodiment, the collection obtaining module 10 is further configured to, for each target service quality indicator, select, from the initial service hierarchy, an initial service satisfying a preset selection condition as a reference service corresponding to the target service quality indicator; combine the reference services corresponding to the target service quality indicators to obtain at least one reference service combination; and construct a reference service combination collection according to the at least one reference service combination.
[0123] In an embodiment, the collection updating module 13 is further configured to perform reflection processing on at least one standard service combination in the standard service combination collection according to a preset reflection coefficient to update the standard service combination collection; perform expansion processing on at least one standard service combination in the updated standard service combination collection according to a preset expansion coefficient to update the standard service combination collection again; and the preset reflection coefficient is less than the preset expansion coefficient.
[0124] In an embodiment, the collection updating module 13 is further configured to take a standard service combination with the minimum combination evaluation value in the standard service combination collection as a worst point; determine a barycenter point of all standard service combinations in the standard service combination collection except the standard service combination corresponding to the worst point; determine a reflection point in the standard service combination collection according to a preset reflection coefficient, the worst point and the barycenter point; and in a case where a combination evaluation value corresponding to the reflection point is less than a combination evaluation value corresponding to the worst point, replace the worst point with the reflection point to update the standard service combination collection.
[0125] The above modules in the service combination apparatus can be realized by software, hardware and combinations thereof in whole or in part. The above modules can be embedded in or independent of a processor in a computer device in hardware form, or stored in a memory in a computer device in software form to be called and executed by a processor to perform operations corresponding to the above modules.
[0126] In an exemplary embodiment, a computer device, which can be a server, is provided, and an internal structure diagram of the computer device can be as shown in FIG. 1. Figure 5As shown in the figure. The computer device includes a processor, a memory, an input / output interface (I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through the system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control ability. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals through network connection. The computer program is executed by the processor to implement a service combination method.
[0127] In an exemplary embodiment, a computer device is provided, which can be a terminal, and its internal structure diagram can be as shown in the figure. Figure 6 As shown in the figure. The computer device includes a processor, a memory, an input / output interface (I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through the system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control ability. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner, and the wireless manner can be realized through WIFI, mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by the processor to implement a service combination method. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the computer device, or an external keyboard, touchpad or mouse, etc.
[0128] Those skilled in the art can understand that, Figure 5 and Figure 6The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0129] In an embodiment, a computer device is also provided, including a memory and a processor, the memory storing a computer program, and the processor implementing the steps in the above method embodiments when executing the computer program.
[0130] In an embodiment, a computer readable storage medium is provided, storing a computer program, and the computer program implementing the steps in the above method embodiments when executed by a processor.
[0131] In an embodiment, a computer program product is provided, including a computer program, and the computer program implementing the steps in the above method embodiments when executed by a processor.
[0132] It should be noted that the data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data need to comply with relevant regulations.
[0133] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.
[0134] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.
[0135] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of protection of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A service composition method, characterized in that, The method includes: Obtain a set of reference service combinations; the set of reference service combinations includes at least one reference service combination; the reference service combination is used to meet preset Web Service requirements; Based on a genetic algorithm, the selection status of each reference service in the reference service portfolio is adjusted to update the reference service portfolio set; Based on the combined evaluation values of each reference service combination in the updated set of reference service combinations, at least one reference service combination is selected to construct a standard service combination set; the combined evaluation value of the reference service combination is determined based on the service quality indicators of each reference service in the reference service combination. The worst-case scenario is the standard service combination with the smallest combined evaluation value in the set of standard service combinations. Determine the centroid of all standard service portfolios in the standard service portfolio set except for the standard service portfolio corresponding to the worst point; Based on the preset reflection coefficient, the worst point, and the centroid, the reflection point in the standard service combination set is determined; If the combined evaluation value corresponding to the reflection point is less than the combined evaluation value corresponding to the worst point, the reflection point is used to replace the worst point to update the standard service combination set. Based on a preset expansion coefficient, at least one standard service combination in the updated set of standard service combinations is expanded to update the set of standard service combinations again; the preset reflection coefficient is less than the preset expansion coefficient. Select the standard service combination with the smallest combination evaluation value from the updated set of standard combinations as the target service combination.
2. The method according to claim 1, characterized in that, The set of reference service combinations includes: Obtain at least one initial service, and each initial service quality indicator corresponding to each initial service; For each initial service quality index, the initial services under the initial service quality index are clustered to obtain at least one initial service tier under the initial service quality index; the initial service tier includes at least one initial service; the order of the initial service tiers is negatively correlated with the mean of the service quality index corresponding to each initial service in the initial service tier. Based on the preset Web service requirements, select at least one target service quality indicator from each initial service quality indicator; Based on the initial services of the first initial service tier under each target service quality indicator, construct a reference service portfolio set.
3. The method according to claim 2, characterized in that, The step of clustering the initial services under the initial service quality index to obtain at least one initial service tier under the initial service quality index includes: Based on the distance between each initial service and the corresponding center point of other initial services, determine the initial cluster to which each initial service belongs and the number of clusters of the initial cluster; Based on the number of clusters, each initial service under the initial service quality index is clustered to obtain at least one initial service echelon under the initial service quality index.
4. The method according to claim 3, characterized in that, The step of determining the initial cluster to which each initial service belongs and the number of clusters of each initial cluster based on the distance between the corresponding centroids of each initial service and other initial services includes: For each initial service, determine the distance between the center point corresponding to the initial service and other initial services; If the distance is less than the first distance threshold, then the initial service is determined to belong to the initial cluster; If the distance is greater than a first distance threshold and less than a second distance threshold, then the initial service is deleted; If the distance is greater than the second distance threshold, a new initial cluster is generated, and the initial service is added to the new initial cluster.
5. The method according to claim 2, characterized in that, The step of determining a reference service combination set based on the initial services of the first initial service tier under each target service quality indicator includes: For each target service quality indicator, select initial services that meet the preset selection conditions from the initial service tier and use them as reference services corresponding to the target service quality indicator. The reference services corresponding to each target service quality indicator are combined to obtain at least one reference service combination; Construct a reference service portfolio set based on at least one reference service portfolio.
6. A service combination device, characterized in that, The device includes: A collection acquisition module is used to acquire a reference service combination set; the reference service combination set includes at least one reference service combination; the reference service combination is used to meet preset Web Service requirements; The combination adjustment module is used to adjust the selection status of each reference service in the reference service combination based on a genetic algorithm, so as to update the reference service combination set; The combination selection module is used to select at least one reference service combination based on the combination evaluation value of each reference service combination in the updated reference service combination set, and construct a standard service combination set; the combination evaluation value of the reference service combination is determined based on the service quality index of each reference service in the reference service combination; The set update module is used to: identify the standard service combination with the smallest combined evaluation value in the standard service combination set as the worst point; determine the centroid of all standard service combinations in the standard service combination set except for the standard service combination corresponding to the worst point; determine the reflection point in the standard service combination set according to a preset reflection coefficient, the worst point, and the centroid; if the combined evaluation value corresponding to the reflection point is less than the combined evaluation value corresponding to the worst point, replace the worst point with the reflection point to update the standard service combination set; and expand at least one standard service combination in the updated standard service combination set according to a preset expansion coefficient to update the standard service combination set again; wherein the preset reflection coefficient is less than the preset expansion coefficient. The target selection module is used to select the standard service combination with the smallest combination evaluation value from the updated set of standard combinations as the target service combination.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Service combination optimization method based on NSGA-II and SSA
CN117195696A
Page loading method and system based on hybrid genetic algorithm
CN117762515A