Power transaction intelligent interaction method and system based on permission awareness and multi-round dialogues

By parsing user intent using a large language model and combining role-based access control with external computing services, the system solves the problems of low information collection efficiency and coarse-grained access control in traditional power trading systems. This enables intelligent closed-loop automation of the power trading process, improving the accuracy and reliability of transactions.

CN122048580APending Publication Date: 2026-05-15STATE GRID LIAONING ELECTRIC POWER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
STATE GRID LIAONING ELECTRIC POWER CO LTD
Filing Date
2026-02-27
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Traditional power trading information service systems are unable to effectively parse natural language trading intentions, have coarse-grained access control, are disconnected from professional computing and interaction, and lack the ability to iterate trading solutions, resulting in low information collection efficiency, susceptibility to errors, and poor consistency in business processing.

Method used

An intelligent interaction method based on permission awareness and multi-turn dialogue is adopted. By parsing user intent through a large language model, and combining role-based permission control and external computing services, transaction schemes are generated and optimized to achieve fine-grained permission verification and multi-turn iterative optimization.

Benefits of technology

It improves the accuracy of transaction information processing, the scientific nature of transaction plan generation, and the reliability of business execution, realizing intelligent closed-loop automation of the power trading process and adapting to the characteristics of multi-variety, multi-time period, and multi-role business.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122048580A_ABST
    Figure CN122048580A_ABST
Patent Text Reader

Abstract

The invention discloses a power transaction intelligent interaction method and system based on authority perception and multi-round dialogues. The method comprises the following steps: analyzing a natural language request and establishing a power transaction session context by obtaining a user identifier and determining a user role; executing data access verification according to the role authority control rule; under the condition that the permission is passed, requesting the user for missing business parameters, and calling an external power calculation service when needed; generating a candidate transaction scheme based on the session context, and forming a to-be-verified transaction scheme by combining user feedback multi-round iteration; and executing optimization solution and operation simulation check on the to-be-verified transaction scheme, outputting natural language summary information and structured data of the final transaction scheme after the check is passed, and driving the power transaction business to be automatically handled. According to the invention, the intelligent, interpretable and automatic processing of the electricity transaction process is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power market technology, and specifically relates to a smart interactive method and system for power trading based on permission awareness and multi-turn dialogue. Background Technology

[0002] It has become commonplace for electricity users, power companies, and power generation entities to conduct self-declaration and bilateral negotiations under multiple trading varieties, time periods, and trading mechanisms. As market rules become increasingly complex, the uncertainty of renewable energy output increases significantly, and the convergence space for grid security constraints continues to shrink, electricity market participants are placing higher demands on the accuracy, interpretability, and responsiveness of information during the trading decision-making process.

[0003] Traditional power trading information service systems typically rely on fixed templates, rule triggers, and static parameter validation logic to complete business processing. They cannot fully parse users' trading intentions expressed in natural language, making it difficult to identify differences in trading scenarios and personalized business needs. This leads to reliance on manual experience for data entry, resulting in incomplete, incorrect, and erroneous entries. Existing systems generally use static permission tables or simple role-based authorization mechanisms, failing to provide fine-grained permission judgments based on access item sensitivity, business risk level, and user role importance, posing a risk of over-exposure or false denial of data. Specialized calculations such as power flow calculation, clearing price calculation, and trading constraint verification are usually performed by independent systems. The inability to obtain professional calculation results in real time during user interaction leads to multiple rounds of manual trial and error, resulting in low efficiency and a high risk of errors. Traditional systems cannot dynamically adjust trading parameters based on user feedback, nor can they iterate trading schemes based on scenario parameters, simulation results, or constraint deviations. Users often need to repeatedly try to fill in data, resulting in a heavy workload. Existing systems often rely on manual analysis of deviation locations from simulation reports and manual adjustments to the scheme, resulting in low automation. At the same time, the business processing system cannot guarantee that natural language descriptions are consistent with structured data, which can easily lead to conflicting information when generating contracts or submitting transaction declarations.

[0004] In recent years, the development of Large Language Models (LLM) has provided a new technical path for natural language parsing and intelligent interaction. However, there is still a lack of mature technical solutions for how to deeply integrate it with the access control mechanism of power trading, professional calculation process, multi-round scheme optimization strategy, power system simulation verification process and final business processing automation. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides an intelligent interactive method and system for power trading based on permission awareness and multi-turn dialogue. This addresses issues such as low information collection efficiency, coarse-grained permission control, error-prone parameter input, disconnect between professional calculations and interaction, insufficient iterative capabilities for trading schemes, and poor consistency in business delivery in traditional power trading information service systems.

[0006] To solve the above-mentioned technical problems, the present invention adopts the following technical solution.

[0007] This invention first discloses a smart interaction method for power trading based on permission awareness and multi-turn dialogue, the method comprising the following steps: Obtain the user identifier of the electricity market user, determine the user role according to the user role mapping table, and parse the natural language request input by the user and the user role input into the large language model dialogue agent to obtain the transaction intent, target transaction type and target data access item set, and establish the electricity transaction session context; Based on the user role, the permitted data access set is determined from the role permission control rule set and permission verification is performed. If there is an access item in the target data access item set that does not belong to the permitted data access set, a permission denial response is output and the power trading session is terminated; otherwise, the permission is determined to be passed and a permission pass flag is recorded in the power trading session context. If permissions are granted, the large language model dialogue agent requests missing business parameters from the user based on the power trading session context and writes the user's response into the power trading session context; when it is determined based on the power trading session context that professional data or calculations are required, an external power calculation service is invoked and the returned result is written into the power trading session context. The large language model dialogue agent generates candidate trading schemes based on the power trading session context and receives user feedback on the schemes. The user feedback is written into the power trading session context and permission verification, requesting missing business parameters, and calling external power calculation services are performed again to generate new candidate trading schemes that match the user feedback. When the new candidate trading scheme meets the trading target conditions, it is used as a trading scheme to be verified. The proposed transaction scheme is submitted to an external power computing service for transaction optimization and power system operation simulation verification. If the verification results show any indicators that violate operational constraints or market rules, the verification results are written into the power trading session context and the large language model dialogue agent generates scheme adjustment suggestions, and candidate transaction schemes are generated again. When all verification results meet the operational constraints, the final transaction scheme is determined. The large language model dialogue agent outputs natural language summary information of the final transaction plan, and submits the structured data of the final transaction plan to the power transaction business processing interface to perform at least one of the following business operations: power transaction contract generation, transaction declaration, or power consumption control instruction issuance.

[0008] The present invention further includes the following preferred embodiments: The process of obtaining user identifiers for electricity market users and determining user roles based on a user role mapping table further includes: Perform format verification and uniqueness confirmation on the user identifiers of electricity market users, and establish an initial session record containing the user identifier during the session management process; Based on the comparison results between the user identifier and the user role mapping table, the user role is written into the initial session record; The user roles are converted into role embedding vectors, the natural language requests are converted into text feature vectors, and the role embedding vectors and text feature vectors are concatenated to form a joint semantic vector. Based on the joint semantic vector, semantic parsing is performed, and the transaction intent, target transaction type, and candidate set of access items are output sequentially. The candidate set of access items is compared with the role sensitivity matrix, and access item filtering is performed to generate the target data access item set; The user identifier, user role, natural language request, transaction intent, target transaction type, target data access item set, and context version number are recorded in the session management process to generate an initial version of the power trading session context.

