CN115987954A - Method and device for determining Web service combined path and electronic equipment - Google Patents

Method and device for determining Web service combined path and electronic equipment Download PDF

Info

Publication number
CN115987954A
CN115987954A CN202211649211.9A CN202211649211A CN115987954A CN 115987954 A CN115987954 A CN 115987954A CN 202211649211 A CN202211649211 A CN 202211649211A CN 115987954 A CN115987954 A CN 115987954A
Authority
CN
China
Prior art keywords
determining
web service
function
fitness
service combination
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211649211.9A
Other languages
Chinese (zh)
Inventor
孙赟赟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN202211649211.9A priority Critical patent/CN115987954A/en
Publication of CN115987954A publication Critical patent/CN115987954A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses a method and a device for determining a Web service combined path and electronic equipment. Wherein, the method comprises the following steps: acquiring index parameters of service quality corresponding to Web services used by subtasks of a target task, and acquiring the number of user evaluation levels, wherein the user evaluation levels are used for expressing the satisfaction degree of a user on the Web services; determining a first function according to the index parameters and the number of the user evaluation levels, wherein the first function is used for expressing the relation between the service quality and the user satisfaction; and determining the first function as a fitness function of the bacterial foraging algorithm, solving the bacterial foraging algorithm, and determining an output result of the bacterial foraging algorithm as an optimal path of the Web service combination used by the target task. The method and the device solve the technical problem that the existing Web service combination based on the service quality only focuses on the objective characteristic of the Web service and cannot reflect the subjective satisfaction degree of a user to the service.

Description

