Dynamic truck scale grouping optimization method for measurement performance anomaly detection
By constructing a reachable network for truck scales and a bidirectional depth-first search algorithm, the accuracy and efficiency issues of anomaly detection in the measurement performance of dynamic truck scales are solved, efficient anomaly detection and grouping optimization of measurement performance are achieved, and the needs of over-limit law enforcement are met.
Patent Information
- Application Number
- CN202510925264.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-05
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-07-05
AI Technical Summary
Existing technologies make it difficult to quickly and accurately identify abnormal measurement performance of dynamic vehicle scales during calibration intervals. Frequent calibration is costly and time-consuming, making it difficult to meet the needs of over-limit law enforcement.
A reachable network of truck scales based on vehicle traffic patterns is constructed. The spatiotemporal patterns of vehicle traffic are characterized by frequent continuous subsequence mining technology. A truck scale grouping optimization problem model for measurement performance anomaly detection is constructed. A bidirectional depth-first search algorithm is used to solve the grouping optimization problem and generate an approximately optimal grouping solution.
Improves the accuracy and efficiency of dynamic truck scale measurement performance anomaly detection, ensures the truck scale's accurate and reliable operation in the long term, and supports efficient over-limit enforcement.
Smart Images

Figure CN120429800B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of truck scale measurement detection, and in particular to a dynamic truck scale grouping optimization method for measurement performance anomaly detection. Background Art
[0002] Dynamic truck scales (hereafter referred to as truck scales) can weigh moving vehicles in real time. With advantages such as a high degree of automation and high efficiency, they have been widely used in off-site overweight enforcement. Given that the accuracy and precision of truck scales are critical to ensuring fair law enforcement and reducing complaints, and that they are legally managed measuring instruments, they must be regularly calibrated and qualified before they can be put into use. However, due to the long calibration intervals (typically six months to a year), high costs, and time consumption, frequent calibration is difficult to implement. Therefore, during the interval between calibrations, routine maintenance must promptly detect any abnormalities in the truck scale's metrological performance. This is the only way to ensure its long-term accurate and reliable operation, thereby better meeting the needs of overweight enforcement.
[0003] In the area of overweight control, rapidly and accurately identifying anomalies in truck scales between calibration intervals from massive amounts of dynamic weighing data across large regions (e.g., cities, or even provinces) remains a pressing challenge and a major pain point. Based on scenarios where the same vehicle passes through at least three truck scales consecutively within a short time window, rationally grouping truck scales and analyzing the consistency and variance of weighing results from multiple scales within a group can effectively support the detection of anomalies in metrological performance. However, optimizing the grouping of truck scales faces numerous challenges: first, accurately characterizing the spatiotemporal patterns of vehicle traffic to accommodate anomaly detection scenarios (multiple scales per vehicle within a short time window); second, precisely mining spatiotemporal patterns from massive amounts of dynamic weighing data and constructing a reachable network for truck scales, given the uncertainty of noise and vehicle travel paths. Second, constructing a mathematical model for the truck scale grouping problem based on the reachable network. Third, designing an efficient solution algorithm tailored to the specific characteristics of the problem. To address these challenges, it is necessary to develop an optimized dynamic truck scale grouping method for detecting anomalies in metrological performance. Summary of the Invention
[0004] The purpose of the present invention is to provide a dynamic truck scale grouping optimization method for measuring performance anomaly detection, which is conducive to improving the accuracy and efficiency of truck scale grouping in dynamic truck scale measuring performance anomaly detection.
[0005] To achieve the above objectives, the present invention adopts a technical solution: a dynamic truck scale grouping optimization method for measuring performance anomaly detection, comprising:
[0006] Build a truck scale accessibility network based on vehicle traffic patterns;
[0007] Based on the reachable network of truck scales, a truck scale grouping optimization problem model for measurement performance anomaly detection is constructed;
[0008] The truck scale grouping optimization problem is solved based on bidirectional depth-first search. Through forward and reverse search, a path set covering as many truck scales as possible is generated to obtain an approximately optimal grouping solution.
[0009] Furthermore, the reachable network of the truck scale is represented as follows:
[0010] Defining the network accessible to truck scales , used to characterize the vehicle in the short time window T s The time and space passage pattern of the truck scale passing through the vehicle scale; is a node set, representing the set of all truck scales, is a set of directed arcs; any node represents a truck scale; any directed arc Indicates that in T s There are multiple vehicles passing by frequently and in sequence. and , 、 are the i-th and j-th nodes in the node set, forming a directed reachable relationship; each arc Represented as a triple ,in Indicates that the vehicle arrive The average arrival time is used as The weight of .
[0011] Furthermore, building a truck scale reachable network based on vehicle traffic patterns includes the following steps:
[0012] Step A1: Input short time window T s Dynamic weighing data set of vehicles ; Initialize the truck scale reachable network ;
[0013] Step A2: For the dynamic weighing data set The dynamic weighing data in the system is first sorted by license plate and timestamp, and then the data of the same vehicle passing through no less than 3 truck scales is obtained;
[0014] Step A3: From the data obtained in step A2, for each vehicle, extract the truck scale sequence that the vehicle has passed through in sequence, and construct a truck scale sequence database DB;
[0015] Step A4: mining frequently passed truck scale sequences from the truck scale sequence database DB;
[0016] Step A5: Convert the truck scale sequence into a matrix representation to obtain the initial truck scale reachable network ;
[0017] Step A6: Based on the dynamic weighing data set processed in step A2 , calibrate the initial truck scale reachable network Frequency of vehicle traffic;
[0018] Step A7: Output the truck scale reachable network .
[0019] Furthermore, in step A4, a frequent continuous subsequence mining algorithm is used to mine frequently passed truck scale sequences from the truck scale sequence database DB, including the following steps:
[0020] Step B1: Enter the truck scale serial database , prefix sequence and minimum support count ; Initial prefix sequence is empty;
[0021] Step B2: If the prefix sequence Not empty and prefix sequence The length of is greater than or equal to 2, then the prefix sequence Put frequent continuous sequence set ;
[0022] Step B3: Set the condition database Initialized to empty;
[0023] Step B4: For the truck scale sequence database Each sequence in , if the sequence Contains prefix sequence , then the sequence Prefix sequence The contiguous subsequence that follows is assigned to the temporary sequence , and then determine whether it satisfies Not empty, if so, Merge condition database ;
[0024] Step B5: Statistics All possible items e in Followed by Obtained is the minimum support count Frequent continuous sequences of ;
[0025] Step B6: For each item e, compare e with the prefix sequence Concatenate to form a new prefix sequence , and assign it to the sequence , and then recursively call the frequent continuous subsequence mining algorithm PrefixSpan+( );
[0026] Step B7: Output frequent continuous sequence sets , that is, to mine the frequently passing truck scale sequences.
[0027] Furthermore, a truck scale grouping optimization problem model for measurement performance anomaly detection is constructed, and its implementation method is as follows:
[0028] 1) Define the solution and solution space: Assume Indicates the time window T s The truck scale reachable network; if the path set If formula (1) is satisfied, then is based on A feasible solution to the truck scale grouping problem; all feasible solutions constitute the solution space ;
[0029] (1)
[0030] In formula (1), Indicates the number of truck scales included in the route, Indicates arc in the path< >The weight, which represents the arrive The average arrival time of Each path Corresponding to a truck scale group, the number of groups is Definition, each group of truck scales is composed of The truck scale that appears in the determination;
[0031] According to the requirements of the abnormal performance detection scenario of truck scales, the number of truck scales participating in the comparison in each group is no less than 3, so there are ; In addition, to ensure that the path is within the reachable network of the truck scale Within the time constraint, the sum of the average arrival times of all adjacent truck scales in the path shall not exceed The time window size T s ;The number of paths corresponds to the number of groups of the truck scale;
[0032] 2) Define the truck scale non-coverage rate corresponding to the solution: Let Network accessible to truck scales The number of all truck scales in is based on A feasible solution to the truck scale grouping problem is Corresponding truck scale non-coverage rate The definition of is shown in formula (2);
[0033] (2)
[0034] In formula (2), the symbol Representing a collection The number of elements in
[0035] Non-coverage rate To measure the solution The ratio of the number of truck scales not covered by all paths in the network to the total number of truck scales reflects the solution to the entire network. The coverage of medium truck scales;
[0036] 3) Define the maximum time window for detecting abnormal performance of truck scales corresponding to the solution: Let is based on A feasible solution to the truck scale grouping problem is The corresponding maximum time window for abnormal detection of vehicle scale measurement performance The definitions are shown in formula (3) and formula (4);
[0037] (3)
[0038] (4)
[0039] in, Indicates arc in the path< >The average arrival time marked above; Represents a function that finds the maximum element from a numeric set;
[0040] Maximum time window It represents the latest time point for completing the abnormal detection of the truck scale covered by X, determined based on the average arrival time of each path in solution X;
[0041] 4) Define the truck scale grouping optimization problem based on the truck scale reachable network: Assume Indicates the time window T s The truck scale can reach the network, express A feasible solution on and its corresponding solution space; 、 and The calculation solutions are The corresponding three optimization objective functions are the number of truck scale groups, the truck scale coverage rate, and the maximum time window for detecting abnormal performance of truck scales. The truck scale grouping optimization problem based on the truck scale reachable network can be formalized as the multi-objective model defined in formula (5):
[0042] (5)
[0043] The goal is to find the feasible solution space while minimizing 、 and , thus obtaining the optimal grouping solution.
[0044] Furthermore, the truck scale grouping optimization problem is solved by using the truck scale grouping optimization algorithm BDDFS-WGPA based on bidirectional depth-first search, which includes the following steps:
[0045] Step C1: Input short time window T s Corresponding truck scale reachable network The number of all truck scales in , The weighted adjacency matrix of ; Define the set of paths obtained by searching on the reverse reachable network and the global visited node set , and and are all set to empty sets;
[0046] Step C2: T s 、 and As input, perform forward search through the path set search algorithm to obtain the path set X;
[0047] Step C3: Calculation ,get Corresponding truck scale non-coverage rate ;
[0048] Step C4: If , that is, there is an uncovered truck scale, perform a reverse search according to steps C5-C7, otherwise execute step C8;
[0049] Step C5: Transpose to generate the weighted adjacency matrix of the reverse reachable network ;
[0050] Step C6: T s 、 and As input, reverse search is performed through the path set search algorithm to obtain the path set Y;
[0051] Step C7: Reverse the direction of each path in Y to generate a path set ;
[0052] Step C8: Merge the path set and the path set and assign them to the approximate optimal solution ;
[0053] Step C9: Output the approximate optimal solution .
[0054] Furthermore, in step C2, a forward search is performed using a depth-first path set search algorithm DF-PSSA, including the following steps:
[0055] Step D1: Input short time window T s , Truck scales reachable network The weighted adjacency matrix of and the global visited node set ; Set the path Set to empty set;
[0056] Step D2: Based on Calculate the in-degree of each node and sort all nodes in ascending order of in-degree, then store the result in the node sequence middle;
[0057] Step D3: Traverse the node sequence sequentially For each node i in , loop through steps D4-D5;
[0058] Step D4: Sequence the nodes The i-th node in Assign value to node variable ;
[0059] Step D5: If Not , then the current path Set to an empty set, the weighted path length will be accumulated Set to 0, 、 、 、 、 and As input parameter, call the depth-first search algorithm to traverse to cover more nodes as early as possible;
[0060] Step D6: Output the obtained path set .
[0061] Furthermore, in step D5, a depth-first search algorithm DFSA is called to perform traversal, including the following steps:
[0062] Step E1: Enter the current truck scale node , Current Path , cumulative path length , path set , Global Visited Node Set , car-accessible network The corresponding weighted adjacency matrix ;
[0063] Step E2: join in and ;
[0064] Step E3: Based on and , get The set of all unvisited adjacent nodes ;
[0065] Step E4: Sort by outdegree descending and arc < >The weight value in ascending order Nodes in Sort by
[0066] Step E5: Initialize the flag "extended" indicating whether to extend the search under the current node to false;
[0067] Step E6: Traverse sequentially For each node in , loop through steps E7-E9;
[0068] Step E7: Assemble The i-th node in Assign value to node variable ;
[0069] Step E8: Accumulate the path length and [ , ] and assign it to ;
[0070] Step E9: If Less than or equal to the short window , then recursively call the depth-first search algorithm DFSA and assign extended to true, otherwise join in ;
[0071] Step E10: If extended is false and If the length of is greater than or equal to 2, copy and deposit , then merge and and as a new ;
[0072] Step E11: From and Remove .
[0073] The present invention also provides a computer device, comprising: at least one processor, at least one memory, and computer program instructions stored in the memory, wherein the above method is implemented when the computer program instructions are executed by the processor.
[0074] The present invention also provides a computer-readable storage medium having computer program instructions stored thereon, which implement the above method when the computer program instructions are executed by a processor.
[0075] Compared with the existing technology, the present invention has the following beneficial effects: this method aims at the needs of scenario-based measurement performance anomaly detection. On the basis of considering the noise interference of weighing data and the uncertainty of vehicle driving path, it adopts frequent continuous subsequence mining technology to construct a truck scale reachable network, thereby accurately characterizing the spatiotemporal pattern of vehicle traffic for anomaly detection; then, based on the truck scale reachable network, it accurately constructs a truck scale grouping optimization problem model for measurement performance anomaly detection to improve the rationality of the grouping results and the detection efficiency; finally, the truck scale grouping optimization problem is solved based on bidirectional depth-first search, so as to efficiently obtain an approximate optimal solution, providing strong support for improving the efficiency of truck scale measurement performance anomaly detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] Figure 1 is a flowchart of a method implementation of an embodiment of the present invention;
[0077] Figure 2 Schematic diagram of the mining and generation process of the reachable network of a truck scale according to an embodiment of the present invention;
[0078] Figure 3 The PrefixSpan+ algorithm in the embodiment of the present invention recursively mines under the condition that the minimum support count is 2. Figure 2 Schematic diagram of the process of frequent continuous subsequences in database DB. DETAILED DESCRIPTION
[0079] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0080] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present application belongs.
[0081] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof.
[0082] like Figure 1 As shown, this embodiment provides a dynamic truck scale grouping optimization method for measuring performance anomaly detection, including:
[0083] Step S1: Constructing a truck scale reachable network based on vehicle traffic patterns;
[0084] Step S2: Based on the reachable network of the truck scale, a truck scale grouping optimization problem model for measurement performance anomaly detection is constructed;
[0085] Step S3: Solve the truck scale grouping optimization problem based on a bidirectional depth-first search. Through forward and reverse searches, generate a path set that covers as many truck scales as possible and obtain an approximately optimal grouping solution.
[0086] The following is a further explanation of the relevant contents involved in this method.
[0087] 1 Representation and mining of reachable networks of truck scales
[0088] 1.1 Representation of the network accessible to truck scales
[0089] Based on the short time window T s Building a truck scale accessible network , used to characterize the vehicle at T s The time and space traffic pattern of the truck scale passing through the vehicle scale. Specifically, define ,in, is a node set, representing the set of all truck scales, is a set of directed arcs. Any node represents a truck scale; any directed arc Indicates that in T s There are multiple vehicles passing by frequently and in sequence. and , 、 are the i-th and j-th nodes in the node set, respectively, representing the i-th and j-th truck scales in the set of all truck scales, thus forming a directed reachable relationship. Each arc Can be represented as a triple ,in Indicates that the vehicle arrive The average travel time is used as The weight of .
[0090] Figure 2 The frame with a diagonal background in the lower middle section shows An example of . The arc in this example Indicates that multiple vehicles are in T s Frequent and sequential passage and , with an average arrival time of 2 hours.
[0091] 1.2 Mining the reachable network of truck scales
[0092] Table 1 shows the implementation process of the truck scale reachable network mining algorithm based on vehicle traffic patterns. The input is the dynamic weighing dataset of vehicles within 24 hours. , the output is the truck scale reachable network .
[0093] Table 1 Truck scale reachable network mining algorithm based on vehicle traffic pattern
[0094]
[0095] The whole process includes four core steps: data preprocessing (line 2), sequence database construction (line 3), initial network generation (line 4), and average arrival time calibration (line 6). Figure 2 The process of mining and generating the reachable network of a truck scale is further demonstrated intuitively. The following further introduces the core steps:
[0096] (1) Data preprocessing
[0097] Based on the abnormal detection scenario of vehicle scale measurement performance, s The dynamic weighing data in the system is first sorted by license plate and time stamp, and then the weighing records of vehicles that have passed through the truck scale less than 3 times are eliminated, and finally the pre-processed data is obtained.
[0098] (2) Construction of truck scale sequence database
[0099] In T sThe pre-processed vehicle dynamic weighing data has been arranged in order according to the license plate and time stamp. For each vehicle, the sequence of vehicle scales it has passed through can be extracted; for T s All vehicles in the vehicle scale can build a vehicle scale sequence database DB.
[0100] (3) Generation of initial truck scale reachable network based on frequent continuous subsequence mining
[0101] In order to identify the truck scales that vehicles frequently pass by, based on T s Corresponding to the truck scale sequence database DB, this method proposes a new mining algorithm PrefixSpan+, the specific algorithm is shown in Table 2.
[0102] Table 2 Frequent continuous subsequence mining algorithm PrefixSpan+
[0103]
[0104] This algorithm is designed for the abnormal performance detection of truck scales and only outputs frequent continuous subsequences with a length greater than or equal to 2 (such as rows 1-2 of the algorithm in Table 2). In addition, the algorithm constructs prefix sequences. Projection database When you need to judge Each sequence in Whether to include If included, middle The subsequent consecutive subsequences are added Otherwise, not included (As shown in Table 2, lines 4-9 of the algorithm).
[0105] Figure 3 The PrefixSpan+ algorithm is shown to recursively mine under the condition that the minimum support count is 2. Figure 2 The table in the upper left corner shows the process of frequent continuous subsequences in the database DB. Figure 3 For readability, the backtracking arc has been omitted. Figure 3 In the example, the labels on the arcs represent prefix sequences. , and the nodes represent the prefix projection database. The last truck scale in the arc is prefix-projected on the arc tail node database to obtain the arc head node database. Figure 3 The recursive mining process shown can output two consecutive subsequences of truck scales marked in red on the last layer of arcs:<wb1, wb2,wb3> and<wb1, wb2, wb4> . Considering it as a path in a directed graph, we can directly construct Figure 2 The initial truck scale reachable network.
[0106] (4) Calibration of average arrival time
[0107] In the initial truck scale reachable network, each arc Average arrival time The short time window T s The reachable network after calibration is calculated based on the preprocessed data set. Figure 2 As shown in the frame with diagonal background in the lower middle part.
[0108] In summary, this method constructs a truck scale reachable network based on vehicle traffic patterns, and its implementation method is as follows:
[0109] Step A1: Input short time window T s Dynamic weighing data set of the vehicle within 24 hours (in this example) ; Initialize the truck scale reachable network ;
[0110] Step A2: For the dynamic weighing data set The dynamic weighing data in the system is first sorted by license plate and timestamp, and then the data of the same vehicle passing through no less than 3 truck scales is obtained;
[0111] Step A3: From the data obtained in step A2, for each vehicle, extract the truck scale sequence that it has passed through in sequence, and construct a truck scale sequence database DB;
[0112] Step A4: using a frequent continuous subsequence mining algorithm to mine frequently passed truck scale sequences from the truck scale sequence database DB; including the following steps:
[0113] Step B1: Enter the truck scale serial database , prefix sequence and minimum support count ; Initial prefix sequence is empty;
[0114] Step B2: If the prefix sequence Not empty and prefix sequence The length of is greater than or equal to 2, then the prefix sequence Put frequent continuous sequence set ;
[0115] Step B3: Set the condition database Initialized to empty;
[0116] Step B4: For the truck scale sequence database Each sequence in , if the sequence Contains prefix sequence , then the sequence Prefix sequence The contiguous subsequence that follows is assigned to the temporary sequence , and then determine whether it satisfies Not empty, if so, Merge condition database ;
[0117] Step B5: Statistics All possible items e in Followed by Obtained is the minimum support count Frequent continuous sequences of ;
[0118] Step B6: For each item e, compare e with the prefix sequence Concatenate to form a new prefix sequence , and assign it to the sequence , and then recursively call the frequent continuous subsequence mining algorithm PrefixSpan+( );
[0119] Step B7: Output frequent continuous sequence sets , that is, to mine the frequently passing truck scale sequence;
[0120] Step A5: Convert the truck scale sequence into a matrix representation to obtain the initial truck scale reachable network ;
[0121] Step A6: Based on the dynamic weighing data set processed in step A2 , calibrate the initial truck scale reachable network Frequency of vehicle traffic;
[0122] Step A7: Output the truck scale reachable network .
[0123] 2 Truck scale grouping optimization problem model based on reachable network
[0124] The following is the relevant definition of the truck scale grouping optimization problem based on the reachable network.
[0125] Furthermore, a truck scale grouping optimization problem model for measurement performance anomaly detection is constructed, and its implementation method is as follows:
[0126] Definition 1 (Solution and Solution Space): Let Indicates the time window T s The truck scale reachable network; if the path set If formula (1) is satisfied, then is based on A feasible solution to the truck scale grouping problem. All feasible solutions constitute the solution space ;
[0127] (1)
[0128] In formula (1), Indicates the number of truck scales included in the route, Indicates arc in the path< >The weight, which represents the arrive The average arrival time of Each path Corresponding to a truck scale group, the number of groups is Definition, each group of truck scales is composed of The truck scale that appears in is determined.
[0129] According to the requirements of the abnormal performance detection scenario of truck scales, the number of truck scales participating in the comparison in each group is no less than 3, so there are In addition, to ensure that the path is within the reachable network of the truck scale Within the time constraint, the sum of the average arrival times of all adjacent truck scales in the path shall not exceed The time window size T s The number of paths corresponds to the number of groups of the truck scale.
[0130] Definition 2 (the corresponding truck scale coverage rate): Let Network accessible to truck scales The number of all truck scales in is based on A feasible solution to the truck scale grouping problem is Corresponding truck scale non-coverage rate The definition of is shown in formula (2);
[0131] (2)
[0132] In formula (2), the symbol Representing a collection The number of elements in .
[0133] Non-coverage rate To measure the solution The ratio of the number of truck scales not covered by all paths in the network to the total number of truck scales reflects the solution to the entire network. The coverage level of medium truck scales.
[0134] Definition 3 (the maximum time window for detecting abnormal performance of truck scale corresponding to the solution): Let is based on A feasible solution to the truck scale grouping problem is The corresponding maximum time window for abnormal detection of vehicle scale measurement performance The definitions are shown in formula (3) and formula (4);
[0135] (3)
[0136] (4)
[0137] in, Indicates arc in the path< >The average arrival time marked above; Represents a function that finds the maximum element from a numeric set.
[0138] Maximum time window It represents the latest time point for completing the abnormal detection of the truck scale covered by X, determined based on the average arrival time of each path in solution X.
[0139] Definition 4 (Truck scale grouping optimization problem based on reachable network): Assume Indicates the time window T s The truck scale can reach the network, express A feasible solution on and its corresponding solution space. 、 and The calculation solutions are The corresponding three optimization objective functions are the number of truck scale groups, the truck scale coverage rate, and the maximum time window for detecting abnormalities in the truck scale measurement performance. The truck scale grouping optimization problem based on the truck scale reachable network can be formalized as a multi-objective model defined in formula (5):
[0140] (5)
[0141] The goal is to find the feasible solution space while minimizing 、 and , thus obtaining the optimal grouping solution.
[0142] 3 Truck scale grouping optimization algorithm based on bidirectional depth-first search
[0143] The truck scale grouping optimization problem defined above is essentially the problem of selecting a subset of paths from all reachable networks that satisfies feasibility constraints and simultaneously optimizes three objective functions. This is an NP-hard problem. In large-scale reachable networks, this problem is difficult to find an exact solution within a reasonable time. Therefore, this method combines path and time constraints to propose a truck scale grouping optimization algorithm based on bidirectional depth-first search (BDDFS-WGPA), which can efficiently find a near-optimal solution. The specific algorithm is shown in Tables 3, 4, and 5.
[0144] Table 3 Truck scale grouping optimization algorithm BDDFS-WGPA based on bidirectional depth-first search
[0145]
[0146] Table 4 Depth-first path set search algorithm DF-PSSA
[0147]
[0148] Table 5 Depth-first search algorithm DFSA
[0149]
[0150] After initialization, the BDDFS-WGPA algorithm in Table 3 first Call the Depth-First Path Set Search Algorithm (DF-PSSA) in Table 4 to generate a path set through forward search. If there are still uncovered nodes, Reverse all arcs in , perform a reverse DF-PSSA search, and obtain the path set . Ultimately, After the direction of the path is restored, In the DF-PSSA algorithm in Table 4, nodes with small in-degree and no access are selected first and traversed by calling the Depth-First Search Algorithm (DFSA) in Table 5 to cover more nodes as soon as possible.
[0151] In the DFSA algorithm in Table 5, nodes with larger out-degree and smaller arc weight are preferentially selected for access. The purpose is to: (1) increase the probability of generating a path that meets the constraint of "path length not less than 2" by preferentially expanding nodes with larger out-degree; (2) increase the probability of generating a weighted path with a length not less than 2 by preferentially selecting nodes with smaller arc weight. The probability of the path, while helping to optimize the maximum time window objective function of anomaly detection In addition, a recursive depth-first search is performed to obtain the longest possible path to reduce the number of paths required to cover all nodes, thereby minimizing the number of grouping objective functions. At the same time, we also cover as many nodes as possible to minimize the uncovered rate objective function. .
[0152] In summary, this method solves the truck scale grouping optimization problem through the truck scale grouping optimization algorithm BDDFS-WGPA based on bidirectional depth-first search. The implementation method is as follows:
[0153] Step C1: Input short time window T s Corresponding truck scale reachable network The number of all truck scales in , The weighted adjacency matrix of ; Define the set of paths obtained by searching on the reverse reachable network and the global visited node set , and and are all set to empty sets;
[0154] Step C2: T s 、 and As input, perform forward search through the path set search algorithm to obtain the path set X;
[0155] Step C3: Calculation ,get Corresponding truck scale non-coverage rate ;
[0156] Step C4: If , that is, there is an uncovered truck scale, perform a reverse search according to steps C5-C7, otherwise execute step C8;
[0157] Step C5: Transpose to generate the weighted adjacency matrix of the reverse reachable network ;
[0158] Step C6: T s 、 and As input, reverse search is performed through the path set search algorithm to obtain the path set Y;
[0159] Step C7: Reverse the direction of each path in Y to generate a path set ;
[0160] Step C8: Merge the path set and the path set and assign them to the approximate optimal solution ;
[0161] Step C9: Output the approximate optimal solution .
[0162] In steps C2 and C6, a forward search or a reverse search is performed using a depth-first path set search algorithm (DF-PSSA). The following description uses the forward search as an example, and the reverse search can be implemented in the same way.
[0163] The forward search is performed using the depth-first path set search algorithm DF-PSSA, which includes the following steps:
[0164] Step D1: Input short time window T s , Truck scales reachable network The weighted adjacency matrix of and the global visited node set ; Set the path Set to empty set;
[0165] Step D2: Based on Calculate the in-degree of each node and sort all nodes in ascending order of in-degree, then store the result in the node sequence middle;
[0166] Step D3: Traverse the node sequence in sequence For each node i in , loop through steps D4-D5;
[0167] Step D4: Sequence the nodes The i-th node in Assign value to node variable ;
[0168] Step D5: If Not , then the current path Set to an empty set, the weighted path length will be accumulated Set to 0, 、 、 、 、 and As input parameter, call the depth-first search algorithm to traverse to cover more nodes as early as possible;
[0169] Step D6: Output the obtained path set .
[0170] In this embodiment, in step D5, the depth-first search algorithm DFSA is called to perform traversal, and its implementation method is as follows:
[0171] Step E1: Enter the current truck scale node , Current Path , cumulative path length , path set , Global Visited Node Set , car-accessible network The corresponding weighted adjacency matrix ;
[0172] Step E2: join in and ;
[0173] Step E3: Based on and , get The set of all unvisited adjacent nodes ;
[0174] Step E4: Sort by outdegree descending and arc < >The weight value in ascending order Nodes in Sort by
[0175] Step E5: Initialize the flag "extended" indicating whether to extend the search under the current node to false;
[0176] Step E6: Traverse sequentially For each node in , loop through steps E7-E9;
[0177] Step E7: Assemble The i-th node in Assign value to node variable ;
[0178] Step E8: Accumulate the path length and nodes To Node Path length [ , ] and assign it to the length variable ;
[0179] Step E9: If Less than or equal to the short window , then recursively call the depth-first search algorithm DFSA and assign extended to true, otherwise join in ;
[0180] Step E10: If extended is false and If the length of is greater than or equal to 2, copy and deposit , then merge and and as a new ;
[0181] Step E11: From and Remove .
[0182] This embodiment further provides a computer device, comprising: at least one processor, at least one memory, and computer program instructions stored in the memory, wherein the above method is implemented when the computer program instructions are executed by the processor.
[0183] This embodiment further provides a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the above method is implemented.
[0184] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0185] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0186] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0187] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0188] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any other manner. Any person skilled in the art may utilize the above-disclosed technical content to modify or modify the present invention into equivalent embodiments. However, any simple modifications, equivalent variations, and modifications to the above embodiments that do not depart from the technical content of the present invention and are based on the technical essence of the present invention remain within the scope of protection of the present invention.
Claims
1. A dynamic truck scale grouping optimization method for measuring performance anomaly detection, characterized in that: include: Build a truck scale accessibility network based on vehicle traffic patterns; Based on the reachable network of truck scales, a truck scale grouping optimization problem model for measurement performance anomaly detection is constructed; The truck scale grouping optimization problem is solved based on a bidirectional depth-first search. Through forward and reverse searches, a path set covering as many truck scales as possible is generated to obtain an approximately optimal grouping solution. A truck scale grouping optimization problem model for measuring performance anomaly detection is constructed, and its implementation method is as follows: 1) Define the solution and solution space: Let wbNet represent the solution corresponding to the short time window T s The truck scale can reach the network; If the path set X satisfies formula (1), then X is called a feasible solution to the truck scale grouping problem based on wbNet; all feasible solutions constitute the solution space Ω; In formula (1), n represents the number of truck scales included in the path, att <j,j+1> Represents an arc in a path <wb j ,wb j+1 >The weight, which represents the weight from wb j to wb j+1 The average arrival time; at the same time, each path in X corresponds to a truck scale group, and the number of groups is determined by f gn (X) = |X| definition, the truck scale of each group is determined by the truck scale appearing in the path; According to the requirements of the truck scale measurement performance anomaly detection scenario, the number of truck scales participating in the comparison in each group is no less than 3, so n ≥ 3; in addition, to ensure that the path is within the time constraint of the truck scale reachable network wbNet, the sum of the average arrival time between all adjacent truck scales in the path must not exceed the time window size T of wbNet. s ;The number of paths corresponds to the number of groups of the truck scale; 2) Define the truck scale coverage rate corresponding to the solution: Let m be the number of all truck scales in the truck scale reachable network wbNet, X be a feasible solution to the truck scale grouping problem based on wbNet, then the truck scale coverage rate f corresponding to X is ur (X) is defined as shown in formula (2); In formula (2), the symbol |S| represents the number of elements in the set S; Uncoverage rate f ur (X) is used to measure the ratio of the number of truck scales not covered by all paths in the solution X to the total number of truck scales, reflecting the coverage of the solution for the truck scales in the entire network wbNet; 3) Define the maximum time window for detecting abnormal performance of truck scales corresponding to the solution: Let X be a feasible solution to the truck scale grouping problem based on wbNet, then the maximum time window for detecting abnormal performance of truck scales corresponding to X is f mw (X) is defined as shown in formula (3) and formula (4); f mw (X)=max(pathAtts) (3) Among them, att <j,j+1> Represents an arc in a path <wb j ,wb j+1 >The average arrival time marked above; max represents a function that finds the maximum element from a numerical set; Maximum time window f mw (X) represents the latest time point for completing abnormality detection of the truck scale covered by X, determined based on the average arrival time of each path in solution X; 4) Define the truck scale grouping optimization problem based on the truck scale reachable network: Let wbNet represent the time window T s The truck scale reachable network, X∈Ω represents a feasible solution on wbNet and its corresponding solution space; f gn (X), f ur (X) and f mw (X) are the three optimization objective functions of the number of truck scale groups corresponding to the solution X, the truck scale coverage rate, and the maximum time window for detecting abnormal performance of the truck scale. The truck scale grouping optimization problem based on the truck scale reachable network can be formalized as the multi-objective model defined in formula (5): min X∈Ω (f gn (X),f ur (X),f mw (X)) (5) The goal is to minimize f in the feasible solution space Ω gn (X), f ur (X) and f mw (X), thus obtaining the optimal grouping solution.
2. The dynamic truck scale grouping optimization method for measurement performance anomaly detection according to claim 1 is characterized in that: The reachable network of the truck scale is represented as follows: Define the truck scale reachable network wbNet=(wbs,arcs), which is used to characterize the vehicle in the short time window T s The time-space traffic pattern of the truck scale passing through the wbs is shown in Figure 1. Among them, wbs is a node set, which represents the set of all truck scales, and arcs is a directed arc set. Any node wb i ∈wbs represents a truck scale; any directed arc arc <i,j> ∈arcs means that in T s There are multiple vehicles passing through wb frequently and in sequence. i and wb j , wb i 、wb j are the i-th and j-th nodes in the node set, respectively, forming a directed reachable relationship; each arc <i,j> Represented as a triple (wb i ,wb j ,att <i,j> ), where att <i,j> Indicates that the vehicle is from wb i to wb j The average arrival time is used as arc <i,j> The weight of .
3. The dynamic truck scale grouping optimization method for measurement performance anomaly detection according to claim 1 is characterized in that: Building a truck scale access network based on vehicle traffic patterns includes the following steps: Step A1: Input short time window T s Initialize the vehicle's dynamic weighing data set VDWDS; initialize the truck scale reachable network wbNet; Step A2: Sort the dynamic weighing data in the dynamic weighing dataset VDWDS by license plate and timestamp, and then obtain data of the same vehicle passing through no less than three truck scales; Step A3: From the data obtained in step A2, for each vehicle, extract the truck scale sequence that the vehicle has passed through in sequence, and construct a truck scale sequence database DB; Step A4: mining frequently passed truck scale sequences from the truck scale sequence database DB; Step A5: Convert the truck scale sequence into a matrix representation to obtain the initial truck scale reachable network wbNet; Step A6: Based on the dynamic weighing data set VDWDS processed in step A2, calibrate the vehicle passing frequency in the initial truck scale reachable network wbNet; Step A7: Output the obtained truck scale reachable network wbNet.
4. The dynamic truck scale grouping optimization method for measurement performance anomaly detection according to claim 3 is characterized in that: In step A4, a frequent continuous subsequence mining algorithm is used to mine frequently passed truck scale sequences from the truck scale sequence database DB, including the following steps: Step B1: Input the truck scale sequence database DB, prefix sequence α and minimum support count min sup ;The initial prefix sequence α is empty; Step B2: If the prefix sequence α is not empty and the length of the prefix sequence α is greater than or equal to 2, then put the prefix sequence α into the frequent continuous sequence set equipmentSequences; Step B3: Initialize the condition database DB|α to be empty; Step B4: For each sequence β in the truck scale sequence database DB, if the sequence β contains a complete continuous subsequence of the prefix sequence α, then assign the continuous subsequence immediately following the prefix sequence α in the sequence β to the temporary sequence γ, and then determine whether γ is not empty. If so, merge γ into the conditional database DB|α; Step B5: Count all possible items e in DB|α so that α followed by e⊕e is the minimum support count min sup Frequent continuous sequences of ; Step B6: For each item e, concatenate e with the prefix sequence α to form a new prefix sequence α, assign it to the sequence β, and then recursively call the frequent continuous subsequence mining algorithm PrefixSpan+(DB|α,β,min sup ); Step B7: Output the frequent continuous sequence set equipmentSequences, which is to mine the frequently passed truck scale sequences.
5. The dynamic truck scale grouping optimization method for measurement performance anomaly detection according to claim 1 is characterized in that: The truck scale grouping optimization problem is solved by the truck scale grouping optimization algorithm BDDFS-WGPA based on bidirectional depth-first search, which includes the following steps: Step C1: Input short time window T s The corresponding truck scale reachable network wbNet is the number of all truck scales m, and the weighted adjacency matrix A of wbNet m×m ; Define the path set Z and the global visited node set visited obtained by searching on the reverse reachable network, and set both Z and visited to empty sets; Step C2: T s 、A m×m and visited are input, and a forward search is performed through the path set search algorithm to obtain the path set X; Step C3: Calculate f ur (X), get the truck scale uncovered rate uncvRate corresponding to X; Step C4: If uncvRate>0, that is, there is an uncovered truck scale, perform a reverse search according to steps C5-C7, otherwise execute step C8; Step C5: A m×m Transpose to generate the weighted adjacency matrix of the reverse reachable network Step C6: T s 、 and visited are input, and a reverse search is performed through the path set search algorithm to obtain the path set Y; Step C7: Reverse the direction of each path in Y to generate a path set Z; Step C8: Merge the path set and the path set, and assign them to the approximate optimal solution X * ; Step C9: Output the approximate optimal solution X * .
6. The dynamic truck scale grouping optimization method for measurement performance anomaly detection according to claim 5 is characterized in that: In step C2, a forward search is performed using a depth-first path set search algorithm (DF-PSSA), including the following steps: Step D1: Input short time window T s , the weighted adjacency matrix A of the truck scale reachable network wbNet m×m and the global visited node set visited; set the path set X to an empty set; Step D2: Based on A m×m Calculate the in-degree of each node, sort all nodes in ascending order of in-degree, and then store the result in the node sequence nodes; Step D3: traverse each node i in the node sequence nodes in turn, and execute steps D4-D5 in a loop; Step D4: assign the i-th node nodes[i] in the node sequence nodes to the node variable node; Step D5: If node does not belong to visited, set the current path curPath to an empty set, set the cumulative weighted path length accWLen to 0, and use node, curPath, accWLen, X, visited, T s and A m×m As input parameter, call the depth-first search algorithm to traverse to cover more nodes as early as possible; Step D6: Output the obtained path set X.
7. The dynamic truck scale grouping optimization method for measurement performance anomaly detection according to claim 6 is characterized in that: In step D5, the depth-first search algorithm DFSA is called to perform traversal, including the following steps: Step E1: Input the current truck scale node currentNode, the current path curPath, the cumulative path length accLen, the path set X, the global visited node set visited, and the corresponding weighted adjacency matrix A of the vehicle reachable network wbNet m×m ; Step E2: Add currentNode to curPath and visited; Step E3: Based on A m×m and visited, get the set nextNodes of all unvisited adjacent nodes of currentNode; Step E4: Sort by out-degree descending and arc<currentNode,nextNode> Sort the nodes nextNode in nextNodes in ascending order of weight value; Step E5: Initialize the flag "extended" indicating whether to extend the search under the current node to false; Step E6: Traverse each node in nextNodes in turn and execute steps E7-E9 in a loop; Step E7: assign the i-th node nextNodes[i] in the set nextNodes to the node variable nextNode; Step E8: Add the cumulative path length accLen to the path length A[currentNode, nextNode] from the node currentNode to the node nextNode, and assign the value to the length variable newLen; Step E9: If newLen is less than or equal to the short-time window T s , then recursively call the depth-first search algorithm DFSA and assign extended to true, otherwise add nextNode to visited; Step E10: If extended is false and the length of curPath is greater than or equal to 2, copy curPath and store it in cpyCurPath, then merge X and cpyCurPath and use it as the new X; Step E11: Remove currentNode from curPath and visited.
8. A computer device, characterized in that: include: At least one processor, at least one memory, and computer program instructions stored in the memory, which implement the method according to any one of claims 1 to 7 when the computer program instructions are executed by the processor.
9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method and system for weighing finished vehicle by using dynamic and static automobile scales based on sensor grouping
CN102353432A
Electric vehicle real-time path optimal guidance scheduling method based on dynamic time-sharing road network, medium and equipment
CN118735092A