A method and system for identifying lifecycle risks of electronic pricing scales

By generating a wide table of equipment features and combining it with Hidden Markov Models and the Isolation Forest algorithm, the interpretability and traceability issues of risk identification throughout the entire lifecycle of electronic price-computing scales are solved. This enables the collaborative identification of time-series anomalies and combined risks, and provides a checklist that can be manually verified.

CN123160205APending Publication Date: 2026-11-24NATIONAL INSTITUTE OF METROLOGY CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611654850.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-26
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

The existing intelligent supervision platform for electronic price-computing scales lacks collaborative identification and evidence chain interpretation of time-series anomalies and combined risks throughout the entire life cycle. This makes it difficult for business records to form a unified life cycle sequence, and the anomaly identification algorithm rules are unable to detect sequence anomalies. The model results lack evidence chain interpretation and cannot be traced or manually reviewed.

Method used

By adopting a lifecycle risk identification method for electronic price-computing scales, we obtain full lifecycle business records, generate a wide table of equipment characteristics, use a hidden Markov model for sequence anomaly identification and isolated forest for outlier detection, combine interpretable regulatory rules for judgment, output a comprehensive risk score and risk level, and generate a checklist that can be manually reviewed.

Benefits of technology

It enables interpretable, traceable, and automatic identification and verification of risks throughout the entire lifecycle of electronic price-computing scales. By centrally extracting time, frequency, interval, and closed-loop characteristics, it constructs a device characteristic data table, which improves the ability to identify cross-stage time sequence anomalies and closed-loop gaps, preserves the interpretability of regulatory rules and the chain of evidence, and supports manual review.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123160205A_ABST
    Figure CN123160205A_ABST
Patent Text Reader

Abstract

This invention relates to the field of metrological data processing and discloses a method and system for identifying lifecycle risks of electronic price-computing scales. The method includes: obtaining the full lifecycle business records of the electronic price-computing scales from the business system, mapping them to obtain a sequence of equipment lifecycle events, and generating a wide table of equipment features; determining and outputting rule risk scores and rule hit evidence according to interpretable regulatory rules; using a Hidden Markov Model to identify sequence anomalies in the equipment lifecycle event sequence, outputting sequence risk scores and anomalous sequence fragments; selecting multidimensional numerical features based on the wide table of equipment features, and using an isolated forest for unsupervised outlier detection, outputting outlier risk scores and main anomalous features; weighted fusion of the rule risk score, sequence risk score, and outlier risk score to obtain a comprehensive risk score and risk level; outputting the risk level, and simultaneously outputting the hit rule number, anomalous sequence fragment, and main outlier features, merging them to form a checklist that can be manually verified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of metrological data processing technology, and in particular to a method and system for identifying lifecycle risks of electronic price-computing scales. Background Technology

[0002] Existing technologies include intelligent supervision platforms for electronic price-computing scales. These platforms use a unique information code, or "one code per scale," as their core to aggregate information across various stages of electronic price-computing scale production, type evaluation, mandatory verification, use, maintenance, supervision and inspection, complaints and reports, and law enforcement. This enables equipment identity verification, information traceability, public QR code scanning for querying, and closed-loop supervision support. Public information from the National Intelligent Measurement Supervision Platform for Electronic Price-Computing Scales shows that its functions include full lifecycle information aggregation, key data anti-counterfeiting traceability, closed-loop measurement supervision support, and public query and supervision; technologies include unique anti-counterfeiting identity codes, multi-seal verification, dynamic key encryption and decryption, and trusted transmission via the Internet of Things.

[0003] The platform focuses on information aggregation, identity verification, anti-counterfeiting traceability, and regulatory business collaboration, and can solve problems such as "Does this scale exist?", "Is the information verifiable?", and "Is key data traceable?". However, it has not yet disclosed mechanisms for addressing whether there are any abnormalities in the time sequence of the entire life cycle of the scale, collaborative risk identification of combined data, and interpretation of the chain of evidence.

[0004] Therefore, there is an urgent need to address issues such as the fragmented nature of regulatory data for electronic price-computing scales, the difficulty in forming a unified lifecycle sequence of business records, the lack of feature engineering adapted to the business semantics of electronic price-computing scales, the inability of general anomaly identification algorithms to detect sequence anomalies and combination anomalies, the need for multi-dimensional algorithms to make joint judgments, and the lack of evidence chain interpretation in model results, making them untraceable and subject to manual review. Summary of the Invention

[0005] To address the aforementioned issues, the present invention aims to provide a method and system for identifying lifecycle risks of electronic price-computing scales, which can achieve interpretable, traceable, and automatic identification and verification of risks throughout the entire lifecycle of electronic price-computing scales.

[0006] To achieve the above objectives, on the one hand, the technical solution adopted by the present invention is as follows: a method for identifying lifecycle risks of electronic price-computing scales, comprising: obtaining the full lifecycle business records of electronic price-computing scales from the business system, the business records including production, type evaluation, inspection, maintenance, sealing, unsealing, unlocking, complaints, and law enforcement, and aggregating them according to the unique code of the electronic scale; mapping the original event names to standard event types, mapping the original results to standard event results, mapping the business source to the lifecycle stage, grouping them according to the unique code of the electronic scale and arranging them in ascending order of event time to obtain the equipment lifecycle event sequence; and generating a wide table of equipment features based on the equipment lifecycle event sequence, the wide table of equipment features including cumulative frequency features, window frequency features, cross-event time interval features, and lifecycle completion features. Integrity and state characteristics; based on the equipment lifecycle event sequence and equipment feature wide table, judgment is made according to interpretable regulatory rules, and rule risk scores and rule hit evidence are output; standard event types and standard event results are combined into observation symbols, and a hidden Markov model is used to identify sequence anomalies in the equipment lifecycle event sequence, and sequence risk scores and anomalous sequence fragments are output; multi-dimensional numerical features are selected based on the equipment feature wide table, and unsupervised outlier detection is performed using isolated forest, and outlier risk scores and main anomalous features are output; the rule risk score, sequence risk score and outlier risk score are weighted and fused to obtain a comprehensive risk score and risk level; the risk level is output, and the hit rule number, anomalous sequence fragment and main outlier features are output simultaneously, and combined to form a checklist that can be manually reviewed.

[0007] Furthermore, based on the device lifecycle event sequence, a wide table of device features is generated, including: Extract key time anchors, including the first coding time, the first sealing time, and the first verification time; Based on standard event types and preset time windows, lifecycle events are counted to form cumulative frequency characteristics and window frequency characteristics; Based on the sequential relationship of different types of events in the equipment lifecycle, calculate the time interval characteristics across events, including the minimum interval characteristics from the first inspection to the earliest maintenance, the minimum interval characteristics from unsealing to the most recent complaint, the minimum interval characteristics from maintenance to re-inspection, and the minimum interval characteristics from unsealing to resealing. If there is no target event, leave it blank and generate a missing or unclosed loop flag. Based on the existence of the event, the order of the events, and the outcome of the events, generate lifecycle integrity and status characteristics, including whether there is production coding, sealing, and initial inspection; whether there is no resealing after unsealing; whether there is inconsistency between label inspection and lead seal inspection; and whether there is an abnormal event sequence. The static attributes, key time anchors and cumulative frequency characteristics, window frequency characteristics, cross-event time interval characteristics, lifecycle integrity and status characteristics of the equipment are merged according to the unique code of the electronic scale to form a wide table of equipment characteristics.

