A Label Diagnostic Method and System for the Power Industry that Integrates Multi-Source Evidence and Hierarchical Constraints
By constructing a two-level graph mapping mechanism and progressive diagnostic technology, the problem of industry classification mapping differences in the power marketing system was solved, realizing automated diagnosis and constraint output, ensuring the legality and credibility of labels, and reducing computational resource redundancy and processing latency.
Patent Information
- Application Number
- CN202611228557.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-13
- Publication Date
- 2026-11-17
AI Technical Summary
In the power marketing system, existing technology cannot effectively resolve the mapping differences between the internal industry classification of the power grid and the national economic industry classification. This results in the output results not belonging to the legitimate final-level nodes, and thus cannot be directly written into the structured business fields of the marketing file, creating the risk of illegal industry tags intruding into the database.
By employing a method that integrates multi-source evidence and hierarchical constraints, a two-level graph mapping mechanism is constructed for the national economic industry classification and the internal power grid industry classification. Through progressive diagnosis involving precise consistency verification, name and hierarchical similarity matching, and candidate set constraints, a limited set of candidate industries is generated. Multiple verifications and confidence assessments are performed before semantic analysis to ensure the legality of the output industry labels.
It has achieved automated diagnosis and constraint output of industry tags for power customers, reduced redundancy of computing resources, ensured the credibility and traceability of diagnostic results, avoided the risk of illegal tags being written into the database, and improved processing efficiency and accuracy.
Smart Images

