Electric power measurement data detection method and device, electronic equipment and storage medium

By using a multi-level logical judgment structure and a large language model to analyze expert experience, structured logical rules are generated, which solves the problems of false alarms and missed alarms in power metering data detection and improves detection accuracy.

CN120850004APending Publication Date: 2025-10-28SHENZHEN POWER SUPPLY BUREAU
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510956699.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-09
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

False alarms and missed alarms occur frequently in the existing power metering data detection, resulting in low detection accuracy. The existing single threshold rule is difficult to adapt to complex power metering scenarios.

Method used

A multi-level logical judgment structure is adopted. Expert experience is analyzed through Large Language Model (LLM) to generate structured logical judgment rules. Combined with machine verification and manual verification, the logical judgment structure is optimized to improve detection accuracy.

Benefits of technology

It improves the accuracy of power metering data detection, reduces false alarms and missed alarms, and achieves high-precision anomaly detection in complex scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120850004A_ABST
    Figure CN120850004A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an electric power measurement data detection method and device, electronic equipment and a storage medium, and the method comprises the steps: a logical judgment texts corresponding to a measurement detection types are obtained, and the a measurement detection types are in one-to-one correspondence with the a logical judgment texts; according to each logic judgment text, determining a multi-level logic judgment structure of each metering detection type; acquiring electric power measurement data of a to-be-detected measurement point; and according to the electric power measurement data and a logical judgment structures corresponding to the a measurement detection types, determining a target measurement detection type corresponding to the electric power measurement data from the a measurement detection types. By adopting the embodiment of the invention, when the electric power measurement data is detected, the detection accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power technology, and in particular to methods, devices, electronic equipment, and storage media for detecting power metering data. Background Technology

[0002] With the rapid development of smart grids, electricity metering data has become a core basis for power system operation monitoring, user billing, and equipment status assessment. However, the complexity of electricity metering scenarios is increasing, and abnormal data caused by electricity theft, equipment aging, and communication interference occurs frequently, seriously threatening the economic efficiency and security of the power grid. Therefore, how to quickly detect anomalies in metering data and determine the type of abnormal metering based on the abnormal behavior is a key task in the current metering field.

[0003] However, in the existing anomaly detection system in the field of metering and production, a single threshold rule is mainly used to determine whether an anomaly has occurred in the production process. This leads to frequent false alarms and missed alarms in actual production activities, resulting in a low detection accuracy of power metering data. Summary of the Invention

[0004] To address the aforementioned problems, embodiments of the present invention provide a method, apparatus, electronic device, and storage medium for detecting power metering data, which can improve the detection accuracy when detecting power metering data.

[0005] In a first aspect, embodiments of the present invention provide a method for detecting electricity metering data, including:

[0006] Obtain a logical judgment text corresponding to a metering detection types, wherein the a metering detection types correspond one-to-one with the a logical judgment texts, and the a metering detection types are used to reflect a operating status indicators of the power system;

[0007] Based on each logical judgment text, determine the multi-level logical judgment structure for each measurement and testing type;

[0008] Obtain the power metering data of the metering point to be tested;

[0009] Based on the power metering data and the a logical judgment structures corresponding to the a metering detection types, the target metering detection type corresponding to the power metering data is determined from the a metering detection types.

[0010] Secondly, embodiments of the present invention provide a power metering data detection device, the device comprising an acquisition unit and a processing unit;

[0011] The acquisition unit is used to acquire a logical judgment texts corresponding to a metering detection types, wherein the a metering detection types correspond one-to-one with the a logical judgment texts, and the a metering detection types are used to reflect a operating status indicators of the power system.

[0012] The processing unit is used to determine the multi-level logical judgment structure for each measurement and detection type based on each logical judgment text.

[0013] Obtain the power metering data of the metering point to be tested;

[0014] Based on the power metering data and the a logical judgment structures corresponding to the a metering detection types, the target metering detection type corresponding to the power metering data is determined from the a metering detection types.

[0015] Thirdly, embodiments of the present invention provide an electronic device, the electronic device including a processor and a memory, the processor being connected to the memory, the memory being used to store a computer program, and the processor being used to execute the computer program stored in the memory, so that the electronic device performs the method as described in the first aspect.

[0016] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program that is executed by a processor to implement the method described in the first aspect.

[0017] Fifthly, embodiments of this application provide a computer program product, the computer program product including a non-transitory computer-readable storage medium storing a computer program, the computer being operable to perform the method as described in the first aspect.

[0018] Implementing the embodiments of this application has the following beneficial effects:

[0019] In this embodiment, firstly, a logical judgment texts corresponding to a metering detection types are obtained, wherein the a metering detection types and a logical judgment texts correspond one-to-one, and the a metering detection types are used to reflect a operating status indicators of the power system. Then, based on each logical judgment text, a multi-level logical judgment structure for each metering detection type is determined. This multi-level logical judgment structure is different from a single threshold rule judgment. Furthermore, the power metering data of the metering point to be detected is obtained. Finally, based on the power metering data and the a logical judgment structures corresponding to the a metering detection types, the target metering detection type corresponding to the power metering data is determined from the a metering detection types. Thus, the target metering detection type of the power metering data of the metering point to be detected is obtained based on a multi-level logical judgment structure, which can improve the detection accuracy when detecting power metering data. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the background art, the drawings used in the embodiments of the present invention or the background art will be described below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a flowchart of a power metering data detection method provided in an embodiment of this application;

[0022] Figure 2 This is a schematic diagram of a four-step electricity metering process provided in an embodiment of this application;

[0023] Figure 3 This is a schematic diagram of an initial logic judgment structure provided in an embodiment of this application;

[0024] Figure 4 This is a schematic diagram of a multi-level logical judgment structure provided in an embodiment of this application;

[0025] Figure 5 This is a schematic diagram of a text splicing method provided in an embodiment of this application;

[0026] Figure 6 This is a schematic diagram of a large language model parsing process provided in an embodiment of this application;

[0027] Figure 7 This is a schematic diagram of the structure of a power metering data detection device provided in an embodiment of this application;