[0008] Furthermore, the calculation of cross-event time interval characteristics includes: Find the earliest maintenance event after the first inspection event, calculate the number of days between the two events, and obtain the earliest maintenance characteristic from the first inspection to the present. For each unblocking event, find the complaint event with the closest time after it, calculate the number of days between the unblocking and the complaint, and take the minimum value among all valid intervals to obtain the minimum interval feature between the unblocking and the most recent complaint. Find the subsequent inspection events for each maintenance event, calculate the interval between maintenance and re-inspection, and obtain the minimum interval characteristic between maintenance and subsequent re-inspection. Find subsequent lockdown events for each lockdown lifting event, calculate the interval between lockdown lifting and relocking, and obtain the minimum interval feature between lockdown lifting and subsequent relocking. When there are no target events that satisfy the sequential order, the corresponding interval is set to null and a corresponding missing or unclosed loop flag is generated, instead of being directly set to zero.

[0009] Furthermore, the determination of whether there is a failure to re-impose a lockdown after it has been lifted is as follows: the lockdown and lifting events are scanned sequentially according to the event time; for each lifting event, the first valid lockdown event following it is searched; if no corresponding lockdown event is found, or the re-imposition time exceeds the preset closed-loop period, it is determined that there is a failure to close the lockdown loop. Furthermore, the determination of whether there is an event sequence anomaly is determined by any of the following six conditions: (1) the inspection time is earlier than the manufacturing time; (2) the first sealing time is earlier than the production coding time; (3) the maintenance time is earlier than the equipment's first inspection time; (4) the complaint handling time is earlier than the complaint time; (5) after unsealing, no sealing is applied but subsequent normal inspection or circulation records appear; (6) conflicting equipment states appear within the same time period.

[0010] Furthermore, the determination shall be made in accordance with interpretable regulatory rules, including: Based on the equipment lifecycle event sequence table and the equipment characteristic wide table, the judgment is made according to the lifecycle integrity, time sequence and closed loop, verification and inspection results, sealing and unlocking of the machine, complaints and law enforcement rules. Each rule is predefined with a rule number, rule name, judgment conditions, required fields, and risk bonus; During the judgment process, the equipment feature wide table field or event sequence event is used as input. The judgment conditions are matched one by one. If the condition is met, the rule is hit. The rule number, rule name, risk score and judgment reason are recorded, and the risk score is accumulated. The rule risk score is capped at 100. The risk score is increased when the frequency is abnormal, the timing is abnormal, the closed loop is missing, or it is related to the complaint enforcement result.

[0011] Furthermore, standard event types and results are combined into observation symbols, and a hidden Markov model is used to identify sequence anomalies in the equipment lifecycle event sequence, including: The standard event type and the standard event result are combined to form observation symbols. The training and computation of the Hidden Markov Model use continuous short codes within the model. When interpreting the output, the business-readable code and the Chinese observation code are looked up. The hidden Markov model was trained using the Baum-Welch algorithm. For the test sequence, the probability of sequence occurrence is calculated using a Hidden Markov Model, and a preliminary anomaly score is calculated using normalized negative log-likelihood. The preliminary anomaly score is compared with the reference anomaly score distribution saved during the training phase, and the percentage of the sequence anomaly score in the distribution of all reference anomaly scores is calculated. The percentage is mapped to a sequence risk score of 0-100. If the probability of the sequence occurring under the normal model is lower than a preset threshold, it is marked as a sequence anomaly, and the meaning of the event is looked up by an encoded dictionary to form an interpretable anomaly path.

[0012] Furthermore, based on the wide table of device features, multidimensional numerical features are selected, and an isolated forest is used for unsupervised outlier detection, outputting outlier risk scores and main anomaly features, including: Multidimensional numerical features are selected based on the wide table of equipment features. The feature table of electronic price-computing scales is used as training samples, and the isolated forest algorithm is used for unsupervised training. During training, group models and global models are trained separately by manufacturer, model, region, or years of use; or global models and group models are trained simultaneously, with the global model serving as the primary reference and the group models used for auxiliary comparison; when the number of effective devices in a group is not less than the preset number, the group model is trained separately, otherwise the global model or the same manufacturer's benchmark is used. After model training, the reference scores of the reference set are saved. The test device is input into the model to calculate the outlier score. The outlier score is compared with the reference set to obtain the percentage of the outlier score among all outliers in the reference set, which is mapped to an outlier risk score of 0-100. The features of the test device are compared with the 95th percentile of the reference device, and the features with the largest deviation are selected as the main outlier features.

[0013] Furthermore, the rule-based risk score, sequence risk score, and outlier risk score are weighted and fused to obtain a comprehensive risk score and risk level, including: The comprehensive risk score is obtained by weighting and fusing the rule-based risk score, sequence risk score, and outlier risk score, with the rule-based risk score having the highest weight; the weighting parameters are dynamically adjusted according to the sequence length of the Hidden Markov Model. Risk levels are classified according to the comprehensive risk score: 0 to 29 is normal, 30 to 59 is suspicious, and 60 to 100 is high risk. When a strong risk rule is met, such as an abnormal enforcement inspection, failure to pass the initial inspection, or failure to reseal after unsealing, the overall risk level shall not be lower than that of high risk.

[0014] On the other hand, the technical solution adopted by this invention is as follows: an electronic price-computing scale lifecycle risk identification system, comprising: a multi-source data access module, which obtains the full lifecycle business records of the electronic price-computing scale from the business system, including production, type evaluation, inspection, maintenance, sealing, unsealing, unlocking, complaints, and law enforcement, and aggregates them according to the unique code of the electronic scale; a lifecycle event standardization module, which maps the original event name to the standard event type, the original result to the standard event result, and the business source to the lifecycle stage, groups them according to the unique code of the electronic scale, and arranges them in ascending order of event time to obtain the equipment lifecycle event sequence; and an equipment feature wide table generation module, which generates an equipment feature wide table based on the equipment lifecycle event sequence, the equipment feature wide table including cumulative frequency features, window frequency features, cross-event time interval features, lifecycle integrity, and status features. The system comprises the following modules: an interpretable rule engine module, which judges the rules based on the equipment lifecycle event sequence and a wide table of equipment features, outputting rule risk scores and evidence of rule hits; a sequence anomaly identification module, which combines standard event types and results into observation symbols, and uses a hidden Markov model to identify sequence anomalies in the equipment lifecycle event sequence, outputting sequence risk scores and anomalous sequence fragments; an outlier detection module, which selects multidimensional numerical features based on the wide table of equipment features, and uses an isolated forest for unsupervised outlier detection, outputting outlier risk scores and main anomalous features; a fusion scoring module, which weights and fuses the rule risk scores, sequence risk scores, and outlier risk scores to obtain a comprehensive risk score and risk level; and an output module, which outputs the risk level and simultaneously outputs the hit rule number, anomalous sequence fragments, and main outlier features, merging them into a checklist that can be manually verified.

[0015] The present invention has the following advantages due to the adoption of the above technical solutions: 1. This invention transforms scattered business records into a lifecycle event sequence with the unique code of the electronic scale as the main thread, making cross-stage timing anomalies and closed-loop missing events calculable. By centrally extracting time, frequency, interval, and closed-loop features, a lifecycle equipment feature data table for electronic scales is constructed, providing a clear feature basis for subsequent evaluation.