[0009] The process of constructing the role sensitivity matrix includes: Based on the role number and data access item number corresponding to the user role recorded in the user role mapping table, generate a two-dimensional matrix structure with the role number as the row and the data access item number as the column. For each character number With each data access item number Based on the combination of these rules and the access types recorded in the role-based access control rule set, the sensitivity base value is set to the first sensitivity base value indicating allowed access. , indicating the second sensitivity base value that needs to be verified. Or, it represents the base value of a third level of sensitivity that is off-limits. The sensitivity base value is uniformly recorded as follows. ; Assign an access risk weight to each data access item number. Assign a role importance factor to each user role. The initial sensitivity value is generated according to the following formula. : ; Perform a normalization step on the initial sensitivity value to generate normalized sensitivity values. : ,in This indicates the total number of characters. With all access item numbers Find the maximum value of the initial sensitivity within the range. Initial value of sensitivity Corresponding row in the middle ,List Element; Based on the character IDs recorded in the historical access logs Number each data access item Access frequency, set access frequency value And calculate the dynamically adjusted sensitivity value. : ,in Preset update factor; The dynamically adjusted sensitivity value Write the corresponding positions in the two-dimensional matrix structure to form a role sensitivity matrix.

[0010] The step of determining the permitted data access set from the role-based access control rule set based on the user role and performing permission verification further includes: Based on the user role, retrieve the permitted data access set from the role permission control rule set, and set the access item importance value for each data access item number; Generate an access item verification sequence for the data access item numbers in the target data access item set, and sort them in descending order according to the product of the access item importance value corresponding to the data access item number and the sensitivity value in the role sensitivity matrix; Following the access item verification sequence, a set comparison is performed on each data access item number. When a data access item number is detected to be not belonging to the permitted data access set, the prohibited access item number is recorded and a permission verification result value of 0 is generated. When all data access item numbers in the access item verification sequence belong to the permitted data access set, a permission verification result value of 1 is generated. Generate a permission verification record number for each permission verification, and write the permission verification record number, permission verification result value, and prohibited access item number into the permission tag field in the power trading session context.

[0011] The step of requesting missing business parameters from the user by the large language model dialogue agent based on the power trading session context, provided that permissions are granted, further includes: Based on the target transaction type, determine the list of business parameter items in the preset business parameter template table, and construct a business parameter dependency graph based on the preset dependency relationship between the business parameter items; in the context of the power transaction session, determine whether there is a structured parameter value record for each business parameter item, and form a missing business parameter set by marking the business parameter items that do not have structured parameter value records and are marked in the business parameter dependency graph as needing to be determined in the current stage. The large language model dialogue agent generates user-oriented query information based on the missing business parameter set, and parses the user's input natural language response into structured business parameter values; when the parsed structured business parameter values... Business parameter values ​​that already exist in the power trading session context Numerical differences exist At that time, according to the business parameter consistency detection formula Determine if a preset consistency threshold is exceeded; if it is, generate a confirmation query. After completing the consistency check, the structured business parameter values ​​are written into the power trading session context, and the corresponding business parameter items are removed from the set of missing business parameters. When the set of missing business parameters is empty, the current round of missing business parameter request process ends.

[0012] The invocation of the external power calculation service further includes: A specialized computing requirement vector is constructed based on the power trading session context. The similarity between this specialized computing requirement vector and the service vector corresponding to a preset external power computing service description text is then calculated to obtain a similarity value. ; Based on similarity value Input parameter integrity indicator value And character sensitivity projection value Calculate the service necessity score for external power computing services. The formula is: ; in, Preset weighting coefficients; When there is an external power calculation service with a service necessity score not less than the score threshold, the external power calculation service with the highest service necessity score is selected as the target external power calculation service. Extract the input parameters required by the target external power calculation service based on the power trading session context, construct the call request according to the interface specification of the target external power calculation service, send the call request to the target external power calculation service and receive the parsed return result; According to the context version number of the power trading session context, the parsed professional data or calculation results are written into the corresponding version of the power trading session context record for subsequent candidate trading scheme generation and simulation verification.

[0013] The generation of candidate trading schemes based on the power trading session context specifically includes: The system extracts business parameters, external power calculation results, and user role preference fields from the power trading session context. It then performs normalization on the extracted fields to form a scheme feature vector and generates a scheme generation direction vector based on the scheme feature vector. The scheme feature vector and scheme generation direction vector are input into the large language model dialogue agent to generate candidate transaction schemes including natural language descriptions and structured parameter sequences. The structured parameter sequences are obtained by arranging transaction price parameters, electricity parameters, time parameters and transaction node parameters in a preset order. Feasibility boundary function constraints are applied to the structured parameter sequence to ensure that the structured parameter sequence of the candidate transaction scheme is located in the preset feasible region; Calculate the structured parameter sequence based on the preset transaction target conditions. Price meets indicators The power consumption meets the target. Risk satisfaction indicators Other constraint satisfaction indicators And calculate the overall satisfaction level of the candidate transaction schemes. The formula is: ; In the formula, The weighting coefficients are used to determine the overall satisfaction level. When the overall satisfaction level If the candidate scheme generation threshold is not less than the threshold, the candidate transaction scheme and the structured parameter sequence are written into the power transaction session context and the feedback parsing process is initiated. Otherwise, the candidate transaction scheme is regenerated based on the scheme generation direction vector, and the feasibility boundary function constraint and comprehensive satisfaction degree calculation are repeatedly executed.

[0014] The process of generating new candidate transaction schemes based on user feedback and determining the transaction schemes to be verified further includes: The system receives natural language feedback from the user, parses the natural language feedback into a preference adjustment vector by the large language model dialogue agent, performs matrix operations on the preference adjustment vector according to the preset preference conflict decomposition matrix to obtain a preference correction vector, and writes the preference correction vector into the power trading session context. The weight coefficients and thresholds in the trading target conditions are updated according to the preference correction vector. The updated weight coefficients are normalized to form the updated trading target conditions, and the updated trading target conditions are written into the power trading session context. The new business parameter requirements and data access requirements introduced by the preference correction vector are written into the power trading session context, and permission verification, requesting missing business parameters, and calling external power calculation services are performed again to generate an updated power trading session context. Based on the updated power trading session context, a new scheme generation direction vector is generated, and the structured parameter sequence of the candidate trading scheme is updated. The update formula is as follows: ,in , These represent the structured parameter sequences before and after the update, respectively. To fine-tune the compensation for the preset plan, Generate direction vectors for the scheme. Indicates the first wheel; The large language model dialogue agent generates a natural language description based on the updated structured parameter sequence and calculates the generation confidence of the candidate transaction scheme. When the overall satisfaction of the updated candidate transaction scheme is not less than the satisfaction threshold of the scheme to be verified and the generation confidence is not less than the preset confidence threshold, the updated candidate transaction scheme is marked as a transaction scheme to be verified in the power trading session context.

