Energy storage project policy retrieval and subsidy measurement and calculation method based on large language model
By constructing a structured policy knowledge base and using a large language model to analyze user intent, and combining Bi-Encoder and Cross-Encoder for semantic retrieval, the problem of cumbersome and inaccurate policy acquisition and retrieval methods for energy storage projects has been solved. This has enabled efficient and accurate policy matching and subsidy calculation, thereby improving the efficiency of energy storage project implementation.
Patent Information
- Application Number
- CN202511709682.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-20
- Publication Date
- 2026-03-03
AI Technical Summary
The existing methods for obtaining and retrieving policies for energy storage projects are cumbersome, have low accuracy, struggle to handle vague scenario descriptions, and cannot accurately determine the timeliness of policies, thus affecting the accuracy and efficiency of subsidy applications.
A structured policy knowledge base is constructed, and user intent is analyzed by combining a large language model (LLM). Semantic retrieval is performed through Bi-Encoder and Cross-Encoder to calculate the comprehensive confidence score, screen effective policies, and generate application paths using the Dijkstra algorithm. The subsidy amount is automatically calculated and a three-part response is generated.
Significantly improves the accuracy and efficiency of policy retrieval, reduces the burden on users, ensures timeliness and data security, quickly responds to policy query needs, and provides authoritative and easy-to-understand answers.
Smart Images