[0016] 2. This invention preserves the interpretability and implementability of regulatory rules through a rule engine, retaining rule numbers, hit reasons, and evidence events. It identifies whether the entire lifecycle path deviates from normal state transition patterns through a time-series model and interprets abnormal paths through an coded dictionary. Outlier detection identifies outlier devices formed by combinations of multiple weak anomalies and outputs key anomaly characteristics. It enhances identification capabilities by fusing three types of risk results and outputs traceable results by combining event evidence chains, thus preserving the regulatory application requirements of traceability, interpretability, and manual verification while discovering unknown anomalies. Attached Figure Description

[0017] Figure 1 This is a flowchart of the lifecycle risk identification method for electronic price-computing scales in an embodiment of the present invention. Detailed Implementation

[0018] To address the shortcomings of existing technologies that focus solely on information aggregation and anti-counterfeiting traceability, lacking collaborative identification and evidence chain interpretation of full lifecycle anomalies and combined risks, this invention provides a method and system for identifying lifecycle risks of electronic pricing scales. The system obtains full lifecycle business records of electronic pricing scales from the business system, maps them to an equipment lifecycle event sequence, and generates a wide table of equipment features. It then determines and outputs rule risk scores and rule-hitting evidence according to interpretable regulatory rules. A Hidden Markov Model is used to identify sequence anomalies in the equipment lifecycle event sequence, outputting sequence risk scores and anomalous sequence fragments. Multidimensional numerical features are selected based on the wide table of equipment features, and an isolated forest is used for unsupervised outlier detection, outputting outlier risk scores and major anomaly features. The rule risk score, sequence risk score, and outlier risk score are weighted and fused to obtain a comprehensive risk score and risk level. The risk level is output, along with the hit rule number, anomalous sequence fragment, and major outlier features, which are then combined to form a manually verifiable checklist.

[0019] The meanings of the abbreviations and key terms used in this invention are as follows: Electronic scale lifecycle events: Based on the unique code of the electronic scale, these events are sortable, calculable, and traceable, and are generated by uniformly converting business records such as production coding, type evaluation, sealing, unsealing, inspection, maintenance, unlocking, complaints, and law enforcement.

[0020] Rule Engine: A module that uses interpretable regulatory rules to determine lifecycle integrity, time-series closure, inspection and verification, sealing and locking, complaint enforcement, and entity profiling.

[0021] HMM: Hidden Markov Model, used to infer the lifecycle state and the degree of sequence anomaly based on the sequence of device events.

[0022] Isolation Forest: An unsupervised outlier detection model used to identify samples that are significantly different from most devices in terms of multidimensional feature combinations.

[0023] This invention uses the unique scale_id of the electronic scale as the primary key throughout its entire lifecycle to construct a device master file table, a lifecycle event detail table, a device-level feature wide table, a rule hit result table, and a risk summary table. This five-table structure retains evidence of business origins while supporting rule engines, sequence modeling, and outlier detection. Specifically: The device master file table `dim_scale_device` is used to identify "who this scale is" and stores relatively stable master file information for the device. Key fields or results include: unique code, model number, type approval number, manufacturer, and manufacturing date.

[0024] Lifecycle event sequence table `fact_scale_lifecycle_event`: This is used to determine "what happened to this scale," unifying multi-source business records into sortable events. Key fields or results include: unique code `scale_id`, event time `event_time`, standard event type `event_type_std`, standard event result `event_result_std`, and lifecycle stage `event_stage`.

[0025] The wide scale lifecycle feature table (wide_scale_lifecycle_feature) is used to determine "what computable features this scale has" for rule, HMM interpretation, and outlier detection. Key fields or results include: first coding / sealing / verification time, total number of repairs, number of repairs in the last 30 / 90 days, total number of unlocks, and number of unlocks in the last 30 / 90 days.

[0026] The rule hit result table `fact_scale_rule_hit` stores detailed rule hit information, explaining why a risk was hit. Key fields or results include: rule ID (`rule_id`), rule name (`rule_name`), rule risk score (`risk_score_add`), and the reason for the judgment.

[0027] The equipment risk summary table (risk_scale_summary) is used to output the final risk profile and verification recommendations. Key fields or results include: rule_risk_score, sequence recognition risk score (hmm_risk_score), outlier detection risk score (isolation_risk_score), final fusion risk score (final_risk_score), risk level (risk_level), risk reasons (risk_reasons), and suggestions.

[0028] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the described embodiments of the present invention are within the scope of protection of the present invention.

[0029] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0030] In one embodiment of the present invention, a method for identifying lifecycle risks of electronic price-computing scales is provided. This method utilizes multi-source business data throughout the entire lifecycle of the electronic price-computing scale, and identifies equipment risks through event standardization, feature extraction, sequence modeling, outlier detection, and fusion scoring. In this embodiment, as shown... Figure 1 As shown, the method includes the following steps: 1) Multi-source data access: Obtain the full lifecycle business records of electronic scales from the business system. The business records include production, type evaluation, inspection, maintenance, sealing, unsealing, unlocking, complaints and law enforcement, and are aggregated according to the unique code of the electronic scale, scale_id.

[0031] 2) Lifecycle Event Standardization: Original event names are mapped to standard event types (event_type_std), original results are mapped to standard event results (event_result_std), and business sources are mapped to lifecycle stages (event_stage). Events are grouped by the scale's unique code (scale_id) and sorted in ascending order by event time (event_time) to obtain the equipment lifecycle event sequence. Here, original events refer to unstandardized operation names or record categories in the business system; original results refer to the operation results, verification judgments, inspection results, or processing status of the business record. For example, the business event "Lead Seal Registration (Enterprise Production)" in the business system is mapped to the "Sealing" event in the production stage, and its "Success" or "Failure" is mapped to the standard results.

[0032] 3) Equipment feature wide table extraction and generation: Based on the equipment lifecycle event sequence, generate the equipment feature wide table wide_scale_lifecycle_feature. The equipment feature wide table includes cumulative frequency features, window frequency features, cross-event time interval features, lifecycle integrity and status features.

[0033] 4) Explainable rule engine: Based on the device lifecycle event sequence and device feature wide table, it makes judgments according to explainable regulatory rules and outputs the rule risk score rule_risk_score and rule hit evidence.

[0034] 5) Lifecycle sequence anomaly identification: Standard event types and results are combined into observation symbols, and a hidden Markov model is used to identify sequence anomalies in the equipment lifecycle event sequence, outputting the sequence risk score hmm_risk_score and anomalous sequence fragments.

[0035] 6) Outlier Detection: Select multi-dimensional numerical features based on the device feature wide table, and use an isolated forest for unsupervised outlier detection, outputting the outlier risk score isolation_risk_score and main abnormal features.

[0036] 7) Fusion scoring: The rule risk score, sequence risk score and outlier risk score are weighted and fused to obtain the comprehensive risk score final_risk_score and risk level risk_level.

[0037] 8) Risk Output: Output the risk level, and simultaneously output the hit rule number, abnormal sequence fragment and main outlier characteristics, and combine them to form a checklist that can be manually reviewed.

[0038] In step 1) above, the business system can be the national intelligent supervision platform for electronic price-computing scales. It obtains the entire lifecycle records of electronic scales, including production, type evaluation, verification, and maintenance, from the national intelligent supervision platform for electronic price-computing scales.