[0015] The proposed transaction scheme is submitted to an external power computing service for transaction optimization and power system operation simulation verification, including: The structured parameter sequence of the transaction scheme to be verified is combined with the power system operating parameters to form a set of simulation input parameters, which is then submitted to an external power computing service for optimization and solution. In the optimization process, an optimization variable sequence consisting of transaction price parameters, electricity parameters, transaction time intervals, and node parameters is constructed. Multi-objective optimization is performed on the optimization variable sequence, and an optimized parameter sequence is generated. Based on the optimized parameter sequence, a hierarchical constraint chain verification is performed. The strong security constraint, weak security constraint, economic deviation constraint and market rule constraint are simulated and verified in sequence, and a set of simulation results and corresponding simulation verification confidence scores are generated. When any constraint is not satisfied, a default deviation sequence consisting of constraint deviations is constructed based on the simulation result set. A constraint sensitivity gradient vector and a default deviation encoding sequence are generated according to the default deviation sequence. The default deviation sequence, constraint sensitivity gradient vector and default deviation encoding sequence are written into the power trading session context. The large language model dialogue agent generates scheme adjustment suggestions and generates candidate trading schemes again. When all hierarchical constraints are satisfied and the simulation verification confidence level is not less than the preset simulation confidence level threshold, the transaction scheme to be verified is marked as the final transaction scheme in the power trading session context.

[0016] The structured data of the final transaction plan is submitted to the power trading business processing interface to perform at least one of the following business operations: power trading contract generation, transaction declaration, or power consumption control instruction issuance, including: The large language model dialogue agent generates a natural language summary of the final transaction plan based on the structured parameter sequence of the final transaction plan; Perform a consistency check between the natural language summary information of the final transaction plan and the structured parameter sequence of the final transaction plan, and generate structured data records for business processing; Select the corresponding business processing formatting rules based on the structured data records, generate business processing instructions, and submit them to the power trading business processing interface; After the business processing interface returns a response, a transaction execution receipt is generated, and the receipt confidence level is calculated. When the receipt confidence level is not less than a preset threshold, the transaction execution receipt is written into the power trading session context.

[0017] This invention also discloses a power trading intelligent interaction system based on permission awareness and multi-turn dialogue, utilizing the aforementioned power trading intelligent interaction method based on permission awareness and multi-turn dialogue, comprising: The parsing module is used to obtain the user identifier of the electricity market user, determine the user role according to the user role mapping table, and parse the natural language request input by the user and the user role input large language model dialogue agent to obtain the transaction intent, target transaction type and target data access item set, and establish the electricity transaction session context. The permission module is used to determine the permitted data access set from the role permission control rule set according to the user role and perform permission verification. When there is an access item in the target data access item set that does not belong to the permitted data access set, the permission denial response is output and the power trading session is terminated; otherwise, the permission is determined to be passed and a permission pass flag is recorded in the power trading session context. The module is used to request missing business parameters from the user based on the power trading session context by the large language model dialogue agent when the permissions are granted, and to write the user's response into the power trading session context; when it is determined based on the power trading session context that professional data or calculation is required, it calls an external power calculation service and writes the returned result into the power trading session context. The scheme generation module is used to generate candidate trading schemes based on the power trading session context by the large language model dialogue agent and receive user feedback on the schemes. The user feedback is written into the power trading session context and permission verification, requesting missing business parameters and calling external power calculation services are performed again to generate new candidate trading schemes that match the user feedback. When the new candidate trading scheme meets the trading target conditions, it is used as a trading scheme to be verified. The verification module is used to submit the transaction scheme to be verified to an external power computing service for transaction optimization solution and power system operation simulation verification. When the verification result has indicators that violate operating constraints or market rules, the verification result is written into the power transaction session context and the large language model dialogue agent generates scheme adjustment suggestions and generates candidate transaction schemes again. When all verification results meet the operating constraints, the final transaction scheme is determined. The submission module is used to output the natural language summary information of the final transaction plan by the large language model dialogue agent, and submit the structured data of the final transaction plan to the power transaction business processing interface to perform at least one of the business operations of power transaction contract generation, transaction declaration or power consumption control instruction issuance.

[0018] Accordingly, this application also discloses a terminal, including a processor and a storage medium; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the aforementioned intelligent interaction method for power trading based on permission awareness and multi-turn dialogue.

[0019] Accordingly, this application also discloses a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the aforementioned intelligent interactive method for power trading based on permission awareness and multi-turn dialogue.

[0020] The beneficial effects of this invention are as follows: Compared with the prior art, this invention provides a power trading intelligent interaction method and system based on permission awareness and multi-turn dialogue. By acquiring user identifiers and determining user roles according to a user role mapping table, and combining a large language model to parse natural language requests, a complete power trading session context can be formed within the conversation. This enables a structured understanding of trading intentions, trading types, and data access items, improving the accuracy of user intention recognition. By determining the permitted data access set in the role permission control rule set based on user roles and comparing each target data access item, fine-grained and dynamic permission verification can be achieved, ensuring that data access and operation requests are executed within the authorized scope, thus improving data security in the trading process. When permissions are granted, the large language model dialogue agent can proactively request missing business parameters from the user based on the power trading session context, automatically completing the input information required for the transaction. When professional data or professional calculations are needed, external power calculation services can be invoked, forming a unified context link between information collection and professional calculation, improving the continuity and accuracy of trading operations. By automatically generating candidate trading schemes based on the power trading session context, and combining user feedback with repeated permission verification, missing information completion, and professional calculation invocation, multi-round iterative trading schemes driven by natural language can be achieved, gradually converging the schemes to a verifiable trading scheme that meets the user's trading objectives. By submitting the verifiable trading schemes to an external power computing service for trading optimization and power system simulation verification, it can be ensured that candidate schemes meet operational constraints and market rules. Furthermore, by writing back the verification results, interpretable scheme adjustments and regeneration of candidate schemes can be achieved, improving the technical feasibility of the trading schemes. After the final trading scheme is verified and approved, the large language model dialogue agent generates natural language summary information. Simultaneously, the system submits the structured data of the final trading scheme to the business processing interface, automatically executing at least one operation among contract generation, transaction declaration, or power control instruction issuance. This achieves automated delivery of the power trading business closed loop, improving transaction processing efficiency and output consistency. This method achieves deep collaboration in key stages such as user request parsing, fine-grained access control, business parameter completion, external professional calculation invocation, candidate scheme generation and iteration, simulation verification and result backtracking, and business processing triggering. This elevates the power trading process from a traditional manual data entry and decentralized processing model to an intelligent closed-loop system that is understandable, responsive, verifiable, and processable. It significantly improves the accuracy of transaction information processing, the scientific rigor of transaction scheme generation, the reliability of business execution, and the overall intelligence level of the interactive experience. This method is adaptable to the diverse business characteristics of the power market, including multiple product types, time periods, roles, and constraints. It possesses good scalability and engineering application prospects, providing more efficient, secure, and transparent trading service support for power market participants. Attached Figure Description

[0021] Figure 1This is a flowchart of the intelligent interactive method for power trading based on permission awareness and multi-turn dialogue in this invention. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0023] The embodiments described in this application are merely some, not all, embodiments of the present invention. Based on the spirit of the present invention, other embodiments obtained by those skilled in the art without inventive effort are all within the protection scope of the present invention.

