A virtual mapping method and system based on large model

By extracting key information through a large dialogue model, calculating service relevance through a large vector model, generating metrics through large text and code models, and employing the TOPSIS method, the service matching problem of large language models in virtual mapping is solved, realizing automated and customized virtual mapping and improving the accuracy and efficiency of mapping.

CN118733005BActive Publication Date: 2025-10-28ZHEJIANG UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410858977.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2025-10-28
Estimated Expiration
2044-06-28

AI Technical Summary

Technical Problem

Existing technologies for virtual mapping using large language models suffer from several drawbacks, including inaccurate service relevance filtering, inaccurate descriptions due to insufficient user expertise, lack of customization of user-defined target service metrics, and multi-objective problem-solving issues, all of which affect the accuracy and efficiency of the mapping.

Method used

By extracting key information points through dialogue with users using a large dialogue model, calculating service relevance using a large vector model, generating indicator descriptions by combining text and code large models, and solving for the optimal solution using the TOPSIS method, automated and customized virtual mapping is achieved.

Benefits of technology

It improves the accuracy and efficiency of virtual mapping, reduces the professional knowledge requirements of users, and enables automated and customized matching of services to meet individual needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733005B_ABST
    Figure CN118733005B_ABST
Patent Text Reader

Abstract

This invention discloses a virtual mapping method and system based on a large model, comprising the following steps: (1) using a dialogue large model to engage in dialogue with the user, extracting key information points needed to complete the virtual mapping through continuous dialogue, which serve as the description of the services required by the user; (2) calculating the correlation between all services provided by the system and the description of the services required by the user through a vector large model, thereby selecting the K most relevant services from all services as candidate services and placing them into a candidate service pool; (3) using a text large model and a code large model to generate an indicator set for each candidate service; (4) using the TOPSIS method in the indicator result set to solve for the optimal solution under multiple indicators, thereby completing the virtual mapping of the service. Using this invention, automated and customized virtual mapping can be achieved, while greatly reducing the requirement for users' professional knowledge.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of virtual mapping, and in particular relates to a virtual mapping method and system based on a large model. Background Technology

[0002] Virtual mapping is based on a dual-platform architecture. It uses a virtualization mapping mechanism between the resource platform and the application platform to form a modular resource mapping decision logic. The specific reference of resources is virtualized through various mapping mechanisms. It maps the calls to virtual resources exposed by the application platform. It supports the reduction of the complexity of real calls through logical calls as business modules change, and timely management of the attribute relationships of resources and applications.

[0003] By leveraging virtualized elastic collaborative mapping technology between resource and application platforms, virtual mapping relationships are formed between service resource addresses and service application addresses, virtual mapping tables between data pool data functions and data source transaction functions, and virtual mapping relationships between product calls and technology stack routing addresses, thus achieving matching between the "resource platform" and the "application platform." However, how to achieve efficient and accurate virtual mapping remains an important research topic.

[0004] Large language models (LLMs), such as LLma and other open-source models, possess hundreds of billions or even trillions of parameters. It is precisely this massive number of parameters that enables large models to excel in analytical reasoning capabilities and demonstrate extraordinary performance in areas such as text generation and code generation. Research indicates that large language models also possess emergent capabilities, one of which is in-context learning. This means that large language models can perform effective reasoning with only a small number of sample examples, without needing to adjust model weights in the process. Given the enormous potential of large language models in code understanding and various reasoning tasks, leveraging their contextual reasoning capabilities to implement virtual mapping tasks is feasible.

[0005] However, there are some challenges in using large models for virtual mapping, mainly in the following aspects:

[0006] 1. Since the resource platform provides a large number of services, if all of them are input into the large model, there will be a large number of obviously irrelevant services, which will affect the judgment of the large model. Therefore, a method is needed to filter in advance to obtain some relevant services, thereby improving the accuracy of mapping.

[0007] 2. Users may lack sufficient professional knowledge, which may lead to inaccurate or erroneous expressions, resulting in virtual mapping services not meeting the user's actual needs. Therefore, a method is needed to enable users who lack certain professional knowledge to accurately express the target services they need.