[0028] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0029] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0030] The terms "first," "second," "third," and "fourth," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or modules is not limited to the listed steps or modules, but may optionally include steps or modules not listed, or may optionally include other steps or modules inherent to these processes, methods, products, or devices.

[0031] In this document, the term "embodiment" means that a particular feature, result, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0032] The following describes the relevant content, concepts, technical issues, technical solutions, and beneficial effects involved in the embodiments of this application.

[0033] First, let me explain some of the technical terms used in this application:

[0034] Large Language Model (LLM): refers to a deep learning model trained using a large amount of text data.

[0035] An intelligent agent is a proxy capable of perceiving its environment and taking actions to achieve specific goals. It can be software, hardware, or a system, possessing autonomy, adaptability, and interactivity. An intelligent agent perceives changes in the environment (e.g., through sensors or data input), makes judgments and decisions based on its learned knowledge and algorithms, and then executes actions to influence the environment or achieve predetermined goals.

[0036] Prompt: In large-scale artificial intelligence (AI) models, the main function of a prompt is to provide the AI ​​model with contextual information about the input and the parameters input to the model.

[0037] Low-Rank Adaptation (LoRA) is an efficient method for fine-tuning large language models, aiming to significantly reduce computation and storage requirements while maintaining model performance.

[0038] JavaScript Object Notation (JSON) is an open standard file and data exchange format designed based on a subset of ECMAScript. It is easy for humans to read and write, and also easy for machines to parse and generate.

[0039] In existing anomaly detection systems in the field of metrology and production, a single threshold rule is mainly used to determine whether an anomaly has occurred in the production process. Specifically, the construction and setting of this threshold rule largely relies on expert experience. During daily production, the system compares and analyzes various production data based on this pre-set single threshold. Once the production data reaches or exceeds the threshold, an anomaly alarm is triggered; otherwise, production is considered to be in a normal state.

[0040] However, in actual production scenarios, this anomaly detection model based on a single threshold rule and expert experience has revealed many drawbacks. Among the most prominent problems are the frequent occurrence of false positives and false negatives. Faced with these thorny issues, current technology offers very limited solutions, essentially relying on expert intervention. Experts need to use their extensive professional knowledge and practical experience to adjust existing rule thresholds or to develop supplementary rules, hoping to improve the accuracy and reliability of anomaly detection.

[0041] Therefore, see Figure 1 , Figure 1 This is a flowchart illustrating a method for detecting electricity metering data provided in an embodiment of this application. The method for detecting electricity metering data provided in this application includes, but is not limited to, the following steps:

[0042] Step S101: Obtain a logical judgment texts corresponding to a measurement and detection types;

[0043] Among them, a metering and detection types correspond one-to-one with a logical judgment texts, and a metering and detection types are used to reflect a operating status indicators of the power system.

[0044] Step S102: Based on each logical judgment text, determine the multi-level logical judgment structure for each measurement and detection type;

[0045] Step S103: Obtain the power metering data of the metering point to be tested;

[0046] Step S104: Based on the power metering data and the a logical judgment structures corresponding to the a metering detection types, determine the target metering detection type corresponding to the power metering data from the a metering detection types.

[0047] Specifically, there are *a* metering detection types in the power system, where *a* is a positive integer. These *a* metering detection types can include normal metering detection types and multiple abnormal metering detection types. *a* operational status indicators represent the operating status of the system and equipment under different operating conditions. These different operating conditions include load level, output configuration, system wiring, and faults. For example, multiple abnormal metering detection types can include: meter reading stopped, meter reading in reverse, meter reading overrun, reverse meter reading, high-voltage supply / high-voltage metering B-phase abnormality, voltage phase loss, voltage loss, current loss, three-phase imbalance, current reverse polarity, voltage reverse polarity, no data collected, duplicate data collected, no load, low load, unequal total and time-of-use meter readings, abnormal power factor, abnormal reactive power quadrant, inconsistent multiplier, and inconsistent meter readings. The target metering detection type corresponding to the power metering data can be a normal metering detection type or any abnormal metering detection type.

[0048] In one possible embodiment, a multi-level logical judgment structure for each measurement and detection type is determined based on each logical judgment text. The multi-level logical judgment structure may include multiple logical judgment nodes, each of which may be an if-else judgment logic. The output of each logical judgment node is either pointing to the next logical judgment node or directly outputting the measurement and detection type.

[0049] In one possible embodiment, the power metering data of the metering point to be tested can be obtained according to the detection frequency, for example, once every 1 hour.

[0050] In one possible embodiment, based on the electricity metering data and a logical judgment structures corresponding to a metering detection types, the target metering detection type corresponding to the electricity metering data is determined from the a metering detection types. Each logical judgment structure can be a logical judgment chain or a logical judgment tree. Each execution can start from the head node of the judgment chain, and data is input node by node according to the node's required data type and data time range requirements for judgment, thereby obtaining the judgment result.

[0051] In a specific embodiment, see Figure 2 , Figure 2This is a schematic diagram of a four-step process for electricity metering provided in this application embodiment. The electricity metering data detection method provided in this application embodiment generates anomaly detection rules based on expert experience through a four-step process. First, it collects multi-source data and comprehensive judgment experience from experts when handling anomalies, forming an unstructured text library. Second, it uses an LLM (Limited Least Meter Model) to parse the expert text: by injecting knowledge from the electricity metering domain and the logical judgment method Prompt, it performs semantic understanding and structured output on the experience text, generating a logical judgment chain; combined with specific metering point data, the large model infers precise judgment conditions, and through multiple rounds of iterative optimization, forms a complete rule tree. Then, it performs manual verification: the rule tree is tested with real data, requiring a positive sample detection accuracy of over 95%; otherwise, the rules are re-optimized based on expert feedback on negative samples. Finally, the verified rules are converted into executable code for the engine. This innovative approach uses "domain knowledge Prompt + LoRA fine-tuning" to enhance the professionalism of large models. By processing data through semantic compression and feature preprocessing, and establishing a closed-loop optimization mechanism of machine inference and manual verification, it effectively solves the pain points of poor adaptability of traditional single rules and the difficulty in structured reuse of expert experience, and realizes the automated generation of high-precision anomaly detection rules in complex scenarios.