[0024] To address the shortcomings of existing technologies, this invention proposes an intelligent interaction method and system for power trading based on permission awareness and multi-turn dialogue. By organically combining steps such as natural language parsing, permission verification, context-driven processing, multi-turn negotiation, professional computing collaboration, simulation verification, and automated business processing, a unified intelligent interaction system covering the entire trading process is constructed. The system obtains user identifiers and determines user roles, parses natural language requests, and establishes a power trading session context. Data access verification is performed according to role-based permission control rules. If permissions are granted, missing business parameters are requested from the user, and external power computing services are invoked when necessary. Candidate trading schemes are generated based on the session context and iterated through multiple rounds with user feedback to form a trading scheme to be verified. The scheme to be verified is optimized and simulated for verification. Upon successful verification, the final trading scheme's natural language summary information and structured data are output, driving the automatic processing of power trading business. See Figure 1 As shown, the intelligent interaction method for power trading based on permission awareness and multi-turn dialogue disclosed in this invention includes the following steps: Step S1: Obtain the user identifier of the electricity market user, determine the user role according to the user role mapping table, and parse the natural language request input by the user and the user role input into the large language model dialogue agent to obtain the transaction intent, target transaction type and target data access item set, and establish the electricity transaction session context.

[0025] In one embodiment, obtaining the user identifier of the electricity market user and determining the user role according to the user role mapping table further includes: Step S11: User identifiers (such as user number, market entity filing number, or authentication account ID) typically use a fixed format, such as a fixed length (e.g., 16 bytes), containing a combination of letters and numbers. First, it is determined whether the user identifier meets the agreed format to avoid incorrect authorization due to illegal input; then, it is checked in the database or session management memory to see if the user identifier conflicts with other sessions. If there is already an incomplete session corresponding to the same user identifier, a new session can be created or an old session can be restored according to the policy; finally, an initial session record containing the user identifier is created as the carrier of all subsequent contexts.

[0026] Step S12: Use the user role mapping table to perform role matching. This mapping table is pre-configured. The matching method can be string comparison, rule algorithm, or direct database association, etc. After a successful match, the user role is written into the initial session record.

[0027] Step S13: Using a pre-defined word vector model (such as a 32-dimensional or 64-dimensional vector), the roles are converted into fixed-length vectors that the model can understand, i.e., role embedding vectors. For example, "Power generation company": [0.12, 0.33…]; "Electricity sales company": [0.27, 0.14…]; The natural language request is processed by the tokenizer → encoding model to generate text feature vectors, for example, "I want to apply for a transaction volume of 20MW from 9 am to 10 am tomorrow" → Perform vector concatenation on the role embedding vector and the text feature vector to form a joint semantic vector. ; in the form of ,in, Embed vectors for the character. This is the text feature vector.

[0028] Step S14: Perform a three-term parsing on the joint semantic vector: Transaction intent (e.g., electricity purchase, electricity sale, contract inquiry, etc.); Target transaction type (e.g., spot, day-to-day, medium-to-long term, contract amendment, etc.); Candidate set of access items (e.g., electricity price information, load information, renewable energy output, transaction quota records, etc.); These outputs can be obtained entirely from the model's classification header or instruction parsing mechanism.

[0029] Step S15: Input each item in the candidate access item set into the role sensitivity matrix for verification, and filter to obtain the target data access item set for subsequent permission verification; the role sensitivity matrix is ​​used to accurately represent the access sensitivity of different roles to different data access items, and is an important mathematical structure for performing permission reasoning. The matrix structure is as follows: Line: User Role Number ; Column: Data Access Item Number ; Element: Value adjusted for sensitivity .

[0030] In a further embodiment, the process of constructing the role sensitivity matrix includes: Based on the role numbers (e.g., 1: power generation company; 2: electricity sales company) and data access item numbers (e.g., 1: electricity price; 2: load; 3: output) corresponding to the user roles recorded in the user role mapping table, a two-dimensional matrix structure is generated with role numbers as rows and data access item numbers as columns; For each character number With each data access item number Based on the combination of these rules and the access types recorded in the role-based access control rule set, the sensitivity base value is set to the first sensitivity base value indicating allowed access. (The default value is 1, the lowest risk), representing the second sensitivity base value that needs to be verified. (Default value is 5, medium risk) or represents a base value for third-party sensitivity that prohibits access. (The default value is 10, the highest risk), and this is uniformly recorded as the base sensitivity value. ; Assign an access risk weight to each data access item number. Assign a role importance factor to each user role. The initial sensitivity value is generated according to the following formula. : Access risk weight It can be {1,2,3,…}, the role importance factor. It can be {1, 1.5, 2}; Perform a normalization step on the initial sensitivity value to generate normalized sensitivity values. : ,in This indicates the total number of characters. With all access item numbers Find the maximum value of the initial sensitivity within the range. Initial value of sensitivity Corresponding row in the middle ,List Element; Based on the character IDs recorded in the historical access logs Number each data access item Access frequency, set access frequency value (For example, if you visit 3 times in a day, then) ), and calculate the dynamically adjusted sensitivity value. : ,in The preset update factor is typically set to 0.01 to 0.05. The dynamically adjusted sensitivity value Write the corresponding positions in the two-dimensional matrix structure to form the role sensitivity matrix.

[0031] Step S16: Record the user identifier, user role, natural language request, transaction intent, target transaction type, target data access item set, and context version number (starting from 1) into the session management process to generate an initial version of the power trading session context.

[0032] Step S2: Determine the permitted data access set from the role permission control rule set according to the user role and perform permission verification. If there is an access item in the target data access item set that does not belong to the permitted data access set, output a permission denial response and end the power trading session; otherwise, determine that the permission is passed and record the permission pass flag in the power trading session context.

[0033] In one embodiment, step S2 further includes: Step S21: Based on the user's role number Retrieve the permitted data access set from the role-based access control rule set. A i ={ j | j Number the character i Allowed data access item numbers}, and set an access item importance value for each data access item number. Importance value of accessed items It can be preset according to business requirements. For example, if the value involves scheduling sensitive data, it can be set to 0.8; if it involves general market data, it can be set to 0.5; and if it involves publicly available data, it can be set to 0.2. Step S22: Generate an access item verification sequence for the data access item numbers in the target data access item set, and sort them in descending order according to the product of the access item importance value corresponding to the data access item number and the sensitivity value in the role sensitivity matrix, so as to realize the priority verification of high-importance access items; Step S23: Perform a set comparison for each data access item number along the access item verification sequence. When a data access item number is detected to be not in the permitted data access set, record the prohibited access item number and generate a permission verification result value of 0. When all data access item numbers in the access item verification sequence belong to the permitted data access set, generate a permission verification result value of 1. Step S24: Generate a permission verification record number for each permission verification (e.g., auto-incrementing within the session), and write the permission verification record number, permission verification result value (0 or 1), and prohibited access item number (if present) into the permission pass tag field in the power trading session context.

[0034] Step S3: If the permissions are granted, the large language model dialogue agent requests the missing business parameters from the user based on the power trading session context and writes the user's response into the power trading session context; when it is determined based on the power trading session context that professional data or calculations are required, an external power calculation service is invoked and the returned result is written into the power trading session context.

[0035] Specifically, the step of requesting missing business parameters from the user by the large language model dialogue agent based on the power trading session context, after authorization, further includes: Step S31: For different transaction types, the system pre-defines a set of business parameter dependencies. For example, the "transaction date" must precede the "start time period" and "end time period," the "reported electricity volume" can only be processed after the "time range" is determined, and the "node number" can only be determined after the "transaction area" is determined. This dependency can be represented as a directed graph TDG, where the nodes are parameter numbers and the edge directions represent the dependency directions. The system identifies the parameters that must be available in the current stage and the parameters that have not yet been filled in based on the directed graph TDG. These parameter numbers form the "set of missing business parameters."