Method and device for determining Web service combined path and electronic equipment
Technical Field
The application relates to the technical field of Web services, in particular to a method and a device for determining a Web service combined path and electronic equipment.
Background
With the continuous development of network technology and cloud computing technology, web services available for users to select are increased, and Web services with single functions cannot meet the complex requirements of users, so that the Web services with single functions need to be effectively combined through a certain method in a cloud computing environment to form a multifunctional multiplexing Web service. However, in the process of combining the Web services with single function, how to quickly and accurately find the corresponding service becomes a key problem to be paid attention to by technicians. At present, the combination of Web services based on Quality of Service (QoS) only focuses on the objective characteristics of the Web services, but cannot reflect the subjective satisfaction of users to the services.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the application provides a method and a device for determining a Web service combination path and electronic equipment, and aims to at least solve the technical problems that the existing Web service combination based on service quality only focuses on the objective characteristics of Web services and cannot reflect the subjective satisfaction degree of users to the services.
According to an aspect of an embodiment of the present application, a method for determining a Web service composition path is provided, including: acquiring index parameters of service quality corresponding to Web services used by subtasks of a target task, and acquiring the number of user evaluation levels, wherein the user evaluation levels are used for expressing the satisfaction degree of a user on the Web services; determining a first function according to the index parameters and the number of the user evaluation levels, wherein the first function is used for expressing the relation between the service quality and the user satisfaction; and determining the first function as a fitness function of the bacterial foraging algorithm, solving the bacterial foraging algorithm, and determining an output result of the bacterial foraging algorithm as an optimal path of a Web service combination used by the target task.
Optionally, determining a first function according to the index parameter and the number of user evaluation levels includes: determining a user evaluation factor according to the number of user evaluation levels and a normalization function, wherein the normalization function is used for performing normalization processing on the index parameters; determining the experience quality of each Web service according to the user evaluation factor and the index parameter; and determining a function value of a first function according to the experience quality of each Web service, wherein the first function is the target experience quality of a target Web service combination, and the target Web service combination is a group of service combinations determined by a plurality of Web services.
Optionally, the index parameters include a forward index parameter and a reverse index parameter; determining a user evaluation factor according to the number of the user evaluation grades and the normalization function, wherein the user evaluation factor comprises the following steps: determining a user evaluation factor according to the number of user evaluation levels and a first normalization function under the condition that the index parameter is a forward index parameter, wherein the first normalization function is determined by at least the difference between the value of the index parameter and the minimum value of the index parameter under the condition that the index parameter meets a first condition, and the value of the first normalization function is 1 under the condition that the index parameter meets a second condition; and under the condition that the index parameter is a reverse index parameter, determining a user evaluation factor according to the number of user evaluation levels and a second normalization function, wherein under the condition that the index parameter meets a first condition, the second normalization function is at least determined by the difference value between the maximum value of the index parameter and the value of the index parameter, and under the condition that the index parameter meets a second condition, the value of the second normalization function is 1.
Optionally, solving the bacterial foraging algorithm comprises: determining the total number of the Web service combinations, and determining the chemotaxis operation times, the replication operation times and the migration operation times corresponding to the target Web service combination; determining the fitness value of the target Web service combination according to the first function under the condition that the chemotaxis operation times corresponding to the target Web service combination are smaller than the preset chemotaxis times; determining that the target Web service combination enters the copying operation under the condition that the chemotaxis operation is executed on all the target Web service combinations and the copying operation times corresponding to the target Web service combinations are less than the preset copying times; after the copying operation of the target Web service combination is finished, determining that the target Web service combination enters a migration operation; and determining the output result of the bacterial foraging algorithm as the optimal path of the Web service combination under the condition that the migration operation times of the target Web service combination are greater than or equal to the preset migration operation times.
Optionally, after determining the fitness value of the target Web service combination according to the first function, the method further includes: determining a first fitness of a target Web service combination at a first position according to a first function, wherein the first position is the position where the Web service combination is located before moving along a random vector; determining a second fitness of the target Web service combination at a second position according to the first function, wherein the second position is the position where the Web service combination is located after moving along the random vector; and determining the operation of the target Web service combination according to the comparison result of the first fitness and the second fitness.
Optionally, determining an operation on the target Web service combination according to a comparison result of the first fitness and the second fitness, including: under the condition that the comparison result indicates that the first fitness is smaller than the second fitness, determining that the target Web service combination continues to move along the direction of the random vector; and in the case that the comparison result indicates that the first fitness is greater than the second fitness, determining that the target Web service combination moves along the reverse direction of the random vector.
Optionally, after determining that the target Web service combination enters the migration operation, the method further includes: determining the migration probability of the target Web service combination according to a migration probability formula, wherein the migration probability formula is determined by the original migration probability, the current fitness value of the Web service combination and the maximum value and the minimum value of the fitness values in the Web service combination; and determining that the target Web service combination executes chemotactic operation under the condition that the migration operation times of the target Web service combination are less than the preset migration operation times.
According to another aspect of the embodiments of the present application, there is also provided a device for determining a Web service combination path, including: the acquisition module is used for acquiring index parameters of service quality corresponding to the Web service used by the subtasks of the target task and acquiring the number of user evaluation levels, wherein the user evaluation levels are used for expressing the satisfaction degree of the user on the Web service; the determining module is used for determining a first function according to the index parameters and the number of the user evaluation levels, wherein the first function is used for expressing the relation between the service quality and the user satisfaction; and the solving module is used for determining the first function as a fitness function of the bacterial foraging algorithm, solving the bacterial foraging algorithm and determining an output result of the bacterial foraging algorithm as an optimal path of the Web service combination used by the target task.
According to another aspect of the embodiments of the present application, there is also provided an electronic device, including: a memory for storing program instructions; a processor coupled to the memory for executing program instructions that implement the functions of: acquiring index parameters of service quality corresponding to Web services used by subtasks of a target task, and acquiring the number of user evaluation levels, wherein the user evaluation levels are used for expressing the satisfaction degree of a user on the Web services; determining a first function according to the index parameters and the number of the user evaluation levels, wherein the first function is used for expressing the relation between the service quality and the user satisfaction; and determining the first function as a fitness function of the bacterial foraging algorithm, solving the bacterial foraging algorithm, and determining an output result of the bacterial foraging algorithm as an optimal path of the Web service combination used by the target task.
According to another aspect of the embodiments of the present application, a non-volatile storage medium is further provided, where the non-volatile storage medium includes a stored computer program, and a device in which the non-volatile storage medium is located executes the method for determining the Web service combination path by running the computer program.
In the embodiment of the application, index parameters of service quality corresponding to Web services used by subtasks of a target task are obtained, and the number of user evaluation levels is obtained, wherein the user evaluation levels are used for expressing the satisfaction degree of users on the Web services; determining a first function according to the index parameters and the number of the user evaluation levels, wherein the first function is used for expressing the relation between the service quality and the user satisfaction; the first function is determined as a fitness function of a bacterial foraging algorithm, the bacterial foraging algorithm is solved, an output result of the bacterial foraging algorithm is determined as an optimal path of a Web service combination used by a target task, and the purpose of optimizing the Web service combination path is achieved, so that the technical effect of improving the satisfaction degree of a user is achieved, and the technical problem that the objective characteristic of the Web service is only paid attention to by the Web service combination based on the service quality at present and the subjective satisfaction degree of the user to the service cannot be reflected is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a hardware block diagram of a computer terminal (or an electronic device) for implementing a method for determining a Web service combination path according to an embodiment of the present application;
FIG. 2 is a flowchart of a method for determining a Web service composition path according to an embodiment of the present application;
FIG. 3a is a schematic diagram of a sequential structure Web service composition model according to an embodiment of the present application;
FIG. 3b is a flow chart of a sequential structure according to an embodiment of the present application;
FIG. 3c is an exploded view of a complex task according to an embodiment of the present application;
fig. 4 is a block diagram of a determination apparatus of a Web service composition path according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be implemented in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
At present, the Web service combination based on the service quality only focuses on the objective characteristics of the Web service, but cannot reflect the subjective satisfaction degree of a user to the service. The Quality of Experience (QoE) -based Web service combination can associate QoS parameters reflecting the characteristics of the Web service with the user satisfaction, so that the non-functional characteristics of the Web service combination are optimized and the subjective Experience of the user is emphasized. The Web service combination problem is essentially the problem of finding the optimal combination, the main algorithm for solving the problem is an intelligent optimization algorithm, and the bacterial foraging algorithm is an intelligent bionic algorithm invented according to the chemotaxis, the reproduction and the dispersion of Escherichia coli in the biological intestinal tracts and the induction characteristics of biological populations. The traditional bacterial foraging algorithm has the advantages of high convergence rate, high precision and the like, but also has the defects of loss of excellent individuals and easy falling into local optimum due to the problem of population diversity.
In order to solve the above problems, embodiments of the present application provide corresponding solutions, which are described in detail below.
The method for determining the Web service combination path provided by the embodiment of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Fig. 1 shows a hardware configuration block diagram of a computer terminal (or electronic device) for implementing the determination method of the Web service composition path. As shown in fig. 1, the computer terminal 10 (or electronic device 10) may include one or more (shown as 102a, 102b, ... 102 n) processors (which may include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions. Besides, the method can also comprise the following steps: a display, an input/output interface (I/O interface), a Universal Serial Bus (USB) port (which may be included as one of the ports of the I/O interface), a network interface, a power source, and/or a camera. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the electronic device. For example, the computer terminal 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
It should be noted that the one or more processors and/or other data processing circuitry described above may be referred to generally herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part in software, hardware, firmware, or any combination thereof. Further, the data processing circuit may be a single stand-alone processing module, or incorporated in whole or in part into any of the other elements in the computer terminal 10 (or electronic device). As referred to in the embodiments of the application, the data processing circuit acts as a processor control (e.g. selection of a variable resistance termination path connected to the interface).
The memory 104 may be used to store software programs and modules of application software, such as program instructions/data storage devices corresponding to the determination method of the Web service combination path in the embodiment of the present application, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implements the determination method of the Web service combination path described above. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor, which may be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission module 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission module 106 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission module 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
The display may be, for example, a touch screen type Liquid Crystal Display (LCD) that may enable a user to interact with a user interface of the computer terminal 10 (or electronic device).
It should be noted that, in some alternative embodiments, the computer device (or electronic device) shown in fig. 1 may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that fig. 1 is only one example of a particular specific example and is intended to illustrate the types of components that may be present in the computer device (or electronic device) described above.
In the above operating environment, the embodiments of the present application provide an embodiment of a method for determining a Web service composition path, and it should be noted that the steps shown in the flowchart of the drawings may be executed in a computer system, such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown or described.
Fig. 2 is a flowchart of a method for determining a Web service composition path according to an embodiment of the present application, and as shown in fig. 2, the method includes the following steps:
step S202, acquiring index parameters of service quality corresponding to Web services used by subtasks of a target task, and acquiring the number of user evaluation levels, wherein the user evaluation levels are used for expressing the satisfaction degree of users to the Web services;
step S204, determining a first function according to the index parameters and the number of the user evaluation levels, wherein the first function is used for expressing the relation between the service quality and the user satisfaction;
and S206, determining the first function as a fitness function of the bacterial foraging algorithm, solving the bacterial foraging algorithm, and determining an output result of the bacterial foraging algorithm as an optimal path of the Web service combination used by the target task.
In the above steps S202 to S206, an evaluation factor is determined by establishing a relationship between index parameters (including response time, reliability, availability, and throughput) of the Web service and user satisfaction, the QoS-QoE model (i.e., the first function) is established by using the evaluation factor as a weight corresponding to a QoS index, the mathematical model is used as a fitness function of a bacterial foraging algorithm, and an optimal solution is found in a solution space by an improved bacterial foraging algorithm, that is, an optimal path of a Web service combination.
In the embodiment of the present application, the foregoing is explained by using a sequential structure Web service composition model diagram shown in fig. 3 a. In FIG. 3a, the complex task is decomposed into m subtasks, i.e. task 1, task 2, \ 8230in FIG. 3a, task m-1, task m, where the number of services that can be selected by each subtask in the service resource pool (including multiple service TS) is n, and then TS is obtained m,n Denotes the nth service in the mth service set, multiple TS in FIG. 3a m,n The dotted lines in between represent possible Web service combinations and the solid lines represent optimal Web service combinations.
In step S204 in the method for determining a Web service combination path, a first function is determined according to the index parameter and the number of user evaluation levels, and the method specifically includes the following steps: determining a user evaluation factor according to the number of user evaluation levels and a normalization function, wherein the normalization function is used for performing normalization processing on the index parameters; determining the experience quality of each Web service according to the user evaluation factor and the index parameter; and determining a function value of a first function according to the experience quality of each Web service, wherein the first function is the target experience quality of a target Web service combination, and the target Web service combination is a group of service combinations determined by a plurality of Web services.
In the above step, the index parameters include a forward index parameter and a reverse index parameter; determining a user evaluation factor according to the number of the user evaluation grades and the normalization function, and specifically comprising the following steps of: determining a user evaluation factor according to the number of user evaluation levels and a first normalization function under the condition that the index parameter is a forward index parameter, wherein the first normalization function is determined by at least the difference between the value of the index parameter and the minimum value of the index parameter under the condition that the index parameter meets a first condition, and the value of the first normalization function is 1 under the condition that the index parameter meets a second condition; and under the condition that the index parameter is a reverse index parameter, determining a user evaluation factor according to the number of user evaluation levels and a second normalization function, wherein under the condition that the index parameter meets a first condition, the second normalization function is at least determined by the difference value between the maximum value of the index parameter and the value of the index parameter, and under the condition that the index parameter meets a second condition, the value of the second normalization function is 1.
In the embodiment of the present application, determining the QoS-QoE correlation model (i.e., the first function) includes the following steps:
(1) Determining QoS parameters (i.e., the index parameters for the Web service described above)
There are many indexes related to the QoS of the Web service, but among them, an index that can greatly affect the user experience mainly has a response time Q rt Reliability Q cr Availability Q ab Throughput Q th And the like.
Response time Q rt : refers to the time T when the user sends a request s Time T of service reception r As shown in formula (1):
Q rt =T s +T r (1)
reliability Q cr : number of times N that the user successfully accesses the service s The ratio of the total number of accesses N to the service is shown in equation (2):
Figure BDA0004011196730000071
availability Q ab : finger service uptime T run Service interruption time T stop Service interruption repair time T re The relationship between them is shown in formula (3):
Figure BDA0004011196730000072
throughput Q th : number of virtual users N u The number of requests R sent by each user, and the time T used for performance test p The relationship between the three is shown in formula (4):
Figure BDA0004011196730000073
(2) QoS parameters under sequential structure
The basic structure of the cloud computing service includes a sequential structure, a parallel structure, a conditional structure, and a loop structure, and the parallel structure, the conditional structure, and the loop structure may be finally converted into the sequential structure, so that the embodiment of the present application focuses only on the sequential structure model, which is shown in fig. 3b as the sequential structure.
QoS parameter response time Q under sequential structure rt Reliability Q cr Availability Q ab And throughput Q th The calculation of (2) is shown in (5), (6), (7), and (8), respectively:
Figure BDA0004011196730000074
Figure BDA0004011196730000075
Figure BDA0004011196730000081
Q th (TS 1 …TS n )=min(Q th (TS i )) (8)
(3) Modeling
The user satisfaction is divided into 5 levels (i.e., the above-mentioned user evaluation levels) according to a Mean Opinion Score (MOS), each level corresponds to an evaluation factor interval, and the user evaluation correspondence factor interval is shown in table 1 below.
TABLE 1 evaluation factor intervals corresponding to user evaluations
User rating Interval of evaluation factor
Is very satisfactory (4,5]
Satisfaction (3,4]
In general (2,3]
Is not satisfied with (1,2]
Is very unsatisfactory (0,1]
User evaluation factor S fac The calculation is shown in the following formula (9):
S fac =l fac -(l fac -1)×nor(P Qos ) (9)
wherein l fac Indicates the number of rating levels (i.e., the number of user rating levels), P Qos The evaluation factor calculated for the control of the corresponding QoS parameter value (i.e., the index parameter) is set to [0,5 ]]In the interval range of (1), i.e., the value range of the formula (9) is [0,5 ]],P Qos Value of (A) needsNormalization processing is performed to normalize the function nor (P) Qos ):
Figure BDA0004011196730000082
Figure BDA0004011196730000083
Since the QoS index is divided into a forward index (i.e., the forward index parameter) and a reverse index (i.e., the reverse index parameter), reliability, feasibility, and throughput are forward indexes, and response time is a reverse index. Therefore, in the normalization process, the forward index is calculated using equation (10) (i.e., the first normalization function), and the backward index is normalized using equation (11) (i.e., the second normalization function). max (P) Qos )≠min(P Qos ) Max (P) as the first condition Qos )=min(P Qos ) Max (P) being the above-mentioned second condition Qos ) Represents the maximum value of the index parameter, min (P) Qos ) Represents the minimum value of the index parameter.
The quantized QoE computation model for a single service (i.e., the quality of experience of each Web service) is:
Figure BDA0004011196730000091
wherein N is Qos Indicating the number of corresponding QoS parameters, S (fac,i) Indicates the evaluation factor, Q, corresponding to the ith QoS parameter Qos Indicating the corresponding QoS parameter value (i.e. P above) Qos )。
According to the QoE model, it may be determined that QoE (i.e., the first function) calculation expressions corresponding to m services are:
Figure BDA0004011196730000092
QoE of formula (13) m QoE value representing a set of Web service combinationsWherein Q is (Qos,i,j) Indicating the ith QoS parameter corresponding to the jth service. The remaining parameters are described in equation (12), and are not described in detail herein. And (3) taking the function (13) as a fitness function for improving the bacterial foraging algorithm.
In step S206 of the method for determining a Web service combined path, solving a bacterial foraging algorithm specifically includes the following steps: determining the total number of the Web service combinations, and determining the chemotaxis operation times, the replication operation times and the migration operation times corresponding to the target Web service combinations; determining the fitness value of the target Web service combination according to the first function under the condition that the chemotaxis operation times corresponding to the target Web service combination are smaller than the preset chemotaxis times; determining that the target Web service combination enters the copying operation under the condition that the chemotaxis operation is executed on all the target Web service combinations and the copying operation times corresponding to the target Web service combinations are less than the preset copying times; after the copying operation of the target Web service combination is finished, determining that the target Web service combination enters a migration operation; and determining the output result of the bacterial foraging algorithm as the optimal path of the Web service combination under the condition that the migration operation times of the target Web service combination are greater than or equal to the preset migration operation times.
After determining the fitness value of the target Web service combination according to the first function in the above step, the method further includes the following steps: determining a first fitness of a target Web service combination at a first position according to a first function, wherein the first position is the position where the Web service combination is located before moving along a random vector; determining a second fitness of the target Web service combination at a second position according to the first function, wherein the second position is the position where the Web service combination is located after moving along the random vector; and determining the operation of the target Web service combination according to the comparison result of the first fitness and the second fitness.
In the above step, determining an operation on the target Web service combination according to the comparison result of the first fitness and the second fitness, specifically including the following steps: under the condition that the comparison result indicates that the first fitness is smaller than the second fitness, determining that the target Web service combination continues to move along the direction of the random vector; and determining that the target Web service combination moves along the opposite direction of the random vector in the case that the comparison result indicates that the first fitness is greater than the second fitness.
In the above step, after determining that the target Web service combination enters the migration operation, the method further includes the following steps: determining the migration probability of the target Web service combination according to a migration probability formula, wherein the migration probability formula is determined by the original migration probability, the current fitness value of the Web service combination and the maximum value and the minimum value of the fitness values in the Web service combination; and determining that the target Web service combination executes chemotaxis operation under the condition that the migration operation times of the target Web service combination are less than the preset migration operation times.
In the embodiment of the application, the bacterial foraging algorithm is improved as follows:
(1) Improvements in chemotactic operations
The step size of the chemotactic operation determines the accuracy of the algorithmic search. Each bacterium has a fitness value at the corresponding position, and when the count value of the chemotaxis operation is increased, the fitness values of all the bacteria are calculated and averaged. When the fitness value of the bacterial individual is not larger than the average value, a certain distance still exists between the bacterial individual and the optimal solution, and the original moving step length is kept for continuous searching; if the fitness value of the individual bacteria is larger than the average value, the individual bacteria is indicated to be in a region with more food and gradually approaches to the optimal solution. At this time, in order to avoid missing the optimal position due to the over-step of the individual bacteria, the walking step of the bacteria needs to be correspondingly reduced. The calculation formula of the moving step length is shown as a formula (14), and the moving step length which is in accordance with each bacterium is automatically set according to the fitness value of each bacterium individual.
Figure BDA0004011196730000101
J, k, l in the equation represent the number of chemotactic operations, the number of replication operations and the number of migration operations, C i Denotes the step size of the movement of the i-th bacterium, Q i Is the fitness value, Q, of bacterium i op Is all thinOptimum value among fitness values of individual bacteria, Q wo Is the worst value among all bacterial fitness values.
(2) Improvements in or relating to migratory operations
In the migration operation stage, a standard bacterial foraging algorithm sets a fixed and invariable migration probability Ped for a bacterial colony, and all bacterial individuals perform area search according to the probability. That is to say, when the migration probability Ped is not less than the value randomly generated by the individual bacteria, the individual bacteria perform the migration operation, which can not only ensure that the bacterial foraging algorithm avoids getting into the local optimum, but also ensure the global optimizing capability of the individual bacteria. However, the migration probability setting rule of the standard algorithm also affects the bacteria individuals which are originally near the global optimal solution, that is, the bacteria individuals with higher fitness values are migrated away from the global optimal solution due to the small generated random number and finally eliminated, so that the loss of excellent individuals is caused, and the performance of the algorithm is reduced.
The migration probability obtained from the migration operation of the standard algorithm can be obtained through the fitness value of the bacteria individual, and the two are in inverse proportion relation, namely the higher the fitness value of the bacteria is, the smaller the possibility of being migrated is; conversely, the lower the fitness value, the greater the likelihood of performing a migration operation. In order to avoid the loss of excellent individuals, the migration probability of each bacterium is changed along with the change of the fitness value of each bacterium, and then the migration probability of the bacterium i is expressed as follows:
Figure BDA0004011196730000102
p in formula (15) i The migration probability, Q, of the individual bacteria i max Is the maximum value of the fitness value in the individual bacterium, Q min Minimum value of fitness value in individual bacteria, Q i Is the current fitness value, P, of the individual bacterium i ed The migration probability is the original migration probability. Thus, good individuals are distinguished from bad individuals, and the diversity of bacterial populations is ensured.
The above process is explained in detail according to the following specific examples:
1. complex task decomposition
Detailed description of complex tasks: the current mature internet service and multimedia interaction technology are fully utilized, a fusion alarm receiving platform is built, and the problems that an alarm person is not easy to find, the position is not accurate, the alarm description is fuzzy and the like in the traditional telephone alarm mode are solved.
(1) Complex task decomposition
The above complex task is broken down into the following subtasks: subtask T 1 : accurately mastering the position of an alarm person; subtask T 2 : visually perceiving the scene of the police condition; subtask T 3 : and (5) rapidly dispatching police strength.
(2) Sub-task decomposition
And respectively decomposing the subtasks into tasks with single functions again: subtask T 1 Decomposable into alarm position location TS 1 Alarm information pushing TS 2 (ii) a Subtask T 2 Decomposed into picture and text alarm TS 3 Video alarm TS 4 Voice alarm TS 5 (ii) a Subtask T 3 Decomposed into short message notification TS 6 Police force scheduling TS 7 . The complex task decomposition corresponding to the above process is shown in fig. 3 c.
2. Data set sizing
Each sub-task which can not be decomposed provides 10 independent Web services, each Web service can reflect the service quality through indexes such as response time, reliability, availability, throughput and the like, the number of tasks can be determined to be 7 through the task decomposition and the service discovery, the number of alternative services of each task is 10, and the QoS index of each service is response time, availability, reliability and throughput.
3. Service composition problem mapping
The above steps were used to determine the size of 7 x 10 data set, 10 for this data set 7 Different Web combination (namely the mode of determining the total number of the Web service combinations) are adopted, so that the Web service combination optimization problem can be converted into a maximized mathematical problem, the improved bacterial foraging algorithm is adopted, the bacterial population represents the whole solution space, and each bacterial individual tableShown as one solution in the solution space, i.e., one combined path in the Web service combination, and the fitness function value is the value of QoE in each combined service path.
4. Algorithm implementation step
(1) And initializing algorithm parameters. Setting a bacterial population S; a swimming initial step length C of the chemotaxis operation; maximum number of swimming steps N s (ii) a The maximum migration operation frequency (i.e. the preset migration operation frequency) N ed (ii) a The maximum number of copies (i.e., the above-mentioned predetermined number of copies) N re (ii) a The maximum number of trending operations (i.e., the above-mentioned preset number of trending operations) N c The initial values of the number j of chemotaxis operations, the number k of replication operations and the number l of migration operations are 0.
(2) Chemotaxis operation: a chemotaxis operation counter j, j = j +1 after each chemotaxis operation performed by the individual bacteria, and the number of chemotaxis operations j is less than the maximum number of chemotaxis operations N c At the time, each individual bacterium does the following two things:
swimming: firstly, calculating the fitness value (i.e. the first fitness) of the initial position (i.e. the first position) of the individual bacteria through the formula (13), then moving the bacteria one step along the direction of the random vector Δ (i), calculating the fitness value (i.e. the second fitness) of the current position (i.e. the second position) again, comparing the fitness values before and after moving, and if the fitness value increases, continuing to keep moving in the direction (i.e. if the first fitness is smaller than the second fitness, determining that the target Web service combination continues to move along the direction of the random vector).
Turning: if the fitness value is reduced compared with the fitness value before moving, the bacteria roll over (i.e. in the case that the first fitness is larger than the second fitness, the target Web service combination is determined to move along the reverse direction of the random vector).
(3) After chemotaxis operation is performed on the whole bacterial population, if the number k of the replication operation is less than the maximum number N of the replication operation re And then the bacterial individuals enter into the replication operation. Otherwise, returning to the step 2 to continue the chemotaxis operation.
(4) If the copy operation ends, a migrate operation is started. When the bacteria satisfy the condition of migration operation, according to the formula (15)And calculating the migration probability of the current individual, and killing the bacteria individual when the generated random number is smaller than the migration probability so as to ensure that the diversity of the bacteria population randomly generates one bacteria individual. If the migration frequency l is less than the maximum migration operation frequency N ed Then go back to step 2 to continue the chemotaxis operation. Otherwise, ending the operation, and outputting the optimal solution, namely the optimal path of the Web service combination.
Fig. 4 is a block diagram of an apparatus for determining a Web service composition path according to an embodiment of the present application, and as shown in fig. 4, the apparatus includes:
an obtaining module 402, configured to obtain an index parameter of service quality corresponding to a Web service used by a subtask of a target task, and obtain a number of user evaluation levels, where the user evaluation levels are used to indicate satisfaction of a user on the Web service;
a determining module 404, configured to determine a first function according to the index parameter and the number of user evaluation levels, where the first function is used to represent a relationship between service quality and user satisfaction;
and the solving module 406 is configured to determine the first function as a fitness function of the bacterial foraging algorithm, solve the bacterial foraging algorithm, and determine an output result of the bacterial foraging algorithm as an optimal path of the Web service combination used by the target task.
In the determining module of the apparatus for determining a Web service combination path, the determining a first function according to the index parameter and the number of user evaluation levels specifically includes the following steps: determining a user evaluation factor according to the number of user evaluation levels and a normalization function, wherein the normalization function is used for performing normalization processing on the index parameters; determining the experience quality of each Web service according to the user evaluation factor and the index parameter; and determining a function value of a first function according to the experience quality of each Web service, wherein the first function is the target experience quality of a target Web service combination, and the target Web service combination is a group of service combinations determined by a plurality of Web services.
In a determining module in the apparatus for determining a Web service combination path, the index parameters include a forward index parameter and a reverse index parameter; determining a user evaluation factor according to the number of the user evaluation grades and the normalization function, and specifically comprising the following processes: determining a user evaluation factor according to the number of user evaluation levels and a first normalization function under the condition that the index parameter is a forward index parameter, wherein the first normalization function is determined by at least the difference value between the value of the index parameter and the minimum value of the index parameter under the condition that the index parameter meets a first condition, and the value of the first normalization function is 1 under the condition that the index parameter meets a second condition; and under the condition that the index parameter is a reverse index parameter, determining a user evaluation factor according to the number of user evaluation levels and a second normalization function, wherein under the condition that the index parameter meets a first condition, the second normalization function is at least determined by the difference value of the maximum value of the index parameter and the value of the index parameter, and under the condition that the index parameter meets a second condition, the value of the second normalization function is 1.
In a solving module in the device for determining the Web service combined path, solving a bacterial foraging algorithm specifically includes the following processes: determining the total number of the Web service combinations, and determining the chemotaxis operation times, the replication operation times and the migration operation times corresponding to the target Web service combinations; determining the fitness value of the target Web service combination according to the first function under the condition that the chemotaxis operation times corresponding to the target Web service combination are smaller than the preset chemotaxis times; determining that the target Web service combination enters the copying operation under the condition that the chemotaxis operation is executed on all the target Web service combinations and the copying operation times corresponding to the target Web service combinations are less than the preset copying times; after the copying operation of the target Web service combination is finished, determining that the target Web service combination enters a migration operation; and determining the output result of the bacterial foraging algorithm as the optimal path of the Web service combination under the condition that the migration operation times of the target Web service combination are greater than or equal to the preset migration operation times.
In a solving module in the device for determining the path of the Web service combination, after determining the fitness value of the target Web service combination according to the first function, the solving module is further configured to determine a first fitness of the target Web service combination at a first position according to the first function, where the first position is a position where the Web service combination is located before moving along the random vector; determining a second fitness of the target Web service combination at a second position according to the first function, wherein the second position is the position where the Web service combination is located after moving along the random vector; and determining the operation of the target Web service combination according to the comparison result of the first fitness and the second fitness.
In the solution module in the apparatus for determining a Web service combination path, determining an operation on a target Web service combination according to a comparison result of the first fitness and the second fitness, specifically including the following steps: under the condition that the comparison result indicates that the first fitness is smaller than the second fitness, determining that the target Web service combination continues to move along the direction of the random vector; and determining that the target Web service combination moves along the opposite direction of the random vector in the case that the comparison result indicates that the first fitness is greater than the second fitness.
After determining that the target Web service combination enters migration operation, a solving module in the device for determining the Web service combination path is further used for determining the migration probability of the target Web service combination according to a migration probability formula, wherein the migration probability formula is determined by the original migration probability, the current fitness value of the Web service combination, and the maximum value and the minimum value of the fitness values in the Web service combination; and determining that the target Web service combination executes chemotactic operation under the condition that the migration operation times of the target Web service combination are less than the preset migration operation times.
It should be noted that the determining apparatus of the Web service combination path shown in fig. 4 is configured to execute the determining method of the Web service combination path shown in fig. 2, and therefore, the related explanation in the determining method of the Web service combination path is also applicable to the determining apparatus of the Web service combination path, and is not described herein again.
The embodiment of the present application further provides a nonvolatile storage medium, where the nonvolatile storage medium includes a stored computer program, and a device where the nonvolatile storage medium is located executes the following method for determining a Web service combination path by running the computer program: acquiring index parameters of service quality corresponding to Web services used by subtasks of a target task, and acquiring the number of user evaluation levels, wherein the user evaluation levels are used for expressing the satisfaction degree of a user on the Web services; determining a first function according to the index parameters and the number of the user evaluation levels, wherein the first function is used for expressing the relation between the service quality and the user satisfaction degree; and determining the first function as a fitness function of the bacterial foraging algorithm, solving the bacterial foraging algorithm, and determining an output result of the bacterial foraging algorithm as an optimal path of the Web service combination used by the target task.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
In the embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to the related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, and various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present application and it should be noted that, as will be apparent to those skilled in the art, numerous modifications and adaptations can be made without departing from the principles of the present application and such modifications and adaptations are intended to be considered within the scope of the present application.