[0008] 3. User-defined target service metrics, although determined based on the current user's own needs, require a certain level of professional knowledge, so there may be omissions in user-defined target service metrics; system-defined metrics, on the other hand, cannot be determined based on the current user's own needs, and are generalized but lack customization; therefore, a large model with professional knowledge is needed to customize dynamic metrics for the current user's own needs.

[0009] 4. Since each candidate service has multiple metrics, the problem becomes a multi-objective problem, and a suitable method is needed to solve the multi-objective problem. Summary of the Invention

[0010] This invention provides a virtual mapping method and system based on a large model, which can realize automated and customized virtual mapping while greatly reducing the requirement for users' professional knowledge.

[0011] A virtual mapping method based on a large model includes the following steps:

[0012] (1) Use the large dialogue model to have a dialogue with the user, and extract the key information points needed to complete the virtual mapping through continuous dialogue, as a description of the service required by the user.

[0013] (2) Calculate the correlation between all services provided by the system and the service description required by the user through the vector large model, and select the K most relevant services as candidate services from all services and put them into the candidate service pool srvPool;

[0014] (3) Input the user’s required service description into the text big model to generate the indicator description LLM_Obj; input the indicator description LLM_Obj generated by the text big model, the user-defined indicator description User_Obj, and the description of a candidate service in the candidate service pool srvPool into the code big model to obtain the test code;

[0015] Iterate through each candidate service in the candidate service pool srvPool to obtain the test code corresponding to each candidate service; run each test code to obtain the test result LLM_Obj_Rst corresponding to LLM_Obj and the test result User_Obj_Rs corresponding to User_Obj;

[0016] By combining LLM_Obj_Rst, User_Obj_Rst, and the test result Sys_Obj_Rst of the system-defined metric Sys_Obj, the metric result set Obj for each candidate service in the candidate service pool srvPool is obtained.

[0017] (4) In the indicator result set Obj, the TOPSIS method is used to solve the optimal solution under multiple indicators, thereby completing the virtual mapping of the service.

[0018] In step (1), the key information points required to complete the virtual mapping include: service type, service functional requirements, budget range, service reliability requirements, service performance requirements, and service security requirements. Among them, the service functional requirements include: the specific functions and goals that users hope to achieve through the service, the service input, and the service output.

[0019] In step (1), the prompts input to the large dialogue model include both instructions and examples;

[0020] The instructions are written using a role-playing approach, requiring the large dialogue model to continuously extract key information points during conversations with users. If a key information point is not obtained, it must be obtained from the user through questioning. Once all key information points have been obtained, the conversation can end. The examples utilize the contextual reasoning ability of the large dialogue model, guiding it to learn how to extract key information points. This helps the large dialogue model learn which information in the user's answers should be judged as key information points, and then extracted and summarized.

[0021] In step (2), before calculating the relevance, it is necessary to convert the descriptions of all services provided by the system into the same format as the service descriptions required by the user.

[0022] The specific process of step (2) is as follows:

[0023] First, a vector model is used to transform all the services provided by the system and the descriptions of the services required by the user into vectors. Then, cosine similarity is used to automatically obtain the K candidate services that are most similar to the descriptions of the services required by the user, forming a candidate service pool srvPool.

[0024] In step (3), the system-defined metric Sys_Obj is an external factor that can be obtained without running code, including: price, service rating, number of users, and geographic coverage.

[0025] The specific process of step (4) is as follows:

[0026] The system submits the LLM_Obj metric description generated by the large text model, the User_Obj metric description, and the Sys_Obj metric description defined by the system to the user, who then determines the weight W for each metric. j ;

[0027] Each Obj in the indicator result set Obj iEach Obj corresponds to a multi-objective solution combining the large model, users, and the system. i Construct a decision matrix, and then use the TOPSIS method to find the optimal solution under multiple indicators, thus finding the service most suitable for the user.

[0028] When using the TOPSIS method, the decision matrix needs to be standardized, and for positive indicators, the larger the better.

[0029]

[0030] For negative indicators, convert them to positive indicators:

[0031]

