A method for collecting data from weighbridge
Through data format verification, array index access and stable number judgment, combined with vehicle image and time information, the problem of inaccurate collection of vehicle information in floor scale management is solved, the matching accuracy of floor scale vehicle information and the stability of the system are improved, and the matching accuracy of floor scale vehicle information is improved, and the stability of the system is generated. Accurate floor scale report.
Patent Information
- Application Number
- CN202410419146.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-09
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2044-04-09
AI Technical Summary
There is a problem of inaccurate matching of vehicle information collection and processing in the existing floor scale management, which leads to low weighing efficiency. Especially when vehicle data is easily garbled during transmission, it is impossible to distinguish real vehicles by relying on vehicle weight matching. It is easy to introduce only license plate information. mistake.
By receiving floor scale measurement data, including vehicle weight, time and license plate information, data format checksum conversion is performed, the array index is used to extract vehicle data with larger weights, and the real vehicle is judged by the number of stable times, combining vehicle images and time information for Cross-validation to generate accurate scale acquisition data.
It improves the accuracy of floor scale vehicle information collection and matching, avoids garbled interference and weight matching errors, ensures data reliability and system stability, and generates richer and more accurate floor scale reports.
Smart Images

Figure CN118310611B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of weighbridge management and control, and in particular to a weighbridge data collection method. Background Art
[0002] With the development of economy, the transportation volume of trucks has increased significantly. As an important place for weighing vehicles, the demand for weighbridges is also growing. However, there are problems such as inaccurate matching in the collection and processing of vehicle information in the existing weighbridge management, which affects the efficiency of weighbridge weighing. How to improve the accuracy of vehicle information collection and processing of weighbridges has become an urgent problem to be solved.
[0003] At present, there are inherent limitations in the matching of vehicle information collected by weighbridges, such as license plate and weight. In practical applications, the following problems often occur: vehicle data generates garbled characters during transmission, affecting reliability; real vehicles cannot be distinguished when matching by vehicle weight; and errors are easily introduced when only license plate information is used. These factors lead to poor overall matching and collection of vehicle information on weighbridges.
[0004] In the related art, for example, Chinese patent document CN114979201A provides an intelligent weighing scale control system that can realize unattended operation. In the present invention, the vehicle management monitoring module is equipped with a vehicle information management module, a vehicle label issuance module, a status monitoring module and a system management module, and multiple managements are performed on the vehicles to be weighed, thereby improving the scientific rationality of the system for vehicle management during use, reducing unnecessary labor, and improving the vehicle weighing speed during use. At the same time, the log management set inside the system management module provides the recording and query functions of user operation records. The key operations in the software system must be recorded, such as modifying and deleting information, recording user accounts, operation contents, operation time, etc., so as to audit personnel operations and prevent users from intentionally or unintentionally damaging system data. However, this scheme mainly relies on data collected by various sensors, and the accuracy of the sensors is easily affected by the environment. Therefore, the accuracy of the information collected by this scheme needs to be further improved. Summary of the invention
[0005] 1. Technical problems to be solved
[0006] In view of the problem of low accuracy of vehicle weighing information in the prior art, the present application provides a method for collecting weighbridge data, which improves the accuracy of weighbridge data collection by associating vehicle images and weighbridge data.
[0007] 2. Technical solution
[0008] The purpose of this application is achieved through the following technical solutions.
[0009] The embodiment of this specification provides a method for collecting weighbridge data, including: S1, receiving the measurement data of the weighbridge; wherein the measurement data includes the following three parts: the weight value of the vehicle, which is collected and acquired by the weighbridge sensor; the vehicle's weighing time, that is, the time point when the vehicle passes the weighbridge; and the vehicle's license plate information, which is acquired by photographing the weighbridge camera. Through step S1, the original measurement data of the three elements of weight, time and license plate of the vehicle during the weighbridge process is obtained. This lays the data foundation for the subsequent extraction, combination and matching of vehicle information.
[0010] S2, determine whether the vehicle weight M1 in the measurement data is greater than or equal to the threshold value T1. If yes, store and count the number of times N1 the vehicle weight M1 appears. If not, execute step S3; through step S2, vehicles with heavier weights can be extracted, and the number of times these heavy-weight vehicles appear can be counted. Among them, the setting of the weight threshold T1 needs to be determined according to the actual situation to extract abnormal heavy-weight vehicles. The purpose of storing and counting heavy-weight vehicles is to analyze and determine the true identity of these vehicles later, and avoid mismatching irrelevant vehicles as heavy-weight vehicles. Preferably, the value of T1 is greater than or equal to 4t.
[0011] S3, sort the queue storing vehicle weights in descending order, and determine whether the amount of data in the queue after descending order is greater than or equal to D; if yes, execute step S4; if not, return to step S2; the queue storing vehicle weights represents the queue storing the weights of vehicles passing the weighbridge in chronological order; wherein, the stored vehicle weight queue stores the weight data of vehicles passing the weighbridge in chronological order, and step S2 stores the weight data of vehicles passing the weighbridge in chronological order. However, it is necessary to extract the vehicle data with larger weight later. If not sorted, that is, in chronological order, the vehicle data with larger weight may be scattered in different locations, which is inconvenient to extract. By sorting in descending order, all vehicle data can be arranged from large to small according to weight value. In this way, the maximum value is placed in the first place, the second largest value in the second place, and so on. In this order, the data of the vehicles with the largest weight can be directly accessed through the queue index very conveniently. The calculation work of traversing and searching the entire queue when extracting weight is avoided. Thereby reducing the calculation complexity of subsequent processing of weight vehicle data. The purpose of step S3 is to obtain a vehicle weight queue arranged from large to small, and to determine whether the queue data volume is sufficient, so as to prepare for the subsequent extraction of vehicle data with larger weight. The setting of the preset value D needs to be determined according to the actual situation. Preferably, D is set to 2, which can obtain the data of the two vehicles with the largest weight and the second largest weight, which provides a certain sample for judging the real vehicle.
[0012] Specifically, traverse the vehicle weight queue to obtain each piece of vehicle weight data. Use a sorting algorithm, such as quicksort, to sort the obtained weight values. Select the descending order as the sorting rule to arrange the weights from largest to smallest. According to the sorting result, reconstruct the index order of the vehicle weight queue. Place the data with the largest weight at the head of the queue, and so on. Finally, obtain a vehicle weight queue arranged in descending order according to the vehicle weight from largest to smallest. According to the queue index, the information of the vehicle with the largest weight can be directly obtained. In summary, by calling a sorting algorithm and customizing the descending order rule, it is possible to sort the vehicle weight queue in descending order, facilitating subsequent processing.
[0013] S4. Extract the first two pieces of data A1 and A2 from the queue arranged in descending order, and compare whether the stability times of the vehicle weights corresponding to A1 and A2 are both greater than N2; if so, exchange the license plate information of A1 and A2 and then execute step S5; if not, execute step S5; the stability time represents the number of times the vehicle weight remains stable; N2 is greater than N1. Among them, license plate information: refers to the number information on the front and rear license plates of the vehicle, used to identify and distinguish different vehicles. License plate information usually includes the following elements: license plate number: a unique number string composed of letters, numbers, or a combination of letters and numbers, such as "Jing A88888". Licensing area: indicates the area where the license plate is issued, such as "Jing" indicating Beijing. License plate color: indicates the background color of the license plate, such as blue, yellow, etc. Vehicle type: indicates the type of vehicle for which the license plate is targeted, such as a sedan, a new energy vehicle, etc. In the solution of this application, the license plate information mainly refers to the license plate number, which appears in vehicle pictures or video images and can be obtained through image recognition technology to identify and distinguish different vehicles.
[0014] Specifically, if the stability times of the weights of A1 and A2 are both greater than N2, the exchange of the license plate information of the two pieces of data includes: reading the license plate recognition information in the A1 data and storing it in a temporary variable. Writing the license plate recognition information in the A2 data into the A1 data to overwrite the original license plate information. Writing the license plate information in the temporary variable into the A2 data to overwrite the original license plate information. In this way, the exchange of the license plate recognition information of the two pieces of data A1 and A2 is achieved. Exchanging the license plate information of the data of two vehicles with larger and stable weights can play a role in concealing and protecting the real vehicles, avoiding the vehicles being recognized and locked. N2 represents the threshold number of times for determining the stability of the vehicle weight, and N1 is the threshold number of times for storing the weight. N2 represents the threshold number of times for determining the stability of the vehicle weight, and N1 is the threshold number of times for storing the weight. Preferably, N2 is an integer multiple of N1.
[0015] S5, determine whether the number of stable times of the vehicle weight corresponding to the two extracted data A1 and A2 is greater than N3. If so, obtain the vehicle picture and upload it; if not, execute step S6; determine whether the number of stable times of the weight of the two previously extracted vehicle data A1 and A2 with larger weight is greater than the preset threshold value N3. If the number of stable times of the weight of A1 and A2 is greater than N3, it is considered that the reliability of these two vehicle data is high. At this time, obtain the pictures of the two vehicles passing through the weighbridge, and upload and save them. If any of the stable times of A1 and A2 is not greater than N3, do not obtain the picture, and directly execute the next step S6. The purpose of obtaining the picture is to generate the weighbridge report later. N3 needs to be set larger to ensure that the vehicle data of the obtained picture is reliable enough. Through step S5, unstable vehicle data can be filtered, and only vehicle pictures with high stable times can be obtained to avoid uploading too many uncertain pictures and save storage resources.
[0016] S6, compare whether the vehicle weights corresponding to the two extracted data A1 and A2 are consistent. If yes, execute step S7; if not, execute update of maximum weight and time; maximum weight represents the maximum value of the vehicle weight measured during the entire weighing process; time includes the vehicle's weighing time, scale stay time and weighing time; compare whether the vehicle weight values corresponding to the two previously extracted vehicle data A1 and A2 with larger weights are consistent. If the weight values of A1 and A2 are consistent, it means that the two vehicles may be the same vehicle. At this time, directly execute the next step S7 for further judgment. If the weights of A1 and A2 are inconsistent, update the maximum weight value of the vehicle during the weighing process. At the same time, update the vehicle's weighing time information, including the time of weighing, scale stay and weighing. The maximum weight value and weighing time information will be used to generate a scale report later. Through step S6, it can be distinguished whether the two vehicles may be the same vehicle for subsequent processing; at the same time, update the maximum weight and time information to ensure the accuracy of the report information.
[0017] Specifically, when the weights of A1 and A2 are inconsistent, executing the update of the maximum weight and time includes: reading the recorded historical maximum weight value Max_weight during the weighing process of the vehicle. Compare the newly acquired weight values in A1 and A2 with Max_weight. If the weight in A1 or A2 is greater, assign the larger value to Max_weight to update the historical maximum weight. Read the weighing time data of the vehicle, including the weighing time Ts, the scale stay time Td and the weighing time Te. Update the new time data, and if there is a later time, update the corresponding time value. Store the updated Max_weight and weighing time in the database for subsequent report generation.
[0018] S7, determine whether the measuring point corresponding to the measurement data is a weighing point. If so, record the starting weight and weighing time of the weighing point; if not, update the maximum weight and time; the starting weight represents the vehicle weight measured at the weighing point as the initial weight of the vehicle; the weighing time represents the time when the vehicle passes the weighing point.
[0019] Specifically, judging whether the measuring point corresponding to the measurement data is a weighing point includes: each measuring point has a unique identification number ID. The measurement point ID information can be extracted from the measurement data. Maintain a measurement point identification table, which contains the ID and semantic information of each measurement point, such as "weighing point" and "weighing point". Match the point ID in the measurement data with the identification table. If the measurement data point ID corresponds to the "weighing point" in the identification table, it is confirmed to be a weighing point. If the measurement data point ID is not in the identification table or corresponds to other points, it is not a weighing point. Through this matching technical solution, it can be accurately judged whether the measurement data belongs to a weighing point or other points.
[0020] Specifically, the acquisition of the starting weight: extract the weight value data from the measurement data of the weighing point; directly use the weight value as the starting weight, record and store. The acquisition of the weighing time: the measurement data of the weighing point contains accurate timestamp information; extract the time part of the data from the timestamp; use the time information as the weighing time, record and store. Storage of the starting weight and weighing time: store in the database records related to the vehicle; add vehicle and time indexes to facilitate subsequent extraction. By directly extracting the timestamp and weight values and storing them in INDEX, the data of the starting weight and weighing time can be efficiently obtained, providing basic information for subsequent weighbridge reports.
[0021] S8, determine whether the maximum weight is greater than or equal to T2, if yes, execute step S9, if not, execute update of maximum weight and time; T2 is greater than T1; S9, determine whether the vehicle at the weighing point has been unweighed, if yes, execute step S10, if not, execute update of maximum weight and time; during the entire weighing process of the vehicle, obtain the weighing time and unweighing time. The weighing time indicates the time when the vehicle passes the weighing point. The unweighing time indicates the time when the vehicle passes the unweighing point. For the vehicle at the weighing point, determine whether it has a corresponding unweighing time. If the unweighing time is recorded, it means that the vehicle has completed unweighing. If the unweighing time is not recorded, it means that the vehicle is still in the weighing process and has not been unweighed. By recording and comparing the weighing and unweighing times, it can be determined whether the vehicle has completed unweighing. This can avoid repeated statistics of weighing information for the same vehicle.
[0022] S10, extract the license plate information, weight time and collected pictures, combine them to form the final weighbridge data. Specifically, extract the following data fields: license plate information, the license plate number identified from the image / video; weight time, the data of the entire time period of the vehicle weighing; collected pictures, pictures taken when the vehicle is weighed. Data extraction technology: license plate information: identify the license plate in the picture through the image recognition algorithm and extract text; weight time, read the vehicle's weighing time record from the database; collect pictures, query and read picture files from the storage directory. Data combination technology: arrange and combine the above data into a table or document; add relevant formats, styles, etc. as a report document; export and generate a weighbridge report PDF file. Report content, design a report content template according to actual needs, including vehicle license plate, weighing time, vehicle pictures and other data.
[0023] Furthermore, before step S2, it also includes: judging whether the received measurement data contains garbled characters, and if so, performing data format conversion; otherwise, executing step S2. Specifically, receiving raw measurement data from the sensor. Checking whether the data format is garbled, it is determined to be garbled data if the following conditions exist: containing illegal characters, not belonging to the predefined data format, the data cannot be parsed into the measurement field of the standard format, and the calculated check code does not match. If it is garbled data, format conversion is performed: calling the format conversion function, such as Base64 decoding, trying different encoding formats to parse and convert, and mapping to the standard format according to the data source and protocol. After conversion, recalculate and verify the check code. If the conversion is successful, execute step S2 and continue the subsequent process. If the conversion fails, save the original data and record the error log. In this way, by adding a module for data format verification and conversion, the reliability of the measurement data can be improved, and the subsequent process can be prevented from being contaminated by wrong format data.
[0024] Further, judging whether the measurement data contains garbled characters includes the following steps: extracting characteristic values of the measurement data, the characteristic values include data length, character set and grammatical structure; comparing the extracted characteristic values with preset characteristic values, the preset characteristic values represent the characteristics of the measurement data that conform to the standard format specification; if the difference between the extracted characteristic values and the preset characteristic values exceeds the threshold, it is determined that the measurement data contains garbled characters. Specifically, the following characteristic values of the measurement data are extracted: Data length: the number of bytes in the data area. Character set: the character categories and encodings used for statistics. Syntax structure: the order of format fields, delimiters and other grammatical features. The characteristic values of the preset standard format include: standard data length range, predefined character set and encoding, and standard grammatical structure template. Comparing the extracted characteristic values with the preset characteristic values: calculating the data length difference, comparing the character set difference, and the grammatical structure similarity, if the difference and similarity exceed the preset threshold, it is judged as garbled characters. The threshold can be set according to the characteristics of the source data and the quality requirements.
[0025] Furthermore, the extracted eigenvalues are compared with the preset eigenvalues, and a feature similarity algorithm is used. Specifically, the feature vectors A and B of the measurement data and the standard format are extracted respectively. The distance or correlation between the two vectors is calculated as a similarity measure. Common algorithms include Euclidean distance, cosine similarity, etc. The calculated similarity is compared with the preset threshold, and a match is determined if the similarity is higher than the threshold. The aforementioned multiple features such as data length, character set, grammatical structure, etc. can be uniformly represented as a vector. An algorithm is selected to calculate the similarity of vectors A and B to obtain a quantitative score in the range of 0-1. A reasonable similarity threshold is preset according to the actual situation, such as 0.8. By constructing a feature vector and applying a similarity algorithm, a quantitative comparison result can be obtained, and a more automated and intelligent data comparison judgment can be achieved.
[0026] Furthermore, the string length calculation method is used to extract the data length in the measurement data; the character statistics method is used to extract the character set in the measurement data; the syntax analysis method is used to extract the syntax structure in the measurement data; specifically, data length extraction: convert the measurement data into a string form; call the string length calculation method, such as the length() function; the returned length is the number of bytes in the data area. Character set extraction: traverse each character in the string; count the number, category and other information of each character; form an array of character statistics objects. Syntax structure extraction: define the syntax analysis expression according to the data specification; use the expression to match the string and extract the syntax components; return the syntax field order, separator and other structural information. Comprehensively compare the three feature quantities to determine the correctness of the format.
[0027] Furthermore, extracting the first two data A1 and A2 includes the following steps: using an array subscript access method, extracting two vehicle weight data with index positions 0 and 1 from the vehicle weight data queue in descending order as weight data A1 and A2; wherein, index position 0 corresponds to the largest vehicle weight in the queue; index position 1 corresponds to the second largest vehicle weight in the queue.
[0028] Specifically, the vehicle weight queue is sorted in descending order so that the maximum weight data is at the front. According to the array access method: directly use the index subscript to access the specified element. The subscript starts from 0, and 0 corresponds to the first element. Therefore: index 0 is the largest weight value in the queue, extracted as A1; index 1 is the second largest weight value in the queue, extracted as A2; directly access by index, the code is concise and efficient; there is no need to traverse to find the maximum value, reducing the amount of calculation; the first N large data of the sorted queue can be quickly and accurately obtained.
[0029] Furthermore, a one-dimensional array is used to store the data queue of vehicle weight in chronological order. Specifically, a one-dimensional array is defined to store vehicle weight data in chronological order. Each vehicle weight data can be set as an object, which contains the following properties: weight value (float or int type); weighing time (time type); vehicle number. According to the time sequence of vehicle weighing, the vehicle weight object is inserted into the corresponding position of the array. Check the array capacity when inserting, and expand it if it is full. The vehicle weight data at any time position can be directly accessed through the array subscript; it is ordered by time, which is convenient for query and analysis; the random access characteristics of the array can quickly locate the specified data; dynamic expansion, the capacity can be flexibly adjusted.
[0030] Furthermore, the array subscript access method means directly reading the data element of the vehicle weight at the index position according to the element storage order of the one-dimensional array. Specifically, the characteristic of a one-dimensional array is that the elements are stored in index order and numbered starting from 0. Know the index position of the target data in the array. Directly use the index subscript to access the array element: for example: int[]weightArray={55,68,72,......};intmax Weight=weightArray[0];In this way, the data at the specified index position of the array can be directly read: efficient, without traversing the entire array; simple syntax, direct array[index] access; stable and reliable, and the target data can be accurately obtained. In the vehicle weight scenario, the maximum value can be directly obtained based on the sorting result. Compared with traversing to find the maximum value, the amount of calculation is reduced from O(n) to O(1).
[0031] Further, the number of stable times of vehicle weight is counted, including the following steps: setting the time window to t; obtaining the weight values of the vehicle in the time window t one by one; calculating the variance of the weight values in the time window t; if the variance is less than the threshold, the number of stable times of weight in the time window t is increased by 1; sliding the time window t, repeating the above steps until the vehicle leaves the scale; the accumulated number of stable times is used as the number of stable times of vehicle weight. Specifically, the time window t is set, for example, 10 seconds. In the time window t, the weight values of the vehicle are obtained one by one and stored in the array w[]. The formula for calculating the variance of w[] is: variance=sum((w[i]-mean(w))^2) / count(w). If the variance is less than the preset threshold, it is counted as stable weight in the window, and the number of stable times is increased by 1. Slide the time window t and repeat the above calculation. Accumulate the number of stable times of all time windows to obtain the total number of stable times of vehicle weight. Variance indicates the range of data fluctuation, and a small variance indicates stable weight. The sliding window can obtain the stability of the vehicle during the entire period of weighing.
[0032] Furthermore, the time window t is set according to the sampling frequency of the weighbridge. The sampling frequency of the weighbridge sensor indicates the number of times the vehicle weight data is collected per second. For example, 10 Hz means 10 times per second. The setting principle of the time window t: t should cover multiple sampling periods to calculate the variance; t should not be too long to accurately reflect the current weight stability. To set the time window t: query the sampling frequency value of the weighbridge sensor; set t to an integer multiple of the sampling frequency, such as 10 Hz, t can be set to 2 seconds. Setting the time window t in this way: contains enough data to calculate the variance; takes into account the actual sampling efficiency of the weighbridge; and dynamically adapts to different sampling frequencies. Preferably, the sampling frequency of the weighbridge sensor is set to f, then the length of the time window t is 1 / f; that is, the time window t is equal to the sampling period of the weighbridge sensor.
[0033] 3. Beneficial effects
[0034] Compared with the prior art, the advantages of this application are:
[0035] (1) Data format verification can detect various types of random noise in the sensor acquisition process, such as data glitches caused by pulse interference, electromagnetic interference, etc. Incorrect format usually indicates measurement failure. Filtering these data noises can reduce the accumulation of subsequent calculation errors; data format conversion can detect and correct situations where the data format does not meet the standard requirements due to transmission errors or system failures. This type of garbled data often cannot be parsed normally, and direct use will cause the system to crash. Conversion and correction of garbled data can avoid this risk; the correctness and reliability of measurement data are the basis and prerequisite for ensuring the smooth implementation of the technical solution. Data filtering and conversion ensure the quality of input data, so that complex algorithms can be smoothly implemented on the basis of robust and reliable data, thereby improving the overall stability and feasibility of the technical solution;
[0036] (2) Array index access can quickly and accurately lock and extract vehicle data with heavy weight, avoiding the time and capacity loss caused by traversal search; heavy vehicles are often more likely to be matched incorrectly. Direct lock extraction can focus on analyzing key data, thereby improving matching accuracy; stable frequency statistics can effectively filter out various noise misreadings when weight is flooded, such as vibration caused by rain accumulation and uneven road surface. Ensure that the extracted data represents the real vehicle; the combination of array index access and stable frequency judgment not only gives full play to their respective technical advantages, but also cooperates with each other to improve the system effect;
[0037] (3) Combined with the vehicle image, the correctness of the license plate number recognition result can be directly verified to avoid mismatching caused by relying on only a single piece of information. The license plate and weight data are mutually verified. If they are inconsistent, they can be checked and corrected to reduce the risk of single-source error propagation. Time information reflects the continuous process of vehicle weighing, which helps to determine the authenticity of weight anomalies. The combination of multi-source heterogeneous data can be cross-validated to discover and eliminate occasional anomalies from a certain source. The comprehensive data composition report retains the effective information to the greatest extent and generates richer and more accurate original records of the weighbridge.
[0038] In summary, this application receives the measurement data of the weighbridge, and judges and converts the data format before storage to avoid interference from garbled characters; uses an array to store vehicle weight queue data, and extracts vehicle data with heavier weights through array index access; sets a time window to count the number of times the vehicle weight is stable, which helps to determine the real vehicle information; and finally combines the vehicle image, license plate, and weight time to generate accurate and reliable weighbridge collection data. First, solve the problem of garbled measurement data, then use array index access and stable number judgment to improve the accuracy of weight data, and finally associate various types of information to generate accurate weighbridge data. This can effectively improve the accuracy of vehicle information collection and matching on the weighbridge. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] This specification will be further described in the form of exemplary embodiments, which will be described in detail by the accompanying drawings. These embodiments are not restrictive, and in these embodiments, the same number represents the same structure, wherein:
[0040] Figure 1 is an exemplary flow chart of a method for collecting weighbridge data according to some embodiments of this specification;
[0041] Figure 2 is an exemplary flow chart of license plate verification according to some embodiments of this specification;
[0042] Figure 3 is an exemplary flow chart of verifying vehicle loading information according to some embodiments of this specification;
[0043] Figure 4 It is an exemplary flowchart for verifying vehicle entry and exit according to some embodiments of this specification. DETAILED DESCRIPTION
[0044] The method and system provided in the embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0045] With the significant increase in truck transportation volume, weighbridges, as an important place for weighing vehicles, have put forward higher requirements for the accuracy of vehicle information collection and matching. The current problems mainly manifest in the generation of garbled characters in vehicle data during transmission, the inability to distinguish real vehicles by relying on vehicle weight matching, and the easy introduction of errors by using only license plate information.
[0046] Example 1
[0047] Figure 1 is an exemplary flow chart of a method for collecting weighbridge data according to some embodiments of this specification, such as Figure 1 As shown, the present application, a weighbridge data collection method, comprises the following steps:
[0048] When receiving the raw measurement data from the weighbridge, we first determine and convert the data format. The purpose of this step is to effectively filter and eliminate random noise and garbled characters caused by system failures that may be generated during data transmission, ensuring that the vehicle measurement data used in subsequent processing is accurate and reliable. By using the array index access method, we are able to extract the data of vehicles with heavier weights. At the same time, we also introduced the concept of stable times, and judged the real vehicle by counting this number. This step aims to improve the matching accuracy of vehicle information collected by the weighbridge and avoid incorrectly matching vehicles with generally heavier weights. We combine multi-source data including vehicle images, license plate numbers, weights, and time information to generate a detailed weighbridge report. Compared with relying solely on a single license plate or weight for matching, this strategy greatly reduces the probability of introducing false matches, making the final weighbridge data results more accurate and reliable.
[0049] Specifically, the original measurement data from the weighbridge is received, including the time when the vehicle passes the weighbridge, the vehicle weight measured by the weighbridge, the license plate information recognized by the weighbridge, and the data collected by the weighbridge image or video. During the data receiving stage, the data format is judged and converted to ensure the accuracy and reliability of the data and avoid the interference of garbled codes. The array index access method is used to extract the vehicle data with larger weight, and the real vehicle is judged by the stable number of times to improve the matching accuracy. The multi-source data such as vehicle image, license plate number, weight and time are combined to generate the final weighbridge report to ensure the accuracy and reliability of the data results.
[0050] In the process of data collection on the weighbridge, ensuring that the received data is accurate and reliable is a key link. This solution aims to determine whether the received data is garbled. If it is garbled, the data is converted, otherwise it goes to the next step of the processing flow. Use the rule of thumb to set rules to determine whether the received data may be garbled. For example, check whether the data format is wrong, whether it contains illegal characters, etc. If these rules are met, it may be garbled and requires subsequent processing. According to the data transmission protocol format of the weighbridge equipment and the acquisition system, try to parse the received data. If the parsing is successful, it means that the data is not garbled; if the parsing fails, it may be garbled. If the transmission protocol contains a verification mechanism (such as CRC verification), the verification failure is used to determine whether it is garbled. Data that fails the verification may be damaged or interfered with and needs to be processed accordingly.
[0051] The received data is compared with the normal format data stored in the system. If the format and structure are different, it can be judged as garbled. The features of the received data are extracted using an intelligent algorithm and compared with the known normal data features. If the difference exceeds the preset threshold, it can be judged as garbled. If the data is judged to be garbled, the following data conversion steps will be performed: According to the specific situation of the garbled code, the corresponding data repair strategy will be executed, such as correcting format errors, replacing illegal characters, etc. Retry to parse the repaired data to ensure data accuracy. The data garbled judgment and conversion strategy of this solution can effectively improve the stability and reliability of weighbridge data collection. Through multi-level judgment methods and data repair steps, it is ensured that the received data can be correctly parsed and used in subsequent processing, thereby improving the overall data processing efficiency.
[0052] In the data processing of the weighbridge, it is crucial to accurately judge the vehicle weight and record relevant information for the normal operation of the system. This solution is designed to determine whether the weight of the received vehicle is greater than or equal to 4 tons. If so, record / update the relevant weight and number of times in the queue; otherwise, enter the next data processing link. After receiving the original weight data from the weighbridge equipment, compare it with the set weight threshold of 4 tons to determine whether it is greater than or equal to the threshold. If the weight is greater than or equal to 4 tons, perform the following operations: Add a data record of the weight in the weight queue. Update the total number of times the weight appears. Record the time and license plate of the vehicle passing by. Use data structures such as arrays, linked lists, and databases to implement weight queues to ensure support for fast insertion and query operations. Determine whether it is duplicate data based on information such as vehicle time and license plate to avoid duplicate records. Through the weight judgment and record update strategy of this solution, vehicle data greater than or equal to 4 tons can be effectively managed to ensure the accuracy and completeness of relevant information. Through reasonable queue data structure and duplicate data judgment, ensure that the system records and updates efficiently and accurately when processing vehicle weight information. This helps to improve the overall performance and data management efficiency of the weighbridge system.
[0053] When processing weight queue data, copying and sorting operations are required to effectively manage and analyze vehicle records. This solution aims to copy the original queue, sort it in descending order, and determine whether it is necessary to proceed to the next step or continuously update the maximum weight and time based on the sorting results. Make a complete copy of the original weight queue to ensure that subsequent sorting operations do not affect the original queue data. Use common sorting algorithms (such as quick sort, merge sort, etc.) to sort the copied queue in descending order of weight. Count the number of records in the sorted queue to determine whether it is greater than or equal to 2. If the number of records in the sorted queue is greater than or equal to 2, perform the next step. If the number of records in the sorted queue is less than 2, directly enter the continuous update step of the maximum weight without making more complex judgments. Queues can be implemented using data structures such as arrays and linked lists. You can choose to directly sort the original queue without copying it to optimize memory usage. Through the queue copying and descending sorting operations of this solution, vehicle records can be effectively managed, and whether further operations are required can be determined based on the number of records, thereby improving the efficiency of data analysis and processing. Using appropriate data structures and sorting algorithms can improve system performance while ensuring data integrity.
[0054] The specific embodiments can be adjusted and optimized according to the needs. Determining whether the number of records is greater than or equal to 2 can be used as a threshold to retain only those important data records with a certain number. This helps to remove abnormal or small data and improve the quality and reliability of the data set. Determining the number of records is a decision basis for determining whether to continue the next step. In the context of processing vehicle weight records, the number of records greater than or equal to 2 may indicate that there is enough data for further analysis or decision-making. On the contrary, if there are fewer records, other processing strategies can be chosen. Counting the number of records is one of the conditions for starting data analysis. Generally speaking, only when the amount of data is sufficient can a more in-depth analysis be performed. This step ensures that subsequent processing is performed only when there is sufficient data, avoiding inaccurate or unrepresentative analysis when the data is insufficient. In practical applications, processing large-scale data may require more computing resources. By determining the number of records, unnecessary calculations and resource waste can be avoided when the amount of data is small. This helps to optimize system performance and improve processing efficiency. Determining the number of records can avoid unnecessary calculation work. If the number of records is not enough to support subsequent operations, these calculation steps can be skipped, thereby reducing the system burden and improving overall efficiency.
[0055] In a specific embodiment of the present application, the temporary queue is detailed in Table 1, and the temporary queue is copied and arranged in descending order, and the obtained data is detailed in Table 2.
[0056] Table 1 Temporary Queue
[0057] Serial number Weight(t) frequency 6 17.88 1128 5 19.38 10 4 17.12 6 3 13.56 6 2 12.11 5 1 10.08 4
[0058] Table 2 Queue after descending
[0059] Serial number Weight(t) frequency 6 17.88 1128 5 19.38 10 4 17.12 6 3 13.56 6 2 12.11 5 1 10.08 4
[0060] After sorting the weight queue in descending order, the first record with index 0 is the target for extracting data. From this first weighing record, some key raw data can be obtained, including: Weight: the exact weight value of the vehicle when it was weighed. Time: the timestamp when the vehicle passed the scale. License plate number: the license plate information of the vehicle recognized by the scale equipment. Image / video: the picture or video of the vehicle captured by the scale sensor. According to the specific implementation of the queue or database in the program, directly read the first record and extract the above-mentioned raw data such as weight, time, license plate number, image / video, etc. These key data will be formatted and processed as input for subsequent process processing. The detailed information of vehicle weighing in the queue or database can be organized in a structured format such as JSON, or objects can be used directly. Process each raw weighing data in turn according to the order of the first record.
[0061] Keep track of the number of times each vehicle's weight on the scale is stable, that is, the number of times the weight is basically stable. Compare the number of stable times with the preset thresholds of 20 and 100. If the number of stable times is greater than 20, enter the process of determining whether the license plate needs to be exchanged. Define a Boolean license plate exchange flag variable need Swap, initialized to false. When the number of stable times is greater than 20, set need Swap to true, indicating that the license plate information needs to be exchanged. If need Swap is true and the number of stable times continues to be greater than 100, enter the actual license plate exchange process. At this time, it is the case of following the vehicle on the scale. The number of stable times of the vehicle on the scale is greater than 20, which actually corresponds to the vehicle behind the vehicle off the scale. Replace the recorded license plate of the vehicle on the scale with the actual license plate information of the vehicle behind the vehicle off the scale. After completing the license plate exchange, update the relevant records to prepare for the subsequent vehicle information verification. If the number of stable times is not greater than 20, the need Swap flag remains false and the license plate exchange process is not performed.
[0062] Determine whether the number of stable times is >100. If yes, take a picture and upload it. If not, go to the next step. If the number of stable times is >100, it means that the vehicle has stayed on the scale for too long. You need to automatically take a picture of the vehicle and upload it for manual verification. You can use a database table to store the number of stable times of each vehicle, license plate and other information. Regularly collect statistics and make judgments.
[0063] The current value refers to the value of a certain weight record taken out after the weight queue is sorted in descending order. The previous value refers to the value of the previous record of the current value after the weight queue is sorted. The current value and the previous value are directly compared for equality to determine whether they are completely consistent. Both the current value and the previous value are taken from the copy of the weight queue after sorting in descending order. The original queue is not affected. If the current value and the previous value are not equal, it may be a new vehicle weighing record, and the weighing point judgment needs to be made. According to the layout position of the weighbridge equipment, determine whether the current record is collected at the weighing point. If it is a weighing point, the weight and time of the record are recorded as the weighing weight and time of the vehicle and recorded in the database. If it is not a weighing point, enter a loop to continuously collect the weight of the vehicle and update the maximum weight variable until the vehicle leaves. By continuously comparing the current value and the previous value, the judgment and processing of the weighing of new vehicles can be realized.
[0064] In the previous steps, the current value and the last value have been obtained, and the equal value judgment can be made directly. If they are not equal, proceed to the next step. If they are not equal, it means that the new vehicle may be weighed, and it is necessary to determine whether it is a weighing point. The specific layout of the scale equipment can be used to determine whether it is a weighing point. If it is a weighing point, then the time and weight at this time are recorded as the weighing time and weight of the vehicle. If it is not a weighing point, it indicates that it is a normal weighing, and the maximum weight of the vehicle needs to be continuously updated. A database table can be used to store multiple weighing data for each vehicle, including weighing and maximum weight information.
[0065] The layout of the weighbridge equipment can be used to determine whether it is a weighing point. Usually, the weighing point is close to the entrance of the mining area. Another method is to determine it by the ID number of the weighbridge sensor. If it is determined to be a weighing point, perform the following steps: Record the current timestamp as the weighing time. Record the current weight as the weighing weight. Store the above information in the database record of the vehicle. Set a variable to save the maximum weight of the vehicle, with an initial value of 0. For each weight collection, perform the following steps: Compare the newly collected weight with the value of the maximum weight variable. If the new weight is greater than the maximum weight, update the maximum weight variable to the new weight. Continuously update the collection time. Continuously collect weight during the entire weighing time of the vehicle on the weighbridge. Repeat the above steps until the vehicle leaves the weighbridge. In addition to the maximum weight variable, continue to store each collection time and weight data in the database to establish a complete weighing record. Through the above steps, the system can determine whether the vehicle is at a weighing point, record the relevant time and weight information, and update the maximum weight in real time. This method helps to effectively manage the vehicle weighing data in the weighbridge system and improve the accuracy and reliability of the data.
[0066] In the process of continuously updating the maximum weight and time, it is determined whether the current maximum weight is greater than T2. In the specific embodiment of the present application, T2 is set to 5 tons. If the maximum weight is greater than 5 tons, the next step is performed. If the maximum weight is not greater than 5 tons, the step of continuously updating the maximum weight and time is returned.
[0067] The layout position of the scale sensor or the time interval from the vehicle weighing on to the vehicle weighing off is used to determine whether it is a weighing off point. If it is not a weighing off point, the maximum weight and time step is returned to be continuously updated. If it is a weighing off point, the following processing is performed: Directly following the vehicle without descending: Upload the vehicle image and enter the processing flow of associated information and images. Normal weighing off: Perform license plate recognition and combine relevant information. Weighing without stopping: Determine that it is weighing without stopping based on the abnormal time interval, and retain other information except the license plate information. If no descending is detected within the set time, start video tracking, obtain the vehicle image, and upload it to the server. During the whole process, it is still necessary to continuously obtain and update the weight information. When the vehicle leaves, combine the upper and lower weighing information and generate a weighing report. Through the above steps, the system can execute different processing processes according to the situation of the weighing off point. This method helps to flexibly process relevant information according to different situations of vehicle behavior, ensuring that the system has a good response and record for various possible situations. This includes the situation of directly following the vehicle without descending, the situation of normal weighing off, and the situation of weighing without stopping, as well as continuously obtaining weight information and generating a weighing report. Specifically, directly following the vehicle without descending: Using the scale sensor: monitor the weight data of the vehicle. If no obvious decline is detected within the set time, it is judged that the vehicle is directly following without descending. Video tracking: In the case of no decline, start the video tracking system. Obtain real-time images or video clips of the vehicle. Upload vehicle pictures to the server. Normal weighing: Using the scale sensor: monitor the weight data of the vehicle. In the case of normal weighing, the weight of the vehicle will drop significantly. License plate recognition technology: When weighing, use license plate recognition technology to identify the license plate information of the vehicle. Data combination: Combine the license plate information with other relevant information (such as timestamp, weight, etc.) to form a complete record. Weighing without stopping: Using the scale sensor: monitor the weight data of the vehicle. Determine whether it is weighing without stopping based on the abnormal time interval. For example, if the weight changes in a short period of time and does not trigger the descending signal of the scale sensor, it may be weighing without stopping. Data recording: In the case of weighing without stopping, other relevant information except the license plate information, such as timestamp, weight, etc., is retained. In general, the entire system requires the use of a combination of weighbridge sensors to monitor weight, license plate recognition technology, time stamp recording, and video tracking. These technologies work together to identify the specific behavior of the vehicle and handle and record it accordingly.
[0068] Using image recognition technology, the vehicle image is processed to extract the license plate information. The vehicle weight, time and other data are combined with the extracted license plate information to form a complete vehicle weighing information. The weighing information is associated with the image of the vehicle to ensure that there is corresponding image data for each weighing. The combined information is entered into the database to establish the association between the information and the image. When entering the database, other important information other than the license plate, such as weight, is retained. This information is helpful for subsequent verification and analysis. The vehicle image is uploaded to the cloud server for centralized storage and management. After the vehicle weighing is completed, the state variables are reset, the temporary data is cleared, and preparations are made for the next weighing. Ensure that there is corresponding license plate information and image data for each weighing. This helps to establish a complete vehicle weighing record and provide data that is easy to manage and verify. At the same time, the image data uploaded to the cloud server is also centrally stored for easy access and management in the future. The reset to initial state step ensures that the system is in a ready state for each weighing. The entire weighing process is processed in an orderly manner through these steps, achieving effective and reliable vehicle weighing management.
[0069] Example 2
[0070] Figure 2 is an exemplary flow chart of license plate verification according to some embodiments of this specification, such as Figure 2 As shown, checking the entry and exit license plates includes the following steps:
[0071] Receive data. Determine whether the data is garbled. If it is, perform data conversion. If it is not, proceed to the next step. Specifically, receive the image or video stream data of the vehicle through the interface. You can use regular expressions or machine learning models to determine whether the license plate number contains garbled characters. If there is garbled characters, it can be normalized according to certain rules, such as removing special characters, unifying the case of letters, etc. If there is no garbled code, the data is normal and directly enters the subsequent license plate recognition process. More powerful algorithms can be applied to improve the accuracy of garbled code detection and conversion. Severe garbled data that cannot be converted can be marked as abnormal and handled manually. Use the newly added license plate data to continue to optimize the algorithm model for garbled code detection and conversion.
[0072] Determine whether the data weight is ≥ 4 tons. If so, record / update the weight and number of times in the temporary queue; if not, proceed to the next data processing; specifically, compare the collected vehicle weight data with the set threshold of 4 tons to determine whether it is greater than or equal to. If the weight is greater than or equal to 4 tons, record this weight value and number of occurrences in the temporary queue and retain it as important data. If the weight already exists in the temporary queue, directly add 1 to update its number of occurrences. If the weight is less than 4 tons, the status is updated and prepare to process the next weighing data. The temporary queue can be implemented using a database table or a memory queue. Set up a loop to continuously process the new weighing data collected.
[0073] Copy the temporary queue and sort it in descending order to determine whether the queue record is ≥ 2. If so, proceed to the next step; if not, proceed to the subsequent judgment. Specifically, the array / list copy function in the language can be used to quickly copy the temporary queue and obtain a queue copy. Apply a sorting algorithm to the queue copy, such as quick sort, to sort in descending order according to the weight value. Calculate the length of the sorted queue and determine whether the number of records is greater than or equal to 2. If the number of records is greater than or equal to 2, the status is updated and the subsequent two-record comparison process is entered. If the number of records is less than 2, the status is maintained and the subsequent weight judgment process continues. You can choose appropriate data structures such as arrays, linked lists, and database tables according to the language and scenario.
[0074] From the temporary queue that has been sorted in descending order, take out the first record with index 0 as variable A1. Then take out the second record with index 1 from the queue as variable A2. A1 and A2 both correspond to the detailed data of a vehicle that has been weighed. Read the stability times field in the A1 record to determine whether it is greater than 20. Similarly, read the stability times in the A2 record to determine whether it is greater than 20. If the stability times of both A1 and A2 are greater than 20, it is determined that there is a situation of following the vehicle to the scale. At this time, it is necessary to exchange the license plate information, that is, use the license plate in A2 to replace the original license plate information in A1. After completing the license plate exchange, update the relevant information of the two records. If the stability times of A1 or A2 does not exceed 20, no exchange processing is performed, the status is updated, and the next process step is entered. The original data of A1 and A2 can be stored in databases, queues, etc. to facilitate quick query.
[0075] Determine whether the number of stable times is > 100. If so, send a capture instruction and upload the image. If not, proceed to the next step. Specifically, read the stable times field in the data record to determine whether it is greater than 100. If the number of stable times is greater than 100, send a capture instruction to the camera or video acquisition module. After the capture module returns a static image, upload the image to the cloud storage server. Record the image name, capture time and other information in the vehicle's data structure. If the number of stable times is not greater than 100, update the status and proceed to the subsequent process. The capture and upload functions can be encapsulated into one module for easy calling.
[0076] Determine whether A1 is equal to A2. If they are equal, proceed to subsequent judgment. If they are not equal, continue to update the maximum weight and time. Specifically, directly compare the weight values in the two data records of A1 and A2 to determine whether they are completely equal. If they are completely equal, the status is updated and the subsequent judgment process such as stable number statistics is entered. If they are not equal, it means that a new vehicle has been weighed, and the maximum weight needs to be re-counted, the weight sensor data needs to be continuously collected, and the maximum weight variable needs to be updated in real time. At the same time, the timing needs to be re-counted to count the duration of weighing until the vehicle leaves. A new structure is needed to record information such as the maximum weight and duration of the vehicle weighed this time. Set up a loop to continuously process new passing vehicles.
[0077] Example 3
[0078] Figure 3 is an exemplary flow chart of verifying vehicle loading information according to some embodiments of this specification, and verifying vehicle loading information includes the following steps:
[0079] Receive the judgment results of A1 and A2, and determine whether it is a weighing point. If so, record the start time t0 and the start weight w0; if not, proceed to the next step. Continuously update the maximum weight and time. Specifically, the previous steps have determined whether A1 and A2 are the same vehicle, and the judgment result is received here. According to the layout position of the scale sensor, determine whether A1 and A2 correspond to the weighing point. The SENSOR_ID can also be queried through the database. If it is a weighing point, record the current timestamp as the weighing start time t0. Record the weight value of A1 or A2 as the weighing starting weight w0. If it is not a weighing point, update the status and enter the subsequent process. Use JSON, protobuf and other formats to record the weighing start information {t0, w0}.
[0080] Determine whether the maximum weight is >5 tons. If yes, proceed to the next step; if not, continue to update the maximum weight and time; specifically, track and record the maximum weight variable of the vehicle when it is weighed, and determine whether the current value is greater than 5 tons. If the maximum weight is greater than 5 tons, the status is updated and the subsequent vehicle departure judgment process is entered. If the maximum weight does not exceed 5 tons, continue to collect weight data in a loop and update the maximum weight variable in real time. At the same time, continue to time and update the vehicle weighing duration variable. Set the loop logic until the vehicle leaves or times out. All weight and time data during the vehicle weighing need to be recorded.
[0081] Determine whether the vehicle has been weighed. If so, proceed to the next step. If not, continue to update the maximum weight and time. Specifically, the position of the scale sensor can be used to determine whether the vehicle has left the upper scale and reached the lower scale. It can also be determined by a significant drop in weight. If it is detected that the vehicle has been weighed, the status is updated and the subsequent vehicle departure judgment process is entered. If the vehicle has not been weighed, the weight data is collected in a loop and the maximum weight variable is continued to be updated. At the same time, the weighing duration variable is continuously updated. Set the loop logic until the vehicle is weighed or the timeout is detected. All weight and time data before weighing are still continuously recorded.
[0082] Determine whether the vehicle is under the scale normally. If it is, proceed to the next step. If it is not, follow the vehicle and upload pictures. Specifically, the time interval from the vehicle being weighed to the vehicle being weighed can be used to determine whether the vehicle is under the scale normally or not. If the time interval is within the normal range, it is determined to be under the scale normally, the status is updated, and the next process step is entered. If the vehicle has not descended after the normal time interval, it is determined to have not descended, and video tracking and capture are started to obtain vehicle pictures. Upload the captured vehicle pictures to the cloud server. Continue video tracking until the vehicle leaves or loses the target. Record and save the time, pictures and other data of the vehicle that has not descended.
[0083] Associate information such as time and weight with the corresponding captured images; if the vehicle is weighed without stopping, retain all information except the license plate; specifically, associate the vehicle's time, weight and other data with the corresponding image and record them in the vehicle's data structure. If the vehicle is weighed without stopping, since the license plate cannot be obtained, it is necessary to retain information other than the license plate. Continue to save parameter data such as weight, time, speed, etc. of vehicles that are weighed without stopping. Retain captured vehicle images for further investigation and identification. JSON and other formats can be used to record and associate vehicle parameter information and images. Vehicles that are weighed without stopping can be marked as requiring manual participation for further identification.
[0084] Determine whether the license plate is normal. If not, record that there is no or unrecognizable license plate, and proceed to associate time, weight and other information with the corresponding captured image. If yes, record the license plate, front or rear of the vehicle, and proceed to the next step. Specifically, the confidence score of the license plate recognition algorithm is used to determine whether the recognition result is normal. If not, record it as no license plate or unrecognizable license plate, and mark it as requiring manual recognition. Continue to associate time, weight and other data with the corresponding image. If the recognition is normal, record the license plate number information in the vehicle data structure. At the same time, record the image of the front or rear of the vehicle for further verification. The license plate information extraction is completed and enters the subsequent process. Use the amplified data to continuously optimize the license plate recognition model.
[0085] Combine the license plate, weight, and time information, and associate the license plate and other information with the corresponding captured pictures; specifically, combine the identified license plate number, weight data, and corresponding timestamp into a complete weighing record. You can use JSON, protobuf, and other formats to record a single weighing information. Associate the weighing information with the front and rear images of the vehicle. You can add the weighing record id corresponding to the image to the image information, or add the image name or id to the weighing record. Save the combined complete weighing information together with the image to the database or file system. Generate a visual weighing report based on the stored data when necessary. Provide a data interface for the backend system to query and obtain weighing details.
[0086] Upload the picture, reset to the initial state, retain other information except the license plate, associate time, weight and other information with the corresponding snapshot picture, and end. Specifically, upload the relevant pictures of the vehicle weighing to the cloud storage server. Reset all system state variables, including weight, time, etc., and prepare for the next weighing. For vehicles that cannot obtain license plates, key information such as weight is still retained. Continue to associate the picture with weight, time and other data and save it. Use a database or other method to persist the relevant data. Develop an API interface for external systems to obtain weighing data. The weighing process and data upload of a single vehicle are completed.
[0087] Example 4
[0088] Figure 4 is an exemplary flow chart of verifying vehicle entry and exit according to some embodiments of this specification, such as Figure 4 As shown, the verification of vehicle entry and exit includes the following steps:
[0089] Receive data and determine whether there is license plate information B1. If not, obtain the license plate B2 read by AI; if yes, proceed to the next step. Specifically, receive raw data such as vehicle pictures or video streams. Determine whether the raw data already contains license plate information B1. If there is no B1, call the AI recognition algorithm to identify and obtain the license plate information from the picture or video stream to obtain the license plate reading result B2. The AI recognition algorithm can be a model based on deep learning such as image text recognition and scene text recognition. If B1 is already included in the raw data, use B1 directly without repeated recognition. Format the acquired license plate information (B1 or B2) for subsequent use. After the license plate information is acquired, enter the subsequent vehicle verification process. For the case of recognition failure, a feedback processing mechanism is required, such as triggering manual recognition. Continuously improve the AI recognition algorithm to improve the recognition accuracy.
[0090] Determine whether B1 and B2 are equal; if they are equal, proceed to the next step; if they are not equal, record it as a license plate information exception. Specifically, perform a direct string comparison on the license plate B1 provided by the original data and the license plate B2 recognized by AI. If B1 and B2 are exactly the same, the license plate information is considered normal. When B1 and B2 are inconsistent, there are the following situations: B1 and B2 are only a few characters different, which may be a recognition error and can be manually checked. B1 and B2 are completely different, then it is very likely that one party's license plate recognition is wrong. B1 or B2 is a null value, indicating that the corresponding recognition failed. For inconsistencies, it is necessary to record them in the exception log and mark them as license plate objections that require manual verification. After manual verification, the erroneous recognition can be corrected and feedback can be provided to update the algorithm model. If B1 and B2 are consistent or consistent after manual verification, proceed to the subsequent process.
[0091] Determine whether it is an empty scale or a heavy scale. If it is an empty scale, generate empty scale information and insert it into the empty scale queue; if it is a heavy scale, generate heavy scale information and insert it into the heavy scale queue. Specifically, determine whether it is an empty scale or a heavy scale based on the vehicle weight data collected by the sensor. An empty scale means that the vehicle weight is below the weight limit, and a heavy scale means that the vehicle weight exceeds the weight limit. The weight limit threshold can be preset. If it is determined to be an empty scale, assemble an empty scale data packet containing information such as the license plate and time. If it is determined to be a heavy scale, assemble a heavy scale data packet containing information such as the overweight and license plate. Insert the empty / heavy scale data packet into the corresponding memory queue or database table respectively. The empty scale queue and the heavy scale queue can be implemented using data structures such as linked lists and arrays. It can also be two database tables. The data packet can organize relevant information in formats such as structures and JSON. Subsequently, the empty / heavy scale queue can be processed asynchronously as needed to perform record queries, etc.
[0092] Process the heavy-weight queue and find out whether there is a matching license plate B1 in the empty-weight queue. If there is a match, a matching relationship is formed. If there is no match, it is associated and marked as a reverse check for business. Specifically, for each heavy-weight record in the heavy-weight queue, its license plate information B1 is obtained. In the empty-weight queue, find out whether there is an empty-weight record with license plate information B1. If a matching empty-weight record is found, a pair of matching relationships is formed between the heavy-weight record and the empty-weight record. The matching relationship can be stored in the form of an associated ID, or a matching information table can be directly generated. If a matching empty-weight record is not found, a matching relationship cannot be formed. For unmatched heavy-weight records, the original empty-weight information needs to be associated and marked as requiring further verification by business personnel. During the verification, the original pictures, videos, etc. can be consulted for reverse checking and confirmation. Feedback the results after confirmation to correct incorrect matches or add new empty-weight information. Continuously iterate and optimize the matching algorithm to improve accuracy.
[0093] In the empty scale queue processing, determine whether the advanced data has the license plate B1. If not, associate the factory entry information. If yes, use the later data to replace the advanced data. Specifically, for each advanced empty scale record in the empty scale queue, check whether the license plate information B1 exists. If B1 does not exist, it is necessary to associate the corresponding factory entry time, location and other original factory entry information of the record. This can be matched and associated by the factory entry time and the empty scale time. You can also add the associated information manually. If B1 exists, it is necessary to check whether the empty scale record has a corresponding empty scale record that enters and leaves the factory later. If there is a corresponding later record, and the later record does not have license plate information, replace the license plate information of the advanced record with the license plate B1 of the later record. The replacement method can be to directly update the license plate field of the advanced record. A new merged record can also be generated. If the later record also has a license plate, it is necessary to compare and verify the consistency, and the processing method is the same as the heavy scale matching. Continuously optimize the data association matching algorithm to improve the efficiency of automatic processing.
[0094] Set the matching flag, search the heavy weight queue, determine whether there is matching information, if so, associate the heavy weight data, if not, return to receive the data. Specifically, for each empty weight record in the empty weight queue, set a Boolean matching flag initial to false. Search the heavy weight queue to see if there is heavy weight information matching the empty weight record. If matching information is found, associate the heavy weight information with the empty weight record, such as adding the heavy weight record ID to the empty weight record. At the same time, set the matching flag initial of the empty weight record to true. If there is no matching information in the heavy weight queue, keep initial as false. For the empty weight records that are successfully matched, a new data structure can be formed for storage. For the empty weight records where initial is still false, return to receive new data and re-enter the matching process. Continuously iterate and optimize the matching algorithm to improve matching efficiency. A database of empty and heavy weight matching can be established to facilitate query statistics.
[0095] Determine whether there is factory information, if so, associate it, determine whether there is GPS information, if so, set it to factory, and mark the data no longer participate in subsequent operations. End. Specifically, for the empty scale record, check whether there is corresponding factory information such as factory time and location. If there is factory information, associate it with the empty scale record, for example, add the factory record ID to the empty scale record. Then determine whether the empty scale record contains GPS positioning information. If there is GPS information, it is confirmed that the vehicle has left the factory, and the empty scale record is marked as factory status. Remove the empty scale record marked with factory status from the queue to be processed, and it will no longer participate in subsequent heavy weight matching and other operations. For empty scale records that have left the factory, they can be inserted into the processed queue or written into the factory database table. Continue to optimize the factory verification algorithm to improve accuracy. At this point, the processing and factory judgment of a single empty scale record are completed.
[0096] The invention of the present application and its implementation methods are described schematically above. The description is not restrictive. Without departing from the spirit or basic features of the present application, the present application can be implemented in other specific forms. What is shown in the accompanying drawings is only one of the implementation methods of the invention of the present application. The actual structure is not limited to this. Any figure mark in the claims should not limit the claims involved. Therefore, if a person of ordinary skill in the art is inspired by it, without departing from the purpose of the present invention, a structural method and an embodiment similar to the technical solution are designed without creativity, which should all fall within the scope of protection of this patent. In addition, the word "including" does not exclude other elements or steps, and the word "one" before the element does not exclude the inclusion of "multiple" elements. The multiple elements stated in the product claim can also be implemented by one element through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any specific order.
Claims
1. A weighbridge data collection method, comprising: S1, receiving the measurement data of the weighbridge; the measurement data includes the vehicle weight, the corresponding weighing time and the license plate information; S2, determine whether the vehicle weight M1 in the measurement data is greater than or equal to the threshold T1, if yes, store and count the number of times N1 the vehicle weight M1 appears, if no, execute step S3; S3, sorting the queue storing vehicle weights in descending order, and determining whether the amount of data in the queue after the descending order is greater than or equal to D; If yes, execute step S4; if no, return to step S2; the queue storing vehicle weights represents a queue of weights of vehicles passing through the weighbridge stored in chronological order; S4, extract the first two pieces of data A1 and A2 from the queue after descending order, and compare whether the number of stable times of the vehicle weight corresponding to A1 and A2 is greater than N2; if yes, execute step S5 after exchanging the license plate information of A1 and A2; if not, execute step S5; the number of stable times means the number of times the vehicle weight remains stable; N2 is greater than N1; S5, determine whether the number of stable times of the vehicle weight corresponding to the two extracted data A1 and A2 is greater than N3, if yes, obtain the vehicle picture and upload it; if not, execute step S6; S6, compare whether the vehicle weights corresponding to the two extracted data A1 and A2 are consistent, if yes, execute step S7; if not, execute update of maximum weight and time; maximum weight means the maximum value of the vehicle weight measured during the entire weighing process; time includes the vehicle weighing time, weighbridge dwelling time and unweighing time; S7, determining whether the measurement point corresponding to the measurement data is a weighing point, if yes, recording the starting weight and weighing time of the weighing point; if no, updating the maximum weight and time; the starting weight means the vehicle weight measured at the weighing point as the initial weight of the vehicle; Weighing time means the time when the vehicle passes the weighing point; S8, determine whether the maximum weight is greater than or equal to T2, if yes, execute step S9, if no, execute update maximum weight and time; T2 is greater than T1; S9, determining whether the vehicle at the weighing point has been weighed, if yes, executing step S10, if no, executing updating the maximum weight and time; S10, extracting the license plate information, weight time and collected pictures, combining them to form the final weighing scale data.
2. The weighbridge data collection method according to claim 1, characterized in that: Before step S2, the method further includes: Determine whether the received measurement data contains garbled characters. If so, perform data format conversion; otherwise, execute step S2.
3. The weighbridge data collection method according to claim 2, characterized in that: Determining whether the measured data contains garbled characters includes the following steps: Extracting characteristic values of the measured data, the characteristic values include data length, character set and grammatical structure; Comparing the extracted characteristic values with preset characteristic values, the preset characteristic values representing characteristics of the measurement data conforming to the standard format specification; If the difference between the extracted eigenvalue and the preset eigenvalue exceeds a threshold, it is determined that garbled characters exist in the measurement data.
4. The weighbridge data collection method according to claim 3, characterized in that: The extracted eigenvalues are compared with the preset eigenvalues using a feature similarity algorithm.
5. The weighbridge data collection method according to claim 4, characterized in that: The string length calculation method is used to extract the data length in the measurement data; Character statistics method is used to extract character sets from measurement data; The grammatical structure in the measurement data is extracted using grammatical parsing methods.
6. The weighbridge data collection method according to claim 1, characterized in that: Extracting the first two pieces of data A1 and A2 includes the following steps: Using the array subscript access method, extract two vehicle weight data with index positions 0 and 1 from the vehicle weight data queue in descending order as weight data A1 and A2; Among them, the index position 0 corresponds to the largest vehicle weight in the queue; the index position 1 corresponds to the second largest vehicle weight in the queue.
7. The weighbridge data collection method according to claim 6, characterized in that: A one-dimensional array is used to store the data queue of vehicle weight in chronological order.
8. The weighbridge data collection method according to claim 7, characterized in that: The array subscript access method means directly reading the data element of the vehicle weight at the index position according to the element storage order of the one-dimensional array.
9. The method for collecting weighbridge data according to any one of claims 1 to 8, characterized in that: Counting the number of stable times of vehicle weight includes the following steps: Set the time window to t; Obtain the weight values of vehicles one by one within the time window t; Calculate the variance of the weight values within the time window t; If the variance is less than the threshold, the number of weight stabilization times in time window t is increased by 1; Slide the time window t and repeat the above steps until the vehicle leaves the weighbridge; The accumulated number of stable times is taken as the number of stable times of the vehicle weight.
10. The weighbridge data collection method according to claim 9, characterized in that: The time window t is set according to the sampling frequency of the weighbridge.