[0052] In a specific implementation, an expert experience database is first acquired. In actual production, a single rule cannot meet complex needs. Experts, based on their frontline work experience, have developed effective anomaly judgment and handling processes. They often integrate multiple data sources, following a specific logical order, such as first examining equipment operating parameters, then analyzing marketing archive data, and finally considering production environment data, to accurately judge anomalies. Their professionalism and specificity far exceed that of a single rule. Acquiring the expert experience database mainly involves collecting written materials related to anomaly handling from experts' daily work. More comprehensive expert experience data can be obtained by guiding experts to organize their handling processes, key nodes, and reference data sources.

[0053] Furthermore, the expert experience base is parsed and rules are generated using an LLM (Local Level Management) system. Since the collected expert experience is mostly fuzzy, unstructured natural language description, it is difficult to directly use it to construct anomaly detection rules. First, the expert judgment experience text for a specific anomaly is input into the LLM large-scale model. The large-scale model, using semantic understanding algorithms, analyzes the text information and identifies the key steps and logical relationships in the anomaly handling process. Next, through the large-scale model's structured output function, the understood expert experience is transformed into a structured logical flow, clarifying the input, output, and execution order of each step, such as the operation flow when judging anomalies using multiple data sources. Subsequently, based on the generated logical flow and Agent capabilities, the large-scale model's inference capabilities are invoked. The large-scale model determines precise logical judgment thresholds based on the process steps and data characteristics.

[0054] Furthermore, after completing LLM parsing, a complete and executable set of combined judgment rules can be generated, covering a coherent operational process and criteria from data collection to anomaly detection. However, to ensure usability, manual verification is still required. Professional technicians carefully review the steps, judgment conditions, and threshold settings of the rules based on their professional knowledge and actual production conditions. Once problems such as conflicts between the rules and production logic, incorrect data references, or under-optimized processes are found, they will be recorded and annotated in detail before optimization.

[0055] Finally, based on pre-agreed structured language specifications, the rule judgment process obtained from the above steps is automatically converted into program execution steps recognizable by the rule engine. These steps are then integrated into the existing rule engine library, and the accuracy of anomaly identification is continuously observed during operation. The pre-agreed structured language specifications can be predefined format requirements in the rule engine code. For example, Agents have specific naming formats; the Agent names obtained from the large model may differ from predefined Agent names, requiring mapping. For instance, a logical judgment requirement might be greater than 30, but the rule engine needs to convert it to [comparison calculation, >, 30] before storing it in the rule library. The rule engine refers to a set of code running online that uses predefined, program-recognizable rules to judge online data in real time. Here, the rule judgment process obtained from the previous steps is a structured JSON, which cannot be directly recognized by the code. Therefore, it needs to be converted into a code-recognizable format, i.e., automatic conversion, such as transforming Agent names, input fields, and judgment conditions into pre-agreed code format specifications.

[0056] Optionally, in addition to manual verification, the above verification methods also include automatic machine verification. Automatic machine verification is divided into simple logic verification and large model verification. Simple logic verification: According to the production operation manual, the execution priority of some agents or the mutual exclusion or upper and lower limits of thresholds between agents are specified. The input data is checked according to the measurement data model to see if the required input data is in the data model. Large model verification: The production operation manual, data model and rules are input into the large model. The prompt requires the large model to give whether there are production logic conflicts, incorrect data references or under-optimized processes according to the manual and data model. If so, the cause of the problem is given.

[0057] In this embodiment, by leveraging the semantic understanding, structured output, and logical reasoning capabilities of LLM, expert experience is automatically transformed into precise, executable, and reliable logical rule judgment chains / trees. This method can significantly improve the efficiency of experts in resolving false positives and false negatives, and overcome the limitations of traditional single rules by utilizing combined rules. Furthermore, by integrating the judgment experience of multiple experts, coupled with multiple rounds of logical reasoning from a large model, the optimal value of the threshold in logical judgments can be automatically determined, overcoming the limitations of individual knowledge.

[0058] Optionally, step S102, determining the multi-level logical judgment structure for each measurement and detection type based on each logical judgment text, may include the following steps:

[0059] Step S201: Based on the first logical judgment text, determine the initial logical judgment structure of the first measurement detection type, wherein the first logical judgment text is any one of a logical judgment texts, the first measurement detection type is the measurement detection type corresponding to the first logical judgment text among a measurement detection types, and the initial logical judgment structure includes n logical judgment nodes, each logical judgment node corresponds to a node requirement data type, and n is a positive integer;

[0060] Step S202: Determine the training data for each logical judgment node based on the data type required by the node corresponding to each logical judgment node;

[0061] Step S203: Determine the judgment conditions for each logical judgment node based on the training data of each logical judgment node;

[0062] Step S204: Based on the initial logical judgment structure and the n judgment conditions corresponding to the n logical judgment nodes, determine the multi-level logical judgment structure of the first measurement detection type.

[0063] Specifically, the data types required by each logical judgment node may include: daily frozen meter readings (forward / reverse, total active power, total reactive power, peak, flat, valley), voltage and current data (A / B / C three phases), and power data (A / B / C three phases).

[0064] In a specific embodiment, the large model first outputs a rough logical judgment chain based on expert experience. This rough logical judgment chain only specifies the required data types, and the data judgment conditions and time ranges are not precisely specified. They can be omitted or the time range can be expanded. Then, the vague logical judgment chain and the specific data (i.e., the data types specified in the logical judgment chain are actually queried) are input back into the large model. The large model is required to refine the data time range and precise data judgment conditions for each judgment node in the judgment chain. After multiple rounds of iterative optimization, the final result is the logical judgment chain rule corresponding to each expert experience.