[0032] Then the transformed values ​​are standardized:

[0033]

[0034] Then, a weighted standardized decision matrix is ​​constructed, which is: Next, we determine the ideal solution and the antiideal solution, the ideal solution A. * and the anti-ideal solution A - These are the maximum and minimum values ​​for each criterion, respectively.

[0035] The next step is to use Euclidean distance to calculate the distance between each solution and the ideal and antiideal solutions; where the distance to the ideal solution is:

[0036]

[0037] The distance to the inverse ideal solution is:

[0038]

[0039] Next, we calculate the relative proximity. This indicates how close service i is to the ideal solution:

[0040]

[0041] Finally, based on relative proximity All candidate services are sorted, with larger values ​​indicating better services that are closer to the user's needs, thus achieving virtual mapping of services; where i refers to the i-th service, j refers to the j-th indicator, n refers to the total number of services, and k refers to the k-th service.

[0042] A virtual mapping system based on a large model includes an information extraction module, a service matching module, an indicator generation and testing module, and a solution module;

[0043] In the information extraction module, a large dialogue model is used to engage in dialogue with the user. Through continuous dialogue, key information points needed to complete the virtual mapping are extracted as a description of the service required by the user.

[0044] In the service matching module, the correlation between all services provided by the system and the service description required by the user is calculated through the vector large model, thereby selecting the K most relevant services from all services as candidate services and putting them into the candidate service pool srvPool;

[0045] In the aforementioned indicator generation and testing module, a set of indicators for each candidate service is generated using a large text model and a large code model.

[0046] In the solution module, the TOPSIS method is used to find the optimal solution under multiple indicators, thereby completing the virtual mapping of the service.

[0047] A virtual mapping system based on a large model includes a memory and one or more processors. The memory stores executable code, and when the one or more processors execute the executable code, they implement the virtual mapping method described above.

[0048] Compared with the prior art, the present invention has the following beneficial effects:

[0049] This invention leverages the powerful text understanding capabilities and parameterized internal knowledge of large-scale models to enable dialogue between the models and users, obtaining accurate formatted requirements. This reduces the need for users to possess specialized knowledge while simultaneously improving the accuracy of the obtained requirements. Furthermore, it utilizes the encoding capabilities of vector-based large-scale models to quickly filter services. It also leverages the task understanding capabilities and rich expertise of text-based large-scale models to dynamically generate relevant metrics for each user's individual target service needs. This supplements user-defined metrics, reducing the need for user expertise and enabling dynamic customization of metrics for each virtual mapping. Finally, it utilizes the powerful text understanding and code generation capabilities of code-based large-scale models to quickly generate test code for the metrics. The combination of these large-scale models is then solved using the TOPSIS method, ultimately achieving automated virtual mapping. Attached Figure Description

[0050] Figure 1 This is a flowchart of a virtual mapping method based on a large model according to the present invention;

[0051] Figure 2 This is a schematic diagram of a virtual mapping system based on a large model according to the present invention. Detailed Implementation

[0052] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be noted that the embodiments described below are intended to facilitate the understanding of the present invention and do not constitute any limitation thereof.

[0053] like Figure 1 As shown, a virtual mapping method based on a large model includes the following steps:

[0054] S1. Engage in dialogue with the user through a large dialogue model, and extract the information needed to complete the virtual mapping through continuous dialogue.

[0055] S11. The system sets up multiple key information points required for mapping.

[0056] The key information points pre-defined by the system include the service type, service functional requirements, budget range, service reliability requirements, service performance requirements, service security requirements, etc. Among them, the service functional requirements include not only the specific functions and goals that users hope to achieve through the service, but also the service inputs and service outputs.

[0057] S12. Input a prompt that combines instructions and examples into the large dialogue model.