[0039] In step 2) above, the lifecycle event sequence table fact_scale_lifecycle_event is used to determine "when, by what entity, at what business stage, what event occurred and what the result was for a certain electronic scale".

[0040] Map the original event names from different sources to the standard event type event_type_std. The standard event types include: production coding, tag binding, sealing, unsealing, tag inspection, seal inspection, unlocking, mode conversion, complaint, and law enforcement inspection.

[0041] The raw results are mapped to standard event results (event_result_std), which include pass / fail, success / failure, consistent / inconsistent, processed / unprocessed, and normal / abnormal. The mapping is based on the standard event type.

[0042] The business origin is mapped to the event_stage of the lifecycle, which includes production, type evaluation, inspection, maintenance, complaints and enforcement.

[0043] Events with empty original results are uniformly marked as "unknown" to avoid losing the location of the event, and missing results are used as a data quality feature.

[0044] Events are grouped according to the unique scale ID (scale_id) and then sorted in ascending order by event time (event_time) to form a sequence of device lifecycle events. The sorting result is represented as follows:

[0045] in, This indicates the first event in the device's chronological order. This represents the sequence of lifecycle events for device i, where any two adjacent events satisfy the following:

[0046] This represents the j-th event in the lifecycle sequence of electronic scale device i. The standard event time corresponds to the `event_time` field in the event table. `i` is the device index, and `j` is the event position within the device sequence. Adjacent events are arranged in non-decreasing order of time. Events occurring at the same time are then stably sorted using `event_id`.

[0047] In step 3) above, the wide scale lifecycle feature table is used to convert discrete events generated by the same electronic scale during production, type evaluation, verification, maintenance, complaints, and law enforcement into device-level features that can be directly used by the rule engine, sequence anomaly identification, and outlier detection. The wide scale feature table uses the unique code scale_id of the electronic scale as the device primary key, and each electronic scale corresponds to one feature record.

[0048] In this embodiment, a wide table of device features is generated based on the device lifecycle event sequence, including the following steps: 3.1) Extract key time anchors, including the first coding time, the first sealing time, and the first verification time.

[0049] Specifically, the lifecycle event timeline is grouped according to standard event types, and the first occurrence time, most recent occurrence time, and corresponding result of each type of event are determined to form key time anchors, including: First production coding time; first seal time; first verification time; first verification result; latest verification time; latest verification result; latest event time.

[0050] If there are multiple records of the same event type, sort them according to the standard event time, take the first valid event as the first event, and take the last valid event as the most recent event.

[0051] 3.2) Count lifecycle events according to standard event types and preset time windows to form cumulative frequency characteristics and window frequency characteristics.

[0052] Specifically, for the statistical baseline time point T, the device (electronic scale) i, the event type k, and the time window of length w, historical backtracking calculations only use events no later than T to ensure feature reproducibility and avoid using future data, and the number of events is... for:

[0053] Where I(·) is the condition indicator function; The unique code representing the electronic scale device to which the j-th event belongs; This indicates the standard event type for the event; This represents the standard event time. i is the device to be counted, k is the target event type, T is the statistical baseline time, and w is the window length. I(·) takes the value 1 if all conditions within the parentheses are met, otherwise it takes the value 0; the summation counts the number of events that meet the conditions from Tw to time T (inclusive).

[0054] The generated frequency features include at least: Total number of repairs (repair_count_total); Number of repairs in the last 30 days (repair_count_30d); Number of repairs in the last 90 days (repair_count_90d); Total number of seals (seal_count_total); Total number of seals (unseal_count_total); Number of seals (unseal_count_90d); Number of seals (unseal_count_180d); Number of locks opened (lock_count_total); Total number of unlocks (unlock_count_total); Number of unlocks (unlock_count_90d); Number of mode switches (mode_switch_count_total); Total number of complaints (complaint_count_total); Number of complaints in the last 180 days (complaint_count_180d); Number of enforcement abnormalities (enforcement_abnormal_count).

[0055] The length of the time window can be configured according to regulatory requirements, and is not limited to 30 days, 90 days, and 180 days.

[0056] 3.3) Based on the sequential relationship of different types of events in the equipment lifecycle, calculate the time interval characteristics across events, including the minimum interval characteristics from the first inspection to the earliest maintenance, the minimum interval characteristics from unsealing to the most recent complaint, the minimum interval characteristics from maintenance to re-inspection, and the minimum interval characteristics from unsealing to resealing. If there is no target event, leave it blank and generate a missing or unclosed loop flag.

[0057] The calculation of the cross-event time interval feature includes the following steps: 3.3.1) After the first verification event, find the earliest maintenance event, calculate the number of days between the two, and obtain the earliest maintenance characteristic from the first verification to the earliest maintenance event thereafter: days_first_verify_to_first_repair.

[0058] 3.3.2) For each unsealing event, find the complaint event with the closest time after it, calculate the number of days between unsealing and the complaint, and take the minimum value among all valid intervals to obtain the minimum interval feature days_unseal_to_next_complaint_min between unsealing and the most recent complaint.

[0059] 3.3.3) Find the subsequent verification events for the maintenance event, calculate the interval from maintenance to re-inspection, and obtain the minimum interval feature days_repair_to_next_verification_min from maintenance to subsequent re-inspection.

[0060] 3.3.4) For each unsealing event, find the subsequent sealing event, calculate the interval between unsealing and resealing, and obtain the minimum interval feature days_unseal_to_next_seal_min.

[0061] When there are no target events that satisfy the sequential order, the corresponding interval is set to null and a corresponding missing or unclosed loop flag is generated, instead of being directly set to zero.

[0062] 3.4) Based on the existence of events, the order of events, and the results of events, generate lifecycle integrity and status characteristics, including whether there is a production coding event (has_production_event), a sealing event (has_seal_event), a first verification event (has_first_verification_event), whether there is a case where the seal was not resealed after unsealing (has_unclosed_unseal), whether there is a label check inconsistency (has_label_check_inconsistent), whether there is a lead seal check inconsistency (has_seal_check_inconsistent), and whether there is an event order error (has_event_order_error).

[0063] The method for determining whether there is a case of unsealing without resealing is as follows: scan sealing and unsealing events sequentially according to the event time; for each unsealing event, search for the first valid sealing event that follows; if no corresponding sealing event is found, or if the resealing time exceeds the preset closed-loop period, it is determined that there is a case of unsealing without closed-loop.

[0064] The method for determining whether there is an event sequence anomaly is as follows: (1) the inspection time is earlier than the manufacturing time; (2) the initial sealing time is earlier than the production coding time; (3) the maintenance time is earlier than the initial inspection time of the equipment; (4) the complaint handling time is earlier than the complaint time; (5) after unsealing, no resealing is performed, but subsequent normal inspection or circulation records appear; (6) conflicting equipment states appear within the same time period. If any one of the above six conditions is met, it is determined that there is an event sequence anomaly.

[0065] 3.5) Merge the equipment static attributes, key time anchors and cumulative frequency features, window frequency features, cross-event time interval features, lifecycle integrity and status features according to the unique code scale_id of the electronic scale to form a wide feature table wide_scale_lifecycle_feature.

[0066] When a new or modified lifecycle event is added, the system recalculates the characteristics of the corresponding device based on the affected unique code `scale_id`, without needing to recalculate the characteristics of all devices. Each calculation records the baseline time, feature version, and generation time to ensure the reproducibility of risk results.