[0065] In one possible embodiment, the judgment conditions for each logical judgment node are determined based on the training data of each logical judgment node. According to the initial logical judgment structure JSON, in the logical judgment step, a series of clearly abnormal and normal devices are input with real data. For example, if the process requires judging the average voltage, the device status and average voltage of multiple devices are input into the inference model, along with the initial logical judgment structure JSON. Then, the Prompt specifies that the task is to infer the threshold for each logical judgment step based on the real input.

[0066] In a specific embodiment, see Figure 3 and Figure 4 , Figure 3 This is a schematic diagram of an initial logic judgment structure provided in an embodiment of this application. Figure 4 This is a schematic diagram of a multi-level logical judgment structure provided in an embodiment of this application. The initial logical judgment structure of the first measurement detection type is represented by structured JSON, as shown below. Figure 3 As shown, the multi-level logical judgment structure of the first measurement and detection type is represented by structured JSON, which can be understood as follows: Figure 4 As shown.

[0067] Optionally, step S201, determining the initial logical judgment structure of the first measurement detection type based on the first logical judgment text, may include the following steps:

[0068] Step S301: Perform semantic understanding on the first logical judgment text to obtain m detection steps, where m is a positive integer;

[0069] Step S302: Analyze each detection step to determine the type of operation object, input parameter structure, and output result structure corresponding to each detection step;

[0070] Step S303: Based on the preset data interaction rules, the operation object type, input parameter structure and output result structure corresponding to each detection step are format converted to determine the data interaction format corresponding to each detection step. The data interaction format includes the input field, output field and execution sequence number corresponding to each detection step.

[0071] Step S304: Logically sort the m detection steps according to the input fields, output fields and execution sequence number corresponding to each detection step, and determine the n logical judgment nodes and the node requirement data type corresponding to each logical judgment node;

[0072] Step S305: Determine the initial logical judgment structure based on the n logical judgment nodes and the data type required by each logical judgment node.

[0073] In a specific embodiment, for example, for the first logical judgment text, such as an expert experience, a lot of inspection steps are described in natural language in this expert experience, such as checking voltage, checking power, checking device files, and retrieving historical work orders according to the files. These steps can be pre-combed into some general agents, such as numerical logic judgment agents, file query agents, work order query agents, waveform description agents, and numerical calculation agents. These agents pre-agree on the input format and output format, and then, these formats and agent descriptions are used as background knowledge for the large model. Then, the large model transforms natural language into a JSON, which is the initial logical judgment structure of the first metering detection type. For example: {'1': {'Agent name': 'Numerical calculation', 'Input': {'Field': 'Phase B voltage', 'Calculation method': 'Mean value'}, 'Output': {'Yes': '2'}}, '2': {'Agent name': 'Logical judgment', 'Input': {'Field': 'Mean value of Phase B voltage'}, 'Output': {'Yes': '3', 'No': '5'}}... 'n': {'Agent name': 'Logical judgment', 'Input': {'Field': 'Whether there is a meter replacement work order'}, 'Output': {'Yes': 'No abnormality', 'No': 'There is an abnormality'}}}

[0074] Further, according to the execution sequence number in the JSON data interaction format, determine the sequence of m detection steps. According to this sequence, determine n logical judgment nodes, and determine the node requirement data type corresponding to each logical judgment node according to the input field and output field in the JSON data interaction format. Package the node requirement data type corresponding to each logical judgment node among the n logical judgment nodes into the corresponding logical judgment node to obtain the initial logical judgment structure. Here, a logical judgment node refers to the smallest operation unit with an independent execution logic, clear input and output boundaries, and can be scheduled by an intelligent agent. The corresponding relationship between m and n is determined by the logical complexity of the detection steps. If a single detection step is an atomic operation without branches and dependencies, then m = n. If a single detection step contains branch logic and is split into multiple nodes, then n > m. If multiple consecutive non-branching steps are combined into a single node, then n < m. If it is a non-judgment type step, no node is generated.

[0075] Optionally, the judgment conditions include the target data time range and the target judgment threshold; Step S203, according to the training data of each logical judgment node, determine the judgment conditions of each logical judgment node, which may include the following steps:

[0076] Step S401: According to the training data of each logical judgment node, perform data feature analysis and candidate value extraction to determine the candidate data time range and candidate judgment threshold of each logical judgment node;

[0077] Step S402: Constrain and filter the candidate data time range of each logical judgment node according to the preset instructions, and determine the target data time range of each logical judgment node from the candidate data time range of each logical judgment node;

[0078] Step S403: Perform conditional performance evaluation on the candidate judgment thresholds of each logical judgment node according to the preset instructions, and determine the target judgment threshold of each logical judgment node from the candidate judgment thresholds of each logical judgment node.

[0079] Specifically, the underlying implementation logic for determining the target data time range and target judgment threshold based on preset instructions is to transform the preset instructions into quantifiable filtering and optimization rules. Through a three-step method of constraint matching, scoring and sorting, and dynamic adjustment, target values ​​that meet both business needs and data characteristics are extracted from candidate values.

[0080] Specifically, preset instructions are predefined business constraints or optimization goals, such as accuracy requirements, security specifications, and efficiency indicators, which need to be parsed into executable quantitative rules. For example, a preset instruction of security constraint, with the instruction content requiring the time range to cover 90% of device response cases, corresponds to the parsed quantitative rule of candidate time range coverage ≥ 90%; a preset instruction of accuracy requirement, with the instruction content requiring the threshold misjudgment rate ≤ 5%, corresponds to the parsed quantitative rule of candidate threshold misjudgment rate ≤ 5%; a preset instruction of scenario adaptation, with the instruction content requiring the semiconductor device time range to be < 100ms, corresponds to the parsed quantitative rule of candidate time range upper limit = 100ms; and a preset instruction of priority rule, with the instruction content prioritizing the threshold with the smallest deviation from historical data, corresponds to the parsed quantitative rule of candidate threshold deviation value having the highest weight.

[0081] In one possible embodiment, the candidate data time range of each logical judgment node is constrained and filtered according to a preset instruction, and the target data time range of each logical judgment node is determined from the candidate data time range of each logical judgment node. First, the conditions that must be met in the preset instruction, i.e., hard constraints, are determined, and candidates that do not meet the hard constraints are eliminated. For example, the preset instruction "the time range must cover 90% of the cases of device response", and the training data shows that the device response time distribution is [20-150ms], of which 90% of the cases are concentrated in 30-120ms, then the candidate range [0-20ms] is directly eliminated, and the candidates in [30-120ms] and those containing this range are retained. Then, soft constraints are determined based on the optimization objectives in the preset instructions. These objectives can be efficiency or accuracy. The score for each candidate time range is calculated using the formula: Score = w1 × Coverage + w2 × (1 / Window Length) + w3 × Overlap with Historical Window. For example, the candidate range [30-120ms] has 90% coverage and a window length of 90ms; [50-100ms] has 85% coverage and a window length of 50ms. If the preset instruction prioritizes shortening the window to improve efficiency, then [50-100ms] is selected because its window is shorter and has a higher score. Finally, if none of the candidate ranges perfectly meet the preset instructions (e.g., coverage meets the standard but the window is too long), the candidates are dynamically expanded or shrunk based on the instructions. For example, if the preset instruction is window length ≤ 80ms, but the only candidate with the required coverage is [30-120ms] with a length of 90ms, then the window is shrunk to [40-120ms] with a length of 80ms, while simultaneously verifying whether the coverage of the new window meets the instruction requirements.

[0082] In one possible embodiment, a conditional performance evaluation is performed on the candidate judgment thresholds of each logical judgment node according to preset instructions, and the target judgment threshold for each logical judgment node is determined from the candidate judgment thresholds. According to the preset instructions, if the preset instruction is that the threshold must not be lower than 70% of the device manual's critical value, then candidate thresholds [65%] are directly eliminated, retaining ≥70% of the candidates. When there are multiple conflicting objectives in the preset instructions, such as a contradiction between improving accuracy and reducing the false positive rate, a weighted score is used to balance them. The specific formula is: Threshold score = c × Accuracy score + d × (1 - False positive rate), where c + d = 1. If accuracy is prioritized in the preset instructions, then c = 0.7; if safety is prioritized, then d = 0.7. If the preset instructions include scene adaptation requirements, such as a stricter threshold for semiconductor devices, then the candidate thresholds are offset by combining scene labels. For example, if the general candidate threshold is 70%, and the preset instruction is that the threshold for semiconductor devices needs to be increased by 5%, then the target threshold is 75%.

[0083] In this embodiment of the application, by parsing the instruction into a quantitative constraint, candidates that do not meet the hard boundary are first filtered out, and then the remaining candidates are sorted by soft target score. Finally, the target value that fits the training data distribution and meets the business requirements is selected, which can accurately determine the judgment conditions.

[0084] Optionally, step S204, determining the multi-level logical judgment structure of the first measurement detection type based on the initial logical judgment structure and the n judgment conditions corresponding to the n logical judgment nodes, may include the following steps:

[0085] Step S501: Obtain the reference logic format for each type of operation object, wherein the reference logic format includes: reference execution priority, reference conflicting operation object type, and reference operation object threshold range;

[0086] Step S502: According to the reference logic format, verify the initial logic judgment structure and the n judgment conditions corresponding to the n logic judgment nodes to obtain the multi-level logic judgment structure of the first measurement detection type.

[0087] Specifically, the reference logic format for each type of operation object can be determined through the power grid's production operation manual and metering data model in metering production operations.

[0088] In one possible embodiment, based on the power grid metering production operation manual, the operation objects, such as voltage, power, equipment files, work orders, etc., are classified according to physical attributes or business functions, such as electrical parameter categories, equipment information categories, and historical record categories. Furthermore, the execution order constraints of the operation objects are parsed from the production operation manual, such as checking voltage first and then power, and converted into numerical priorities. Combinations of operation objects that cannot be executed simultaneously are marked, such as voltage compensation and load shedding being mutually exclusive, and conflict types are recorded. Additionally, the legal value range of each operation object is extracted from the metering data model, such as the voltage range of 80%-120% of the rated value, and abnormal thresholds are marked. Then, the execution order of each node in the initial logical judgment structure is compared with the reference priority to correct conflicts. Mutual exclusion constraints are determined based on whether mutually exclusive operation objects are triggered simultaneously in the judgment conditions. The thresholds in the judgment conditions are verified to be within the reference range, and out-of-bounds values ​​are corrected. The verified nodes are then reorganized according to the hierarchical relationship of the reference logical format to form a multi-level structure.

[0089] In this embodiment, the constraints of the production operation manual and the metering data model ensure that the generated judgment chain conforms to the power grid operation specifications, avoids illegal operations, and the introduction of the reference threshold range makes the judgment conditions closer to the actual operating boundary of the equipment, reducing misjudgments.

[0090] Optionally, step S104, determining the target metering detection type corresponding to the power metering data from the a metering detection types based on the power metering data and the a logical judgment structures corresponding to the a metering detection types, may include the following steps:

[0091] Step S601: Determine the testing order for a types of metrological testing;

[0092] Step S602: Determine the target detection data for each metering detection type from the power metering data according to the detection sequence;

[0093] Step S603: Determine the detection result for each measurement and testing type based on the target detection data and the logical judgment structure of each measurement and testing type;

[0094] Step S604: Based on the a detection results corresponding to a metering detection types, determine the target metering detection type corresponding to the power metering data.

[0095] In one possible implementation, based on the power metering production manual, 'a' metering detection types, such as voltage sag detection, current distortion detection, and power fluctuation detection, are categorized according to urgency, impact range, and historical processing time. Priority rules are defined; for example, detection types involving core equipment have higher priority than non-core equipment, detection types covering ≥100 households have higher priority than single-household detection, and detection types with a historical average processing time of <5 minutes have priority over types with longer processing times. Dependencies between detection types are identified (e.g., power fluctuation detection requires voltage detection results as a prerequisite), and a dependency graph is constructed. If type X depends on type Y, then the detection order of Y must precede that of X. When priorities and dependencies conflict, such as a high-priority type X depending on a low-priority type Y, adjustments are made according to the dependency priority principle, and a final detection order table is generated based on the execution order.

