Vehicle tare weight anomaly detection method based on harbor wagon balance
By constructing a historical tare weight database and combining IQR and Z-score methods for anomaly detection, the problems of insufficient historical reference and insufficient scene differentiation in vehicle tare weight detection in port areas have been solved, achieving efficient tare weight anomaly identification and real-time response, and improving the accuracy and efficiency of detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-20
- Publication Date
- 2026-03-27
AI Technical Summary
The existing port area vehicle tare weight detection technology lacks historical reference, has insufficient scenario differentiation, and has inefficient anomaly detection methods and insufficient data utilization, resulting in deviations in cargo weight calculation and insufficient accuracy in anomaly detection.
A historical tare weight database is constructed, and a robust judgment method based on IQR and a dynamic threshold judgment method based on Z-score are adopted. Anomaly levels are classified by combining the recent operation records of vehicles, and a differentiated response process is triggered to realize real-time anomaly detection of vehicle tare weight.
This improved the accuracy and real-time performance of vehicle tare weight detection, ensuring the accuracy and compliance of cargo weight measurement in the port area, and reducing the rate of anomalies and misjudgments.
Smart Images

Figure CN121744121A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of port management technology, and in particular to a method for detecting abnormal vehicle tare weight based on port weighbridges. Background Technology
[0002] In daily operations at the port, vehicle tare weight is the core basis for calculating cargo weight, directly affecting cargo billing, warehousing management, and transportation safety. Its accuracy is crucial. Currently, obtaining vehicle tare weight in the port relies on a single weighing by the weighbridge system, which mainly has the following problems: 1. Lack of historical reference for tare weight determination: The existing weighbridge system only records the current weighing data and does not link it to the historical tare weight information of the same vehicle. For example, a truck's tare weight (i.e., empty weight) at the port is 12 tons, but the average historical tare weight of the vehicle over the past 3 months is 11.5 tons. The deviation in a single weighing may be caused by "adding temporary weights to the vehicle" or "weighing operation error", but it cannot be identified by the existing system, thus causing the cargo weight calculation error (such as over-counting 0.5 tons of cargo weight).
[0003] 2. Differences in operational scenarios are not differentiated: Port operations are divided into two categories: arrival (trucks enter the port with cargo, leave the port empty after unloading, and the tare weight is recorded upon departure) and pickup (trucks enter the port empty, leave the port loaded with cargo, and the tare weight is recorded upon arrival). The tare weight in both scenarios corresponds to the "empty vehicle weight". However, the existing technology does not perform a unified correlation analysis on the tare weight of the same vehicle in the two scenarios, which may miss the hidden problem of "normal tare weight when arriving at the port and abnormal tare weight when picking up cargo" (such as deliberately adding sandbags to increase the tare weight in the pickup scenario to reduce the cargo weight measurement).
[0004] 3. Inefficient and limited methods for detecting anomalies: Currently, port area anomaly detection mainly relies on manual verification (such as staff comparing vehicle appearance with historical photos) or fixed threshold judgment (such as setting "tare weight deviation ±0.5 tons as abnormal"). Manual verification is inefficient (verification of a single vehicle takes more than 3 minutes, which cannot meet the daily traffic flow of thousands of vehicles in the port area), and fixed thresholds do not take into account individual vehicle differences (for example, the normal tare weight fluctuation of heavy trucks can be up to 1 ton, while that of light trucks is only 0.2 tons, and a uniform threshold is prone to misjudgment or omission).
[0005] 4. Insufficient data utilization: Weighbridge systems have accumulated a large amount of vehicle weighing data (license plate number, weighing time, weighing weight, operation type, etc.), but existing technologies have not performed structured analysis on this data, making it impossible to uncover the long-term fluctuation patterns of vehicle tare weight (such as the seasonal increase in tare weight caused by the seasonal installation of anti-skid chains), resulting in insufficient accuracy in anomaly detection.
[0006] In summary, existing port vehicle tare weight detection technologies suffer from shortcomings such as "lack of historical correlation, insufficient scenario differentiation, inefficient methods, and inadequate data utilization." There is an urgent need for an intelligent anomaly detection method that can combine historical tare weight characteristics of vehicles and adapt to different operating scenarios to improve the accuracy and real-time performance of tare weight detection. Summary of the Invention
[0007] In view of this, the present invention proposes a method for detecting abnormal vehicle tare weight based on port weighbridges, which can realize real-time abnormal judgment of vehicle tare weight for a single transaction, and ensure the accuracy of cargo weight measurement and compliance of operations in the port area.
[0008] The technical solution of this invention is implemented as follows: The method for detecting abnormal vehicle tare weights based on port area weighbridges includes the following steps: Step S1: Obtain historical weighing data of all vehicles in the port area, preprocess the historical weighing data, and construct a historical tare weight database. Step S2: Obtain the current tare weight data of the vehicle during a single weighing, and select a portion of historical tare weight data from the historical tare weight database as a reference set; Step S3: Using a robust judgment method based on IQR and a dynamic threshold judgment method based on Z-score, potential abnormal tare weight data are obtained based on the current tare weight data and the reference set. Step S4: Classify the abnormality level of the potentially abnormal tare weight data in conjunction with the vehicle's recent operation records; Step S5: Trigger a differentiated response process based on the anomaly level, and after reviewing the vehicles corresponding to the potentially abnormal tare weight data, update the historical tare weight database.
[0009] Preferably, step S1 includes the following steps: Historical weighing data of vehicles is obtained through the port area weighbridge system. The historical weighing data includes license plate number, vehicle type, rated empty weight range, weighing time, tare weight value, operation type, and weighbridge number. Perform invalid data removal, missing data processing, and duplicate data processing on historical weighing data; A structured historical tare weight database is constructed using the license plate number as the primary key, which includes a basic information table, a tare weight record table, and a statistical feature cache table. Store the license plate number, vehicle type and rated empty weight range in the basic information table, and store the weighing time, tare weight value, operation type and weighbridge number in the tare weight record table. The mean tare weight is obtained by calculating statistical characteristics based on the tare weight value. Standard deviation Quartiles , And the maximum normal range of historical tare weight, based on quartiles. , The interquartile range was calculated. averaging the tare weight Standard deviation Quartiles , Interquartile range The maximum normal fluctuation range of historical tare weight is stored in the statistical feature cache table.
[0010] Preferably, the specific steps of step S2 are as follows: Based on the current vehicle's operation type, historical tare weight data under the same operation type are selected from the historical tare weight database as a reference set; If the historical tare weight data sample of the current vehicle under the said operation type is insufficient, the historical tare weight data of another operation type will be dynamically merged as a reference set. The preferred selection for filtering is historical tare weight data within the past month. If there is insufficient historical tare weight data, the time window is expanded and the filtering is performed again.
[0011] Preferably, step S3, which uses an IQR-based robust judgment method to determine potentially abnormal tare weight data based on the current tare weight data and a reference set, comprises the following specific steps: According to quartiles , and interquartile range The normal tare weight range is defined as follows: ; in The robustness coefficient is selected based on whether the vehicle is a light or medium-sized vehicle; If the current tare weight data W exceeds the normal tare weight range, it is judged as potentially abnormal tare weight data.
[0012] Preferably, step S3, which uses a dynamic threshold determination method based on Z-score to determine potentially abnormal tare weight data based on the current tare weight data and a reference set, involves the following specific steps: Calculate the standardized dispersion Z of the current tare weight data W: According to standard deviation Different thresholds are set for the size, if When the value exceeds the corresponding threshold, it is determined to be potentially abnormal tare weight data.
[0013] Preferably, assuming a vehicle has n valid tare weight records within a selected time window, they are respectively Then the average tare weight of the vehicle Standard deviation The expression is:
[0014]
[0015] in For the i-th valid tare weight record, a weighted sliding mechanism is introduced in the standard deviation calculation, assigning higher weights to tare weight data that are closer to the current time. The weighting calculation formula is as follows:
[0016] in For time decay weight, , This is the attenuation coefficient.
[0017] Preferably, the specific steps of step S4 are as follows: Level 1 exception: Triggered when any of the following conditions are met: The current tare weight data exceeds the maximum normal fluctuation range of historical tare weight, and the deviation is >0.8 tons; The tare weight deviation between two consecutive weighings with an interval of ≤30 minutes is >0.5 tons; The current tare weight is less than 80% of the vehicle's rated empty weight. Level 2 anomaly: Does not meet the Level 1 anomaly criteria, but conforms to the judgment of potential abnormal tare weight data in step S3; Level 3 anomaly: None of the above anomaly conditions are met.
[0018] Preferably, the specific steps of triggering the differentiated response process based on the anomaly level in step S5 are as follows: If the situation is determined to be a Level 1 anomaly, an early warning message will be sent to the weighbridge operator and logistics supervisor through the port area operation system, and the weighbridge control signal will be automatically triggered to execute the vehicle interception operation, prohibiting the vehicle from leaving the weighing area until the manual verification is completed. If a vehicle is determined to be at level two anomaly, an electronic warning will be sent through the port area monitoring terminal or mobile device. This will not trigger the weighbridge to intercept the vehicle. The abnormal vehicle will be subject to manual spot checks or periodic review.
[0019] Preferably, the specific steps for updating the historical tare weight database after reviewing the vehicles corresponding to potentially abnormal tare weight data in step S5 are as follows: Handling of genuine anomalies: If manual verification confirms that the anomaly is a genuine anomaly, the weighing data will be marked as an anomaly and removed from the historical tare weight database. Handling of misjudged data: If the manual review results indicate that the anomaly is a misjudgment, the current tare weight data will be added to the historical tare weight database, and the vehicle's statistical characteristic parameters will be automatically updated.
[0020] Compared with the prior art, the beneficial effects of the present invention are: The present invention provides a vehicle tare weight anomaly detection method based on port weighbridges. Using license plate numbers as unique identifiers, a historical tare weight database is constructed to model the long-term tare weight characteristics of each vehicle. When detecting tare weight anomalies, corresponding historical tare weight data is selected from the database based on scene matching as a reference set, ensuring the business consistency and timeliness of the reference data. Then, a two-dimensional anomaly judgment logic is introduced. A robust judgment method based on IQR can adapt to the skewed distribution of tare weight data and has the ability to resist extreme value interference, while a dynamic threshold judgment method based on Z-score can adapt to normal fluctuation characteristics and adaptively adjust the sensitivity through standard deviation. By using these two algorithms for parallel detection and joint judgment, the anomaly identification coverage can be improved, ensuring the accuracy of tare weight anomaly detection results and guaranteeing the accuracy of cargo weight measurement and operational compliance in the port area. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only preferred embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a flowchart of the vehicle tare weight anomaly detection method based on port area weighbridges according to the present invention. Detailed Implementation
[0023] To better understand the technical content of this invention, a specific embodiment is provided below, and the invention will be further described in conjunction with the accompanying drawings.
[0024] See Figure 1 The present invention provides a method for detecting abnormal vehicle tare weight based on port area weighbridges, comprising the following steps: Step S1: Obtain historical weighing data of all vehicles in the port area, preprocess the historical weighing data, and construct a historical tare weight database. Step S2: Obtain the current tare weight data of the vehicle during a single weighing, and select a portion of historical tare weight data from the historical tare weight database as a reference set; Step S3: Using a robust judgment method based on IQR and a dynamic threshold judgment method based on Z-score, potential abnormal tare weight data are obtained based on the current tare weight data and the reference set. Step S4: Classify the abnormality level of the potentially abnormal tare weight data in conjunction with the vehicle's recent operation records; Step S5: Trigger a differentiated response process based on the anomaly level, and after reviewing the vehicles corresponding to the potentially abnormal tare weight data, update the historical tare weight database.
[0025] The present invention relates to a method for detecting abnormal vehicle tare weight based on port weighbridges. This method interfaces with the port weighbridge system, extracts historical weighing data collected over a long period of time by the system, preprocesses the historical weighing data, and performs filtering and feature extraction. The processed data is then combined into a single historical tare weight record. However, due to different tasks for entering and leaving the port, a single vehicle may have multiple historical tare weight records. These records for each vehicle are stored in a constructed historical tare weight database. Furthermore, the historical tare weight database is updated after each vehicle weighing, thereby enabling long-term tare weight characteristic modeling for each vehicle.
[0026] When the port area needs to detect abnormal tare weights of vehicles, the corresponding vehicle will drive to the weighbridge, and the weighbridge will collect the current tare weight data of the vehicle at the time of a single weighing. Then, based on the unique identifier of the current vehicle, the historical tare weight data of the current vehicle is selected from the historical tare weight database as a reference set to ensure the consistency of tare weight anomaly detection. After determining the reference set, this invention adopts a two-dimensional anomaly judgment logic, including a robust judgment algorithm based on IQR and a dynamic threshold judgment method based on Z-score. The robust judgment algorithm based on IQR can adapt to the skewed distribution of tare weight data and has the ability to resist extreme value interference, while the dynamic threshold judgment method based on Z-score adapts to normal fluctuation characteristics. The two algorithms detect in parallel and make joint judgments, realizing wide-area adaptability under different vehicle characteristics and data distribution conditions, improving the anomaly identification coverage and reducing the anomaly omission rate.
[0027] Potentially abnormal tare weight data can be identified through a two-dimensional anomaly judgment logic. For potentially abnormal tare weight data, a secondary verification is required in conjunction with the vehicle's recent operation records, and the anomaly level is classified. Differentiated response processes will be triggered for different anomaly levels to balance detection accuracy and operation efficiency. At the same time, in order to achieve real-time control and adaptive optimization of abnormal vehicle tare weight in the port area, after triggering the differentiated response process and conducting a review, a data feedback and feature update mechanism is introduced to update the historical tare weight database and improve the long-term stability and adaptability of the detection method.
[0028] Preferably, step S1 includes the following steps: Historical weighing data of vehicles is obtained through the port area weighbridge system. The historical weighing data includes license plate number, vehicle type, rated empty weight range, weighing time, tare weight value, operation type (enumerated value: port arrival / cargo pickup), and weighbridge number (to distinguish different weighing equipment). Perform invalid data removal, missing data processing, and duplicate data processing on historical weighing data; A structured historical tare weight database is constructed using the license plate number as the primary key, which includes a basic information table, a tare weight record table, and a statistical feature cache table. Store the license plate number, vehicle type and rated empty weight range in the basic information table, and store the weighing time, tare weight value, operation type and weighbridge number in the tare weight record table. The mean tare weight is obtained by calculating statistical characteristics based on the tare weight value. Standard deviation Quartiles , And the maximum normal fluctuation range of historical tare weight (determined based on the 95th percentile of historical data), according to the quartiles. , The interquartile range was calculated. averaging the tare weight Standard deviation Quartiles , Interquartile range The maximum normal fluctuation range of historical tare weight is stored in the statistical feature cache table.
[0029] When acquiring historical vehicle weighing data, the data collection frequency is consistent with the weighbridge weighing frequency. This means that each weighing generates one data record, and no redundant data is generated when there are no weighing events, thus ensuring the timeliness and uniqueness of the data. Simultaneously, to improve data quality and analysis accuracy, the collected raw data is cleaned and filtered, specifically including: Invalid data removal: Data with a weighing weight ≤ 0 or a weighing weight exceeding 20% of the vehicle's rated maximum empty weight will be removed. For example, if a truck's rated empty weight is 10 tons, then records with a weighing weight ≥ 12 tons will be considered invalid data, which may be due to equipment failure or operational error.
[0030] Missing and duplicate data processing: Records with empty license plate numbers and unlabeled operation types are removed. For multiple weighing records of the same vehicle within 10 minutes (such as drivers weighing repeatedly), the average weight is taken as the valid value to avoid interference from short-term duplicate data on the statistical results.
[0031] Then, a structured historical tare weight database is constructed using the license plate number as the primary key to store the long-term tare weight information and its statistical characteristics for each vehicle. The basic information table records static information such as the license plate number, vehicle type (heavy / light) and its rated empty weight range. The tare weight record table saves detailed data for each valid weighing. The statistical characteristic cache table calculates statistical characteristics for the historical tare weight data of each vehicle and updates it in real time. Through this database design, efficient storage and fast query of vehicle tare weight characteristics can be achieved, avoiding the repeated calculation of statistical indicators during each detection, thereby improving the system's operating efficiency and real-time detection capabilities.
[0032] Preferably, the specific steps of step S2 are as follows: Based on the current vehicle's operation type, historical tare weight data under the same operation type are selected from the historical tare weight database as a reference set; If the historical tare weight data sample of the current vehicle under the said operation type is insufficient, the historical tare weight data of another operation type will be dynamically merged as a reference set. The preferred selection for filtering is historical tare weight data within the past month. If there is insufficient historical tare weight data, the time window is expanded and the filtering is performed again.
[0033] After determining whether the current vehicle's operation type is port collection or cargo pickup, the historical tare weight data is matched to the scenario based on the operation type. Historical tare weight data under the same operation type are selected from the historical tare weight database as a reference set. If the current vehicle has less than 10 historical samples under a specific operation type, the tare weight data of another operation type can be dynamically merged to form a mixed reference set to prevent statistical bias caused by sample sparsity.
[0034] Meanwhile, to ensure the timeliness and representativeness of the data, historical tare weight data within the past month is prioritized for screening; when the number of valid samples is less than 5, the time window is automatically extended to 3 months to cover the recent real operating status of vehicles. This screening mechanism achieves the dual constraints of scenario relevance and timeliness, ensuring that the reference set used for judgment is both representative and stable.
[0035] To account for the skewness and volatility of different vehicle tare weight distributions, this invention proposes a two-dimensional adaptive judgment mechanism that integrates statistical robustness and dynamic sensitivity. Two types of statistical indicators are calculated in parallel, and any dimension triggering an anomaly condition is considered a potential anomaly. The robust judgment method based on IQR is adapted to skewed data, and its specific steps for determining potential abnormal tare weight data based on the current tare weight data and a reference set are as follows: According to quartiles (25th percentile) (75th percentile) and interquartile range The normal tare weight range is defined as follows: ; in The robustness coefficient is selected based on whether the vehicle is a light or medium-sized vehicle. A coefficient of 1.5 is used for light vehicles and 2.0 is used for heavy vehicles to accommodate the normal fluctuation range of different vehicle types. If the current tare weight data W exceeds the normal tare weight range, it is judged as potentially abnormal tare weight data.
[0036] The dynamic threshold determination method based on Z-score adapts to normal fluctuations. The specific steps for determining potentially abnormal tare weight data based on the current tare weight data and the reference set are as follows: Assuming an approximately normal distribution, calculate the standardized dispersion Z of the current tare weight data W: ,in This is the average tare weight. To address the issue that the fixed threshold of the traditional Z-core method is difficult to adapt to the fluctuation range of different vehicles, this invention introduces an adaptive threshold mechanism based on variance level: when the historical tare weight fluctuation of the vehicle is small (σ < 0.3 tons), the threshold is set to ±2.0; if the fluctuation is large (σ ≥ 0.3 tons), the threshold is set to ±2.5. When the corresponding threshold is exceeded, it is judged as potentially abnormal tare weight data. Through this mechanism, the detection sensitivity can be automatically adjusted according to the individual differences of vehicles, effectively reducing the false alarm rate while ensuring the detection rate.
[0037] Preferably, to improve the statistical accuracy and individual adaptability of Z-score determination, this invention designs a standard deviation calculation method combining sliding window and weighted update to dynamically characterize the fluctuation characteristics of vehicle tare weight. Assuming a vehicle has n valid tare weight records within a selected time window, these are respectively... Then the average tare weight of the vehicle Standard deviation The expression is:
[0038]
[0039] in For the i-th valid tare weight record, This indicates the average tare weight of the vehicle within that time window. Standard deviation represents the degree of fluctuation in tare weight. Its unit is the same as the weighing value, which is tons. It is used to measure the dispersion of vehicle tare weight relative to the average value and the representativeness of the data. The standard deviation is calculated based on a sliding time window mechanism. By default, the system selects the most recent three months or the most recent 50 valid weighing records (e.g., M=50) as the calculation sample. As new data is generated, the window automatically slides forward to achieve real-time updates of statistical parameters.
[0040] Meanwhile, to enhance the detection method's responsiveness to recent changes, a weighted sliding mechanism is introduced into the standard deviation calculation, assigning higher weights to tare weight data closer to the current time, thereby improving the detection method's responsiveness to short-term trend changes. The weighted calculation formula is as follows:
[0041] in For time decay weight, , As a decay coefficient, this design can quickly adjust statistical characteristics when there are large recent fluctuations in vehicle tare weight, thus adapting to external factors such as seasonal changes and changes in vehicle assembly. At the same time, to prevent extreme outliers from affecting the statistical results, data exceeding the interquartile range is automatically removed before calculation. Abnormal samples.
[0042] Preferably, the specific steps of step S4 are as follows: Level 1 Anomaly (High Risk): Triggered by any of the following conditions: The current tare weight data exceeds the maximum normal fluctuation range of historical tare weight (based on the 95th percentile of historical data), and the deviation is >0.8 tons; If the tare weight deviation of two consecutive weighings with an interval of ≤30 minutes is >0.5 tons (it may be due to cheating by temporarily adding / unloading heavy objects); The current tare weight is less than 80% of the vehicle's rated empty weight (this may be due to a malfunction in the weighing equipment or a data entry error). Level 2 anomaly (medium risk): Does not meet the Level 1 anomaly criteria, but conforms to the judgment of potential abnormal tare weight data in step S3, and the deviation is between 0.3 and 0.8 tons; Level 3 anomaly: None of the above anomaly conditions are met.
[0043] The above-mentioned grading mechanism achieves the matching of anomaly intensity and response strategy. High-risk anomalies automatically trigger weighbridge interception and notify supervisors, while low-risk anomalies only generate warnings, thus achieving a balance between detection accuracy and operational efficiency.
[0044] Preferably, the specific steps of triggering the differentiated response process based on the anomaly level in step S5 are as follows: If the situation is determined to be a Level 1 anomaly, an early warning message will be sent to the weighbridge operator and logistics supervisor through the port area operation system. The warning message will include: license plate number, current tare weight, historical average, deviation value, Z-score value and anomaly level. The weighbridge control signal will be automatically triggered to intercept the vehicle and prevent it from leaving the weighing area until manual verification is completed. If a vehicle is identified as having a Level 2 anomaly, an electronic warning will be sent through the port area monitoring terminal or mobile device without triggering the weighbridge to intercept it. The abnormal vehicle will be subject to manual spot checks or periodic reviews, thereby ensuring the detection coverage while avoiding impacting the port area's operational efficiency.
[0045] To achieve real-time control and adaptive optimization of abnormal vehicle tare weight in port areas, this invention designs an abnormality warning and feedback closed-loop mechanism, including three links: real-time warning response, data feedback update, and system self-learning optimization, to ensure that the detection results can respond immediately and continuously evolve. When the detection method determines that the vehicle tare weight is abnormal, a differentiated response process is triggered according to the abnormality level.
[0046] Preferably, the specific steps for updating the historical tare weight database after reviewing the vehicles corresponding to potentially abnormal tare weight data in step S5 are as follows: Handling of real anomaly data: If manual verification confirms that the anomaly is a real anomaly (such as vehicle cheating, sensor failure, or illegal loading), the weighing data will be marked as an anomaly and removed from the historical tare weight database to avoid it interfering with the calculation of subsequent statistical features. Misjudged data processing: If the manual review results indicate that the anomaly is a misjudgment (e.g., the vehicle is temporarily equipped with legal accessories such as snow chains or windshields), the current tare weight data will be included in the historical tare weight database, and the statistical characteristic parameters of the vehicle will be automatically updated. The update method adopts a sliding window weighted update algorithm, which assigns higher weights to newly added data, so that the detection method can quickly adapt to changes in vehicle structure or seasonal fluctuations.
[0047] By introducing a data feedback and feature update mechanism, the results of manual review can be directly applied to the historical tare weight database, enabling dynamic adjustment of the detection method parameters. This includes marking and excluding real abnormal data to prevent abnormal samples from interfering with the statistical baseline; and incorporating misjudged samples (such as legally added accessories) into the dataset and updating statistical features to improve the long-term stability and adaptability of the detection method.
[0048] The effectiveness of the present invention is verified through an example below: Vehicle Information: License Plate Number: A12345; Rated Empty Weight: 11-12 tons; Operation Type: Pickup; Weighbridge Number: 3#.
[0049] Data Acquisition and Preprocessing: On March 10, 2024, the vehicle picked up its cargo and entered the port for weighing. The system collected the following data: license plate number A12345, weighing time 10:25:30, weighing weight 12.8 tons, operation type "cargo pickup", and weighbridge number 3. After preprocessing, the data is valid, and the current tare weight W = 12.8 tons.
[0050] Historical tare weight database access: Fifteen valid tare weight records for this vehicle, covering "cargo pickup operations + the past month," were selected from the historical tare weight database and denoted as follows: The following characteristic parameters were obtained through statistical calculation: Historical average tons, select time decay parameter Standard deviation tons; quartiles ton, tons, interquartile range ton; The maximum normal range of historical tare weight fluctuations (based on the 95th percentile): 10.9–12.3 tons.
[0051] Anomaly detection calculation: Step 1: Scenario adaptation: Refer to the data or operation and the historical records of the past month, totaling 15 records.
[0052] Step 2: Two-dimensional judgment: Judgment range: [11.3] [2.0×0.6, 11.9 + 2.0×0.6] = [10.1, 13.1]. The current W = 12.8 tons, falling within this range; the IQR indicates no anomaly. Z-score calculation:
[0053] The vehicle is a heavy-duty truck, and the Z-score threshold is set to ±2.5. =3.0 > 2.5, which is considered a potential anomaly.
[0054] Step 3: Secondary verification and grading: Current tare weight The weight exceeded the upper limit of the historical maximum normal fluctuation range by 12.3 tons, with a deviation of 0.5 tons, and there was no continuous weighing behavior. Therefore, it was judged as "Level 2 Abnormal (Medium Risk)".
[0055] Anomaly detection calculation The system sends a real-time alert to supervisors: "Vehicle license plate A12345 (delivery operation) current tare weight 12.8 tons, historical average 11.6 tons, deviation 1.2 tons, Z-score=3.0, judgment result: Level 2 anomaly." Manual verification confirmed that the increased tare weight was due to the temporary installation of snow chains, which is normal. The system then adds the 12.8-ton data to the historical database and updates the statistical characteristics accordingly. =11.65 tons =0.42 tons, thereby enabling adaptive adjustment of subsequent testing parameters.
[0056] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. 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 method for detecting abnormal vehicle tare weights based on port area weighbridges, characterized in that, Includes the following steps: Step S1: Obtain historical weighing data of all vehicles in the port area, preprocess the historical weighing data, and construct a historical tare weight database. Step S2: Obtain the current tare weight data of the vehicle during a single weighing, and select a portion of historical tare weight data from the historical tare weight database as a reference set; Step S3: Using a robust judgment method based on IQR and a dynamic threshold judgment method based on Z-score, potential abnormal tare weight data are obtained based on the current tare weight data and the reference set. Step S4: Classify the abnormality level of the potentially abnormal tare weight data in conjunction with the vehicle's recent operation records; Step S5: Trigger a differentiated response process based on the anomaly level, and after reviewing the vehicles corresponding to the potentially abnormal tare weight data, update the historical tare weight database.
2. The method for detecting abnormal vehicle tare weight based on port area weighbridges according to claim 1, characterized in that, The specific steps of step S1 include: Historical weighing data of vehicles is obtained through the port area weighbridge system. The historical weighing data includes license plate number, vehicle type, rated empty weight range, weighing time, tare weight value, operation type, and weighbridge number. Perform invalid data removal, missing data processing, and duplicate data processing on historical weighing data; A structured historical tare weight database is constructed using the license plate number as the primary key, which includes a basic information table, a tare weight record table, and a statistical feature cache table. Store the license plate number, vehicle type and rated empty weight range in the basic information table, and store the weighing time, tare weight value, operation type and weighbridge number in the tare weight record table. The mean tare weight is obtained by calculating statistical characteristics based on the tare weight value. Standard deviation Quartiles , And the maximum normal range of historical tare weight, based on quartiles. , The interquartile range was calculated. averaging the tare weight Standard deviation Quartiles , Interquartile range The maximum normal fluctuation range of historical tare weight is stored in the statistical feature cache table.
3. The method for detecting abnormal vehicle tare weight based on port area weighbridges according to claim 1, characterized in that, The specific steps of step S2 are as follows: Based on the current vehicle's operation type, historical tare weight data under the same operation type are selected from the historical tare weight database as a reference set; If the historical tare weight data sample of the current vehicle under the said operation type is insufficient, the historical tare weight data of another operation type will be dynamically merged as a reference set. The preferred selection for filtering is historical tare weight data within the past month. If there is insufficient historical tare weight data, the time window is expanded and the filtering is performed again.
4. The method for detecting abnormal vehicle tare weight based on port area weighbridges according to claim 2, characterized in that, The specific steps of step S3, which uses an IQR-based robust judgment method to determine potentially abnormal tare weight data based on the current tare weight data and the reference set, are as follows: According to quartiles , and interquartile range The normal tare weight range is defined as follows: ; in The robustness coefficient is selected based on whether the vehicle is a light or medium-sized vehicle; If the current tare weight data W exceeds the normal tare weight range, it is judged as potentially abnormal tare weight data.
5. The method for detecting abnormal vehicle tare weight based on port area weighbridges according to claim 2, characterized in that, The specific steps of step S3, which uses a dynamic threshold determination method based on Z-score to determine potentially abnormal tare weight data according to the current tare weight data and the reference set, are as follows: Calculate the standardized dispersion Z of the current tare weight data W: According to standard deviation Different thresholds are set for the size, if When the value exceeds the corresponding threshold, it is determined to be potentially abnormal tare weight data.
6. The method for detecting abnormal vehicle tare weight based on port area weighbridges according to claim 2, characterized in that, Suppose a vehicle has n valid tare weight records within a selected time window, which are respectively Then the average tare weight of the vehicle Standard deviation The expression is: in For the i-th valid tare weight record, a weighted sliding mechanism is introduced in the standard deviation calculation, assigning higher weights to tare weight data that are closer to the current time. The weighting calculation formula is as follows: in For time decay weight, , This is the attenuation coefficient.
7. The method for detecting abnormal vehicle tare weight based on port area weighbridges according to claim 1, characterized in that, The specific steps of step S4 are as follows: Level 1 exception: Triggered when any of the following conditions are met: The current tare weight data exceeds the maximum normal fluctuation range of historical tare weight, and the deviation is >0.8 tons; The tare weight deviation between two consecutive weighings with an interval of ≤30 minutes is >0.5 tons; The current tare weight is less than 80% of the vehicle's rated empty weight. Level 2 anomaly: Does not meet the Level 1 anomaly criteria, but conforms to the judgment of potential abnormal tare weight data in step S3; Level 3 anomaly: None of the above anomaly conditions are met.
8. The method for detecting abnormal vehicle tare weight based on port area weighbridges according to claim 7, characterized in that, The specific steps of triggering the differentiated response process based on the anomaly level in step S5 are as follows: If the situation is determined to be a Level 1 anomaly, an early warning message will be sent to the weighbridge operator and logistics supervisor through the port area operation system, and the weighbridge control signal will be automatically triggered to execute the vehicle interception operation, prohibiting the vehicle from leaving the weighing area until the manual verification is completed. If a vehicle is determined to be at level two anomaly, an electronic warning will be sent through the port area monitoring terminal or mobile device. This will not trigger the weighbridge to intercept the vehicle. The abnormal vehicle will be subject to manual spot checks or periodic review.
9. The method for detecting abnormal vehicle tare weight based on port area weighbridges according to claim 1, characterized in that, The specific steps for updating the historical tare weight database after reviewing the vehicles corresponding to the potentially abnormal tare weight data in step S5 are as follows: Handling of genuine anomalies: If manual verification confirms that the anomaly is a genuine anomaly, the weighing data will be marked as an anomaly and removed from the historical tare weight database. Handling of misjudged data: If the manual review results indicate that the anomaly is a misjudgment, the current tare weight data will be added to the historical tare weight database, and the vehicle's statistical characteristic parameters will be automatically updated.