[0067] In step 4) above, the determination is made according to the interpretable regulatory rules, including the following steps: 4.1) Based on the equipment lifecycle event time series table fact_scale_lifecycle_event and the equipment feature wide table wide_scale_lifecycle_feature, the determination is made according to the lifecycle integrity, time sequence and closed loop, verification and inspection results, sealing and unlocking of the machine, complaints and enforcement rules.

[0068] 4.2) Each rule is predefined with a rule number, rule name, judgment conditions, required fields, and risk bonus, etc.

[0069] In this embodiment, the specific definition of each rule is shown in Table 1.

[0070]

[0071] 4.3) When making a judgment, the equipment feature wide table field or event sequence event is used as input. The judgment conditions are matched one by one. If the condition is met, the rule is hit. The rule number, rule name, risk score and judgment reason are recorded, and the risk score is accumulated. The rule risk score is capped at 100.

[0072] In this embodiment, the specific risk levels are shown in Table 2.

[0073]

[0074] In this embodiment, the risk score is increased when there are abnormal frequencies, abnormal timings, missing loops, or correlations with complaint enforcement results, to avoid directly classifying normal business operations as abnormal. The hit results are saved in the rule hit result table `fact_scale_rule_hit`, storing the hit rule number `rule_id`, rule name `rule_name`, risk score `risk_score_add`, and the judgment reason, etc.

[0075] In step 5) above, the standard event type and standard event result are combined into observation symbols, and a hidden Markov model is used to identify sequence anomalies in the equipment lifecycle event sequence, including the following steps: 5.1) The standard event type and the standard event result are combined to form the observation symbol. The training and computation of the Hidden Markov Model (HMM) use the model_observation_id, which is a continuous short code within the model. When interpreting the output, the business-readable code business_observation_code and the Chinese observation code observation_code are retrieved.

[0076] Specifically, in this embodiment, each electronic scale is sorted by event time (event_time) to construct a lifecycle observation sequence, which is then identified based on the lifecycle event time series table (fact_scale_lifecycle_event). Observation symbols are formed by combining standard event types and standard event results, i.e., observation_code = event_type_std + '_' + event_result_std. For example, "first inspection_qualified" and "first inspection_unqualified" correspond to different observation symbols. Hidden Markov Model (HMM) algorithm is used for identification.

[0077] To balance manual maintenance and model training, the system maintains two layers of encoding: a business-readable code called business_observation_code and a series of short, continuous codes called model_observation_id within the model.

[0078] 5.2) The Baum-Welch algorithm was used to train the HMM model.

[0079] 5.3) For the test sequence, the probability of sequence occurrence is calculated using the HMM model, and the preliminary anomaly score is calculated using normalized negative log-likelihood. The preliminary anomaly score is compared with the reference anomaly score distribution saved during the training phase, and the percentage of the sequence anomaly score in the distribution of all reference anomaly scores is calculated. The higher the percentage (e.g., 97.5%), the greater the anomaly probability. The percentage is mapped to a sequence risk score of 0-100, which is used as the final lifecycle anomaly identification score hmm_risk_score.

[0080] Specifically, The preliminary anomaly score is calculated using the negative logarithm of the sequence occurrence probability normalized to:

[0081] Calculate percentiles by inputting the data into the reference anomaly score distribution saved during the training phase. :

[0082] in, Let λ be the probability of occurrence of the entire observation sequence to be scored under the model parameter λ. The coded sequence of observations for this device arranged by time; =(π,A,B), where π is the initial state probability, A is the state transition probability matrix, and B is the emission probability matrix; The number of valid events in the sequence; Let be the normalized negative log-likelihood of the length of the i-th reference device; Number of valid reference devices; This indicates the number of devices that meet the condition that "the reference score is not higher than the score to be scored".

[0083] Assuming the test device has a sequence score of 0.8, and the reference set has 10,000 scales, of which 9,550 have anomaly scores no higher than 0.8, then the lifecycle sequence anomaly of this device is higher than that of approximately 95.5% of the devices in the reference set. The final sequence score converted from 0 to 100 is 95.5, which is taken as the final lifecycle anomaly identification score hmm_risk_score.

[0084] 5.4) If the probability of a sequence occurring under the normal model is lower than a preset threshold, it is marked as a sequence anomaly, and the meaning of the event is looked up in the encoding dictionary to form an interpretable abnormal path.

[0085] In step 6) above, multi-dimensional numerical features are selected based on the wide scale lifecycle feature table, and unsupervised outlier detection is performed using an isolated forest to output outlier risk scores and main anomaly features. This includes the following steps: 6.1) Based on the wide scale lifecycle feature table of the equipment, multi-dimensional numerical features are selected, and the feature table of the electronic price-computing scale is used as the training sample. The isolated forest algorithm is used for unsupervised training.

[0086] The electronic scale feature table is a training matrix obtained by preprocessing selected numerical columns from the wide feature table according to the requirements of the Isolation Forest model. In this embodiment, 32 candidate numerical fields are selected from the existing wide feature table `wide_scale_lifecycle_feature`, with one row retained for each device, to obtain the model training matrix. Representative fields are then input into the Isolation Forest algorithm for training.

[0087] Specifically, in this embodiment, multi-dimensional numerical features are selected based on the wide_scale_lifecycle_feature of the device features, such as the number of times the device has been unsealed in the past 90 days, the number of times it has been unlocked in the past 90 days, and the number of complaints, for model training. The feature table of electronic price-computing scales that meets the set data requirements is used as training samples, and the Isolation Forest algorithm is used for unsupervised training. The training parameters are shown in Table 3.

[0088]

[0089] 6.2) During training, group models and global models are trained separately by manufacturer, model, region, or years of use; or global models and group models are trained simultaneously, with the global model serving as the main reference and the group models used for auxiliary comparison; when the number of effective devices in a group is not less than the preset number, the group model is trained separately, otherwise the global model or the same manufacturer's benchmark is used.

[0090] Specifically, this embodiment trains a grouped benchmark model for electronic scale data. Considering the possible differences in normal behavior between different models, manufacturers, usage areas, and equipment service life, this embodiment can adopt any of the following modeling methods: (1) train a global Isolation Forest model for all electronic scales; (2) train grouped models according to manufacturer, model, region, or equipment service life; (3) train the global model and the grouped model simultaneously, with the global model serving as the main reference and the grouped model used for auxiliary comparison.

[0091] In this embodiment, when the number of valid devices in a group is not less than a preset number (which can be configured according to group stability and sample size), a separate model is trained for that group; when the number of samples is less than the preset number, a global model is used. When there are no less than 500 devices of a certain model, an independent benchmark is established for that model; when there are fewer than 500 devices, a benchmark from the same manufacturer or all devices is used. This avoids a situation where a certain model has a lot of normal maintenance or unlocking activities, but is incorrectly identified as abnormal due to direct comparison with other models.

[0092] 6.3) After model training, save the reference scores of the reference set, input the test device into the model to calculate the outlier score, compare it with the reference set to obtain the ranking percentage of the outlier score among all outlier scores in the reference set, and map it to an outlier risk score of 0-100; compare the features of the test device with the 95th percentile of the reference device, and select the features with the largest deviation as the main outlier features.

[0093] Specifically, in this embodiment, after the model is trained, all reference scores in the reference set are saved. New test data is then input into the model to calculate new reference scores. :