Claims (10)

1. A method for determining a Web service composite path is characterized by comprising the following steps:
acquiring index parameters of service quality corresponding to Web services used by subtasks of a target task, and acquiring the number of user evaluation levels, wherein the user evaluation levels are used for expressing the satisfaction degree of a user on the Web services;
determining a first function according to the index parameter and the number of the user evaluation levels, wherein the first function is used for expressing the relation between the service quality and the user satisfaction;
and determining the first function as a fitness function of the bacterial foraging algorithm, solving the bacterial foraging algorithm, and determining an output result of the bacterial foraging algorithm as an optimal path of the Web service combination used by the target task.
2. The method of claim 1, wherein determining a first function as a function of the indicator parameter and the number of user ratings comprises:
determining a user evaluation factor according to the number of the user evaluation levels and a normalization function, wherein the normalization function is used for performing normalization processing on the index parameter;
determining the experience quality of each Web service according to the user evaluation factor and the index parameter;
and determining a function value of the first function according to the experience quality of each Web service, wherein the first function is the target experience quality of a target Web service combination, and the target Web service combination is a group of service combinations determined by a plurality of Web services.
3. The method of claim 2, wherein the metric parameters include a forward metric parameter and a reverse metric parameter; determining a user evaluation factor according to the number of the user evaluation grades and the normalization function, wherein the user evaluation factor comprises the following steps:
determining the user evaluation factor according to the number of the user evaluation levels and a first normalization function when the index parameter is the forward index parameter, wherein the first normalization function is determined by at least a difference between a value of the index parameter and a minimum value of the index parameter when the index parameter satisfies a first condition, and the first normalization function has a value of 1 when the index parameter satisfies a second condition;
and determining the user evaluation factor according to the number of the user evaluation levels and a second normalization function when the index parameter is the reverse index parameter, wherein the second normalization function is determined by at least a difference between a maximum value of the index parameter and a value of the index parameter when the index parameter satisfies the first condition, and the second normalization function has a value of 1 when the index parameter satisfies the second condition.
4. The method of claim 1, wherein solving the bacterial foraging algorithm comprises:
determining the total number of the Web service combinations, and determining the chemotaxis operation times, the replication operation times and the migration operation times corresponding to the target Web service combinations;
determining the fitness value of the target Web service combination according to the first function under the condition that the chemotaxis operation times corresponding to the target Web service combination are smaller than the preset chemotaxis times;
determining that the target Web service combination enters into a copying operation under the condition that the chemotaxis operation is executed by the target Web service combination and the copying operation frequency corresponding to the target Web service combination is less than a preset copying frequency;
after the copying operation of the target Web service combination is finished, determining that the target Web service combination enters a migration operation;
and determining the output result of the bacterial foraging algorithm as the optimal path of the Web service combination under the condition that the migration operation times of the target Web service combination are greater than or equal to the preset migration operation times.
5. The method of claim 4, wherein after determining the fitness value for the target combination of Web services according to the first function, the method further comprises:
determining a first fitness of the target Web service combination at a first position according to the first function, wherein the first position is the position where the Web service combination is located before moving along a random vector;
determining a second fitness of the target Web service combination at a second position according to the first function, wherein the second position is the position where the Web service combination is located after moving along the random vector;
and determining the operation of the target Web service combination according to the comparison result of the first fitness and the second fitness.
6. The method of claim 5, wherein determining the operation on the target combination of Web services according to the comparison result of the first fitness and the second fitness comprises:
determining that the target Web service combination continues to move along the direction of the random vector under the condition that the comparison result indicates that the first fitness is smaller than the second fitness;
and determining that the target Web service combination moves along the reverse direction of the random vector under the condition that the comparison result indicates that the first fitness is greater than the second fitness.
7. The method of claim 4, wherein after determining that the target combination of Web services enters a migration operation, the method further comprises:
determining the migration probability of the target Web service combination according to a migration probability formula, wherein the migration probability formula is determined by an original migration probability, the current fitness value of the Web service combination and the maximum value and the minimum value of the fitness values in the Web service combination;
and determining that the chemotaxis operation is executed by the target Web service combination under the condition that the migration operation frequency of the target Web service combination is less than the preset migration operation frequency.
8. An apparatus for determining a Web service composition path, comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring index parameters of service quality corresponding to Web services used by subtasks of a target task and acquiring the number of user evaluation levels, and the user evaluation levels are used for expressing the satisfaction degree of a user on the Web services;
a determining module, configured to determine a first function according to the index parameter and the number of the user evaluation levels, where the first function is used to represent a relationship between the service quality and the user satisfaction;
and the solving module is used for determining the first function as a fitness function of the bacterial foraging algorithm, solving the bacterial foraging algorithm, and determining an output result of the bacterial foraging algorithm as an optimal path of the Web service combination used by the target task.
9. An electronic device, comprising:
a memory for storing program instructions;
a processor coupled to the memory for executing program instructions that implement the functions of: acquiring index parameters of service quality corresponding to Web services used by subtasks of a target task, and acquiring the number of user evaluation levels, wherein the user evaluation levels are used for expressing the satisfaction degree of a user on the Web services; determining a first function according to the index parameter and the number of the user evaluation levels, wherein the first function is used for expressing the relation between the service quality and the user satisfaction; and determining the first function as a fitness function of a bacterial foraging algorithm, solving the bacterial foraging algorithm, and determining an output result of the bacterial foraging algorithm as an optimal path of the Web service combination used by the target task.
10. A non-volatile storage medium, comprising a stored computer program, wherein a device on which the non-volatile storage medium is located executes the method for determining a Web service composition path according to any one of claims 1 to 7 by executing the computer program.
CN202211649211.9A 2022-12-21 2022-12-21 Method and device for determining Web service combined path and electronic equipment Pending CN115987954A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211649211.9A CN115987954A (en) 2022-12-21 2022-12-21 Method and device for determining Web service combined path and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211649211.9A CN115987954A (en) 2022-12-21 2022-12-21 Method and device for determining Web service combined path and electronic equipment