[0058] The prompts input to the large dialogue model include two aspects: instructions and examples. (1) The instructions are written in a role-playing manner, requiring the large dialogue model to continuously extract the key information points set in S11 during the dialogue with the user. If a key information point is not obtained, it needs to be obtained from the user by asking a question. After all key information points have been obtained, the dialogue can be ended, and the end label "" will be output. <end>"With all extracted key information points, including the tags" <end>"This helps the program recognize whether the conversation should end; if not..." <end>If the tag is set, the conversation continues with the user, and if there is a " <end>If the label is displayed, the conversation ends and the process proceeds to the next step. (2) The example utilizes the contextual reasoning ability of the big model to guide the big model to learn how to extract key information. It helps the big model learn which information in the user's answer should be judged as key information points and then extracted and summarized.

[0059] Step S12 in this example uses the gpt4 API provided by Azure OpenAI. In specific applications, other large dialogue models can also be used.

[0060] S13. Allow the large dialogue model to continuously engage in dialogue with the user until the large dialogue model extracts all the necessary key information points as a description of the service required by the user.

[0061] S2. Calculate the correlation between all services provided by the system and the service requirements of the user through the vector large model, and then select the K most relevant services to form a candidate service pool srvPool.

[0062] S21. Convert the format of the descriptions of all services provided by the system.

[0063] The descriptions of all services provided by the system are converted to the same format as KeyPoints because most of the services provided by the system are written in JSON format, which contains redundant information.

[0064] S22. Calculate the correlation between all services srv provided by the calculation system and the services required by the user, and select the K most relevant services to form a candidate service pool srvPool.

[0065] The correlation between all services (SRV) provided by the computing system and the services required by the user is first determined using a large vector model, such as OpenAI's text-embedding-ada-002, to convert the system services and KeyPoints obtained in step S21 into vectors. Cosine similarity is then used; vectors with higher cosine values ​​have higher similarity. Specifically, the cosine similarity is calculated as follows:

[0066]

[0067] Where sim i Indicates srv i That is, the similarity between the i-th service and the user's target service.

[0068] By calculating similarity, the K candidate services that are most similar to the application scenario of the target expected service are automatically obtained and formed into a candidate service pool srvPool. The subsequent service solution space is the candidate service pool srvPool.

[0069] S3. Generate a set of metrics for each candidate service.

[0070] S31. Input the KeyPoints, which describes the services required by the user, into the text big model, and let the text big model generate the description of the indicators it considers important, LLM_Obj.

[0071] S32. Combine the LLM_Obj metric description generated by the large text model, the User_Obj metric description, and one of the srvPools. i The description input is given to the code big model, and the code big model generates stvPool. i The corresponding test code is then run to obtain the test results of the large model-generated indicator description LLM_Obj (LLM_Obj_Rst) and the user-defined indicator description User_Obj (User_Obj_Rst).

[0072] S33, the combined large model's LLM_Obj_Rst, the user's User_Obj test result User_Obj_Rst, and the system-defined metric Sys_Obj test result Sys_Obj_Rst constitute the final metric result set Obj for each service in the srvPool.

[0073] The predefined metrics Sys_Obj mainly consist of external factors that can be obtained without running code, including: price, service rating, number of users, geographic coverage, etc.

[0074] In this embodiment, the large text model uses glm4 or GPT-4, and the large code model uses ERNIE-Code. In practical applications, other large models can also be used.

[0075] S4. Using the TOPSIS method, the optimal solution under multiple indicators is obtained, thereby completing the virtual mapping of the service.

[0076] S41. Submit multiple metric descriptions, including User_Obj, the large model LLM_Obj, and the system Sys_Obj, to the user, who will then determine the weight W for each metric. j

[0077] S42. First, set each srvPool i The corresponding multi-metric solution Obj, composed of user, large model, and system components, is... i Construct a decision matrix, and then use the TOPSIS method to find the optimal solution under multiple indicators, thus finding the service most suitable for the user.

[0078] When using the TOPSIS method, the decision matrix needs to be standardized. The standardization process differs for positive and negative indicators.

[0079] For positive indicators (the larger the better):

[0080]

[0081] For negative indicators (the smaller the better), they can be converted into positive indicators (the larger the better):

[0082]

[0083] Then the transformed values ​​are standardized:

[0084]