[0094] Then this score Reference score of the reference set Compare them one by one:

[0095] in, The numerical feature vector of the electronic scale to be scored is generated by the various features of the device according to the order and preprocessing rules determined during model training. Let i be the original outlier of the i-th reference device under the same isolated forest model, i.e. ; The isolation_risk_score is calculated by multiplying the original score of the reference device by 100, where the original score of the reference device is no higher than that of the device to be scored. The value ranges from 0 to 1.

[0096] Assuming the reference score for the test device is 0.67, and the reference set contains 10,000 scales, of which 9,820 have anomaly scores no higher than 0.67, then the isolation forest anomaly of this electronic scale is higher than that of approximately 98.2% of the devices in the reference set. The final anomaly score converted from 0 to 100 is 98.2, which is used as the isolation risk score.

[0097] The characteristics of the test device are compared with the 95th percentile of the reference device. Several features with the largest deviations are selected as the main anomaly features isolation_top_features, and the anomaly reason text isolation_reason is generated through a preset explanation template, such as "4 unlocking failures in the past 90 days, higher than the 95th percentile of similar devices", "repair occurred 10 days after the first inspection, which is significantly shorter than the common interval of similar devices", etc.

[0098] In step 7) above, the rule-based risk score, sequence risk score, and outlier risk score are weighted and fused to obtain a comprehensive risk score and risk level, including the following steps: 7.1) The rule-based risk score, the HMM sequence risk score, and the Isolation Forest outlier risk score are weighted and fused to obtain a comprehensive risk score, with the rule-based risk score having the highest weight; the weighting parameters are dynamically adjusted according to the sequence length of the Hidden Markov Model.

[0099] Specifically, in this embodiment, the rule engine has the highest weight because it deals with interpretable and traceable conditions. However, some electronic scales have short lifecycle events, so even if the HMM calculates a high anomaly score, it may not be reliable. The length of hmm_model_sequence is set to T. A strategy of dynamically adjusting the weighting parameters is adopted, as shown in Table 4.

[0100]

[0101] 7.2) Risk levels are classified according to the comprehensive risk score: 0 to 29 points are normal, 30 to 59 points are suspicious, and 60 to 100 points are high risk. Among them, when the strong risk rules of abnormal law enforcement inspection, unqualified initial inspection, or failure to reseal after unsealing are met, the comprehensive risk level shall not be lower than high risk.

[0102] Specifically, the risk output fields and their meanings are shown in Table 5.

[0103]

[0104] For example, if the lifecycle time series length T is 8, then final_risk_score = 0.60 × rule_risk_score + 0.25 × hmm_risk_score + 0.15 × isolation_risk_score. The above weights are example values ​​and are not intended to limit the claims. Then, based on a score of 40, the risk_level is marked as suspicious.

[0105] Then, an auxiliary decision-making mechanism is added, and the strong rule priority mechanism of the rule engine is added: when strong risk rules such as abnormal law enforcement inspection, unqualified first inspection, or failure to re-seal after unsealing are hit, the comprehensive risk level is not lower than high risk.

[0106] In step 8) above, the risk level is output, and the hit rule number rule_id, abnormal sequence fragment hmm_observation_sequence, and outlier main features isolation_top_features are output simultaneously. Then, they are merged into the event risk cause to form a checklist that can be manually reviewed.

[0107] In one embodiment of the present invention, an electronic price-computing scale lifecycle risk identification system is provided, comprising: The multi-source data access module obtains the full lifecycle business records of the electronic scale from the business system. The business records include production, type evaluation, inspection, maintenance, sealing, unsealing, unlocking, complaints, and law enforcement, and are aggregated according to the unique code of the electronic scale. The lifecycle event standardization module maps original event names to standard event types, original results to standard event results, and business sources to lifecycle stages. It groups events by the unique code of the electronic scale and arranges them in ascending order by event time to obtain the equipment lifecycle event sequence. The device feature wide table generation module generates a device feature wide table based on the device lifecycle event sequence. The device feature wide table includes cumulative frequency features, window frequency features, cross-event time interval features, lifecycle integrity, and status features. The interpretable rule engine module, based on the device lifecycle event sequence and device feature wide table, makes judgments according to interpretable regulatory rules and outputs rule risk scores and rule hit evidence; The sequence anomaly identification module combines standard event types and standard event results into observation symbols, uses a hidden Markov model to identify sequence anomalies in the equipment lifecycle event sequence, and outputs sequence risk scores and abnormal sequence fragments. The outlier detection module selects multi-dimensional numerical features based on a wide table of device features, uses an isolated forest for unsupervised outlier detection, and outputs outlier risk scores and main anomaly features. The fusion scoring module weights and fuses the rule-based risk score, sequence risk score, and outlier risk score to obtain a comprehensive risk score and risk level. The output module outputs the risk level and simultaneously outputs the hit rule number, abnormal sequence fragments, and main outlier characteristics, which are then combined to form a checklist that can be manually reviewed.

[0108] In the above embodiments, a wide table of device features is generated based on the device lifecycle event sequence, including: Extract key time anchors, including the first coding time, the first sealing time, and the first verification time; Based on standard event types and preset time windows, lifecycle events are counted to form cumulative frequency characteristics and window frequency characteristics; Based on the sequential relationship of different types of events in the equipment lifecycle, calculate the time interval characteristics across events, including the minimum interval characteristics from the first inspection to the earliest maintenance, the minimum interval characteristics from unsealing to the most recent complaint, the minimum interval characteristics from maintenance to re-inspection, and the minimum interval characteristics from unsealing to resealing. If there is no target event, leave it blank and generate a missing or unclosed loop flag. Based on the existence of the event, the order of the events, and the outcome of the events, generate lifecycle integrity and status characteristics, including whether there is production coding, sealing, and initial inspection; whether there is no resealing after unsealing; whether there is inconsistency between label inspection and lead seal inspection; and whether there is an abnormal event sequence. The static attributes, key time anchors and cumulative frequency characteristics, window frequency characteristics, cross-event time interval characteristics, lifecycle integrity and status characteristics of the equipment are merged according to the unique code of the electronic scale to form a wide table of equipment characteristics.

[0109] In the above embodiments, calculating the cross-event time interval feature includes: Find the earliest maintenance event after the first inspection event, calculate the number of days between the two events, and obtain the earliest maintenance characteristic from the first inspection to the present. For each unblocking event, find the complaint event with the closest time after it, calculate the number of days between the unblocking and the complaint, and take the minimum value among all valid intervals to obtain the minimum interval feature between the unblocking and the most recent complaint. Find the subsequent inspection events for each maintenance event, calculate the interval between maintenance and re-inspection, and obtain the minimum interval characteristic between maintenance and subsequent re-inspection. Find subsequent lockdown events for each lockdown lifting event, calculate the interval between lockdown lifting and relocking, and obtain the minimum interval feature between lockdown lifting and subsequent relocking. When there are no target events that satisfy the sequential order, the corresponding interval is set to null and a corresponding missing or unclosed loop flag is generated, instead of being directly set to zero.