[0036] Step S32: The large language model dialogue agent generates user-oriented query information based on the missing business parameter set, and parses the user's input natural language response into structured business parameter values; user answers may have numerical conflicts, therefore, consistency checks are performed on the same business parameter item, that is: when the parsed structured business parameter values... Business parameter values ​​that already exist in the power trading session context Numerical differences exist At that time, according to the business parameter consistency detection formula Determine if the preset consistency threshold is exceeded (e.g., a fixed value of 1MW, or proportionally, not exceeding 5%). If it is exceeded, generate a confirmation question, such as: "Your previous declaration of electricity was 20MW. Please confirm whether the 25MW you entered this time is the latest value?" Step S33: After completing the consistency check, write the structured business parameter values ​​into the power trading session context and delete the corresponding business parameter items from the missing business parameter set; when the missing business parameter set is empty, end the current round of missing business parameter request process.

[0037] Step S34: After the missing business parameter request process ends, construct a professional calculation requirement vector based on the power trading session context. Perform cosine similarity calculation between the professional calculation requirement vector and the service vector corresponding to the preset external power calculation service description text to obtain the similarity value. .

[0038] Step S35: Based on similarity value Input parameter integrity indicator value (Values ​​are 0 or 1, indicating whether the parameters are sufficient) and character sensitivity projection value. Calculate the service necessity score for external power computing services. The formula is: ;in, These are preset weighting coefficients, and their sum is 1. When there is an external power calculation service with a service necessity score not less than the score threshold (e.g., 0.6), the service is considered necessary, and the external power calculation service with the highest service necessity score is selected as the target external power calculation service.

[0039] Step S36: Extract the input parameters required by the target external power calculation service based on the power trading session context, construct a call request according to the interface specification of the target external power calculation service, such as JSON, send the call request to the target external power calculation service and receive the parsed return result.

[0040] Step S37: According to the context version number of the power trading session context (e.g., version 1: state after parameter completion; version 2: initial external calculation result; version 3: calculation result after scheme adjustment), write the parsed professional data or calculation results into the corresponding version of the power trading session context record for subsequent candidate trading scheme generation and simulation verification.

[0041] Step S4: The large language model dialogue agent generates candidate trading schemes based on the power trading session context and receives user feedback on the schemes. The user feedback is written into the power trading session context and permission verification, information completion, and external power calculation calls are performed again to generate new candidate trading schemes that match the user feedback. When the new candidate trading scheme meets the trading target conditions, it is used as a trading scheme to be verified.