[0085] Then, a weighted standardized decision matrix is ​​constructed, which is: The next step is to determine the ideal solution and the antiideal solution. The ideal solution (A) * ) and anti-ideal solution (A - These are the maximum and minimum values ​​for each criterion, respectively.

[0086] The next step is to use Euclidean distance to calculate the distance between each solution and the ideal and antiideal solutions.

[0087] Distance from the ideal solution:

[0088]

[0089] Distance to the antiideal solution:

[0090]

[0091] Next, we calculate the relative proximity. This indicates how close service i is to the ideal solution:

[0092]

[0093] Finally, sort them according to their relative proximity. All candidate services are sorted, with higher values ​​indicating better services that are closer to the user's needs, thus achieving virtual mapping of services.

[0094] Based on the same inventive principle, embodiments of the present invention also provide a virtual mapping system based on a large model, such as... Figure 2 As shown, it includes an information extraction module, a service matching module, an indicator generation and testing module, and a solution module.

[0095] In the information extraction module, a large dialogue model is used to engage in dialogue with the user. Through continuous dialogue, key information points needed to complete the virtual mapping are extracted as a description of the service required by the user.

[0096] In the service matching module, the relevance between all services provided by the system and the service description required by the user is calculated through the vector large model, thereby selecting the K most relevant services as candidate services and putting them into the candidate service pool srvPool;

[0097] In the metrics generation and testing module, a set of metrics for each candidate service is generated using large text models and large code models.

[0098] In the solution module, the TOPSIS method is used to find the optimal solution under multiple indicators, thereby completing the virtual mapping of the service.

[0099] Based on the same inventive principle, this embodiment of the invention also provides a virtual mapping system based on a large model, including a memory and one or more processors. The memory stores executable code, and when the one or more processors execute the executable code, they are used to implement the virtual mapping method of the above embodiment.

[0100] The embodiments described above provide a detailed explanation of the technical solutions and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the present invention. Any modifications, additions, and equivalent substitutions made within the scope of the principles of the present invention should be included within the protection scope of the present invention.< / end> < / end> < / end> < / end>

Claims

1. A virtual mapping method based on a large model, characterized in that, Includes the following steps: (1) Use the large dialogue model to have a dialogue with the user, and extract the key information points needed to complete the virtual mapping through continuous dialogue, as a description of the service required by the user. (2) Calculate the correlation between all services provided by the system and the service description required by the user through the vector large model, and select the K most relevant services as candidate services from all services and put them into the candidate service pool srvPool; (3) Input the user’s required service description into the text big model to generate the indicator description LLM_Obj; input the indicator description LLM_Obj generated by the text big model, the user-defined indicator description User_Obj, and the description of a candidate service in the candidate service pool srvPool into the code big model to obtain the test code; Iterate through each candidate service in the candidate service pool srvPool to obtain the test code corresponding to each candidate service; run each test code to obtain the test result LLM_Obj_Rst corresponding to LLM_Obj and the test result User_Obj_Rst corresponding to User_Obj. By combining LLM_Obj_Rst, User_Obj_Rst, and the test result Sys_Obj_Rst of the system-defined metric Sys_Obj, the metric result set Obj for each candidate service in the candidate service pool srvPool is obtained. (4) In the indicator result set Obj, the TOPSIS method is used to solve the optimal solution under multiple indicators, thereby completing the virtual mapping of the service.

2. The virtual mapping method based on a large model according to claim 1, characterized in that, In step (1), the key information points required to complete the virtual mapping include: service type, service functional requirements, budget range, service reliability requirements, service performance requirements, and service security requirements. Among them, the service functional requirements include: the specific functions and goals that users hope to achieve through the service, the service input, and the service output.

3. The virtual mapping method based on a large model according to claim 1, characterized in that, In step (1), the prompts input to the large dialogue model include both instructions and examples; The instructions are written using a role-playing approach, requiring the large dialogue model to continuously extract key information points during conversations with users. If a key information point is not obtained, it must be obtained from the user through questioning. Once all key information points have been obtained, the conversation can end. The examples utilize the contextual reasoning ability of the large dialogue model, guiding it to learn how to extract key information points. This helps the large dialogue model learn which information in the user's answers should be judged as key information points, and then extracted and summarized.

4. The virtual mapping method based on a large model according to claim 1, characterized in that, In step (2), before calculating the relevance, it is necessary to convert the descriptions of all services provided by the system into the same format as the service descriptions required by the user.

5. The virtual mapping method based on a large model according to claim 1, characterized in that, The specific process of step (2) is as follows: First, a vector model is used to transform all the services provided by the system and the descriptions of the services required by the user into vectors. Then, cosine similarity is used to automatically obtain the K candidate services that are most similar to the descriptions of the services required by the user, forming a candidate service pool srvPool.

6. The virtual mapping method based on a large model according to claim 1, characterized in that, In step (3), the system-defined metric Sys_Obj is an external factor that can be obtained without running code, including: price, service rating, number of users, and geographic coverage.

7. The virtual mapping method based on a large model according to claim 1, characterized in that, The specific process of step (4) is as follows: The system submits the LLM_Obj metric description generated by the large text model, the User_Obj metric description, and the Sys_Obj metric description defined by the system to the user, who then determines the weight W for each metric. j ; Each Obj in the indicator result set Obj i Each Obj corresponds to a multi-objective solution combining the large model, users, and the system. i Construct a decision matrix, and then use the TOPSIS method to find the optimal solution under multiple indicators, thus finding the service most suitable for the user.

8. The virtual mapping method based on a large model according to claim 7, characterized in that, When using the TOPSIS method, the decision matrix needs to be standardized, especially for positive indicators: For negative indicators, convert them to positive indicators: Then the transformed values ​​are standardized: Then, a weighted standardized decision matrix is ​​constructed, which is: v ij =w j *r ij Next, we determine the ideal solution and the antiideal solution, the ideal solution A. * and the anti-ideal solution A - These are the maximum and minimum values ​​for each criterion, respectively. The next step is to use Euclidean distance to calculate the distance between each solution and the ideal and antiideal solutions; where the distance to the ideal solution is: The distance to the inverse ideal solution is: Next, we calculate the relative proximity. This indicates how close service i is to the ideal solution: Finally, based on relative proximity All candidate services are sorted, with larger values ​​indicating better services that are closer to the user's needs, thus achieving virtual mapping of services; where i refers to the i-th service, j refers to the j-th indicator, n refers to the total number of services, and k refers to the k-th service.

9. A virtual mapping system based on a large model, characterized in that, It includes an information extraction module, a service matching module, an indicator generation and testing module, and a solution module; In the information extraction module, a large dialogue model is used to engage in dialogue with the user. Through continuous dialogue, key information points needed to complete the virtual mapping are extracted as a description of the service required by the user. In the service matching module, the correlation between all services provided by the system and the service description required by the user is calculated through the vector large model, thereby selecting the K most relevant services from all services as candidate services and putting them into the candidate service pool srvPool; In the aforementioned indicator generation and testing module, the user's required service description is input into the text big model to generate the indicator description LLM_Obj; the indicator description LLM_Obj generated by the text big model, the user-defined indicator description Usre_Obj, and the description of a candidate service from the candidate service pool srvPool are input into the code big model to obtain the test code; Iterate through each candidate service in the candidate service pool srvPool to obtain the test code corresponding to each candidate service; run each test code to obtain the test result LLM_Obj_Rst corresponding to LLM_Obj and the test result User_Obj_Rst corresponding to User_Obj; combine LLM_Obj_Rst, User_Obj_Rst and the test result Sys_Obj of the system-defined indicator Sys_Obj to obtain the indicator result set Obj for each candidate service in the candidate service pool srvPool; In the solution module, the TOPSIS method is used in the index result set Obj to find the optimal solution under multiple indicators, thereby completing the virtual mapping of the service.

10. A virtual mapping system based on a large model, characterized in that, The device includes a memory and one or more processors, wherein the memory stores executable code, and the one or more processors execute the executable code to implement the virtual mapping method according to any one of claims 1-8.

Citation Information

Patent Citations

  • Web service selection method and device based on dynamic QoS (Quality of Service) and subjective and objective weights

    CN106961356A

  • Web service selection method and system based on user preferences

    CN109784722A