A resource processing method and device based on knowledge graph and large model
Through resource processing methods based on knowledge graphs and large models, the problems of low business demand analysis efficiency and poor resource matching accuracy in complex business scenarios are solved, efficient and accurate resource matching and demand matching are achieved, and resource management and query efficiency are improved.
Patent Information
- Application Number
- CN202411420152.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-10-12
AI Technical Summary
In complex business scenarios, when analyzing massive and complex business needs based on a single form of analysis model, there are problems of low analysis efficiency and poor accuracy in matching resource information.
Using a resource processing method based on knowledge graphs and large models, we can achieve efficient and accurate matching of resources and needs by generating guidance information, processing business needs, and building target knowledge graphs. The method includes receiving business requirements, generating guidance information, adjusting model parameters, decomposing requirements, building a knowledge graph, querying resources, and determining the target resources based on resource cost, satisfaction and response timeliness parameters.
It improves the efficiency and accuracy of matching business needs and resources, can accurately analyze user needs, provide efficient resource management and quickly locate target resources, and improves the processing efficiency and accuracy of resource matching.
Smart Images

Figure CN118939790B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information processing technology, and in particular to a resource processing method and device based on knowledge graphs and large models. Background Art
[0002] In complex business scenarios, such as software engineering and system design, it is necessary to provide matching resource data based on the user's business needs. However, for massive and complex business needs, if the business needs are analyzed based on a single form of analysis mode, there will be problems such as low analysis efficiency and inability to respond to business needs in real time and output corresponding resource information. In addition, due to the huge amount of resources in the resource library and the relatively chaotic resource management, there will also be problems with the accuracy of the output resource information matching the business needs. Summary of the invention
[0003] In view of the above problems, this application provides a resource processing method and device based on knowledge graph and big model to achieve the purpose of efficient and accurate matching of business needs and resources. The specific scheme is as follows:
[0004] The first aspect of the present application provides a resource processing method based on a knowledge graph and a large model, comprising:
[0005] In response to receiving the original business requirement, generating guidance information corresponding to the original business requirement;
[0006] Processing the guide information and the original business requirement using a target model to obtain target query information, wherein the guide information is used to guide the target model to perform a business requirement analysis task;
[0007] Based on the target knowledge graph corresponding to the resource information, the target query information is processed to obtain the target resources corresponding to the original business needs, and the target knowledge graph is at least used to store resources, needs, and the relationship between resources and needs.
[0008] Optionally, in response to receiving the original service requirement, generating guidance information corresponding to the original service requirement includes:
[0009] In response to receiving the original business requirement, determining a business type corresponding to the original business requirement;
[0010] Based on a guidance information generation template corresponding to the service type, the original service demand is processed to obtain guidance information corresponding to the original service demand.
[0011] Optionally, the using the target model to process the guidance information and the original business requirement to obtain target query information includes:
[0012] Using the guidance information to adjust the model parameters of the target model to obtain an adjusted target model;
[0013] Processing the original business requirement using the adjusted one to obtain at least one sub-business requirement;
[0014] Determine the association relationship between each of the sub-business requirements;
[0015] Based on the association relationship and each of the sub-business requirements, target query information is generated, and the target query information includes query statements that match the corresponding sub-business requirements.
[0016] Optionally, the method further comprises:
[0017] Obtain resource information and demand information in business scenarios;
[0018] Determine first relationship data between resources corresponding to the resource information;
[0019] Determine the demand corresponding to the demand information and second relationship data of the demand;
[0020] Determine third relationship data between resources and requirements corresponding to the resource information and the requirement information;
[0021] A target knowledge graph is generated based on the first relationship data, the second relationship data and the third relationship data.
[0022] Optionally, the target query information is processed based on the target knowledge graph corresponding to the resource information to obtain the target resource corresponding to the original business requirement, including:
[0023] Based on the target knowledge graph corresponding to the resource information, query processing is performed on the query statement matching each of the sub-business requirements to obtain sub-resources matching each sub-business requirement;
[0024] Based on the business attribute characteristics of each sub-business requirement, the sub-resources that meet the target conditions are determined as target resources.
[0025] Optionally, the determining of sub-resources satisfying target conditions as target resources based on the business attribute characteristics of each sub-business requirement includes:
[0026] Determine resource cost parameters of sub-resources that meet the original business requirements based on the business attribute characteristics of each sub-business requirement;
[0027] Determine the required and optional sub-business requirements based on the business attribute characteristics of each sub-business requirement;
[0028] Obtaining a first quantity of sub-resources corresponding to the mandatory sub-service requirement and a second quantity of sub-resources corresponding to the optional sub-service requirement;
[0029] Determining a demand satisfaction parameter based on the first number, the second number, and the total number of the sub-business requirements;
[0030] Determine the demand response time parameters corresponding to each sub-service demand;
[0031] Based on the resource cost parameter, the demand satisfaction parameter and the demand response timeliness parameter, a target resource is determined.
[0032] Optionally, the determining the target resource based on the resource cost parameter, the demand satisfaction parameter and the demand response timeliness parameter includes:
[0033] According to the business characteristics of the current business scenario, weight parameters corresponding to the resource cost parameter, the demand satisfaction parameter and the demand response timeliness parameter are determined respectively;
[0034] Determining a comprehensive scoring parameter based on the weight parameter, the resource cost parameter, the demand satisfaction parameter, and the demand response timeliness parameter;
[0035] Based on the comprehensive scoring parameters, target resources are determined.
[0036] Optionally, the method further comprises:
[0037] If the current resources cannot meet the required sub-service requirements, generate demand adjustment information;
[0038] A target business demand that matches the demand adjustment information is obtained, wherein the target business demand is demand information after the original business demand is adjusted according to the demand adjustment information.
[0039] Optionally, the method further comprises:
[0040] A resource mapping scheme is generated according to the original business requirement and the target resource, wherein the resource mapping scheme is used to map a resource call thread corresponding to the original business requirement to a resource pool matching the target resource.
[0041] The second aspect of the present application provides a resource processing device based on a knowledge graph and a large model, including:
[0042] A generating unit, configured to generate, in response to receiving the original service requirement, guiding information corresponding to the original service requirement;
[0043] A first processing unit is used to process the guidance information and the original business requirement by using a target model to obtain target query information, wherein the guidance information is used to guide the target model to perform a business requirement analysis task;
[0044] The second processing unit is used to process the target query information based on the target knowledge graph corresponding to the resource information to obtain the target resources corresponding to the original business needs, and the target knowledge graph is at least used to store resources, needs and the relationship between resources and needs.
[0045] The third aspect of the present application provides a computer program product, including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements the resource processing method based on the knowledge graph and the large model according to the first aspect or any implementation method of the first aspect.
[0046] A fourth aspect of the present application provides an electronic device, comprising at least one processor and a memory connected to the processor, wherein:
[0047] The memory is used to store computer programs;
[0048] The processor is used to execute the computer program so that the electronic device can implement the resource processing method based on the knowledge graph and the large model of the above-mentioned first aspect or any implementation method of the first aspect.
[0049] In a fifth aspect, the present application provides a computer storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the resource processing method based on the knowledge graph and the big model according to the above-mentioned first aspect or any implementation of the first aspect.
[0050] By means of the above technical solution, the present application provides a resource processing method and device based on a knowledge graph and a large model, which generates guidance information corresponding to the original business demand in response to receiving the original business demand; uses the target model to process the guidance information and the original business demand to obtain target query information, wherein the guidance information is used to guide the target model to perform the business demand analysis task; based on the target knowledge graph corresponding to the resource information, the target query information is processed to obtain the target resource corresponding to the original business demand. In the present application, the original business demand can be analyzed based on the target model with intent recognition function so as to accurately parse the user demand; based on the target knowledge graph, an efficient resource management and resource query method can be provided to meet the needs of quickly locating the target resources corresponding to the original business demand, thereby improving the efficiency and accuracy of matching business demand with resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0052] Figure 1 A schematic diagram of a process flow of a resource processing method based on a knowledge graph and a large model provided in an embodiment of the present application;
[0053] Figure 2 A schematic diagram of the interaction between various modules of a resource management system provided in an embodiment of the present application;
[0054] Figure 3 A schematic diagram of a knowledge graph provided in an embodiment of the present application;
[0055] Figure 4 A schematic diagram of the structure of a resource processing device based on a knowledge graph and a large model provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.
[0057] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0058] The terms "first", "second" etc. in the present application are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable in appropriate circumstances, and this is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0059] In an embodiment of the present application, a resource processing method based on a knowledge graph and a large model is provided, which can be applied to a resource management system, which can be a task of performing resource scheduling or mapping resources to business requirements. When the resource management system executes the resource processing method based on a knowledge graph and a large model, it can efficiently process the business requirements of users and provide accurate and reliable mapping results of business requirements to target resources.
[0060] See also Figure 1 , is a flow chart of a resource processing method based on a knowledge graph and a large model provided in an embodiment of the present application, and the method may include the following steps:
[0061] S101. In response to receiving an original service requirement, generate guidance information corresponding to the original service requirement.
[0062] The original business demand may be business demand information input by an external system connected to the current resource management system, for example, business demand submitted by an external system through a user interface (UI) or an application programming interface (API), and these business demands are usually expressed in an unstructured natural language. In order to enable the target model that processes the original business demand to analyze the demand more accurately, guidance information corresponding to the target model may be generated, and the guidance information is used to guide the target model to perform the task of business demand analysis. Specifically, the guidance information may include a brief description of the current original business demand, as well as processing rules and instructions that should be followed when processing the original business demand.
[0063] In one implementation of an embodiment of the present application, in response to receiving an original business demand, guidance information corresponding to the original business demand is generated, including: in response to receiving the original business demand, determining the business type corresponding to the original business demand; generating a template based on the guidance information corresponding to the business type, processing the original business demand, and obtaining guidance information corresponding to the original business demand.
[0064] Different business scenarios have different types of corresponding business requirements, such as business requirements for hardware resources, business requirements for software resources, and further business requirements for different processing modes. Therefore, the processing rules and description information corresponding to the original business requirements can be more accurately determined by the business type corresponding to the original business requirements. In order to quickly determine the guidance information corresponding to the original business requirements, the demand intention of the business requirements can be quickly determined through the target model. In the embodiment of the present application, a guidance information generation template corresponding to different business types can be pre-set, and the original business requirements can be converted into guidance information corresponding to the target model through the corresponding guidance information generation template, so that the input information for adding the guidance information can be input into the target model, so that the target model can generate a response of the type matching the guidance information, and complete the processing of the original business requirements. Among them, the guidance information can be composed of a series of keywords, words or instructions, which are used to guide the target model to complete a specific task, and can provide clear task instructions for the target model to determine that the content generated by the target model is more accurate and meets the current business needs.
[0065] S102: Use the target model to process the guidance information and the original business requirements to obtain target query information.
[0066] Among them, the target model is a natural language processing model, which can use the corresponding machine learning model structure to demand training data so that it can be used to output analysis results related to business needs. Specifically, in an embodiment of the present application, a target model corresponding to the current business scenario can be generated in advance, and then the target model can be fine-tuned according to the guidance information corresponding to the current original business demand, so that the adjusted target model can more accurately process the original business demand. In order to more accurately understand the demand intent and other information of the original business demand, the original business demand can be split to obtain corresponding sub-business demands to meet the resource mapping requirements corresponding to the corresponding sub-business demands.
[0067] In one implementation of the embodiments of the present application, the guide information and the original business demand are processed using a target model to obtain target query information, including: adjusting the model parameters of the target model using the guide information to obtain an adjusted target model; processing the original business demand using the adjusted model to obtain at least one sub-business demand; determining the association relationship between each sub-business demand; and generating target query information based on the association relationship and each sub-business demand, the target query information including a query statement matching the corresponding sub-business demand.
[0068] The model parameters of the target model are adjusted by using the guidance information, which can be the model structure parameters of the target model, or the weight information of the corresponding demand attribute parameters when the target model is subjected to demand analysis. Specifically, it can be determined in combination with the actual application scenario so that the target model can analyze the business needs more accurately after adjustment based on the guidance information. Then the adjusted target model decomposes the current original business needs into smaller and more specific sub-business needs through natural language processing technology. Decomposing the original business needs helps to simplify complex business needs and facilitates the management and analysis of business needs. Correspondingly, if the original business needs are relatively simple, the original business needs can be directly processed. After obtaining at least one sub-business need corresponding to the original business need, data normalization can be performed on it to ensure that the data format corresponding to each sub-business need is unified, the data content is clear and definite, and the sub-business needs after planning processing are easier to be understood and processed by the target model, which helps to improve the processing efficiency and accuracy in the subsequent processing steps.
[0069] Then, based on the association relationship between each sub-business requirement, information that can characterize the relationship between the sub-business requirements can be generated, so as to facilitate the verification and processing of the information corresponding to the sub-business requirements. Among them, the association relationship between the sub-business requirements can include the dependency relationship, logical relationship or execution order, inclusion relationship, etc. of the sub-business requirements. Specifically, the target model can analyze the association relationship between each sub-business requirement and generate a directed acyclic graph (DAG), so as to represent the dependency relationship between these sub-requirements according to the directed acyclic graph (DAG). DAG helps the system understand the association relationship between each sub-business requirement. For the DAG graph composed of sub-business requirements as nodes, each sub-business requirement can be sorted by a topological sorting algorithm, so that the adjusted target model will be requested to generate corresponding query statements in turn according to the linear sequence formed after sorting. Correspondingly, if there is any necessary sub-business requirement that cannot be met, the query statement generation request for the sub-business requirement can be stopped, and the result that the requirement cannot be met can be fed back to the external system that generates the original business requirement. The original business requirement is processed by the target model, so that the processing of the original business requirement is more efficient, and the requirement intention of the original business requirement can be more objectively and accurately understood.
[0070] S103. Based on the target knowledge graph corresponding to the resource information, the target query information is processed to obtain the target resources corresponding to the original business needs.
[0071] Among them, the target knowledge graph is at least used to store resources, requirements, and the relationship between resources and requirements. In the embodiment of the present application, the target knowledge graph stores various entities, attributes, and the relationship between them, which can form a huge knowledge network. The structure of the target knowledge graph optimizes the query process, so that the system can quickly retrieve resources that meet the original business needs, and effectively analyze the correlation between resources, thereby greatly improving the efficiency and quality of resource queries. In the target knowledge graph, entities include two categories: requirements and resources, and relationships include relationships between requirements, relationships between requirements and resources, and relationships between resources and resources. Correspondingly, a method for constructing a target knowledge graph is also provided in the embodiment of the present application. The method may include: obtaining resource information and requirement information in a business scenario; determining the first relationship data between resources and resources corresponding to the resource information; determining the second relationship data between requirements and requirements corresponding to the requirement information; determining the third relationship data between resources and requirements corresponding to the resource information and the requirement information; based on the first relationship data, the second relationship data, and the third relationship data, a target knowledge graph is generated.
[0072] After obtaining the target query information, these queries can be executed on the target knowledge graph to find results that meet the conditions, that is, to obtain the target resources. In order to obtain resource information corresponding to business needs in real time, the target knowledge graph can be regularly updated and maintained based on resource information and demand information to reflect the latest status of resources and services in the system, ensuring the timeliness and accuracy of decisions and queries for business needs.
[0073] The embodiment of the present application provides a resource processing method based on a knowledge graph and a large model. The natural language processing capability of the target model can accurately parse the original business demand and determine its demand intent so as to accurately understand the original business demand. Through the efficient resource organization and retrieval method provided by the target knowledge graph, the target resources that match the original business demand can be quickly located. The original business demand is automatically parsed by the target model, target query information is generated, and the corresponding target resources are automatically retrieved based on the target knowledge graph, thereby improving the processing efficiency and accuracy of resource matching. In addition, the target model can be adjusted based on the guidance information of the original business demand, so that the target model can adapt to the changes in business needs in different scenarios, so that the resource matching process has a stronger generalization ability.
[0074] Since the target model can split the original business demand into at least one sub-business demand in order to more accurately understand the original business demand, when querying and matching the corresponding resource information, the corresponding sub-resource can also be determined for each sub-business demand. Specifically, in one implementation of the embodiment of the present application, the target knowledge graph corresponding to the resource information processes the target query information to obtain the target resource corresponding to the original business demand, including: querying and processing the query statement that matches each sub-business demand based on the target knowledge graph corresponding to the resource information to obtain the sub-resource that matches each sub-business demand; based on the business attribute characteristics of each sub-business demand, determining the sub-resource that meets the target condition as the target resource.
[0075] Among them, the business attribute characteristics of each sub-business demand can be determined by the type of sub-business demand and the processing conditions. The sub-business demand can be further divided into mandatory sub-business demand and optional sub-business demand according to the business attribute characteristics of the sub-business demand, wherein the mandatory sub-business demand refers to the sub-business demand that must be met to meet the original business demand, and the optional sub-business demand is a non-essential sub-business demand. Correspondingly, the target condition can be a condition determined based on the cost, response time or price of the current resource call, so that the optimal sub-resource corresponding to the sub-business demand in the current original business demand can be matched and determined as the target resource that can meet the resource requirements of the original business demand.
[0076] Furthermore, the sub-resources that meet the target conditions are determined as target resources based on the business attribute characteristics of each sub-business demand, including: determining resource cost parameters of the sub-resources that meet the original business demand based on the business attribute characteristics of each sub-business demand; determining mandatory sub-business demands and optional sub-business demands based on the business attribute characteristics of each sub-business demand; obtaining a first number of sub-resources corresponding to the mandatory sub-business demand and a second number of sub-resources corresponding to the optional sub-business demand; determining a demand satisfaction parameter based on the first number, the second number and the total number of sub-business demands; determining a demand response timeliness parameter corresponding to each sub-business demand; and determining the target resource based on the resource cost parameter, the demand satisfaction parameter and the demand response timeliness parameter.
[0077] When determining the target resources, relevant resources can be screened according to resource cost parameters, demand satisfaction parameters, and demand response time parameters to obtain the target resources. In this way, resource information can be evaluated from different dimensions, which can more comprehensively and objectively reflect the overall efficiency and effect of resource scheduling.
[0078] The resource cost parameter refers to the total cost of the sub-resources that meet the original business requirements. For example, the sub-business requirements set corresponding to the original business requirements is D={ d 1, d 2,…, d n}, and the corresponding sub-resource resource collection is R ={ r 1, r 2,…, r m}. The resource cost set is C ={ c 1, c 2,…, c m}, if the current sub-business requirement is d i , which needs to be composed of a subset R={ r s1 , r s2 ,…, r sl} to satisfy, then r sl Cost score weight α sl It can be expressed as:
[0079]
[0080]
[0081] In the above formula, k For resources r sl The number of business requirements supported simultaneously; scaling factor µ Determines the amplitude of the function, µ >1 means α sl along with k increases with the increase of θ Determines the growth or decay rate of the function, which ranges between 0 and 1, that is, 0< θ <1, θ control α sl along with k The increase is gradual and steady. Its significance is that r sl Cost score weight α sl With resource reuse, multiple business requirements can be supported k But after increasing to a certain extent, it will basically stop changing.
[0082] The calculation formula for the Total cost score of all business requirements can be written as:
[0083] .
[0084] Correspondingly, the requirement satisfaction parameter can be measured and determined by using the percentage of the optional sub-service requirements that can be satisfied relative to the mandatory sub-service requirements and the total number of each sub-service requirement, expressed as DS:
[0085]
[0086] in, is the number of required sub-business requirements that have been met, is the total number of sub-business requirements, is the number of optional sub-business requirements that have been met, It is an additional bonus factor for meeting optional requirements.
[0087] The demand response time parameter is determined using the response time, represented by T:
[0088]
[0089] in, is the demand response time, is the timeliness weight.
[0090] Furthermore, in order to accurately determine the parameters for matching resource evaluation, the corresponding weight parameters can be determined for each dimension corresponding to each of the above resource cost parameters, demand satisfaction parameters, and demand response time parameters, and the comprehensive scoring parameters can be calculated. Specifically, according to the business characteristics of the current business scenario, the weight parameters corresponding to the resource cost parameters, the demand satisfaction parameters, and the demand response time parameters are determined respectively; based on the weight parameters, the resource cost parameters, the demand satisfaction parameters, and the demand response time parameters, the comprehensive scoring parameters are determined; based on the comprehensive scoring parameters, the target resources are determined.
[0091] For example, the comprehensive scoring parameter is represented by S:
[0092] S= W RU × RU + W DS × DS + W T × T
[0093] in, W RU ,W DS , W T They are the weights of resource cost, demand satisfaction and timeliness in the comprehensive score. Specifically, the weights can be set based on business goals and strategies. Then, according to the current state of the system and changes in the external environment, machine learning algorithms such as random forests or neural networks can be used to optimize weights and score models based on historical data to dynamically adjust the weights of each indicator.
[0094] Based on the above comprehensive scoring parameters, the top k options with the highest scores can be selected from all resource candidate solutions, and the target resources can be finally determined. Then, a resource mapping solution can be generated based on the original business requirements and the target resources. The resource mapping solution is used to map the resource call thread corresponding to the original business requirement to a resource pool matching the target resource, so as to ensure the high efficiency of resource scheduling and the accuracy of demand satisfaction of the demander.
[0095] In the embodiment of the present application, when matching the sub-resources with each sub-business requirement according to the target knowledge graph, if the corresponding resource information cannot be obtained, demand adjustment information can be generated to be fed back to the demander to determine whether to adjust the original business requirement. Specifically, if the current resources cannot meet the required sub-business requirement, demand adjustment information is generated; and a target business requirement matching the demand adjustment information is obtained, wherein the target business requirement is the demand information of the original business requirement after being adjusted according to the demand adjustment information.
[0096] The resource processing method based on the knowledge graph and the large model in the embodiment of the present application is described below in conjunction with specific application scenarios. Figure 2 , which is a schematic diagram of the interaction of various modules of a resource management system provided in an embodiment of the present application. The resource management system includes an external system, an analysis and decision module, a model processing module (represented by an LLM module), a knowledge graph and a scoring module. Specifically, the external system submits their business requirements through a user interface (UI) or an application programming interface (API), and these requirements are usually expressed in an unstructured natural language form.
[0097] The analysis and decision-making module includes the task guidance information generation function (in Figure 2The analysis and decision module is the core control part of the entire system process. It is responsible for coordinating the operation of the entire process. This module receives unstructured natural language descriptions from external systems, which reflect the original requirements of the external systems. Using the powerful analysis capabilities of LLM, the analysis and decision module can deeply understand the external business requirements and automatically generate matching query statements for specific knowledge graphs. Subsequently, the analysis and decision module executes these query statements to retrieve relevant information in the knowledge graph. After the query results are returned, the module further evaluates and analyzes the results in detail to ensure that the information obtained is not only accurate but also highly relevant to the business requirements. Finally, based on the in-depth analysis of the query results, the analysis and decision module generates a detailed mapping solution. This solution accurately matches external business requirements with the resources and services in the system, providing a clear path for meeting business requirements.
[0098] The task prompt generation function in the analysis and decision module is used to generate guidance information for the LLM model. The guidance information usually includes a brief description of the business requirements, as well as the rules and instructions to be followed in the process of processing the requirements. Specifically, a template can be generated based on the guidance information to convert the business requirements analysis task into specific conversation guidance information, and specific prompts or instructions can be added to the LLM (target model, such as a large language model) input to guide the model to generate a specific type of response and complete a specific task process.
[0099] The requirement verification function in the analysis and decision module is to execute the knowledge graph query statements related to the sub-requirements automatically generated by LLM, and judge whether the requirements can be met and the degree of satisfaction based on the query results. Sub-requirements include mandatory sub-requirements and optional sub-requirements. All mandatory sub-requirements must be met, and optional sub-requirements adopt a best-effort satisfaction strategy. If the internal system does not have the resources to meet the mandatory sub-requirements, the module will feedback to the external system and require the external system to modify or supplement the business requirement information.
[0100] The result evaluation function in the analysis and decision module evaluates the degree of demand satisfaction, resource utilization efficiency, and timeliness of demand satisfaction, and selects the optimal resource information. The mapping scheme generation function in the analysis and decision module is responsible for generating one or more resource mapping schemes based on the evaluated candidate results.
[0101] By analyzing the various functions in the decision module, the resource mapping solution can map external business requirements to the resources and services in the system, such as the required hardware, software, network configuration, etc.
[0102] The LLM module in the resource management system is a natural language processing component. Its main function is to decompose complex business requirements described in natural language into multiple sub-requirements, analyze the dependency directed acyclic graph (DAG) between sub-requirements, normalize the sub-requirements, and automatically generate knowledge graph query statements based on the relevant information of the sub-requirements. These query statements are used to retrieve relevant resources in the knowledge graph.
[0103] Specifically, the LLM module includes demand decomposition function and sub-demand dependency analysis function (in Figure 2 The requirements decomposition function is to receive the original requirements submitted by the external system through the LLM model, and then decompose these requirements into smaller and more specific sub-requirements through natural language processing technology. When executing the sub-requirement normalization function, the decomposed sub-requirements can be normalized to ensure that they are in a unified format and clear and unambiguous. Normalized sub-requirements are easier to be understood and processed by the system, which helps to improve the efficiency and accuracy of subsequent steps.
[0104] The sub-requirement dependency DAG generation function in the LLM module can generate a DAG to represent the dependency relationship between these sub-requirements by analyzing the logical relationship between sub-requirements. DAG (directed acyclic graph) helps the system understand the dependency relationship between sub-requirements. For a DAG graph consisting of sub-requirements as nodes, it can be sorted by a topological sorting algorithm. The requirement verification module will request the LLM module to generate corresponding query statements in turn according to the linear sequence formed after sorting. If any required sub-requirements cannot be met, the module will stop subsequent query statement generation requests and feedback the result that the requirements cannot be met to the external system. The sub-requirement query statement generation function is based on the normalized sub-requirements and the dependency relationships between them. LLM generates query statements for querying the knowledge graph. These query statements are designed to retrieve information related to sub-requirements and provide necessary data support for generating solutions.
[0105] exist Figure 2The knowledge graph in the system stores various entities, attributes and the relationships between them, forming a huge knowledge network. The structure of the knowledge graph optimizes the query process, enabling the system to quickly retrieve resources that meet specific needs and effectively analyze the relationships between resources, thereby greatly improving query efficiency and decision quality. Its main functions include: responsible for storing and organizing a large amount of structured data, which usually includes entities (such as requirements, resources, services, etc.) and the relationships between them (such as dependencies, inclusions, mappings, etc.); responding to query requests sent by the analysis and decision-making module, and executing these queries on the knowledge graph to find results that meet the conditions; the knowledge graph needs to be updated and maintained regularly to reflect the latest status of resources and services in the system to ensure the timeliness and accuracy of decisions and queries.
[0106] See also Figure 3 , is a schematic diagram of a knowledge spectrum provided in an embodiment of the present application. Figure 3 The entities in the knowledge graph shown include two categories: demand and resources. Figure 3 Relationships include the relationship between requirements, the relationship between requirements and resources, and the relationship between resources. Figure 3 Indicated by arrows.
[0107] exist Figure 3 In the table, subClassOf is used to represent entity categories. Specific demand subcategories include services, storage, hardware, data, applications, communications, etc. Performance indicator subcategories include bandwidth, capacity, read / write capability, latency, jitter, SLA, etc. Component subcategories include computing, memory, node storage, and network, etc.
[0108] Among them, the relationship may include: include, depend on, configure, satisfy, access, customize, connect, install, deploy and map, etc. Among them, include means that the business requirement contains several specific requirements. Dependence means the relationship between requirements and resources, and the specific requirement subclass depends on specific resources; configuration means that the node configures several components; satisfy means that the components, communication network and storage service meet specific performance indicators; access means that the service can be accessed and provided through the node; customization means that the communication network can support customized slices; connection means that there is a symmetrical connection relationship between the node network, service capabilities, storage service and communication network; installation means that there is a symmetrical installation relationship between the node and the specific application; deployment means that there is a symmetrical deployment relationship between the storage service and the data; mapping means that there is a symmetrical mapping relationship between the node storage and the storage service.
[0109] The scoring module in the system is responsible for scoring and sorting the query results. Its main function is to receive the query results sent by the analysis and decision-making module. First, the results are scored independently from three aspects: resource cost, demand satisfaction, and timeliness. Then, the weighted comprehensive score is obtained. The top-k results selected based on the comprehensive score are returned to the analysis and decision-making module as candidate results.
[0110] Through the collaborative work of the above four modules in the system, the entire system can accurately and efficiently process the business requirements input by users and provide resource mapping results that meet the requirements.
[0111] Specifically, in the embodiment of the present application, the target model can be a large language model, and PromptTuning, Instruction Tuning and few-shot learning techniques can be used to guide the LLM to convert user needs into executable action plans and lay the foundation for further analysis and decision-making. The specific methods are as follows:
[0112] For the subtasks of each key step, Prompt Tuning, Instruction Tuning and few-shot learning techniques are used in combination. Based on the general LLM model, the model is fine-tuned using rich training data to form a dedicated model for specific application scenarios. The above steps are integrated into a coherent processing flow to achieve an end-to-end solution from input to output, ensuring the efficiency and automation of the process. Combined with the structured data of the knowledge graph, the guidance information and instructions are adjusted to fine-tune a dedicated model that can automatically generate knowledge graph query statements, thereby further improving the intelligence and accuracy of the system.
[0113] Correspondingly, corresponding guidance information and instructions can be designed for each function in the target model, including:
[0114] When the target model performs the function of decomposing requirements into sub-requirements, its goal is to decompose the complex requirements input by the user into multiple atomic sub-requirements. The guidance information template can be:
[0115] "User requirements: {Original requirements entered by the user}
[0116] Please break down the above user requirements into multiple sub-requirements:".
[0117] The training data contains samples of user requirements and corresponding sub-requirement lists. The model fine-tuning process uses the above-mentioned guidance information module and training data to fine-tune the LLM model so that it can accurately decompose user requirements.
[0118] When the target model performs the sub-requirement normalization function, its goal is to convert the decomposed sub-requirements into a standardized expression to eliminate ambiguity and facilitate subsequent processing. At this time, the guiding information or instructions can be:
[0119] “Rewrite the following sub-requirements into a standardized expression: {sub-requirement list}”
[0120] "Standardized expressions should follow the following principles: {Standardization principles}".
[0121] Correspondingly, the training data may include the original sub-requirements and the corresponding normalized expression samples. Model fine-tuning is to use the above instructions and training data to fine-tune the target model LLM so that it can normalize the sub-requirements.
[0122] When the target model executes the sub-requirement dependency DAG generation function, its goal is to analyze the dependency relationship between sub-requirements and construct a directed acyclic graph (DAG) to represent the execution order of sub-requirements. Correspondingly, the guidance information module can be:
[0123] "Sub-requirement list: {normalized sub-requirement list}
[0124] Please analyze the dependencies between sub-requirements and construct a DAG graph to represent the execution order of sub-requirements:".
[0125] At this time, the training data includes samples of the sub-requirement list and the corresponding DAG graph. The LLM is fine-tuned using the above-mentioned guidance information module and the training data so that it can generate the sub-requirement dependency DAG.
[0126] When the target model performs the sub-requirement query statement generation function, its goal is to generate the corresponding knowledge graph query statement based on the standardized sub-requirement to obtain relevant information. The corresponding guidance information or instructions can be:
[0127] "Based on the following normalized sub-requirements, generate the corresponding SPARQL query statement: {normalized sub-requirements}"
[0128] "The schema of the knowledge graph is: {knowledge graph schema}".
[0129] In this process, the training data contains samples of normalized sub-requirements and corresponding SPARQL query statements. The LLM is fine-tuned using the above instructions and training data to enable it to generate sub-requirement query statements.
[0130] In this application scenario, the powerful semantic understanding ability of LLM is used to accurately parse unstructured natural language requirements into structured sub-requirements, and distinguish their importance, providing a reliable basis for subsequent resource matching. A knowledge graph containing rich resource information is constructed, and the graph query language is used to achieve efficient resource retrieval and quickly locate the best resources that meet user needs. Candidate resources are evaluated from multiple dimensions such as resource cost, demand satisfaction, and timeliness, and the optimal resource mapping solution is generated accordingly to ensure the rationality and efficiency of resource allocation. Specifically, the use of LLM technology can handle more complex and flexible natural language requirements without the need to manually build a complex rule base, and has a higher degree of intelligence and generalization ability. The use of knowledge graph technology can perform more accurate semantic matching, and consider the association between resources to avoid ambiguity and errors caused by simple keyword matching. The use of a multi-dimensional resource evaluation mechanism can more comprehensively evaluate the applicability of resources and avoid the one-sidedness caused by a single indicator.
[0131] In the embodiment of the present application, a resource processing device based on knowledge graph and large model is also provided, see Figure 4 , the device comprises:
[0132] A generating unit 401, configured to generate guidance information corresponding to the original service requirement in response to receiving the original service requirement;
[0133] A first processing unit 402 is used to process the guidance information and the original business requirement using a target model to obtain target query information, wherein the guidance information is used to guide the target model to perform a business requirement analysis task;
[0134] The second processing unit 403 is used to process the target query information based on the target knowledge graph corresponding to the resource information to obtain the target resources corresponding to the original business needs. The target knowledge graph is at least used to store resources, needs, and the relationship between resources and needs.
[0135] Optionally, the generating unit includes:
[0136] A first determining subunit, configured to determine, in response to receiving an original service requirement, a service type corresponding to the original service requirement;
[0137] The first processing subunit is used to generate a template based on the guidance information corresponding to the service type, process the original service demand, and obtain the guidance information corresponding to the original service demand.
[0138] Optionally, the first processing unit includes:
[0139] an adjusting subunit, configured to adjust the model parameters of the target model using the guidance information to obtain an adjusted target model;
[0140] A second processing subunit is used to process the original business requirement using the adjusted one to obtain at least one sub-business requirement;
[0141] A second determining subunit is used to determine the association relationship between each of the sub-business requirements;
[0142] The first generating subunit is used to generate target query information based on the association relationship and each of the sub-business requirements, wherein the target query information includes a query statement matching the corresponding sub-business requirement.
[0143] Optionally, the device further comprises a graph generating unit, and the graph generating unit is configured to:
[0144] Obtain resource information and demand information in business scenarios;
[0145] Determine first relationship data between resources corresponding to the resource information;
[0146] Determine the demand corresponding to the demand information and second relationship data of the demand;
[0147] Determine third relationship data between resources and requirements corresponding to the resource information and the requirement information;
[0148] A target knowledge graph is generated based on the first relationship data, the second relationship data and the third relationship data.
[0149] Optionally, the second processing unit includes:
[0150] The third processing sub-unit is used to perform query processing on the query statement matching each of the sub-business requirements based on the target knowledge graph corresponding to the resource information, so as to obtain the sub-resources matching each of the sub-business requirements;
[0151] The third determination subunit is used to determine the sub-resources that meet the target conditions as target resources based on the business attribute characteristics of each sub-business requirement.
[0152] Optionally, the third determining subunit is configured to:
[0153] Determine resource cost parameters of sub-resources that meet the original business requirements based on the business attribute characteristics of each sub-business requirement;
[0154] Determine the required and optional sub-business requirements based on the business attribute characteristics of each sub-business requirement;
[0155] Obtaining a first quantity of sub-resources corresponding to the mandatory sub-service requirement and a second quantity of sub-resources corresponding to the optional sub-service requirement;
[0156] Determining a demand satisfaction parameter based on the first number, the second number, and the total number of the sub-business requirements;
[0157] Determine the demand response time parameters corresponding to each sub-service demand;
[0158] Based on the resource cost parameter, the demand satisfaction parameter and the demand response timeliness parameter, a target resource is determined.
[0159] In an optional manner, determining the target resource based on the resource cost parameter, the demand satisfaction parameter and the demand response timeliness parameter includes:
[0160] According to the business characteristics of the current business scenario, weight parameters corresponding to the resource cost parameter, the demand satisfaction parameter and the demand response timeliness parameter are determined respectively;
[0161] Determining a comprehensive scoring parameter based on the weight parameter, the resource cost parameter, the demand satisfaction parameter, and the demand response timeliness parameter;
[0162] Based on the comprehensive scoring parameters, target resources are determined.
[0163] Optionally, the device further comprises:
[0164] An information generating unit, configured to generate demand adjustment information if current resources cannot meet the required sub-service demand;
[0165] An acquisition unit is used to obtain a target business demand that matches the demand adjustment information, wherein the target business demand is demand information after the original business demand is adjusted according to the demand adjustment information.
[0166] Optionally, the device further comprises:
[0167] A solution generating unit is used to generate a resource mapping solution according to the original business demand and the target resource, wherein the resource mapping solution is used to map the resource calling thread corresponding to the original business demand to a resource pool matching the target resource.
[0168] In an embodiment of the present application, a computer program product is also provided, including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any of the resource processing methods based on knowledge graphs and large models described above.
[0169] Correspondingly, in an embodiment of the present application, an electronic device is further provided, comprising at least one processor and a memory connected to the processor, wherein:
[0170] The memory is used to store computer programs;
[0171] The processor is used to execute the computer program so that the electronic device can implement any of the resource processing methods based on knowledge graphs and large models described above.
[0172] A computer storage medium is also provided in an embodiment of the present application, and the storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the resource processing method based on the knowledge graph and the big model according to the above-mentioned first aspect or any implementation of the first aspect.
[0173] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
[0174] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0175] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0176] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
[0177] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be covered by the protection scope of the present application.
[0178] Each embodiment in this specification focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0179] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A resource processing method based on knowledge graph and big model, It is characterized in that include: In response to receiving the original business requirement, generating guidance information corresponding to the original business requirement; Processing the guide information and the original business requirement using a target model to obtain target query information, wherein the guide information is used to guide the target model to perform a business requirement analysis task; Based on the target knowledge graph corresponding to the resource information, the target query information is processed to obtain the target resource corresponding to the original business demand, wherein the target knowledge graph is used to store at least resources, demands, and the relationship between resources and demands; The process of processing the guide information and the original business requirement using the target model to obtain target query information includes: Using the guidance information to adjust the model parameters of the target model to obtain an adjusted target model; Processing the original business requirement using the adjusted one to obtain at least one sub-business requirement; Determine the association relationship between each of the sub-business requirements; Based on the association relationship and each of the sub-business requirements, target query information is generated, and the target query information includes query statements that match the corresponding sub-business requirements.
2. The method according to claim 1, It is characterized in that The step of generating guidance information corresponding to the original business requirement in response to receiving the original business requirement includes: In response to receiving the original business requirement, determining a business type corresponding to the original business requirement; Based on a guidance information generation template corresponding to the service type, the original service demand is processed to obtain guidance information corresponding to the original service demand.
3. The method according to claim 1, It is characterized in that The method further comprises: Obtain resource information and demand information in business scenarios; Determine first relationship data between resources corresponding to the resource information; Determine the demand corresponding to the demand information and second relationship data of the demand; Determine third relationship data between resources and requirements corresponding to the resource information and the requirement information; A target knowledge graph is generated based on the first relationship data, the second relationship data and the third relationship data.
4. The method according to claim 1, It is characterized in that The target knowledge graph corresponding to the resource information is based on which the target query information is processed to obtain a target resource corresponding to the original business requirement, including: Based on the target knowledge graph corresponding to the resource information, query processing is performed on the query statement matching each of the sub-business requirements to obtain sub-resources matching each sub-business requirement; Based on the business attribute characteristics of each sub-business requirement, the sub-resources that meet the target conditions are determined as target resources.
5. The method according to claim 4, It is characterized in that The determining of the sub-resources satisfying the target conditions as target resources based on the business attribute characteristics of each sub-business requirement includes: Determine resource cost parameters of sub-resources that meet the original business requirements based on the business attribute characteristics of each sub-business requirement; Determine the required and optional sub-business requirements based on the business attribute characteristics of each sub-business requirement; Obtaining a first quantity of sub-resources corresponding to the mandatory sub-service requirement and a second quantity of sub-resources corresponding to the optional sub-service requirement; Determining a demand satisfaction parameter based on the first number, the second number, and the total number of the sub-business requirements; Determine the demand response time parameters corresponding to each sub-service demand; Based on the resource cost parameter, the demand satisfaction parameter and the demand response timeliness parameter, a target resource is determined.
6. The method according to claim 5, It is characterized in that The determining of the target resource based on the resource cost parameter, the demand satisfaction parameter and the demand response timeliness parameter includes: According to the business characteristics of the current business scenario, weight parameters corresponding to the resource cost parameter, the demand satisfaction parameter and the demand response timeliness parameter are determined respectively; Determining a comprehensive scoring parameter based on the weight parameter, the resource cost parameter, the demand satisfaction parameter, and the demand response timeliness parameter; Based on the comprehensive scoring parameters, target resources are determined.
7. The method according to claim 5, It is characterized in that The method further comprises: If the current resources cannot meet the required sub-service requirements, generate demand adjustment information; A target business demand that matches the demand adjustment information is obtained, wherein the target business demand is demand information after the original business demand is adjusted according to the demand adjustment information.
8. The method according to claim 1, It is characterized in that The method further comprises: A resource mapping scheme is generated according to the original business requirement and the target resource, wherein the resource mapping scheme is used to map a resource call thread corresponding to the original business requirement to a resource pool matching the target resource.
9. A resource processing device based on knowledge graph and large model, It is characterized in that include: A generating unit, configured to generate, in response to receiving the original service requirement, guiding information corresponding to the original service requirement; A first processing unit is used to process the guidance information and the original business requirement by using a target model to obtain target query information, wherein the guidance information is used to guide the target model to perform a business requirement analysis task; A second processing unit is used to process the target query information based on a target knowledge graph corresponding to the resource information to obtain a target resource corresponding to the original business requirement, wherein the target knowledge graph is used to store at least resources, requirements, and a relationship between resources and requirements; The first processing unit processes the guidance information and the original business requirement using a target model to obtain target query information, including: Using the guidance information to adjust the model parameters of the target model to obtain an adjusted target model; Processing the original business requirement using the adjusted one to obtain at least one sub-business requirement; Determine the association relationship between each of the sub-business requirements; Based on the association relationship and each of the sub-business requirements, target query information is generated, and the target query information includes query statements that match the corresponding sub-business requirements.