[0042] In one preferred embodiment, step S4 specifically includes: Step S41: Extract business parameters from the power trading session context (denoted as...) External power calculation results (such as statistical measures like the maximum and average values ​​of the predicted electricity price series, denoted as...) ) and user role preferences (such as risk appetite, price sensitivity, denoted as The extracted fields are normalized to form the feature vector of the scheme. , Representation of the scheme's feature vector The first in Each feature component (a normalized numerical feature of business parameter fields, external power calculation result fields, or user role preference fields extracted from the power trading session context) is used by the large language model dialogue agent to execute a mapping function on the scheme feature vector (the logic implementation is sufficient and no specific form is required) to generate a scheme generation direction vector. Each component of the scheme generation direction vector is dimensionless and represents: the direction of reducing price (negative value), the direction of increasing power (positive value), the direction of adjusting time window, and the direction of adjusting node allocation. Step S42: Input the scheme feature vector and scheme generation direction vector into the large language model dialogue agent to generate candidate transaction schemes including natural language descriptions (for user reading) and structured parameter sequences. It is obtained by arranging the transaction price parameters, power parameters, time parameters, and transaction node parameters in a preset order; Step S43: Apply feasibility boundary function constraints to the structured parameter sequence. For example: As a minimum power constraint, Due to the maximum power capacity constraint, This indicates whether the electricity price falls within the allowable range, ensuring that the structured parameter sequence of candidate trading schemes is within the preset feasible region; if If so, perform feasible region projection processing to bring the relevant parameters back to the allowable range; Step S44: Calculate the structured parameter sequence based on the preset trading target conditions. Price meets indicators The power consumption meets the target. Risk satisfaction indicators Other constraint satisfaction indicators And calculate the overall satisfaction level of the candidate transaction schemes. The formula is: ; In the formula, To comprehensively assess the degree of satisfaction, The sum of is 1; like , If a threshold is generated for a candidate solution, the feedback analysis process begins; otherwise, a new candidate transaction solution is generated, and the feasibility boundary function constraint and comprehensive satisfaction calculation are repeated.

[0043] Step S45: Receive natural language feedback from the user, such as: wanting the price to be lower, the risk to be reduced, and the peak-hour power consumption to be reduced. The large language model dialogue agent then parses the natural language feedback into a preference adjustment vector. And according to the preset preference conflict decomposition matrix Perform matrix operations on the preference adjustment vector to obtain the preference correction vector. , adjust the preference vector Write to the power trading session context, indicating as ; Step S46: Update the weight coefficients and thresholds in the trading target conditions according to the preference correction vector, perform normalization processing on the updated weight coefficients to form the updated trading target conditions, and write the updated trading target conditions into the power trading session context; Step S47: Write the new business parameter requirements and data access requirements introduced by the preference correction vector into the power trading session context, and perform permission verification, request missing business parameters, and call external power calculation services again to generate an updated power trading session context; Step S48: Generate a new scheme generation direction vector based on the updated power trading session context, and update the structured parameter sequence of the candidate trading schemes. The update formula is as follows: ,in , These represent the structured parameter sequences before and after the update, respectively. To fine-tune the compensation for the preset plan, For the first The wheel's design generates a direction vector; Step S49: The large language model dialogue agent generates a natural language description based on the updated structured parameter sequence and calculates the generation confidence of the candidate transaction scheme. When the overall satisfaction of the updated candidate transaction scheme is not less than the satisfaction threshold of the scheme to be verified and the generation confidence is not less than the preset confidence threshold, the updated candidate transaction scheme is marked as a transaction scheme to be verified in the power trading session context.

[0044] Step S5: Submit the transaction scheme to be verified to an external power computing service for transaction optimization solution and power system operation simulation verification. When the verification results contain indicators that violate operating constraints or market rules, write the verification results into the power transaction session context and generate scheme adjustment suggestions by the large language model dialogue agent, and generate candidate transaction schemes again. When all verification results meet the operating constraints, determine the final transaction scheme.

[0045] In one embodiment, step S5 includes: Step S51: Combine the structured parameter sequence of the transaction scheme to be verified with the power system operating parameters (grid topology and branch parameters, node load prediction, generator available output range, transaction period division, etc.) to form a simulation input parameter set, and submit it to the external power computing service for optimization solution; Step S52: During the optimization process, construct an optimization variable sequence consisting of transaction price parameters, electricity parameters, transaction time intervals, and node parameters. Perform multi-objective optimization on the optimization variable sequence and generate an optimized parameter sequence. The objectives of the weighted solution include minimizing economic costs, minimizing risks, and minimizing market rule penalties. Step S53: Perform hierarchical constraint chain verification based on the optimized parameter sequence. Perform simulation verification on strong security constraints (power flow safety, voltage qualification, line thermal capacity), weak security constraints (node ​​power balance error, medium and long-term power matching error), economic deviation constraints (comparison with the difference of optimal economic dispatch) and market rule constraints (trading upper and lower limits, whether regional deviation meets the rules, compliance check results) in sequence, and generate a set of simulation results and corresponding simulation verification confidence. Step S54: When any constraint is not satisfied (e.g., the load rate of line 12 exceeds the upper limit), construct a default deviation sequence composed of constraint deviations based on the simulation result set, and generate a constraint sensitivity gradient vector based on the default deviation sequence. The default deviation encoding sequence (e.g., "L12_OVERLOAD_12%", "V7_LOW_0.88pu") is written into the power trading session context, and the large language model dialogue agent generates scheme adjustment suggestions to generate candidate trading schemes again. Step S55: When all hierarchical constraints are satisfied and the simulation verification confidence level is not less than the preset simulation confidence level threshold, the transaction scheme to be verified is marked as the final transaction scheme in the power trading session context.

[0046] Step S6: The large language model dialogue agent outputs the natural language summary information of the final transaction plan, and submits the structured data of the final transaction plan to the power transaction business processing interface to perform at least one of the following business operations: power transaction contract generation, transaction declaration, or power consumption control instruction issuance.

[0047] Specifically, the large language model dialogue agent reads the structured parameter sequence of the final transaction plan, including time-of-use electricity, time-of-use price, transaction node code, and transaction time interval, and automatically generates user-oriented natural language summary information, such as: "The declared electricity volume for this plan from 08:00 to 12:00 is 20MW, and the time-of-use price for node A1 is 0.42 yuan / kWh, which meets your economic and risk preference requirements." The natural language summary information is written into the power trading session context. Key values ​​(such as electricity volume, price, and time interval) in the natural language summary information are parsed and compared for consistency with the corresponding fields in the structured parameter sequence. If any field is inconsistent, the natural language summary information is regenerated until the consistency check passes. The corresponding business processing formatting rules are automatically selected based on the structured data records, for example: The recent centralized bidding: fields "A,B,C,D"; Real-time transactions: Fields "X,Y,Z"; Bilateral Agreement: Contract Terms Fields "L1,L2,L3"; And generate a business processing instruction and submit it to the business processing interface; The information returned by the business processing interface includes: contract number, transaction declaration serial number, execution status, timestamp, verification code or verification field; Calculate the confidence level of the receipt based on the characteristics of the interface response. ,For example: ; in Let i be the weights, where i is 1, ..., 3. For time consistency score, Score for field format consistency. Assign a reliability score to the interface status; If the confidence level of the receipt is not less than the preset threshold, the transaction execution receipt will be written into the power trading session context.

[0048] The beneficial effects of this invention are as follows: Compared with the prior art, this invention provides a power trading intelligent interaction method and system based on permission awareness and multi-turn dialogue. By acquiring user identifiers and determining user roles according to a user role mapping table, and combining a large language model to parse natural language requests, a complete power trading session context can be formed within the conversation. This enables a structured understanding of trading intentions, trading types, and data access items, improving the accuracy of user intention recognition. By determining the permitted data access set in the role permission control rule set based on user roles and comparing each target data access item, fine-grained and dynamic permission verification can be achieved, ensuring that data access and operation requests are executed within the authorized scope, thus improving data security in the trading process. When permissions are granted, the large language model dialogue agent can proactively request missing business parameters from the user based on the power trading session context, automatically completing the input information required for the transaction. When professional data or professional calculations are needed, external power calculation services can be invoked, forming a unified context link between information collection and professional calculation, improving the continuity and accuracy of trading operations. By automatically generating candidate trading schemes based on the power trading session context, and combining user feedback with repeated permission verification, missing information completion, and professional calculation invocation, multi-round iterative trading schemes driven by natural language can be achieved, gradually converging the schemes to a verifiable trading scheme that meets the user's trading objectives. By submitting the verifiable trading schemes to an external power computing service for trading optimization and power system simulation verification, it can be ensured that candidate schemes meet operational constraints and market rules. Furthermore, by writing back the verification results, interpretable scheme adjustments and regeneration of candidate schemes can be achieved, improving the technical feasibility of the trading schemes. After the final trading scheme is verified and approved, the large language model dialogue agent generates natural language summary information. Simultaneously, the system submits the structured data of the final trading scheme to the business processing interface, automatically executing at least one operation among contract generation, transaction declaration, or power control instruction issuance. This achieves automated delivery of the power trading business closed loop, improving transaction processing efficiency and output consistency. This method achieves deep collaboration in key stages such as user request parsing, fine-grained access control, business parameter completion, external professional calculation invocation, candidate scheme generation and iteration, simulation verification and result backtracking, and business processing triggering. This elevates the power trading process from a traditional manual data entry and decentralized processing model to an intelligent closed-loop system that is understandable, responsive, verifiable, and processable. It significantly improves the accuracy of transaction information processing, the scientific rigor of transaction scheme generation, the reliability of business execution, and the overall intelligence level of the interactive experience. This method is adaptable to the diverse business characteristics of the power market, including multiple product types, time periods, roles, and constraints. It possesses good scalability and engineering application prospects, providing more efficient, secure, and transparent trading service support for power market participants.

[0049] This invention can be a system, method, and / or computer program product. This invention also discloses a power trading intelligent interaction system based on permission awareness and multi-turn dialogue, based on the aforementioned power trading intelligent interaction method, comprising: The parsing module is used to obtain the user identifier of the electricity market user, determine the user role according to the user role mapping table, and parse the natural language request input by the user and the user role input large language model dialogue agent to obtain the transaction intent, target transaction type and target data access item set, and establish the electricity transaction session context. The permission module is used to determine the permitted data access set from the role permission control rule set according to the user role and perform permission verification. When there is an access item in the target data access item set that does not belong to the permitted data access set, the permission denial response is output and the power trading session is terminated; otherwise, the permission is determined to be passed and a permission pass flag is recorded in the power trading session context. The module is used to request missing business parameters from the user based on the power trading session context by the large language model dialogue agent when the permissions are granted, and to write the user's response into the power trading session context; when it is determined based on the power trading session context that professional data or calculation is required, it calls an external power calculation service and writes the returned result into the power trading session context. The scheme generation module is used to generate candidate trading schemes based on the power trading session context by the large language model dialogue agent and receive user feedback on the schemes. The user feedback is written into the power trading session context and permission verification, requesting missing business parameters and calling external power calculation services are performed again to generate new candidate trading schemes that match the user feedback. When the new candidate trading scheme meets the trading target conditions, it is used as a trading scheme to be verified. The verification module is used to submit the transaction scheme to be verified to an external power computing service for transaction optimization solution and power system operation simulation verification. When the verification result has indicators that violate operating constraints or market rules, the verification result is written into the power transaction session context and the large language model dialogue agent generates scheme adjustment suggestions and generates candidate transaction schemes again. When all verification results meet the operating constraints, the final transaction scheme is determined. The submission module is used to output the natural language summary information of the final transaction plan by the large language model dialogue agent, and submit the structured data of the final transaction plan to the power transaction business processing interface to perform at least one of the business operations of power transaction contract generation, transaction declaration or power consumption control instruction issuance.

[0050] Based on the spirit of this invention, those skilled in the art will readily conceive of a computer program product derived from the aforementioned intelligent interaction method for power trading based on permission awareness and multi-turn dialogue. The computer program product may include a computer-readable storage medium on which computer-readable program instructions are loaded to enable a processor to implement various aspects of this disclosure. That is, this application also includes a terminal comprising a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the steps of the aforementioned intelligent interaction method for power trading based on permission awareness and multi-turn dialogue.

[0051] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example, but not limited to, electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.

[0052] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0053] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.

