A power user side service processing method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202610742020.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-27
- Publication Date
- 2026-08-18
AI Technical Summary
[0004]本发明实施例提供一种电力用户侧业务处理方法、装置、电子设备及存储介质,能够解决现有技术中在处理长链路、跨场景电力业务咨询时,因单次检索深度不足与端到端生成缺乏数值硬约束,而导致的核心政策遗漏与核算数值失准的问题
本发明实施例提供一种电力用户侧业务处理方法、装置、电子设备及存储介质。所述方法获取电力政策文档、系统数据以及业务咨询指令;根据电力政策文档构建向量索引库,并根据系统数据构建领域知识图谱;对业务咨询指令进行语义解析,生成初始查询特征;基于当前查询特征,在向量索引库与领域知识图谱中分别进行知识检索,获取知识候选集与关联路径,并融合生成增强知识背景;基于增强知识背景与业务咨询指令生成二次查询特征,并再次执行知识检索,以确定新增电力实体占比;当新增电力实体占比大于预设饱和阈值时,继续执行迭代检索,直至新增电力实体占比小于或等于预设饱和阈值;将停止迭代时生成的增强知识背景输入推理模型,生成包含业务数值占位符的初始执行序列;依据电力业务规则对业务数值进行逻辑校准,并将校准后的业务数值回填至初始执行序列中进行逻辑重构,生成电力用户侧业务处理方案。
Smart Images

