Intelligent question and answer type power system simulation model generation method and system

Through the combination of intelligent question-and-answer service and BERT model, the problem of matching user needs with model knowledge base in power system simulation is solved, efficient and accurate simulation model generation is achieved, and the accuracy and efficiency of model selection is improved.

CN119150653APending Publication Date: 2024-12-17ELECTRIC POWER RES INST OF GUANGXI POWER GRID CO LTD +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410963250.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-18
Publication Date
2024-12-17

Smart Images

  • Figure CN119150653A_ABST
    Figure CN119150653A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent question and answer type power system simulation model generation method and system, and relates to the technical field of power artificial intelligence, and the method comprises the steps: building a character vectorization model based on the representation information of a simulation model and description characters of user modeling demands, and obtaining a vectorization model of user demand description information; and performing vector included angle cosine calculation according to the vectorization model of the user demand description information, extracting simulation model representation information consistent with the user modeling demand according to a vector included angle cosine calculation result, selecting target model representation information, calling a model generation service, and generating a required simulation model. According to the method, character vectorization processing is combined with a similarity calculation method, high matching between a simulation model knowledge base based on a professional language and a user model construction requirement based on a natural language is achieved, efficient interaction and information extraction between a user and a system are achieved through intelligent question and answer service, and the user experience is improved. A natural language processing technology is used for identifying user intentions and dynamically optimizing dialogue strategies, and the accuracy of questions and answers and the user experience are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electric power artificial intelligence technology, and in particular to an intelligent question-answering type electric power system simulation model generation method and system. Background Art

[0002] The new power system has a large number of new energy power sources, a large number of power electronic equipment and AC / DC heterogeneous power grids, which have caused the difficulty of accurate modeling, low intelligence, and data islands and efficiency bottlenecks for massive heterogeneous services. Under such circumstances, the power grid must face a large number of simulation and computing needs at different levels and scales to carry out safety and stability analysis, modeling of new power system simulation mechanisms, and technical research on simulation algorithms, safety and stability intelligent analysis, etc. Efficient modeling capabilities are currently an unavoidable problem. In the Internet field, artificial intelligence technology is developing rapidly. With the development of deep learning technology, various pre-trained large language models have emerged, which has greatly improved the ability of artificial intelligence in understanding and generating natural language. At present, it has performed well in natural language processing in the fields of machine translation, text summarization, knowledge question and answer. Of course, in the application of natural language models, there are also problems such as synonymous numbers are easy to confuse, which are difficult to avoid directly through training, and thus cannot accurately identify the meaning of numbers. Problems need to be solved in the application. Using large language models to train power simulation knowledge and automatically generate models after extracting information through language dialogue will help solve the large amount of modeling work faced by power system simulation. Summary of the invention

[0003] In view of the large amount of modeling work faced in the existing power system simulation, the staff can describe the modeling requirements but do not have proficient modeling business capabilities, and the present invention is proposed.

[0004] Therefore, the problem to be solved by the present invention is how to achieve a high degree of matching between the modeling requirements described in natural language by the intelligent question-answering service and the professional description of the simulation model knowledge base, so as to obtain model information input that meets the modeling requirements, thereby driving the model generation service to generate the simulation model required by the user.

[0005] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0006] In a first aspect, an embodiment of the present invention provides a method for generating an intelligent question-and-answer type power system simulation model, which includes collecting multiple simulation models and user demand description information, integrating the collected multiple simulation models into simulation model representation information; converting the simulation model representation information and the user demand description information into a knowledge base text vector, and constructing a simulation model knowledge base based on the knowledge base text vector; constructing an intelligent question-and-answer service based on the simulation model knowledge base, and collecting user demand text vectors through the intelligent question-and-answer service; using a cosine similarity calculation method to calculate the similarity between the knowledge base text vector and the user demand text vector collected by the intelligent question-and-answer service; based on the similarity calculation result, extracting one or more simulation model representation information with the highest similarity to the user demand text vector, and selecting a simulation model representation information according to the intelligent question-and-answer service; using NLP technology to parse the selected simulation model representation information, intelligently recommending an optimal simulation model parameter set, and generating a required simulation model based on the optimal simulation model parameter set.