[0110] In the above embodiments, the determination of whether there is a case of unsealing without resealing is as follows: scan sealing and unsealing events sequentially according to the event time; for each unsealing event, search for the first valid sealing event after it; if no corresponding sealing event is found, or the resealing time exceeds the preset closed loop period, it is determined that there is a case of unsealing without closed loop. In the above embodiments, the determination of whether there is an event sequence abnormality is as follows: if any one of the following six conditions is met, it is determined that there is an event sequence abnormality: (1) the inspection time is earlier than the manufacturing time; (2) the first sealing time is earlier than the production coding time; (3) the maintenance time is earlier than the equipment's first inspection time; (4) the complaint handling time is earlier than the complaint time; (5) after unsealing, no sealing is applied but subsequent normal inspection or circulation records appear; (6) conflicting equipment states appear within the same time period.

[0111] In the above embodiments, the determination based on interpretable regulatory rules includes: Based on the equipment lifecycle event sequence table and the equipment characteristic wide table, the judgment is made according to the lifecycle integrity, time sequence and closed loop, verification and inspection results, sealing and unlocking of the machine, complaints and law enforcement rules. Each rule is predefined with a rule number, rule name, judgment conditions, required fields, and risk bonus; During the judgment process, the equipment feature wide table field or event sequence event is used as input. The judgment conditions are matched one by one. If the condition is met, the rule is hit. The rule number, rule name, risk score and judgment reason are recorded, and the risk score is accumulated. The rule risk score is capped at 100. The risk score is increased when the frequency is abnormal, the timing is abnormal, the closed loop is missing, or it is related to the complaint enforcement result.

[0112] In the above embodiments, standard event types and standard event results are combined into observation symbols, and a hidden Markov model is used to identify sequence anomalies in the device lifecycle event sequence, including: The standard event type and the standard event result are combined to form observation symbols. The training and computation of the Hidden Markov Model use continuous short codes within the model. When interpreting the output, the business-readable code and the Chinese observation code are looked up. The hidden Markov model was trained using the Baum-Welch algorithm. For the test sequence, the probability of sequence occurrence is calculated using a Hidden Markov Model, and a preliminary anomaly score is calculated using normalized negative log-likelihood. The preliminary anomaly score is compared with the reference anomaly score distribution saved during the training phase, and the percentage of the sequence anomaly score in the distribution of all reference anomaly scores is calculated. The percentage is mapped to a sequence risk score of 0-100. If the probability of the sequence occurring under the normal model is lower than a preset threshold, it is marked as a sequence anomaly, and the meaning of the event is looked up by an encoded dictionary to form an interpretable anomaly path.

[0113] In the above embodiments, multidimensional numerical features are selected based on a wide table of device features, and unsupervised outlier detection is performed using an isolated forest. The outlier risk score and main anomaly features are output, including: Multidimensional numerical features are selected based on the wide table of equipment features. The feature table of electronic price-computing scales is used as training samples, and the isolated forest algorithm is used for unsupervised training. During training, group models and global models are trained separately by manufacturer, model, region, or years of use; or global models and group models are trained simultaneously, with the global model serving as the primary reference and the group models used for auxiliary comparison; when the number of effective devices in a group is not less than the preset number, the group model is trained separately, otherwise the global model or the same manufacturer's benchmark is used. After model training, the reference scores of the reference set are saved. The test device is input into the model to calculate the outlier score. The outlier score is compared with the reference set to obtain the percentage of the outlier score among all outliers in the reference set, which is mapped to an outlier risk score of 0-100. The features of the test device are compared with the 95th percentile of the reference device, and the features with the largest deviation are selected as the main outlier features.

[0114] In the above embodiments, the rule-based risk score, sequence risk score, and outlier risk score are weighted and fused to obtain a comprehensive risk score and risk level, including: The comprehensive risk score is obtained by weighting and fusing the rule-based risk score, sequence risk score, and outlier risk score, with the rule-based risk score having the highest weight; the weighting parameters are dynamically adjusted according to the sequence length of the Hidden Markov Model. Risk levels are classified according to the comprehensive risk score: 0 to 29 is normal, 30 to 59 is suspicious, and 60 to 100 is high risk. When a strong risk rule is met, such as an abnormal enforcement inspection, failure to pass the initial inspection, or failure to reseal after unsealing, the overall risk level shall not be lower than that of high risk.

[0115] The system provided in this embodiment is used to execute the above-described method embodiments. For specific processes and details, please refer to the above embodiments, which will not be repeated here.

[0116] In one embodiment of the present invention, a computing device is provided, which may be a terminal and may include: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors, and the one or more programs include instructions for performing any of the methods in the above embodiments.

[0117] Furthermore, when the aforementioned instructions can be implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium 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 invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0118] In one embodiment of the present invention, a computer program product is provided, the computer program product including a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions, and when the program instructions are executed by a computer, the computer is able to perform the methods provided in the above-described method embodiments.

[0119] In one embodiment of the present invention, a non-transitory computer-readable storage medium is provided, which stores server instructions that cause a computer to perform the methods provided in the above embodiments.

[0120] The computer-readable storage medium provided in the above embodiments has a similar implementation principle and technical effect to the above method embodiments, and will not be described again here.

[0121] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0122] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0123] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0124] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. An electronic pricing scale life cycle risk identification method, characterized in that, include: The system retrieves the entire lifecycle business records of the electronic scales from the business system. These records include production, type evaluation, inspection, maintenance, sealing, unsealing, unlocking, complaints, and enforcement, and are aggregated by the unique code of the electronic scale. Map the original event name to the standard event type, the original result to the standard event result, and the business source to the lifecycle stage. Group the events by the unique code of the electronic scale and sort them in ascending order by event time to obtain the equipment lifecycle event sequence. Based on the device lifecycle event sequence, a device feature wide table is generated, which includes cumulative frequency features, window frequency features, cross-event time interval features, lifecycle integrity, and status features. Based on the equipment lifecycle event sequence and equipment feature wide table, the judgment is made according to interpretable regulatory rules, and the rule risk score and rule hit evidence are output. The standard event type and standard event result are combined into observation symbols. Hidden Markov model is used to identify sequence anomalies in the equipment life cycle event sequence, and the sequence risk score and abnormal sequence fragments are output. Based on the wide table of device features, multidimensional numerical features are selected, and unsupervised outlier detection is performed using isolated forest, outputting outlier risk score and main abnormal features; The rule-based risk score, sequence risk score, and outlier risk score are weighted and fused to obtain a comprehensive risk score and risk level. Output the risk level, and simultaneously output the hit rule number, abnormal sequence fragment and main outlier characteristics, and combine them to form a checklist that can be manually reviewed.

2. The electronic pricing scale life cycle risk identification method of claim 1, wherein, Based on the device lifecycle event sequence, a wide table of device features is generated, including: Extract key time anchors, including the first coding time, the first sealing time, and the first verification time; Based on standard event types and preset time windows, lifecycle events are counted to form cumulative frequency characteristics and window frequency characteristics; Based on the sequential relationship of different types of events in the equipment lifecycle, calculate the time interval characteristics across events, including the minimum interval characteristics from the first inspection to the earliest maintenance, the minimum interval characteristics from unsealing to the most recent complaint, the minimum interval characteristics from maintenance to re-inspection, and the minimum interval characteristics from unsealing to resealing. If there is no target event, leave it blank and generate a missing or unclosed loop flag. Based on the existence of the event, the order of the events, and the outcome of the events, generate lifecycle integrity and status characteristics, including whether there is production coding, sealing, and initial inspection, whether there is no resealing after unsealing, whether there is inconsistency between label inspection and lead seal inspection, and whether there is an abnormal event sequence. The static attributes, key time anchors and cumulative frequency characteristics, window frequency characteristics, cross-event time interval characteristics, lifecycle integrity and status characteristics of the equipment are merged according to the unique code of the electronic scale to form a wide table of equipment characteristics.