Figure CN122596955A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power business data processing technology, specifically to a power user-side business processing method, apparatus, electronic device, and storage medium. Background Technology
[0002] With the deepening construction of smart grids and new power systems, the level of intelligence and standardization in power user-side business processing, encompassing business expansion applications, electricity billing, and electricity policy consultation, has become a core indicator for measuring the service efficiency of power grid companies. Power user-side business is highly specialized and complex; its solutions not only require strict adherence to massive and dynamically updated power policy documents but also necessitate deep integration of the entity logic relationships within the business system.
[0003] However, current intelligent power business processing methods often suffer from technical flaws such as omissions of key information and inaccuracies in underlying accounting values. The main reasons are twofold: First, existing retrieval mechanisms typically employ single, static matching, lacking dynamic perception of knowledge acquisition completeness. The system cannot autonomously determine whether knowledge saturation has been achieved based on intermediate retrieval results, easily leading to the omission of core power entities due to insufficient recall of deeply related knowledge, resulting in gaps in the background basis of the solution. Second, when generating final business execution steps, existing methods often overly rely on generative large models for end-to-end direct output, failing to effectively decouple the planning of the step sequence from specific professional numerical calculations at the underlying logic level. The lack of rigid isolation and verification constraints for power accounting rules makes the output solution prone to computational illusions when dealing with key business parameters, making it difficult to meet the stringent requirements of absolute data accuracy in power business processing. Summary of the Invention
[0004] This invention provides a method, apparatus, electronic device, and storage medium for processing electricity user-side services, which can solve the problems of missing core policies and inaccurate accounting values caused by insufficient depth of single retrieval and lack of hard numerical constraints in end-to-end generation when processing long-link, cross-scenario electricity business inquiries in the prior art.
[0005] An embodiment of the present invention provides a method for processing electricity user-side services, including: Obtain power policy documents, system data, and business consultation instructions; A vector index library was built based on power policy documents, and a domain knowledge graph was constructed based on system data; Semantic parsing of business inquiry instructions generates initial query features; repeated retrieval iterations are performed until the current proportion of newly added entities is less than or equal to the preset saturation threshold. The current enhanced knowledge background generated when the iteration stops is input into the inference model to generate an initial execution sequence containing business value placeholders; the business values in the initial execution sequence are logically calibrated according to the power business rules to generate calibration values, and the calibration values are backfilled into the initial execution sequence for logical reconstruction to generate a power user-side business processing solution. The retrieval iteration operation includes: Based on the current query features, the current first knowledge candidate set and associated paths are extracted from the vector index library and the domain knowledge graph, respectively. The current first power entity set is extracted from the current first knowledge candidate set, and the current first knowledge candidate set and associated paths are fused to generate the current enhanced knowledge background; wherein, the initial query features are the initial query features. The current enhanced knowledge background and business consultation instructions are input into the rewrite model to generate the current secondary query features; the current second knowledge candidate set is extracted from the vector index library based on the current secondary query features, and the current second power entity set is extracted from the current second knowledge candidate set; the current second power entity set is compared with the current first power entity set to determine the current proportion of newly added entities; If the current proportion of newly added entities exceeds the preset saturation threshold, the current secondary query features will be updated to the current query features.
[0006] Furthermore, a vector index library is constructed based on power policy documents, and a domain knowledge graph is built based on system data; semantic parsing is performed on business consultation instructions to generate initial query features, including: An overlapping sliding window is constructed according to a preset window size and a preset step size. The overlapping sliding window is used to segment the power policy document into multiple knowledge fragments. By using a pre-defined language model, each knowledge fragment is mapped to a high-dimensional vector space to generate multiple corresponding text feature vectors, and a vector index library is constructed based on the multiple text feature vectors. Extract entity logical relationships from system data, generate structured triples based on entity logical relationships, and construct a graph topology from the structured triples. The graph topology is mapped into dense vectors using a preset graph embedding algorithm to construct a domain knowledge graph. The business consultation instructions are input into a preset two-way deep feature fusion model to extract global semantic features; The global semantic features are parsed through a pre-defined multi-head attention mechanism to extract core power entities, operational intentions, and contextual constraints. The core power entities, operational intentions, and contextual constraints are integrated to generate a standardized business query representation, which is then used as the initial query feature.
[0007] Furthermore, based on the current query characteristics, the current first knowledge candidate set and associated paths are extracted from the vector index and the domain knowledge graph, respectively. The current first power entity set is extracted from the current first knowledge candidate set, and the current first knowledge candidate set and associated paths are fused to generate the current enhanced knowledge background, including: Based on the current query characteristics, semantic similarity retrieval is performed in the vector index to obtain the current first knowledge candidate set; Based on the current query characteristics, a path search is performed in the domain knowledge graph to mine the logical relationship information between power entities and obtain the relationship path; The system identifies and extracts power-related technical terms from the current first knowledge candidate set using a pre-defined named entity recognition model, and generates the current first power entity set. By using a pre-defined linear mapping layer, the vector features of the current first knowledge candidate set and the path features of the associated paths are projected onto a decision space of a pre-defined dimension for feature concatenation, thus obtaining the current enhanced knowledge background.
[0008] Furthermore, the current enhanced knowledge background and business consultation instructions are input into the rewrite model to generate the current secondary query features; based on the current secondary query features, the current second knowledge candidate set is extracted from the vector index library, and the current second power entity set is extracted from the current second knowledge candidate set, including: The current enhanced knowledge background and business consultation instructions are input into a preset rewriting model based on a reinforcement learning architecture, so that the rewriting model extracts the missing power business constraints from the current enhanced knowledge background and adds the power business constraints to the business consultation instructions to generate the current secondary query features. Based on the current secondary query features, semantic similarity retrieval is performed in the vector index to obtain the current second knowledge candidate set; Extract power-related technical terms from the current second knowledge candidate set to generate the current second power entity set.
[0009] Furthermore, by comparing the current second set of power entities with the current first set of power entities, the current proportion of newly added entities is determined, including: The current second set of power entities is compared with the current first set of power entities to identify power entities in the current second set that are not included in the current first set of power entities, and a new set of entities is generated for this round. The number of power entities included in the newly added entity set in this round is counted to obtain the number of newly added entities in this round; The total number of deduplicated power entities in the current second power entity set is counted to obtain the total number of entities in the current round; Calculate the ratio of the number of newly added entities in this round to the total number of entities in the current round to obtain the current proportion of newly added entities.
[0010] Furthermore, the current enhanced knowledge context generated at the time of stopping iteration is input into the inference model to generate an initial execution sequence containing business numerical placeholders, including: The current enhanced knowledge background generated when the iteration stops is input into the preset inference model so that the inference model can plan business steps and generate a preliminary business execution sequence. Identify and extract the power numerical variables to be calculated from the initial business execution sequence; The power value variables in the initial business execution sequence are replaced with preset business value placeholders to generate an initial execution sequence containing business value placeholders.
[0011] Furthermore, based on the power business rules, the business values in the initial execution sequence are logically calibrated to generate calibration values, which are then backfilled into the initial execution sequence for logical reconstruction, generating a power user-side business processing scheme, including: Obtain the power business rule that matches the initial execution sequence containing business numerical placeholders, wherein the power business rule contains a business calculation formula and a business time constraint standard; Extract the actual business parameters corresponding to the power numerical variables to be calculated from the system data and the current enhanced knowledge context; Based on the business calculation formula and business time limit constraint standards, the actual business parameters are independently logically calculated and compliance verified to generate calibration values that meet the requirements. By replacing the corresponding business value placeholders in the initial execution sequence containing business value placeholders with calibration values, the logic is reconstructed, and a power user-side business processing scheme is generated.
[0012] Based on the above method embodiments, the present invention provides corresponding apparatus embodiments.
[0013] One embodiment of the present invention provides a power user-side business processing device, including: a data acquisition module, a knowledge base construction module, an iterative retrieval module, a sequence generation module, and a logic reconstruction module; The data acquisition module is used to acquire power policy documents, system data, and business consultation instructions; The knowledge base construction module is used to build a vector index library based on power policy documents and to build a domain knowledge graph based on system data. The iterative retrieval module is used to perform semantic parsing of business consultation instructions to generate initial query features; repeatedly execute the retrieval iteration operation until the current entity addition ratio is less than or equal to a preset saturation threshold; the retrieval iteration operation includes: extracting the current first knowledge candidate set and associated paths from the vector index library and the domain knowledge graph respectively based on the current query features, extracting the current first power entity set from the current first knowledge candidate set, and fusing the current first knowledge candidate set and associated paths to generate the current enhanced knowledge background; wherein, the initial query features are the initial query features; inputting the current enhanced knowledge background and business consultation instructions into the rewrite model to generate the current secondary query features; extracting the current second knowledge candidate set from the vector index library based on the current secondary query features, and extracting the current second power entity set from the current second knowledge candidate set; comparing the current second power entity set with the current first power entity set to determine the current entity addition ratio; if the current entity addition ratio is greater than the preset saturation threshold, updating the current secondary query features to the current query features.
[0014] The sequence generation module is used to input the current enhanced knowledge background generated when the iteration stops into the inference model to generate an initial execution sequence containing business value placeholders; The logic reconstruction module is used to perform logical calibration on the business values in the initial execution sequence according to the power business rules to generate calibration values, and then fill the calibration values back into the initial execution sequence for logical reconstruction to generate a power user-side business processing scheme.
[0015] Based on the above method embodiments, the present invention provides corresponding electronic device embodiments.
[0016] An embodiment of the present invention provides an electronic device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements any one of the power user-side service processing methods described in the above-described method embodiments.
[0017] Based on the above method embodiments, the present invention provides corresponding storage medium embodiments.
[0018] One embodiment of the present invention provides a storage medium storing a computer program thereon, wherein, when the computer program is running, it controls the device where the storage medium is located to execute any of the power user-side service processing methods described in the above-described method embodiments.
[0019] Compared with the prior art, the present invention has the following beneficial effects: This invention provides a method, apparatus, electronic device, and storage medium for processing electricity user-side services. The method acquires electricity policy documents, system data, and business consultation instructions; constructs a vector index library based on the electricity policy documents and a domain knowledge graph based on the system data; performs semantic parsing on the business consultation instructions to generate initial query features; based on the current query features, performs knowledge retrieval in the vector index library and the domain knowledge graph respectively to obtain a knowledge candidate set and associated paths, and merges them to generate an enhanced knowledge background; generates secondary query features based on the enhanced knowledge background and the business consultation instructions, and performs knowledge retrieval again to determine the proportion of newly added electricity entities; when the proportion of newly added electricity entities is greater than a preset saturation threshold, iterative retrieval continues until the proportion of newly added electricity entities is less than or equal to the preset saturation threshold; inputs the enhanced knowledge background generated when iteration stops into the inference model to generate an initial execution sequence containing business value placeholders; performs logical calibration on the business values according to electricity business rules, and fills the calibrated business values back into the initial execution sequence for logical reconstruction to generate an electricity user-side service processing scheme.
[0020] This invention, by repeatedly executing iterative retrieval operations and using a stop condition where the current proportion of newly added entities is less than or equal to a preset saturation threshold, empowers the system with the ability to dynamically perceive the completeness of knowledge capture. This effectively solves the problem of core policy omissions caused by the inability of existing technologies to determine whether knowledge capture is saturated due to a single static matching. Simultaneously, this solution sets business value placeholders in advance when generating execution steps, and then forcibly executes logical calibration and placeholder backfilling reconstruction based on power business rules. This achieves underlying decoupling between execution sequence planning and professional data accounting, completely eliminating the numerical calculation illusion phenomenon caused by directly outputting solutions from end-to-end generative models. Attached Figure Description
[0021] Figure 1 This is a flowchart illustrating a power user-side service processing method according to an embodiment of the present invention.
[0022] Figure 2 This is a schematic diagram of the structure of a power user-side service processing device provided in an embodiment of the present invention. Detailed Implementation
[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0024] like Figure 1As shown, to address the problems in existing technologies where insufficient depth of a single search and lack of hard numerical constraints in end-to-end generation lead to omissions of core policies and inaccurate calculations when processing long-link, cross-scenario power business inquiries, an embodiment of the present invention provides a power user-side business processing method, which includes at least the following steps: Step S1: Obtain electricity policy documents, system data, and business consultation instructions; Specifically, publicly released core policy documents of the power industry and local electricity price change notices are collected through network data capture interfaces and database synchronization interfaces. Internal operational guidelines and manuals are also obtained as power policy documents. During the collection phase, incremental data capture is performed by deeply traversing a specific list of Uniform Resource Locators (URLs) using periodic operating rules. For business-side information generated in the underlying management architecture, change data capture technology is used to monitor the update status of structured elements in real time and simultaneously extract past business processing work orders, integrating internal operational records collected from multiple channels into system data. Change data capture technology is a low-level integrated transmission mechanism capable of identifying and extracting changed data from the database. Using change data capture technology, the synchronization process of business information can be controlled at extremely low latency, ensuring that the extracted underlying data elements have strict timeliness and synchronization characteristics.
[0025] For real interactive requests received by the terminal, marketing-related inquiry texts and various business application actions sent by power users are extracted, and the collected front-end input information is uniformly aggregated into business consultation instructions. To improve the purity of the front-end input information, after acquiring multi-source raw data, deduplication and standardization cleaning operations based on the Locality Sensitive Hashing (LSH) algorithm are performed. LSH is a dimensionality reduction classification method that maps data points that are close in distance in a high-dimensional space to the same computing bucket with a very high probability to achieve rapid similarity screening. By using LSH to calculate the similarity correlation between various documents, redundant text with excessive repetition rates can be accurately removed, and colloquial irrelevant words and invalid garbled characters can be filtered simultaneously. Completing the targeted collection and deep cleaning of multi-source underlying elements provides a comprehensive and pure data support foundation for building a domain association network and a high-dimensional retrieval space, ensuring from the source that the subsequently generated business processing suggestions closely align with the latest industry constraints and standards and the objective operational status.
[0026] Step S2: Construct a vector index library based on power policy documents and construct a domain knowledge graph based on system data; In a preferred embodiment, a vector index library is constructed based on electricity policy documents, and a domain knowledge graph is constructed based on system data, including: An overlapping sliding window is constructed according to a preset window size and a preset step size. The overlapping sliding window is used to segment the power policy document into multiple knowledge fragments. By using a pre-defined language model, each knowledge fragment is mapped to a high-dimensional vector space to generate multiple corresponding text feature vectors, and a vector index library is constructed based on the multiple text feature vectors. Extract entity logical relationships from system data, generate structured triples based on entity logical relationships, and construct a graph topology from the structured triples. The graph topology is mapped into dense vectors using a preset graph embedding algorithm to construct a domain knowledge graph.
[0027] Specifically, based on the acquired electricity policy documents, an overlapping sliding window is constructed according to a preset window size and a preset step size. The preset window size and preset step size are set in advance by the R&D personnel based on statistical analysis of the average paragraph character length of past electricity marketing texts. The principle for obtaining the preset window size and preset step size is to strictly balance the semantic integrity preservation requirements of long electricity marketing policy texts with the fixed input dimension constraints of the underlying transformer architecture matrix operations. The preset window size is specifically set to 512 character units, and the preset step size is specifically set to 128 character units. Sliding and truncating according to the overlapping interval of 128 character units ensures that the continuous electricity business expansion processing rules that cross physical segments are not forcibly broken.
[0028] The overlapping sliding window construction method ensures the semantic continuity of adjacent knowledge fragments, preventing physical breaks in key business information at document truncation points. By using an overlapping sliding window to sequentially slide and truncate along the text sequence of the power policy document, the document is segmented, generating multiple independent and partially overlapping knowledge fragments.
[0029] After obtaining multiple knowledge fragments, each fragment is mapped to a high-dimensional vector space using a pre-defined language model to generate corresponding text feature vectors. The pre-trained language model employs a transformer-based architecture and is trained unsupervised using a masked language modeling task on a massive corpus of power-related texts before deployment. The specific network architecture of the pre-defined language model is constructed using the standard bidirectional encoder representation model architecture found in existing technologies. This architecture contains 12 stacked self-attention encoding layers and a multi-layer feedforward neural network. The training process of the pre-defined language model includes: acquiring a massive amount of unlabeled power industry text sequences; replacing some power-related terms with masked labels according to a pre-defined masking ratio and inputting them into the network architecture; learning the dependency mapping relationship between the masked labels and surrounding contextual text features through a low-level self-attention mechanism; calculating the cross-entropy loss function between the predicted words output by the network and the actual masked words; and finally, applying a backpropagation algorithm and an adaptive moment estimation optimizer to progressively update the weights of the neurons within the bidirectional encoder representation model architecture until the convergence value of the cross-entropy loss function reaches its optimal state.
[0030] During the mapping process, global semantic features of knowledge fragments are extracted through pooling operations, and these fragments are converted into text feature vectors of fixed dimensions. To reduce the physical storage resource consumption of the underlying high-dimensional vector space, product quantization is used to further divide the high-dimensional text feature vectors into multiple sub-vector spaces for independent quantization and encoding. A vector index library is constructed based on multiple text feature vectors, using a hierarchical navigation small-world topology architecture. To measure the distance between different text feature vectors within the vector space for similarity screening, cosine similarity is used for distance measurement. The corresponding mathematical formula is as follows: In the formula, This represents the similarity metric score between the feature vector to be compared and the candidate feature vectors in the vector index library; This represents the input feature vector to be compared; This represents the candidate feature vectors fixed within the vector index library; This represents the total number of dimensions corresponding to the text feature vector; This represents the index variable of the specific vector dimension currently being calculated as a dot product; This indicates that the input feature vector to be compared is at the th... The specific numerical values corresponding to each dimension; This indicates that the candidate feature vector fixed in the vector index library is at the 1st... The specific numerical values corresponding to each dimension.
[0031] For the acquired system data, a pre-built named entity recognition network and relation extraction model are used to extract logical relationships between entities. The extraction of logical relationships aims to extract core category entities and the interconnections between different core category entities from the structured and semi-structured underlying operational elements. Structured triples are generated based on these logical relationships. Each structured triple contains a head entity, a tail entity, and a relation vector connecting the head and tail entities. All extracted structured triples interweave to form a graph topology, which objectively reflects the underlying logical network characteristics of the power marketing operation entity categories.
[0032] Based on the constructed graph topology, a pre-defined graph embedding algorithm maps the graph topology into dense vectors. This algorithm employs a node vectorization mapping algorithm based on a random walk mechanism. The algorithm generates node sequences by executing a biased walk strategy on the graph topology and utilizes a skip-word model to maximize the probability of co-occurrence between target nodes and their logical neighbors, thus accurately mapping the discrete graph topology into low-dimensional continuous dense vectors. All dense vectors are then aggregated to construct a domain knowledge graph. Through mapping operations, the logical relationships contained within the domain knowledge graph can be jointly mathematically operated with the text feature vectors within the same dimensional feature decision space.
[0033] By transforming static text files into a high-dimensional vector index architecture and weaving discrete business logic into a graph structure that can be jointly computed, the physical isolation barrier between the underlying unstructured text and structured business elements is broken down, providing a structured foundation with complete underlying features for subsequent deep semantic association analysis and high-precision rule addressing.
[0034] Step S3: Perform semantic parsing on the business inquiry instruction to generate initial query features; repeat the retrieval iteration operation until the current proportion of newly added entities is less than or equal to the preset saturation threshold; In a preferred embodiment, the retrieval iteration operation includes: Based on the current query features, the current first knowledge candidate set and associated paths are extracted from the vector index library and the domain knowledge graph, respectively. The current first power entity set is extracted from the current first knowledge candidate set, and the current first knowledge candidate set and associated paths are fused to generate the current enhanced knowledge background; wherein, the initial query features are the initial query features. The current enhanced knowledge background and business consultation instructions are input into the rewrite model to generate the current secondary query features; the current second knowledge candidate set is extracted from the vector index library based on the current secondary query features, and the current second power entity set is extracted from the current second knowledge candidate set; the current second power entity set is compared with the current first power entity set to determine the current proportion of newly added entities; If the current proportion of newly added entities exceeds the preset saturation threshold, the current secondary query features will be updated to the current query features.
[0035] In a preferred embodiment, semantic parsing of the business inquiry instruction generates initial query features, including: The business consultation instructions are input into a preset two-way deep feature fusion model to extract global semantic features; The global semantic features are parsed through a pre-defined multi-head attention mechanism to extract core power entities, operational intentions, and contextual constraints. The core power entities, operational intentions, and contextual constraints are integrated to generate a standardized business query representation, which is then used as the initial query feature.
[0036] In a preferred embodiment, based on the current query features, the current first knowledge candidate set and associated paths are extracted from the vector index and the domain knowledge graph, respectively. The current first power entity set is extracted from the current first knowledge candidate set, and the current first knowledge candidate set and associated paths are fused to generate the current enhanced knowledge background, including: Based on the current query characteristics, semantic similarity retrieval is performed in the vector index to obtain the current first knowledge candidate set; Based on the current query characteristics, a path search is performed in the domain knowledge graph to mine the logical relationship information between power entities and obtain the relationship path; The system identifies and extracts power-related technical terms from the current first knowledge candidate set using a pre-defined named entity recognition model, and generates the current first power entity set. By using a pre-defined linear mapping layer, the vector features of the current first knowledge candidate set and the path features of the associated paths are projected onto a decision space of a pre-defined dimension for feature concatenation, thus obtaining the current enhanced knowledge background.
[0037] In a preferred embodiment, the current enhanced knowledge background and business consultation instructions are input into the rewrite model to generate the current secondary query features; based on the current secondary query features, the current second knowledge candidate set is extracted from the vector index library, and the current second power entity set is extracted from the current second knowledge candidate set, including: The current enhanced knowledge background and business consultation instructions are input into a preset rewriting model based on a reinforcement learning architecture, so that the rewriting model extracts the missing power business constraints from the current enhanced knowledge background and adds the power business constraints to the business consultation instructions to generate the current secondary query features. Based on the current secondary query features, semantic similarity retrieval is performed in the vector index to obtain the current second knowledge candidate set; Extract power-related technical terms from the current second knowledge candidate set to generate the current second power entity set.
[0038] In a preferred embodiment, comparing the current second set of power entities with the current first set of power entities to determine the current proportion of newly added entities includes: The current second set of power entities is compared with the current first set of power entities to identify power entities in the current second set that are not included in the current first set of power entities, and a new set of entities is generated for this round. The number of power entities included in the newly added entity set in this round is counted to obtain the number of newly added entities in this round; The total number of deduplicated power entities in the current second power entity set is counted to obtain the total number of entities in the current round; Calculate the ratio of the number of newly added entities in this round to the total number of entities in the current round to obtain the current proportion of newly added entities.
[0039] Specifically, upon receiving a business consultation instruction, the instruction is input into a pre-defined bidirectional deep feature fusion model to extract global semantic features. This model is built upon a multi-layer transformer network architecture and trained using an unsupervised masked language modeling task on a massive dataset of electricity laws and regulations and historical customer service recordings. The network architecture of this model is also based on a multi-layer transformer encoder, internally configured with 16 independently running self-attention head computation modules. During the parsing phase, the pre-defined multi-head attention mechanism multiplies the input global semantic features by three different pre-defined parameter matrices to generate a query matrix, a key matrix, and a value matrix. Then, the dot product of the transpose of the query matrix and the key matrix is calculated, and after normalization using an exponential function, an attention weight distribution map is generated. The value matrix is then weighted and summed using the attention weight distribution map, thereby accurately extracting and focusing on a few key vector dimensions representing core electricity entities, operational intentions, and contextual constraints in the long text input sequence.
[0040] After extracting the global semantic features, a pre-defined multi-head attention mechanism is used to parse them. This mechanism maps the input feature vectors in parallel to multiple independent representation subspaces for weight allocation, thereby independently extracting core power entities, operational intentions, and contextual constraints. For industrial customer peak-valley-flat electricity price switching applications, the core power entities include the industrial customer category and peak-valley-flat electricity price variables; the operational intentions include policy consultation and business application actions; and the contextual constraints include whether the current date is within the policy validity period and the corresponding electricity price execution rules associated with the power supply zone. The extracted core power entities, operational intentions, and contextual constraints are then combined and dimensionality-reduced to generate a standardized business query representation. This business query representation is used as the initial query feature to initiate subsequent iterative retrieval processes.
[0041] The current query features are set to equal the initial query features. Semantic similarity retrieval is performed in the vector index based on the current query features, and the inner product distance between the query vector and each reserve vector is calculated to obtain the current first knowledge candidate set. Simultaneously, path search is performed in the domain knowledge graph based on the current query features to mine logical relationships between power entities. The search process strictly controls the number of logical hops in the outward extension to obtain the associated paths. After acquiring text and graph data, a pre-defined named entity recognition model is used to identify and extract power-related terms contained in the current first knowledge candidate set. The pre-defined named entity recognition model is built using a bidirectional long short-term memory network combined with a conditional random field and trained on a manually annotated power entity corpus. The network architecture of the pre-defined named entity recognition model consists of two layers of long short-term memory networks in opposite directions at the bottom layer, and a concatenated conditional random field decoding layer at the top layer. The training phase includes the following steps: inputting a sequence of power-related texts with standard business entity labels; the underlying Long Short-Term Memory (LSTM) network extracts the forward and reverse context sequence features of the text sequence and fuses them into a concatenated latent vector; the Conditional Random Field (CRF) decoding layer receives the concatenated latent vector and learns the hard transition constraint probabilities between adjacent business entity labels, avoiding unreasonable sequence combinations such as action labels closely following classification labels; finally, the maximum likelihood estimation rule is used to maximize the predicted probability of the real business entity label sequence, completing the preset parameter training operation of the named entity recognition model.
[0042] The first set of power entities is generated through sequence labeling. A pre-defined linear mapping layer projects the vector features of the first knowledge candidate set and the path features of the associated paths onto a decision space of a pre-defined dimension for feature concatenation. The value of the pre-defined dimension is determined through network parameter tuning experiments. The enhanced knowledge background is obtained through feature concatenation operations.
[0043] The current enhanced knowledge background and business consultation instructions are input into a pre-defined reinforcement learning-based rewriting model. This model uses policy gradient descent as its underlying mechanism for updating model parameters. The underlying network of the pre-defined reinforcement learning-based rewriting model employs a sequence-to-sequence generation architecture including an encoder and a decoder. During training iterations, the state space is defined as a fused representation vector of the current enhanced knowledge background and the original input, and the action space is defined as the set of text word sequences generated sequentially by the decoder. After generating a complete simulated retrieval statement, the corresponding reward feedback value is calculated using the aforementioned pre-configured reward function. Based on the policy gradient theorem, the reward feedback value is used as the optimization guide for the loss function, prompting the decoder network to tend to generate short supplementary text words that can obtain higher reward feedback values.
[0044] When training the pre-configured reinforcement learning-based rewriting model, a pre-configured reward function is used to evaluate the quality of the generated text. The pre-configured reward function calculates the final reward value by comprehensively considering semantic relevance and information complementarity increments. The mathematical expression of the pre-configured reward function is as follows: In the formula, This represents the overall reward evaluation score calculated by the pre-configured reward function. This represents a quantitative value indicating the semantic relevance between the current secondary query features and the retrieval target. This indicates the number of new power entities introduced in the current search round; This represents the total number of deduplicated power entities contained in the candidate knowledge fragments of the current round; This indicates the character length metric value included in the current secondary query feature; This represents the first preset weight adjustment coefficient; This represents the second preset weight adjustment coefficient; This represents the third preset weight adjustment coefficient.
[0045] The specific method for obtaining the first, second, and third preset weight adjustment coefficients is as follows: A grid search hyperparameter optimization algorithm is used to perform multiple rounds of trial calculations and evaluations on a pre-preserved cross-validation dataset of power business data. The principle behind this determination is to ensure that semantic relevance plays an absolutely dominant role in reward calculation, while using the incremental ratio containing the number of new power entities to provide exploration guidance, and using a penalty term containing a character length metric to prevent excessively verbose rewritten text from causing overflow of underlying tensor computation resources.
[0046] During the actual business reasoning phase, the current enhanced knowledge background and business consultation instructions are input into a pre-defined rewriting model based on a reinforcement learning architecture. This model extracts missing power business constraints from the current enhanced knowledge background and inserts these supplementary constraints directly into the business consultation instructions, generating the expanded secondary query features. Based on these secondary query features, semantic similarity is performed again in the vector index library to obtain the current second knowledge candidate set. From this second knowledge candidate set, a pre-defined named entity recognition model is used to extract power-related technical terms, generating the current second power entity set.
[0047] To accurately quantify the information gain from multiple rounds of retrieval, the current second set of power entities is compared with the current first set of power entities to determine the current proportion of newly added entities. A set comparison is performed between the current second set of power entities and the current first set of power entities, and a mathematical set difference operation is executed to identify power entities in the current second set that are not included in the current first set, generating the set of newly added entities for this round. The absolute number of power entities included in this round's set is counted to obtain the number of newly added entities for this round. To prevent duplicate data from affecting the accuracy of the proportion calculation, duplicate entity items in the current second set of power entities are removed, and the total number of deduplicated power entities in the current second set is counted to obtain the total number of entities in the current round. The ratio of the number of newly added entities in this round to the total number of entities in the current round is calculated to obtain the current proportion of newly added entities.
[0048] The algorithm determines the relationship between the current percentage of newly added entities and a preset saturation threshold. The preset saturation threshold is set by statistically analyzing the critical inflection point of information gain convergence in historical multi-round retrieval tasks. The principle behind setting the preset saturation threshold is to quantitatively identify the critical blocking point where the marginal benefit of knowledge acquisition diminishes. The specific value of the preset saturation threshold is set to five percent. When the proportion of newly added unknown electricity entities to the total number of candidate knowledge fragment entities is less than five percent, it objectively indicates that the core procedural clauses highly relevant to the current business consultation instruction in the underlying vector index library have been completely traversed and extracted. Continuing to force iterative retrieval operations will only introduce irrelevant background noise information, thereby interfering with the subsequent business logic deduction process of the inference model.
[0049] If the current proportion of newly added entities exceeds the preset saturation threshold, it indicates that the new round of retrieval has still supplemented a large number of unknown key business elements. The current secondary query features are then updated to the current query features, and the retrieval iteration operation is restarted. If the current proportion of newly added entities is less than or equal to the preset saturation threshold, the loop retrieval operation stops. Executing continuously feedback-based retrieval iterations and dynamic rewriting control operations can completely eliminate the potential logical gaps inherent in a single surface-level semantic search, ensuring that the final extracted enhanced knowledge background seamlessly covers all compliance node constraints involved in the complex long-chain power marketing process.
[0050] Step S4: Input the current enhanced knowledge background generated when the iteration stops into the inference model to generate an initial execution sequence containing business value placeholders; perform logical calibration on the business values in the initial execution sequence according to the power business rules to generate calibration values, and fill the calibration values back into the initial execution sequence for logical reconstruction to generate a power user-side business processing solution. In a preferred embodiment, the current enhanced knowledge context generated at the time of stopping iteration is input into the inference model to generate an initial execution sequence containing business numerical placeholders, including: The current enhanced knowledge background generated when the iteration stops is input into the preset inference model so that the inference model can plan business steps and generate a preliminary business execution sequence. Identify and extract the power numerical variables to be calculated from the initial business execution sequence; The power value variables in the initial business execution sequence are replaced with preset business value placeholders to generate an initial execution sequence containing business value placeholders.
[0051] In a preferred embodiment, the service values in the initial execution sequence are logically calibrated according to power service rules to generate calibration values, and the calibration values are then backfilled into the initial execution sequence for logical reconstruction to generate a power user-side service processing scheme, including: Obtain the power business rule that matches the initial execution sequence containing business numerical placeholders, wherein the power business rule contains a business calculation formula and a business time constraint standard; Extract the actual business parameters corresponding to the power numerical variables to be calculated from the system data and the current enhanced knowledge context; Based on the business calculation formula and business time limit constraint standards, the actual business parameters are independently logically calculated and compliance verified to generate calibration values that meet the requirements. By replacing the corresponding business value placeholders in the initial execution sequence containing business value placeholders with calibration values, the logic is reconstructed, and a power user-side business processing scheme is generated.
[0052] Specifically, the current enhanced knowledge background generated at the time of stopping iteration is input into a pre-defined inference model. This pre-defined inference model employs a large-scale transformer network architecture with billions of parameters. It is pre-trained using a professional corpus of electricity marketing instructions to fine-tune the model for electricity business scenarios. Furthermore, to reduce physical memory usage during computation, the pre-defined inference model is compressed and optimized using integer bit-width quantization before deployment to the production environment. This allows the pre-defined inference model to plan business steps based on the current enhanced knowledge background, deduce the logical sequence of business processing and response text, and generate a preliminary business execution sequence. Because generative network models inherently suffer from randomized results when handling rigorous numerical values and compliance constraints, it is necessary to identify and extract the electricity numerical variables to be calculated from the preliminary business execution sequence. This extraction process utilizes a regular expression matching algorithm to scan numerical nodes with units of measurement and time nodes in the preliminary business execution sequence. After successfully locating key nodes, the power value variables in the initial business execution sequence are replaced with preset business value placeholders to generate an initial execution sequence containing business value placeholders. In this way, a pure business process text skeleton without specific actual values but with logical coherence is built using business value placeholders.
[0053] After constructing the pure business process text skeleton, it is necessary to obtain the power business rules that match the initial execution sequence containing business numerical placeholders. Power business rules are pre-defined and stored in a local high-priority rule verification database. These rules include business calculation formulas and business time constraint standards. The actual business parameters corresponding to the power numerical variables to be calculated are retrieved from system data and the current enhanced knowledge context. Based on the business calculation formulas and business time constraint standards, the actual business parameters undergo independent logical calculation and compliance verification, completely detached from the generative network model. For business scenarios involving large industrial electricity billing, the business calculation formula uses the following electricity billing mathematical relationship to perform rigorous mathematical operations on the actual business parameters: In the formula, This represents the total electricity bill amount generated through independent logical calculation; Indicates the total number of time periods divided within the billing cycle; Index variables representing specific time periods; This represents the actual electricity consumption during the j-th time period; This indicates the first match automatically generated based on regional rules. The standard electricity price for each time period; This represents the basic electricity cost calculated based on transformer capacity or maximum demand. This refers to the power factor adjustment electricity fee calculated based on the power factor assessment standard.
[0054] The extracted actual business parameters are substituted into the aforementioned business calculation formula to calculate an absolutely accurate cost value. Simultaneously, compliance verification of the time-dimensional parameters is performed in conjunction with business time limit constraints. When processing low-voltage non-residential user installation applications, the business time limit constraints mandate that the business completion time for responding to users be within three working days, correcting potential time-limit errors in the initial business execution sequence. After independent logical calculation and compliance verification, a compliant calibration value is generated. The calibration value is used to precisely replace the corresponding business value placeholders in the initial execution sequence containing business value placeholders, completing the overall logical reconstruction and ultimately generating a power user-side business processing solution. By establishing a rule verification mechanism based on physical isolation to strip away the computational authority of the large model and perform value backfilling and reconstruction operations, the inherent defects of generative agents, which are prone to numerical deviations and logical illusions when handling complex and rigorous business processes, are completely avoided. This ensures the natural and fluent service interaction text while endowing the final business processing solution with absolute policy rigor and zero calculation error.
[0055] To enable those skilled in the art to more thoroughly understand the complete execution chain logic of the present invention, two specific application examples of power marketing business scenarios are provided below.
[0056] Example 1 primarily addresses the low-voltage business expansion application scenario for micro and small enterprises (MSEs) involving complex constraints. The obtained business consultation instruction is a zero-investment application submitted by a MSE in a certain region. Semantic parsing accurately identifies the core power entity as a MSE, the operational intent as a business expansion application, and the contextual constraint as a zero-investment policy. Entering the retrieval iteration phase, the first round of retrieval extracts general low-voltage application conditions and basic processes as the current first knowledge candidate set. The pre-set reinforcement learning-based rewrite model discovers a missing regional capacity restriction regulation, and subsequently generates secondary query features. A second retrieval extracts the hard constraint policy specific to the current region, stipulating that the connection capacity must not exceed 160 kVA. At this point, the current entity's new application rate is 2%, less than the pre-set saturation threshold of 5%, triggering a stop-iteration action. The current enhanced knowledge background includes the complete general process and regionally specific capacity restriction regulations, which are then input into the pre-set inference model. The pre-defined reasoning model constructs a preliminary business execution sequence including application acceptance and on-site inspection nodes, but the completion time node is left blank and replaced with a business value placeholder. After extracting the business time limit constraint standard, an independent compliance verification operation is performed, forcing the final completion time limit for replying to the user to be calculated as no more than 3 working days. Using this calibration value of no more than 3 working days to replace the business value placeholder, the logic is restructured, and an impeccable application response plan is output externally.
[0057] Example 2 primarily addresses the scenario of appealing high-energy-consuming electricity bills from industrial customers. The obtained business inquiry instruction requests verification of the detailed text of the previous month's large industrial electricity bill. After stopping the iteration operation, the generated current enhanced knowledge background covers the four-period billing rules (peak, off-peak, and valley) and the maximum demand basic electricity fee assessment standard. In the preliminary business execution sequence generated by the preset inference model, the total electricity bill amount and the itemized amounts for each period are replaced by preset business value placeholders. The aforementioned electricity billing mathematical relationship business calculation formula is retrieved, and the actual electricity consumption corresponding to the peak, off-peak, normal, and valley periods of the previous month for the industrial customer is extracted from the system data and mapped to the time-of-use electricity price set for the corresponding region. After independent mathematical multiplication and addition operations strictly separate from the preset inference model itself, the total electricity bill amount is calculated to the percentile level. The accurate total electricity bill amount is filled back into the corresponding business value placeholder in the bill reply text skeleton, ensuring that the output electricity bill verification reply solution has an unquestionable level of financial accuracy.
[0058] Based on the above method embodiments, the present invention provides corresponding apparatus embodiments.
[0059] like Figure 2As shown, an embodiment of the present invention provides a power user-side business processing device, including: a data acquisition module, a knowledge base construction module, an iterative retrieval module, a sequence generation module, and a logic reconstruction module; The data acquisition module is used to acquire power policy documents, system data, and business consultation instructions; The knowledge base construction module is used to build a vector index library based on power policy documents and to build a domain knowledge graph based on system data. The iterative retrieval module is used to perform semantic parsing of business consultation instructions to generate initial query features; repeatedly execute the retrieval iteration operation until the current entity addition ratio is less than or equal to a preset saturation threshold; the retrieval iteration operation includes: extracting the current first knowledge candidate set and associated paths from the vector index library and the domain knowledge graph respectively based on the current query features, extracting the current first power entity set from the current first knowledge candidate set, and fusing the current first knowledge candidate set and associated paths to generate the current enhanced knowledge background; wherein, the initial query features are the initial query features; inputting the current enhanced knowledge background and business consultation instructions into the rewrite model to generate the current secondary query features; extracting the current second knowledge candidate set from the vector index library based on the current secondary query features, and extracting the current second power entity set from the current second knowledge candidate set; comparing the current second power entity set with the current first power entity set to determine the current entity addition ratio; if the current entity addition ratio is greater than the preset saturation threshold, updating the current secondary query features to the current query features.
[0060] The sequence generation module is used to input the current enhanced knowledge background generated when the iteration stops into the inference model to generate an initial execution sequence containing business value placeholders; The logic reconstruction module is used to perform logical calibration on the business values in the initial execution sequence according to the power business rules to generate calibration values, and then fill the calibration values back into the initial execution sequence for logical reconstruction to generate a power user-side business processing scheme.
[0061] In a preferred embodiment, the iterative retrieval module extracts the current first knowledge candidate set and associated paths from the vector index library and the domain knowledge graph respectively based on the current query features, extracts the current first power entity set from the current first knowledge candidate set, and merges the current first knowledge candidate set and associated paths to generate the current enhanced knowledge background, including: Based on the current query characteristics, semantic similarity retrieval is performed in the vector index to obtain the current first knowledge candidate set; Based on the current query characteristics, a path search is performed in the domain knowledge graph to mine the logical relationship information between power entities and obtain the relationship path; The system identifies and extracts power-related technical terms from the current first knowledge candidate set using a pre-defined named entity recognition model, and generates the current first power entity set. By using a pre-defined linear mapping layer, the vector features of the current first knowledge candidate set and the path features of the associated paths are projected onto a decision space of a pre-defined dimension for feature concatenation, thus obtaining the current enhanced knowledge background.
[0062] In a preferred embodiment, the iterative retrieval module inputs the current enhanced knowledge background and business consultation instructions into the rewrite model to generate the current secondary query features; extracts the current second knowledge candidate set from the vector index library based on the current secondary query features, and extracts the current second power entity set from the current second knowledge candidate set, including: The current enhanced knowledge background and business consultation instructions are input into a preset rewriting model based on a reinforcement learning architecture, so that the rewriting model extracts the missing power business constraints from the current enhanced knowledge background and adds the power business constraints to the business consultation instructions to generate the current secondary query features. Based on the current secondary query features, semantic similarity retrieval is performed in the vector index to obtain the current second knowledge candidate set; Extract power-related technical terms from the current second knowledge candidate set to generate the current second power entity set.
[0063] In a preferred embodiment, the iterative retrieval module compares the current second power entity set with the current first power entity set to determine the current proportion of newly added entities, including: The current second set of power entities is compared with the current first set of power entities to identify power entities in the current second set that are not included in the current first set of power entities, and a new set of entities is generated for this round. The number of power entities included in the newly added entity set in this round is counted to obtain the number of newly added entities in this round; The total number of deduplicated power entities in the current second power entity set is counted to obtain the total number of entities in the current round; Calculate the ratio of the number of newly added entities in this round to the total number of entities in the current round to obtain the current proportion of newly added entities.
[0064] In a preferred embodiment, the sequence generation module inputs the current enhanced knowledge background generated at the time of stopping iteration into the inference model to generate an initial execution sequence containing business numerical placeholders, including: The current enhanced knowledge background generated when the iteration stops is input into the preset inference model so that the inference model can plan business steps and generate a preliminary business execution sequence. Identify and extract the power numerical variables to be calculated from the initial business execution sequence; The power value variables in the initial business execution sequence are replaced with preset business value placeholders to generate an initial execution sequence containing business value placeholders.
[0065] It should be noted that the embodiments of the apparatus described above correspond to the embodiments of the present invention described above, and can implement any of the power user-side service processing methods described above. Furthermore, the embodiments of the apparatus described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Additionally, in the accompanying drawings of the apparatus embodiments provided by the present invention, the connection relationship between modules indicates that they have a communication connection, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without creative effort.
[0066] Based on the above-described method embodiments of the present invention, a corresponding embodiment of an electronic device is provided.
[0067] An embodiment of the present invention provides an electronic device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the power user-side service processing method according to any one of the present invention, or the processor executes the computer program to implement the functions of each module in the above-described device embodiments.
[0068] For example, the computer program may be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the terminal device.
[0069] The terminal device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0070] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal device, connecting all parts of the terminal device via various interfaces and lines.
[0071] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the terminal device by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function, etc.; the data storage area may store data created based on the use of the mobile phone, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital card (SD card), flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0072] Based on the above method embodiments, the present invention provides corresponding storage medium embodiments; Another embodiment of the present invention provides a storage medium including a stored computer program, wherein, when the computer program is running, it controls the device where the storage medium is located to execute any of the above-described power user-side service processing methods of the present invention.
[0073] The aforementioned storage medium is a computer-readable storage medium, and the computer program includes computer program code, which may be in the form of source code, object code, executable file, or certain intermediate forms. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.
[0074] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.
[0075] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A power consumer side service processing method, characterized by, include: Obtain power policy documents, system data, and business consultation instructions; A vector index library was built based on power policy documents, and a domain knowledge graph was constructed based on system data; Semantic parsing of business inquiry instructions generates initial query features; Repeat the retrieval iteration operation until the current proportion of newly added entities is less than or equal to the preset saturation threshold; The current enhanced knowledge background generated when the iteration stops is input into the inference model to generate an initial execution sequence containing business value placeholders; the business values in the initial execution sequence are logically calibrated according to the power business rules to generate calibration values, and the calibration values are backfilled into the initial execution sequence for logical reconstruction to generate a power user-side business processing solution. The retrieval iteration operation includes: Based on the current query features, the current first knowledge candidate set and associated paths are extracted from the vector index library and the domain knowledge graph, respectively. The current first power entity set is extracted from the current first knowledge candidate set, and the current first knowledge candidate set and associated paths are fused to generate the current enhanced knowledge background; wherein, the initial query features are the initial query features. The current enhanced knowledge background and business consultation instructions are input into the rewrite model to generate the current secondary query features; the current second knowledge candidate set is extracted from the vector index library based on the current secondary query features, and the current second power entity set is extracted from the current second knowledge candidate set; the current second power entity set is compared with the current first power entity set to determine the current proportion of newly added entities; If the current proportion of newly added entities exceeds the preset saturation threshold, the current secondary query features will be updated to the current query features.
2. The power user-side service processing method as described in claim 1, characterized in that, A vector index library was constructed based on power policy documents, and a domain knowledge graph was built based on system data; semantic parsing was performed on business consultation instructions to generate initial query features, including: An overlapping sliding window is constructed according to a preset window size and a preset step size. The overlapping sliding window is used to segment the power policy document into multiple knowledge fragments. By using a pre-defined language model, each knowledge fragment is mapped to a high-dimensional vector space to generate multiple corresponding text feature vectors, and a vector index library is constructed based on the multiple text feature vectors. Extract entity logical relationships from system data, generate structured triples based on entity logical relationships, and construct a graph topology from the structured triples. The graph topology is mapped into dense vectors using a preset graph embedding algorithm to construct a domain knowledge graph. The business consultation instructions are input into a preset two-way deep feature fusion model to extract global semantic features; The global semantic features are parsed through a pre-defined multi-head attention mechanism to extract core power entities, operational intentions, and contextual constraints. The core power entities, operational intentions, and contextual constraints are integrated to generate a standardized business query representation, which is then used as the initial query feature.
3. The power user-side service processing method as described in claim 2, characterized in that, Based on the current query characteristics, the current first knowledge candidate set and associated paths are extracted from the vector index and the domain knowledge graph, respectively. The current first power entity set is extracted from the current first knowledge candidate set, and the current first knowledge candidate set and associated paths are fused to generate the current enhanced knowledge background, including: Based on the current query characteristics, semantic similarity retrieval is performed in the vector index to obtain the current first knowledge candidate set; Based on the current query characteristics, a path search is performed in the domain knowledge graph to mine the logical relationship information between power entities and obtain the relationship path; The system identifies and extracts power-related technical terms from the current first knowledge candidate set using a pre-defined named entity recognition model, and generates the current first power entity set. By using a pre-defined linear mapping layer, the vector features of the current first knowledge candidate set and the path features of the associated paths are projected onto a decision space of a pre-defined dimension for feature concatenation, thus obtaining the current enhanced knowledge background.
4. The power user-side service processing method as described in claim 3, characterized in that, The current enhanced knowledge background and business consultation instructions are input into the rewritten model to generate the current secondary query features; based on the current secondary query features, the current second knowledge candidate set is extracted from the vector index library, and the current second power entity set is extracted from the current second knowledge candidate set, including: The current enhanced knowledge background and business consultation instructions are input into a preset rewriting model based on a reinforcement learning architecture, so that the rewriting model extracts the missing power business constraints from the current enhanced knowledge background and adds the power business constraints to the business consultation instructions to generate the current secondary query features. Based on the current secondary query features, semantic similarity retrieval is performed in the vector index to obtain the current second knowledge candidate set; Extract power-related technical terms from the current second knowledge candidate set to generate the current second power entity set.
5. The power user-side service processing method as described in claim 4, characterized in that, By comparing the current second set of power entities with the current first set of power entities, the current percentage of newly added entities is determined, including: The current second set of power entities is compared with the current first set of power entities to identify power entities in the current second set that are not included in the current first set of power entities, and a new set of entities is generated for this round. The number of power entities included in the newly added entity set in this round is counted to obtain the number of newly added entities in this round; The total number of deduplicated power entities in the current second power entity set is counted to obtain the total number of entities in the current round; Calculate the ratio of the number of newly added entities in this round to the total number of entities in the current round to obtain the current proportion of newly added entities.
6. The power user-side service processing method as described in claim 5, characterized in that, The current enhanced knowledge context generated at the time of stopping iteration is input into the inference model to generate an initial execution sequence containing business numerical placeholders, including: The current enhanced knowledge background generated when the iteration stops is input into the preset inference model so that the inference model can plan business steps and generate a preliminary business execution sequence. Identify and extract the power numerical variables to be calculated from the initial business execution sequence; The power value variables in the initial business execution sequence are replaced with preset business value placeholders to generate an initial execution sequence containing business value placeholders.
7. The power user-side service processing method as described in claim 6, characterized in that, Based on the power business rules, the business values in the initial execution sequence are logically calibrated to generate calibration values. These calibration values are then backfilled into the initial execution sequence for logical reconstruction, generating a power user-side business processing solution, including: Obtain the power business rule that matches the initial execution sequence containing business numerical placeholders, wherein the power business rule contains a business calculation formula and a business time constraint standard; Extract the actual business parameters corresponding to the power numerical variables to be calculated from the system data and the current enhanced knowledge context; Based on the business calculation formula and business time limit constraint standards, the actual business parameters are independently logically calculated and compliance verified to generate calibration values that meet the requirements. By replacing the corresponding business value placeholders in the initial execution sequence containing business value placeholders with calibration values, the logic is reconstructed, and a power user-side business processing scheme is generated.
8. A power user-side service processing device, characterized in that, include: The module includes a data acquisition module, a knowledge base construction module, an iterative retrieval module, a sequence generation module, and a logical reconstruction module. The data acquisition module is used to acquire power policy documents, system data, and business consultation instructions; The knowledge base construction module is used to build a vector index library based on power policy documents and to build a domain knowledge graph based on system data. The iterative retrieval module is used to perform semantic parsing on business inquiry instructions to generate initial query features; Repeat the retrieval iteration operation until the current proportion of newly added entities is less than or equal to the preset saturation threshold; The retrieval iteration operation includes: extracting the current first knowledge candidate set and associated paths from the vector index library and the domain knowledge graph respectively based on the current query features; extracting the current first power entity set from the current first knowledge candidate set; and fusing the current first knowledge candidate set and associated paths to generate the current enhanced knowledge background; wherein, the initial query features are the initial query features; inputting the current enhanced knowledge background and business consultation instructions into the rewrite model to generate the current secondary query features; extracting the current second knowledge candidate set from the vector index library based on the current secondary query features; extracting the current second power entity set from the current second knowledge candidate set; comparing the current second power entity set with the current first power entity set to determine the current entity addition ratio; if the current entity addition ratio is greater than a preset saturation threshold, updating the current secondary query features to the current query features; The sequence generation module is used to input the current enhanced knowledge background generated when the iteration stops into the inference model to generate an initial execution sequence containing business value placeholders; The logic reconstruction module is used to perform logical calibration on the business values in the initial execution sequence according to the power business rules to generate calibration values, and then fill the calibration values back into the initial execution sequence for logical reconstruction to generate a power user-side business processing scheme.
9. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the power user-side service processing method as described in any one of claims 1 to 7.
10. A storage medium, characterized in that, The storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device where the storage medium is located to perform the power user-side service processing method as described in any one of claims 1 to 7.