[0007] As a preferred solution of the intelligent question-answering power system simulation model generation method of the present invention, the simulation model representation information and the user demand description information are converted into a knowledge base text vector, and for any sentence, the expression of the new sentence obtained by replacing the corresponding entity with a synonym is as follows:

[0008] X′=[x1′,x2′,...,xN′]

[0009] Among them, X′ represents a vector composed of entities extracted from text information and replaced by synonyms, and xN′ represents entities extracted from text information and replaced by synonyms; the obtained X′ set {X′} is input into the BERT model for training and semantic features are extracted. After training, the formula for forming a new semantic feature vector is as follows:

[0010] E′=BERT({X′})

[0011] Among them, E′ represents the semantic feature vector after BERT training, and BERT({X′}) represents the entity vector set after text information extraction and synonym replacement input into the BERT model for training; based on the new vector E′, keyword extraction is performed, and the formula for extracting keyword vectors is as follows:

[0012] Vec=BERT(g1,g2,…)

[0013] Among them, Vec represents the keyword vector after BERT training, g1 represents the first vector element before the set value in E′, g2 represents the second vector element before the set value in E′, and BERT(g1, g2, …) means inputting the g1 and g2 vector elements into BERT training and returning the keyword vector.

[0014] As a preferred solution of the intelligent question-and-answer type power system simulation model generation method of the present invention, wherein: constructing an intelligent question-and-answer service includes defining training data, defining a dialogue strategy, defining an intention feature value processing behavior, defining a task execution behavior, and performing language training. After the language training is completed, the intelligent question-and-answer robot service is started to perform a dialogue exchange with the user; defining the training data includes inputting the user's intention expression method, and identifying the intention expression method feature value in the intention expression method. At the same time, a synonym conversion rule is added to the intention expression method feature value to convert the synonymous expression into a corresponding fixed sentence; defining the dialogue strategy includes specifying the response action after the intention input, and the feature value of the intention completion; defining the intention feature value processing behavior includes interpreting and extracting each intention feature value in the user's intention, for an intention containing multiple feature values ​​whose confidence exceeds a set value, directly using the extraction result, for an intention containing a single feature value that cannot be distinguished by a regular expression, adding a robot answering behavior metadata judgment, and using the stringed valid intention feature value; defining the task execution behavior includes converting the intention feature value into an execution parameter through a behavior execution interface after the intention feature value meets the task definition requirements, and passing it to the simulation model generation service.

[0015] As a preferred solution of the intelligent question-answering type power system simulation model generation method of the present invention, the formula for calculating the similarity between the knowledge base text vector and the user demand text vector collected by the intelligent question-answering service using the cosine similarity calculation method is as follows:

[0016]

[0017] Among them, Si represents the similarity calculation result, Vec1 represents the knowledge base text vector, Vec2 represents the user demand text vector, |Vec1| and |Vec2| are the Euclidean norms of the knowledge base text vector and the user demand text vector respectively.

[0018] As a preferred solution of the intelligent question-answering power system simulation model generation method of the present invention, wherein: using NLP technology to parse the selected simulation model representation information, intelligently recommending the optimal simulation model parameter set includes converting the user demand description information d into a vector through the BERT model The simulation model characterization information p j Converted into vectors through the BERT model Calculate the user demand description information vector Information vector representing the simulation model Gaussian kernel similarity between them; Calculate the simulation model representation information vector With candidate parameters The correlation between them; considering the Gaussian kernel similarity and correlation, the weight is used to weight each parameter to obtain the recommended score R of the candidate simulation model parameter set. j ; Define the weighted mean square error term to measure the deviation between the sample prediction value and the sample actual value; introduce the regularization term and define the ReLU activation function term to measure the similarity Si between the user demand text vector and the simulation model parameter set recommendation score R j The difference between them is used to obtain the optimal simulation model parameter set.

[0019] As a preferred solution of the intelligent question-answering power system simulation model generation method of the present invention, the calculation formula of the candidate simulation model parameter set recommendation score is as follows:

[0020]

[0021] Among them, R j represents the recommended score of the candidate simulation model parameter set, m represents the number of parameters, α k represents the weight of the kth parameter, γ represents the parameter of the kernel function, represents the simulation model characterization information vector, represents the user demand description information vector, Indicates candidate parameters.

[0022] As a preferred solution of the intelligent question-answering power system simulation model generation method of the present invention, the calculation formula of the optimal simulation model parameter set is as follows:

[0023]

[0024] Among them, Opt represents the optimal simulation model parameter set, N represents the number of samples, and y k represents the actual value of the kth sample, f(x k ) represents the predicted value of the kth sample, x k represents the input feature vector of the kth sample, represents the variance of the kth sample, λ represents the regularization parameter, θ represents the model parameter, β represents the weight of ReLU, m represents the number of parameters, Si represents the similarity of the user demand text vector, R j Represents the recommended score of the simulation model parameter set.

[0025] In a second aspect, an embodiment of the present invention provides an intelligent question-answering type power system simulation model generation system, which includes a data collection module for collecting multiple simulation models, forming simulation model characterization information, and storing the simulation model characterization information into an initial knowledge base; a calculation model for constructing a text vectorization model based on the characterization information of the simulation model and the description text of the user's modeling needs, using a cosine similarity calculation method and intelligent question-answering to obtain a vectorization model of the user's demand description information, and performing vector angle cosine calculation based on the vectorization model of the user's demand description information; a knowledge base construction module for extracting a simulation model table consistent with the user's modeling needs based on the vector angle cosine calculation result. The module collects information from the user and adds the text vectorization model of the simulation model to the initial knowledge base of the model to obtain the simulation model knowledge base; the question and answer construction module is used to build an intelligent question and answer service based on the simulation model knowledge base; the model construction module is used to build a text vector of the requirement and the text vector in the model knowledge base to perform similarity analysis based on the information in the simulation model knowledge base and the user requirements delivered by the intelligent question and answer service to obtain one or more model knowledge base representation information with the same vector direction; after the intelligent question and answer service selects and confirms the existence of multiple model knowledge base representation information that meets the similarity analysis, the target model representation information is selected, and the model generation service is called to generate the required simulation model.

[0026] In a third aspect, an embodiment of the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program instructions are executed by the processor, the steps of the intelligent question-and-answer type power system simulation model generation method as in the first aspect of the present invention are implemented.

[0027] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program instructions are executed by a processor, the steps of the intelligent question-and-answer type power system simulation model generation method as in the first aspect of the present invention are implemented.

[0028] The beneficial effects of the present invention are as follows: the simulation model representation information and the user demand description information are converted into knowledge base text vectors, and a simulation model knowledge base is constructed, thereby realizing the structured and vectorized representation of information, enabling the system to better understand and process complex simulation model information, constructing an intelligent question-and-answer service, improving the efficiency and accuracy of obtaining user demand, enabling the system to more accurately understand user intentions, using a cosine similarity calculation method to compare knowledge base text vectors and user demand text vectors, and selecting the simulation model representation information with the highest similarity, realizing intelligent model matching, improving the accuracy and efficiency of model selection, and being able to quickly locate the simulation model that best suits user needs, using NLP technology to parse the selected simulation model representation information, introducing Gaussian kernel similarity, correlation calculation and weighted scoring mechanism, and combining weighted mean square error and regularization terms, realizing more accurate parameter recommendations, improving the accuracy and robustness of parameter selection, and ultimately achieving the effect of generating a high-quality simulation model that better meets user needs. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0030] Figure 1 Flowchart of the method for generating intelligent question-answering power system simulation model.

[0031] Figure 2 A diagram of examples for training intent descriptions for building models in intelligent question answering.

[0032] Figure 3 Describes a training example graph for the number of nodes required for the model in Smart Question Answering.

[0033] Figure 4 A graph describing training examples for the number of branches required for the model in intelligent question answering.

[0034] Figure 5 Examples of synonymous definitions for node keywords in smart question and answer Figure 1 .

[0035] Figure 6 Examples of synonymous definitions for branch keywords in smart question and answer Figure 2 .

[0036] Figure 7 This is a flow chart of the intention feature value extraction and discrimination method. DETAILED DESCRIPTION

[0037] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.

[0038] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0039] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor is it a separate or selective embodiment that is mutually exclusive with other embodiments.

[0040] Example 1

[0041] Reference Figure 1 to Figure 7 , which is the first embodiment of the present invention, and provides a method for generating an intelligent question-answering power system simulation model, comprising:

[0042] S1: Collect multiple simulation models and user demand description information, and integrate the collected multiple simulation models into simulation model representation information.

[0043] Specifically, collect basic information of various simulation models, including nodes, branches, power supply types, etc. Record detailed results of each simulation, such as the number of nodes, number of branches, and calculation time. Preprocess the collected basic information to ensure the integrity and accuracy of the data.

[0044] Furthermore, the model information is stored in the initial knowledge base using a structured data format, such as SQLite.

[0045] S2: Convert the simulation model representation information and user demand description information into knowledge base text vectors, and build a simulation model knowledge base based on the knowledge base text vectors.

[0046] Specifically, the simulation model representation information and the user demand description information are converted into the knowledge base text vector, and for any sentence, the expression of the new sentence obtained by replacing the corresponding entity with a synonym is as follows:

[0047] X′=[x1′,x2′,...,xN′]

[0048] Among them, X′ represents a vector composed of entities extracted from text information and obtained after synonym replacement, and xN′ represents an entity extracted from text information and obtained after synonym replacement.

[0049] Furthermore, the obtained X′ set {X′} is input into the BERT model for training and semantic features are extracted. After training, the formula for forming a new semantic feature vector is as follows:

[0050] E′=BERT({X′})

[0051] Among them, E′ represents the semantic feature vector after BERT training, and BERT({X′}) represents the entity vector set after text information extraction and synonym replacement input into the BERT model for training;

[0052] Furthermore, based on the new vector E′, keyword extraction is performed. The formula for extracting the keyword vector is as follows:

[0053] Vec=BERT(g1,g2,…)

[0054] Among them, Vec represents the keyword vector after BERT training, g1 represents the first vector element before the set value (20%) in E′, g2 represents the second vector element before the set value (20%) in E′, and BERT(g1, g2, ...) means inputting the g1 and g2 vector elements into BERT training and returning the keyword vector.

[0055] Furthermore, a text vectorization model based on basic information of the model is designed, and a model of the associated knowledge base is designed, and the vectorization model and model knowledge together form a simulation model knowledge base. An example of a text vectorization model is: 9nodes-16branches-ac-model, and the corresponding basic information of the simulation model includes the number of nodes and branches, as well as basic power supply information, network information, parameter information, etc. Based on these basic information, specific model information is described.

[0056] S3: Based on the simulation model knowledge base, build an intelligent question-answering service and collect user demand text vectors through the intelligent question-answering service.

[0057] Specifically, building an intelligent question-answering service includes defining training data, defining dialogue strategies, defining intent feature value processing behaviors, defining task execution behaviors, and conducting language training. After language training is completed, the intelligent question-answering robot service is started to conduct dialogue exchanges with users.

[0058] Further, defining the training data includes inputting the user's intention expression, identifying the intention expression feature value in the intention expression, and adding a synonym conversion rule to the intention expression feature value to convert the synonymous expression into a corresponding fixed sentence;

[0059] Furthermore, defining the dialogue strategy includes specifying the response action after the intention input, and the feature value of the intention completion;

[0060] Furthermore, the intent feature value processing behavior is defined to include interpreting and extracting various intent feature values ​​in the user intent. For intents containing multiple feature values ​​whose confidence exceeds a set value, the extraction result is directly used. For intents containing single feature values ​​that cannot be distinguished by regular expressions, the robot response behavior metadata determination is added, and the valid intent feature values ​​that have been strung together are used.

[0061] Furthermore, defining the task execution behavior includes converting the intent feature value into execution parameters through the behavior execution interface and passing it to the simulation model generation service after the intent feature value meets the task definition requirements.

[0062] Furthermore, building an intelligent question-answering service includes user interaction and intent recognition, using natural language processing technology to identify user intent, analyze user input, and extract key feature values, such as the number of nodes and branches.

[0063] Furthermore, by combining historical data in the simulation model knowledge base, we optimize feature value extraction and synonym processing rules, and dynamically adjust dialogue strategies and feature value processing rules based on user feedback and system learning to improve question and answer accuracy.

[0064] Furthermore, the intelligent question-and-answer service realizes rule-based dialogue scenarios, from the robot sending greetings to the user initiating task intentions, and the robot conducting guided multi-round information questions and answers for the task. After the necessary feature values ​​meet the requirements, the next step is to execute the model generation task or calculation task. The intelligent question-and-answer service includes intent sample training, dialogue strategy definition, intent feature value extraction, dialogue management, and task behavior management.

[0065] Furthermore, dialogue management is responsible for the question-and-answer process between the robot and the user, and manages the data of the entire question-and-answer process, recording in detail whether the data comes from the robot or the user, whether the data is triggered by certain intention feature values ​​of the user or by a question asked by the robot, key feature values ​​in the data, etc.

[0066] Furthermore, task behavior management is responsible for converting conditional feature values ​​into query conditions through the behavior execution interface after the intention feature values ​​meet the task requirements. After searching the simulation model knowledge base and obtaining user confirmation, the corresponding model knowledge identification code is passed to the model generation service.

[0067] S4: Use the cosine similarity calculation method to calculate the similarity between the knowledge base text vector and the user demand text vector collected by the intelligent question answering service.

[0068] Furthermore, the similarity between the two text description information is obtained by calculating the vector angle. The calculation formula for calculating the similarity is as follows:

[0069]

[0070] Among them, Vec1 represents the knowledge base text vector, Vec2 represents the user demand text vector, Vec1·Vec2 represents the dot product of the two vectors, |Vec1| and |Vec2| are the Euclidean norms of the two vectors respectively, and Si calculated by the similarity formula is the cosine value of the angle between the two vectors, ranging from -1 to 1. When the cosine value is 1, it means that the two vectors are exactly the same; when the cosine value is 0, it means that the two vectors are orthogonal, or unrelated; when the cosine value is -1, it means that the two vectors are completely opposite.

[0071] S5: Based on the similarity calculation result, extract one or more simulation model representation information with the highest similarity to the user demand text vector, and select one simulation model representation information according to the intelligent question and answer service.

[0072] Preferably, the calculation results with cosine values ​​greater than 0.5 are sorted from large to small to obtain the similarity ranking results. The simulation model representation information with high matching degree selected after similarity calculation is used as input and selected and confirmed by the intelligent question-answering service.

[0073] S6: Use NLP technology to parse the selected simulation model representation information, intelligently recommend the optimal simulation model parameter set, and generate the required simulation model based on the optimal simulation model parameter set.

[0074] Specifically, the user demand description information d is converted into a vector through the BERT model The simulation model characterization information p j Converted into vectors through the BERT model Calculate the user demand description information vector Information vector representing the simulation model Gaussian kernel similarity between .

[0075] Further, the simulation model representation information vector is calculated With candidate parameters The correlation between them is comprehensively considered, and the Gaussian kernel similarity and correlation are weighted by using weights to weight each parameter to obtain the recommended score R of the candidate simulation model parameter set. j ; Define the weighted mean square error term to measure the deviation between the sample prediction value and the sample actual value; introduce the regularization term and define the ReLU activation function term to measure the similarity Si between the user demand text vector and the simulation model parameter set recommendation score R j The difference between them is used to obtain the optimal simulation model parameter set.

[0076] Furthermore, the calculation formula for the recommended score of the candidate simulation model parameter set is as follows:

[0077]

[0078] Among them, R j represents the recommended score of the candidate simulation model parameter set, m represents the number of parameters, α k represents the weight of the kth parameter, γ represents the parameter of the kernel function, represents the simulation model characterization information vector, represents the user demand description information vector, Indicates candidate parameters.

[0079] Furthermore, the calculation formula of the optimal simulation model parameter set is as follows:

[0080]

[0081] Among them, Opt represents the optimal simulation model parameter set, N represents the number of samples, and y k represents the actual value of the kth sample, f(x k ) represents the predicted value of the kth sample, x k represents the input feature vector of the kth sample, represents the variance of the kth sample, λ represents the regularization parameter, θ represents the model parameter, β represents the weight of ReLU, m represents the number of parameters, Si represents the similarity of the user demand text vector, R j Represents the recommended score of the simulation model parameter set.

[0082] In summary, by comprehensively considering Gaussian kernel similarity and correlation and introducing a weight mechanism, a multi-dimensional evaluation of candidate parameters is achieved. This technical solution not only considers the matching degree between parameters and user needs, but also considers the importance of parameters in the model, which can improve the comprehensiveness and accuracy of parameter recommendations. By defining the weighted mean square error term, the system can effectively measure the deviation between the sample prediction value and the actual value, which helps to continuously optimize the model parameters and improve the accuracy and reliability of the simulation model. Detailed mathematical formulas are provided to calculate the recommended scores of candidate parameter sets and the optimal parameter set, which provides a clear direction for subsequent optimization and improvement. Through multi-step calculation and optimization, accurate mapping of user needs to optimal simulation model parameters is achieved, which improves the pertinence and effectiveness of the generated simulation model.

[0083] Further, Figure 2 to Figure 4 The training information diagram provided for the present invention only lists the training methods including two basic characteristics of the number of nodes and the number of branches, and the discrimination process is shown in Table 1.

[0084] Table 1. Design table of question-answering dialogue of generative model

[0085]

[0086] Further, Figure 2 to Figure 4 Among them, nodenum and branchnum are key feature values ​​for discrimination, which are used to refine the user's intention features and determine the intention response based on the refined user's intention features. Node and branch are intent keywords to assist in feature extraction.

[0087] Furthermore, the above content is only a brief example, and the actual model generation parameters may include other information besides the number of nodes and branches, such as the composition of power generation equipment and power generation capacity.

[0088] Furthermore, this embodiment also provides an intelligent question-answering power system simulation model generation system, comprising:

[0089] A data collection module is used to collect multiple simulation models and user demand description information, and integrate the collected multiple simulation models into simulation model representation information;

[0090] A knowledge base construction module is used to convert simulation model representation information and user demand description information into knowledge base text vectors, and construct a simulation model knowledge base based on the knowledge base text vectors;

[0091] Intelligent question-answering service building module, used to build intelligent question-answering service based on simulation model knowledge base, and collect user demand text vectors through intelligent question-answering service;

[0092] A calculation model for calculating the similarity between the knowledge base text vector and the user demand text vector collected by the intelligent question answering service using a cosine similarity calculation method;

[0093] A selection module is used to extract one or more simulation model representation information with the highest similarity to the user demand text vector according to the similarity calculation result, and select a simulation model representation information according to the intelligent question answering service;

[0094] The generation module is used to use NLP technology to parse the selected simulation model representation information, intelligently recommend the optimal simulation model parameter set, and generate the required simulation model based on the optimal simulation model parameter set.

[0095] This embodiment also provides a computer device, which is suitable for the case of an intelligent question-and-answer type power system simulation model generation method, including a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute computer executable instructions to implement the intelligent question-and-answer type power system simulation model generation method proposed in the above embodiment.

[0096] The computer device may be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covering the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.

[0097] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the method for generating an intelligent question-and-answer type power system simulation model as proposed in the above embodiment is implemented.

[0098] Example 2

[0099] Reference Figure 1 to Figure 7 , which is the second embodiment of the present invention, and this embodiment provides a method for generating an intelligent question-and-answer type power system simulation model. In order to verify the beneficial effects of the present invention, a specific example is provided.

[0100] Further, Figure 5-6 As an example of synonym definition, in intelligent question-answering, when users express their intentions to the robot, as shown in Table 1, if there is no feature value, only the intention is expressed in summary, and the user does not need to and will not indicate the node or branch information. However, once the user states the requirement for the number of nodes or branches, since key information will not be omitted when expressing the overall intention, there will be deviations in the information expression, such as 9 nodes, 9 nodes, nine nodes, nine nodes, etc. In this case, since the feature value nodenum is defined separately, 9 and nine are extracted into nodenum, and if the words "node", "nodes", "nodes" and so on are put in the last processing when extracting information, it will be messy. Therefore, a special synonym is defined: "node". After identifying synonyms, uniformly extracting them as specified values ​​will greatly improve the accuracy of knowledge training, so that a higher confidence index can be obtained after extracting information, which is conducive to the execution of subsequent dialogues and task processes.

[0101] Further, Figure 7 is a schematic diagram of the conditional feature value question answering and discrimination process in the present invention, and the overall extraction and discrimination process is shown in Figure 7The left process, in which the feature extraction algorithm in the present invention has made in-depth exploration and processing for the model generation and calculation scheduling method of the intelligent question-answering type power system simulation, especially in the judgment of conditional feature values ​​such as the number of nodes and the number of branches, the problem of digital confusion during machine recognition is found. The number of nodes and the number of branches cannot be distinguished by means of digital validity and digital intervals through regularization. When the robot asks "How many nodes do you want?" or "How many branches do you want?", in natural language communication, the response may be concise replies such as 9, 9 nodes, nine, nine, 9 branches, 9, 9, etc., and the result obtained by this reply in the algorithm extraction is unpredictable, the confidence is low, and it is even recognized as an erroneous conditional feature. In the actual scenario, if it is a natural person asking questions, they know whether 9 represents a node or a branch. Therefore, the present invention supplements the metadata in the answering process, that is, the scene information such as the robot asking "How many nodes do you want?" as the environmental judgment condition, realizes the correction of conditional features, and well solves the problem of digital confusion generated in concise dialogues. See the judgment process. Figure 7 Flowchart on the right.

[0102] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A method for generating an intelligent question-answering power system simulation model, characterized in that: include, Collect multiple simulation models and user demand description information, and integrate the collected multiple simulation models into simulation model representation information; The simulation model representation information and the user demand description information are converted into knowledge base text vectors, and the simulation model knowledge base is constructed according to the knowledge base text vectors; Based on the simulation model knowledge base, build an intelligent question-answering service and collect user demand text vectors through the intelligent question-answering service; Use the cosine similarity calculation method to calculate the similarity between the knowledge base text vector and the user demand text vector collected by the intelligent question answering service; According to the similarity calculation result, one or more simulation model representation information with the highest similarity to the user demand text vector is extracted, and one simulation model representation information is selected according to the intelligent question answering service; Use NLP technology to parse the selected simulation model representation information, intelligently recommend the optimal simulation model parameter set, and generate the required simulation model based on the optimal simulation model parameter set.

2. The method for generating an intelligent question-answering power system simulation model according to claim 1, wherein: The converting of simulation model representation information and user requirement description information into knowledge base text vectors includes: For any sentence, the expression of the new sentence obtained by replacing the corresponding entity with a synonym is as follows: X′=[x1′,x2′,...,xN′] Among them, X′ represents the vector composed of entities extracted from text information and obtained after synonym replacement, and xN′ represents the entities extracted from text information and obtained after synonym replacement; The obtained X′ set {X′} is input into the BERT model for training and semantic features are extracted. After training, the formula for forming a new semantic feature vector is as follows: E′=BERT({X′}) Among them, E′ represents the semantic feature vector after BERT training, and BERT({X′}) represents the entity vector set after text information extraction and synonym replacement input into the BERT model for training; Based on the new vector E′, keyword extraction is performed. The formula for extracting keyword vectors is as follows: Vec=BERT(g1,g2,…) Among them, Vec represents the keyword vector after BERT training, g1 represents the first vector element before the set value in E′, g2 represents the second vector element before the set value in E′, and BERT(g1, g2, …) means inputting the g1 and g2 vector elements into BERT training and returning the keyword vector.

3. The method for generating an intelligent question-answering power system simulation model according to claim 2, wherein: The construction of the intelligent question-answering service includes defining training data, defining dialogue strategies, defining intent feature value processing behaviors, defining task execution behaviors, and performing language training. After the language training is completed, the intelligent question-answering robot service is started to perform dialogue exchanges with users. Defining training data includes inputting the user's intention expression, identifying the intention expression feature value in the intention expression, and adding a synonym conversion rule to the intention expression feature value to convert the synonymous expression into a corresponding fixed sentence; Defining the dialogue strategy includes specifying the response action after the intention input and the feature value of the intention completion; The defined intent feature value processing behavior includes interpreting and extracting various intent feature values ​​in the user intent, directly using the extraction result for intents containing multiple feature values ​​whose confidence exceeds a set value, and adding robot response behavior metadata determination for intents containing single feature values ​​that cannot be distinguished by regular expressions, and using the concatenated valid intent feature values; Defining the task execution behavior includes converting the intention feature value into execution parameters through the behavior execution interface after the intention feature value meets the task definition requirements, and passing them to the simulation model generation service.

4. The method for generating an intelligent question-answering power system simulation model according to claim 3, wherein: The formula for calculating the similarity between the knowledge base text vector and the user demand text vector collected by the intelligent question answering service using the cosine similarity calculation method is as follows: Among them, Si represents the similarity calculation result, Vec1 represents the knowledge base text vector, Vec2 represents the user demand text vector, |Vec1| and |Vec2| are the Euclidean norms of the knowledge base text vector and the user demand text vector respectively.

5. The method for generating an intelligent question-answering power system simulation model according to claim 4, characterized in that: The method of using NLP technology to analyze the selected simulation model representation information and intelligently recommend an optimal simulation model parameter set includes: The user demand description information d is converted into a vector through the BERT model The simulation model characterization information p j Converted into vectors through the BERT model Calculate the user demand description information vector Information vector representing the simulation model Gaussian kernel similarity between ; Compute the simulation model representation information vector With candidate parameters The correlation between Considering Gaussian kernel similarity and correlation comprehensively, each parameter is weighted using weights to obtain the recommended score R of the candidate simulation model parameter set. j ; Define the weighted mean square error term to measure the deviation between the sample prediction value and the sample actual value; Introduce the regularization term, define the ReLU activation function term, measure the similarity Si of the user demand text vector and the simulation model parameter set recommendation score R j The difference between them is used to obtain the optimal simulation model parameter set.

6. The method for generating an intelligent question-answering power system simulation model according to claim 5, characterized in that: The calculation formula for the candidate simulation model parameter set recommendation score is as follows: Among them, R j represents the recommended score of the candidate simulation model parameter set, m represents the number of parameters, α k represents the weight of the kth parameter, γ represents the parameter of the kernel function, represents the simulation model characterization information vector, represents the user demand description information vector, Indicates candidate parameters.

7. The method for generating an intelligent question-answering power system simulation model according to claim 6, characterized in that: The calculation formula of the optimal simulation model parameter set is as follows: Among them, Opt represents the optimal simulation model parameter set, N represents the number of samples, and y k represents the actual value of the kth sample, f(x k ) represents the predicted value of the kth sample, x k represents the input feature vector of the kth sample, represents the variance of the kth sample, λ represents the regularization parameter, θ represents the model parameter, β represents the weight of ReLU, m represents the number of parameters, Si represents the similarity of the user demand text vector, R j Represents the recommended score of the simulation model parameter set.

8. An intelligent question-answering type power system simulation model generation system, based on the intelligent question-answering type power system simulation model generation method according to any one of claims 1 to 7, characterized in that: Also includes, A data collection module is used to collect multiple simulation models and user demand description information, and integrate the collected multiple simulation models into simulation model representation information; A knowledge base construction module is used to convert simulation model representation information and user demand description information into knowledge base text vectors, and construct a simulation model knowledge base based on the knowledge base text vectors; Intelligent question-answering service building module, used to build intelligent question-answering service based on simulation model knowledge base, and collect user demand text vectors through intelligent question-answering service; A calculation model for calculating the similarity between the knowledge base text vector and the user demand text vector collected by the intelligent question answering service using a cosine similarity calculation method; A selection module is used to extract one or more simulation model representation information with the highest similarity to the user demand text vector according to the similarity calculation result, and select a simulation model representation information according to the intelligent question answering service; The generation module is used to parse the selected simulation model representation information using NLP technology, intelligently recommend the optimal simulation model parameter set, and generate the required simulation model based on the optimal simulation model parameter set.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for generating an intelligent question-and-answer type power system simulation model according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for generating an intelligent question-and-answer type power system simulation model according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Intention recognition method, large language model, electronic equipment and medium

    CN120353891A

  • Simulation processing method and device based on large language model agent

    CN120408941A