Figure CN121597658A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of policy retrieval and subsidy calculation technology in the energy storage industry, specifically a method for policy retrieval and subsidy calculation of energy storage projects based on a large language model. Background Technology
[0002] Currently, various provinces and cities have issued multi-level subsidy and tax incentive documents for different types of energy storage projects, including industrial and commercial energy storage, residential photovoltaic and energy storage, and microgrids. When accessing these policies, relevant personnel need to manually browse the official websites of government departments and interpret key aspects such as "installation capacity limits, filing requirements, and application procedures." Furthermore, while Large Language Models (LLMs) excel in natural language understanding, achieving authoritative policy responses requires combining them with structured policy knowledge bases, timely filtering mechanisms, and confidence assessment methods. Relying solely on LLMs cannot meet the accuracy and authoritative requirements of policy retrieval.
[0003] Existing methods for obtaining and retrieving energy storage project policies have significant shortcomings. On the one hand, manual policy searches are not only cumbersome and time-consuming, but may also lead to interpretation errors due to differences in individual understanding of policy clauses, affecting the accuracy of subsidy applications. On the other hand, traditional keyword search methods cannot effectively handle vague scenario descriptions, accurately judge policy timeliness, or precisely match the policy documents needed by users. This fails to provide reliable support for energy storage project personnel to quickly and accurately obtain applicable policies and subsidy information, thus affecting project progress efficiency. Therefore, in response to the above situation, there is an urgent need to develop a method for retrieving energy storage project policies and calculating subsidies based on a large language model to overcome the shortcomings in current practical applications. Summary of the Invention
[0004] The purpose of this invention is to provide a method for policy retrieval and subsidy calculation of energy storage projects based on a large language model, so as to solve the problems mentioned in the background art.
[0005] To achieve the above objectives, the present invention provides the following technical solution:
[0006] A method for policy retrieval and subsidy calculation for energy storage projects based on a large language model includes the following steps:
[0007] (1) Construct a structured policy knowledge base, which stores structured data on policies related to energy storage projects, including policy validity information and subsidy rules information;
[0008] (2) Receive energy storage project information input by the user, wherein the energy storage project information includes at least the project type and applicable region;
[0009] (3) The energy storage project information is parsed using a large language model to extract the core elements of user intent;
[0010] (4) Based on the core elements of the user intent, retrieve candidate policies from the structured policy knowledge base;
[0011] (5) Calculate the overall confidence score of the candidate policies and screen effective policies in combination with the policy validity period information. The overall confidence score is obtained by weighted fusion of vector similarity and policy matching probability output by the large language model.
[0012] (6) Calculate the subsidy amount for the energy storage project based on the subsidy rules information in the effective policy;
[0013] (7) The subsidy application path of the energy storage project is inferred by Dijkstra's algorithm, which is executed based on the regional subsidy application flowchart;
[0014] (8) Generate a three-part response that includes the effective policy information, subsidy amount and application path.
[0015] As a further aspect of the present invention: in step (1), the structured policy knowledge base stores policy data in JSON-L format, and the policy data includes policy metadata and structured content of the policy text;
[0016] The policy metadata should at least include the policy title, issuing authority, policy document number, applicable region, effective date, and expiration date;
[0017] The structured content of the policy text should at least cover the types of projects for which subsidies apply, the range of energy storage parameters, and the subsidy calculation formula.
[0018] As a further aspect of the present invention: in step (3), the core elements of the user intent include at least the project type, energy storage capacity, energy storage power, applicable region code, and application time window;
[0019] The large language model outputs a parsing confidence score after parsing. When the parsing confidence score reaches a preset threshold, the parsing result is deemed valid.
[0020] As a further aspect of the present invention: in step (4), a two-level retrieval architecture is used to obtain candidate policies:
[0021] First, the core elements of user intent and policy data are encoded into embedding vectors using Bi-Encoder. Then, the vector similarity is calculated, and initial candidate policies are selected in descending order of similarity.
[0022] The initial candidate policies are then refined using a Cross-Encoder to obtain the final candidate policies.
[0023] As a further aspect of the present invention: in step (5), the formula for calculating the comprehensive confidence level is as follows:
[0024] ;
[0025] Among them, Conf k p represents the overall confidence level of the k-th candidate policy. k Let s be the matching probability of the large language model for the k-th candidate policy. k Let w1 and w2 be the vector similarity between the k-th candidate policy and the core elements of the user's intent, where w1 and w2 are weighting coefficients and satisfy w1+w2=1;
[0026] The policy validity period information is filtered based on the condition that the current date falls between the policy's effective date and its expiration date.
[0027] As a further aspect of the present invention: in step (6), the subsidy calculation method corresponding to the subsidy rule information includes at least one of linear fixed-amount calculation method and tiered calculation method;
[0028] When the linear fixed-quota calculation method is adopted, the subsidy amount is calculated based on the preset capacity subsidy coefficient, power subsidy coefficient and fixed-quota subsidy.
[0029] When using a tiered calculation method, the subsidy amount is calculated based on the subsidy coefficient corresponding to the range of energy storage parameters; if the policy contains a subsidy capping clause or a subsidy superposition clause, the subsidy amount is adjusted according to the corresponding clause.
[0030] As a further aspect of the present invention: in step (7), the regional subsidy application flowchart is a directed graph G=(V,E), where V is a set of nodes, and each node represents a subsidy application stage;
[0031] E is a set of edges, where each edge represents a transition between two application stages, and each edge corresponds to a comprehensive cost weight.
[0032] The comprehensive cost weight is determined at least based on semantic similarity of links, validity period matching degree, geographical distance and process relevance.
[0033] As a further aspect of the present invention: in step (8), the three-part response includes a key point section, an operation section, and a deadline section;
[0034] The key points section includes basic information about the effective policy and the subsidy amount; the operation section includes the application process and operation requirements; and the deadline section includes the application deadline and policy validity reminders.
[0035] Furthermore, the three-part response is accompanied by a unique identifier for the automatically matched policy and an identifier for the clauses on which the subsidy calculation is based.
[0036] As a further aspect of the present invention, it also includes a localization deployment step: deploying the structured policy knowledge base, the large language model, and the encoder for policy retrieval on the user's local server to achieve localized storage and processing of policy data and project data.
[0037] As a further aspect of the present invention: when the energy storage power parameters are missing in the energy storage project information input by the user, the default power value is determined according to the preset power ratio constraint, wherein the power ratio constraint is set based on the energy storage project type and industry standards.
[0038] Furthermore, the three-part response includes instructions on using the default power value, prompting users to supplement the power parameters to obtain a more accurate subsidy amount.
[0039] Compared with the prior art, the beneficial effects of the present invention are:
[0040] 1. Significantly improves policy retrieval quality. Adopting a technical solution that integrates semantic retrieval and LLM confidence, after testing with 100 queries, the policy recall rate reached 95.8% and the false positive rate was only 4.7%. Compared with the traditional keyword retrieval's recall rate of 71.3% and false positive rate of 22.5%, the accuracy of policy matching has been greatly improved.
[0041] 2. Reduce users' workload by automatically calculating subsidies and generating application paths for energy storage projects. Users do not need to manually calculate subsidy amounts and sort out application steps. The subsidy calculation can be automatically substituted into the calculation based on the linear quota or tiered rules of the policy terms. The application path is generated by searching for the shortest path in the regional flowchart using the Dijkstra algorithm, which improves the efficiency of subsidy application.
[0042] 3. Ensure policy timeliness by having an automatic timeliness filtering function. By enforcing the constraint that "current date ≤ policy expiration date", expired or invalid policies will be eliminated, and only valid policies will be pushed to users to avoid user decision-making errors due to policy timeliness issues.
[0043] 4. Ensures data and policy compliance and security, supports localized deployment mode, and can meet the requirements of the energy storage industry for project data and policy information security management;
[0044] 5. Fast response speed: Under the hardware conditions of Edge GPU of about 10W, the end-to-end latency is about 1.15s, and the average response time of a single query is 1.2s, which is far lower than the average response time of 8.4s of traditional keyword search. It can quickly respond to users' policy query and subsidy calculation needs.
[0045] 6. The response is authoritative and easy to understand, and the output conforms to the CEFR B1 level Chinese standard, without obscure terms. When necessary, it will also include "the relevant clause fragment + evidence pointer (policy ID and clause number)" to improve the verifiability of the response and make it easier for users to trace the policy basis. Attached Figure Description
[0046] Figure 1 This is an overall architecture diagram of energy storage project policy retrieval and subsidy calculation based on a large language model in an embodiment of the present invention.
[0047] Figure 2 This is a schematic diagram of the external data source for energy storage project policies in an embodiment of the present invention.
[0048] Figure 3 This is a flowchart illustrating the process of policy data access and synchronization for energy storage projects in this embodiment of the invention. Detailed Implementation
[0049] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0050] The specific implementation of the present invention will be described in detail below with reference to specific embodiments.
[0051] Please see Figures 1-3 This invention provides a method for policy retrieval and subsidy calculation for energy storage projects based on a large language model (LLM). This method addresses the problems of cumbersome manual operations, low keyword retrieval accuracy, and difficulty in determining policy timeliness in existing energy storage project policy queries. It achieves this through a pipeline of "knowledge base layer → intent parsing → candidate retrieval → confidence fusion → subsidy calculation → process reasoning → response generation." By combining a large language model (LLM) with structured policy data, it enables automatic policy matching, accurate subsidy calculation, and application path guidance. The following detailed description of the implementation process further illustrates this.
[0052] I. Overall Plan Overview;
[0053] This invention constructs an intelligent engine to support policy retrieval and subsidy calculation for energy storage projects. It uses a structured policy knowledge base stored in JSON-L (JSONLines) format as its data foundation, a text encoder with Bi-Encoder / Cross-Encoder as its core to achieve policy semantic retrieval, and LLM (Limited Language Management) to complete user intent parsing, matching probability assessment, and response generation. Valid policies are screened through a joint confidence score determined by vector similarity and LLM. The comprehensive confidence score calculation formula is as follows:
[0054] ;
[0055] in, Let be the LLM matching probability for policy k. The vector cosine similarity is used, with weights of 0.7 / 0.3 set based on compliance priority principles; for exploratory queries requiring improved recall, this can be adjusted. Weight 0.6 Weight 0.4;
[0056] The system automatically calculates subsidy amounts based on policy provisions, uses the Dijkstra algorithm to infer application paths, and finally outputs a three-part response in Chinese that conforms to CEFR B1 standards. This invention can achieve a policy recall rate of ≥95%, a false positive rate of ≤5%, a single-round query response time of ≤1.5s (Edge GPU 10W), and automatically remove expired policies, ensuring the accuracy, timeliness, and understandability of the output content.
[0057] II. Construction and Data Processing of Policy Knowledge Base;
[0058] 2.1 Policy data collection channels;
[0059] To ensure the authority, comprehensiveness, and traceability of policy data, this implementation method collects policy documents through the following channels, specifically including:
[0060] Government Portal and Gazette System (Authoritative Source): Official websites of government departments and government gazettes; access is achieved through RSS subscriptions, site map parsing, customized crawlers (compliant with the website robots protocol), and open APIs to ensure the acquisition of original policy texts and complete metadata.
[0061] Government open data platforms and e-government resources: Policy indexes categorized as "energy" and "fiscal subsidies" in local "open data platforms" and data exported from project filing systems can directly obtain structured policy summaries and application requirements.
[0062] Authoritative databases and public disclosure systems (secondary authoritative sources): national policy and regulation databases, provincial energy policy databases, public disclosure information on energy storage project subsidies in the "Credit China" platform, and subsidy implementation rules issued by energy trading centers, ensuring the compliance verification basis for policy provisions.
[0063] Policy interpretation materials (supporting sources): Policy interpretation documents, service guides and online Q&A transcripts issued by government departments are only used to assist in interpreting ambiguous expressions in policy clauses (such as the specific definition of "installation limit"), and are not used as the core policy basis.
[0064] Industry associations and official subscription channels: Policy compilations published by energy storage industry associations on their white lists, push content from government official WeChat accounts (which must include links to the original policy text and official document numbers), and supplementary information on local subsidy policies (such as district and county-level matching subsidies).
[0065] 2.2 Policy data entry process;
[0066] The collected policy data is processed through the following steps before being stored in the knowledge base to ensure that the data is structured, free of redundancy, and timely:
[0067] Deduplication: Based on the four elements of "URL fingerprint + policy document number + title + publication date", duplicate uploads or identical policies from different channels are eliminated to avoid duplicate results during retrieval.
[0068] Standardized processing: Unify policy metadata fields, with the field set as {title (policy title), issuer (issuing unit), doc_id (policy document number), region (applicable region, accurate to province / city / district / county), issue_date (issue date), effective_start (effective date), effective_end (expiration date), status (policy status: valid / trial / expired / repealed / superseded), url (original link)}, ensuring that the key attributes of each policy are searchable and filterable.
[0069] Structured processing: The policy text is segmented into clauses, with a focus on extracting core information related to subsidies, including: the type of project to which subsidies apply (commercial / industrial energy storage / residential photovoltaic-energy storage / microgrids, etc.), energy storage capacity range (kWh), power range (kW), subsidy calculation formula (linear / stepwise), and subsidy coefficients (e.g., a, b, c, α). i The results of the extraction will be stored in conjunction with the policy metadata, including the application window time limit and the list of required materials.
[0070] Validity and Version Verification: LLM automatically identifies expressions such as "Effective Date," "Expiration Date," "Repeal Notice," and "Substitution Relationship" in the policy text, updating the `status` and `effective_end` fields accordingly. If the policy contains extension statements such as "Subsidy extended to Year Y," `effective_end` is automatically updated to December 31st of Year Y. Simultaneously, policy substitution relationships are recorded, including `repeals[]` (a list of repealed documents) and `superseded_by?` (the superseded identifier), ensuring version uniqueness. The validity determination logic is `valid_by_date = (` ≤today≤ ),in For the effective date, The expiration date is used to determine if a policy is valid only if the policy status is valid / trial and it has not been repealed or replaced.
[0071] Data entry and index construction: Each policy record is stored in JSON-L format, with the record structure being ⟨ID, Region, Subject, Validity Period[t] min ,t max ], Embedded e k >, where e k The vector is obtained by encoding the structured content of the policy by the text encoder; at the same time, a text inverted index (keyword-policy ID mapping) and a vector index (embedded vector-policy ID mapping) are generated and stored in a relational database and a vector database respectively to support fast retrieval.
[0072] III. Text Encoder Selection and Training;
[0073] 3.1 Encoder selection criteria and combinations;
[0074] This implementation method needs to balance the accuracy of policy semantic retrieval with the latency of edge device deployment. The encoder selection follows these guidelines:
[0075] Language and domain adaptation: Primarily for Chinese processing, supporting accurate encoding of policy texts in standard Chinese (e.g., “Document No. ××”) and numerical formulas (e.g., “R=aE+bP”);
[0076] Search paradigm matching: A two-level search architecture of Bi-Encoder main recall and Cross-Encoder reordering is adopted to balance recall and precision;
[0077] Balancing size and latency: Base-level models are prioritized to ensure coding accuracy, and the models are compressed to Small level through model distillation to meet the deployment requirements of Edge GPU (10W).
[0078] Based on the above criteria, the following encoder combination is recommended:
[0079] Bi-Encoder: Selects BGE-base-zh or E5-base-zh model, fine-tuned on the energy storage policy dataset, to encode user queries and policy text into a unified dimension embedding vector to achieve fast recall (latency ≤ 0.25s).
[0080] Cross-Encoder: Uses either the RoBERTa-small or DeBERTa-small model to refine the candidate policies recalled by the Bi-Encoder, outputting the matching probability between policy k and query q. ;
[0081] Model distillation and quantization: Using the fine-tuned Cross-Encoder and LLM as teacher models, knowledge distillation is performed on the Bi-Encoder. INT8 / INT4 quantization technology is used to compress the model size, reduce the computing power consumption of edge devices, and ensure that the encoding latency meets the requirements.
[0082] 3.2 Training data construction and configuration;
[0083] Sample pair construction:
[0084] Positive samples (q,d) + ): This is determined by querying real energy storage project policies (such as "Shenzhen residential photovoltaic-energy storage subsidy") and matching the policy text. + Composed of 10–30k entries;
[0085] Hard-to-bear samples (q,d) - ): The query q matches the policy text d which is "similar in theme but does not match in region / project type". - The data consists of 50–150k entries (e.g., “Shenzhen residential PV-Storage query” corresponds to “Guangzhou residential PV-Storage policy”), enhancing the model’s ability to differentiate between different data types.
[0086] Objective function: The contrastive learning loss function is used, and the formula is as follows:
[0087]
[0088] Where m is the interval parameter (value 0.2), e q To query the embedding vector of q, , These are the embedding vectors for positive and negative sample policies, respectively. Let be the vector cosine similarity.
[0089] Training configuration: Batch size set to 128, initial learning rate set to 2×10⁻⁶. -5 The AdamW optimizer is used, with 3–5 training rounds. After each round, the encoding accuracy is evaluated on the validation set (containing 2k labeled samples). Training stops once the accuracy is achieved.
[0090] IV. User Intent Analysis;
[0091] 4.1 Intent parsing task definition;
[0092] In this implementation, LLM needs to extract 6 core elements from the user's natural language query. The element set (schema) is defined as: {proj_type (project type, such as industrial and commercial energy storage), capacity_E (energy storage capacity, unit kWh), power_P (energy storage power, unit kW), region_code (applicable region code, such as 320100 representing Nanjing), time_window (application time window, such as 2024Q4), subsidy_formula_flag (subsidy formula type, such as linear / stepwise)}.
[0093] Resolution criteria: Numerical elements (capacity_E, power_P) are allowed ±1% resolution error or correct unit conversion (e.g., 2MWh to 2000kWh). Categorical elements (proj_type, region_code) must completely match the preset dictionary (e.g., region_code matches the national administrative division code) to be considered correctly resolved.
[0094] 4.2 Resolution Accuracy and Confidence Threshold Calibration
[0095] Accuracy assessment: Manual annotation and validation were performed on 100 real / synthetic mixed queries. The results are as follows:
[0096] Overall exact match rate (Exact Slot-EM): 92% (number of queries that resolved all 6 categories of elements correctly / total number of queries = 92 / 100);
[0097] Field accuracy rates: proj_type 96% (96 / 100), region_code 95% (95 / 100), capacity_E 94% (94 / 100), power_P 93% (93 / 100), time_window 88% (88 / 100), subsidy_formula_flag 97% (97 / 100). The accuracy of time_window is relatively low because some queries do not explicitly mention the application time (such as "Nanjing industrial and commercial energy storage subsidy"), which needs to be supplemented in subsequent process prompts.
[0098] Confidence threshold calibration: LLM outputs the parsing confidence score p (∈[0,1]) for each query, defining "parsing correctly" as a positive example and "at least one type of feature error" as a negative example. The optimal threshold t=0.75 is selected through grid search. The performance metrics on 100 samples are as follows:
[0099] True positive (TP): 79 (confidence ≥ 0.75 and correct interpretation), False positive (FP): 4 (confidence ≥ 0.75 but incorrect interpretation), False negative (FN): 13 (confidence < 0.75 but correct interpretation), True negative (TN): 4 (confidence < 0.75 and incorrect interpretation);
[0100] Precision: 79 / (79+4)=95.2%, Recall: 79 / (79+13)=85.8%, F1 score: 2×0.952×0.858 / (0.952+0.858)=0.902;
[0101] To improve the reliability of the confidence score, isotonic regression was used to calibrate p on the development set (500 samples). After calibration, the Brier score (probability prediction error) was 0.078, and the expected calibration error (ECE) was 0.023, ensuring that the confidence score was highly consistent with the actual analytical accuracy.
[0102] Deployment strategy: The default threshold for judging the parsing results is t=0.75; if the user query involves "high-amount subsidy projects" (such as estimated subsidies ≥ 1 million yuan), the threshold is increased to t=0.80, at which point the precision is increased to 97%, reducing the risk of misjudgment of subsidies due to incorrect parsing; the model is retrained and calibrated monthly based on newly labeled samples (≥100), and if ECE>0.05, recalibration is forced.
[0103] V. Policy candidate retrieval and confidence fusion;
[0104] 5.1 Recall of candidate policies;
[0105] Query embedding encoding: Concatenate the key user query elements (proj_type, region_code, capacity_E, etc.) parsed by LLM into text (e.g., "Project type: commercial and industrial energy storage, region: Nanjing, capacity: 2000kWh"), and input it into Bi-Encoder to generate embedding vectors. ,default L2 norm =1.
[0106] Similarity calculation: Calculate similarity in the policy vector library. Embedded vectors for each policy cosine similarity The formula is:
[0107]
[0108] because = =1, to simplify calculations. ∈[0,1], the larger the value, the stronger the semantic relevance.
[0109] Preliminary recall: according to The top 50 policies are selected in descending order as the candidate set to ensure coverage of highly relevant policies, while controlling the computational cost of subsequent fine-tuning.
[0110] 5.2 Confidence fusion and valid matching determination;
[0111] LLM matching probability evaluation: Input the user query text and the structured content (including validity period and subsidy clauses) of each policy in the candidate set into a Cross-Encoder (or LLM), and output the probability that policy k matches the query. (∈[0,1]) The policy should be comprehensively considered in terms of regional suitability, project type suitability, and compliance with terms (such as whether the capacity meets the policy limit).
[0112] Overall confidence calculation: to take into account semantic relevance ( ) and compliance adaptability ( The overall confidence level is calculated using a weighted fusion method. The formula is:
[0113] ;
[0114] The weights of 0.7 and 0.3 are set based on the business requirement that compliance takes precedence over semantics. If the scenario requires prioritizing recall (such as exploratory queries), they can be adjusted. Weight to 0.4, Weighting to 0.6.
[0115] Valid match filtering: Policies that meet both of the following conditions are considered valid matches:
[0116] Overall confidence level ≥0.75;
[0117] The policy's validity period satisfies the condition that today ≤ t. max (t) max The policy expiration date is taken from the validity period field of the JSON-L record. min ,t max ( ) Automatically remove expired or ineffective policies.
[0118] Sorting and Pruning: If the number of valid matching policies is ≥3, sort by... Sort in descending order and keep the first 3; if there are 2 valid matching policies, keep them directly; if there is 1 valid matching policy, keep it and mark it as a unique match; if... If the differences are close (e.g., the difference ≤ 0.02), the policy with the more recent expiration date will be retained (e.g., the policy issued in 2024 will take precedence over the policy issued in 2023).
[0119] VI. Subsidy Calculation;
[0120] To address the different subsidy calculation rules in the effective matching policy, this implementation method provides two calculation methods: linear quota and tiered method, and handles complex scenarios such as default parameters, capping, and superposition.
[0121] 6.1 Calculation of linear fixed-amount subsidies;
[0122] If the policy clearly provides a subsidy formula of "capacity + power + quota", in the form of: R = aE + bP + c, where:
[0123] 'a' represents the subsidy coefficient based on energy storage capacity (unit: yuan / kWh), such as 40 yuan / kWh;
[0124] b is the subsidy coefficient based on energy storage capacity (unit: yuan / kW), such as 70 yuan / kW;
[0125] c represents a fixed subsidy amount (unit: yuan), which is related to the project format or access conditions (e.g., "projects that have passed the filing process will receive an additional subsidy of 5,000 yuan"). When there is no fixed amount, c = 0.
[0126] E represents the energy storage capacity of the user project (kWh, taken from the intent parsing result), and P represents the energy storage power (kW, taken from the intent parsing result; if omitted, it will be handled according to Section 6.3).
[0127] Calculation example: If policy k=1, a=40 yuan / kWh, b=70 yuan / kW, c=0, user project E=2000kWh, P=1000kW, then the subsidy amount R=40×2000+70×1000+0=150000 yuan (150,000 yuan).
[0128] 6.2 Calculation of tiered subsidies;
[0129] If the policy provisions set subsidy coefficients in segments based on energy storage capacity (or power) ranges, the form would be:
[0130]
[0131] Where α1, α2, and α3 are the subsidy coefficients (yuan / kWh) for different capacity ranges.
[0132] E1 and E2 are the capacity range boundaries (kWh), which are identified by LLM from policy provisions (e.g., "capacity ≤ 1000kWh is charged at 30 yuan / kWh, 1000 < capacity ≤ 2000kWh is charged at 35 yuan / kWh, and capacity > 2000kWh is charged at 40 yuan / kWh").
[0133] E represents the user project capacity (kWh).
[0134] 6.2.1 Handling of capping clauses;
[0135] If the policy contains capped statements such as "the subsidy shall not exceed C yuan" or "the maximum subsidy is C yuan per household," the calculation should take the minimum value of the tiered calculation result. The formula is as follows:
[0136] R = min(step calculation result, C);
[0137] Where C is the capped amount (in yuan) stipulated by policy, and C = +∞ when there is no cap.
[0138] 6.2.2 Handling of overlapping clauses;
[0139] According to the wording of the overlapping rules in the policy, three situations will be handled:
[0140] Stackable (e.g., "provincial subsidies can be combined with national subsidies"): If a project simultaneously meets multiple stackable policies (e.g., simultaneously meeting national and Jiangsu provincial policies), the total subsidy is the sum of the subsidy amounts from each policy, as shown in the formula:
[0141]
[0142] in, For the set of applicable policies, R i Let be the subsidy amount under the i-th policy;
[0143] Non-stackable (e.g., "highest amount not allowed to be enjoyed repeatedly"): If a project falls under multiple non-stackable policies, the total subsidy is the maximum value of the subsidy amounts from each policy, calculated using the following formula:
[0144]
[0145] For conditions that are combined (e.g., "combined with local supporting policies, the total amount shall not exceed C yuan"): First calculate the sum of the subsidy amounts of each policy, then take the cap on the sum. The formula is as follows:
[0146]
[0147] 6.3 Handling of conservative default values when using default power;
[0148] When a user query provides only the energy storage capacity E (kWh) but not the power P (kW), if the policy formula includes P (such as the linear quota formula R=aE+bP), the default power P will be set according to the following conservative principles. * To avoid overestimating power and resulting in inflated subsidy amounts:
[0149] Minimum power ratio constraint: Industry standards and most policies set the power ratio (P / E) range at 0.25-1 (i.e., 0.25C–1C). Unless otherwise specified, P is taken as P / E. * =0.25E (e.g., when E=1000kWh, P) * =250kW);
[0150] For grid-connected projects: If the policy clearly states that "the power of grid-connected projects shall not be less than 0.3C of the capacity", then P is taken. * =0.3E (e.g., when E=1000kWh, P) * =300kW);
[0151] For residential or small-scale projects: Refer to the technical specifications for distributed energy storage devices, and take P. * =E / 2 (i.e., 0.5C, such as when E=200kWh, P) * =100kW).
[0152] Note the uncertainty: All results calculated using the default power P* are noted in the response as follows: "Power not provided, calculated based on conservative default values (0.25C / 0.3C / 0.5C). A more accurate amount can be obtained after providing the power."
[0153] VII. Reasoning for the Application Process;
[0154] To guide users in efficiently completing subsidy applications, this implementation method generates optimal application steps and auxiliary requirements by constructing a regional application flowchart and combining it with a shortest path algorithm.
[0155] 7.1 Construction of Regional Application Flowchart;
[0156] Construct a regional application flowchart G=(V,E), where:
[0157] Node set V: Each node v∈V represents an application stage, such as v0 (project entry), v1 (online filing and submission), v2 (municipal review), v3 (provincial review), v4 (financial disbursement completed), and v4 is the final node (subsidy received / project closed).
[0158] Edge set E: Each edge e=(u→v)∈E represents a transition from stage u to stage v. The edge weight w(u→v) represents the "comprehensive cost" of the transition (weighted fusion time, risk, and material complexity). w(u→v)∈[0,1], and the smaller the value, the more efficient and less risky the stage is.
[0159] Quantitative calculation of edge weight w(u→v): The edge weight is obtained by weighted summation of 6 dimensions, as shown in the formula:
[0160]
[0161] Where α1~α5 are weighting coefficients, with values of (0.35, 0.20, 0.15, 0.10, 0.20), and a total of 1;
[0162] The semantic similarity (cos( )) between the terms corresponding to nodes u and v )), ( }) represents the semantic mismatch degree;
[0163] As a validity period penalty, if the current date is not within the valid declaration period of node v, =1, otherwise =0;
[0164] The distance is defined as the geographical level distance, representing the administrative level difference (e.g., 1 from city to province) and the maximum level difference between the regions to which u and v apply. The ratio of 3, =Level difference / ;
[0165] This is a recent decay term. Δ(v) is the number of days since the process corresponding to node v was released, λ = 180 days (half-life).
[0166] Let LLM be the confidence score for the u→v transition (∈[0,1]), ( ) represents the confidence mismatch degree;
[0167] ε=10 -6 It is a very small positive number to avoid the zero-cycle problem in the algorithm caused by edge weights of 0.
[0168] 7.2 Shortest path reasoning (Dijkstra's algorithm);
[0169] For a given user's location (e.g., Nanjing), extract the corresponding subgraph G'⊆G. Using v0 (project entry) as the source node and v4 (financial disbursement completion) as the terminal node, run Dijkstra's algorithm to search for the shortest path P. The path P is in the form of:
[0170] P={v0,v1,v2,...,v m};
[0171] in, The final node is the node sequence on the path, which is the list of application steps.
[0172] Example of reasoning: The application path for industrial and commercial energy storage projects in Nanjing is P = {online filing and submission (v1) → review by relevant municipal government departments (v2) → provincial review (v3) → fiscal disbursement (v4)}.
[0173] At the same time, the algorithm outputs auxiliary constraints for each step:
[0174] Time limits: such as "online filing must be completed before December 31, 2024" and "the review period for relevant municipal government departments is 5 working days";
[0175] Required materials: such as "Upload a scanned copy of the business license, equipment parameter list, and grid connection agreement when submitting for filing" and "Supplement the subsidy application form (signed and stamped version) for provincial review".
[0176] 8. Generation of a three-part response;
[0177] LLM (Limited Language Management) adheres to the principles of "clarity, ease of understanding, and verifiability," generating responses according to the following three-part structure. The output text conforms to CEFR B1 level Chinese standards (no obscure terminology, simple sentence structure), specifically including:
[0178] 8.1 Key points;
[0179] Includes: basic information on the effective matching policy (policy document number, issuing authority, validity period), and overall confidence level. 1. Expected subsidy amount R (please specify the unit and whether the default power is used). Example: "Matching policy: 'Implementation Rules for Industrial and Commercial Energy Storage Subsidies in Jiangsu Province in 2024' (Su Neng Fa
[2024] No. 15), validity period: 2024-01-01 to 2024-12-31, confidence level 0.789; Expected subsidy amount: RMB 150,000 (150,000 yuan), calculated based on the capacity of 2000kWh and power of 1000kW that you provided."
[0180] 8.2 Operation segment;
[0181] Includes: a list of steps for the application process (P), key points for each step (e.g., "Online filing and submission" requires logging into the "relevant government department's government service platform," website: ×××), a list of key materials and upload requirements (e.g., "Equipment parameter list must include the manufacturer's qualification certificate"). Example: "Application steps: 1. Online filing and submission: Log in to the relevant government department's government service platform, fill in the project information and upload the business license and equipment parameter list; 2. Review by relevant municipal government departments: Wait 5 working days, and check the review progress on the platform; 3. Provincial review: After the review is approved, submit the subsidy application form (with company seal) offline to the relevant government department; 4. Financial disbursement: After the review is approved, the subsidy will be disbursed to the company's public account within 30 working days."
[0182] 8.3 Deadline range;
[0183] Includes: the application deadline (taken from the policy's effective_end or application window clauses), suggestions for pre-application preparations for key steps (e.g., "It is recommended to complete the online filing 20 working days in advance to allow time for review and modification"), and policy expiration reminders (e.g., "If you apply after December 31, 2024, you need to pay attention to the latest policies in 2025"). Example: "Application deadline: December 31, 2024 (based on the online filing submission time); Recommendation: Please complete the online filing before December 1, 2024 to avoid delays due to material modification; Reminder: This policy will expire after December 31, 2024. If you apply after the deadline, you will need to wait for the release of subsequent policies."
[0184] 8.4 Verifiability assurance;
[0185] The response should be accompanied by "evidence pointers", including: a unique ID matching the policy (e.g., POL-320100-2024-015), the clause number on which the subsidy calculation is based (e.g., "the subsidy coefficient is taken from Article 5 of the policy"), and the clause number on which the application process is based (e.g., "the application steps are taken from Article 8 of the policy"). Users can use the policy ID to query the original text in the system and verify the compliance of the calculation and process.
[0186] IX. End-to-end application examples;
[0187] The following example, using a user query "What subsidies are available for 2MWh (capacity) commercial and industrial energy storage in Nanjing, Jiangsu?", fully demonstrates the workflow of this invention:
[0188] Step 1: Intent Analysis
[0189] LLM extracts query elements:
[0190] proj_type=Commercial and Industrial Energy Storage;
[0191] capacity_E=2MWh=2000kWh (unit conversion is correct);
[0192] region_code=320100 (Nanjing City Administrative Division Code);
[0193] power_P = Not provided (requires further information; temporarily marked as "to be provided").
[0194] time_window=not specified (defaults to the current policy validity period);
[0195] subsidy_formula_flag = linear quota (LLM pre-identifies that most recent industrial and commercial energy storage policies in Jiangsu are linear formulas); the analytical confidence score p = 0.82 ≥ 0.75, the analysis is deemed valid, and the user is prompted "No energy storage power provided, do you want to supplement it? If not, it will be conservatively calculated at 0.25C (500kW)", the user responded "supplement power 1000kW (1MW)", and power_P = 1000kW was updated.
[0196] Step 2: Candidate retrieval and confidence fusion;
[0197] Generate query embeddings Similarity was calculated in the vector database of industrial and commercial energy storage policies in Nanjing, and the first 50 policies were initially recalled.
[0198] The cross-encoder outputs three policies within their validity period. : k=1 (p1=0.78), k=2 (p2=0.70), k=3 (p3=0.85);
[0199] calculate :
[0200] =0.7×0.78+0.3×0.81=0.789 ( =0.81);
[0201] =0.7×0.70+0.3×0.76=0.742( =0.76);
[0202] =0.7×0.85+0.3×0.69=0.747( =0.69);
[0203] Filter valid matches: only =0.789≥0.75, retain k=1 (Su Neng Fa
[2024] No. 15), k=2, k=3 because <0.75, marked "Confidence slightly low (0.742 / 0.747), for reference only".
[0204] Step 3: Subsidy Calculation;
[0205] Policy clause with k=1: R=aE+bP+c, a=40 yuan / kWh, b=70 yuan / kW, c=0, no cap, cannot be combined with other provincial subsidies; Substituting E=2000kWh and P=1000kW: R=40×2000+70×1000+0=150000 yuan (150,000 yuan).
[0206] Step 4: Reasoning of the application process;
[0207] Extract the subgraph G' of Nanjing region, run Dijkstra's algorithm to obtain the shortest path P = {online filing submission → review by relevant municipal government departments → provincial review → fiscal disbursement}, with auxiliary constraints:
[0208] Timeframe: Online filing deadline is December 31, 2024; municipal government departments will review the application within 5 working days; provincial government review will take 10 working days.
[0209] Materials required: For filing, a business license, equipment parameter list, and grid connection agreement are required; for review, a subsidy application form (stamped) is required.
[0210] Step 5: Generate a three-part response;
[0211] The final response is as follows:
[0212] [Key Points] Matching Policy: "Implementation Rules of Jiangsu Province for Industrial and Commercial Energy Storage Subsidies in 2024" (Su Neng Fa
[2024] No. 15), issued by relevant government departments, effective from January 1, 2024 to December 31, 2024, confidence level 0.789; estimated subsidy amount: RMB 150,000, calculated based on the capacity of 2000kWh and power of 1000kW provided by you (according to Article 5 of the policy).
[0213] [Operation] Application Steps: 1. Online Filing and Submission: Log in to the relevant government department's government service platform, fill in the project information and upload the business license (with official seal), equipment parameter list (including manufacturer's qualifications), and grid connection agreement; 2. Review by relevant municipal government departments: Within 5 working days after submission, you can check the results in the "Progress Inquiry" module of the platform. If the review fails, you need to modify it according to the prompts; 3. Provincial Review: Within 10 working days after the municipal review is approved, mail the subsidy application form (with company seal) to the relevant government department; 4. Financial Disbursement: Within 30 working days after the provincial review is approved, the subsidy will be disbursed to the corporate account you filled in.
[0214] [Deadline] Application deadline: December 31, 2024 (based on the online filing submission time); Recommendation: Please complete the online filing before December 1, 2024, allowing sufficient time to revise the materials; Note: This policy will expire after December 31, 2024. If you fail to submit your application on time, please pay attention to the relevant government departments' policy updates for 2025 (Policy ID: POL-320100-2024-015, which can be used to view the original text).
[0215] 10. Performance Evaluation and Parameter Boundary Conditions;
[0216] 10.1 Performance evaluation results;
[0217] Experimental environment: Edge GPU (approximately 10W power), policy database containing 1000 national energy storage-related policies, test cases consisting of 100 real user queries, results are as follows:
[0218] End-to-end latency:
[0219] Embedding encoding and retrieval latency ≈0.25s;
[0220] LLM Intent Resolution and Response Generation Delay ≈0.90s;
[0221] Total latency = + The subsidy calculation / process reasoning delay is approximately 1.15s, which meets the response requirements.
[0222] Search quality:
[0223]
[0224] 10.2 Parameter and Boundary Condition Description;
[0225] Confidence weight and threshold adjustment:
[0226] The fusion coefficient (0.7 / 0.3) is adapted to the "compliance first" scenario by default. If it is necessary to improve the recall rate (such as policy exploration), it can be adjusted to 0.6 / 0.4. Weight 0.6, (Weight 0.4)
[0227] The threshold of 0.75 is adapted to "regular subsidy projects" by default. For high-risk scenarios (such as subsidies ≥ 1 million yuan), it can be increased to 0.80, and for low-risk scenarios (such as small-capacity residential projects), it can be decreased to 0.70.
[0228] Validity period restrictions are enforceable: regardless of How high, if the policy's validity period meets the condition "today>t"? max All such policies will be removed directly. Historical policies will only be displayed when users explicitly query for "expired policies," marked "invalid and for reference only."
[0229] Handling complex clauses: When the policy contains complex clauses such as "differentiated subsidies by district / county" or "limited funding across years", the system executes the process of "rule parsing → clause fragment verification → unit test case verification": first, the LLM parses the clause rules, then compares and verifies them with the original policy text fragments, and finally uses preset test cases (such as "project subsidies in Nanjing Jiangning District") to verify the calculation logic. If the verification fails, it will fall back to "original clause text + manual interpretation prompts" (such as "this policy contains district / county differences, it is recommended to consult the relevant local government departments").
[0230] Localized deployment: Supports the deployment of policy libraries and models (Bi-Encoder / Cross-Encoder / LLM) on the user's local server. Data transmission does not pass through third parties, ensuring the compliance and security of energy storage project information (such as capacity and power) and policy data, and meeting industry data privacy requirements.
[0231] It should be noted that, in this invention, although the specification describes the embodiments, not every embodiment contains only one independent technical solution. This way of describing the specification is only for clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A method for policy retrieval and subsidy calculation for energy storage projects based on a large language model, characterized in that, Includes the following steps: (1) Construct a structured policy knowledge base, which stores structured data on policies related to energy storage projects, including policy validity information and subsidy rules information; (2) Receive energy storage project information input by the user, wherein the energy storage project information includes at least the project type and applicable region; (3) The energy storage project information is parsed using a large language model to extract the core elements of user intent; (4) Based on the core elements of the user intent, retrieve candidate policies from the structured policy knowledge base; (5) Calculate the overall confidence score of the candidate policies and screen effective policies in combination with the policy validity period information. The overall confidence score is obtained by weighted fusion of vector similarity and policy matching probability output by the large language model. (6) Calculate the subsidy amount for the energy storage project based on the subsidy rules information in the effective policy; (7) The subsidy application path of the energy storage project is inferred by Dijkstra's algorithm, which is executed based on the regional subsidy application flowchart; (8) Generate a three-part response that includes the effective policy information, subsidy amount and application path.
2. The method for policy retrieval and subsidy calculation of energy storage projects based on a large language model according to claim 1, characterized in that, In step (1), the structured policy knowledge base stores policy data in JSON-L format, and the policy data includes policy metadata and structured content of the policy text; The policy metadata should at least include the policy title, issuing authority, policy document number, applicable region, effective date, and expiration date; The structured content of the policy text should at least cover the types of projects for which subsidies apply, the range of energy storage parameters, and the subsidy calculation formula.
3. The method for policy retrieval and subsidy calculation of energy storage projects based on a large language model according to claim 1, characterized in that, In step (3), the core elements of the user intent include at least the project type, energy storage capacity, energy storage power, applicable region code, and application time window; The large language model outputs a parsing confidence score after parsing. When the parsing confidence score reaches a preset threshold, the parsing result is deemed valid.
4. The method for policy retrieval and subsidy calculation of energy storage projects based on a large language model according to claim 1, characterized in that, In step (4), a two-level retrieval architecture is used to obtain candidate policies: First, the core elements of user intent and policy data are encoded into embedding vectors using Bi-Encoder. Then, the vector similarity is calculated, and initial candidate policies are selected in descending order of similarity. The initial candidate policies are then refined using a Cross-Encoder to obtain the final candidate policies.
5. The method for policy retrieval and subsidy calculation of energy storage projects based on a large language model according to claim 1, characterized in that, In step (5), the formula for calculating the overall confidence level is as follows: ; Among them, Conf k p represents the overall confidence level of the k-th candidate policy. k Let s be the matching probability of the large language model for the k-th candidate policy. k Let w1 and w2 be the vector similarity between the k-th candidate policy and the core elements of the user's intent, where w1 and w2 are weighting coefficients and satisfy w1+w2=1; The policy validity period information is filtered based on the condition that the current date falls between the policy's effective date and its expiration date.
6. The method for policy retrieval and subsidy calculation of energy storage projects based on a large language model according to claim 1, characterized in that, In step (6), the subsidy calculation method corresponding to the subsidy rule information includes at least one of linear fixed amount calculation method and tiered calculation method; When the linear fixed-quota calculation method is adopted, the subsidy amount is calculated based on the preset capacity subsidy coefficient, power subsidy coefficient and fixed-quota subsidy. When using a tiered calculation method, the subsidy amount is calculated based on the subsidy coefficient corresponding to the range of energy storage parameters; if the policy contains a subsidy capping clause or a subsidy superposition clause, the subsidy amount is adjusted according to the corresponding clause.
7. The method for policy retrieval and subsidy calculation of energy storage projects based on a large language model according to claim 1, characterized in that, In step (7), the regional subsidy application flowchart is a directed graph G=(V,E), where V is a set of nodes, and each node represents a subsidy application stage; E is a set of edges, where each edge represents a transition between two application stages, and each edge corresponds to a comprehensive cost weight. The comprehensive cost weight is determined at least based on semantic similarity of links, validity period matching degree, geographical distance and process relevance.
8. The method for policy retrieval and subsidy calculation of energy storage projects based on a large language model according to claim 1, characterized in that, In step (8), the three-part response includes a key point section, an action section, and a deadline section; The key points section includes basic information about the effective policy and the subsidy amount; the operation section includes the application process and operation requirements; and the deadline section includes the application deadline and policy validity reminders. Furthermore, the three-part response is accompanied by a unique identifier for the automatically matched policy and an identifier for the clauses on which the subsidy calculation is based.
9. The method for policy retrieval and subsidy calculation of energy storage projects based on a large language model according to claim 1, characterized in that, It also includes a localization deployment step: deploying the structured policy knowledge base, large language model and encoder for policy retrieval on the user's local server to achieve localized storage and processing of policy data and project data.
10. The method for policy retrieval and subsidy calculation of energy storage projects based on a large language model according to claim 6, characterized in that, When the energy storage power parameters are omitted in the energy storage project information entered by the user, the default power value is determined according to the preset power ratio constraint, which is set based on the energy storage project type and industry standards. Furthermore, the three-part response includes instructions on using the default power value, prompting users to supplement the power parameters to obtain a more accurate subsidy amount.