CN-122019684-A - Electric power marketing auxiliary work order processing method and system based on large language model
Abstract
The application relates to a large language model-based power marketing auxiliary work order processing method and system, belongs to the technical field of power marketing work order information processing, and aims to solve the problems that the prior art lacks unified structural representation and semantic association and lacks feedback optimization closed loop. The method comprises the steps of constructing an interface knowledge graph, collecting and analyzing multi-source interface information and extracting business entity relations, analyzing user input based on a pre-training language model, identifying intention and generating multi-level dynamic task planning, generating interface parameters by means of knowledge graph mapping, and achieving safe and reliable interface calling and execution result verification feedback. The method realizes the association of the unified structural representation and the semantics, and the feedback optimization closed loop.
Inventors
- YAN KANG
- ZHANG MENG
- HUANG GUANGQIANG
- WANG YINGWEN
- BAI RUYU
- XU LEI
- LIU XUNXI
- WANG KAIXUAN
- HOU LIXUE
- WANG JINRONG
- WANG PING
- DENG HAO
- LIU TAO
Assignees
- 山东鲁软数字科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20251210
Claims (10)
- 1. The electric power marketing auxiliary work order processing method based on the large language model is characterized by comprising the following steps of: Step S1, a step of constructing an interface knowledge graph, namely collecting and analyzing multi-source interface information, constructing a unified interface metadata model, extracting service entities and interface relations thereof, and constructing the knowledge graph; Step S2, establishing dialogue understanding and task planning, carrying out semantic analysis on user input, identifying context user intention and generating structural intention representation, and generating multi-level task planning for dynamic planning; And step S3, constructing an automatic execution step, identifying parameter information input by a user based on the knowledge graph mapping relation, generating parameters used before interface calling, constructing safe and reliable interface calling, and carrying out execution result verification and execution result feedback.
- 2. The method for processing the power marketing auxiliary work order based on the large language model according to claim 1, wherein the multi-source interface information comprises a front-end component, an API document and a web request log in a power marketing 2.0 system; Analyzing the multi-source interface information comprises extracting related attributes of front-end components and API document interface elements and data binding relations through an analysis library and an analysis tool; identifying an interface calling mode by using a log analysis tool for the network request log, and grouping the interface calling mode; Analyzing parameter transfer in the grouping process, and identifying parameter dependence by calculating parameter similarity of the comparison request and the response body, wherein the parameter similarity mathematical expression is as follows: Wherein, the Respectively comparing the request parameter set and the parameter set of the response body, In order to compare the request parameters with the request parameters, In response to the parameter(s), Is a Kronecker delta function, Is the number of parameters.
- 3. The method for processing the electric power marketing auxiliary work order based on the large language model according to claim 1, wherein the construction of the unified interface metadata model comprises the steps of extracting interface metadata in an API document by using an analysis tool, extracting interaction data for network requests in a weblog, and integrating the two types of data to construct the interface metadata model; The interface metadata model is defined as JSON Schema format, and the interface metadata types include interface endpoints, request methods, parameter structures, authentication methods, and return formats.
- 4. The method for processing the electric power marketing auxiliary work order based on the large language model according to claim 1, which is characterized in that the business entity and the interface relation thereof are extracted to be used for constructing a domain entity model, the NLP tool is used for identifying the business entity from the work order text and the API document, and the corresponding relation is established among the entity type, the interface and the parameters by combining the analysis result of the parameter transmission mechanism; Identifying a task template and an abnormal processing mode in the historical work order data, grouping the work orders, and representing the occurrence frequency of the task in the historical work order by the support degree of the task template, wherein the mathematical expression is as follows: Wherein T is a task template, number of tickets containing T is the number of worksheets containing the task template T, and Total number of ticket is the total number of worksheets; constructing a knowledge graph based on the extracted interface metadata and the service entity, wherein the knowledge graph comprises nodes and edges; The types of the knowledge graph nodes comprise interfaces, parameters, service objects and user roles; Edges represent relationships, the types of which include call, include; converting the natural language query data and the interface metadata into vector forms, calculating cosine similarity between the two, describing the similarity between the two, and adopting a mathematical expression as follows: Wherein, the For a data vector to be queried in natural language, Is an interface metadata vector; The interface metadata is converted into hash values through standardized preprocessing and a hash algorithm, the hash values of the subsequent interface metadata are compared with the hash values of the original interface metadata, if different hash values occur, the interface metadata need to be updated, the updating strategy is that an interface is added, nodes and edges are automatically added, the interface is modified, the historical nodes are marked by using version control, the interface is deleted, and the archive data is reserved by adopting a soft deletion mode.
- 5. The large language model-based power marketing auxiliary work order processing method of claim 1 or 4, wherein the semantic analysis of the user input comprises the steps of carrying out semantic analysis on the work order description text input by the user based on a pre-training language model, converting the work order description text input by the user into a vector form, and calculating cosine similarity; identifying contextual user intent includes intent classification and entity extraction; the intent classification includes using a neural network model based on an attention mechanism, and the mathematical expression is: Wherein input is input, intent corresponding to the input is input, An embedded representation of the input text for the input work order description, Coding layers of the pre-training language model, W, b being trainable parameters respectively; Combining dialogue history information, fusing the work order description text input and history context of the current user through a gating mechanism, and specifically comprising the following steps: Maintaining dialog states using a gating loop unit: ; Wherein, the Representing the state of the dialog at the current moment, An embedded representation of the current input; the entity extraction comprises the steps of identifying key business entities by adopting a sequence labeling method, and linking the identified entities with nodes in a knowledge graph; The structured intent representation is packaged in JSON format, including intent type, confidence, entity list, and relationship.
- 6. The method of claim 1, wherein generating a multi-level mission plan includes retrieving an interface and a sequence of operations associated with a current intent in a knowledge graph of a power marketing interface using a multi-hop query, generating an abstract mission plan including a target state, constraints, and available operations; Defining an initial state Target state And an intermediate state set Each state transition corresponds to an available operation; The abstract plan is refined into concrete execution steps, an operation dependency graph G (V, E) is constructed, wherein a vertex set (V) represents concrete operation, and an edge set (E) represents sequential constraint among the operations; For each operation, the system extracts complete call parameters, authentication information and expected response formats from the knowledge graph; monitoring interface response time, success rate and error type in the automatic execution process; When an abnormal situation occurs in the monitoring process, analyzing an abnormal reason, and searching a functionally equivalent alternative scheme in a knowledge graph to perform dynamic planning, wherein the method specifically comprises the following steps: Calculating optimal strategy through iterative algorithm The mathematical expression is: Wherein S is the state space of the task execution environment, A is the set of available operations, P (S' |s, a) is the state transfer function, R (S, a) is the reward function, Is a discount factor.
- 7. The method for processing the power marketing auxiliary work order based on the large language model according to claim 1, wherein the mapping relation based on the knowledge graph comprises matching entities and attributes input by a user with target interface parameters; generating parameters used before the interface call comprises generating default values by combining the context user intention in the step S2, and if parameters in a specific format are needed, converting the default values into standardized formats required by the API by using a format converter; constructing a safe and reliable interface call comprises constructing an interface request according to an interface specification stored in a knowledge graph; And introducing an error processing mechanism, checking the validity of the parameters before the request is sent, monitoring the response state in real time in the interface calling process, and implementing automatic retry if temporary errors occur.
- 8. The method for processing the power marketing auxiliary work order based on the large language model according to claim 1, wherein the execution of the result verification comprises the comparison of the actual result returned by the API with the expected result pattern stored in the knowledge graph, wherein the comparison comprises the field integrity check, the data format verification and the business logic verification; executing the result feedback converts the structured API response into a representation that is easy for the user to understand, and the feedback collection source comprises acquiring the user's assessment of the execution effect for updating the knowledge graph.
- 9. The power marketing auxiliary work order processing system based on the large language model is characterized by comprising an interface knowledge graph construction module, a dialogue understanding and task planning construction module and an automatic execution construction module; The interface knowledge graph construction module is used for collecting and analyzing multi-source interface information, constructing a unified interface metadata model, extracting service entities and interface relations thereof and constructing a knowledge graph; the dialogue understanding and task planning construction module performs semantic analysis on user input, recognizes the context user intention, generates a structured intention representation, and generates a multi-level task plan for dynamic planning; the automatic execution construction module is used for identifying parameter information input by a user based on the knowledge graph mapping relation, generating parameters used before interface calling, constructing safe and reliable interface calling, and carrying out execution result verification and execution result feedback.
- 10. The large language model based power marketing auxiliary worksheet processing system of claim 9, wherein the multi-source interface information comprises front-end components, API documents and web request logs in a power marketing 2.0 system; Analyzing the multi-source interface information comprises extracting related attributes of front-end components and API document interface elements and data binding relations through an analysis library and an analysis tool; identifying an interface calling mode by using a log analysis tool for the network request log, and grouping the interface calling mode; Analyzing parameter transfer in the grouping process, and identifying parameter dependence by calculating parameter similarity of the comparison request and the response body, wherein the parameter similarity mathematical expression is as follows: Wherein, the Respectively comparing the request parameter set and the parameter set of the response body, In order to compare the request parameters with the request parameters, In response to the parameter(s), Is a Kronecker delta function, Is the number of parameters.
Description
Electric power marketing auxiliary work order processing method and system based on large language model Technical Field The invention belongs to the technical field of information processing of power marketing business worksheets, and particularly relates to a power marketing auxiliary worksheet processing method and system based on a large language model. Background At present, smart grids are comprehensively popularized, new generation marketing systems are deeply landed, and electric power marketing business is rapidly evolving towards digitization and refinement. The work order processing of the current power marketing 2.0 system mainly depends on a preset rule engine and a robot flow automation technology, the system seriously depends on a manually written fixed flow script, lacks deep semantic understanding capability for a user natural language request, can only perform simple keyword matching, needs the user to input according to a strict format, causes poor interaction experience and limited service efficiency, and has defects of a knowledge management system and lacks unified structural representation and semantic association. The invention patent with the publication number of CN120849606A discloses a method for extracting key elements of electric power marketing business based on natural language processing technology, which is characterized by comprising the steps of 1, defining class labels of electric power marketing business, labeling class labels on business work list texts, constructing a work list data set with labels, extracting work list text feature vectors by using a TF-IDF method, inputting the work list feature vectors into a support vector machine for training, realizing automatic identification of work list business types, 2, collecting and preprocessing electric power marketing business work list texts, converting each Word in the work list texts into a vector with fixed dimension by using Word2Vec, obtaining context information of the words by using a BiLSTM model, labeling Word sequences output by using a BiLSTM model, automatically identifying and labeling entities with different classes, 3, constructing a multi-level element classification model by using a context embedding representation of RoBERTa model, realizing fine granularity extraction of the electric power marketing business key elements, constructing a deep network entity relation extraction relation model based on a attention mechanism, extracting key element similarity, 4, calculating a key element similarity relation by using a policy and a fuzzy algorithm, and optimizing key element similarity by using a policy and a fuzzy algorithm, and optimizing key element quality by using a fuzzy algorithm, and a key element similarity algorithm, and a key element is generated by using a fuzzy algorithm. This prior art suffers from the disadvantage of lacking a unified structural representation associated with semantics and lacking feedback optimization closed loop. This is a disadvantage of the prior art. In view of the foregoing, it is desirable to provide a method and a system for processing an electric power marketing auxiliary work order based on a large language model, so as to solve the above-mentioned drawbacks in the prior art. Disclosure of Invention Aiming at the technical problems of lack of unified structural representation and semantic association and lack of feedback optimization closed loop in the prior art, the invention provides a large language model-based electric power marketing auxiliary work order processing method and system, which are used for solving the technical problems. In a first aspect, the present invention provides a method for processing a power marketing auxiliary work order based on a large language model, including: Step S1, a step of constructing an interface knowledge graph, namely collecting and analyzing multi-source interface information, constructing a unified interface metadata model, extracting service entities and interface relations thereof, and constructing the knowledge graph; the multi-source interface information comprises a front-end component, an API document and a network request log in the power marketing 2.0 system; Analyzing the multi-source interface information comprises extracting related attributes of front-end components and API document interface elements and data binding relations through an analysis library and an analysis tool; identifying an interface calling mode by using a log analysis tool for the network request log, and grouping the interface calling mode; Analyzing parameter transfer in the grouping process, and identifying parameter dependence by calculating parameter similarity of the comparison request and the response body, wherein the parameter similarity mathematical expression is as follows: Wherein, the Respectively comparing the request parameter set and the parameter set of the response body,In order to compare the request parameters with