Power report automatic generation method and device, terminal equipment and storage medium
By automating the determination of workflow text and parameters for power reports, the problem of low efficiency and poor flexibility in power report generation in existing technologies is solved, and efficient and flexible automatic generation of power reports is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-04-10
AI Technical Summary
In existing technologies, the generation of electricity reports relies on manual operation, resulting in low efficiency and poor flexibility.
By acquiring user instruction text, candidate workflow texts are automatically determined using a pre-set metadata database and model. The target workflow text and parameters are then matched to generate an electricity report.
It has enabled the automated generation of electricity reports, improving generation efficiency and flexibility while reducing manual intervention.
Smart Images

Figure CN121836628A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of power report generation, and particularly relates to a power report automatic generation method and device, a terminal equipment and a storage medium. BACKGROUND
[0002] With the deepening of digital transformation, various industries, especially data-intensive industries such as power, finance and manufacturing, have accumulated a large amount of production and operation data. In order to meet the needs of operation monitoring, management decision and trend analysis, it has become an important and regular work to quickly and flexibly generate analysis reports from these data.
[0003] The traditional report generation mainly relies on manual operation, and therefore has the problems of low efficiency and poor flexibility. SUMMARY
[0004] The present application provides a power report automatic generation method and device, a terminal equipment and a storage medium, which can solve the problem of low efficiency and poor flexibility in the prior art that relies on manual operation to generate power reports.
[0005] An embodiment of the present application provides a power report automatic generation method, comprising: obtaining instruction text filled by a user for querying a power report; determining a plurality of candidate workflow texts according to the instruction text and a preset meta database with a plurality of workflow texts; wherein the workflow text is used to represent a calling scenario corresponding to each workflow; determining a target workflow text from all candidate workflow texts according to a preset workflow matching model, a preset first prompt word and the instruction text; determining a workflow parameter corresponding to the target workflow text according to the target workflow text and a preset workflow registry; obtaining a power report corresponding to the instruction text according to the instruction text, the workflow parameter, a second preset prompt word and a preset power report generation model.
[0006] Further, the determining of the plurality of candidate workflow texts according to the instruction text and the preset meta database with the plurality of workflow texts comprises: inputting the instruction text into a preset text embedding model to obtain an instruction vector corresponding to the instruction text; calculating a similarity between the instruction vector and each workflow text, and taking the first K workflow texts with the largest similarity as the candidate workflow texts.
[0007] Further, the work flow parameters corresponding to the target work flow text are determined according to the target work flow text and the preset work flow register, and the work flow parameters include: The target work flow name is determined according to the target work flow text. The work flow parameters of the target work flow corresponding to the target work flow name are extracted from the preset work flow register.
[0008] Further, the power report corresponding to the instruction text is obtained according to the instruction text, the work flow parameters, the second preset prompt word and the preset power report generation model, and the power report includes: The instruction text, the work flow parameters and the second preset prompt word are input into the preset power report generation model, so that the preset power report generation model obtains the target work flow parameters corresponding to the target work flow, with the target of maximizing the semantic consistency between the instruction text and the work flow parameters. The power report is generated according to the target work flow parameters.
[0009] On the basis of the method embodiment, the device embodiment is provided. The device for automatically generating a power report includes: An instruction text acquisition module, a candidate work flow text determination module, a target work flow text determination module, a work flow parameter extraction module and a power report generation module. The instruction text acquisition module is configured to acquire an instruction text for querying a power report filled by a user. The candidate work flow text determination module is configured to determine a plurality of candidate work flow texts according to the instruction text and a preset meta database with a plurality of work flow texts, wherein the work flow text is used to represent a calling scenario corresponding to each work flow. The target work flow text determination module is configured to determine a target work flow text from all candidate work flow texts according to a preset work flow matching model, a preset first prompt word and the instruction text. The work flow parameter extraction module is configured to determine work flow parameters corresponding to the target work flow text according to the target work flow text and a preset work flow register. The power report generation module is configured to obtain a power report corresponding to the instruction text according to the instruction text, the work flow parameters, a second preset prompt word and a preset power report generation model.
[0010] Further, the candidate work flow text determination module includes: An instruction vector generation unit and a similarity calculation unit. The aforementioned instruction vector generation unit is used to input the aforementioned instruction text into a preset text embedding model to obtain the instruction vector corresponding to the aforementioned instruction text; The similarity calculation unit is used to calculate the similarity between the above instruction vector and each workflow text, and select the top K workflow texts with the highest similarity as the above candidate workflow texts.
[0011] Furthermore, the aforementioned workflow parameter extraction module includes: Target workflow name determination unit and workflow parameter acquisition unit; The aforementioned target workflow name determination unit is used to determine the target workflow name based on the aforementioned target workflow text; The aforementioned workflow parameter acquisition unit is used to extract the workflow parameters of the target workflow corresponding to the target workflow name from the aforementioned preset workflow registry.
[0012] Furthermore, the aforementioned power report generation module includes: Target workflow parameter determination unit and report generation unit; The aforementioned target workflow parameter determination unit is used to input the aforementioned instruction text, workflow parameters, and second preset prompt words into the preset power report generation model, so that the preset power report generation model aims to maximize the semantic consistency between the aforementioned instruction text and the aforementioned workflow parameters, and obtains the target workflow parameters corresponding to the aforementioned target workflow. The aforementioned report generation unit is used to generate the aforementioned power report based on the aforementioned target workflow parameters.
[0013] Based on the above method embodiments, the present invention provides a corresponding terminal device embodiment; The present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements an automatic power report generation method according to any embodiment of the present invention.
[0014] Based on the above method embodiments, the present invention provides a corresponding storage medium embodiment; The present invention provides a storage medium including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the above-described method for automatically generating power reports according to any embodiment of the present invention.
[0015] The embodiments of the present invention have the following beneficial effects: This invention provides a method, apparatus, terminal device, and storage medium for automatically generating electricity reports. The method includes: obtaining a user-entered instruction text for querying an electricity report; subsequently determining several candidate workflow texts based on the instruction text and a preset metadata database containing several workflow texts; wherein the workflow texts represent the calling scenario corresponding to each workflow; then determining a target workflow text from all candidate workflow texts based on a preset workflow matching model, a preset first prompt word, and the instruction text; then determining the workflow parameters corresponding to the target workflow text based on the target workflow text and a preset workflow registry; finally, obtaining the electricity report corresponding to the instruction text based on the instruction text, workflow parameters, a second preset prompt word, and a preset electricity report generation model. Therefore, the entire electricity report generation process of this invention does not involve manual operation, directly utilizing relevant models to automatically generate electricity reports based on relevant data, thus improving generation efficiency and flexibility. Attached Figure Description
[0016] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0017] Figure 1 This is a flowchart illustrating an automatic power report generation method according to an embodiment of the present invention.
[0018] Figure 2 This is a schematic diagram of the structure of an automatic power report generation device provided in an embodiment of the present invention. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.
[0021] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.
[0022] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0023] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0024] In the description of the embodiments of this application, the term "multiple" refers to two or more (including two), similarly, "multiple sets" refers to two or more (including two sets), and "multiple pieces" refers to two or more (including two pieces).
[0025] In the description of the embodiments of this application, unless otherwise expressly specified and limited, technical terms such as "installation," "connection," "joining," and "fixing" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. For those skilled in the art, the specific meaning of the above terms in the embodiments of this application can be understood according to the specific circumstances.
[0026] See Figure 1 To address the problems of low efficiency and poor flexibility in existing technologies that rely on manual operation to generate electricity reports, an embodiment of the present invention provides a method for automatically generating electricity reports, comprising: Step S101: Obtain the instruction text entered by the user for querying the electricity report; Specifically, users input natural language commands through the front-end interface (such as a chat box). For example, the command text could be: "How is the report from Factory A's production line last week?".
[0027] Step S102: Based on the above instruction text and the preset metadata database containing several workflow texts, determine several candidate workflow texts; wherein, the above workflow texts are used to represent the calling scenario corresponding to each workflow. Specifically, the aforementioned preset metadata database is a pre-built, unified knowledge base rich in metadata. This database includes several workflow texts, each containing a descriptive text and corresponding metadata. The metadata is a JSON object used to structurally describe the workflow associated with the descriptive text. It includes the corresponding workflow name and a description of the applicable power reporting scenarios, such as periodic reports or fault analysis reports. Therefore, each workflow text is essentially a decision rule specification written for each workflow, and the combination of all workflow texts is also a combination of knowledge fragments describing the "workflow invocation scenario." The aforementioned preset metadata can be represented by the following formula: In the formula, K' represents the preset metadata database. This represents the i-th descriptive text. Let N represent the i-th metadata element, and N represent the total number of workflow texts.
[0028] In a preferred embodiment, the determination of several candidate workflow texts based on the instruction text and a preset metadata database containing several workflow texts includes: Input the above instruction text into the preset text embedding model to obtain the instruction vector corresponding to the above instruction text; Specifically, the aforementioned pre-defined text embedding model embeds the instruction text into a high-dimensional nonlinear mapping function to map it into a semantic vector space, thus obtaining the instruction vector. The instruction vector is obtained through the following formula: In the formula, Represents the instruction vector. This represents a high-dimensional nonlinear mapping function, where x represents the instruction text. This indicates an element-wise activation function (such as Hyperbolic Tangent or GELU). and Representing different weight matrices, where, , h represents the hidden layer dimension, m represents the dimension of the initial feature vector output by the word embedding layer (i.e., the word embedding dimension), d represents the dimension of the semantic vector space, and ReLU represents the corrected linear unit. This represents the initial feature vector obtained by extracting the instruction text x through the word embedding layer in the preset text embedding model. , and Let represent the bias vector, where , .
[0029] Specifically, the model parameters in the aforementioned preset text embedding model are: It can be obtained by pre-training and optimizing on a large corpus using a contrastive loss function based on negative sampling or maximum likelihood estimation.
[0030] Calculate the similarity between the above instruction vector and each workflow text, and select the top K workflow texts with the highest similarity as the above candidate workflow texts.
[0031] Specifically, cosine similarity is used as the similarity between the instruction vector and each workflow text. Therefore, the above similarity is calculated using the following formula: In the formula, This represents the similarity between the vector corresponding to the i-th workflow text and the instruction vector. This represents the vector corresponding to the i-th workflow text. This represents the covariance matrix, used to model the correlation between features.
[0032] Specifically, after obtaining several similarity scores, the Top-K workflow texts with the highest similarity scores are selected as the above candidate workflow texts.
[0033] Preferably, the specific value of K can be determined according to actual needs.
[0034] Preferably, the above-mentioned process of screening candidate workflow texts is a RAG (Retrieval Augmentation Generation) pre-selection mechanism, which replaces the black-box guessing of large language models with searchable information, enabling it to lock in candidate workflows with high confidence when processing fuzzy instructions. This fundamentally solves the problem of call failure caused by parameter extraction errors, and greatly improves stability and accuracy in industrial scenarios.
[0035] In this preferred embodiment, candidate workflow texts are determined based on the aforementioned instruction text and a preset metadata database containing several workflow texts.
[0036] Step S103: Based on the preset workflow matching model, the preset first prompt word, and the above instruction text, determine the target workflow text from all candidate workflow texts; Specifically, the aforementioned preset workflow matching model is a large LLM model. First, it constructs an information-rich decision prompt (i.e., the aforementioned preset first prompt word). Then, based on the preset first prompt word and the aforementioned instruction text, the preset workflow matching model determines the target workflow text from all candidate workflow texts. Adaptively, the aforementioned preset first prompt word is: "You are an intelligent decision engine. Your task is to select the most suitable metadata from the candidate list based on the provided context information, the similarity score, and the number of fragments with the same metadata." "Metadata" refers to the aforementioned metadata, while the aforementioned instruction text, the metadata in the candidate workflow text, and the corresponding similarity (whose value can be accurate to three decimal places) serve as the aforementioned "context information."
[0037] Specifically, in the model processing of the preset workflow matching model, the first step is to count the number of associations of each metadata in the candidate workflow texts, and prioritize the selection of metadata with a higher number of associations. The second step is to calculate the average similarity score of all workflow texts associated with that metadata (calculation formula: average similarity score = Σ similarity score of workflow texts associated with that metadata / number of workflow texts associated with that metadata), and select the metadata with the highest average score as the final selected metadata, and use its corresponding candidate workflow text as the target workflow text. The model output must include the selected metadata (including the workflow name) and the decision basis (number of associated segments, average similarity score, and description of matching key power parameters) to ensure the traceability of the decision-making process.
[0038] Preferably, if the results of the first two steps are consistent or a unique metadata cannot be determined, further match the key power parameters (such as plant name, reporting cycle, equipment type, etc.) implicit in the instruction text with the core parameters of the metadata-related workflow, and select the metadata with a higher parameter matching degree so that only a unique metadata result is output in the end, in JSON format.
[0039] Step S104: Determine the workflow parameters corresponding to the target workflow text based on the target workflow text and the preset workflow registry. Specifically, the aforementioned preset workflow registry records several workflows, each with its own workflow name and parameters. These workflow parameters specifically include: plant / site identifier, start date (e.g., "The statistical start date for the monthly maintenance report must be filled in, with a fixed format of 'YYYY-MM-DD' (e.g., the start date for the September report should be '2025-09-01')"), end date, human-readable description, weekly report type (referring to the report's time period category, such as "daily report," "weekly report," and "monthly report," used to specify the fixed type of the statistical period), and an indicator indicating whether each of the above workflow parameters is required.
[0040] Specifically, the aforementioned human-readable description refers to a clear explanation of the actual business meaning, filling specifications, and applicable scope of parameters in natural language that fits the business scenario of generating power reports. Users do not need technical background to understand the purpose and filling requirements of the parameters. For example, in the JSON Schema corresponding to the workflow of "Power Plant Operation and Maintenance Report Generation Workflow", the human-readable description can be "The unique identifier of the power plant corresponding to the report to be generated needs to be filled in, in the format of 'region + plant type + number', and it must be completely consistent with the registration identifier in the power grid plant file".
[0041] In a preferred embodiment, determining the workflow parameters corresponding to the target workflow text based on the target workflow text and a preset workflow registry includes: Based on the target workflow text above, determine the target workflow name; Specifically, the name of the target workflow can be determined based on the metadata in the target workflow text.
[0042] Extract the workflow parameters of the target workflow corresponding to the target workflow name from the above-mentioned preset workflow registry.
[0043] Specifically, calling the function The workflow parameters, displayed in JSON Schema format, can then be extracted from the preset workflow registry.
[0044] In this preferred embodiment, workflow parameters are determined based on the target workflow text and the preset workflow registry.
[0045] Step S105: Based on the above instruction text, workflow parameters, second preset prompt words, and preset power report generation model, obtain the power report corresponding to the above instruction text.
[0046] Specifically, the second preset prompt can be: "Based on the workflow parameters, infer the appropriate parameters from the user's instruction text and fill them in. At the same time, generate a brief functional description for this workflow."
[0047] In a preferred embodiment, obtaining the power report corresponding to the instruction text based on the instruction text, workflow parameters, second preset prompt words, and preset power report generation model includes: The above instruction text, workflow parameters and second preset prompt words are input into the preset power report generation model so that the preset power report generation model aims to maximize the semantic consistency between the above instruction text and the above workflow parameters, and obtains the target workflow parameters corresponding to the above target workflow. Specifically, using the instruction text, workflow parameters, and the corresponding target workflow name as context information, the preset power report generation model, upon receiving the second preset prompt and corresponding context information, performs parameter reasoning and content generation with the goal of maximizing the consistency between user instructions and parameter semantics, resulting in a list of target workflow parameters in JSON structure. This list takes the following form: The objective function corresponding to the above optimization objective can be expressed as: In the formula, Let represent the inferred values corresponding to each target workflow parameter, n represent the total number of target workflow parameters, and sim represent the semantic similarity function. Indicates workflow parameters The corresponding inferred value.
[0048] The above power report is generated based on the target workflow parameters.
[0049] Specifically, the list of target workflow parameters is first mapped to a form containing those parameters, and the specific parameter content can be modified. The parameter mapping relationship can be represented as follows: In the formula, f represents the mapping operation, I represents the set of parameters corresponding to the target workflow, and O represents the mapping result. This represents the values of each parameter after mapping.
[0050] The user can then check if the form content meets their needs and if the relevant parameters are correct. If it is approved, a final power report will be generated based on this content; otherwise, the user's instructions will be adjusted, or the corresponding incorrect parameters will be fine-tuned or corrected.
[0051] Specifically, the final generated power report includes "report title, generation time, core parameters, data source, operational data, equipment status, anomaly records, trend analysis, compliance assessment, overall conclusions, operation and maintenance suggestions, and optimization plans." The specific content will be dynamically adjusted according to the workflow type required by the user (such as fault analysis or comprehensive report).
[0052] Specifically, the aforementioned core parameters are derived from a pre-defined power report generation model. Operational data, equipment status, and anomaly records are extracted from existing business databases within the power industry based on the target workflow parameters.
[0053] Preferably, the user can fine-tune the process on the rendered dynamic interactive interface. Therefore, after confirming that everything is correct, the user can directly click the relevant button to generate the final power report.
[0054] Preferably, through intelligent parameter generation and innovative pre-filled form confirmation mode, the system presents users with an intuitive and modifiable final result, intelligently executing the process while returning final control to the user.
[0055] In this preferred embodiment, the power report corresponding to the instruction text is obtained based on the above-mentioned instruction text, workflow parameters, second preset prompt words, and preset power report generation model.
[0056] Based on the above method embodiments, the present invention provides corresponding apparatus embodiments.
[0057] like Figure 2 As shown, one embodiment of the present invention provides an automatic power report generation device, comprising: The module includes a command text acquisition module, a candidate workflow text determination module, a target workflow text determination module, a workflow parameter extraction module, and a power report generation module. The aforementioned instruction text acquisition module is used to acquire the instruction text entered by the user for querying the electricity report; The aforementioned candidate workflow text determination module is used to determine several candidate workflow texts based on the aforementioned instruction text and a preset metadata database containing several workflow texts; wherein, the aforementioned workflow texts are used to represent the calling scenario corresponding to each workflow. The aforementioned target workflow text determination module is used to determine the target workflow text from all candidate workflow texts based on a preset workflow matching model, a preset first prompt word, and the aforementioned instruction text. The aforementioned workflow parameter extraction module is used to determine the workflow parameters corresponding to the aforementioned target workflow text based on the aforementioned target workflow text and the preset workflow registry. The aforementioned power report generation module is used to obtain the power report corresponding to the aforementioned instruction text based on the aforementioned instruction text, workflow parameters, second preset prompt words, and preset power report generation model.
[0058] In a preferred embodiment, the above-mentioned candidate workflow text determination module includes: Instruction vector generation unit and similarity calculation unit; The aforementioned instruction vector generation unit is used to input the aforementioned instruction text into a preset text embedding model to obtain the instruction vector corresponding to the aforementioned instruction text; The similarity calculation unit is used to calculate the similarity between the above instruction vector and each workflow text, and select the top K workflow texts with the highest similarity as the above candidate workflow texts.
[0059] In another preferred embodiment, the workflow parameter extraction module includes: Target workflow name determination unit and workflow parameter acquisition unit; The aforementioned target workflow name determination unit is used to determine the target workflow name based on the aforementioned target workflow text; The aforementioned workflow parameter acquisition unit is used to extract the workflow parameters of the target workflow corresponding to the target workflow name from the aforementioned preset workflow registry.
[0060] In another preferred embodiment, the above-mentioned power report generation module includes: Target workflow parameter determination unit and report generation unit; The aforementioned target workflow parameter determination unit is used to input the aforementioned instruction text, workflow parameters, and second preset prompt words into the preset power report generation model, so that the preset power report generation model aims to maximize the semantic consistency between the aforementioned instruction text and the aforementioned workflow parameters, and obtains the target workflow parameters corresponding to the aforementioned target workflow. The aforementioned report generation unit is used to generate the aforementioned power report based on the aforementioned target workflow parameters.
[0061] It should be noted that the device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without creative effort. The above schematic diagrams are merely examples of an automatic power report generation device and do not constitute a limitation on an automatic power report generation device. It may include more or fewer components than illustrated, or combine certain components, or use different components.
[0062] Based on the above method embodiments, the present invention provides corresponding terminal device embodiments.
[0063] Another embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements an automatic power report generation method described in any embodiment of the present invention.
[0064] For example, in this embodiment, the computer program can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the device. The aforementioned terminal devices may be computing devices such as desktop computers, laptops, handheld computers, and cloud servers. These devices may include, but are not limited to, processors and memory. The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. This processor is the control center of the device, connecting various parts of the device via various interfaces and lines. The aforementioned memory can be used to store the aforementioned computer programs and / or modules. The aforementioned processor implements various functions of the aforementioned device by running or executing the computer programs and / or modules stored in the aforementioned memory, and by calling data stored in the memory. The aforementioned memory may mainly include a program storage area and a data storage area, wherein the program storage area may store the operating system, at least one application program required for a function, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0065] Based on the above method embodiments, the present invention provides corresponding storage medium embodiments.
[0066] Another embodiment of the present invention provides a storage medium including a stored computer program, wherein, when the computer program is running, it controls the device where the storage medium is located to execute the automatic power report generation method described in any embodiment of the present invention.
[0067] In this embodiment, the storage medium is a computer-readable storage medium, and the computer program includes computer program code, which may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may include any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.
[0068] The above are preferred embodiments of the present invention. It should be noted that, for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for automatically generating electricity reports, characterized in that, include: Retrieve the text of the instruction entered by the user for querying the electricity report; Based on the instruction text and a preset metadata database containing several workflow texts, several candidate workflow texts are determined; wherein, the workflow text is used to represent the calling scenario corresponding to each workflow; Based on the preset workflow matching model, the preset first prompt word, and the instruction text, the target workflow text is determined from all candidate workflow texts; Based on the target workflow text and the preset workflow registry, determine the workflow parameters corresponding to the target workflow text; Based on the instruction text, workflow parameters, second preset prompt words, and preset power report generation model, the power report corresponding to the instruction text is obtained.
2. The method for automatically generating electricity reports according to claim 1, characterized in that, The step of determining several candidate workflow texts based on the instruction text and a preset metadata database containing several workflow texts includes: The instruction text is input into a preset text embedding model to obtain the instruction vector corresponding to the instruction text; Calculate the similarity between the instruction vector and each workflow text, and select the top K workflow texts with the highest similarity as the candidate workflow texts.
3. The method for automatically generating electricity reports according to claim 2, characterized in that, The step of determining the workflow parameters corresponding to the target workflow text based on the target workflow text and the preset workflow registry includes: Determine the target workflow name based on the target workflow text; Extract the workflow parameters of the target workflow corresponding to the target workflow name from the preset workflow registry.
4. The method for automatically generating electricity reports according to claim 3, characterized in that, The step of obtaining the power report corresponding to the instruction text based on the instruction text, workflow parameters, second preset prompt words, and preset power report generation model includes: The instruction text, workflow parameters, and second preset prompt words are input into the preset power report generation model so that the preset power report generation model aims to maximize the semantic consistency between the instruction text and the workflow parameters to obtain the target workflow parameters corresponding to the target workflow. The power report is generated based on the target workflow parameters.
5. An automatic power report generation device, characterized in that, include: The module includes a command text acquisition module, a candidate workflow text determination module, a target workflow text determination module, a workflow parameter extraction module, and a power report generation module. The instruction text acquisition module is used to acquire the instruction text entered by the user for querying the electricity report; The candidate workflow text determination module is used to determine several candidate workflow texts based on the instruction text and a preset metadata database containing several workflow texts; wherein, the workflow text is used to represent the calling scenario corresponding to each workflow. The target workflow text determination module is used to determine the target workflow text from all candidate workflow texts based on a preset workflow matching model, a preset first prompt word, and the instruction text. The workflow parameter extraction module is used to determine the workflow parameters corresponding to the target workflow text based on the target workflow text and the preset workflow registry. The power report generation module is used to obtain the power report corresponding to the instruction text based on the instruction text, workflow parameters, second preset prompt words, and preset power report generation model.
6. The automatic power report generation device according to claim 5, characterized in that, The candidate workflow text determination module includes: Instruction vector generation unit and similarity calculation unit; The instruction vector generation unit is used to input the instruction text into a preset text embedding model to obtain the instruction vector corresponding to the instruction text. The similarity calculation unit is used to calculate the similarity between the instruction vector and each workflow text, and select the top K workflow texts with the highest similarity as the candidate workflow texts.
7. The automatic power report generation device according to claim 6, characterized in that, The workflow parameter extraction module includes: Target workflow name determination unit and workflow parameter acquisition unit; The target workflow name determination unit is used to determine the target workflow name based on the target workflow text; The workflow parameter acquisition unit is used to extract the workflow parameters of the target workflow corresponding to the target workflow name from the preset workflow registry.
8. The automatic power report generation device according to claim 7, characterized in that, The power report generation module includes: Target workflow parameter determination unit and report generation unit; The target workflow parameter determination unit is used to input the instruction text, workflow parameters and second preset prompt words into the preset power report generation model, so that the preset power report generation model obtains the target workflow parameters corresponding to the target workflow with the goal of maximizing the semantic consistency between the instruction text and the workflow parameters; The report generation unit is used to generate the power report based on the target workflow parameters.
9. A terminal device, characterized in that, The device includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements an automatic power report generation method as described in any one of claims 1 to 4.
10. A storage medium, characterized in that, The storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device where the storage medium is located to perform an automatic power report generation method as described in any one of claims 1 to 4.