[0054] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the claims of the present invention.

Claims

1. A smart interaction method for power trading based on permission awareness and multi-turn dialogue, characterized in that, Includes the following steps: Obtain the user identifier of the electricity market user, determine the user role according to the user role mapping table, and parse the natural language request input by the user and the user role input into the large language model dialogue agent to obtain the transaction intent, target transaction type and target data access item set, and establish the electricity transaction session context; Based on the user role, the permitted data access set is determined from the set of role permission control rules and permission verification is performed. When there is an access item in the target data access item set that does not belong to the permitted data access set, a permission denial response is output and the power trading session is terminated. Otherwise, the permission is granted and a permission-granted flag is recorded in the power trading session context; If the permissions are granted, the large language model dialogue agent requests the missing business parameters from the user based on the power trading session context and writes the user's response into the power trading session context. When it is determined that professional data or calculations are needed based on the power trading session context, an external power calculation service is invoked and the returned results are written into the power trading session context. The large language model dialogue agent generates candidate trading schemes based on the power trading session context and receives user feedback on the schemes. The user feedback is written into the power trading session context and permission verification, requesting missing business parameters, and calling external power calculation services are performed again to generate new candidate trading schemes that match the user feedback. When the new candidate trading scheme meets the trading target conditions, it is used as a trading scheme to be verified. The proposed transaction scheme is submitted to an external power computing service for transaction optimization and power system operation simulation verification. If the verification results show any indicators that violate operational constraints or market rules, the verification results are written into the power trading session context and the large language model dialogue agent generates scheme adjustment suggestions, and candidate transaction schemes are generated again. When all verification results meet the operational constraints, the final transaction scheme is determined. The large language model dialogue agent outputs natural language summary information of the final transaction plan, and submits the structured data of the final transaction plan to the power transaction business processing interface to perform at least one of the following business operations: power transaction contract generation, transaction declaration, or power consumption control instruction issuance.

2. The intelligent interactive method for power trading based on permission awareness and multi-turn dialogue as described in claim 1, characterized in that, The process of obtaining user identifiers for electricity market users and determining user roles based on a user role mapping table further includes: Perform format verification and uniqueness confirmation on the user identifiers of electricity market users, and establish an initial session record containing the user identifier during the session management process; Based on the comparison results between the user identifier and the user role mapping table, the user role is written into the initial session record; The user roles are converted into role embedding vectors, the natural language requests are converted into text feature vectors, and the role embedding vectors and text feature vectors are concatenated to form a joint semantic vector. Based on the joint semantic vector, semantic parsing is performed, and the transaction intent, target transaction type, and candidate set of access items are output sequentially. The candidate set of access items is compared with the role sensitivity matrix, and access item filtering is performed to generate the target data access item set; The user identifier, user role, natural language request, transaction intent, target transaction type, target data access item set, and context version number are recorded in the session management process to generate an initial version of the power trading session context.

3. The intelligent interactive method for power trading based on permission awareness and multi-turn dialogue as described in claim 2, characterized in that, The process of constructing the role sensitivity matrix includes: Based on the role number and data access item number corresponding to the user role recorded in the user role mapping table, generate a two-dimensional matrix structure with the role number as the row and the data access item number as the column. For each character number With each data access item number Based on the combination of these rules and the access types recorded in the role-based access control rule set, the sensitivity base value is set to the first sensitivity base value indicating allowed access. , indicating the second sensitivity base value that needs to be verified. Or, it represents the base value of a third level of sensitivity that is off-limits. The sensitivity base value is uniformly recorded. ; Assign an access risk weight to each data access item number. Assign a role importance factor to each user role. The initial sensitivity value is generated according to the following formula. : ; Perform a normalization step on the initial sensitivity value to generate normalized sensitivity values. : ,in This indicates the total number of characters. With all access item numbers Find the maximum value of the initial sensitivity within the range. Initial value of sensitivity Corresponding row in the middle ,List Element; Based on the character IDs recorded in the historical access logs Number each data access item Access frequency, set access frequency value And calculate the dynamically adjusted sensitivity value. : ,in Preset update factor; The dynamically adjusted sensitivity value Write the corresponding positions in the two-dimensional matrix structure to form a role sensitivity matrix.

4. The intelligent interactive method for power trading based on permission awareness and multi-turn dialogue as described in claim 3, characterized in that, The step of determining the permitted data access set from the role-based access control rule set based on the user role and performing permission verification further includes: Based on the user role, retrieve the permitted data access set from the role permission control rule set, and set the access item importance value for each data access item number; Generate an access item verification sequence for the data access item numbers in the target data access item set, and sort them in descending order according to the product of the access item importance value corresponding to the data access item number and the sensitivity value in the role sensitivity matrix; Following the access item verification sequence, a set comparison is performed on each data access item number. When a data access item number is detected to be not belonging to the permitted data access set, the prohibited access item number is recorded and a permission verification result value of 0 is generated. When all data access item numbers in the access item verification sequence belong to the permitted data access set, a permission verification result value of 1 is generated. Generate a permission verification record number for each permission verification, and write the permission verification record number, permission verification result value, and prohibited access item number into the permission tag field in the power trading session context.

5. The intelligent interactive method for power trading based on permission awareness and multi-turn dialogue as described in claim 4, characterized in that, The step of requesting missing business parameters from the user by the large language model dialogue agent based on the power trading session context, provided that permissions are granted, further includes: Based on the target transaction type, determine the list of business parameter items in the preset business parameter template table, and construct a business parameter dependency graph based on the preset dependency relationship between the business parameter items; in the context of the power transaction session, determine whether there is a structured parameter value record for each business parameter item, and form a missing business parameter set by marking the business parameter items that do not have structured parameter value records and are marked in the business parameter dependency graph as needing to be determined in the current stage. The large language model dialogue agent generates user-oriented query information based on the missing business parameter set, and parses the user's input natural language response into structured business parameter values; when the parsed structured business parameter values... Business parameter values ​​that already exist in the power trading session context Numerical differences exist At that time, according to the business parameter consistency detection formula Determine if a preset consistency threshold is exceeded; if it is, generate a confirmation query. After completing the consistency check, the structured business parameter values ​​are written into the power trading session context, and the corresponding business parameter items are removed from the set of missing business parameters. When the set of missing business parameters is empty, the current round of missing business parameter request process ends.

6. The intelligent interactive method for power trading based on permission awareness and multi-turn dialogue as described in claim 5, characterized in that, The invocation of the external power calculation service further includes: A specialized computing requirement vector is constructed based on the power trading session context. The similarity between this vector and the service vector corresponding to a preset external power computing service description text is then calculated to obtain a similarity value. ; Based on similarity value Input parameter integrity indicator value And character sensitivity projection value Calculate the service necessity score for external power computing services. The formula is: ; in, Preset weighting coefficients; When there is an external power calculation service with a service necessity score not less than the score threshold, the external power calculation service with the highest service necessity score is selected as the target external power calculation service. Extract the input parameters required by the target external power calculation service based on the power trading session context, construct the call request according to the interface specification of the target external power calculation service, send the call request to the target external power calculation service and receive the parsed return result; According to the context version number of the power trading session context, the parsed professional data or calculation results are written into the corresponding version of the power trading session context record for subsequent candidate trading scheme generation and simulation verification.