Figure CN123115891A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of power marketing data governance, heterogeneous classification system mapping, computer-aided data diagnosis, and artificial intelligence constrained reasoning, and particularly to a power industry label diagnosis method and system that integrates multi-source evidence and hierarchical constraints. Background Technology
[0002] Electricity marketing systems typically record the name and code of a customer's industry when they apply for, modify, or maintain their records. This information is used to conduct electricity consumption statistics, load characteristic analysis, and business trend assessment by industry category. With the deepening of electricity market reforms and the liberalization of incremental distribution business, a large number of new and changing customers need to accurately identify their industry affiliation. Currently, industry labels in electricity marketing records are mainly entered manually by business personnel after checking a classification dictionary based on the business scope filled in by the customer during the application process. Some regions have introduced semantic model-based auxiliary classification tools.
[0003] However, the industry classification system used within the power industry differs from the National Economic Industry Classification in terms of the number of levels, node naming rules, and coding methods. There is no simple code mapping relationship between the two classification standards. Against this backdrop, how to utilize external evidence such as business scope information from business registration and National Economic Industry Classification codes to automatically verify and correct existing industry labels in marketing files has become an important component of power marketing data governance.
[0004] When using semantic models to classify business scope by industry, existing technology allows the model to freely select output from all industry classification nodes within the power grid. The industry name or code returned by the model may not belong to a valid node in the power grid's internal industry classification dictionary, or it may belong to a non-final-level statistical node. This results in the output being unable to be directly used to update the structured business fields of the marketing system, generating illegal industry tags that cannot be written. Summary of the Invention
[0005] To overcome the above shortcomings, this invention provides a power industry label diagnosis method and system that integrates multi-source evidence and hierarchical constraints. This solves the problem that the output results may not belong to the legitimate final-level nodes within the power grid and cannot be directly written into the structured business fields of marketing files, thus eliminating the risk of illegal industry labels intruding into the database due to model illusion.
[0006] In a first aspect, the present invention provides the following technical solution: a power industry label diagnosis method integrating multi-source evidence and hierarchical constraints, comprising the following steps: S1. Obtain electricity marketing archive data, business entity data, national economic industry classification hierarchical data and power grid internal industry classification hierarchical data, perform entity association and field standardization, and form evidence snapshot; S2, construct the national economic industry classification hierarchy map and the power grid internal industry classification hierarchy map respectively, generate the external industry evidence path based on the external industry hierarchy field, and locate the current internal industry node based on the existing industry name or existing industry code to generate the current internal industry path; S3, establish the mapping relationship between external industry nodes and internal industry nodes, and add the mapped internal industry node itself or its legal last-level descendant node to the candidate industry set; S4. Perform precise consistency verification. If the current internal industry node is a legitimate last-level node, and its standardized name is precisely consistent with at least one node in the external industry evidence path and there is no preset strong conflict, generate the first termination flag and terminate the subsequent diagnostic stage; otherwise, proceed to S5. S5, calculate the similarity between the current internal industry node name and the node names at each level of the external industry evidence path. When the similarity reaches the threshold and there is no preset strong conflict, generate a second termination flag and terminate the subsequent semantic analysis; otherwise, proceed to S6. S6, when the preset triggering conditions are met and the candidate industry set is not empty, the business scope and the candidate industry set are input into the semantic judgment module, so that the semantic judgment module determines the suggested industry only from the candidate industry set, and performs deterministic post-verification on the suggested industry. If the verification fails, the suggested industry name and suggested industry code are cleared. S7. Calculate the confidence level based on the evidence matching parameters, conflict flags, and abnormal states. Output the diagnostic results based on the confidence level and conflict flags. If there is a preset strong conflict, the candidate industry set is empty, the verification fails, or the confidence level does not reach the threshold, the process is transferred to manual review. The review results are used for version updates of mapping rules, diagnostic thresholds, and case library.
[0007] By adopting the above technical solutions, this invention constructs a two-level graph mapping mechanism for national economic industry classification and power grid internal industry classification. External evidence is constrained into a legitimate final-level candidate set, setting a limited output space for semantic analysis. Progressive diagnosis terminates subsequent stages when a conclusion can be reached through deterministic rules, achieving hierarchical and on-demand allocation of computing resources. Candidate set constraints and deterministic post-verification collaboratively form a dual technical constraint boundary for model output, preventing illegal or non-compliant labels from being written into business fields. Confidence assessment and a three-level triage mechanism transfer low-confidence or conflicting records to manual review. The review results are then verified offline, and the rules, thresholds, and case library are updated in a versioned manner. These steps work together to achieve the complete technical effect of automated diagnosis, constraint output, and continuous calibration of power customer industry labels.
[0008] Preferably, in step S1, the subject association is adopted in descending order of association certainty using at least one of the following: unified subject identifier, standardized enterprise name and alias, and standardized enterprise name and address combination; the field standardization includes character encoding unification, full-width and half-width conversion, whitespace and punctuation normalization, enterprise organization form suffix standardization, null value and placeholder cleanup, and multi-value field structuring; when an electricity customer is associated with multiple valid business entities or the subject association score is lower than the subject association threshold, a subject association conflict flag is generated.
[0009] Preferably, in step S2, the national economic industry classification hierarchy data is represented as a first directed hierarchy graph, where each node in the first directed hierarchy graph includes at least a national economic industry standard name, a national economic industry code, a node level, and a parent node identifier; the power grid internal industry classification hierarchy data is represented as a second directed hierarchy graph, where each node in the second directed hierarchy graph includes at least a power grid internal industry standard name, a power grid internal industry code, a node level, a parent node identifier, and a final-level node attribute; an external industry evidence path is generated using the external industry hierarchy field and the first directed hierarchy graph; the current internal industry node is located in the second directed hierarchy graph using the existing industry code or existing industry name, and the current internal industry path is generated by backtracking along the parent node direction; when the existing industry name and existing industry code cannot locate the same node in the second directed hierarchy graph, an industry name / code conflict flag is generated.
[0010] Preferably, in step S3, the nodes in the external industry evidence path are traversed from deep to shallow levels, prioritizing the establishment of a precise mapping of standardized names between external and internal industry nodes; when the deepest valid external industry node has a precise mapping, the expansion of the candidate industry set using shallower external industry nodes is stopped; when no precise mapping exists, the name similarity between the names of external and internal industry nodes is calculated, and internal industry nodes whose name similarity reaches the mapping threshold are retained; when the mapped internal industry node is not a last-level node, the legitimate last-level descendant nodes with that internal industry node as their ancestor are traversed; the candidate industries are sorted according to the mapping score, matching level depth, and candidate name distinguishability, deduplicated by internal industry code, and truncated according to a preset number of candidates.
[0011] Preferably, each diagnostic stage in S4 and S5 outputs a stage result, stage evidence, and a termination flag; S5 is executed only when the first termination flag is not generated in S4; the similarity is obtained by combining at least two string similarities; when any diagnostic stage generates a termination flag and there is no preset strong conflict, the diagnostic scheduler terminates the subsequent diagnostic stages.
[0012] Preferably, the preset triggering conditions in S6 include at least one of the following: the current internal industry node is not a legitimate last-level node; the current internal industry name contains a preset catch-all term; the ancestor node of the current internal industry node matches the external industry evidence path, but the current internal industry node does not match; there is a hierarchical misalignment between the current internal industry path and the external industry evidence path; the current internal industry node is not located but there is business scope or external industry evidence; the candidate industry supported by the business scope is inconsistent with the candidate industry supported by the external industry evidence path; multiple evidence sources form conflicting industry judgment results.
[0013] Preferably, the semantic analysis module in step S6 outputs structured data, which includes at least candidate industry identifiers, suggested industry names, suggested industry codes, semantic confidence, diagnostic status, and diagnostic descriptions. When the semantic analysis module times out, becomes unavailable, or fails to parse the structured data, it records the exception type and adds the corresponding customer to the retry queue or manual review queue after reaching a preset number of retries.
[0014] Preferably, the deterministic post-verification in S6 includes at least verifying the existence of the code, the last-level attribute, the correspondence between the name and code, and the membership relationship of the candidate set; when the suggested industry code exists, the suggested industry name is replaced with the standardized name in the power grid internal industry classification hierarchy data; when there is only a suggested industry name and the name uniquely corresponds to a node in the candidate industry set, its industry code is completed.
[0015] Preferably, the evidence matching parameters in S7 include at least subject association certainty, external evidence availability, matching level depth, matching score, semantic candidate consistency, and candidate member legality; the conflict indicators include at least subject association conflict, conflict between existing industry name and existing industry code, conflict between external industry evidence path, conflict between business scope and external industry evidence path, empty candidate set, illegal semantic judgment output, and abnormal semantic judgment module; the confidence level is calculated according to the parameter version corresponding to the diagnostic scenario, and the diagnostic results are divided into automatic output, retaining suggestions and reviewing, or clearing suggestions and reviewing by automatically passing the threshold and manually reviewing the threshold.
[0016] Secondly, this invention provides the following technical solution: a power industry tag diagnostic system integrating multi-source evidence and hierarchical constraints, comprising the following modules: The data acquisition module is used to acquire electricity marketing archive data, business entity data, national economic industry classification hierarchical data, and power grid internal industry classification hierarchical data. The entity association and standardization module is used to establish the association between electricity customers and business entities, standardize the fields of the acquired data, and generate diagnostic evidence snapshots. The hierarchy diagram construction and path parsing module is used to construct the hierarchical diagram of national economic industry classification and the hierarchical diagram of internal power grid industry classification, and generate external industry evidence paths and current internal industry paths; The mapping and candidate generation module is used to establish the mapping relationship between external industry nodes and internal industry nodes of the power grid, and to add the mapped internal industry node itself or its legal last-level descendant node to the candidate industry set. The progressive diagnosis scheduling module is used to execute diagnoses in the order of precise consistency verification, name and hierarchical similarity matching, and candidate set constraint semantic analysis, and to determine whether to trigger the next diagnosis stage based on the termination and conflict flags of the previous diagnosis stage. The constraint semantic analysis module is used to determine the suggested industry only from the candidate industry set when the candidate industry set is not empty; The output verification and evidence evaluation module is used to verify the existence of suggested industry codes, the last-level attributes of suggested industry nodes, the correspondence between suggested industry names and suggested industry codes, and the member relationships of the candidate set of suggested industries, and calculate the confidence level based on multi-source evidence, conflict flags and abnormal states. The audit review and feedback update module is used to save diagnostic paths, diagnostic evidence, and version information. It transfers objects with low confidence, strong conflicts, empty candidate sets, or illegal outputs to manual review and uses the manually reviewed samples for version updates of mapping rules, diagnostic thresholds, or case libraries.
[0017] By adopting the above technical solutions, the data acquisition module and the subject association and standardization module achieve unified access and alignment of multi-source heterogeneous data, solidifying traceable evidence snapshots; the hierarchical graph construction and path parsing module, together with the mapping and candidate generation module, establish a mapping relationship between two classification systems, converting external industry evidence into an internal set of legitimate final-level candidates; the progressive diagnosis scheduling module determines whether to trigger subsequent stages based on the termination and conflict flags of the preceding diagnosis stages, realizing hierarchical and on-demand allocation of computing resources; the constraint semantic judgment module is only triggered when both exact and similarity matching fail and the candidate set is not empty, ensuring that the model output is always limited to the range of legitimate final-level nodes; the output verification and evidence evaluation module performs multiple checks on code existence, final-level attributes, name-code correspondence, and candidate member relationships before the semantic output enters the business field, forming a technical barrier to prevent illegal label writing; the audit review and feedback update module saves complete diagnostic paths and version information, transfers low-confidence or conflicting objects to manual review, and uses the verified review results for version updates of rules, thresholds, and case libraries. The various modules work together to form a complete technical system for automated diagnosis, constraint output, and continuous evolution of power customer industry tags.
[0018] The present invention has the following beneficial effects: 1. In this invention, a technical solution is adopted to construct a two-level directed graph structure of national economic industry classification and power grid internal industry classification, and to establish a mapping relationship between external industry nodes and internal legal final-level nodes to generate a finite candidate industry set. This achieves the technical effect of uniformly constraining external multi-source heterogeneous evidence within the writable legal final-level industry code space of the power grid. Compared with the existing technology that directly uses semantic models to freely generate industry names and codes or relies solely on string equality for matching, this solves the problem that the output results may not belong to the legal final-level nodes within the power grid and cannot be directly written into the structured business fields of marketing files. It also eliminates the risk of illegal industry labels intruding into the database due to model illusion.
[0019] 2. In this invention, a progressive diagnostic technique is adopted, which sequentially performs diagnosis according to the order of precise consistency verification, name and hierarchical similarity matching, and candidate set constraint semantic judgment, and generates a termination flag to prevent subsequent stages from being triggered when a definite conclusion can be obtained in any preceding stage. This achieves the technical effects of hierarchical and on-demand allocation of computing resources, reducing the frequency of semantic model calls and the overall system processing latency. Compared with the existing technology, which calls all algorithms at once for all records regardless of complexity or directly uses a large model for end-to-end classification, this invention solves the problems of redundant occupation of computing resources and model failures that will directly lead to the interruption of the entire task, and achieves an effective balance between processing efficiency and diagnostic accuracy.
[0020] 3. In this invention, a technical solution is adopted that uses the candidate set as the forced output space of the semantic judgment module, performs multiple deterministic post-verification checks on code existence, last-level node attributes, name-code consistency, and candidate set member relationships before the semantic output is written into the business field, and combines evidence vectors, conflict flags, and abnormal states to calculate scenario-based confidence for three-level threshold diversion. At the same time, the manual review conclusions are updated offline and the mapping rules, diagnostic thresholds, and case library are versioned. This achieves the technical effect of dual technical constraints on the input-side space limitation and output-side legality verification of the model output, ensuring the credibility and traceability of the diagnostic results, and realizing continuous system calibration. Compared with the existing technology that only outputs the final label without saving intermediate evidence and decision paths, and where a single review result directly covers the online rules, this solution solves the problems of unauditable diagnostic process, untraceable historical caliber adjustments, and unverified feedback directly polluting the online rules, forming a complete closed-loop management system for label diagnosis in the power customer industry. Attached Figure Description
[0021] Figure 1 This is a flowchart of the power industry tag diagnosis method that integrates multi-source evidence and hierarchical constraints proposed in this invention. Figure 2This is a schematic diagram of the system modules of the power industry tag diagnostic system that integrates multi-source evidence and hierarchical constraints proposed in this invention. Figure 3 This is a schematic diagram of the two-level mapping and candidate generation of the power industry label diagnosis method that integrates multi-source evidence and hierarchical constraints proposed in this invention. Figure 4 This is a schematic diagram of the dynamic triggering of the progressive diagnostic chain of the power industry tag diagnosis method that integrates multi-source evidence and hierarchical constraints proposed in this invention. Figure 5 This is a schematic diagram of the confidence diversion and feedback closed loop of the power industry label diagnosis method that integrates multi-source evidence and hierarchical constraints proposed in this invention. Detailed Implementation
[0022] The technical solutions in 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.
[0023] Example 1: In a first embodiment of the present invention, the present invention provides a power industry label diagnosis method that integrates multi-source evidence and hierarchical constraints, such as... Figure 1 As shown, taking the industry tag diagnostic process of a power customer to be diagnosed as an example, it includes the following steps: S1, Data Acquisition and Preprocessing: Acquire marketing profile data of the electricity customer to be diagnosed, the marketing profile data including at least customer identifier, customer name, existing industry name and existing industry code; acquire business entity data associated with the electricity customer, the business entity data including at least enterprise name, entity identifier and business scope; acquire national economic industry classification hierarchical data and power grid internal industry classification hierarchical data.
[0024] The association of entities is determined in descending order of association certainty, employing at least one of the following: unified entity identifier, standardized enterprise name and alias, and a combination of standardized enterprise name and address. Specifically, unified entity identifier is given priority in establishing association; when an entity identifier is missing, the customer name is standardized using Unicode, full-width and half-width characters are converted, whitespace and punctuation are normalized, and the enterprise organizational form suffix is standardized, and the association is established using the standardized name.
[0025] Field standardization involves converting null values, placeholders, repeating delimiters, and multi-valued fields into a uniform structure. Existing industry names and codes allow one-to-many input, but during localization, the name and code must point to the same internal node; inconsistencies are recorded as code-name conflicts. Before each diagnosis, the original fields used, standardized fields, dictionary versions, and data timestamps are fixed, forming an evidence snapshot that cannot be overwritten by subsequent field updates.
[0026] When an electricity customer is associated with multiple valid business entities or the entity association score is lower than the entity association threshold, an entity association conflict flag is generated.
[0027] S2, Two-level graph construction and path resolution: Representing the hierarchical data of national economic industry classification as a first-level directed graph. Each node attribute must include at least the name of the national economic industry standard, the national economic industry code, the node level, and the parent node identifier. The national economic industry classification table is parsed into four levels of paths: category, major category, intermediate category, and minor category.
[0028] The industry classification hierarchy data within the power grid is represented as a second directed hierarchical graph. Node attributes must include at least the internal industry standard name of the power grid, the internal industry code of the power grid, the node level, the parent node identifier, and the attributes of the last-level node. The entire internal industry table of the power grid is parsed into a maximum of five levels of paths. For each internal node, an index is created from the code to the node and an index is created from the normalized name to the node. The attributes of the last-level node are determined based on the last valid classification node in the path.
[0029] Upon receiving a record to be diagnosed, the node is first located using the existing industry code. If multiple nodes exist for the same code, they are filtered using standardized names. If the code cannot be located, the standardized name is used for location. If neither the code nor the name can be used for location, a hierarchical location conflict is recorded. An external industry evidence path is generated using the external industry hierarchy field and the first directed hierarchy graph. Locate the current internal industry node in the second directed hierarchy graph using the existing industry code or name, and generate the current internal industry path by backtracking along the parent node. The external industry hierarchy field is read in the order of category, major category, intermediate category, and minor category, and null values and duplicate names are removed to form a list of external industry evidence sorted by hierarchy. When an existing industry name and an existing industry code cannot be located at the same node in the second directed hierarchy graph, an industry name / code conflict flag is generated.
[0030] S3, Generation of candidate industry set: such as Figure 3 As shown, the path to external industry evidence. For each valid node n in the graph from deep to shallow, calculate its relationship with the second directed hierarchy graph. Mapping evidence for each path node s. Mapping evidence includes at least whether the canonical names are exactly the same, name similarity, and the respective levels of n and s. Mapping edges are formed. , where type represents exact mapping, similar mapping, or manual rule mapping, score represents the comparable score of the mapping, and version represents the version of the mapping rule used.
[0031] Specifically, first check The deepest effective node is precisely mapped; if a precise mapping exists, shallower nodes are no longer used to expand the candidates. If a precise mapping does not exist, the combined similarity is calculated. And retain those that reach the threshold The mapping nodes. This order prioritizes finer-grained evidence, avoiding the generation of excessively large candidate sets by shallow categories.
[0032] For each mapped internal node s, if s is a last-level node, add s to the candidate set; if s is not a last-level node, then iterate through the nodes. The last descendant node of s as its ancestor is added to the candidate set. Each candidate carries at least the internal industry name, internal industry code, complete internal path, matching external level, external name, mapped internal node, mapping type, and mapping score.
[0033] Candidates are sorted by mapping score, matching level depth, and candidate name distinctiveness, deduplicated by internal industry code, and truncated to K candidates. K and T s All configuration parameters include a version number. When the candidate set is empty, the system does not allow the semantic model to freely generate internal industry names; instead, it converts the records to unmatchable or manually reviewed records.
[0034] S4, Precise Consistency Check: such as Figure 4 As shown, a precise consistency check is performed. When the current internal industry node is a legitimate last-level node, and its standardized name is precisely consistent with at least one node in the external industry evidence path without any pre-set strong conflicts, a first termination flag is generated and the subsequent diagnostic phase is terminated.
[0035] In the first stage, the system generates precise hit evidence, sets the diagnostic status to correct, recommends retaining the current internal industry name and code, sets the confidence level to 1, and specifies the external level of the hit in the diagnostic description. The scheduler terminates subsequent diagnostic stages after reading the first termination flag, neither calculating similarity nor invoking semantic analysis.
[0036] S5, Name and Hierarchical Similarity Matching: If the exact consistency check fails, proceed to the name and hierarchical similarity matching stage. Calculate the TokenSortRatio and PartialRatio between the current internal industry node name and the node names at each level of the external industry evidence path, taking the highest combined score. When scores are the same, prioritize deeper external levels. When the combined score reaches the threshold, the current node is a legitimate last-level node, and there are no preset strong conflicts, generate a second termination flag and terminate subsequent semantic analysis.
[0037] The audit log saves both the original score and the actual threshold version used, which is convenient for subsequent recalculation.
[0038] S6, Candidate Set Constraint Semantic Judgment and Deterministic Post-Verification: If the name and hierarchical similarity matching fails, determine whether the preset triggering conditions are met. The preset triggering conditions include at least one of the following: the current internal industry node is not a legitimate last-level node; the current internal industry name contains a preset catch-all term; the ancestor node of the current internal industry node matches the external industry evidence path, but the current internal industry node does not match; there is a hierarchical misalignment between the current internal industry path and the external industry evidence path; the current internal industry node is not located but there is business scope or external industry evidence; the candidate industry supported by the business scope is inconsistent with the candidate industry supported by the external industry evidence path; multiple evidence sources form conflicting industry judgment results.
[0039] When preset trigger conditions are met and the candidate industry set is not empty, the standardized enterprise name, business scope, current internal industry path, external industry evidence path, prior diagnostic evidence, and the candidate industry set are input into the semantic analysis module. The semantic analysis module outputs structured data, which includes at least the candidate industry identifier, suggested industry name, suggested industry code, semantic confidence, diagnostic status, and diagnostic description. The semantic analysis module only determines suggested industries from the candidate industry set and is not allowed to output new industries outside the candidate set.
[0040] When the semantic analysis module times out, becomes unavailable, or fails to parse structured data, it records the exception type and adds the corresponding customer to the retry queue or manual review queue after reaching the preset number of retries.
[0041] The suggested industry output by the semantic analysis module undergoes deterministic post-validation, including at least verifying the existence of the code, the last-level attribute, the correspondence between the name and code, and the membership relationship of the candidate set. When the suggested industry code exists, the suggested industry name is replaced with the standardized name in the power grid's internal industry classification hierarchy data; when only the suggested industry name exists and that name uniquely corresponds to a node in the candidate industry set, its industry code is completed; in other cases where the name and code are missing or inconsistent, the suggested industry name and suggested industry code are cleared, and an illegal conflict flag is generated for output.
[0042] S7, Confidence calculation, result output, and manual review: (e.g.) Figure 5 As shown, an evidence vector is constructed and its confidence level is calculated based on evidence matching parameters, conflict flags, and anomalous states. The evidence vector includes at least the following components:
[0043] The certainty of the relationship between the parties refers to the reliability of the relationship between the electricity customer and the business entity. In this scheme, The value is assigned based on the association method: 1.0 when establishing an association using a unified entity identifier, 0.8 when establishing an association using a standardized enterprise name and alias, 0.6 when establishing an association using a combination of a standardized enterprise name and address, and 0 when a valid association cannot be established.
[0044] External evidence availability refers to the completeness of the external industry evidence path. In this scheme, The value is assigned based on the filling status of the external industry level field. The value is 1.0 when all four levels of fields (category, major category, intermediate category, and minor category) are valid, 0.85 when one level is missing, 0.6 when two levels are missing, and 0.3 when three or more levels are missing.
[0045] The current internal node legitimacy indicates whether the current internal industry node is a legitimate last-level node. In this scheme, It is a binary variable. It is assigned a value of 1.0 when the current node is a valid last-level node, and a value of 0 otherwise.
[0046] Matching depth refers to the deepest level of the external industry evidence path that matches the current internal node. In this scheme, The value is assigned according to the proportion of the matching level to the total level of the external path: 1.0 for minor category matching, 0.75 for medium category matching, 0.5 for major category matching, 0.25 for category matching, and 0 for no level matching.
[0047] The exact consistency result indicates whether the current internal node name is exactly the same as the node name in the external evidence path. In this scheme, It is a binary variable; it is assigned the value 1.0 when the values are exactly the same as the variable, and 0 otherwise.
[0048] Name similarity represents the combined similarity score between the current internal node name and the best matching node name in the external evidence path. In this scheme, The larger of the two string similarity metrics, TokenSortRatio and PartialRatio, is divided by 100, with a value range of [0,1]. The candidate generation stage in step S3 has already been calculated and saved, and it is directly substituted as a component of the evidence vector when calculating the confidence level.
[0049] Semantic candidate consistency refers to whether the suggested industries output by the semantic analysis module are consistent with the candidate industries supported by external evidence paths. In this solution, It is a binary variable; it is assigned a value of 1.0 when the values are consistent and a value of 0 when the values are inconsistent.
[0050] Candidate member legitimacy indicates whether the suggested industry output by the semantic analysis module belongs to the generated candidate industry set. In this solution, It is a binary variable, and is assigned a value of 1.0 if it belongs to the candidate set, and a value of 0 otherwise.
[0051] Conflict type indicates the type and severity of conflicts identified during the diagnostic process. In this solution, The value is assigned based on the type of conflict: strong conflicts such as subject association conflict, empty candidate set, and illegal semantic output are assigned a value of 1.0; general conflicts such as external path conflict and business scope conflict are assigned a value of 0.6; and no conflict is assigned a value of 0.
[0052] The exception type indicates whether an exception has occurred in the semantic analysis module. In this solution, This is a binary variable. It is assigned a value of 1.0 when an exception such as timeout, service unavailability, or resolution failure occurs, and otherwise it is assigned a value of 0.
[0053] In a preferred embodiment, the confidence level is calculated using the following linear weighted formula. Different parameter versions are used for different diagnostic stages: the precise consistency verification stage, the name and hierarchical similarity matching stage, and the candidate set constraint semantic judgment stage. : ; in, Indicates in parameter version The calculated scenario-based confidence score ranges from [0,1]. to For positive weights, respectively corresponding to , , , , , , , eight positive evidence components; and are penalty weights, respectively corresponding to the conflict type and the anomaly type ; each weight is a non-negative number, and is determined by a labeled verification set; the function limits the calculation result to the interval [0, 1].
[0054] In a scenario where the exact consistency check is passed and there is no conflict, the confidence level is directly set to 1; data missing or model anomaly is not represented by negative confidence, but is separately recorded by an anomaly status field.
[0055] The conflict types at least include subject association conflict, conflict between existing industry name and existing industry code, external industry evidence path conflict, conflict between business scope and external industry evidence path, empty candidate set, illegal semantic analysis output, and semantic analysis module anomaly.
[0056] The confidence level is calculated according to the parameter version corresponding to the diagnosis scenario, and the diagnosis result is divided into three levels through an automatic pass threshold T1 and a manual review threshold T2: when Q≥T1 and there is no preset strong conflict, the diagnosis result is automatically output; when T2≤Q<T1, the suggestion is retained and transferred to spot check or manual review; when Q<T2, a preset strong conflict exists, the candidate industry set is empty, or the post-determinism check fails, the suggestion is cleared and transferred to manual review. The thresholds T1 and T2 are calibrated and determined by the labeled verification set according to the business requirements for accuracy and recall, are saved along with the diagnosis scenario and the parameter version, and global constants cannot be modified alone without recording the historical version.
[0057] When there is a preset strong conflict, the candidate industry set is empty, the post-determinism check fails, or the confidence level does not reach the corresponding threshold, the power customer to be diagnosed is transferred to manual review. The review interface simultaneously displays the original label path, external path, business scope, candidate set, diagnosis route and conflict reason, and the reviewer can only confirm the industry from the current valid internal last-level dictionary, or select undetermined and fill in the reason.
[0058] Feedback closed loop and versioned update A review sample is composed of the manually confirmed internal last-level node, review evidence, original candidate industry set and error reason. The samples are respectively entered into the rule candidate library, threshold calibration set or case library according to the conflict type and diagnosis scenario. The candidate change is verified on a fixed verification set or a shadow batch, and a new version is generated after meeting the preset constraints of accuracy, illegal output rate, manual review rate and model call rate.
[0059] Specifically, rule updates refer to generating mapping rules to be reviewed from recurring mapping relationships with consistent review conclusions. After review and approval, the applicable level, preconditions, and version are recorded. Threshold updates refer to calibrating labeled review samples according to diagnostic scenarios, saving the training sample range, validation sample range, old threshold, new threshold, and evaluation results. Case library updates refer to saving de-identified business scope characteristics, candidate industry sets, confirmed industries, and conflict types. Online tasks reference immutable rule, threshold, and case library versions; when an anomaly is detected, the previous version can be switched back, and affected records can be replayed based on audit records.
[0060] Example 2: This invention provides a power industry tag diagnostic system that integrates multi-source evidence and hierarchical constraints, such as... Figure 2 As shown. The specific implementation process of this system is as follows:
[0061] The system includes the following modules: data acquisition module, subject association and standardization module, hierarchical graph construction and path parsing module, mapping and candidate generation module, progressive diagnosis and scheduling module, constraint semantic analysis module, output verification and evidence evaluation module, and audit review and feedback update module.
[0062] During the system initialization phase, the data acquisition module loads the national economic industry classification hierarchy data and the power grid internal industry classification hierarchy data. Based on this, the hierarchy graph construction and path parsing module constructs the first and second directed hierarchy graphs and establishes bidirectional indexes from code to node and from name to node.
[0063] During system operation, after the data acquisition module obtains electricity marketing archive data and business entity data, the entity association and standardization module establishes the association between electricity customers and business entities, performs field standardization, and generates a diagnostic evidence snapshot. Specifically, the entity association uses at least one of the following in descending order of association certainty: unified entity identifier, standardized enterprise name and alias, and a combination of standardized enterprise name and address.
[0064] The hierarchy graph construction and path parsing module generates external industry evidence paths based on the external industry hierarchy field and the first directed hierarchy graph. It locates the current internal industry node in the second directed hierarchy graph based on the existing industry code or existing industry name, and generates the current internal industry path by tracing back along the parent node.
[0065] The mapping and candidate generation module establishes the mapping relationship between external industry nodes and internal power grid industry nodes. It traverses the external industry evidence path in order from deep level to shallow level, prioritizes the establishment of accurate mapping, and calculates name similarity when no accurate mapping exists. It retains internal nodes that reach the mapping threshold and adds the mapped internal node itself or its legal last-level descendant node to the candidate industry set. After sorting by mapping score and matching level depth, it removes duplicates and truncates the nodes by internal industry code.
[0066] The progressive diagnostic scheduling module executes diagnostics in the following order: precise consistency verification, name and hierarchical similarity matching, and candidate set constraint semantic analysis. In the precise consistency verification phase, if the current internal industry node is a legitimate final-level node, and its standardized name is precisely consistent with at least one node in the external industry evidence path without any preset strong conflicts, a first termination flag is generated, and subsequent phases are terminated; otherwise, the name and hierarchical similarity matching phase is triggered. In the similarity matching phase, if the combined similarity reaches a threshold and there are no preset strong conflicts, a second termination flag is generated, and subsequent semantic analysis is terminated; otherwise, the constraint semantic analysis module is triggered when preset triggering conditions are met and the candidate set is not empty.
[0067] The constraint semantic judgment module is triggered only when no termination flag is generated in the precise consistency verification stage and the name and hierarchical similarity matching stage, and the candidate industry set is not empty. It takes the business scope and the candidate industry set as input, determines the suggested industry only from the candidate industry set, and outputs structured data.
[0068] The output verification and evidence evaluation module performs deterministic post-verification on the suggested industries, verifying the existence of suggested industry codes, the last-level attributes of suggested industry nodes, the correspondence between suggested industry names and suggested industry codes, and the member relationships of the candidate set of suggested industries. It also calculates confidence based on multi-source evidence, conflict flags, and abnormal states. If the verification fails, the suggested industry name and suggested industry code are cleared.
[0069] The audit review and feedback update module saves diagnostic paths, diagnostic evidence, and version information, transferring objects with low confidence, strong conflicts, empty candidate sets, or invalid outputs to manual review. The review interface displays the original label path, external path, business scope, candidate set, diagnostic route, and conflict reasons. The review results do not directly overwrite the original evidence snapshot, but are associated with the original diagnostic record as a new review record. This module also uses manually reviewed samples, after offline verification, for version updates of mapping rules, diagnostic thresholds, or the case library.
[0070] Replacement Method 1: Name similarity can be achieved using TokenSortRatio, PartialRatio, edit distance, character n-gram, vector similarity, or a combination thereof, as long as the hierarchical depth and candidate generation constraints are preserved.
[0071] Alternative Method 2: The semantic analysis module can be implemented by a local large language model, classification model, retrieval enhancement model, or a combination of rules and models; the model type is not the only limitation of this invention, the core is to input a finite number of candidates, output candidate members and verify them after determinism.
[0072] Replacement Method 3: The national economic industry classification hierarchy and the power grid internal classification hierarchy can be stored using a tree structure, a directed acyclic graph that allows multiple parent nodes, or a versioned relational table; as long as the ancestor path and the set of last-level descendants can be parsed.
[0073] Replacement Method 4: The candidate industry set can be dynamically generated at runtime or generated from a pre-calculated mapping table; the pre-calculation results should carry dictionary versions and mapping versions.
[0074] Replacement Method 5: The entity association can use the unified social credit code, standardized name, alias, address or a combination thereof; if the association is not unique, there must be evidence of conflict.
[0075] Replacement method six: Contextualized confidence can be achieved using linear weighting, segmentation rules, probability calibration, or lookup table models; strong conflict priority backoff and the record of the version of the parameters used cannot be omitted.
[0076] Replacement method seven: Manual review can be completed through the work order system, audit form, or batch files; feedback should be verified and released before being entered into online rules.
[0077] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A power industry tag diagnosis method that fuses multi-source evidence with hierarchical constraints, characterized in that, Includes the following steps: S1. Obtain electricity marketing archive data, business entity data, national economic industry classification hierarchical data and power grid internal industry classification hierarchical data, perform entity association and field standardization, and form evidence snapshot; S2, construct the national economic industry classification hierarchy map and the power grid internal industry classification hierarchy map respectively, generate the external industry evidence path based on the external industry hierarchy field, and locate the current internal industry node based on the existing industry name or existing industry code to generate the current internal industry path; S3, establish the mapping relationship between external industry nodes and internal industry nodes, and add the mapped internal industry node itself or its legal last-level descendant node to the candidate industry set; S4. Perform precise consistency verification. If the current internal industry node is a legitimate last-level node, and its standardized name is precisely consistent with at least one node in the external industry evidence path and there is no preset strong conflict, generate the first termination flag and terminate the subsequent diagnostic stage; otherwise, proceed to S5. S5, calculate the similarity between the current internal industry node name and the node names at each level of the external industry evidence path. When the similarity reaches the threshold and there is no preset strong conflict, generate a second termination flag and terminate the subsequent semantic analysis; otherwise, proceed to S6. S6, when the preset triggering conditions are met and the candidate industry set is not empty, the business scope and the candidate industry set are input into the semantic judgment module, so that the semantic judgment module determines the suggested industry only from the candidate industry set, and performs deterministic post-verification on the suggested industry. If the verification fails, the suggested industry name and suggested industry code are cleared. S7. Calculate the confidence level based on the evidence matching parameters, conflict flags, and abnormal states. Output the diagnostic results based on the confidence level and conflict flags. If there is a preset strong conflict, the candidate industry set is empty, the verification fails, or the confidence level does not reach the threshold, the process is transferred to manual review. The review results are used for version updates of mapping rules, diagnostic thresholds, and case library.
2. The method of claim 1, wherein the method further comprises: In S1, the subject association is ranked from high to low according to the certainty of the association, using at least one of the following: unified subject identifier, standardized enterprise name and alias, and standardized enterprise name and address combination; the field standardization includes character encoding unification, full-width and half-width conversion, whitespace and punctuation normalization, enterprise organization form suffix standardization, null value and placeholder cleanup, and multi-value field structuring; when an electricity customer is associated with multiple valid business entities or the subject association score is lower than the subject association threshold, a subject association conflict flag is generated.
3. The method of claim 1, wherein, In step S2, the national economic industry classification hierarchical data is represented as a first directed hierarchical graph, where each node includes at least the national economic industry standard name, national economic industry code, node level, and parent node identifier; the power grid internal industry classification hierarchical data is represented as a second directed hierarchical graph, where each node includes at least the power grid internal industry standard name, power grid internal industry code, node level, parent node identifier, and final-level node attribute; and the external industry evidence path is generated using the external industry hierarchy field and the first directed hierarchical graph. Locate the current internal industry node in the second directed hierarchy graph using the existing industry code or existing industry name, and generate the current internal industry path by backtracking along the parent node direction; when the existing industry name and existing industry code cannot locate the same node in the second directed hierarchy graph, generate an industry name code conflict flag.
4. The method of claim 1, wherein, In step S3, the nodes in the external industry evidence path are traversed from deep to shallow levels, and a precise mapping of standardized names between external industry nodes and internal industry nodes is established first. When the deepest valid external industry node has an exact mapping, stop expanding the candidate industry set using shallower-level external industry nodes; when no exact mapping exists, calculate the name similarity between the external industry node name and the internal industry node name, and retain internal industry nodes whose name similarity reaches the mapping threshold; when the mapped internal industry node is not a last-level node, traverse the valid last-level descendant nodes with that internal industry node as their ancestor; sort the candidate industries according to the mapping score, matching level depth, and candidate name distinguishability, remove duplicates using the internal industry code, and truncate according to the preset number of candidates.
5. The method of claim 1, wherein, Each diagnostic stage in S4 and S5 outputs a stage result, stage evidence, and a termination flag; S5 is executed only if the first termination flag is not generated in S4; the similarity is obtained by combining at least two string similarities. When a termination flag is generated in any diagnostic stage and there is no preset strong conflict, the diagnostic scheduler terminates the subsequent diagnostic stages.
6. The method of claim 1, wherein, The preset triggering conditions in S6 include at least one of the following: the current internal industry node is not a legitimate last-level node; the current internal industry name contains a preset catch-all term; the ancestor node of the current internal industry node matches the external industry evidence path, but the current internal industry node does not match; there is a hierarchical misalignment between the current internal industry path and the external industry evidence path; the current internal industry node is not located but there is business scope or external industry evidence; the candidate industry supported by the business scope is inconsistent with the candidate industry supported by the external industry evidence path. Multiple sources of evidence lead to conflicting industry judgments.
7. The method of claim 1, wherein the method further comprises: The semantic analysis module in S6 outputs structured data, which includes at least candidate industry identifiers, suggested industry names, suggested industry codes, semantic confidence, diagnostic status, and diagnostic descriptions. When the semantic analysis module times out, becomes unavailable, or fails to parse structured data, it records the exception type and adds the corresponding customer to the retry queue or manual review queue after reaching the preset number of retries.
8. The method of claim 1, wherein the method further comprises: The deterministic post-verification in S6 includes at least verifying the existence of the verification code, the last-level attribute, the correspondence between the name and code, and the membership relationship of the candidate set. When the suggested industry code exists, the suggested industry name is replaced with the standardized name in the power grid internal industry classification hierarchy data. When there is only a suggested industry name and the name uniquely corresponds to a node in the candidate industry set, its industry code is completed.
9. The method of claim 1, wherein the method further comprises: The evidence matching parameters in S7 include at least subject association certainty, external evidence availability, matching level depth, matching score, semantic candidate consistency, and candidate member legality; the conflict indicators include at least subject association conflict, conflict between existing industry name and existing industry code, conflict between external industry evidence path, conflict between business scope and external industry evidence path, empty candidate set, illegal semantic judgment output, and abnormal semantic judgment module; the confidence level is calculated according to the parameter version corresponding to the diagnostic scenario, and the diagnostic results are divided into automatic output, retaining suggestions and reviewing, or clearing suggestions and reviewing by automatically passing the threshold and manually reviewing the threshold.
10. A power industry tag diagnosis system that fuses multi-source evidence with hierarchical constraints, characterized by, The power industry label diagnostic method for integrating multi-source evidence and hierarchical constraints as described in any one of claims 1-9 includes the following modules: The data acquisition module is used to acquire electricity marketing archive data, business entity data, national economic industry classification hierarchical data, and power grid internal industry classification hierarchical data. The entity association and standardization module is used to establish the association between electricity customers and business entities, standardize the fields of the acquired data, and generate diagnostic evidence snapshots. The hierarchy diagram construction and path parsing module is used to construct the national economic industry classification hierarchy diagram and the power grid internal industry classification hierarchy diagram, and generate external industry evidence paths and current internal industry paths; The mapping and candidate generation module is used to establish the mapping relationship between external industry nodes and internal industry nodes of the power grid, and to add the mapped internal industry node itself or its legal last-level descendant node to the candidate industry set. The progressive diagnosis scheduling module is used to execute diagnoses in the order of precise consistency verification, name and hierarchical similarity matching, and candidate set constraint semantic analysis, and to determine whether to trigger the next diagnosis stage based on the termination and conflict flags of the previous diagnosis stage. The constraint semantic analysis module is used to determine the suggested industry only from the candidate industry set when the candidate industry set is not empty; The output verification and evidence evaluation module is used to verify the existence of suggested industry codes, the last-level attributes of suggested industry nodes, the correspondence between suggested industry names and suggested industry codes, and the member relationships of the candidate set of suggested industries, and calculate the confidence level based on multi-source evidence, conflict flags and abnormal states. The audit review and feedback update module is used to save diagnostic paths, diagnostic evidence, and version information. It transfers objects with low confidence, strong conflicts, empty candidate sets, or illegal outputs to manual review and uses the manually reviewed samples for version updates of mapping rules, diagnostic thresholds, or case libraries.
