Service combination method based on large language model
Through prompt integrated learning of decomposition prompt method and feedback reflection thought, combined with knowledge base enhancement, the problem of low performance and high cost of service composition method in complex task processing is solved, and the automation and consistency of large language model in service composition are realized. promote.
Patent Information
- Application Number
- CN202410849899.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2024-09-27
AI Technical Summary
Existing service composition methods have problems such as low performance when processing complex tasks, high cost of manually building prompts, and large language models that produce illusory facts and inconsistent knowledge during the reasoning process, making it difficult to effectively automate and adapt to diverse user needs.
A service composition method based on a large language model is designed. Complex tasks are decomposed into simple subtasks through the decomposition prompt method, and prompt integrated learning is used to reflect feedback thoughts to achieve automated optimization prompt construction. It is combined with the knowledge base to enhance prompts and reduce model inconsistencies. sex.
It achieves better semantic understanding and automated service composition, reduces the cost of manual intervention, and improves the quality and consistency, adaptability and efficiency of service composition.
Smart Images

Figure CN118709784A
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of natural language processing and service computing, and in particular relates to a service combination method based on a large language model. Background Art
[0002] Service composition is a task based on service computing and service architecture technology, which aims to combine multiple services in a specific order and logic to solve complex tasks that are difficult to handle with basic services. However, with the rapid increase in the number of services, users face many challenges in selecting services that suit their current needs from a wide variety of services. Traditional workflow-based, AI planning-based, semantic-based, and QoS-based service composition methods have limitations in handling complex tasks, understanding semantics, processing large-scale data, and adapting to diverse user needs. In contrast, the service composition method based on the large language model, with its powerful semantic understanding ability and autonomous learning ability, can better parse complex semantic information to realize the automated processing of service composition and flexibly meet diverse user needs.
[0003] The service composition method based on a large language model is a complex reasoning task. At present, the reasoning technology of large language models can be mainly divided into two categories: one is to add explanations to the training or fine-tune the pre-trained model, and the other is to better stimulate the reasoning ability of the large language model itself through appropriate prompts or prompt samples. However, the former is costly and usually requires full access to the model and gradient calculation, which is not easy to achieve in the current state-of-the-art large language models, such as GPT-4; the latter is not enough for the model to learn to perform all necessary reasoning steps when dealing with complex tasks, and it takes a lot of manpower to prepare a set of prompts in advance and conduct trial and error or pre-evaluation to ensure the quality of the prompts. In addition, large language models still have a tendency to generate hallucinations and inconsistent knowledge during the task processing process. Therefore, it is necessary to explore a more intelligent prompt construction paradigm and realize an automated and adaptive prompt optimization method to overcome the limitations of current large language models in complex reasoning tasks. Summary of the invention
[0004] To solve the above problems, the main purpose of the present invention is to provide a service composition method based on a large language model, which realizes the automatic construction and optimization of prompts through the decomposition prompt method, the enhancement of knowledge in the prompts, and a prompt integration learning method that integrates feedback reflection ideas, so as to effectively automate the complex service composition tasks.
[0005] To achieve the above object, the present invention provides the following technical solutions:
[0006] A service composition method based on a large language model is designed to be implemented with two modules: a prompt construction module M1 and a service composition process module M2, where:
[0007] The prompt building module M1 performs the following steps:
[0008] Step 1: Use the decomposition prompt method to construct prompts to decompose the complex task of service composition into simple subtasks linked in sequence, including four subtasks: demand decomposition, knowledge enhancement, service composition, and inspection and evaluation. Each subtask is solved by a large language model based on specific prompts.
[0009] Step 2: Use the feedback and reflection capabilities of the large language model to perform prompt integration learning to achieve automatic optimization of the prompts for each subtask in step 1;
[0010] The service combination process module M2 performs the following steps:
[0011] Step 3: Receive the user's input requirement information and execute each subtask in sequence according to the prompt sequence constructed in step 1;
[0012] Step 4: The large language model splits the user input requirements into multiple sub-requirements based on the automatically optimized requirement decomposition sub-task prompts. These sub-requirements themselves are indivisible and all sub-requirements together constitute the user's functional requirements;
[0013] Step 5: According to the sub-requirements, retrieve and analyze the knowledge base to obtain the candidate service set that can complete the sub-requirements and its related information, so as to enhance the knowledge in the service composition sub-task prompt and complete the knowledge enhancement sub-task;
[0014] Step 6: Use the service composition subtask prompts that have been automatically optimized and knowledge-enhanced to obtain the best service composition result based on the large language model;
[0015] Step 7: Based on the demand information input by the user, the service composition result is checked and evaluated using the large language model and the automatically optimized inspection and evaluation subtask prompts to determine whether the service composition subtask needs to be re-executed.
[0016] Compared with the existing service composition methods, the present invention uses a large language model to better understand the needs of users and parse complex semantic information, realizes automated service composition, and selects services that meet the needs and have good performance for users. In order to further inspire the reasoning ability of the large language model to improve the quality of service composition, in the prompt construction module M1, the present invention uses the decomposition prompt method to decompose complex tasks into simpler subtasks, and realizes the automatic optimization of each subtask prompt by integrating the prompt integration learning of feedback reflection ideas, so as to solve the problems of low performance in processing complex tasks and high cost of manually constructing prompts in prompt-based processing reasoning tasks. In the service composition process module M2, based on the prompts constructed by M1, the present invention sequentially completes the four subtasks of demand decomposition, knowledge enhancement, service composition, and inspection and evaluation. Among them, the knowledge enhancement subtask can use the external knowledge base to enhance the prompts and inject explicit knowledge into the large language model to reduce the tendency of the large language model to produce hallucination facts and inconsistent knowledge. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 This is a flow chart of the service combination method based on a large language model of the present invention;
[0018] Figure 2 A schematic diagram of the decomposition prompts for step 1.3;
[0019] Figure 3 Prompt optimization flow chart for step 2;
[0020] Figure 4 Build a flowchart for step 5 service knowledge graph. Specific implementation plan
[0021] The technical solution provided by the present application will be further described below in conjunction with specific embodiments and accompanying drawings. The advantages and features of the present application will become more apparent with the following description.
[0022] like Figure 1 As shown, the present invention aims to propose a service composition method based on a large language model, and designs two modules for implementation: a prompt construction module M1 and a service composition process module M2. The following are the specific implementation steps:
[0023] The prompt building module M1 performs the following steps:
[0024] Step 1: Use the decomposition prompt method to construct prompts to decompose the complex task of service composition into simple subtasks linked in sequence, namely, demand decomposition, knowledge enhancement, service composition, and inspection and evaluation. Each subtask can be solved by a large language model based on specific prompts, including:
[0025] Step 1.1: Clarify how to effectively decompose complex tasks into simpler subtasks. Based on the concept of service composition problem, complex tasks can be gradually decomposed into four subtasks: demand decomposition, knowledge enhancement, service composition, and inspection and evaluation, corresponding to steps 4, 5, 6, and 7 respectively.
[0026] Step 1.2: For each subtask, design a corresponding subtask handler to receive input and generate corresponding output. The handlers for the demand decomposition, service combination, and inspection and evaluation subtasks are large language models based on independent mind tree prompts, and the handler for the knowledge enhancement subtask is a module that interacts with the knowledge base API.
[0027] Step 1.3: If Figure 2 As shown in Figure 1, complex tasks and subtask handlers are combined by building decomposition hints to describe the process of solving complex tasks using these subtasks. Decomposition hints are custom handlers whose main function is to route data to corresponding processing modules according to specific rules or logic. In the hint, each subtask has a unique identifier, such as Figure 2 As shown, the demand decomposition subtask is [DECOMP], the knowledge enhancement subtask is [ENHAN], the service composition subtask is [COMPOS], and the inspection and evaluation subtask is [EVAL]. The decomposition prompt will determine the subtask to be called according to the identifier in the reasoning process, and send the current answer history to the specified subtask handler for processing. When the end identifier [EOS] is detected, the previous answer will be returned as the final result.
[0028] By using decomposition cues, complex tasks can be decomposed into simpler subtasks and each subtask can be solved using the corresponding subtask handler. This modular structure allows each cue to be optimized for a specific subtask and further decomposed if necessary.
[0029] Step 2: If Figure 3 As shown in the figure, the feedback and reflection capabilities of the large language model are used to perform prompt ensemble learning to achieve automatic optimization of the prompts for each subtask in step 1. Step 2 constructs a prompt set in an iterative manner, and each prompt is regarded as a weak learner. In each iteration, through the feedback prompt and reflection process, the large language model can understand the problems that the previous weak learner cannot solve, and generate new prompts to improve performance, thereby achieving automatic and adaptive optimization of the prompt set, including:
[0030] Step 2.1: Use the task history experience data as the training dataset D tr =∪ i {(x i ,y i)}, given a large language model M and an initial prompt p0, two types of prompt templates are defined: solving the prompt P solving and feedback prompts P feedback These two prompt templates are used in task solving and feedback processes respectively.
[0031] Among them, solving the prompt template P solving The composition includes:
[0032] (1) Problem description: clearly indicate the specific task to be solved, such as splitting the user's overall needs into multiple sub-needs and ensuring that each sub-need is indivisible and together constitutes the user's overall functional needs.
[0033] (2) Output format: Specify the structure and requirements of the output, such as a list of sub-requirements after the output is split. Each sub-requirement should have a clear description and remain logically consistent with the original requirement.
[0034] (3) Examples: Provide examples of input and output to better understand the problem and the intended solution.
[0035] Feedback Tips Template feedback The composition includes:
[0036] (1) Current prompt: Displays the currently used prompt p t , and sample information that caused the error: {error_info}.
[0037] (2) Feedback request: Request a number of reasons {num}, indicating that the current prompt may cause these examples to fail, and use specific tags <st>and <ed>Label each reason.
[0038] Step 2.2: Initialize sample weights And the prompt set P gives equal weight to each sample in the training data set, so that each sample has the same influence on the training of the model in the initial state.
[0039]
[0040] in, is the weight of the i-th sample in the 0th iteration, |D tr | is the number of samples in the training data set.
[0041] Step 2.3: Start iterative training. If the number of iterations is greater than 0, that is, t is greater than 0, use the large language model M (hereinafter referred to as M) based on the reflection result R of the previous iteration t-1 Generate new prompt p t .
[0042] Step 2.4: Based on the current sample weight ω and the new prompt p t , a large language model M is used to solve sample tasks, and multiple answers are generated for the same task through a self-consistency mechanism. Then, the confidence score and final probability of the answer are calculated from the forward and backward directions using the bidirectional bagging method, and the answer with the highest probability is selected as the final result.
[0043]
[0044] in is the predicted answer, j and l are the indexes of the candidate answers, respectively, with F j and B j The corresponding confidence scores are named forward and backward. In the forward evaluation, M is needed to measure the confidence that the candidate answer j is the correct answer; for the backward evaluation, M reversely evaluates the confidence of whether to exclude the candidate answer j.
[0045] Step 2.5: Use the feedback prompt template and the wrong sample information to construct the feedback prompt, provide the feedback information to the large language model M for self-reflection and generate the reflection result R t , R t Can be used to generate new prompts for the next iteration.
[0046] During the optimization process, weak learners should pay more attention to difficult samples through weight allocation, and establish a feedback mechanism to transfer this weight allocation for difficult samples to natural language feedback. In this way, error information can be provided to the large language model M for reflection, and the solution of downstream tasks and the generation of prompts can be automatically optimized through the process of "feedback-reflection-improvement". Mathematically, this process can be described by Bayesian theory:
[0047] P(p t |X,Y,p t-1 )=P(R t |X,Y,p t-1 )·P(p t |R t )
[0048] Here R t It represents the reflection result of the large language model M at the tth iteration. It should be noted that the optimization process only modifies the instructions for solving the prompt, and the other parts remain unchanged.
[0049] Step 2.6: According to the overall performance, adjust the weight of each sample so that the wrong samples have higher weights in the next round of iterations in order to pay more attention to these difficult samples.
[0050] The weighted total error for t iterations is calculated as:
[0051]
[0052] Here I is the recognition function, and the hint weights for each iteration are updated based on the above error message:
[0053]
[0054] Finally, for the training data set D tr The sample weights in are updated, where is the index of the training instance:
[0055]
[0056] P=P∪p t ,R=R∪R t
[0057] Step 2.7: Repeat steps 2.3 to 2.6 until the number of iterations t is greater than N. When the iterations are completed, the optimized prompt set ∪ t {p t } and the prompt weight set ∪ t {λ t }, which can be applied through weighted decision making during the reasoning process. In addition, the reflection result set ∪ t {R t } provides rich interpretability for hint enhancement.
[0058] The iterative feedback mechanism and the cue weighted integration strategy can guide the optimization process of the cue so that the cue can better adapt to task requirements.
[0059] The service combination process module M2 performs the following steps:
[0060] Step 3: Receive the requirement information input by the user and execute each subtask in sequence according to the prompt sequence constructed in step 1.
[0061] Step 4: Use the large language model based on the automated optimized prompts to complete the demand decomposition subtask, that is, split the user input demand into multiple sub-requirements. These sub-requirements themselves cannot be divided any further and all sub-requirements together constitute the user's functional requirements.
[0062] Step 5 Figure 4 As shown in the figure): Using the top-down construction mode, a service knowledge graph is constructed based on the predefined ontology structure to retrieve the candidate service set that can complete the sub-requirement and its related information according to the sub-requirement content, thereby realizing the knowledge enhancement sub-task.
[0063] Step 5.1: In order to meet users' strict requirements for service quality, QoS is introduced based on OWL-S, and a service description framework is constructed for the construction of the basic ontology library of the service.
[0064] Services under the service description framework can be described by a tuple:
[0065] S=<Base,Qos>
[0066] Among them, Base represents the original three top-level ontology sets of Profile, Model, and Grounding in OWL-S; QoS represents the service quality indicator set of traffic information services.
[0067] Base includes the basic description of services in semantic contexts, business logic, and protocol specifications, which can be represented by triples:
[0068] Base=<Profile,model,grounding>
[0069] Among them, profile defines the functions of the service. Service discovery checks whether a satisfactory service can be found through the content provided by the profile. It mainly includes information such as ID, Name, Text, IPPR (Input, Output, Precondition, Result), etc.; model defines the process structure and interaction relationship of service function implementation; grounding defines the service's transmission protocol, data transmission format, network addressing, etc., and describes how the service should be called.
[0070] QoS attributes include a set of service quality indicators, which can be represented by a triple:
[0071] QoS=<reliability,response_time,cost>
[0072] Among them, reliability refers to the reliability of the service, which describes the probability that the service responds correctly within the normal response time range; response_time refers to the total time consumed from the user sending a request to the service returning a response result; cost refers to the total cost required from initiating to completing a service.
[0073] Step 5.2: If Figure 4 As shown, a top-down construction mode is used, with structured data as the source of knowledge base data, and the data is incorporated into the knowledge base according to the predefined ontology structure, which specifically includes the following steps:
[0074] Step 5.2.1: Obtain structured data and use the OWLS-TC4 dataset to build a service knowledge graph. This dataset describes services in OWL-S format, so the service data is relatively structured and complete. The service knowledge graph is represented by a triple <service, relationship, state>, i.e. G(S, R, T), where S = {s1, s2...s n } is a service set, R = {r1,r2...r h } is a set of service and state relationships, t={t1,t2...t m } is the set of input and output states. This knowledge graph can indirectly represent the relationship between services by maintaining states. Since the OWLS-TC4 dataset does not provide QoS data for services, the QoS attributes in the QWS service set are randomly mapped to the OWLS-TC4 dataset, and the parameters are gradually adjusted to meet the actual situation through a period of actual operation.
[0075] Step 5.2.2: Perform a conceptual comparison based on the service attributes in the dataset and the service ontology of the service description framework, extract the entities and attributes of each service, and form service facts.
[0076] Step 5.2.3: Compare the input / output attributes of the service fact with the concepts in the ontology library. If the same concept exists, search for the input and output status in the existing service knowledge graph. If found, connect the current service to the status; if not found, insert the service, status and the relationship between the two into the service knowledge graph. If the same concept does not exist, you need to first update the relevant ontology concepts according to the service description framework, insert the newly added ontology concepts into the service ontology library, and then perform the insertion operation.
[0077] Step 5.2.4: Based on the above steps, continuously update and improve the service knowledge graph so that it can accurately reflect the entities, attributes and relationships of the service.
[0078] Step 5.3: Retrieve the <service, relationship, status> triples related to the sub-requirements in the constructed service knowledge graph, and then convert these triples into text descriptions to form the background information of the service composition subtask and realize the knowledge enhancement of the prompt.
[0079] Step 6: Use the large language model and knowledge-enhanced and optimized prompts to complete the service composition subtask and obtain the best service composition result, including:
[0080] Step 6.1: The service composition subtask prompt is a mind tree prompt, and the large language model performs reasoning based on the prompt. The node task of the mind tree is to select a sub-requirement and select a service that can complete the requirement from the candidate service set of the sub-requirement.
[0081] Step 6.2: After completing each node task, you can use the thought generator to generate k candidate nodes based on the current state, and evaluate the candidate nodes through the state evaluator. The evaluation states include sure, likely, and impossible. Based on the evaluation results, select the most promising node as the next exploration object.
[0082] The above-mentioned thought generator and state evaluator are custom code programs, in which the thought generator generates k candidate nodes according to the current task status and context information after each node task is completed. These candidate nodes represent possible subsequent steps or subtasks, aiming to gradually decompose and solve complex service composition tasks. The state evaluator evaluates the candidate nodes generated by the thought generator. The evaluation criteria include three states: sure, indicating that the node is very likely to successfully complete the task; likely, indicating that the node has a certain probability of success; impossible, indicating that the node is unlikely to succeed. Based on these evaluation results, the most potential nodes are selected as the next exploration object to ensure the efficiency and accuracy of the service composition process.
[0083] Step 6.3: Take the selected node as the current state and add it to the collection. If the set step limit is reached or the problem cannot be solved from the current state, terminate the search; if the search terminates, backtrack to the previous state and continue to explore other possible paths.
[0084] Step 6.4: Return the final solution as output, the output format is a service set and service execution structure. Use specific marks or symbols to indicate the relationship between services, "→" indicates a sequential relationship, and "∥" indicates a parallel relationship.
[0085] Step 7: Based on the demand information input by the user, use the large language model to perform the inspection and evaluation subtask on the service composition result to determine whether the service composition subtask needs to be re-executed. If necessary, re-execute step 6 using the feedback information as part of the prompt, otherwise directly output the final result.
[0086] The above description is only a description of the preferred embodiments of the present application, and is not intended to limit the scope of the present application. Any changes or modifications made by any person skilled in the art based on the above disclosed technical contents shall be deemed as equivalent effective embodiments and shall fall within the scope of protection of the technical solution of the present application.< / ed> < / st>
Claims
1. A service composition method based on a large language model, characterized in that: Two modules are designed for implementation: prompt building module M1 and service composition process module M2, where: The prompt building module M1 performs the following steps: Step 1: Use the decomposition prompt method to construct prompts to decompose the complex task of service composition into simple subtasks linked in sequence, including four subtasks: demand decomposition, knowledge enhancement, service composition, and inspection and evaluation. Each subtask is solved by a large language model based on specific prompts. Step 2: Use the feedback and reflection capabilities of the large language model to perform prompt integration learning to achieve automatic optimization of the prompts for each subtask in step 1; The service combination process module M2 performs the following steps: Step 3: Receive the user's input requirement information and execute each subtask in sequence according to the prompt sequence constructed in step 1; Step 4: The large language model splits the user input requirements into multiple sub-requirements based on the automatically optimized requirement decomposition sub-task prompts. These sub-requirements themselves are indivisible and all sub-requirements together constitute the user's functional requirements; Step 5: According to the sub-requirements, retrieve and analyze the knowledge base to obtain the candidate service set that can complete the sub-requirements and its related information, so as to enhance the knowledge in the service composition sub-task prompt and complete the knowledge enhancement sub-task; Step 6: Use the service composition subtask prompts that have been automatically optimized and knowledge-enhanced to obtain the best service composition result based on the large language model; Step 7: Based on the demand information input by the user, the service composition result is checked and evaluated using the large language model and the automatically optimized inspection and evaluation subtask prompts to determine whether the service composition subtask needs to be re-executed.
2. A service composition method based on a large language model according to claim 1, characterized in that: The step 1 specifically includes: Step 1.1: Clarify how to effectively decompose complex tasks into simpler subtasks; based on the concept of service composition problem, gradually decompose the complex tasks into four subtasks: demand decomposition, knowledge enhancement, service composition, and inspection and evaluation, which correspond to steps 4, 5, 6, and 7 respectively; Step 1.2: For each subtask, design a corresponding subtask processing program to receive input and generate corresponding output; among them, the processing programs of the demand decomposition, service combination and inspection and evaluation subtasks are large language models based on independent thinking tree prompts, and the processing program of the knowledge enhancement subtask is a module that interacts with the knowledge base API; Step 1.3: Construct a decomposition hint that combines complex tasks and subtask handlers to describe the process of solving complex tasks using these subtasks; each subtask has a unique identifier, and during reasoning, the decomposition hint determines the subtask to be called based on the identifier in the hint and sends the current answer history to the specified subtask handler for processing; when the end identifier [EOS] is detected, the previous answer is returned as the final result.
3. The service composition method based on a large language model according to claim 1, characterized in that: The step 2 specifically includes: Step 2.1: Given a training dataset D tr =∪ i {(x i ,y i )}, a large language model M and an initial prompt p0, two types of prompt templates are defined: solving the prompt P s0lving and feedback prompts P feedback ,These two prompt templates are used for task solving and feedback processes, respectively; Step 2.2: Initialize sample weights And the prompt set P gives equal weight to each sample in the training data set, so that each sample has the same influence on the training of the model in the initial state: in, is the weight of the i-th sample in the 0th iteration, |D tr | is the number of samples in the training data set; Step 2.3: Treat each prompt as a weak learner in ensemble learning, and construct a prompt set through iterative optimization and prompt integration; in each round of iteration, the reflection result R obtained in the previous round will be used to t , using the large language model M to generate new prompts p t ; Step 2.4: Based on the current sample weight ω and the new prompt p t , using a large language model M to solve sample tasks, and generate multiple answers for the same task through a self-consistency mechanism; then, using the bidirectional bagging method to calculate the confidence score and final probability of the answer from both the forward and backward directions, and select the answer with the highest probability as the final result; in is the predicted answer, j and l are the indexes of the candidate answers, respectively, with F j and B j Name the corresponding confidence scores for forward and backward calculations; in the forward evaluation, M is needed to measure the confidence that candidate answer j is the correct answer; for the backward evaluation, M reversely evaluates whether to exclude the confidence of candidate answer j; Step 2.5: Use the feedback prompt template and the wrong sample information to construct the feedback prompt, provide the feedback information to the large language model M for self-reflection and generate the reflection result R t , R t Used to generate new prompts for the next iteration; Step 2.6: According to the overall performance, adjust the weight of each sample so that the wrong sample has a higher weight in the next round; Step 2.7: Repeat steps 2.3 to 2.6 until the number of iterations t is greater than N; when the iterations are completed, the optimized prompt set ∪ t {p t } and the prompt weight ∪ t {λ t }, which is applied via weighted decisions during inference.
4. The service composition method based on a large language model according to claim 1, characterized in that: The step 5 specifically includes: Step 5.1: Introduce QoS based on OWL-S and build a service description framework for the construction of the basic ontology library of services; the services under the service description framework are described by two tuples: S=<Base,Qos> Among them, Base represents the original three top-level ontology sets of Profile, Model, and Grounding in OWL-S; Qos represents the service quality indicator set of traffic information services; Step 5.2: Use the top-down construction mode, take structured data as the data source, and guide the data to be incorporated into the service knowledge graph according to the predefined ontology structure; Step 5.3: Retrieve the <service, relationship, status> triples related to the sub-requirements in the constructed service knowledge graph, and then convert these triples into text descriptions to form the background information of the service composition subtask and realize the knowledge enhancement of the prompt.
5. A service composition method based on a large language model according to claim 4, characterized in that: The step 5.2 specifically includes the following steps: Step 5.2.1: Obtain structured data and use the OWLS-TC4 dataset to build a service knowledge graph. This dataset describes services in OWL-S format, so the service data is relatively structured and complete. The service knowledge graph is represented by a triple <service, relationship, state>, i.e. G(S, R, T), where S = {s1, s2...s n } is a service set, R = {r1,r2...r h } is a set of service and state relationships, T = {t1, t2...t m } is a set of input and output states; this knowledge graph indirectly represents the relationship between services, which is achieved by maintaining the state; since the OWLS-TC4 dataset does not provide QoS data for services, the QoS attributes in the QWS service set will be randomly mapped to the OWLS-TC4 dataset, and the parameters will be gradually adjusted to meet the actual situation through a period of actual operation; Step 5.2.2: Based on the service attributes in the dataset and the service ontology of the service description framework, perform concept comparison, extract the entities and attributes of each service, and form service facts; Step 5.2.3: Compare the input / output attributes of the service fact with the concepts in the ontology library; if the same concepts exist, search for the input and output states in the existing service knowledge graph; if found, connect the current service with the state; if not found, insert the service, state and the relationship between the two into the service knowledge graph; if the same concepts do not exist, update the relevant ontology concepts according to the service description framework, insert the newly added ontology concepts into the service ontology library, and then perform the insertion operation; Step 5.2.4: Based on the above steps, continuously update and improve the service knowledge graph so that it can accurately reflect the entities, attributes and relationships of the service.
6. The service composition method based on a large language model according to claim 1, characterized in that: The step 6 specifically includes: Step 6.1: The service composition subtask prompt is a mind tree prompt, based on which the large language model performs reasoning; the node task of the mind tree is to select a sub-requirement and then select a service from the candidate service set of the sub-requirement; Step 6.2: After completing each node task, use the thought generator to generate k candidate nodes based on the current state, and evaluate the candidate nodes through the state evaluator. The evaluation states include sure, likely, and impossible. Based on the evaluation results, select the node with the most potential as the next exploration object; Step 6.3: Take the selected node as the current state and add it to the collection; if the set step limit is reached or the problem cannot be solved from the current state, terminate the search; if the search terminates, backtrack to the previous state and continue to explore other possible paths; Step 6.4: Return the final solution as output in the form of a service set and a service execution structure.
7. The service composition method based on a large language model according to claim 1, characterized in that: The step 7 specifically includes: based on the demand information input by the user, using the large language model to check and evaluate the service composition result, and determine whether it is necessary to re-execute the service composition subtask; if necessary, re-execute step 6 using the feedback information as part of the prompt, otherwise directly output the final result.
Citation Information
Cited By
Large-model-driven water conservancy one-picture application task execution method and device
CN118916946A
Intelligent model construction system supporting rule chain
CN119539084A
User comment fine-grained analysis method based on large language model
CN119760140A
Large language model driven flexible manufacturing system modularization intelligent programming method and system
CN119828616A
Large language model driven flexible manufacturing system componentized intelligent programming method and system
CN119828616B