[0096] In one possible embodiment, raw data corresponding to the time window is extracted from the power metering database according to the detection order, and preprocessing is performed. Based on the logical judgment structure requirements of the detection type, the preprocessed data is encapsulated into structured input. According to the multi-level logical judgment structure corresponding to the metering detection type, the target detection data is input to each judgment node according to the node order of the logical judgment structure, condition verification is performed, and the output result, i.e., the detection result, is obtained. If a metering detection type corresponding to the power metering data exists among the a detection results, then that metering detection type is the target metering detection type.

[0097] In this embodiment, data is sorted by priority and dependency to avoid invalid detection and improve detection efficiency. The reliability of the input logical judgment structure is ensured through the screening and preprocessing of target detection data, and false positives are reduced through multi-level judgments.

[0098] Optionally, step S101, obtaining a logical judgment texts corresponding to a measurement detection types, may include the following steps:

[0099] Step S701: Obtain b candidate logical judgment texts corresponding to each metrology and testing type;

[0100] Step S702: Extract the scene tag for each candidate logical judgment text, wherein the scene tag is used to indicate the application scene type of each candidate logical judgment text;

[0101] Step S703: Based on the b scene labels corresponding to the b candidate logical judgment texts, perform conflict detection on the candidate logical judgment texts corresponding to the same scene label among the b scene labels to obtain the conflict label of each candidate logical judgment text. The conflict label is used to indicate the different steps in the candidate logical judgment texts corresponding to the same scene label.

[0102] Step S704: Based on the conflict label and scene label of each candidate logical judgment text, concatenate the b candidate logical judgment texts to obtain the logical judgment text corresponding to each measurement detection type.

[0103] Specifically, for a particular anomaly type, there may be multiple expert judgment experience texts. These experience texts are merged to form a single long anomaly judgment experience text. In other words, even if multiple expert experiences exist for a single measurement detection type in the expert experience base, a single anomaly measurement type will ultimately correspond to only one long anomaly judgment experience text. For example, if a measurement detection type has three expert judgment experience texts, each with different rules, they can be directly concatenated into the Prompt, allowing the large model to understand multiple expert knowledge texts simultaneously and then output only a single logical judgment chain.

[0104] In one possible implementation, for each expert's experience, its implicit applicable scenarios, such as equipment type, abnormal characteristics, industry scenarios, etc., are analyzed and labeled with standardized tags. For example, expert A's experience: "If the voltage sag is greater than 20% and the duration is greater than 50ms, it is judged as a Class II loss (applicable to industrial motors)", the corresponding scenario tag can be determined as: [Scenario: Industrial motor; Abnormal characteristics: Voltage + Time]; expert B's experience: "If the voltage sag is accompanied by a power drop of greater than 30%, it is judged as a Class II loss (applicable to semiconductor equipment)", the corresponding scenario tag can be determined as: [Scenario: Semiconductor equipment; Abnormal characteristics: Voltage + Power]; expert C's experience: "If the current does not recover within 30ms after the sag, it is judged as a Class II loss (applicable to medical equipment)", the corresponding scenario tag can be determined as: [Scenario: Medical equipment; Abnormal characteristics: Voltage + Current recovery].

[0105] Furthermore, by comparing the conditions and action logic of different experts' experiences, conflict types are labeled, such as condition conflict, action conflict, and priority conflict. For example, condition conflict: Expert A uses "voltage + time" as the condition, and Expert B uses "voltage + power" as the condition. The corresponding conflict label is [Conflict type: condition dimension conflict; Conflict point: A uses time / B uses power]; No conflict but complementary: Expert C's "current recovery" condition does not overlap with the conditions of A and B (corresponding to different features respectively). The corresponding conflict label is [Conflict type: no conflict; Relationship: scene complementary].

[0106] In one possible embodiment, based on the conflict tag and scene tag of each candidate logical judgment text, b candidate logical judgment texts are concatenated to obtain the logical judgment text corresponding to each measurement detection type. For example, see [link to relevant documentation]. Figure 5 , Figure 5 This is a schematic diagram of a spliced ​​text provided in an embodiment of this application. Based on the different scene tags and conflict tags of the above embodiments, the logical judgment text of this measurement and detection type obtained after splicing can be as follows: Figure 5 As shown.

[0107] Furthermore, for conflicting but different experiences, the judgment nodes are split according to the scenario. For example, industrial motors use rule A, and semiconductors use rule B. For non-conflicting and complementary experiences, such as C and A / B, rule C is used as a supplementary judgment condition. For example, if in the industrial motor scenario, voltage and time meet rule A, and current has not recovered, then rule C is met, and the compensation level is upgraded.

[0108] In this embodiment, for situations where a single measurement and testing type corresponds to multiple candidate logical judgment texts, scenario tags clarify the applicable boundaries of each expert's experience, preventing the large model from misapplying industrial motor rules to semiconductor equipment. Conflict tags determine the essence of rule differences, such as conflicting conditions or complementary scenarios, guiding the large model to resolve conflicts according to the scenario priority principle. For example, a conflict tag prompts the large model: the conflict between A and B is a rule difference caused by different scenarios, not an error; during integration, rules under their respective scenarios should be retained, rather than forcibly merging them into a single condition. This approach avoids information distortion caused by modifying the original expert text and provides an integration navigation map for the large model through structured tags, ensuring that the final output logical judgment chain is both comprehensive and consistent.

[0109] In a specific embodiment, see Figure 6 , Figure 6This is a schematic diagram of a large language model parsing process provided in an embodiment of this application. First, expert experience natural language text is acquired. For a specific anomaly type, multiple expert judgment experience texts are generated. These experience texts are merged to form a long anomaly judgment experience text. Then, the large model performs semantic understanding on the expert experience natural language text and outputs it in a structured manner. In addition to the long experience text as input, domain knowledge injection is also required. Knowledge of the power metering domain and general logical judgment methods are injected into the large model generation process in the form of a Prompt. Specifically, power metering domain knowledge includes power metering data types and data sources, general power metering knowledge (metering equipment, metering processes, etc.), and general logical judgment methods include expected logical judgment methods, combinational logical judgment methods, and example logical judgment chains. The input Prompt, in addition to containing the long experience text and domain knowledge, also needs to strictly define the semantic understanding task and constrain the output format. Furthermore, to ensure the accuracy of the large model in semantic understanding and output format, LoRA and other methods can be used to further fine-tune the general large model to ensure the stability of the entire algorithm. For example, two low-rank matrices are added to the Q and V matrices of the model, and the parameters of the two matrices are trained.

[0110] Furthermore, by semantically understanding and structurally outputting expert experience in natural language text, a complete logical judgment chain can be obtained. This chain is a chain-like structure composed of multiple judgment nodes, and in more complex scenarios, it may also be a tree-like structure. Each judgment node defines a specific data type, its approximate data range, and a general judgment approach. Using a data query tool, the corresponding data for each measurement point is retrieved from a pre-designed tool based on the data type and its approximate data range, and then incorporated into the current judgment node. In addition, to ensure that the input to subsequent large models does not become excessively long, semantic compression techniques can be employed, such as semantic abbreviations, numerical precision compression, and encoding.

[0111] Furthermore, the obtained logical judgment chain / tree and the corresponding data of each node are combined into a Prompt. The Prompt specifies that the current task is to deduce the general judgment logic in the nodes into precise judgment conditions for the current data type. Specifically, this step requires leveraging the capabilities of a large inference model, requiring the model to deduce appropriate judgment conditions based on a given logical chain, data type, and data values. To reduce the difficulty of understanding the large model or enhance its ability to identify implicit features, preprocessing techniques are used to extract some common features of the original data sequence, such as mean and variance.

[0112] Furthermore, multiple rounds of iterative optimization are performed based on data from multiple measurement points, acquiring data from both abnormal and normal measurement points. This data acquisition and deduction process is repeated multiple times. After multiple iterations, the final logical judgment chain / tree is output. This chain / tree consists of multiple judgment nodes, each including data type, data range, data source, judgment condition, and conditional output. During each iteration, the larger model is used to determine if the result of the previous iteration is perfect and requires no modification. If so, the multi-round iteration stops.

[0113] In a specific embodiment, after obtaining the logic chain / tree completed through multiple rounds of deduction, anomaly detection is performed using a large amount of pre-acquired real online data. The success of the logic chain is determined based on the detection accuracy of the positive sample set. If it is lower than a preset threshold, such as 95%, the LLM deduction is repeated. If it passes, all generated negative samples are manually or automatically verified, mainly focusing on negatively judged positive samples and misjudged negative samples, combined with expert experience to propose modification suggestions. If no modification suggestions are provided, the result is directly output. If modification suggestions are provided, the expert suggestions are incorporated into the Prompt, combined with the original logic chain, and a new logic chain / tree is deduced from the LLM.

[0114] This invention leverages the semantic understanding, structured output, and logical reasoning capabilities of LLM (Limited Learning Model) to automatically transform expert experience into precise, executable, and reliable logical rule judgment chains / trees. This method significantly improves the efficiency of experts in resolving false positives and false negatives, and overcomes the limitations of traditional single rules by utilizing combined rules. Furthermore, by integrating the judgment experience of multiple experts and undergoing multiple rounds of logical reasoning through a large model, the optimal threshold value in logical judgments can be automatically determined, thus overcoming the limitations of individual knowledge.

[0115] In summary, in this embodiment, firstly, a logical judgment texts corresponding to a metering detection types are obtained, wherein each of the a metering detection types corresponds one-to-one with a logical judgment text. Then, based on each logical judgment text, a multi-level logical judgment structure for each metering detection type is determined. This multi-level logical judgment structure differs from a single threshold rule judgment. Furthermore, the power metering data of the metering point to be detected is obtained. Finally, based on the power metering data and the a logical judgment structures corresponding to the a metering detection types, the target metering detection type corresponding to the power metering data is determined from the a metering detection types. Thus, the target metering detection type of the power metering data of the metering point to be detected is obtained based on a multi-level logical judgment structure, which can improve the detection accuracy when detecting power metering data.

[0116] The methods of the embodiments of the present invention have been described in detail above, and the apparatus of the embodiments of the present invention is provided below.

[0117] See Figure 7 , Figure 7 This is a schematic diagram of the structure of a power metering data detection device provided in an embodiment of this application. Figure 7 As shown, the power metering data detection device 800 includes an acquisition unit 801 and a processing unit 802. The acquisition unit 801 is used to acquire a logical judgment texts corresponding to a metering detection types, wherein the a metering detection types and the a logical judgment texts correspond one-to-one. The processing unit 802 is used to determine the multi-level logical judgment structure of each metering detection type based on each logical judgment text; acquire the power metering data of the metering point to be detected; and determine the target metering detection type corresponding to the power metering data from the a metering detection types based on the power metering data and the a logical judgment structures corresponding to the a metering detection types.

[0118] In specific implementations, the acquisition unit 801 and the processing unit 802 in this application embodiment may also execute other implementation methods described in the power metering data detection method of this application embodiment, which will not be repeated here.

[0119] See Figure 8 , Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. For example... Figure 8 As shown, the electronic device 900 includes a transceiver 901, a processor 902, and a memory 903, which are connected via a bus 904. The memory 903 stores computer programs and data, and can transmit the data stored in the memory 903 to the processor 902. The electronic device 900 can be the aforementioned power metering data detection device 800, and the processor 902 can be the aforementioned acquisition unit 801 and processing unit 802. In this embodiment, the processor 902 is used to read the computer program in the memory 903 and execute some or all of the steps of the aforementioned power metering data detection method.

[0120] This application also provides a computer-readable storage medium storing a computer program that is executed by a processor to implement some or all of the steps of any of the power metering data detection methods described in the above method embodiments.

[0121] This application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the power metering data detection methods described in the above method embodiments.

[0122] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.

[0123] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0124] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus 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 or components 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 through some interfaces; the indirect coupling or communication connection between devices or modules may be electrical or other forms.

[0125] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0126] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software program modules.

[0127] If the integrated module is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0128] The embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for detecting electricity metering data, characterized in that, include: Obtain a logical judgment text corresponding to a metering detection types, wherein the a metering detection types correspond one-to-one with the a logical judgment texts, and the a metering detection types are used to reflect a operating status indicators of the power system; Based on each logical judgment text, determine the multi-level logical judgment structure for each measurement and testing type; Obtain the power metering data of the metering point to be tested; Based on the power metering data and the a logical judgment structures corresponding to the a metering detection types, the target metering detection type corresponding to the power metering data is determined from the a metering detection types.

2. The method as described in claim 1, characterized in that, The step of determining a multi-level logical judgment structure for each measurement and testing type based on each logical judgment text includes: Based on the first logical judgment text, an initial logical judgment structure for the first measurement detection type is determined, wherein the first logical judgment text is any one of the a logical judgment texts, the first measurement detection type is the measurement detection type corresponding to the first logical judgment text among the a measurement detection types, and the initial logical judgment structure includes n logical judgment nodes, each logical judgment node corresponding to a node requirement data type. Based on the data type required by each logical judgment node, determine the training data for each logical judgment node; Based on the training data of each logical judgment node, determine the judgment condition of each logical judgment node; Based on the initial logical judgment structure and the n judgment conditions corresponding to the n logical judgment nodes, the multi-level logical judgment structure of the first measurement and detection type is determined.

3. The method as described in claim 2, characterized in that, The initial logical judgment structure for determining the first measurement detection type based on the first logical judgment text includes: Perform semantic understanding on the first logical judgment text to obtain m detection steps; Analyze each detection step to determine the type of operation object, input parameter structure, and output result structure corresponding to each detection step; According to the preset data interaction rules, the operation object type, input parameter structure and output result structure corresponding to each detection step are format converted to determine the data interaction format corresponding to each detection step. The data interaction format includes the input field, output field and execution sequence number corresponding to each detection step. Based on the input fields, output fields and execution sequence number corresponding to each detection step, the m detection steps are logically sorted to determine the n logical judgment nodes and the node requirement data type corresponding to each logical judgment node. The initial logical judgment structure is determined based on the n logical judgment nodes and the node requirement data type corresponding to each logical judgment node.

4. The method as described in claim 2, characterized in that, The judgment conditions include the target data time range and the target judgment threshold; determining the judgment conditions for each logical judgment node based on the training data of each logical judgment node includes: Based on the training data of each logical judgment node, data feature analysis and candidate value extraction are performed to determine the time range of candidate data and the candidate judgment threshold for each logical judgment node. According to the preset instructions, the candidate data time range of each logical judgment node is constrained and filtered, and the target data time range of each logical judgment node is determined from the candidate data time range of each logical judgment node. According to the preset instructions, the conditional performance evaluation of the candidate judgment thresholds of each logical judgment node is performed, and the target judgment threshold of each logical judgment node is determined from the candidate judgment thresholds of each logical judgment node.

5. The method as described in claim 3, characterized in that, Based on the initial logical judgment structure and the n judgment conditions corresponding to the n logical judgment nodes, the multi-level logical judgment structure of the first measurement detection type is determined, including: Obtain the reference logic format for each type of operation object, wherein the reference logic format includes: reference execution priority, reference conflicting operation object type, and reference operation object threshold range; Based on the reference logic format, the initial logic judgment structure and the n judgment conditions corresponding to the n logic judgment nodes are verified to obtain the multi-level logic judgment structure of the first measurement detection type.

6. The method according to any one of claims 1-5, characterized in that, The step of determining the target metering detection type corresponding to the power metering data from the a metering detection types based on the power metering data and the a logical judgment structures corresponding to the a metering detection types includes: Determine the detection order of the a measurement and detection types; Based on the detection sequence, target detection data for each metering detection type is determined from the power metering data; Based on the target detection data of each measurement and detection type and the logical judgment structure of each measurement and detection type, the detection result of each measurement and detection type is determined; Based on the a detection results corresponding to the a metering detection types, the target metering detection type corresponding to the power metering data is determined.

7. The method as described in claim 1, characterized in that, The step of obtaining a logical judgment texts corresponding to a measurement and detection types includes: Obtain b candidate logical judgment texts corresponding to each measurement and testing type; Extract the scene tag for each candidate logical judgment text, wherein the scene tag is used to indicate the application scene type of each candidate logical judgment text; Based on the b scene tags corresponding to the b candidate logical judgment texts, conflict detection is performed on the candidate logical judgment texts corresponding to the same scene tags among the b scene tags to obtain a conflict tag for each candidate logical judgment text. The conflict tag is used to indicate the different steps in the candidate logical judgment texts corresponding to the same scene tags. Based on the conflict tag and scene tag of each candidate logical judgment text, the b candidate logical judgment texts are concatenated to obtain the logical judgment text corresponding to each measurement detection type.

8. A power metering data detection device, characterized in that, The device includes an acquisition unit and a processing unit; The acquisition unit is used to acquire a logical judgment texts corresponding to a metering detection types, wherein the a metering detection types correspond one-to-one with the a logical judgment texts, and the a metering detection types are used to reflect a operating status indicators of the power system. The processing unit is used to determine the multi-level logical judgment structure for each measurement and detection type based on each logical judgment text. Obtain the power metering data of the metering point to be tested; Based on the power metering data and the a logical judgment structures corresponding to the a metering detection types, the target metering detection type corresponding to the power metering data is determined from the a metering detection types.

9. An electronic device, characterized in that, include: A processor and a memory, the processor being connected to the memory, the memory being used to store a computer program, the processor being used to execute the computer program stored in the memory to cause the electronic device to perform the method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform the method as described in any one of claims 1-7.