Publications (1)

Publication Number Publication Date
CN115987954A true CN115987954A (en) 2023-04-18

Family

ID=85969402

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211649211.9A Pending CN115987954A (en) 2022-12-21 2022-12-21 Method and device for determining Web service combined path and electronic equipment

Country Status (1)

Country Link
CN (1) CN115987954A (en)

Similar Documents

Publication Publication Date Title
US8332418B1 (en) Collaborative filtering to match people
WO2017211259A1 (en) Method and apparatus for optimizing user credit score
US20100153181A1 (en) Systems and methods for providing information services
US20120130940A1 (en) Real-time analytics of streaming data
CN105574045B (en) Video recommendation method and server
CN104573109A (en) System, terminal and method for automatic recommendation based on group relation
CN105872837A (en) User recommendation method and device
WO2010021862A1 (en) Resource management of social network applications
US10992594B2 (en) Optimization of network resources
US11562433B1 (en) Monitored alerts
CN105791902B (en) User's recommended method and device
KR20050074441A (en) Mutual rating system, and terminal device and program for use in same system
KR101790788B1 (en) Collaborative networking with optimized inter-domain information quality assessment
CN102165441A (en) Method, system, and apparatus for ranking media sharing channels
US9553774B2 (en) Cost tracking for virtual control planes
US20140181278A1 (en) Virtual resource provider with virtual control planes
US9158821B1 (en) System and method for optimizing interactions between users in a network environment
CN109688217B (en) Message pushing method and device and electronic equipment
CN109525933B (en) Location privacy protection method and device
US20140280216A1 (en) Automated ranking of contributors to a knowledge base
CN111626864B (en) Information pushing method and device, storage medium and electronic device
CN115987954A (en) Method and device for determining Web service combined path and electronic equipment
CN116720592A (en) Federal learning model training method and device, nonvolatile storage medium and electronic equipment
CN113261022A (en) Computer-implemented communication of social media applications
US20160057088A1 (en) Method and apparatus for transmitting information

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination