Data processing method and electronic device
By extracting energy storage vertical domain terms from a large language model and performing serialization encoding and association checks, the model's understanding and reasoning ability regarding the energy storage vertical domain is enhanced, solving the professional query problem in the field of energy storage technology and achieving highly accurate query result output.
Patent Information
- Application Number
- CN202610969394.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-01
- Publication Date
- 2026-07-31
AI Technical Summary
The large language model lacks sufficient professional knowledge in the field of energy storage technology, resulting in semantic misunderstandings and insufficient decision analysis capabilities, which cannot meet the query needs of professional scenarios.
By extracting target terms from the energy storage vertical domain and converting them into term vectors, serializing and encoding the target table data, and performing association matching and compliance checks, the language model's ability to understand and reason about the energy storage vertical domain is enhanced.
It enhances the semantic understanding and reasoning capabilities of the language model, enabling it to accurately identify the user's query intent and provide professional and accurate query results, thus addressing the model's professional query needs in the field of energy storage technology.
Smart Images

Figure CN122489615A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a data processing method and an electronic device. Background Technology
[0002] Large Language Models (LLMs) are an important branch of artificial intelligence developed based on deep learning technology. They specifically refer to models trained on massive amounts of general-purpose text and possessing strong natural language understanding and generation capabilities. The emergence of LLMs has not only driven a revolutionary change in human-computer interaction, enabling efficient communication between natural language and machines, but has also become a core support for the intelligent upgrading of industries. They have been deeply applied in multiple fields such as office work, education, finance, and healthcare, significantly improving industry operational efficiency and service quality.
[0003] However, large language models still have significant shortcomings in specialized applications. Taking the energy storage technology field as an example, the training data of general-purpose large language models mainly consists of general texts, resulting in a clear blind spot in terms of specialized knowledge reserves. At the semantic understanding level, the models are prone to semantic misunderstandings or information biases, and their decision-making and analytical capabilities need to be improved. Summary of the Invention
[0004] This application provides a data processing method and electronic device that can improve the understanding ability of large language models in the field of energy storage technology, improve the decision-making and analysis capabilities of the models, and improve the professionalism and accuracy of query results.
[0005] To achieve the above objectives, the embodiments of this application adopt the following technical solutions: Firstly, a data processing method is provided, comprising: acquiring query information, extracting target terms from the energy storage vertical domain within the query information, and converting the target terms into target term vectors. Then, if the query information includes target table data, the target table data is serialized and encoded to obtain target serialized data, which retains key structural information from the target table data. The target table data is energy storage vertical domain data, such as complex structured table data within the energy storage vertical domain. If the query information includes target detection parameters within the energy storage vertical domain, the target detection parameters and pre-acquired compliance judgment rules within the energy storage vertical domain are correlated and matched, and compliance checks are performed to obtain target correlation check results. The target detection parameters may include detection data of equipment operation within the energy storage vertical domain. Finally, the query information and target transformation information, such as target term vectors, or target term vectors, target serialized data, and / or target correlation check results, are input into a target language model to obtain the target query results corresponding to the query information.
[0006] In this method, on the one hand, by extracting target terms from the energy storage vertical domain in the query information and converting the target terms into target term vectors, the professional terms of the energy storage vertical domain can be converted into term vectors that can be recognized by the target language model, thus solidifying the semantic features of the domain terms, strengthening the target language model's ability to represent energy storage professional terms, and avoiding professional ambiguity.
[0007] On the other hand, by serializing and encoding the target table data in the query information to obtain target serialized data, and performing association matching and compliance checks on the target detection parameters in the query information to obtain target association check results, it is possible to achieve lossless transfer of table data structure features and position features to serialized data, solving the technical pain point that the model cannot parse the structured features of the target table data. It can also complete the association check between target detection parameters and compliance rules, pre-filter basic data conflicts and non-compliance risks, and the generated target association check results can provide explicit business rule prior knowledge for the target language model, reducing the model's reasoning burden.
[0008] On the other hand, by inputting query information and corresponding target transformation information into the target language model, the model can utilize query information, target term vectors, target serialized data, and target association check results as multi-dimensional fusion feature inputs. This enhances the target language model's ability to understand terms and term relationships within the energy storage vertical domain, and improves its ability to comprehend the logical relationships between structured information, detection parameters, and compliance judgment rules in target tabular data. Therefore, applying this solution can improve the semantic understanding and reasoning capabilities of the target language model, thereby enhancing the model's decision-making and analytical abilities based on these powerful understanding and reasoning capabilities. This allows for accurate identification of user query intent and the provision of professional and accurate query results.
[0009] In one possible implementation of the first aspect, the method for extracting target terms from the energy storage vertical domain in the query information and converting the target terms into target term vectors may include: extracting target terms from the energy storage vertical domain in the query information through a pre-trained vectorization model and converting the target terms into target term vectors.
[0010] In this method, target terms in the query information are converted into target term vectors by a pre-trained vectorization model. This can convert textual terms into vector information that is easy for the model to recognize and understand, which helps to enhance the target speech model's ability to understand professional terms and their relationships, and improve the target language model's recognition accuracy on key terms.
[0011] In one possible implementation of the first aspect, the method for serializing and encoding the target table data to obtain target serialized data may include: statically parsing the target table data to determine the structured information in the target table data, such as the starting position of merged cells, the boundary of the mapping area across rows and columns in the target table data, and at least one of the time series features in the target table data.
[0012] Then, based on this structured information, the target table data can be serialized and encoded, and coordinate identifiers can be injected into the encoded data. A table header path label and time series features can be added to each data unit to generate the target serialized data. The key structural information includes at least one of the following: the starting position of merged cells in the target table data, the boundaries of the mapping area across rows and columns, time series features, coordinate identifiers, table header path labels for each data unit, and time series features.
[0013] This method enables the encoding of target table data using a serialization encoding method that integrates spatial topology and preserves temporal features. It can retain key structural information in the target table data, such as logical structure and time series information, so that the target language model can accurately identify the table information in the target table data when analyzing query information, and provide users with more accurate query results.
[0014] In one possible implementation of the first aspect, the method for performing correlation matching and compliance checks on the target detection parameters and the compliance judgment rules in the pre-acquired energy storage vertical domain to obtain the target correlation check result may include: using a set of logical expressions to perform correlation matching and compliance checks on the target detection parameters to obtain the target correlation check result.
[0015] The set of logical expressions is obtained by transforming the target standard criteria, which are the corresponding standard rules retrieved from the pre-acquired compliance judgment rules in the energy storage vertical domain based on the target detection parameters. For example, the set of logical expressions can be obtained by transforming the pre-acquired compliance judgment rules (such as rules in the compliance judgment rule base) during the training process of the target language model.
[0016] This method utilizes a set of logical expressions to quickly perform association matching and compliance checks on target detection parameters, ensuring the accuracy of the checks and facilitating subsequent query analysis of query information by the target language model using the target association check results.
[0017] In one possible implementation of the first aspect, the query information can be used to check for the existence of anomalies. The method described above for inputting query information and target transformation information into a target language model to obtain the target query result corresponding to the query information may include: inputting the query information and target transformation information into a target language model, analyzing whether anomalies exist through the target language model; and generating warning information if anomalies exist, with the target query result including the warning information. Anomalies include any one or more of the following: the detection item corresponding to the query information or target transformation information does not match the device type; the detection item includes detection parameters or detection values; the detection value corresponding to the query information or target transformation information exceeds the preset threshold range of the corresponding specification; the temporal pattern of multiple sets of detection data corresponding to the target transformation information does not match the operating pattern of the corresponding device; there is an error in the understanding of terminology in the query information or target transformation information; or key data is missing in the query information or target transformation information.
[0018] This method can enhance the model's understanding of professional semantics in the energy storage field by integrating target term vectors into the target language model, improve the accuracy and sensitivity of identifying anomalies in query information and target conversion information, and enhance the early warning capability of the query system by outputting early warning information based on anomalies, providing users with professional guidance and suggestions.
[0019] In one possible implementation of the first aspect, after obtaining the target serialized data, a mapping relationship between the target serialized data and the target table data can be established. This mapping relationship can indicate the position of the corresponding data in the target serialized data within the target table data. Then, semantic analysis of the target detection parameters in the target serialized data can be performed using a target language model. If the attention weight of the target detection parameters in the target language model is greater than a weight threshold, the target detection parameters can be back-addressed according to the mapping relationship to determine their positions in the target table data. The target query result includes the positions of the associated target detection parameters in the target table data. These associated target detection parameters can be either anomaly-related target detection parameters or target detection parameters corresponding to the query information.
[0020] This method enables lossless mapping back to the target table data, accurately locating the data's hierarchical relationships and temporal nodes, and improving the completeness, traceability, and reliability of the target query results without losing important information such as the structural features and temporal change logic of the target table data.
[0021] In one possible implementation of the first aspect, the target language model is trained by acquiring training data and knowledge data from the energy storage vertical domain. The training data includes query information and corresponding query results, while the knowledge data includes terminology text data, tabular data, and standard specification documents from the energy storage vertical domain. Specifically, the tabular data stores complex structured data from the energy storage vertical domain, and the standard specification documents store equipment testing parameters and compliance judgment rules from the energy storage vertical domain.
[0022] Then, terms can be extracted from the terminology knowledge text data and converted into term vectors. The tabular data is then serialized and encoded to ensure that the serialized data retains key structural information. Finally, association matching and compliance checks are performed on equipment testing parameters and compliance judgment rules to obtain the association check results corresponding to the standard specification documents.
[0023] Finally, the knowledge transformation information corresponding to the information to be queried and the knowledge data is input into the language model to be trained to obtain the predicted query result corresponding to the information to be queried. Based on the predicted query result and the query result corresponding to the information to be queried, the language model to be trained is updated. The update is iterated until the preset convergence condition is met to obtain the target language model. Among them, the knowledge transformation information includes at least one of term vectors, serialized data and association check results.
[0024] In this method, on the one hand, by extracting terms from terminology knowledge text data and converting the terms into term vectors, the professional terms in the energy storage vertical field can be converted into term vectors that can be recognized by the language model, thus solidifying the semantic features of the domain terms. During the model training process, this enhances the language model's ability to understand energy storage professional terms and avoids generating professional ambiguity.
[0025] On the other hand, by serializing and encoding tabular data to obtain serialized data, and performing correlation matching and compliance checks on equipment detection parameters and compliance judgment rules to obtain correlation check results, the structural and positional features in tabular data can be losslessly transferred to serialized data. This solves the technical pain point that the model cannot parse the structured features of tabular data. It can also complete the correlation check between equipment detection parameters and compliance rules, pre-filtering basic data conflicts and non-compliance risks. The language model can learn explicit business rule prior knowledge based on the generated correlation check results, reducing the model's reasoning burden and ensuring that the model can correctly reason about the compliance of detection parameters.
[0026] On the other hand, by inputting the query information and knowledge transformation information (at least one of term vectors, serialized data, and association check results) into the language model to be trained, multi-dimensional fusion features can be input into the language model to enhance the language model's ability to understand terminology, complex tables, and standardized documents in the energy storage vertical field. This allows the target language model to achieve a high level of understanding and reasoning ability in the energy storage vertical field after training, which helps to provide users with reliable and accurate query content.
[0027] In one possible implementation of the first aspect, the method for extracting terms from terminology knowledge text data and converting them into term vectors may include: extracting terms from the terminology knowledge text data and constructing a term relationship subgraph based on the terms, which represents the association between terms and attributes, such as equipment type and temperature index. Then, term pairs in the terminology relationship subgraph are used to construct hard-negative samples, and a contrastive constraint training is performed on the vectorization model to obtain a pre-trained vectorization model. Finally, the terms in the terminology relationship subgraph are converted into term vectors using the pre-trained vectorization model.
[0028] The term pairs include easily confused terms in the term relationship subgraph, such as multiple terms with numerical differences less than a preset threshold and / or similar physical meanings. The vectorized model can include a dual-tower deep structured semantic model (DSSM) based on a Transformer-based bidirectional encoder to represent the BERT architecture.
[0029] In this method, by constructing hard negative samples and training the vectorized model with contrast constraints, a pre-trained vectorized model is obtained. The pre-trained vectorized model is then used to convert the terms in the term relationship subgraph into target term vectors. This can dynamically amplify the semantic gap between easily confused terms, achieve refined modeling of term vectors, enhance the target language model's understanding of professional terms and their relationships, and improve the target language model's recognition accuracy on key terms.
[0030] In one possible implementation of the first aspect, the equipment testing parameters include one or more of the following: technical parameters, threshold ranges, applicable operating conditions, testing items, and applicable equipment rules. The method described above for performing correlation matching and compliance checks on equipment testing parameters and compliance judgment rules to obtain the correlation check results corresponding to the standard specification documents may include: calling the language model to be trained, converting the equipment testing parameters into serialized testing data, and extracting entity features from the serialized testing data, such as the equipment, the corresponding testing items, and the corresponding testing measurement data in the equipment testing parameters. Then, using the equipment and its corresponding testing items as query vectors, the corresponding standard rules are retrieved from the vector database corresponding to the compliance judgment rules. The standard rules are then converted into a set of logical expressions, and the set of logical expressions is used to perform compliance judgments on the testing measurement data corresponding to the testing items to obtain the correlation check results.
[0031] The results of the related inspection include at least one of the following: equipment information, whether the corresponding testing and measurement data of the equipment is compliant data, and standard rules for determining whether the testing and measurement data is compliant data.
[0032] This method enables the correlation matching and compliance check of equipment detection parameters with corresponding compliance judgment rules, thereby achieving compliance judgment of equipment detection parameters, outputting correlation check results, and providing a high-quality training sample of correlation check results for the language model to be trained. This allows the language model to quickly learn the compliance judgment logic of the energy storage vertical field and optimize the anomaly detection and reasoning capabilities of the language model.
[0033] In one possible implementation of the first aspect, a corpus entity database can be constructed using basic corpus data from the energy storage vertical domain. Then, based on the corpus entity database and knowledge relationship templates from the energy storage vertical domain, a few-shot learning method is used to expand the query information and corresponding query results in the pre-acquired sample question-and-answer data, resulting in expanded sample question-and-answer data. Based on preset question-and-answer constraint rules, the expanded sample question-and-answer data is validated and semantic conflict filtered to obtain the training data.
[0034] This method can generate diverse question-and-answer corpora even when the amount of question-and-answer sample data is small, thereby expanding the amount of data to be trained and enhancing the model's generalization ability in the face of sparse data.
[0035] In one possible implementation of the first aspect, the language model to be trained includes the Qwen3-8B model. During the training process of the language model to be trained, the language model to be trained is updated using any of the following methods: updating the model parameters of the language model to be trained using the low-rank adaptation (LoRA) method; constructing preference data pairs consisting of expert query results and model query results using expert question-and-answer data, and iteratively updating the model parameters of the language model to be trained based on the preference loss of the expert query results and model query results; masking domain entities in the energy storage vertical domain using unlabeled energy storage business data, controlling the language model to be trained to predict the masked domain entities, and iteratively updating the model parameters of the language model to be trained based on the prediction results.
[0036] This method allows for the use of different model parameter update methods to update the parameters of the language model under training, thereby improving the generalization ability of the language model in complex scenarios and optimizing the analytical performance of the language model in the energy storage vertical field.
[0037] Secondly, a model training method is provided. This method may include acquiring training data and knowledge data from the energy storage vertical domain. The training data includes query information and corresponding query results, while the knowledge data includes terminology knowledge text data, tabular data, and standard specification documents from the energy storage vertical domain. The tabular data stores complex structured data from the energy storage vertical domain, and the standard specification documents store equipment detection parameters and compliance judgment rules from the energy storage vertical domain. Then, terms can be extracted from the terminology knowledge text data and converted into term vectors. The tabular data is serialized and encoded to retain key structural information. Association matching and compliance checks are performed on the equipment detection parameters and compliance judgment rules to obtain the association check results corresponding to the standard specification documents. Finally, the knowledge transformation information corresponding to the query information and knowledge data is input into the language model to be trained to obtain the predicted query results corresponding to the query information. Based on the predicted query results and the query results corresponding to the query information, the language model to be trained is updated; the iterative update continues until a preset convergence condition is met, resulting in the target language model. The knowledge transformation information includes at least one of the following: term vectors, serialized data, and association check results.
[0038] Thirdly, a data processing device is provided, comprising: an acquisition module for acquiring query information; an extraction module for extracting target terms from the energy storage vertical domain in the query information and converting the target terms into target term vectors; a serialization encoding module for serializing and encoding the target table data to obtain target serialized data, wherein the target serialized data can retain key structural information in the target table data; an association checking module for performing association matching and compliance checks on the target detection parameters and pre-acquired compliance judgment rules in the energy storage vertical domain, wherein the query information includes target detection parameters in the energy storage vertical domain, to obtain target association check results; and a query module for inputting the query information and target transformation information, such as target term vectors, or target term vectors, target serialized data, and / or target association check results, into a target language model to obtain target query results corresponding to the query information. The target table data is energy storage vertical domain data, such as complex structured table data in the energy storage vertical domain.
[0039] Fourthly, an electronic device is provided, comprising: a memory and at least one processor. The memory is communicatively connected to the processor. The memory is used to store computer program code, which includes computer instructions. When the processor executes the computer instructions, it causes the electronic device to perform the methods described in the first aspect, the second aspect, and any possible implementation thereof.
[0040] Fifthly, embodiments of this application provide a computer-readable storage medium storing computer instructions. When executed by a processor, these computer instructions are used to implement the methods described in the first aspect, the second aspect, and any possible implementation thereof.
[0041] Sixthly, embodiments of this application provide a computer program product that, when run on a computer / executed by a computer's processor, implements the methods described in the first aspect, the second aspect, and any possible design embodiments thereof. The computer may be the electronic device described in the fourth aspect and any possible implementation thereof.
[0042] It is understood that the beneficial effects achieved by the data processing apparatus described in the third aspect, the electronic device described in the fourth aspect, the computer-readable storage medium described in the fifth aspect, and the computer program product described in the sixth aspect can be referred to as the beneficial effects in the first aspect and any possible implementation thereof, which will not be repeated here. Attached Figure Description
[0043] Figure 1 A flowchart of a data processing method provided in an embodiment of this application is shown; Figure 2 A schematic diagram of a data processing system provided in an embodiment of this application is shown; Figure 3 A flowchart illustrating a training method for a target language model provided in an embodiment of this application is shown. Figure 4 A structural diagram of a data processing system provided in an embodiment of this application is shown; Figure 5 This paper shows a schematic diagram of the structure of a data processing apparatus provided in an embodiment of the present application; Figure 6 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application is shown. Detailed Implementation
[0044] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this embodiment, unless otherwise stated, "a plurality of" means two or more.
[0045] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0046] In the technical solutions provided in this application, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved are all information and data authorized by the user or fully authorized by all parties. The collection, storage, use, processing, transmission, provision and disclosure of the above information and data all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0047] It should be noted that in the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, it does not mean that the applicant has used or necessarily used the solution.
[0048] With the rapid development of artificial intelligence technology, large language models have demonstrated powerful semantic understanding and reasoning capabilities in multiple fields. However, due to the large amount of specialized knowledge involved in specialized fields such as energy storage technology, which are highly specialized and complex, large language models still have many shortcomings in their application in this vertical field of energy storage, such as the inability to understand technical terms and logical relationships between technologies in the field of energy storage technology.
[0049] One approach to related technologies attempts to address the aforementioned issues through simple retrieval-augmented generation (RAG) or basic fine-tuning. However, this approach typically only solves knowledge retrieval problems, meaning it can only retrieve knowledge about complex technical terms and cannot achieve deeper logical reasoning and understanding. Therefore, it cannot meet the query requirements (high-accuracy professional Q&A) in the field of energy storage technology.
[0050] Based on this, embodiments of this application provide a data processing method that can be applied to an electronic device. The electronic device can acquire query information, such as user input or system-initiated query information, extract target terms from the energy storage vertical domain within the query information, and convert the target terms into target term vectors. If the query information includes target table data, the target table data is serialized and encoded to obtain target serialized data, which retains key structural information from the target table data. If the query information includes target detection parameters from the energy storage vertical domain, the target detection parameters and pre-acquired compliance judgment rules from the energy storage vertical domain are correlated and matched, and compliance checks are performed to obtain target correlation check results. Then, the query information and target transformation information, such as target term vectors, or target term vectors, target serialized data, and / or target correlation check results, are input into a target language model to obtain the target query results corresponding to the query information.
[0051] By applying this scheme, target terms can be extracted from query information, converted into target term vectors, and target table data in the query information can be serialized and encoded to obtain target serialized data. Furthermore, the target detection parameters in the query information can be correlated and matched, and compliance checks can be performed to obtain target correlation check results. Then, the query information and corresponding target transformation information are input into the target language model. This enhances the target language model's ability to understand terms and their relationships within the energy storage vertical domain, improves its ability to learn structured information in target table data, and enhances its ability to understand the logical relationships between detection parameters and compliance judgment rules. Ultimately, this improves the target language model's semantic understanding and reasoning capabilities, enabling it to accurately identify user query intent and provide users with professional and accurate query results.
[0052] The data processing method provided in this application can be applied to electronic devices. For example, the electronic device can be a computer device. Exemplarily, the computer device can be deployed in an energy storage system, such as a server or terminal in the energy storage system, which can analyze the query information input by the user by training a language model, and output the corresponding query results to provide the user with professional energy storage query services.
[0053] In some embodiments, the electronic device may also be a server, such as a server cluster consisting of multiple servers, a single server, a computer, or a processor or processing chip within a server or computer. The server is configured to provide data query services and model training services, capable of training a language model using training data and knowledge data, and also capable of receiving query requests initiated by users, performing inference and analysis on the query information using the trained language model, and outputting corresponding query results. Based on business data from the energy storage vertical domain, the server can also continuously optimize the performance of the language model.
[0054] In other embodiments, the method provided in this application can be applied to a system composed of a server and a terminal. The electronic device may include a server and a terminal. The server can be used for language model training and optimization tasks, and the electronic device can receive user query requests, call the language model trained by the server to analyze the query information, and output the corresponding query results.
[0055] The data processing method provided in the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0056] Figure 1 A flowchart of a data processing method provided in an embodiment of this application is shown, such as... Figure 1 As shown, steps S110-S150 may be included.
[0057] S110, Obtain query information.
[0058] Query information is raw query information initiated by a user or query system and awaiting processing. It can include data of various types such as text, tables, documents, and files.
[0059] For example, the query information can be text information and query data entered by the user in the query system interface. For example, the text information could be "Analyze the insulating oil test data of the main transformer of the No. 3 energy storage substation in May 2024, and whether there are any abnormalities?", and the query data is the corresponding "insulating oil test data", which can be entered into the query system in the form of tables, documents, files, etc.
[0060] In some embodiments, the query information may include only text information and query data. For example, the query information may be only the text information "What is a main transformer?" entered by the user, or it may be only tabular data or document data. When the query information only includes tabular data or document data, the query system can parse the text information in the tabular data or document data to determine the corresponding parsing results, such as explanations of relevant terms, correlations between data, and compliance judgment results.
[0061] To illustrate the process of processing query information, Figure 2 A schematic diagram of a data processing system provided in an embodiment of this application is shown. Figure 2 As shown, query information can be obtained through the data input layer, which may include terminology text information, target table data, target detection parameters, etc. In some cases, the data input layer can also perform simple preprocessing on the query information, such as deduplication.
[0062] S120. Extract the target terms from the energy storage vertical domain in the query information and convert the target terms into a target term vector.
[0063] Because terms in the energy storage vertical domain are highly specialized, similar, and context-dependent, electronic devices can use a vector representation method that combines multidimensional semantic mapping and contrastive learning to optimize the vector representation of target terms in order to accurately understand the terminology in the query information. This helps improve the target language model's ability to understand specialized terms and ensures that the target language model can accurately identify the inherent relationships between specialized content such as equipment categories and key indicators.
[0064] In some embodiments, the electronic device can input query information to... Figure 2 The terminology enhancement and understanding module in the domain knowledge enhancement and preprocessing layer shown extracts target terms from the energy storage vertical domain in the query information, removes redundant information in the query information, such as meaningless auxiliary words, stop words, punctuation marks, etc., and then converts the target terms into target term vectors so that the target language model can be used to analyze and understand the target terms in the future.
[0065] For example, query information can be input into a pre-trained vectorization model, which can then extract target terms from the energy storage vertical domain of the query information and convert the target terms into target term vectors, such as converting each target term into a word vector of a fixed dimension.
[0066] Among them, the pre-trained vectorization model can be a pre-trained word vector model Word2Vec, a global vectors for word representation (GloVe), etc.
[0067] S130. If the query information includes target table data, serialize and encode the target table data to obtain target serialized data.
[0068] The target serialized data is used to preserve key structural information in the target table data, such as the relationships between merged cells. The target table data is energy storage vertical domain data. For example, the target table data could be equipment maintenance records, test reports, etc.
[0069] To facilitate the target language model's analysis of tabular data and enhance its ability to understand such data, when the query information includes target tabular data, the target tabular data can be parsed. For example, the tabular data from the query information can be input into... Figure 2 The table data processing module shown determines the structured information in the target table data and then converts the target table data into target serialized data.
[0070] Since the target serialized data can retain the key structural information of the target tabular data, analyzing the target serialized data through the target language model can ensure that the target language model can analyze the key structural information in the target tabular data, avoiding the loss of structured information that would affect the accuracy of model analysis.
[0071] In some embodiments, the target table data can be structured and parsed, such as determining the key structural information of the rows, columns, and cells in the target table data, as well as the row-column correspondence, and then splicing these key structural information according to a preset format to map them into a one-dimensional or multi-dimensional sequence to obtain the target serialized data.
[0072] In some embodiments, in step S130, static parsing can be performed on the target table data to determine at least one of the following: the starting position of merged cells in the target table data, the boundary of the mapping area spanning rows and columns in the target table data, and the time series features in the target table data. For example, when performing static parsing on the target table data, an algorithm can be used to locate the starting anchor point of merged cells in the target table data, calculate the boundary of the mapping area spanning rows and columns, and record the time series features in the target time series.
[0073] Then, based on at least one of the following: the starting position of the merged cells, the boundary of the mapping area across rows and columns, and time series features, the target table data is serialized and encoded. Coordinate identifiers are injected into the encoded data, and table header path labels and time series features are added to each data unit to generate target serialized data (one-dimensional or multi-dimensional sequence data), enabling the target serialized data to carry structured information such as coordinates and time series attributes. For example, the time series feature can be the time series difference between multiple detected records in the target table data.
[0074] In this embodiment, the key structural information may include at least one of the following: the starting position of the merged cell in the target table data, the boundary of the mapping area across rows and columns, time series characteristics, coordinate identifiers, the header path label of each data unit, and time series characteristics.
[0075] This method enables the encoding of target table data using a serialization encoding method that integrates spatial topology and preserves temporal features. It can retain key structural information in the target table data, such as logical structure and time series information, so that the target language model can accurately identify the table information in the target table data when analyzing query information, and provide users with more accurate query results.
[0076] S140. If the query information includes target detection parameters in the energy storage vertical domain, perform correlation matching and compliance checks on the target detection parameters and the pre-acquired compliance judgment rules in the energy storage vertical domain to obtain the target correlation check results.
[0077] The target detection parameters can be the detection data of equipment operation in the energy storage vertical domain, including equipment, parameter values, status variables, and configuration information. For example, taking energy storage batteries as an example, the detection data can include voltage, current, temperature, charge / discharge power, and cycle count. Compliance judgment rules can include parameter thresholds, safety specifications, and operating standards for various equipment or substances, such as "Standards for Dissolved Gas Content in Operating Oil" and "Preventive Testing Procedures for Power Equipment." Among them, the "Preventive Testing Procedures for Power Equipment" are inspection, testing, or monitoring procedures conducted on equipment to identify potential hazards and prevent accidents and equipment damage in the energy storage vertical domain. It can record multiple standard rules, such as the clause "Acetylene ≤ 5 μL / L".
[0078] When querying information including target detection parameters within the energy storage vertical domain, to enhance the target language model's analytical capabilities for these parameters, the target detection parameters can be correlated and matched with pre-acquired compliance judgment rules within the energy storage vertical domain, and compliance checks can be performed. For example, the target detection parameters can be input into... Figure 2The standard specification linkage reasoning module shown is used to identify key parameters in the target detection parameters, and to check whether they comply with the corresponding safety or technical standards in the pre-acquired compliance judgment rules, so as to obtain the target correlation inspection results.
[0079] This method enables compliance determination based on target detection parameters and compliance judgment rules, achieving an effective dynamic linkage reasoning mechanism. It automatically matches and logically analyzes the target detection parameters with the corresponding rules in the compliance judgment rules, allowing for advance compliance judgment of parameters, reducing the reasoning pressure on the target language model, and improving the standardization and reliability of query results.
[0080] In some embodiments, in step S140, a set of logical expressions can be used to perform association matching and compliance checks on the target detection parameters to obtain the target association check results.
[0081] Among them, the set of logical expressions is obtained by transforming the target standard criteria, which are the corresponding standard rules retrieved from the compliance judgment rules in the pre-acquired energy storage vertical domain based on the target detection parameters.
[0082] In other words, when analyzing target detection parameters, all corresponding standard rules can be retrieved from the compliance judgment rules based on the target detection parameters, and then each standard rule can be converted into a logical expression to obtain a set of logical expressions.
[0083] Compared to standard rules, logical expressions can be directly recognized by computers. Therefore, when performing association matching and compliance checks, the target detection parameters can be directly matched with the logical expressions, and it can be determined whether the judgment part meets the triggering conditions, such as whether the value meets the numerical condition, whether the device type matches, etc., so as to obtain the conclusion of "true" or "false", that is, to obtain the target association check result.
[0084] Therefore, in this method, electronic devices can use logical expressions to quickly perform association matching and compliance checks on target detection parameters, which can ensure the accuracy of the checks and facilitate subsequent target language models to use the target association check results to perform query analysis on the query information.
[0085] S150. Input the query information and target transformation information into the target language model to obtain the target query results corresponding to the query information.
[0086] The target transformation information includes target term vectors; or, the target transformation information includes target term vectors, target serialization data, and / or target association check results.
[0087] A target language model refers to a pre-trained large language model that performs semantic parsing, feature fusion, and anomaly detection on query information. For example, a target language model can employ bidirectional encoder representations from transformers (BERT), generative pre-trained transformer (GPT) models, or Deepseek models.
[0088] In other words, when the query information does not include target table data and target detection parameters, the query information and target term vectors can be input into the target language model to obtain the target query results corresponding to the query information. When the query information only includes target table data, the query information, target term vectors, and target serialization data can be input into the target language model to obtain the target query results corresponding to the query information. When the query information only includes target detection parameters, the query information, target term vectors, and target association check results can be input into the target language model to obtain the target query results corresponding to the query information.
[0089] When the query information includes target table data and target detection parameters, the query information, target term vector, target serialization data, and target association check results can all be input into the target language model to obtain the target query results corresponding to the query information.
[0090] For example, when inputting query information and target transformation information into a system such as... Figure 2 Following the target language model shown in the language model layer, the target language model can perform comprehensive reasoning based on the textual semantics of the query information, combined with the structural features, domain features, and compliance check features contained in the target transformed information. It then outputs the target query results corresponding to the query information at the system output layer and application layer, such as... Figure 2 As shown, the target query results can include query results and compliance warnings and suggestions.
[0091] For example, when a user enters the query "What is insulating oil?", the target language model analyzes the query and target transformation information to understand the terminology related to insulating oil in the energy storage vertical domain, and outputs the target query result about "insulating oil", such as "Insulating oil, also called transformer oil, is a mineral insulating liquid medium that is mainly filled inside power transformers, reactors, and transformer equipment in energy storage step-up stations, and has the core functions of insulation, heat dissipation and cooling".
[0092] For example, consider the query information in the aforementioned embodiment: "Analyze the insulating oil test data of the main transformer of Energy Storage Substation No. 3 in May 2024. Are there any abnormalities?" and "Insulating oil test data". After comprehensively analyzing and judging the query information and target transformation information through the target language model, the target query result is output. This target query result can indicate whether there is abnormal information in the "insulating oil test data". For example, the target query result could be: "Upon testing, abnormal information is found in the insulating oil test data. The abnormal information is that the acetylene content is 6.2 μL / L, which exceeds the standard range (5 μL / L). There may be partial discharge or overheating faults. Inspection is recommended."
[0093] This step allows query information and various other information to be input into the target language model, enabling the fusion of multi-source information such as text, tables, and compliance rules. This enhances the target language model's knowledge understanding and application capabilities in the field of energy storage technology, allowing it to accurately identify the user's query intent and output precise and professional query results to meet the professional query needs in the field of energy storage technology.
[0094] In some embodiments, steps S210-S220 may be performed in step S150.
[0095] S210. Input the query information and target transformation information into the target language model, and analyze whether there are any anomalies through the target language model.
[0096] Exceptions can include any one or more of the following: (1) The detection items corresponding to the query information or target conversion information do not match the equipment type. Detection items include detection parameters or detection values.
[0097] For example, if the equipment type corresponding to a certain detection parameter or detection value in the query information or target conversion information is the upper guide bearing of the unit, but it should actually be a transformer, it indicates that the detection parameter or detection value does not match the equipment type and there is an anomaly.
[0098] (2) The detection value corresponding to the query information or target conversion information exceeds the preset threshold range of the corresponding specification.
[0099] For measured values within the energy storage sector, such as total hydrocarbon content, temperature, and pressure, the corresponding standards specify normal threshold ranges, i.e., preset threshold ranges. Therefore, if the measured values corresponding to the queried information or target conversion information exceed the preset threshold range of the corresponding standard, it indicates an anomaly.
[0100] (3) The temporal pattern of multiple sets of detection data corresponding to the target conversion information does not match the operating pattern of the corresponding equipment.
[0101] In the energy storage sector, equipment operation typically follows fixed natural patterns of change. Therefore, by analyzing the temporal patterns of multiple sets of detection data corresponding to target transformation information, it is possible to identify whether the data exhibits abrupt changes, and thus determine whether it aligns with the operational patterns of the corresponding equipment.
[0102] For example, if multiple sets of detection data on total hydrocarbon content in the target conversion information show a sharp spike and then a sudden drop in value within a short period of time, it indicates that the detection data does not conform to the normal gradual change operation pattern of transformer oil chromatography. This is an anomaly as the time sequence pattern does not match the equipment operation pattern.
[0103] (4) Misunderstanding of terms in query information or target conversion information.
[0104] (5) Key data is missing in the query information or target conversion information.
[0105] For example, query information or target transformation information is used to analyze specific knowledge, but if the query information or target transformation information lacks key data for analyzing specific knowledge, then there is an anomaly.
[0106] After inputting the query information and target transformation information into the target language model, for example, the target language model performs deep semantic encoding on the target term vector and target transformation information to establish a global association representation of terms, table positions, detection values, devices, time, etc.
[0107] Then, the target language model analyzes and judges each dimension, including whether the semantics of professional terms are compliant, whether the structured information in the tables is complete, whether the detection value thresholds are met, whether the matching of equipment parameter attributions is reasonable, and whether the time-series data is consistent with the equipment's operating rules. If any dimension does not conform to the business specifications of the energy storage vertical field and the inherent operating mechanism of the equipment, it is determined that there are anomalies in the query information and target conversion information.
[0108] S220. In the event of an anomaly, generate an early warning message.
[0109] The target query results include early warning information.
[0110] After confirming the existence of an anomaly, the electronic device can further generate early warning information based on the anomaly. This early warning information may include the anomaly type, anomaly location, and anomaly level.
[0111] In the absence of detected anomalies, based on the semantic understanding and reasoning of the query information and target transformation information using the target language model, normal target query results can be directly generated. These target query results can indicate the knowledge understanding results of the query information and target transformation information, such as the understanding of terms corresponding to the query information and the results of data pattern analysis.
[0112] This method can enhance the model's understanding of professional semantics in the energy storage field by integrating target term vectors into the target language model, improve the accuracy and sensitivity of anomaly identification in query information and target transformation information, and enhance the early warning capability of the query system by outputting early warning information based on anomalies, providing users with professional guidance and suggestions.
[0113] To facilitate data backtracking, in some embodiments, after serializing and encoding the target table data in step S130 to obtain the target serialized data, a mapping relationship between the target serialized data and the target table data can be established. For example, a directional mapping tree can be dynamically constructed in memory to form a hierarchical inverted index from the serialization features to the topological path of "table header-row name-column name".
[0114] In this embodiment, the mapping relationship can completely preserve the association between each data item in the target serialized data and the corresponding cell, field, and detection item in the target table data, clarify the original source of each data fragment in the target serialized data, and ensure the accuracy and traceability of subsequent reverse addressing.
[0115] Then, in step S150, semantic analysis can be performed on the target detection parameters in the target serialized data using the target language model. The target detection parameters can be any detection item and its detection value in the target serialized data.
[0116] During model analysis, if the attention weight of the target language model on the target detection parameters is greater than the weight threshold, the target detection parameters can be back-addressed according to the above mapping relationship to determine their position in the target table data. The attention weight can characterize the degree of correlation and importance between the target detection parameters and the query information.
[0117] For example, the location of the target detection parameters in the target table data can be found by parsing the coordinate metadata in the target serialized data and using a hierarchical inverted index method.
[0118] When generating target query results, the system can generate results that include the location of associated target detection parameters within the target table data, based on the query information. These associated target detection parameters can be either those indicating anomalies or those corresponding to the query information. In other words, if the query information includes a query for the target detection parameter, the corresponding target query results will also be output.
[0119] In other words, if the attention weight of a certain object detection parameter in the target language model is greater than a preset weight threshold, it indicates that the object detection parameter is highly relevant to the current query information and plays a core supporting role in generating the target query result. Therefore, a reverse addressing process can be triggered to trace the position of the object detection parameter in the original target table data. When generating the target query result, the traced object detection parameter and its position are included in the target query result, ensuring that the target query result not only includes the object detection parameter itself but also reflects its original data source and associated context.
[0120] Therefore, this method can be used to map back to the target table data without loss, accurately locate the data's subordinate relationships and temporal nodes, and improve the completeness, traceability, and credibility of the target query results without losing important information such as the structural features and temporal change logic in the target table data.
[0121] Through the above steps S110-S150, on the one hand, by extracting target terms from the energy storage vertical domain in the query information, the target terms can be converted into target term vectors. This can convert the professional terms of the energy storage vertical domain into term vectors that can be recognized by the target language model, solidify the semantic features of the domain terms, strengthen the target language model's ability to represent energy storage professional terms, and avoid generating professional ambiguity.
[0122] On the other hand, by serializing and encoding the target table data in the query information to obtain target serialized data, and performing association matching and compliance checks on the target detection parameters in the query information to obtain target association check results, it is possible to achieve lossless transfer of table data structure features and position features to serialized data, solving the technical pain point that the model cannot parse the structured features of the target table data. It can also complete the association check between target detection parameters and compliance rules, pre-filter basic data conflicts and non-compliance issues, and the generated target association check results can provide explicit business rule prior knowledge for the target language model, reducing the model's reasoning burden.
[0123] On the other hand, by inputting query information and corresponding target transformation information into the target language model, the target language model can be enhanced to understand terms and term relationships in the energy storage vertical field by using query information, target term vectors, target serialized data and target association inspection results as multi-dimensional fusion feature inputs, thereby improving the target language model's ability to understand the logical relationship between structured information, detection parameters and compliance judgment rules in the target table data.
[0124] Therefore, applying this solution can enhance the semantic understanding and reasoning capabilities of the target language model, thereby accurately identifying the user's query intent based on its powerful understanding and reasoning abilities, and providing the user with professional and accurate query results.
[0125] To illustrate the training method of the target language model in the embodiments of this application, Figure 3 A flowchart illustrating a training method for a target language model provided in an embodiment of this application is shown. Figure 3 As shown, the steps S310-S350 may be included.
[0126] S310. Acquire the training data and knowledge data of the energy storage vertical domain.
[0127] The training data can include the information to be queried and the corresponding query results. During training, the query results can be used to verify the analytical performance of the model, so as to update the model parameters.
[0128] Knowledge data refers to relevant knowledge content in the field of energy storage technology, which may include terminology, textual data, tabular data, and standard specification documents in the energy storage vertical field.
[0129] The terminology knowledge text data is used to store terminology and related knowledge within the energy storage vertical domain, such as "upper guide bearing," "top cover," and "generator stator insulation." Tabular data is used to store complex structured data within the energy storage vertical domain, while standard specification documents are used to store equipment testing parameters and compliance judgment rules. For example, tabular data may include energy storage equipment parameter tables and testing data record tables.
[0130] The equipment testing parameters in the standard specification documents can include testing parameter data of various equipment in the field of energy storage technology, such as historical data and standard data of various detectable parameters such as energy storage battery voltage, temperature, and state of charge (SOC). The compliance judgment rules can include parameter thresholds, safety specifications, and operating standards for various equipment or substances, such as "Standards for Dissolved Gas Content in Operating Oil" and "Preventive Testing Procedures for Power Equipment".
[0131] In some embodiments, in order to obtain training data, the electronic device may perform the following steps S410-S430: S410. Construct a corpus entity database using basic corpus data from the energy storage vertical domain.
[0132] The basic corpus data can include various related corpus data in the field of energy storage technology, such as supervision manuals, equipment operation manuals, equipment maintenance procedures, defect classification standards, and equipment ledger specifications.
[0133] For example, a corpus entity database can be constructed by combining automated extraction with knowledge graph constraints. This corpus entity database serves as the "dictionary" and "knowledge foundation" of the query system, and can standardize the storage of all key entities in the field of energy storage technology.
[0134] For example, entities such as equipment categories and key indicators can be extracted from basic corpus data, such as the aforementioned supervision work manual, equipment user manual, and equipment maintenance procedures, to construct a corpus entity library.
[0135] For example, candidate entities can be extracted from the basic corpus data according to the corresponding rules and dictionaries. Then, the energy storage knowledge graph can be used as a "judge" to verify, disambiguate, and classify the candidate entities to obtain the target entities. All target entities constitute the corpus entity library.
[0136] S420. Based on the knowledge relationship templates in the corpus entity database and energy storage vertical domain, a few-shot learning method is used to expand the query information and corresponding query results in the pre-acquired sample question and answer data to obtain the expanded sample question and answer data.
[0137] The knowledge relationship templates in the corpus entity database and the energy storage vertical domain can be knowledge templates created by professionals based on their expertise or historical query data. For example, a knowledge relationship template can be composed of three types of information: "equipment name - work item - indicator threshold". Various knowledge relationship templates can be constructed according to different equipment and information content, and this embodiment does not impose specific limitations on them.
[0138] Few-shot learning refers to using knowledge sources to guide the model to automatically generate diverse new sample data that conforms to business logic when there is only a small amount of sample data.
[0139] For example, based on pre-acquired sample question-and-answer data, a general semantic framework independent of specific entity names can be parsed. This semantic framework can include framework parameters such as device type, work item, indicator, compliance basis, fault conclusion, query template, and answer template. Then, using a corpus entity database, the values of each framework parameter in the semantic framework are obtained, and the constraint information of the related framework parameters is obtained using a knowledge relationship template. Based on this constraint information, a new query framework is generated. By combining different entities and templates, more new query information and their corresponding query results are obtained, i.e., the expanded sample question-and-answer data.
[0140] S430. Based on the preset question-and-answer constraint rules, the expanded sample question-and-answer data is verified and semantic conflict filtered to obtain the training data.
[0141] For example, according to the preset question-and-answer constraint rules, the expanded sample question-and-answer data is subjected to multiple rounds of confidence verification and caliber alignment to remove semantically conflicting samples in the data, thereby forming high-quality training data.
[0142] Through steps S410-S430 above, diverse question-and-answer corpora can be generated even with a limited amount of sample data, thereby expanding the amount of training data and enhancing the model's generalization ability to sparse data. For example, based on the acquired sample question-and-answer data, such as "transformer insulating oil detection," multiple query options can be generated, such as "What fault does excessive acetylene in insulating oil indicate?"
[0143] S320. Extract terms from the terminology knowledge text data and convert the terms into term vectors.
[0144] To facilitate the language model to be trained in understanding and analyzing terms in terminology knowledge text data, the terms in the terminology knowledge text data can be converted into term vectors that the model can directly analyze.
[0145] For example, step S320 can be implemented by the following steps S510-S530: S510. Extract terms from the terminology knowledge text data and construct a terminology relationship subgraph based on the terms.
[0146] The terminology relationship subgraph is used to characterize the association between terms and attributes, which may include equipment type, temperature index, measurement conditions, insulation index, etc.
[0147] For example, electronic devices can segment and preprocess terminology knowledge text data, extract terms from the terminology knowledge text data using a preset energy storage vertical domain terminology dictionary, and then construct a terminology relationship subgraph with terms as nodes and attributes and relationships as edges to establish and adjust semantic mapping rules between terms and attributes.
[0148] S520. Construct the term pairs in the term relation subgraph as hard negative samples, perform contrastive constraint training on the vectorized model, and obtain the pre-trained vectorized model.
[0149] Here, "difficult-to-bearing samples" refer to terms that are easily confused, such as terms that are semantically similar but have different entities. A term pair includes multiple terms, such as multiple terms in the term relationship subgraph whose numerical differences are less than a preset threshold and / or whose physical meanings are similar. For example, the threshold expressions for "total hydrocarbons" and "hydrogen" under different procedures can be regarded as a term pair. The vectorization model can include a dual-tower deep structured semantic model (DSSM) based on the BERT architecture.
[0150] In this step, a hard example mining mechanism is introduced to construct term pairs as hard negative samples. Then, a contrastive learning method is used to train the vectorized model with contrastive constraints. For example, the term vectors of the terms in the term pair are used as the model input of the vectorized model. The terms are semantically encoded through the encoding layer of the model, and a contrastive loss function is used for contrastive constraint training to bring synonymous term vectors closer together and push away easily confused term vectors until the training converges, thus obtaining the pre-trained vectorized model.
[0151] In some embodiments, in order to improve the performance of the vectorization model, positive samples, hard negative samples, and ordinary negative samples can be constructed simultaneously. These samples are used to perform contrastive constraint training on the vectorization model, so that the term vectors corresponding to the hard negative samples and ordinary negative samples are pushed apart, and the term vectors corresponding to the positive samples are pulled closer, until the training is completed.
[0152] Positive samples can be composed of semantically identical term pairs in the term relation subgraph, while ordinary negative samples can be composed of semantically significantly different term pairs with no attribute association in the term relation subgraph.
[0153] S530. Convert the terms in the term relation subgraph into term vectors using a pre-trained vectorization model.
[0154] For example, all terms in the term relation subgraph can be input into a pre-trained vectorization model, and the encoding layer of the model can be used to semantically encode the terms to obtain the term vectors corresponding to each term.
[0155] Since the vectorized model has good recognition ability after being trained with contrast constraints, it can effectively distinguish easily confused terms by converting terms in the term relation subgraph into term vectors through the pre-trained vectorized model.
[0156] In other words, through steps S510-S530, a pre-trained vectorized model can be obtained by constructing hard negative samples and performing comparative training. The terminology in the terminology relationship subgraph can be converted into term vectors through the pre-trained vectorized model, which can dynamically amplify the semantic gap between easily confused terms, realize refined modeling of term vectors, facilitate the target language model's understanding of professional terms and relationships, and improve the target language model's recognition accuracy on key terms.
[0157] In some embodiments, the method in steps S510-S530 can also be... Figure 2 The terminology enhancement and understanding module shown is now complete.
[0158] S330. Serialize and encode the table data so that the serialized data obtained after serialization and encoding retains the key structural information in the table data.
[0159] S340. Perform correlation matching and compliance checks on equipment testing parameters and compliance judgment rules to obtain correlation check results corresponding to standard specification documents.
[0160] In step S330, converting tabular data into serialized data makes it easier for the language model to understand and analyze the tabular data. Serialized data can retain key structural information in the tabular data, which facilitates processing by the language model and avoids the loss of key information, thereby improving the model's ability to analyze tabular data.
[0161] In step S340, by performing correlation matching and compliance checks on the equipment detection parameters and compliance judgment rules, correlation check results are obtained. This enables dynamic matching and compliance judgment of equipment detection parameters with standard specifications, allowing the language model to make reasonable predictions of query results based on the correlation check results, thereby improving the model's understanding ability in the field of energy storage technology.
[0162] It should be noted that the method for serializing and encoding the table data in step S330 can refer to the method in step S130 of the aforementioned embodiments, and the method for associating and matching the device detection parameters and compliance judgment rules and checking compliance in step S340 can refer to the method in step S140 of the aforementioned embodiments. To avoid redundancy, it will not be repeated here.
[0163] In some embodiments, terminology knowledge text data, tabular data, and standard specification documents are considered as the three main types of data in the energy storage vertical domain. There may be some overlap in the content of these data. To improve data accuracy, [further measures are taken]. Figure 2 When processing data, the modules shown can be used to comprehensively analyze the data to correctly distinguish between tabular data, terminology, and standard rules, thereby obtaining the corresponding processing results.
[0164] In some embodiments, the equipment testing parameters may include one or more of the following: technical parameters, threshold range, applicable operating conditions, testing items, and applicable equipment rules.
[0165] The technical parameters may include the inherent performance parameters of various devices in the energy storage technology field. Applicable operating conditions refer to the applicable working conditions of the equipment or material, such as ambient temperature range and load level. Testing items may include insulation testing, temperature testing, and communication status testing. Equipment usage rules refer to the corresponding testing requirements, scenarios, or standards. Depending on actual needs, equipment testing parameters may also include other parameters; this embodiment does not specifically limit this.
[0166] In some embodiments, step S340 can be implemented by the following steps S610-S630: S610: Call the language model to be trained, convert the device detection parameters into serialized detection data, and extract entity features from the device detection parameters in the serialized detection data.
[0167] The entity characteristics can include the equipment in the equipment testing parameters, the testing items corresponding to the equipment, and the testing measurement data corresponding to the testing items. For example, the equipment can be any device in the field of energy storage technology, the testing items refer to the testing content associated with the equipment, such as voltage testing, temperature testing, insulation testing, etc., and the testing measurement data corresponding to the testing items refer to the specific values and dimensions of the testing items, such as the measured value of voltage testing being 380V.
[0168] By calling the language model to be trained, the device detection parameters are input into the language model, enabling the language model to perform serialization encoding on the device detection parameters, thereby converting the device detection parameters into serialized detection data that can be recognized by the model. For example, during the encoding process, the language model to be trained retains core information such as the parameter type and correspondence of the device detection parameters, avoiding parameter loss or misalignment.
[0169] After obtaining the serialized detection data, entity recognition and feature extraction can be performed on the serialized detection data to filter out the entity features.
[0170] In some embodiments, in step S610, other models, such as multilayer perceptron models and deep factorization machines (DeepFM), can also be used to convert the device detection parameters into serialized detection data. This embodiment does not specifically limit this.
[0171] S620. Using the equipment and the corresponding testing items as query vectors, retrieve the corresponding standard rules from the vector database corresponding to the compliance judgment rules.
[0172] For example, devices and their corresponding testing items can be combined to form search keywords. These keywords can then be converted into fixed-dimensional query vectors using a pre-defined vectorization model, such as the DSSM model based on the BERT architecture. This ensures that the query vectors accurately represent the semantic relationship between "device and testing item." The query vectors are then input into a pre-built vector database corresponding to compliance judgment rules, where a mixed sparse and dense search is performed to determine the standard rule corresponding to the query vector.
[0173] For example, a vector similarity matching algorithm can be used to retrieve standard rules that have a high similarity to the query vector. One or more vectors with a similarity greater than the similarity threshold to the query vector can be identified as target vectors, and all standard rules corresponding to the target vectors can be selected as the standard rules corresponding to the query vector.
[0174] S630. Convert the standard rules into a set of logical expressions, and use the set of logical expressions to make compliance judgments on the testing and measurement data corresponding to the testing items, so as to obtain the associated inspection results.
[0175] The results of the related inspection include at least one of the following: equipment information, whether the corresponding testing and measurement data of the equipment is compliant data, and standard rules for determining whether the testing and measurement data is compliant data.
[0176] To improve the efficiency of correlation matching and compliance checks, after obtaining the standard rules, the retrieved standard rules can be logically parsed and transformed. This converts the compliance rules described in natural language into a set of computer-recognizable and computable logical expressions. Each logical expression corresponds to a specific compliance judgment logic, such as the connection between a relational operator and an absolute threshold. Then, the testing measurement data corresponding to the testing items is input into the set of logical expressions for verification and calculation one by one. This determines whether the testing measurement data meets the compliance conditions corresponding to all logical expressions, and the correlation check results are then compiled and generated.
[0177] For example, if the test measurement data meets the compliance conditions corresponding to all logical expressions, then the test measurement data is determined to be compliant data; if it does not meet the compliance conditions corresponding to any logical expression, then the test measurement data is determined to be non-compliant data.
[0178] Through steps S610-S630 above, the equipment detection parameters can be correlated and matched with the corresponding compliance judgment rules, and compliance checks can be performed to achieve compliance judgment of the equipment detection parameters. For example, when the compliance judgment rules include the standard rules of basic terminology for power storage, the electronic device can match and check the compliance of the equipment detection parameters with each clause in the standard rules of basic terminology for power storage (such as dissolved gas content in operating oil: total hydrocarbons ≤150μL / L, hydrogen ≤150μL / L, acetylene ≤5μL / L), and output the correlation check results. This provides a high-quality training sample of the correlation check results for the language model to be trained, enabling the language model to quickly learn the compliance judgment logic of the energy storage vertical domain and optimize the anomaly detection and reasoning capabilities of the language model.
[0179] S350. Input the knowledge transformation information corresponding to the information to be queried and the knowledge data into the language model to be trained, obtain the predicted query result corresponding to the information to be queried, and update the language model to be trained according to the predicted query result and the query result corresponding to the information to be queried; iterate until the preset convergence condition is met to obtain the target language model.
[0180] The knowledge transformation information includes at least one of the following: term vectors, serialized data, and association check results.
[0181] In this step, the language model to be trained is updated iteratively multiple times until the preset convergence condition is met, so that the language model to be trained achieves better performance and the target language model is obtained.
[0182] Preset convergence conditions may include the language model's prediction error being less than a preset threshold, or the error not decreasing significantly in multiple consecutive iterations, or the language model's accuracy on other validation datasets reaching a preset standard, such as an accuracy of 95% or higher.
[0183] For example, the information to be queried and knowledge transformation information, such as term vectors, serialized data, and association check results, can be input into the language model to be trained in the language model layer. The language model to be trained can perform semantic parsing and inference calculations on this data and output the predicted query result corresponding to the information to be queried. Then, the predicted query result is compared with the query result corresponding to the information to be queried, the error between the two is calculated, and the model parameters of the language model to be trained are adjusted based on the error feedback, realizing the first update of the model parameters.
[0184] Then, the process is repeated, inputting the information to be queried and the knowledge transformation information into the language model to be trained. The language model with updated parameters is used to perform semantic parsing and inference calculations again, outputting the predicted query result corresponding to the information to be queried. The language model is then updated based on the predicted query result and the query result corresponding to the information to be queried, until the preset convergence condition is met, and the target language model is obtained.
[0185] Through the above steps S310-S350, terms can be extracted from the terminology knowledge text data and converted into term vectors. This converts the professional terms in the energy storage vertical field into term vectors that the language model can recognize, solidifies the semantic features of the domain terms, and enhances the language model's ability to understand energy storage professional terms during model training, thus avoiding professional ambiguity.
[0186] By serializing and encoding tabular data, serialized data is obtained. Then, correlation matching and compliance checks are performed on equipment detection parameters and compliance judgment rules to obtain correlation check results. The structural and positional features in the tabular data can be losslessly transferred to the serialized data, solving the technical pain point that the model cannot parse the structured features of the tabular data. It can also complete the correlation check between equipment detection parameters and compliance rules, pre-filtering basic data conflicts and non-compliance risks. The language model can learn explicit business rule prior knowledge based on the generated correlation check results, reducing the model's reasoning burden and ensuring that the model can correctly reason about the compliance of the detection parameters.
[0187] Furthermore, by inputting the information to be queried and knowledge transformation information (at least one of terminology vectors, serialized data, and association check results) into the language model to be trained, multi-dimensional fusion features can be input into the language model to enhance its ability to understand terminology, complex tables, and standardized documents in the energy storage vertical domain. This allows the target language model to achieve a high level of understanding and reasoning ability in the energy storage vertical domain after training, thus constructing a complete query system of "query (information to be queried) - reference (knowledge data) - answer (predicted query result)," which helps to provide users with reliable and accurate query content.
[0188] In some embodiments, the language model to be trained may include the Qwen3-8B model, which is capable of processing Chinese data. During the training process of the language model to be trained, the electronic device may update the language model to be trained using any of the following methods: (1) Update the model parameters of the language model to be trained by low-rank adaptation (LoRA).
[0189] By introducing the LoRA method, during model training, a low-rank matrix can be inserted only into the Transformer layer of the model. The parameters of this low-rank matrix can be optimized through training, achieving efficient updates of the model parameters without needing to fine-tune all the model's parameters. This significantly reduces the computational cost of model training, avoids overfitting, and ensures that the model can quickly learn the semantic features of the energy storage vertical region after parameter updates.
[0190] (2) Using expert question and answer data, construct a preference data pair consisting of expert query results and model query results, and iteratively update the model parameters of the language model to be trained based on the preference loss of expert query results and model query results.
[0191] For example, expert Q&A data from the energy storage sector can be collected. This data covers various scenarios such as energy storage equipment consultation, parameter compliance verification, and technical problem solving, and includes standard query results provided by experts for specific queries, i.e., expert query results. Then, the query information from the expert Q&A data can be input into the language model to be trained, obtaining the model's output query results. Through a direct preference optimization (DPO) alignment mechanism, the expert query results and model query results corresponding to the same query information are paired to construct preference data pairs. Here, the expert query results represent the optimal preference results, and the model query results represent the results to be optimized.
[0192] Furthermore, the probability distribution of model parameters is adjusted, such as calculating the preference loss of the preference data pair, determining the deviation between the model query results and the expert query results, and iteratively adjusting the parameters of the language model to be trained based on backpropagation of the preference loss, so that the query results output by the model gradually approach the expert query results, thereby improving the professionalism and accuracy of the model query results and meeting the actual application needs in the field of energy storage.
[0193] (3) Using unlabeled energy storage business data, mask the domain entities in the field of energy storage technology, control the language model to be trained to predict the masked domain entities, and iteratively update the model parameters of the language model to be trained based on the prediction results.
[0194] The energy storage business data can be pre-collected, unlabeled business data, such as technical documents, historical equipment operation records, business consultation documents, and unlabeled ledgers within the energy storage vertical. Because this data is unlabeled, the cost of acquiring it is relatively low, and manual labeling is not required.
[0195] For example, using pre-collected unlabeled energy storage business data, energy storage domain entities, such as energy storage equipment, testing items, technical parameters, and compliance rules, are randomly masked. This involves obscuring the text content of some domain entities, such as "upper guide bearing" and "total hydrocarbons." The masked energy storage business data is then input into a language model to be trained. The model's learning of the context distribution before and after terminology is controlled, and predictions are made for the masked domain entities, outputting the prediction results. The model's prediction results are then compared with the masked real domain entities to calculate the prediction error. The model parameters are updated based on backpropagation of the prediction error, strengthening the model's ability to identify and understand energy storage domain entities, and further improving the model's semantic representation and inference accuracy in the energy storage vertical domain.
[0196] In some embodiments, other methods, such as adapters or prefix-tuning, can be used to update the model parameters of the language model to be trained.
[0197] The above methods can be used to update the parameters of the language model under training by using different model parameter update methods, which can improve the generalization ability of the language model in complex scenarios and optimize the analysis performance of the language model in the energy storage vertical field.
[0198] In some embodiments, to improve the understanding and security of the target language model, such as Figure 2 As shown, a performance monitoring system can be built in the performance monitoring and feedback loop layer. Model preferences can be aligned through reinforcement learning from human feedback (RLHF), and long-term iterative optimization can be achieved through the performance monitoring and continuous improvement system.
[0199] For example, the performance of the target language model in real business scenarios can be evaluated regularly. Problems can be identified in a timely manner through log analysis / error rate statistics, and targeted improvement strategies can be formulated. At the same time, it is ensured that requirements such as sensitive word restrictions are met. The performance of the model in device detection parameter parsing, compliance judgment, and query result generation can be continuously monitored through corpus quality assessment (BLEU / ROUGE). The model parameters can be iteratively optimized based on feedback data to improve the accuracy and reliability of the model in energy storage vertical scenarios.
[0200] For example, a weekly automated evaluation mechanism can be established to evaluate the performance of the target language model in areas such as professional question answering, terminology recognition, and standard compliance detection using a standard test set. Alternatively, an error case library can be built to classify and analyze typical errors and develop targeted improvement measures. Or, a quarterly update plan can be implemented to incrementally fine-tune the target language model based on newly released standard specifications and accumulated business data to maintain its accuracy and applicability under the latest technical specifications.
[0201] Figure 4 A structural diagram of a data processing system provided in an embodiment of this application is shown. Figure 4 As shown, the data processing system 400 may include a terminology enhancement unit 410, a tabular data processing unit 420, a standard specification linkage unit 430, a fine-tuning corpus synthesis unit 440, a language model 450, and a supervision and feedback unit 460.
[0202] The terminology enhancement unit 410, the table data processing unit 420, and the standard specification linkage unit 430 can receive training data and knowledge data, such as terminology knowledge text data, table data, and standard specification documents in the aforementioned embodiments, process the query information and knowledge data in the training data, and output the processed data.
[0203] When the amount of training data is small, the fine-tuning corpus synthesis unit 440 can further expand the training data based on the input data of the terminology enhancement unit 410, the table data processing unit 420 and the standard specification linkage unit 430. For example, it can construct a corpus entity library based on the terminology corpus data input in the terminology enhancement unit 410, and expand the query information and query results in the training data by using a few-shot learning method based on the corpus entity library and the knowledge relationship template in the energy storage vertical domain.
[0204] It should be noted that the processing methods of the terminology enhancement unit 410, table data processing unit 420, and standard specification linkage unit 430 for the query information and knowledge data have been described in detail in the foregoing embodiments, and will not be repeated here to avoid redundancy.
[0205] After obtaining the processed data, the data is input into the language model 450, and the language model to be trained is iteratively trained until the training is completed, and the target language model is obtained.
[0206] By utilizing a target language model, query information input by the user can be analyzed, and corresponding target query results can be output to the user. These results can indicate whether there is any abnormal information in the query, and electronic devices can output corresponding warning information based on these results. This allows staff to inspect the relevant equipment and operating processes, ensuring the normal operation of the energy storage equipment.
[0207] To optimize the performance of the target language model, the electronic device can also continuously monitor the performance of the target language model through the supervision feedback unit 460, periodically or event-wise analyze the analysis effect of the target language model, and optimize the model performance through performance monitoring and RLHF, so that the model's understanding and reasoning ability in the energy storage vertical field can be continuously improved.
[0208] Figure 5 A schematic diagram of the structure of a data processing apparatus provided in an embodiment of this application is shown. Figure 5 As shown, the data processing apparatus 500 includes: The acquisition module 510 is used to obtain query information.
[0209] The extraction module 520 is used to extract target terms from the energy storage vertical domain in the query information and convert the target terms into target term vectors.
[0210] The serialization encoding module 530 is used to serialize and encode the target table data to obtain target serialized data when the query information includes target table data. The target serialized data can retain the key structural information in the target table data.
[0211] The correlation check module 540 is used to perform correlation matching and compliance checks on the target detection parameters and the pre-acquired compliance judgment rules in the energy storage vertical domain when the query information includes target detection parameters in the energy storage vertical domain, and obtain the target correlation check results.
[0212] The query module 550 is used to input query information and target transformation information, such as target term vectors, or target term vectors, target serialized data, and / or target association check results, into the target language model to obtain the target query results corresponding to the query information. The target table data is energy storage vertical domain data, such as complex structured table data within the energy storage vertical domain.
[0213] In some embodiments, the extraction module 520 is used to extract target terms in the energy storage vertical domain of the query information through a pre-trained vectorization model, and convert the target terms into target term vectors.
[0214] In some embodiments, the serialization encoding module 530 is used to perform static parsing of the target table data, determine at least one of the following: the starting position of merged cells in the target table data, the boundary of the mapping area spanning rows and columns in the target table data, and the time series features in the target table data; based on the starting position of merged cells, the boundary of the mapping area spanning rows and columns, and at least one of the time series features, the target table data is serialized and encoded, and coordinate identifiers are injected into the encoded data. A table header path label and a time series feature are added to each data unit to generate target serialized data. The key structural information includes at least one of the following: the starting position of merged cells in the target table data, the boundary of the mapping area spanning rows and columns, the time series features, coordinate identifiers, the table header path label of each data unit, and the time series features.
[0215] In some embodiments, the association checking module 540 can be used to perform association matching and compliance checks on the target detection parameters using a set of logical expressions to obtain the target association checking results. The set of logical expressions is obtained by transforming the target standard criteria, which are corresponding standard rules retrieved from the pre-acquired compliance judgment rules in the energy storage vertical domain based on the target detection parameters.
[0216] In some embodiments, query information is used to query for the existence of anomalies. The query module 550 can input the query information and target transformation information into a target language model, and analyze whether anomalies exist through the target language model. If anomalies exist, a warning message is generated, and the target query result includes the warning message. Anomalies include any one or more of the following: the detection item corresponding to the query information or target transformation information does not match the device type; the detection item includes detection parameters or detection values; the detection value corresponding to the query information or target transformation information exceeds the preset threshold range of the corresponding specification; the temporal pattern of multiple sets of detection data corresponding to the target transformation information does not match the operating pattern of the corresponding device; there is an error in the understanding of terminology in the query information or target transformation information; or key data is missing in the query information or target transformation information.
[0217] In some embodiments, after obtaining the target serialized data, the serialization encoding module 530 can also be used to establish a mapping relationship between the target serialized data and the target table data. The query module 550 can perform semantic analysis on the target detection parameters in the target serialized data through the target language model. If the attention weight of the target detection parameters in the target language model is greater than the weight threshold, the target detection parameters are reverse-addressed according to the mapping relationship to determine the position of the target detection parameters in the target table data. The target query result includes the position of the associated target detection parameters in the target table data.
[0218] In some embodiments, the data processing device 500 can train a target language model using the following methods: The acquisition module 510 acquires training data and knowledge data of the energy storage vertical domain. The training data includes query information and corresponding query results. The knowledge data includes terminology knowledge text data, tabular data, and standard specification documents of the energy storage vertical domain. The tabular data stores complex structured data within the energy storage vertical domain, while the standard specification documents store equipment testing parameters and compliance judgment rules. The extraction module 520 extracts terms from the terminology knowledge text data and converts the terms into term vectors. The serialization encoding module 530 serializes and encodes the tabular data to ensure that the serialized data retains key structural information from the tabular data. The association checking module 540 performs association matching and compliance checks on the equipment testing parameters and compliance judgment rules to obtain the association check results corresponding to the standard specification documents. The query module 550 inputs the knowledge transformation information corresponding to the information to be queried and the knowledge data into the language model to be trained, obtains the predicted query result corresponding to the information to be queried, and updates the language model to be trained based on the predicted query result and the query result corresponding to the information to be queried; the update is iterated until the preset convergence condition is met, and the target language model is obtained. Among them, the knowledge transformation information includes at least one of term vectors, serialized data and association check results.
[0219] In some embodiments, the extraction module 520 can be used to extract terms from terminology knowledge text data and construct a term relationship subgraph based on the terms. The term relationship subgraph is used to represent the association between terms and attributes. Term pairs in the term relationship subgraph are constructed as hard-negative samples, and a contrastive constraint training is performed on the vectorization model to obtain a pre-trained vectorization model. A term pair includes multiple terms in the term relationship subgraph whose numerical difference is less than a preset threshold and / or whose physical meaning is similar. The pre-trained vectorization model converts the terms in the term relationship subgraph into term vectors. The vectorization model includes a dual-tower deep structured semantic model (DSSM) based on a Transformer-based bidirectional encoder representing the BERT architecture.
[0220] In some embodiments, equipment detection parameters include one or more of the following: technical parameters, threshold range, applicable operating conditions, detection items, and applicable equipment rules. The association check module 540 can be used to invoke the language model to be trained, convert the equipment detection parameters into serialized detection data, and extract entity features from the serialized detection data. Entity features include the equipment, the corresponding detection items, and the corresponding measurement data in the equipment detection parameters. Using the equipment and its corresponding detection items as query vectors, the corresponding standard rules are retrieved from the vector database corresponding to the compliance judgment rules. The standard rules are converted into a set of logical expressions, and the set of logical expressions is used to perform compliance judgment on the measurement data corresponding to the detection items to obtain the association check result. The association check result includes at least one of the following: equipment information, whether the measurement data corresponding to the equipment is compliant data, and the standard rules for determining whether the measurement data is compliant data.
[0221] In some embodiments, the extraction module 520 can be used to construct a corpus entity library using basic corpus data in the energy storage vertical domain; based on the corpus entity library and the knowledge relationship template in the energy storage vertical domain, a few-shot learning method is used to expand the query information and the query results corresponding to the query information in the pre-acquired sample question-and-answer data to obtain expanded sample question-and-answer data; based on preset question-and-answer constraint rules, the expanded sample question-and-answer data is verified and semantic conflict filtered to obtain training data.
[0222] In some embodiments, the language model to be trained includes the Qwen3-8B model. During the training process of the language model to be trained, the query module 550 can update the language model to be trained using any of the following methods: updating the model parameters of the language model to be trained using the low-rank adaptation (LoRA) method; constructing a preference data pair consisting of expert query results and model query results using expert question-and-answer data, and iteratively updating the model parameters of the language model to be trained based on the preference loss of the expert query results and model query results; masking domain entities in the energy storage vertical domain using unlabeled energy storage business data, controlling the language model to be trained to predict the masked domain entities, and iteratively updating the model parameters of the language model to be trained based on the prediction results.
[0223] The data processing apparatus provided in this application embodiment can execute the methods shown in the above method embodiments. Its implementation principle and beneficial effects can be found in the relevant descriptions in the method embodiments, and will not be repeated here. Furthermore, each module in the above data processing apparatus can be implemented entirely or partially through software, hardware, or a combination thereof. Each module can be embedded in or independent of the processor in the electronic device in hardware form, or stored in the memory of the electronic device in software form, so that the processor can call and execute the operations corresponding to each module.
[0224] In other embodiments, an electronic device is provided for executing the method steps performed by the electronic device in the above method flow. The hardware structure diagram of this electronic device can be as follows: Figure 6 As shown, it includes a processor, memory, input / output interface, communication interface, display unit, and input device.
[0225] The processor, memory, and input / output interface are connected via a system bus, while the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements the data processing method described in the above embodiments. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display (LCD) or an e-ink display. The input device can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the device's casing, or an external keyboard, touchpad, or mouse.
[0226] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0227] In some embodiments, an electronic device includes a memory, a processor, and a communication interface. The communication interface is used to interact with other devices to send and receive data. For example, in this embodiment, the communication interface can specifically be used for communication. The memory stores computer program code, which includes computer instructions. These computer instructions run in the electronic device to implement the method shown in the above-described method embodiments. For example, the memory may include high-speed random access memory (RAM), and may also include non-volatile memory (NVM), such as at least one disk storage device, or a USB flash drive, portable hard drive, read-only memory, disk, or optical disk, etc.
[0228] The processor can be a general-purpose processor, including a Central Processing Unit (CPU), a network processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The processor can also be other general-purpose processors. A general-purpose processor can be a microprocessor or any conventional processor.
[0229] Memory, communication interfaces, and processor communication connections. For example, memory and communication interfaces can connect to the processor via the system bus and communicate with each other. The system bus can be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, an Industry Standard Architecture (ISA) bus, etc. The system bus can be divided into address bus, data bus, control bus, etc. For ease of representation, only one thick line is used in the diagram, but this does not indicate that there is only one bus or one type of bus.
[0230] Alternatively, the memory can be either standalone or integrated with the processor. When the memory is set up independently, it is connected to the processor via the system bus.
[0231] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium, and when the at least one processor executes the computer program, it can implement the technical solution of the data processing method in the above embodiments.
[0232] The aforementioned computer-readable storage media can be implemented using any type of volatile or non-volatile storage device or a combination thereof. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), etc.
[0233] Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can take many forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). Computer-readable storage media may be any available medium accessible to general-purpose or special-purpose computers.
[0234] An exemplary computer-readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Of course, the computer-readable storage medium can also be a component of the processor. The processor and the computer-readable storage medium can reside in an application-specific integrated circuit (ASIC). Alternatively, the processor and the computer-readable storage medium can exist as discrete components in an electronic control unit or main control device; this application does not limit this.
[0235] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or modules, and may be electrical, mechanical, or other forms.
[0236] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to implement the solution of this embodiment according to actual needs.
[0237] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The unit composed of the above modules can be implemented in hardware or in the form of hardware plus software functional units.
[0238] The integrated modules described above, implemented as software functional modules, can be stored in a computer-readable storage medium. These software functional modules, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods of the various embodiments of this application.
[0239] It should be understood that the steps of the method disclosed in the embodiments of this application can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
[0240] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0241] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification. The above embodiments only illustrate several implementation methods of this application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of this application. It should be noted that for those skilled in the art, several modifications and improvements can be made without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
[0242] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A data processing method, characterized in that, The method includes: Retrieve query information; Extract the target terms from the energy storage vertical domain in the query information, and convert the target terms into a target term vector; When the query information includes target table data, the target table data is serialized and encoded to obtain target serialized data. The target serialized data is used to retain key structural information in the target table data, and the target table data is energy storage vertical domain data. If the query information includes target detection parameters in the energy storage vertical domain, the target detection parameters and the pre-acquired compliance judgment rules in the energy storage vertical domain are correlated and matched and checked for compliance, so as to obtain the target correlation check result. The query information and target transformation information are input into the target language model to obtain the target query result corresponding to the query information; wherein, the target transformation information includes the target term vector; or, the target transformation information includes the target term vector, the target serialization data and / or the target association check result.
2. The method according to claim 1, characterized in that, The step of extracting target terms from the energy storage vertical domain in the query information and converting the target terms into target term vectors includes: The target terms in the energy storage vertical domain of the query information are extracted by a pre-trained vector model, and the target terms are converted into target term vectors. The step of serializing and encoding the target table data to obtain target serialized data includes: Static parsing is performed on the target table data to determine at least one of the following: the starting position of the merged cells in the target table data, the boundary of the mapping area spanning rows and columns in the target table data, and the time series features in the target table data. Based on at least one of the following: the starting position of the merged cell, the boundary of the cross-row / column mapping area, and the time series feature, the target table data is serialized and encoded. Coordinate identifiers are injected into the encoded data, and a table header path label and a time series feature are added to each data unit to generate the target serialized data. The key structural information includes at least one of the following: the starting position of the merged cell in the target table data, the boundary of the cross-row / column mapping area, the time series feature, the coordinate identifier, and the table header path label and time series feature of each data unit. The process of performing correlation matching and compliance checks on the target detection parameters and pre-acquired compliance judgment rules in the energy storage vertical domain to obtain target correlation check results includes: The target detection parameters are subjected to association matching and compliance checks using a set of logical expressions to obtain the target association check results; The set of logical expressions is obtained by transforming the target standard criteria, which are the corresponding standard rules retrieved from the compliance judgment rules in the pre-acquired energy storage vertical domain based on the target detection parameters.
3. The method according to claim 1, characterized in that, The query information is used to check for anomalies. The step of inputting the query information and target transformation information into the target language model to obtain the target query result corresponding to the query information includes: The query information and the target transformation information are input into the target language model, and the target language model is used to analyze whether there are any anomalies. In the event of an anomaly, an early warning message is generated, and the target query result includes the early warning message; The anomaly includes any one or more of the following: The detection item corresponding to the query information or the target conversion information does not match the device type, and the detection item includes detection parameters or detection values; The detection value corresponding to the query information or the target conversion information exceeds the preset threshold range of the corresponding specification; The temporal pattern of the multiple sets of detection data corresponding to the target conversion information does not match the operating pattern of the corresponding equipment; The terminology in the query information or the target conversion information is misunderstood; There is a missing key data in the query information or the target conversion information.
4. The method according to claim 1, characterized in that, After obtaining the target serialized data, the method further includes: Establish a mapping relationship between the target serialized data and the target tabular data; Semantic analysis of target detection parameters in the target serialized data is performed using the target language model. When the attention weight of the target detection parameter in the target language model is greater than the weight threshold, the target detection parameter is reverse-addressed according to the mapping relationship to determine the position of the target detection parameter in the target table data, and the target query result includes the position of the associated target detection parameter in the target table data.
5. The method according to claim 1, characterized in that, The target language model was trained using the following method: Acquire training data and knowledge data of the energy storage vertical field. The training data includes query information and query results corresponding to the query information. The knowledge data includes terminology knowledge text data, tabular data and standard specification documents of the energy storage vertical field. The tabular data is used to store complex structured data in the energy storage vertical field. The standard specification documents are used to store equipment testing parameters and compliance judgment rules in the energy storage vertical field. Extract terms from the terminology knowledge text data and convert the terms into term vectors; The table data is serialized and encoded so that the serialized data obtained after serialization and encoding retains the key structural information in the table data; The device detection parameters and compliance judgment rules are correlated and matched, and compliance checks are performed to obtain the correlation check results corresponding to the standard specification documents; The query information and the knowledge transformation information corresponding to the knowledge data are input into the language model to be trained to obtain the predicted query result corresponding to the query information. The language model to be trained is updated according to the predicted query result and the query result corresponding to the query information. The update is iterated until the preset convergence condition is met to obtain the target language model. The knowledge transformation information includes at least one of the term vector, the serialized data, and the association check result.
6. The method according to claim 5, characterized in that, The step of extracting terms from the terminology knowledge text data and converting the terms into term vectors includes: Terms are extracted from the terminology knowledge text data, and a term relationship subgraph is constructed based on the terms. The term relationship subgraph is used to represent the association between terms and attributes. The term pairs in the term relation subgraph are constructed as hard negative samples, and the vectorized model is trained with contrast constraints to obtain a pre-trained vectorized model. The term pairs include multiple terms in the term relation subgraph whose numerical differences are less than a preset threshold and / or whose physical meanings are similar. The vectorized model includes a dual-tower deep structured semantic model DSSM based on a Transformer-based bidirectional encoder representing the BERT architecture. The terms in the term relation subgraph are converted into term vectors using the pre-trained vectorization model.
7. The method according to claim 5, characterized in that, The equipment testing parameters include one or more of the following: technical parameters, threshold ranges, applicable operating conditions, testing items, and applicable equipment rules; the process of performing correlation matching and compliance checks on the equipment testing parameters and the compliance judgment rules to obtain the correlation check results corresponding to the standard specification document includes: The language model to be trained is invoked to convert the device detection parameters into serialized detection data, and entity features in the device detection parameters are extracted from the serialized detection data. The entity features include the device in the device detection parameters, the detection items corresponding to the device, and the detection measurement data corresponding to the detection items. Using the device and the corresponding detection items as query vectors, the corresponding standard rules are retrieved from the vector database corresponding to the compliance determination rules. The standard rules are converted into a set of logical expressions, and the set of logical expressions is used to make a compliance judgment on the testing and measurement data corresponding to the testing items to obtain the associated inspection results. The associated inspection results include at least one of the following: equipment information of the device, whether the corresponding testing and measurement data of the device is compliant data, and standard rules for determining whether the testing and measurement data is compliant data.
8. The method according to claim 5, characterized in that, The method further includes: Using the basic corpus data in the energy storage vertical domain, a corpus entity library is constructed; Based on the corpus entity database and the knowledge relationship template in the energy storage vertical domain, a few-shot learning method is used to expand the query information and the query results corresponding to the pre-acquired sample question and answer data to obtain expanded sample question and answer data. Based on preset question-and-answer constraint rules, the expanded sample question-and-answer data is verified and semantic conflict filtered to obtain the training data.
9. The method according to claim 5, characterized in that, The language model to be trained includes the Qwen3-8B model. During the training process of the language model to be trained, the language model to be trained is updated using any of the following methods: The model parameters of the language model to be trained are updated using the low-rank adaptation LoRA method. Using expert question-and-answer data, a preference data pair consisting of expert query results and model query results is constructed, and the model parameters of the language model to be trained are iteratively updated based on the preference loss of the expert query results and the model query results. Using unlabeled energy storage business data, domain entities in the energy storage vertical domain are masked, the language model to be trained is controlled to predict the masked domain entities, and the model parameters of the language model to be trained are iteratively updated based on the prediction results.
10. An electronic device, characterized in that, include: The electronic device includes a memory and at least one processor; the memory is communicatively connected to the processor; the memory is used to store computer program code, the computer program code including computer instructions; when the processor executes the computer instructions, the electronic device performs the data processing method as described in any one of claims 1-9.