3. The electronic pricing scale life cycle risk identification method of claim 2, wherein, Calculating cross-event time interval characteristics includes: Find the earliest maintenance event after the initial inspection event, calculate the number of days between the two events, and obtain the earliest maintenance characteristic from the initial inspection to the present. For each unblocking event, find the complaint event with the closest time after it, calculate the number of days between the unblocking and the complaint, and take the minimum value among all valid intervals to obtain the minimum interval feature between the unblocking and the most recent complaint. For each maintenance event, find the subsequent inspection event, calculate the interval between maintenance and re-inspection, and obtain the minimum interval characteristic between maintenance and subsequent re-inspection; Find subsequent lockdown events for each lockdown lifting event, calculate the interval between lockdown lifting and relocking, and obtain the minimum interval feature between lockdown lifting and subsequent relocking. When there are no target events that satisfy the sequential order, the corresponding interval is set to null and a corresponding missing or unclosed loop flag is generated, instead of being directly set to zero.

4. The electronic pricing scale life cycle risk identification method of claim 2, wherein, The determination of whether a lockdown has been lifted but not re-imposed is as follows: scan the lockdown and lifting events sequentially according to the event time; for each lifting event, search for the first valid lockdown event that follows. If no corresponding sealing event is found, or if the resealing time exceeds the preset closed-loop period, it is determined that there is an unsealing loop that has not been closed.

5. The electronic pricing scale life cycle risk identification method of claim 2, wherein, The existence of an event sequence anomaly is determined by any one of the following six conditions: (1) The inspection time is earlier than the manufacturing time; (2) The initial sealing time is earlier than the production coding time; (3) The repair time is earlier than the equipment's initial calibration time; (4) The complaint processing time is earlier than the complaint time; (5) No sealing was applied after the seal was lifted, but subsequent normal inspection or circulation records appeared; (6) Conflicting equipment statuses occur within the same time period.

6. The electronic pricing scale life cycle risk identification method of claim 1, wherein, Determinations are made according to interpretable regulatory rules, including: Based on the equipment lifecycle event sequence table and the equipment characteristic wide table, the judgment is made according to the lifecycle integrity, time sequence and closed loop, verification and inspection results, sealing and unlocking of the machine, complaints and law enforcement rules. Each rule predefines its rule number, rule name, judgment conditions, required fields, and risk score; During the judgment process, the equipment feature wide table field or event sequence event is used as input. The judgment conditions are matched one by one. If the condition is met, the rule is hit. The rule number, rule name, risk score and judgment reason are recorded, and the risk score is accumulated. The rule risk score is capped at 100. The risk score is increased when the frequency is abnormal, the timing is abnormal, the closed loop is missing, or it is related to the complaint enforcement result.

7. The electronic pricing scale life cycle risk identification method of claim 1, wherein, Standard event types and results are combined into observation symbols, and a hidden Markov model is used to identify sequence anomalies in the equipment lifecycle event sequence, including: The standard event type and the standard event result are combined to form observation symbols. The training and computation of the Hidden Markov Model use continuous short codes within the model. When interpreting the output, the business-readable code and the Chinese observation code are looked up. The hidden Markov model was trained using the Baum-Welch algorithm. For the test sequence, the probability of sequence occurrence is calculated using a Hidden Markov Model, and a preliminary anomaly score is calculated using normalized negative log-likelihood. The preliminary anomaly score is compared with the reference anomaly score distribution saved during the training phase, and the percentage of the sequence anomaly score in the distribution of all reference anomaly scores is calculated. The percentage is mapped to a sequence risk score of 0-100. If the probability of the sequence occurring under the normal model is lower than a preset threshold, it is marked as a sequence anomaly, and the meaning of the event is looked up by an encoded dictionary to form an interpretable anomaly path.

8. The electronic pricing scale life cycle risk identification method of claim 1, wherein, Multidimensional numerical features are selected based on a wide table of device features. An isolated forest is used for unsupervised outlier detection, outputting outlier risk scores and key anomaly features, including: Multidimensional numerical features are selected based on the wide table of equipment features. The feature table of electronic price-computing scales is used as training samples, and the isolated forest algorithm is used for unsupervised training. During training, group models and global models are trained separately by manufacturer, model, region, or years of use; or global models and group models are trained simultaneously, with the global model serving as the primary reference and the group models used for auxiliary comparison; when the number of effective devices in a group is not less than the preset number, the group model is trained separately, otherwise the global model or the same manufacturer's benchmark is used. After model training, the reference scores of the reference set are saved. The test device is input into the model to calculate the outlier score. The outlier score is compared with the reference set to obtain the percentage of the outlier score among all outliers in the reference set, which is mapped to an outlier risk score of 0-100. The features of the test device are compared with the 95th percentile of the reference device, and the features with the largest deviation are selected as the main outlier features.

9. The electronic pricing scale life cycle risk identification method of claim 1, wherein, The rule-based risk score, sequence risk score, and outlier risk score are weighted and fused to obtain a comprehensive risk score and risk level, including: The comprehensive risk score is obtained by weighting and fusing the rule-based risk score, sequence risk score, and outlier risk score, with the rule-based risk score having the highest weight; the weighting parameters are dynamically adjusted according to the sequence length of the Hidden Markov Model. Risk levels are classified according to the comprehensive risk score: 0 to 29 is normal, 30 to 59 is suspicious, and 60 to 100 is high risk. When a strong risk rule is met, such as an abnormal enforcement inspection, failure to pass the initial inspection, or failure to reseal after unsealing, the overall risk level shall not be lower than that of high risk.

10. An electronic pricing scale life cycle risk identification system, characterized by, include: The multi-source data access module obtains the full lifecycle business records of the electronic scale from the business system. The business records include production, type evaluation, inspection, maintenance, sealing, unsealing, unlocking, complaints, and law enforcement, and are aggregated according to the unique code of the electronic scale. The lifecycle event standardization module maps original event names to standard event types, original results to standard event results, and business sources to lifecycle stages. It groups events by the unique code of the electronic scale and arranges them in ascending order by event time to obtain the equipment lifecycle event sequence. The device feature wide table generation module generates a device feature wide table based on the device lifecycle event sequence. The device feature wide table includes cumulative frequency features, window frequency features, cross-event time interval features, lifecycle integrity, and status features. The interpretable rule engine module, based on the device lifecycle event sequence and device feature wide table, makes judgments according to interpretable regulatory rules and outputs rule risk scores and rule hit evidence; The sequence anomaly identification module combines standard event types and standard event results into observation symbols, uses a hidden Markov model to identify sequence anomalies in the equipment lifecycle event sequence, and outputs sequence risk scores and abnormal sequence fragments. The outlier detection module selects multi-dimensional numerical features based on a wide table of device features, uses an isolated forest for unsupervised outlier detection, and outputs outlier risk scores and main anomaly features. The fusion scoring module weights and fuses the rule-based risk score, sequence risk score, and outlier risk score to obtain a comprehensive risk score and risk level. The output module outputs the risk level and simultaneously outputs the hit rule number, abnormal sequence fragments, and main outlier characteristics, which are then combined to form a checklist that can be manually reviewed.