7. The intelligent interactive method for power trading based on permission awareness and multi-turn dialogue as described in claim 6, characterized in that, The generation of candidate trading schemes based on the power trading session context specifically includes: The system extracts business parameters, external power calculation results, and user role preference fields from the power trading session context. It then performs normalization on the extracted fields to form a scheme feature vector and generates a scheme generation direction vector based on the scheme feature vector. The scheme feature vector and scheme generation direction vector are input into the large language model dialogue agent to generate candidate transaction schemes including natural language descriptions and structured parameter sequences. The structured parameter sequences are obtained by arranging transaction price parameters, electricity parameters, time parameters and transaction node parameters in a preset order. Feasibility boundary function constraints are applied to the structured parameter sequence to ensure that the structured parameter sequence of the candidate transaction scheme is located in the preset feasible region; Calculate the structured parameter sequence based on the preset transaction target conditions. Price meets indicators The power consumption meets the target. Risk satisfaction indicators Other constraint satisfaction indicators And calculate the overall satisfaction level of the candidate transaction schemes. The formula is: ; In the formula, The weighting coefficients are used to determine the overall satisfaction level. When the overall satisfaction level If the candidate scheme generation threshold is not less than the threshold, the candidate transaction scheme and the structured parameter sequence are written into the power transaction session context and the feedback parsing process is initiated. Otherwise, the candidate transaction scheme is regenerated based on the scheme generation direction vector, and the feasibility boundary function constraint and comprehensive satisfaction degree calculation are repeatedly executed.

8. The intelligent interaction method for power trading based on permission awareness and multi-turn dialogue according to claim 7, characterized in that, The process of generating new candidate transaction schemes based on user feedback and determining the transaction schemes to be verified further includes: The system receives natural language feedback from the user, parses the natural language feedback into a preference adjustment vector by the large language model dialogue agent, performs matrix operations on the preference adjustment vector according to the preset preference conflict decomposition matrix to obtain a preference correction vector, and writes the preference correction vector into the power trading session context. The weight coefficients and thresholds in the trading target conditions are updated according to the preference correction vector. The updated weight coefficients are normalized to form the updated trading target conditions, and the updated trading target conditions are written into the power trading session context. The new business parameter requirements and data access requirements introduced by the preference correction vector are written into the power trading session context, and permission verification, requesting missing business parameters, and calling external power calculation services are performed again to generate an updated power trading session context. Based on the updated power trading session context, a new scheme generation direction vector is generated, and the structured parameter sequence of the candidate trading scheme is updated. The update formula is as follows: ,in , These represent the structured parameter sequences before and after the update, respectively. To fine-tune the compensation for the preset plan, Generate direction vectors for the scheme. Indicates the first wheel; The large language model dialogue agent generates a natural language description based on the updated structured parameter sequence and calculates the generation confidence of the candidate transaction scheme. When the overall satisfaction of the updated candidate transaction scheme is not less than the satisfaction threshold of the scheme to be verified and the generation confidence is not less than the preset confidence threshold, the updated candidate transaction scheme is marked as a transaction scheme to be verified in the power trading session context.

9. The intelligent interactive method for power trading based on permission awareness and multi-turn dialogue as described in claim 8, characterized in that, The step of submitting the transaction scheme to be verified to an external power computing service for transaction optimization and power system operation simulation verification includes: The structured parameter sequence of the transaction scheme to be verified is combined with the power system operating parameters to form a set of simulation input parameters, which is then submitted to an external power computing service for optimization and solution. In the optimization process, an optimization variable sequence consisting of transaction price parameters, electricity parameters, transaction time intervals, and node parameters is constructed. Multi-objective optimization is performed on the optimization variable sequence, and an optimized parameter sequence is generated. Based on the optimized parameter sequence, a hierarchical constraint chain verification is performed. The strong security constraint, weak security constraint, economic deviation constraint and market rule constraint are simulated and verified in sequence, and a set of simulation results and corresponding simulation verification confidence scores are generated. When any constraint is not satisfied, a default deviation sequence consisting of constraint deviations is constructed based on the simulation result set. A constraint sensitivity gradient vector and a default deviation encoding sequence are generated based on the default deviation sequence. The default deviation sequence, constraint sensitivity gradient vector, and default deviation encoding sequence are written into the power trading session context. The large language model dialogue agent generates scheme adjustment suggestions and generates candidate trading schemes again. When all hierarchical constraints are satisfied and the simulation verification confidence level is not less than the preset simulation confidence level threshold, the transaction scheme to be verified is marked as the final transaction scheme in the power trading session context.

10. The intelligent interactive method for power trading based on permission awareness and multi-turn dialogue according to claim 9, characterized in that, The step of submitting the structured data of the final transaction plan to the power trading business processing interface to perform at least one of the following business operations: generating a power trading contract, submitting a transaction application, or issuing a power consumption control instruction: The large language model dialogue agent generates a natural language summary of the final transaction plan based on the structured parameter sequence of the final transaction plan; Perform a consistency check between the natural language summary information of the final transaction plan and the structured parameter sequence of the final transaction plan, and generate structured data records for business processing; Select the corresponding business processing formatting rules based on the structured data records, generate business processing instructions, and submit them to the power trading business processing interface; After the business processing interface returns a response, a transaction execution receipt is generated, and the receipt confidence level is calculated. When the receipt confidence level is not less than a preset threshold, the transaction execution receipt is written into the power trading session context.

11. A smart interactive system for power trading based on permission awareness and multi-turn dialogue, characterized in that, include: The parsing module is used to obtain the user identifier of the electricity market user, determine the user role according to the user role mapping table, and parse the natural language request input by the user and the user role input large language model dialogue agent to obtain the transaction intent, target transaction type and target data access item set, and establish the electricity transaction session context. The permission module is used to determine the permitted data access set from the role permission control rule set according to the user role and perform permission verification. When there is an access item in the target data access item set that does not belong to the permitted data access set, the permission denial response is output and the power trading session is terminated. Otherwise, the permission is granted and a permission-granted flag is recorded in the power trading session context; The calling module is used, under the condition that the permissions are granted, for the large language model dialogue agent to request missing business parameters from the user based on the power trading session context, and to write the user's response into the power trading session context. When it is determined that professional data or calculations are needed based on the power trading session context, an external power calculation service is invoked and the returned results are written into the power trading session context. The scheme generation module is used to generate candidate trading schemes based on the power trading session context by the large language model dialogue agent and receive user feedback on the schemes. The user feedback is written into the power trading session context and permission verification, requesting missing business parameters and calling external power calculation services are performed again to generate new candidate trading schemes that match the user feedback. When the new candidate trading scheme meets the trading target conditions, it is used as a trading scheme to be verified. The verification module is used to submit the transaction scheme to be verified to an external power computing service for transaction optimization solution and power system operation simulation verification. When the verification result has indicators that violate operating constraints or market rules, the verification result is written into the power transaction session context and the large language model dialogue agent generates scheme adjustment suggestions and generates candidate transaction schemes again. When all verification results meet the operating constraints, the final transaction scheme is determined. The submission module is used to output the natural language summary information of the final transaction plan by the large language model dialogue agent, and submit the structured data of the final transaction plan to the power transaction business processing interface to perform at least one of the business operations of power transaction contract generation, transaction declaration or power consumption control instruction issuance.

12. A terminal, comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the power trading intelligent interaction method based on permission awareness and multi-turn dialogue as described in any one of claims 1-9.