Instruction checking method and device based on semantic matching, terminal equipment and storage medium
Through the instruction verification method based on semantic matching, the semantic embedding vector is generated by using the instruction verification model, which solves the problem of undetected semantic deviation in traditional technology and improves the accuracy of dispatch instruction verification and the safety of the power system.
Patent Information
- Application Number
- CN202510936370.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-08
- Publication Date
- 2025-10-24
AI Technical Summary
Traditional dispatch instruction verification technology relies on rule matching or keyword comparison, which cannot deeply understand the semantic connotation of the instructions, resulting in semantic deviations not being discovered in time, affecting the safe operation of the power system.
An instruction verification method based on semantic matching is adopted. The semantic information of scheduling instructions is captured through the instruction verification model, a semantic embedding vector is generated, the semantic deviation degree is calculated, and a verification prompt message is generated when the deviation exceeds the threshold.
It achieves deep semantic analysis of dispatch instructions, improves verification accuracy, timely detects and corrects semantic deviations, and ensures the safe and stable operation of the power system.
Smart Images

Figure CN120832169A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of instruction verification technology, and in particular to an instruction verification method, apparatus, terminal device, and storage medium based on semantic matching. Background Technology
[0002] Dispatch instruction verification is a crucial step in ensuring the accuracy of dispatch operations in power systems and other fields. By verifying dispatch instructions, operational errors caused by instruction deviations can be avoided, ensuring stable system operation. However, traditional dispatch instruction verification techniques often rely on rule matching or simple keyword comparison methods. These methods typically only compare and verify the current dispatch instruction with the original instruction based on the textual form of the instruction or a limited set of keywords.
[0003] Traditional techniques rely on pre-defined rule bases or keyword sets, failing to deeply understand the semantic meaning of instructions. When instructions contain synonym substitutions or sentence structure adjustments, traditional methods may not detect actual semantic deviations due to the lack of matching pre-defined rules or keywords. This results in erroneous scheduling instructions not being detected and corrected in a timely manner. Furthermore, because traditional techniques rely solely on rule and keyword comparisons and cannot deeply understand semantics, the accuracy of instruction verification is low, potentially leading to system malfunctions, equipment damage, or even affecting the safe operation of the entire system. Summary of the Invention
[0004] This invention provides a semantic matching-based instruction verification method, apparatus, terminal device, and storage medium, which can perform deep analysis and understanding of the semantic level of instructions, thereby discovering whether there are semantic deviations in the current scheduling instructions, improving the accuracy of instruction verification, and effectively solving the problem that the accuracy of instruction verification is low in the prior art because it relies on rule and keyword comparison, which cannot deeply understand the semantics between instructions.
[0005] One embodiment of the present invention provides an instruction verification method based on semantic matching, comprising:
[0006] Obtain the current scheduling instruction and the original scheduling instruction corresponding to the current scheduling instruction;
[0007] The current scheduling instruction and the original scheduling instruction are input into a preset instruction verification model, so that the instruction verification model captures the semantic information of the current scheduling instruction and generates a first semantic embedding vector; captures the semantic information of the original scheduling instruction and generates a second semantic embedding vector; and generates the semantic deviation degree between the current scheduling instruction and the original scheduling instruction based on the first semantic embedding vector and the second semantic embedding vector.
[0008] When the semantic deviation is determined to be greater than a preset semantic deviation threshold, a first verification prompt message is generated to indicate that the current scheduling instruction has a semantic deviation.
[0009] When it is determined that the semantic deviation is not greater than a preset semantic deviation threshold, a second verification prompt message is generated to indicate that the current scheduling instruction does not have a semantic deviation.
[0010] Preferably, the first semantic embedding vector includes: a first subject embedding vector, a first action embedding vector, a first target embedding vector, a first time embedding vector, and a first execution condition embedding vector;
[0011] The instruction verification model captures the semantic information of the current scheduling instruction and generates a first semantic embedding vector, including:
[0012] The instruction verification model segments the current scheduling instruction into words, generating several first words;
[0013] Semantic analysis of each first word is performed using a self-attention mechanism to generate first grammatical association features between first words;
[0014] Extract the first global context information corresponding to the current scheduling instruction;
[0015] Based on the first grammatical association features and the first global context information, several first words are integrated to generate a first global semantic embedding;
[0016] According to different preset semantic elements, the first global semantic embedding is decomposed into a first subject embedding vector, a first action embedding vector, a first target embedding vector, a first time embedding vector, and a first execution condition embedding vector.
[0017] Preferably, the second semantic embedding vector includes: a second subject embedding vector, a second action embedding vector, a second target embedding vector, a second time embedding vector, and a second execution condition embedding vector;
[0018] The step of generating the semantic deviation between the current scheduling instruction and the original scheduling instruction based on the first semantic embedding vector and the second semantic embedding vector includes:
[0019] Based on the semantic element type, the first subject embedding vector, the first action embedding vector, the first target embedding vector, the first time embedding vector, the first execution condition embedding vector, the second subject embedding vector, the second action embedding vector, the second target embedding vector, the second time embedding vector, and the second execution condition embedding vector are grouped to generate several element groups; wherein, the element groups include: subject element group, action element group, target element group, time element group, or execution condition element group.
[0020] For each feature group, semantic alignment weights are generated based on a preset weight matrix and a normalization function; wherein, the semantic alignment weights are used to quantify the degree of matching between two embedding vectors in the semantic space; and the preset weight matrix is used to project the embedding vectors onto the same semantic space.
[0021] The semantic deviation between the current scheduling instruction and the original scheduling instruction is generated by weighted summation based on the semantic alignment weights of each element group.
[0022] Preferably, after generating the first verification prompt message, the method further includes:
[0023] Obtain the scheduling instruction sequence corresponding to the current scheduling instruction in the current scheduling scenario; wherein, the scheduling instruction sequence includes the current scheduling instruction and several different flow instructions;
[0024] The scheduling instruction sequence is input into the conflict detection model so that the conflict detection model can capture the semantic information corresponding to each flow instruction and generate a third semantic embedding vector corresponding to each flow instruction.
[0025] Based on the context-aware module in the instruction verification model, the contextual dependency relationship between the first semantic embedding vector and each third semantic embedding vector of the current scheduling instruction is captured.
[0026] Based on the context dependencies, global semantic information corresponding to the scheduling instruction sequence is generated;
[0027] For each third semantic embedding vector, based on the global semantic information, logical conflict detection is performed on the first semantic embedding vector and the third semantic embedding vector of the current scheduling instruction, and the conflict detection result is output; wherein, the conflict detection result includes: there is a logical conflict between the current scheduling instruction and the transfer instruction, or there is no logical conflict between the current scheduling instruction and the transfer instruction;
[0028] When any conflict detection result indicates a logical conflict between the current scheduling instruction and the transfer instruction, a third verification prompt is generated to indicate that there is a logical conflict between the current scheduling instruction and the transfer instruction.
[0029] Preferably, after generating the third semantic embedding vector corresponding to each flow instruction, the method further includes:
[0030] The third semantic embedding vector corresponding to each flow instruction and the first semantic embedding vector corresponding to the current scheduling instruction are input into the similarity prediction model so that the similarity prediction model predicts the cosine similarity between the current scheduling instruction and the flow instruction for each flow instruction based on the third semantic embedding vector corresponding to the flow instruction and the first semantic embedding vector corresponding to the current scheduling instruction.
[0031] For each cosine similarity, determine whether the cosine similarity is less than a preset similarity threshold;
[0032] If so, the current scheduling instruction is matched with the business rules in the preset rule base. If it is determined that the current scheduling instruction does not meet the business rules, a warning message is generated to indicate that the execution permission of the current scheduling instruction needs to be locked. If it is determined that the current scheduling instruction meets the business rules, a fourth verification prompt message is generated to indicate that the current scheduling instruction and the flow instruction have semantic inconsistencies but are legal. The business rules include: syntax rules, logic rules, vocabulary abbreviation rules or semantic equivalence rules.
[0033] If not, no prompt message will be generated.
[0034] Preferably, the generation of the instruction verification model includes:
[0035] The scheduling instruction sample and the original scheduling instruction sample corresponding to the scheduling instruction sample are used as training samples;
[0036] The instruction verification model is iteratively trained using several training samples and the actual semantic deviation of each training sample as input, and the predicted semantic deviation of each training sample as output, until the model converges, thus generating the preset instruction verification model.
[0037] Preferably, when training the instruction verification model, the prediction error of the instruction verification model is minimized by the following loss function:
[0038]
[0039] Where Γ is the loss calculation function, TrainingSet represents the training samples, and V s样本 V represents a scheduling instruction sample in the training samples. t样本 V represents the training samples s样本 The corresponding original scheduling instruction sample, Similarity(V) s样本 V t样本 ) represents V t样本 With V s样本 The predicted semantic bias between the two, where Label is the true label, representing V t样本 With V s样本 The actual semantic deviation between them.
[0040] Based on the above method embodiments, the present invention provides corresponding apparatus embodiments.
[0041] An embodiment of the present invention provides an instruction verification device based on semantic matching, comprising: a scheduling instruction acquisition module, a semantic deviation generation module, and a verification prompt information generation module;
[0042] The scheduling instruction acquisition module is used to acquire the current scheduling instruction and the original scheduling instruction corresponding to the current scheduling instruction.
[0043] The semantic deviation generation module is used to input the current scheduling instruction and the original scheduling instruction into a preset instruction verification model, so that the instruction verification model captures the semantic information of the current scheduling instruction and generates a first semantic embedding vector; captures the semantic information of the original scheduling instruction and generates a second semantic embedding vector; and generates the semantic deviation between the current scheduling instruction and the original scheduling instruction based on the first semantic embedding vector and the second semantic embedding vector.
[0044] The verification prompt information generation module is used to generate a first verification prompt information to indicate that the current scheduling instruction has a semantic deviation when it is determined that the semantic deviation degree is greater than a preset semantic deviation threshold.
[0045] When it is determined that the semantic deviation is not greater than a preset semantic deviation threshold, a second verification prompt message is generated to indicate that the current scheduling instruction does not have a semantic deviation.
[0046] Based on the above method embodiments, the present invention provides corresponding terminal device embodiments.
[0047] Another embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the instruction verification method based on semantic matching described in the above-described embodiment of the invention.
[0048] Based on the above method embodiments, the present invention provides corresponding storage medium embodiments.
[0049] Another embodiment of the present invention provides a storage medium, the computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute the instruction verification method based on semantic matching described in the above-described embodiment of the invention.
[0050] The following benefits can be obtained by implementing the present invention:
[0051] This invention provides a semantic matching-based instruction verification method, apparatus, terminal device, and storage medium. The invention inputs the current scheduling instruction and the original scheduling instruction into a preset instruction verification model, allowing the model to capture the semantic information of both instructions, resulting in multiple different semantic embedding vectors. By comparing these vectors, the semantic deviation between the current and original instructions is determined. It is understood that this deviation reflects the semantic consistency of the instructions, rather than the matching degree of the textual form. Furthermore, when the semantic deviation is determined to be greater than a preset semantic deviation threshold, a first verification prompt message is generated to indicate that the current scheduling instruction has a semantic deviation; when the semantic deviation is determined to be less than the preset threshold, a second verification prompt message is generated to indicate that the current scheduling instruction does not have a semantic deviation. This allows for timely reminders to scheduling personnel to correct instructions with semantic deviations, ensuring the safe and stable operation of the scheduling scenario. Compared with existing technologies, this invention generates deviation degree through semantic embedding vector analysis, which can realize in-depth analysis and understanding of the semantic level of instructions, thereby discovering whether there are actual semantic deviations in the current scheduling instructions. This invention can identify semantic deviations that traditional technologies cannot detect, accurately identify semantic differences between instructions, improve the accuracy of instruction verification, and fundamentally enhance the safety and reliability of scheduling operations in fields such as power systems. Attached Figure Description
[0052] Figure 1 This is a flowchart illustrating an instruction verification method based on semantic matching provided in an embodiment of the present invention.
[0053] Figure 2 A schematic diagram of the structure of an instruction verification device based on semantic matching is provided in one embodiment of the present invention. Detailed Implementation
[0054] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0055] like Figure 1 As shown, to address the problem that existing technologies rely solely on rule and keyword comparison, which lacks a deep understanding of semantics and leads to low accuracy in instruction verification, potentially causing system malfunctions, equipment damage, or even affecting the safe operation of the entire system, an embodiment of this invention provides an instruction verification method based on semantic matching, comprising:
[0056] Step S1: Obtain the current scheduling instruction and the original scheduling instruction corresponding to the current scheduling instruction;
[0057] To illustrate, in dispatching scenarios such as power systems, dispatching instructions are usually issued in text form. The current dispatching instruction refers to the instruction to be verified before actual execution, while the original dispatching instruction is a pre-defined standard instruction, such as a dispatching plan or a historically correct instruction.
[0058] In this embodiment of the invention, the text content of two instructions can be read through a system interface or database, providing a data foundation for subsequent semantic analysis.
[0059] Step S2: Input the current scheduling instruction and the original scheduling instruction into a preset instruction verification model, so that the instruction verification model captures the semantic information of the current scheduling instruction and generates a first semantic embedding vector; captures the semantic information of the original scheduling instruction and generates a second semantic embedding vector; and generates the semantic deviation degree between the current scheduling instruction and the original scheduling instruction based on the first semantic embedding vector and the second semantic embedding vector.
[0060] Indicatively, the instruction verification model can perform semantic parsing on the instruction text of the current scheduling instruction and the original scheduling instruction through a multi-layer neural network. For example, the instruction can be split into multiple lexical units according to its semantics, and the semantic meaning of each professional term or word in the lexical unit can be captured by pre-trained word vectors, thereby generating a multi-dimensional first semantic embedding vector (current scheduling instruction) and a second semantic embedding vector (original scheduling instruction). Each embedding vector can represent the semantic connotation of the instruction in a high-dimensional numerical form.
[0061] Furthermore, in this embodiment, algorithms such as cosine similarity and Euclidean distance can be used to compare the first semantic embedding vector and the second semantic embedding vector to generate a semantic deviation in the 0-1 range, such as a semantic deviation of 0.8.
[0062] This invention uses an instruction verification model to achieve semantic vector matching between instructions rather than keyword matching, thereby obtaining the semantic deviation between two instructions, providing an objective basis for subsequent prompts and avoiding the subjectivity of human judgment.
[0063] Step S3: When it is determined that the semantic deviation is greater than the preset semantic deviation threshold, a first verification prompt message is generated to characterize that the current scheduling instruction has a semantic deviation;
[0064] When it is determined that the semantic deviation is not greater than a preset semantic deviation threshold, a second verification prompt message is generated to indicate that the current scheduling instruction does not have a semantic deviation.
[0065] As an illustration, the present invention can generate different verification prompts based on different degrees of deviation, and the preset semantic deviation threshold is a semantically acceptable critical value.
[0066] Therefore, this invention can upgrade the verification of dispatch instructions from textual form to semantic verification, solving the accuracy problem caused by insufficient semantic understanding in traditional technologies, and providing technical protection for dispatch security in key areas such as power systems.
[0067] For step S1, in a preferred embodiment, the present invention can obtain two key instructions from the scheduling system: the current scheduling instruction and the instruction in actual execution / flow, such as: the district scheduling center executes a power outage on transformer A;
[0068] Original dispatch instructions: Baseline / source instructions, such as the dispatch center performing a power outage operation on transformer A.
[0069] Indicatively, the original instruction is the anchor point for correct semantics, and the current scheduling instruction is the object to be verified. By comparing the two, we can find out if there are semantic discrepancies, such as whether the semantics of transformer A is equivalent to transformer A.
[0070] For step S2, in a preferred embodiment, the present invention can convert two instructions into semantic embedding vectors (first and second semantic embedding vectors) by using a preset instruction verification model. The semantic embedding vectors can encode the vocabulary, grammar, and contextual semantics of the instructions (such as the power operation meaning of "power outage" and the equipment attribute of "transformer A"). By comparing the two semantic embedding vectors, the semantic deviation between the two can be calculated. The closer the semantic deviation is to 1, the greater the deviation; the closer the semantic deviation is to 0, the more consistent the semantics.
[0071] In a preferred embodiment, the first semantic embedding vector includes: a first subject embedding vector, a first action embedding vector, a first target embedding vector, a first time embedding vector, and a first execution condition embedding vector;
[0072] The second semantic embedding vector includes: a second subject embedding vector, a second action embedding vector, a second target embedding vector, a second time embedding vector, and a second execution condition embedding vector.
[0073] Therefore, by using the instruction verification model to capture semantic information and generate semantic embedding vectors, we have:
[0074] The instruction verification model captures the semantic information of the current scheduling instruction and generates a first semantic embedding vector, including:
[0075] The instruction verification model segments the current scheduling instruction into words, generating several first words;
[0076] Semantic analysis of each first word is performed using a self-attention mechanism to generate first grammatical association features between first words;
[0077] Extract the first global context information corresponding to the current scheduling instruction;
[0078] Based on the first grammatical association features and the first global context information, several first words are integrated to generate a first global semantic embedding;
[0079] According to different preset semantic elements, the first global semantic embedding is decomposed into a first subject embedding vector, a first action embedding vector, a first target embedding vector, a first time embedding vector, and a first execution condition embedding vector.
[0080] Furthermore, the instruction verification model can also segment the original scheduling instruction into words to generate several second words;
[0081] Semantic analysis of each second word is performed using a self-attention mechanism to generate second grammatical association features between second words;
[0082] Extract the second global context information corresponding to the current scheduling instruction;
[0083] Based on the second grammatical association features and the second global context information, several second words are integrated to generate a second global semantic embedding;
[0084] According to different preset semantic elements, the second global semantic embedding is decomposed into a second subject embedding vector, a second action embedding vector, a second target embedding vector, a second time embedding vector, and a second execution condition embedding vector.
[0085] Specifically, this invention can break down the current dispatch instruction (such as "The district dispatch center will perform a power outage operation on transformer A on 2025-01-06 due to maintenance needs") into independent word units (first words), for example, into ["District Dispatch Center", "on", "2025-06-06", "on", "transformer A", "execute", "power outage operation", "maintenance needs"]. Thus, this invention can break down continuous text into the smallest unit that the model can process, facilitating word-by-word understanding.
[0086] Furthermore, a self-attention mechanism is used to analyze the dependencies between the first words and generate the first grammatical association features. For example, in the ["District Dispatch Center", "Execution", "Power Outage Operation"], "District Dispatch Center" is the subject (the initiator of the execution action), "Execution" is the action, and "Power Outage Operation" is the target. The three form a "subject-action-target" grammatical structure. Then, self-attention can accurately capture the grammatical associations, allowing for a deeper semantic understanding.
[0087] Furthermore, the first global context information can be extracted by combining the complete context of the instruction. For example, "2025-06-06" in the instruction makes the semantics of "power outage operation" more specific, that is, the global semantics of the planned power outage operation on that date can be derived. Since the same word has different semantics in different contexts, extracting the global context can eliminate ambiguity and make semantic encoding more accurate.
[0088] Finally, the syntactic association features (logic between words) and "global contextual information" (context) can be fused to generate the first global semantic embedding, which outputs a high-dimensional vector (e.g., 768-dimensional) that encodes all the semantic details of the instruction.
[0089] The global semantic embedding is decomposed according to preset semantic elements (such as subject, action, target, time, execution conditions) to obtain the first subject embedding vector (encoding the semantics of "district dispatch center"), the first action embedding vector (encoding the semantics of "execution"), etc., so that when comparing semantic deviations later, it can be fine-grained to dimensions such as "whether the subject is consistent" and "whether the action has changed", instead of only looking at the global picture.
[0090] In a preferred embodiment, during the semantic embedding representation process, each instruction is decomposed into multiple semantic elements (subject, action, target, time, condition). For example, if there is an instruction "Device A performs a periodic check on May 14, 2025 due to maintenance needs", it can be decomposed into: Subject: Device A; Action: Start; Target: Periodic check; Time: May 14, 2025; Condition: Maintenance needs.
[0091] In a preferred embodiment, to achieve high-precision and fine-grained analysis of instruction semantic verification, the present invention first converts the instruction text into semantic vectors. This can be achieved through a deep learning model, specifically an instruction verification model, which captures multi-layered semantic information within the instruction. The instruction verification model can be a BERT model. BERT (Bidirectional Encoder Representations from Transformers) is a pre-trained language model based on the Transformer architecture.
[0092] Specifically, the BERT model can be used to semantically represent the entire instruction, generating a global semantic embedding:
[0093] V s =f BERT (S,A,O,T,C);
[0094] Among them, V sIt is the semantic embedding vector of the instruction, where S, A, O, T, and C represent semantic elements such as subject, action, object, time, and condition, respectively.
[0095] The BERT model can perform semantic modeling on the input instruction text through a multi-layer Transformer structure, capturing lexical, syntactic relationships, and contextual information, thereby generating a high-dimensional vector representation V. s global semantic embedding
[0096] To facilitate subsequent fine-grained analysis, this invention can also embed global semantics into V. s Decomposed into multiple parts according to semantic elements:
[0097] V S =[V s' V A V O V T V C ]
[0098] Among them, V s' V A V O V T V C These represent the embedding vectors for the subject, action, target, time, and condition, respectively, such as the first subject embedding vector, the first action embedding vector, the first target embedding vector, the first time embedding vector, and the first execution condition embedding vector.
[0099] The decomposed embedding vectors allow for fine-grained analysis of each semantic element, thus avoiding the ambiguity caused by simple overall matching.
[0100] Schematic illustration: To ensure consistency of semantic vectors, this invention can further modify V. s Standardize:
[0101]
[0102] Among them, V s 'For V s After standardization, this invention can eliminate the influence of numerical magnitude between different dimensions by standardizing the vectors, ensuring that each instruction has a unified representation standard in the semantic vector space, making the subsequent semantic deviation calculation more accurate.
[0103] In a preferred embodiment, the generation of the instruction verification model includes:
[0104] The scheduling instruction sample and the original scheduling instruction sample corresponding to the scheduling instruction sample are used as training samples;
[0105] The instruction verification model is iteratively trained using several training samples and the actual semantic deviation of each training sample as input, and the predicted semantic deviation of each training sample as output, until the model converges, thus generating the preset instruction verification model.
[0106] Specifically, when training the instruction verification model, the prediction error of the instruction verification model is minimized using the following loss function:
[0107]
[0108] Where Γ is the loss calculation function, TrainingSet represents the training samples, and V s样本 V represents a scheduling instruction sample in the training samples. t样本 V represents the training samples s样本 The corresponding original scheduling instruction sample, Similarity(V) s样本 V t样本 ) represents V t样本 With V s样本 The predicted semantic bias between the two, where Label is the true label, representing V t样本 With V s样本 The actual semantic deviation between them.
[0109] Indicatively, each training sample contains a pair of instructions (current scheduling instruction S + original scheduling instruction T) and their actual semantic deviation (obtained through manual annotation or authoritative calculation). This invention can collect scheduling instruction samples and their corresponding original instructions to form training sample pairs; use a loss function to guide model optimization, making the predicted deviation approximate the actual deviation; and through iterative training until the model performance stabilizes, generate an instruction verification model that can be used for practical verification.
[0110] Understandably, by analyzing the matching data in historical instruction flow records, a set of instruction pairs containing correct and incorrect matches is generated. Correct instruction pairs refer to semantically consistent flow instructions, while incorrect instruction pairs result in semantic inconsistencies due to semantic deviations or erroneous modifications. This dynamic training set provides diverse training data for the instruction verification model, improving the accuracy and robustness of semantic consistency verification. Furthermore, supervised learning methods can be used to optimize the parameters of the instruction verification model.
[0111] As an illustration, the accuracy of semantic matching depends on the quality of the algorithm model, and scheduling instructions in different domains may have different expression habits or rules. To improve the accuracy of semantic matching, this invention can use adaptive learning technology to continuously optimize the instruction verification model by combining historical data.
[0112] In a preferred embodiment, generating the semantic deviation between the current scheduling instruction and the original scheduling instruction specifically includes:
[0113] Based on the semantic element type, the first subject embedding vector, the first action embedding vector, the first target embedding vector, the first time embedding vector, the first execution condition embedding vector, the second subject embedding vector, the second action embedding vector, the second target embedding vector, the second time embedding vector, and the second execution condition embedding vector are grouped to generate several element groups; wherein, the element groups include: subject element group, action element group, target element group, time element group, or execution condition element group.
[0114] For each feature group, semantic alignment weights are generated based on a preset weight matrix and a normalization function; wherein, the semantic alignment weights are used to quantify the degree of matching between two embedding vectors in the semantic space; and the preset weight matrix is used to project the embedding vectors onto the same semantic space.
[0115] The semantic deviation between the current scheduling instruction and the original scheduling instruction is generated by weighted summation based on the semantic alignment weights of each element group.
[0116] Indicatively, the grouping logic of this invention is as follows: based on semantic element types (subject, action, target, time, execution condition), the current scheduling instruction is paired with each embedding vector of the original scheduling instruction to form element groups. For example: subject element group: [first subject embedding vector, second subject embedding vector]; action element group: [first action embedding vector, second action embedding vector], and so on, generating a total of 5 element groups.
[0117] For each feature group, the alignment weights of the feature group are calculated using a preset weight matrix W and a normalization function (such as softmax). Taking the main feature group as an example:
[0118] The first and second subject vectors are projected onto the same semantic space through a preset weight matrix W. The similarity of the projected vectors is measured by dot product or cosine similarity. The similarity is converted into probabilistic alignment weights by the softmax function, which ranges from [0,1]. The higher the value, the better the matching of the subject elements.
[0119] The alignment weights of each element group are weighted and summed according to preset weight coefficients (such as subject 0.3, action 0.3, target 0.2, time 0.1, condition 0.1) to obtain the semantic deviation degree. The closer the semantic deviation degree is to 1, the greater the semantic difference.
[0120] By assigning different weights to different elements (e.g., the weight of action and target elements is higher than that of time elements), priority can be given to the semantic parts that have a greater impact on dispatch safety. In power dispatch, the deviation between "action (closing / power outage)" and "target (equipment name)" may cause safety accidents, so they can be given higher weights. Meanwhile, the deviation of "time" is more tolerable, so it has a lower weight.
[0121] Regardless of whether the instructions are converted from text, speech, or images, such as generating a unified embedding vector after multimodal fusion, feature-level grouping computation can ensure that instructions from different modalities can be compared according to the same logic.
[0122] Furthermore, the preset weight matrix W of the present invention can be dynamically adjusted through historical data. When new business rules appear (such as adding a new device type), the model can automatically optimize the element matching logic and improve long-term applicability.
[0123] Specifically, this invention can use the BiDAF (Bidirectional Attention Flow) mechanism to calculate the semantic alignment weight α between two instructions through cross-modeling. ij :
[0124]
[0125] in, For V s,i The transpose of V s,i and V t,j Let represent the embedding vectors of the i-th and j-th semantic elements in the current scheduling instruction and the original scheduling instruction, respectively. W is a learnable weight matrix used to project the embedding vectors onto the alignment space. α ij This represents the semantic alignment weight between the i-th embedding vector and the j-th embedding vector.
[0126] Based on the semantic alignment weight α obtained above ij An alignment matrix M can be constructed, whose elements are the alignment weights of each feature group, when α ij A higher value indicates a higher degree of matching between the i-th embedding vector of the current scheduling instruction and the j-th embedding vector of the historical scheduling instruction. ij A low value indicates a possible semantic bias.
[0127] For step S3, in a preferred embodiment, when the preset semantic deviation threshold is 0.5, if the semantic deviation degree (e.g., 0.6) > the threshold, a first verification prompt message is generated, such as "The current instruction has a semantic deviation from the original instruction, please check!";
[0128] If the semantic deviation (e.g., 0.4) is less than or equal to the preset semantic deviation threshold, a second verification prompt message (e.g., "The instruction is semantically consistent and can be executed") is generated to enable the dispatcher to confirm the accuracy of the instruction.
[0129] In a preferred embodiment, in a complex multi-level scheduling environment, analyzing the semantic consistency of each instruction with the original instruction in isolation may overlook the contextual relationships between instructions. To ensure the rationality of instructions during flow, this invention can also extract and perceive the contextual information of other popular instructions in the same scenario, thereby performing conflict detection on each instruction and analyzing the logical relationships of instructions in a specific scenario to provide early warnings or further prompts.
[0130] After the first prompt is generated, the present invention can further combine context sequence modeling to analyze the scheduling instruction sequence in the current scheduling scenario and determine whether there is a logical conflict in the current scheduling instruction (such as whether the current "closing" instruction contradicts the "power outage maintenance" instruction in the current scheduling scenario), thereby forming a progressive detection from semantic deviation to logical conflict.
[0131] In a preferred embodiment, after generating the first verification prompt information, the method further includes:
[0132] Obtain the scheduling instruction sequence corresponding to the current scheduling instruction in the current scheduling scenario; wherein, the scheduling instruction sequence includes the current scheduling instruction and several different flow instructions;
[0133] The scheduling instruction sequence is input into the conflict detection model so that the conflict detection model can capture the semantic information corresponding to each flow instruction and generate a third semantic embedding vector corresponding to each flow instruction.
[0134] Based on the context-aware module in the instruction verification model, the contextual dependency relationship between the first semantic embedding vector and each third semantic embedding vector of the current scheduling instruction is captured.
[0135] Based on the context dependencies, global semantic information corresponding to the scheduling instruction sequence is generated;
[0136] For each third semantic embedding vector, based on the global semantic information, logical conflict detection is performed on the first semantic embedding vector and the third semantic embedding vector of the current scheduling instruction, and the conflict detection result is output; wherein, the conflict detection result includes: there is a logical conflict between the current scheduling instruction and the transfer instruction, or there is no logical conflict between the current scheduling instruction and the transfer instruction;
[0137] When any conflict detection result indicates a logical conflict between the current scheduling instruction and the transfer instruction, a third verification prompt is generated to indicate that there is a logical conflict between the current scheduling instruction and the transfer instruction.
[0138] Specifically, this invention can collect current scheduling instructions and scheduling instruction sequences within the same scenario, which may include multiple historical flow instructions, such as operation instructions for the same device within the past 24 hours. A conflict detection model is used to generate a corresponding third semantic embedding vector for each flow instruction, containing semantic elements such as subject and action.
[0139] Furthermore, a context-aware module (based on Transformer) is used to analyze the timing and logical relationships between instructions. For example, the timing sequence and equipment status dependency between the current scheduling instruction "Close transformer A" and the historical routing instruction "Transformer A is undergoing power outage maintenance".
[0140] Dependencies are integrated into a global semantic representation H. Conflict detection is performed by combining the semantic embedding vectors of the current scheduling instruction and each historical flow instruction with the global semantic H. For example, checking action compatibility: whether "closing the switch" and "power outage maintenance" contradict each other; whether the target device of the current scheduling instruction is in a locked state set by the historical flow instruction.
[0141] If a logical contradiction exists (such as a time conflict or a device status conflict), it is marked as "Logical conflict exists"; otherwise, it is marked as "No conflict exists". When any historical transfer instruction conflicts with the current scheduling instruction, a third verification prompt is generated, and the type of conflict can be clearly specified; otherwise, no prompt is generated.
[0142] It is understood that this invention, through context sequence analysis, can further capture whether there are logical conflicts in the current scheduling instructions, thus avoiding false releases caused by isolated judgments.
[0143] In multi-level scheduling, if there are strict timing constraints on instruction flow (such as "power outage before maintenance"), this invention can detect time conflicts or permission conflicts by modeling timing dependencies through global semantic H. For example, whether the time of the current scheduling instruction is earlier than the planned time set by the historical flow instruction, or whether the permission of the current scheduling instruction is exceeding its authority.
[0144] In a preferred embodiment, to capture the dependencies between instructions, this embodiment of the invention employs a Transformer-based context-aware module to represent continuously flowing instructions as a sequence and extract global semantic information H:
[0145]
[0146] Where H is the global semantic representation of the context. It is a semantic embedding vector in the instruction sequence, representing the semantic representation from instruction 1 to instruction n. Through the context-aware module, the mutual influence relationship between instructions can be extracted, and a global semantic representation H can be generated as the input for subsequent conflict detection.
[0147] By utilizing the global semantic representation H generated by the context-aware module, conflict detection is performed on multiple instructions from the same device. This allows for real-time monitoring of conflict records during instruction flow and automatic adjustment of rule base weights to gradually enhance the detection capability for new conflict types.
[0148] In a preferred embodiment, after generating the third semantic embedding vector corresponding to each flow instruction, the method further includes:
[0149] The third semantic embedding vector corresponding to each flow instruction and the first semantic embedding vector corresponding to the current scheduling instruction are input into the similarity prediction model so that the similarity prediction model predicts the cosine similarity between the current scheduling instruction and the flow instruction for each flow instruction based on the third semantic embedding vector corresponding to the flow instruction and the first semantic embedding vector corresponding to the current scheduling instruction.
[0150] For each cosine similarity, determine whether the cosine similarity is less than a preset similarity threshold;
[0151] If so, the current scheduling instruction is matched with the business rules in the preset rule base. If it is determined that the current scheduling instruction does not meet the business rules, a warning message is generated to indicate that the execution permission of the current scheduling instruction needs to be locked. If it is determined that the current scheduling instruction meets the business rules, a fourth verification prompt message is generated to indicate that the current scheduling instruction and the flow instruction have semantic inconsistencies but are legal. The business rules include: syntax rules, logic rules, vocabulary abbreviation rules or semantic equivalence rules.
[0152] If not, no prompt message will be generated.
[0153] Understandably, the above process, based on the obtained third semantic embedding vector, combines similarity prediction and business rule verification to achieve dual detection of semantic consistency and logical legality between the current scheduling instruction and the flow instruction. Threshold judgment and business rule verification are also involved.
[0154] If the cosine similarity is less than the preset similarity threshold, it indicates a large semantic difference, and the business rules need to be further verified. If the rules are not met, warning information is generated and it is prompted that the permissions need to be locked; if the rules are met (such as "legal abbreviation", "semantic equivalence"), a fourth verification prompt is generated (only the differences are prompted, without interception).
[0155] Schematic, grammar rules: Ensure the legality of the instruction structure, such as the complete sentence pattern of "subject + action + object" (avoid incomplete instructions like "execute on transformer A" lacking an action).
[0156] Logical rules: Verify the logical compatibility between instructions, such as "closing the switch" cannot be immediately followed by "switching on" after a power outage, and operations are prohibited during equipment maintenance, etc.
[0157] Lexical abbreviation rules: Identify legal abbreviations in the industry (such as "transformer A" corresponding to "Transformer A") to avoid misjudgment.
[0158] Semantic equivalence rules: Map synonymous expressions (such as "closing the switch" and "switching on"), allowing reasonable semantic changes.
[0159] Schematically, simple similarity calculation may misjudge legal abbreviations (such as "dispatching center" → "district dispatching center") as high deviations. Through the rule library verification, such legal differences can be identified, reducing false warnings. Example: The current instruction "The district dispatching center switches on transformer A" and the transferred instruction "The dispatching center switches on Transformer A", the similarity may decrease due to the abbreviation, but if the rule library contains the abbreviation rule of "transformer A → Transformer A", it is determined to be legal, and only the fourth prompt is generated without locking.
[0160] Specifically, in multi-level dispatching, instructions may have semantic changes due to transmission errors, simplification or omission. In order to monitor these changes, it is necessary to quantify the semantic difference between the current dispatching instruction and the transferred instruction.
[0161] [[ID=
[0165]
[0166] When the semantics of an instruction are inconsistent and violate the rule base, an alert is triggered, prompting the user to intervene.
[0167] In a preferred embodiment, the present invention can also utilize a knowledge graph to construct a semantic association network for scheduling instructions, and verify the semantic consistency and execution logic relationships between instructions through causal reasoning technology. The knowledge graph structurally represents the subject, action, target, time, and conditions of scheduling instructions, and constructs a full-process association graph of cross-level scheduling instructions. Simultaneously, combined with a causal reasoning model, dependencies and potential conflicts between different instructions are automatically detected to ensure the consistency and rationality of instruction execution. The semantic association network for scheduling instructions can include the aforementioned instruction verification model, conflict detection model, and similarity prediction model.
[0168] In a preferred embodiment, the present invention can also implement a multimodal information fusion verification mechanism, that is, by converting instructions in various forms such as text, voice, and images into a unified semantic embedding, instruction consistency verification is achieved. First, voice instructions are converted into text using speech recognition technology, and device identifiers and operation information in images are generated into corresponding text forms using a deep learning model. Then, instruction information from all modalities is uniformly embedded into a semantic space for consistency verification, thereby ensuring semantic consistency under diverse instruction expression forms, thus enhancing the system's compatibility and applicability.
[0169] In a preferred embodiment, the present invention can also implement a real-time feedback and closed-loop verification mechanism. For example, it can achieve dynamic monitoring and timely response to instruction verification through streaming processing technology. By analyzing the flow and execution of instructions in real time, when semantic inconsistencies or erroneous instructions are detected, an alarm is immediately triggered and the execution permissions of the relevant instructions are locked. The closed-loop control further corrects errors through feedback to ensure that errors do not propagate to the next level, ultimately improving the safety and reliability of scheduled instruction execution. When there are semantic differences or logical conflicts in instructions, the real-time feedback mechanism responds promptly, ensuring that the system does not continue to execute biased or inconsistent instructions through warnings or locking operations, thereby avoiding negative impacts of erroneous operations on the execution of lower-level instructions.
[0170] like Figure 2 As shown, based on the above embodiments of various semantic matching-based instruction verification methods, the present invention provides corresponding device embodiments;
[0171] An embodiment of the present invention provides an instruction verification device based on semantic matching, comprising: a scheduling instruction acquisition module, a semantic deviation generation module, and a verification prompt information generation module;
[0172] The scheduling instruction acquisition module is used to acquire the current scheduling instruction and the original scheduling instruction corresponding to the current scheduling instruction.
[0173] The semantic deviation generation module is used to input the current scheduling instruction and the original scheduling instruction into a preset instruction verification model, so that the instruction verification model captures the semantic information of the current scheduling instruction and generates a first semantic embedding vector; captures the semantic information of the original scheduling instruction and generates a second semantic embedding vector; and generates the semantic deviation between the current scheduling instruction and the original scheduling instruction based on the first semantic embedding vector and the second semantic embedding vector.
[0174] The verification prompt information generation module is used to generate a first verification prompt information to indicate that the current scheduling instruction has a semantic deviation when it is determined that the semantic deviation degree is greater than a preset semantic deviation threshold.
[0175] When it is determined that the semantic deviation is not greater than a preset semantic deviation threshold, a second verification prompt message is generated to indicate that the current scheduling instruction does not have a semantic deviation.
[0176] It should be noted that the device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0177] Those skilled in the art will understand that, for convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0178] Based on the above embodiments of various semantic matching-based instruction verification methods, the present invention provides corresponding embodiments for terminal devices.
[0179] One embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements an instruction verification method based on semantic matching as described in any embodiment of the present invention.
[0180] The terminal device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0181] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal device, connecting various parts of the terminal device via various interfaces and lines.
[0182] The memory can be used to store the computer program. The processor implements various functions of the terminal device by running or executing the computer program stored in the memory and calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function, etc.; the data storage area may store data created based on the use of the mobile phone, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, SmartMediaCard (SMC), Secure Digital (SD) card, FlashCard, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0183] Based on the above embodiments of various semantic matching-based instruction verification methods, the present invention provides corresponding embodiments for storage media items.
[0184] An embodiment of the present invention provides a storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute an instruction verification method based on semantic matching as described in any embodiment of the present invention.
[0185] The storage medium is a computer-readable storage medium, and the computer program is stored in the computer-readable storage medium. When executed by a processor, the computer program can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0186] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for checking instructions based on semantic matching, characterized in that, The method comprises the following steps: obtaining a current scheduling instruction and an original scheduling instruction corresponding to the current scheduling instruction; inputting the current scheduling instruction and the original scheduling instruction into a preset instruction checking model, so that the instruction checking model captures semantic information of the current scheduling instruction to generate a first semantic embedding vector, and captures semantic information of the original scheduling instruction to generate a second semantic embedding vector; generating a semantic deviation degree between the current scheduling instruction and the original scheduling instruction according to the first semantic embedding vector and the second semantic embedding vector; when it is determined that the semantic deviation degree is greater than a preset semantic deviation threshold, generating first checking prompt information for representing that the current scheduling instruction has semantic deviation; when it is determined that the semantic deviation degree is not greater than the preset semantic deviation threshold, generating second checking prompt information for representing that the current scheduling instruction has no semantic deviation.
2. The method of claim 1, wherein the semantic matching is based on a semantic relationship between the instruction and the at least one of the one or more other instructions. The first semantic embedding vector comprises a first subject embedding vector, a first action embedding vector, a first target embedding vector, a first time embedding vector, and a first execution condition embedding vector. The instruction checking model captures semantic information of the current scheduling instruction to generate the first semantic embedding vector, which comprises the following steps: The instruction checking model tokenizes the current scheduling instruction to generate a plurality of first words. The semantic analysis of each first word is performed through a self-attention mechanism to generate first syntactic correlation features between the first words. The first global context information corresponding to the current scheduling instruction is extracted. The plurality of first words are integrated according to the first syntactic correlation features and the first global context information to generate a first global semantic embedding. The first global semantic embedding is decomposed into the first subject embedding vector, the first action embedding vector, the first target embedding vector, the first time embedding vector, and the first execution condition embedding vector according to different preset semantic elements.
3. The method of claim 2, wherein the semantic matching is based on a semantic relationship between the instruction and the at least one of the one or more other instructions. The second semantic embedding vector comprises a second subject embedding vector, a second action embedding vector, a second target embedding vector, a second time embedding vector, and a second execution condition embedding vector. The semantic deviation degree between the current scheduling instruction and the original scheduling instruction is generated according to the first semantic embedding vector and the second semantic embedding vector, which comprises the following steps: The first subject embedding vector, the first action embedding vector, the first target embedding vector, the first time embedding vector, the first execution condition embedding vector, the second subject embedding vector, the second action embedding vector, the second target embedding vector, the second time embedding vector, and the second execution condition embedding vector are grouped according to semantic element types to generate a plurality of element groups; wherein the element groups comprise a subject element group, an action element group, a target element group, a time element group, or an execution condition element group. For each element group, a semantic alignment weight corresponding to the element group is generated according to a preset weight matrix and a normalization function; wherein the semantic alignment weight is used to quantify the matching closeness of two embedding vectors in a semantic space; and the preset weight matrix is used to project the embedding vectors into the same semantic space. The semantic deviation degree between the current scheduling instruction and the original scheduling instruction is generated by weighted summation according to the semantic alignment weights corresponding to the respective element groups.
4. The method of claim 3, wherein the semantic matching is based on a semantic relationship between the instruction and the at least one of the one or more other instructions. After the first review prompt information is generated, the method further includes: obtaining a scheduling instruction sequence corresponding to the current scheduling instruction in the current scheduling scene, wherein the scheduling instruction sequence includes the current scheduling instruction and a plurality of different flow instructions; inputting the scheduling instruction sequence into the conflict detection model, so that the conflict detection model captures semantic information corresponding to each flow instruction, and generates a third semantic embedding vector corresponding to each flow instruction; capturing, based on a context perception module in the instruction review model, a context dependency relationship between the first semantic embedding vector of the current scheduling instruction and each third semantic embedding vector; generating global semantic information corresponding to the scheduling instruction sequence according to the context dependency relationship; for each third semantic embedding vector, performing logical conflict detection on the first semantic embedding vector of the current scheduling instruction and the third semantic embedding vector according to the global semantic information, and outputting a conflict detection result; wherein the conflict detection result includes: the current scheduling instruction and the flow instruction exist logical conflict, or the current scheduling instruction and the flow instruction do not exist logical conflict; when it is determined that any one of the conflict detection results is that the current scheduling instruction and the flow instruction exist logical conflict, generating third review prompt information for representing that the current scheduling instruction exists logical conflict.
5. The method of claim 4, wherein the semantic matching is based on a semantic relationship between the instruction and the at least one of the one or more other instructions. After the third semantic embedding vector corresponding to each flow instruction is generated, the method further includes: inputting the third semantic embedding vector corresponding to each flow instruction and the first semantic embedding vector corresponding to the current scheduling instruction into the similarity prediction model, so that the similarity prediction model, for each flow instruction, predicts a cosine similarity between the current scheduling instruction and the flow instruction according to the third semantic embedding vector corresponding to the flow instruction and the first semantic embedding vector corresponding to the current scheduling instruction; for each cosine similarity, determining whether the cosine similarity is less than a preset similarity threshold; if yes, matching the current scheduling instruction with a business rule in a preset rule library, and when it is determined that the current scheduling instruction does not satisfy the business rule, generating early warning information for indicating that the execution authority of the current scheduling instruction needs to be locked; when it is determined that the current scheduling instruction satisfies the business rule, generating fourth review prompt information for indicating that the current scheduling instruction and the flow instruction exist semantic inconsistency but are legal; wherein the business rule includes: syntax rule, logic rule, vocabulary abbreviation rule or semantic equivalence rule; if no, no prompt information is generated.
6. The method of claim 1, wherein the semantic matching is based on a semantic relationship between the instruction and the at least one of the one or more other instructions. The generation of the instruction review model includes: taking the scheduling instruction sample and the original scheduling instruction sample corresponding to the scheduling instruction sample as training samples; iteratively training the instruction review model to be trained with the plurality of training samples and the actual semantic deviation degree corresponding to each training sample as input and the predicted semantic deviation degree of each training sample as output until the model converges, to generate a preset instruction review model.
7. The instruction verification method based on semantic matching according to claim 6, characterized in that: In training the instruction checking model, the prediction error of the instruction checking model is minimized by the following loss function: where Γ is a loss calculation function, TrainingSet represents a training sample, V s样本 represents a scheduling instruction sample in the training sample, V t样本 represents a scheduling instruction sample in the training sample, V s样本 represents a scheduling instruction sample in the training sample, Similarity(V s样本 , V t样本 ) represents a predicted semantic deviation degree between V t样本 and V s样本 , and Label is a real label, representing an actual semantic deviation degree between V t样本 and V s样本 .
8. A semantic matching based instruction checking apparatus, characterized by, Comprise: The scheduling instruction acquisition module, the semantic deviation degree generation module and the checking prompt information generation module; The scheduling instruction acquisition module is used for acquiring the current scheduling instruction and the original scheduling instruction corresponding to the current scheduling instruction; The semantic deviation degree generation module is used for inputting the current scheduling instruction and the original scheduling instruction into a preset instruction checking model, so that the instruction checking model captures the semantic information of the current scheduling instruction to generate a first semantic embedding vector, and captures the semantic information of the original scheduling instruction to generate a second semantic embedding vector; According to the first semantic embedding vector and the second semantic embedding vector, the semantic deviation degree between the current scheduling instruction and the original scheduling instruction is generated; The checking prompt information generation module is used for generating first checking prompt information for representing that the current scheduling instruction has semantic deviation when it is determined that the semantic deviation degree is greater than a preset semantic deviation threshold; When it is determined that the semantic deviation degree is not greater than the preset semantic deviation threshold, second checking prompt information for representing that the current scheduling instruction does not have semantic deviation is generated.
9. A terminal device, comprising: The storage medium comprises a stored computer program, wherein the computer program controls the device where the storage medium is located to execute the instruction checking method based on semantic matching when the computer program runs.
10. A storage medium, characterized by The storage medium comprises a stored computer program, wherein the computer program controls the device where the storage medium is located to execute the instruction checking method based on semantic matching when the computer program runs.
Citation Information
Cited By
Operation instruction conversion method and device, storage medium, electronic device and computer program product
CN121708932A
Power dispatching switching operation safety checking method and device based on artificial intelligence
CN122089000A