Incremental updating vehicle model and license plate recognition method

CN122906677APending Publication Date: 2026-10-13SOUTHEAST UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611113848.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-27
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

现有技术缺乏科学的置信度门控机制与冲突消解逻辑,无法有效过滤边缘样本,导致系统在极端天气或复杂环境下的识别准确率波动较大

Benefits of technology

[0084]与现有技术相比,本发明具有以下显著优点:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122906677A_ABST
    Figure CN122906677A_ABST
Patent Text Reader

Abstract

The application discloses a kind of incremental updating vehicle model and license plate recognition method, which comprises the following steps: (1) constructing image set and pre-processing standard input image;(2) deep recognition vehicle brand model, calculate feature vector and logarithm score, obtain brand category probability, output prediction label and confidence, train and introduce cross-entropy loss to enhance generalization;(3) detect candidate license plate frame coordinates and existence probability, effective frame set is obtained by confidence screening and non-maximum suppression, calculate character alignment path probability after cropping, output license plate text and confidence;(4) fusion brand, license plate result calculates joint confidence;(5) based on brand, license plate and joint threshold value determine decision state, weighted comprehensive score is carried out to history conflict of same ID, and the optimal candidate is retained;(6) construct signature type incremental refresh and anti-reentry mechanism, calculate addition and deletion set and update result set, trigger incremental processing as needed to maintain first recognition time consistency, finally mapped to database field output or warehousing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of Intelligent Transportation Systems (ITS) and Computer Vision, specifically relating to a vehicle model and license plate recognition method for parking lots, based on deep learning algorithms and incremental data processing logic. Background Technology

[0002] With the rapid development of smart cities and intelligent traffic management, automatic vehicle identification technology has become a core pillar of traffic monitoring, unmanned parking management, and traffic accident tracing. Current vehicle identification solutions mainly focus on two dimensions: brand and model recognition, and license plate number recognition. However, significant technical shortcomings still exist in actual engineering deployment and algorithm operation.

[0003] The first challenge is aligning heterogeneous results from multiple sources. Traditional recognition pipelines typically treat brand recognition and license plate recognition as two independent parallel tasks, with different models outputting results separately. In multi-target or high-frequency triggering scenarios, the lack of a unified file-level association mechanism easily leads to mismatches in timestamps or logical identifiers of the recognition results, resulting in inconsistent vehicle information stored in the database.

[0004] Secondly, there is the resource bottleneck caused by full-scale computation. In scenarios involving dynamically updated image directories or video stream frame extraction, existing systems often employ a "full-scale polling" mode, meaning that every time the directory changes, all files are re-identified. This results in a significant waste of computing power in the context of massive amounts of data, increasing not only the depreciation rate of hardware equipment but also leading to a decrease in the system's real-time responsiveness.

[0005] Meanwhile, the recognition output results are often not robust enough. Environmental factors such as changes in lighting, vehicle occlusion, and motion blur often lead to deep learning models outputting "fuzzy results" with low confidence. Existing technologies lack scientific confidence gating mechanisms and conflict resolution logic, and cannot effectively filter edge samples, resulting in large fluctuations in the recognition accuracy of the system in extreme weather or complex environments.

[0006] Furthermore, in multi-threaded or asynchronous I / O scenarios, the lack of effective anti-re-entrancy control logic can easily lead to the same recognition task being triggered repeatedly, which in turn can cause database deadlock or confusion of timestamps in recognition records.

[0007] To address the shortcomings of the existing technologies, there is an urgent need to propose a joint identification technology solution that can achieve consistent results, incremental computation, scientific judgment, and support robust engineering deployment. Summary of the Invention

[0008] To address the shortcomings of existing methods, this invention proposes a joint recognition method for vehicle brand and model with license plate based on incremental processing. This method introduces bi-branch joint inference, multi-dimensional confidence gating, and catalog status fingerprint recognition to improve the accuracy and consistency of recognition results, while significantly reducing system redundancy and power consumption, achieving industrial-grade low-latency recognition response.

[0009] To achieve the above objectives, the present invention adopts the following technical solution: a method for joint recognition of vehicle brand and model and license plate based on incremental processing, specifically including the following steps:

[0010] Step 1: Construct the image set and preprocess it to obtain the standard input image. ;

[0011] Step 2: Deeply identify vehicle brand and model, and calculate feature vectors. Logarithmic score Obtain the brand category probability Output predicted labels With confidence level Training introduces cross-entropy loss To enhance generalization; Step 3: Detect the coordinates and existence probability of candidate license plate frames, and obtain the effective frame set through confidence filtering and non-maximum suppression. After cropping, calculate the character alignment path probability and output the license plate text. With confidence level Step 4: Calculate the joint credibility by integrating brand and license plate results. Step 5: Determine the decision status based on brand, license plate, and combined threshold. For historical conflicts with the same ID, a weighted comprehensive score is applied to retain the best candidate. Step 6: Construct a signature-based incremental refresh and anti-re-entry mechanism, calculate the add / delete set and update the result set, trigger incremental processing as needed to maintain consistency of the first recognition time, and finally map it to the database field output or input.

[0012] Furthermore, the steps in step one, including constructing the set of images to be processed and the preprocessing method, are as follows:

[0013] (1) First, the system constructs an initial set of images to be processed based on the unique identifier of the file (such as file hash or absolute path) by real-time monitoring or periodic polling of the target image directory. : (1)

[0014] In the formula, The set of images to be identified; For the first Zhang images; N is the number of images; These represent the height and width of the image, respectively.

[0015] (2) Next, preprocessing operators are performed on the original image. To eliminate sensor noise and meet the input specifications of the neural network: (2)

[0016] In the formula, Image preprocessing operators include scaling (resize), mean normalization, and color space correction; This is the preprocessed standard input image. The advantages of this preprocessing step are: it compensates for exposure differences and white balance deviations from different devices through normalization and color correction, eliminating sensor noise; it ensures correct model inference and meets neural network input specifications through fixed-size scaling and numerical range normalization; it reduces sensitivity to lighting and hardware changes by unifying data distribution, enhancing generalization ability; and it provides a standardized data foundation for subsequent batch GPU parallel computing and incremental update mechanisms.

[0017] Furthermore, the method for performing deep vehicle brand and model identification in step two is as follows:

[0018] (1) First, the preprocessed image Input into the pre-trained brand recognition model The model extracts deep semantic feature vectors through multi-layer convolution and global pooling. (3)

[0019] In the formula, Network for extracting brand features; These are the parameters obtained during network training; This is the extracted vehicle feature vector.

[0020] (2) Subsequently, the features are mapped to the classification space through a fully connected layer: (4)

[0021] In the formula, These are the weight matrix and bias terms for the brand category headers, respectively; The unnormalized categorical logits.

[0022] (3) Then use the Softmax function to calculate the probability distribution of the image belonging to each brand:

[0023] (5)

[0024] In the formula, For image Belongs to the Predicted probabilities for each brand category; The unnormalized logits of image i in the kth brand category are the kth component output after mapping by the fully connected layer. Let i be the unnormalized logarithm score of image i in the j-th brand category, and j be the summation index; This represents the total number of categories in the brand classification system.

[0025] (4) Then, output the identification label and confidence level based on the maximum a posteriori probability:

[0026] (6)

[0027] In the formula, For the finalized brand prediction labels; The corresponding brand recognition confidence level.

[0028] (5) Finally, in the model optimization stage, the cross-entropy loss function with label smoothing is adopted. To improve generalization ability:

[0029] (7)

[0030] In the formula, Losses due to brand classification; This is the truth label component after smoothing.

[0031] (8)

[0032] In the formula, This is the label smoothing coefficient; For genuine brand labels; This is the indicator function. The advantages of this step are: it effectively captures visual discrimination information of vehicle brands by extracting deep semantic features through multi-layer convolution and global pooling; it outputs predictive labels and confidence scores with probabilistic interpretation through Softmax probability normalization and maximum a posteriori decision, which facilitates subsequent gating judgment; and it alleviates the model's overconfidence in training samples by introducing label smoothing cross-entropy loss, suppresses overfitting, and improves the generalization ability under complex scenarios such as lighting changes and occlusion.

[0033] Furthermore, the method for performing license plate detection and high-precision text recognition in step three is as follows:

[0034] (1) First, the system uses the license plate detection branch to obtain spatial location information in the image:

[0035] (9)

[0036] In the formula, For the first Geometric coordinates of each candidate license plate frame; Score the probability of a license plate existing in the area;

[0037] This represents the total number of initial candidate regions detected. This is the initial set of license plate frames.

[0038] (2) Subsequently, a detection threshold was used. Filtering candidate boxes using non-maximum suppression (NMS):

[0039] In the formula, This is a preset detection confidence threshold; This is the IoU (Intersection over Union) threshold for the NMS algorithm; This is the final set of valid license plate frames selected from the filter.

[0040] (3) Then crop the effective area of ​​the image for recognition:

[0041] (11)

[0042] In the formula, For the first A partial cropped image of a license plate; These are the filtered valid license plate frames.

[0043] (4) Then, the probabilities of all possible character alignment paths are calculated using the OCR model:

[0044] (12)

[0045] In the formula, To cut a given patch Under the condition that the candidate text sequence is The conditional probability; The candidate license plate text sequence; This is the set of all possible alignment paths that can be mapped to this text. In order to be in The probability of recognizing a specific character at any given time.

[0046] (5) Finally, output the optimal text result and its corresponding confidence score:

[0047] (13)

[0048] In the formula, This is the index of the optimal license plate candidate; The final license plate text content, i.e., the first... The license plate text sequence corresponding to each candidate ; The overall confidence level for license plate recognition is the score among the best candidate patches. The best text was identified. conditional probability The advantages of this step are as follows: The cascaded architecture of detection followed by recognition effectively eliminates background interference and focuses on the license plate area; dual filtering using confidence threshold and NMS suppresses low-quality candidate boxes and duplicate detections, improving localization accuracy; recognition after local cropping reduces image complexity and enhances OCR's ability to distinguish character details; and the decoding method based on character alignment path probability allows for the processing of variable-length license plate text without precise character-level annotation, outputting optimal results and comprehensive confidence, providing a quantitative basis for subsequent joint credibility calculations with brand results.

[0049] Furthermore, the method for multi-dimensional result fusion and structured storage described in step four is as follows:

[0050] (1) First, the results of the two branches are atomically encapsulated based on the file's unique identifier:

[0051] (14)

[0052] In the formula, A unique index (ID) for the file; This is the original timestamp first generated for this record; For constructing joint identification records.

[0053] (2) Subsequently, the joint credibility of vehicle identification is calculated. :

[0054] (15)

[0055] In the formula, The combined credibility score after fusion; Let be the brand recognition confidence score for the i-th image; Let be the overall confidence score for license plate recognition in the i-th image; This represents the weighting of brand identification results in the fusion process. The advantages of this step are: first, it atomically encapsulates brand and license plate results using unique file identifiers, fundamentally eliminating mismatches in timestamps or logical identifiers between the two branches; second, it uses weighted calculation of joint credibility to enable mutual verification and complementary enhancement of brand and license plate information, improving the overall reliability of vehicle identification; and third, it provides a unified and standardized data foundation for subsequent confidence gating, conflict resolution, and database storage using a structured record format.

[0056] Furthermore, the confidence-gating and conflict resolution logic method for the results described in step five...

[0057] as follows:

[0058] (1) First, the results are classified according to the preset quality and safety thresholds:

[0059] (16)

[0060] In the formula, These are the brand, license plate, and combined logic threshold; The current decision status of this record ("Confirmed" or "Pending Confirmation").

[0061] (2) Subsequently, for potential historical conflicts with the same ID, a weighted comprehensive score is used for automatic selection:

[0062] (17)

[0063] In the formula, A set of conflict candidates corresponding to the same file identifier; These are weighting coefficients; This step calculates the edit distance similarity between the currently identified text and historical high-frequency text. The advantages of this step are: a three-dimensional threshold gating mechanism filters low-quality results from multiple dimensions, including brand, license plate, and joint credibility, automatically classifying them as "confirmed" or "pending confirmation," reducing erroneous entries in extreme environments; a weighted comprehensive scoring conflict resolution mechanism resolves historical conflicts for the same ID, automatically selecting the best result by integrating brand confidence, license plate confidence, and historical text similarity, ensuring data consistency and scientific decision-making, and improving the system's engineering robustness in complex scenarios.

[0064] Furthermore, the method for building the signature-based incremental refresh and anti-re-entry mechanism of the entire system described in step six is ​​as follows:

[0065] (1) First, the system monitors file change status through directory signatures:

[0066] (18)

[0067] In the formula, For the first The complete set of valid image files obtained from round scanning; This is the set of image format suffixes supported by the system.

[0068] (2) Subsequently, calculate the difference between the sets of the current scan and the previous scan to determine the incremental part:

[0069] (19)

[0070] In the formula, This is the set of new files to be processed this time; This is a set of invalid records that have been deleted from the physical disk.

[0071] (3) Then, the final output result set is maintained by recursively updating:

[0072] (20)

[0073] In the formula, For the first Round global result set; For incremental identification operators; To synchronize the cleanup operator.

[0074] (4) Then, the directory fingerprint signature is calculated to decide whether to trigger the calculation:

[0075] (twenty one)

[0076] In the formula, For MD5 or SHA1 hash signatures generated based on the current list of files; This indicates that the recognition process is triggered only when the signature changes.

[0077] (5) Next, update the timestamp preservation logic to ensure the originality of historical data:

[0078] (twenty two)

[0079] In the formula For historical record identifiers; The updated timestamp; The timestamp of the original record; This is the current system timestamp.

[0080] (6) Finally, perform structured field mapping vectorization to complete the database write-in:

[0081] (twenty three)

[0082] In the formula, Standard field mapping functions; This is the formatted vector that is ultimately written to the database. The advantages of this step are: incremental processing is achieved through directory signatures and set difference, avoiding the waste of computing power and hardware wear caused by full polling; the fingerprint signature triggering mechanism only initiates recognition when the directory changes, eliminating invalid calculations; the anti-reentrancy mechanism prevents the same task from being triggered repeatedly, avoiding database deadlocks and timestamp confusion; the timestamp preservation logic retains the originality of historical records, meeting business needs such as parking time statistics; structured field mapping and vectorized storage ensure a unified data format, facilitating persistent storage and subsequent queries.

[0083] Beneficial effects

[0084] Compared with the prior art, the present invention has the following significant advantages:

[0085] (1) High data consistency and integrity: The results of brand recognition and license plate recognition are atomically encapsulated by a unique file identifier, constructing a joint recognition record containing file ID, brand tag and confidence level, license plate text and confidence level, joint confidence level, and original timestamp. This fundamentally eliminates the mismatch problem in timestamps or logical identifiers caused by the lack of a unified association mechanism in traditional parallel tasks. Each recognition record has a complete logical chain, meeting the consistency requirements of database storage and facilitating subsequent data traceability, auditing, and troubleshooting.

[0086] (2) High recognition accuracy and strong generalization ability: The brand recognition branch uses a multi-layer convolutional neural network and global pooling to extract deep semantic feature vectors. After mapping to the classification space through a fully connected layer, the probability distribution is calculated through the Softmax function, and the predicted label and confidence score with probabilistic interpretation are output. The label smoothing cross-entropy loss function is introduced in the training stage to effectively alleviate the model's overconfidence in the training samples, suppress overfitting, and significantly improve the generalization ability under complex scenarios such as lighting changes, vehicle occlusion, and motion blur. The license plate recognition branch adopts a cascaded architecture of "detect first and then recognize". In the detection stage, low-quality candidate boxes and repeated detections are excluded through a dual filtering mechanism of confidence threshold screening and non-maximum suppression, resulting in high positioning accuracy. In the recognition stage, optical character recognition is performed on the cropped local blocks. The CTC decoding method based on character alignment path probability is adopted, which can handle variable-length license plate text without precise character-level annotation, effectively reducing image complexity and enhancing the ability to distinguish character details. Finally, the joint credibility is calculated by weighted fusion of brand and license plate confidence scores, so that the information of the two branches can be mutually verified and complemented to enhance each other, further improving the overall reliability of vehicle identity recognition.

[0087] (3) Low computational load and high resource utilization: An incremental processing mechanism based on directory file list hash signature is introduced. The system determines newly added and deleted files by calculating the difference between the current and previous scan sets. The recognition process is triggered only for newly added files, and the records of deleted files are cleaned up synchronously from the result set. This avoids the serious waste of computing power and high depreciation rate of hardware equipment in the context of massive data in the traditional full polling mode. The directory fingerprint signature triggering mechanism only starts recognition when the hash value of the file list changes, effectively eliminating invalid calculations. The anti-re-entry mechanism avoids the same recognition task being triggered repeatedly through file processing status marking or file locks, preventing database deadlock and confusion of recognition record timestamps. In the scenario of long-term running static image library, it significantly saves cloud computing power costs and achieves industrial-grade low-latency recognition response.

[0088] (4) Robust decision output and scientific quality control: A three-dimensional threshold gating mechanism based on brand confidence, license plate confidence, and joint credibility is adopted to automatically classify the results into "confirmed" or "pending confirmation" status, effectively filtering edge samples. This enables the system to automatically mark records to be confirmed rather than blindly entering them when faced with low-quality images such as motion blur, backlighting, or extreme weather, significantly reducing the amount of erroneous data entering the database. For historical conflict records that may exist for the same file identifier, a weighted comprehensive scoring algorithm is used for automatic selection. This algorithm comprehensively considers brand confidence, license plate confidence, and the edit distance similarity between the current identified text and historical high-frequency texts to retain the best candidate, avoiding misjudgments caused by simple confidence fluctuations and ensuring the scientific nature of the decision output and the reliability of the data.

[0089] (5) High engineering adaptability and business value: It supports the logic of retaining the first identification timestamp. For file identifiers that already exist in the history, the original timestamp is retained. For newly added files, the current system timestamp is recorded, ensuring that the originality of historical data is not overwritten. This mechanism has extremely high application value for business scenarios that require accurate statistics of parking time, recording of first entry time, or vehicle trajectory tracing. The structured field mapping vectorized database storage mechanism converts the joint identification records into standard database field formats, supporting multiple databases such as PostgreSQL, MySQL, and SQLite, which facilitates persistent storage, subsequent queries, and integration with third-party systems.

[0090] (6) Prominent Modular Architecture and Flexible Deployment Capabilities: The entire system can be divided into multiple functional modules, including data acquisition, image preprocessing, brand recognition, license plate detection and recognition, result fusion, rule processing, incremental updates, and data output. Each module can be deployed on the same server or distributed across different machines depending on computing resources. Intermediate results are exchanged between modules via RESTful APIs or message queues. In a single-machine deployment scenario, all modules run on the same computer. In large-scale scenarios with multiple cameras, the acquisition and preprocessing modules can be deployed on edge devices, while the brand recognition and license plate recognition modules can be deployed on GPU servers, achieving flexible allocation and load balancing of computing resources and significantly improving overall processing efficiency.

[0091] (7) Good model dynamic updates and engine compatibility: The brand recognition module supports a hot-loading mechanism for models. When the model file is updated, it takes effect without restarting the service, ensuring continuous system operation while achieving smooth model version upgrades. The license plate recognition module supports multiple OCR engine architectures. It can use end-to-end text recognition models based on CRNN and CTC, or call third-party engines such as PaddleOCR for recognition, providing flexible choices for deployment scenarios with different accuracy requirements and hardware conditions. The system also supports mainstream deep learning frameworks such as TensorFlow and Keras, and supports automatic switching between GPU and CPU inference modes. In environments without a dedicated graphics card, it can automatically downgrade to CPU mode for stable operation.

[0092] (8) Strong self-checking capability and convenient operation and maintenance: Upon initial startup, the system automatically checks whether the model files are complete and whether the database connection is normal, reducing the deployment threshold and operation and maintenance complexity through the self-checking mechanism. The system can be packaged as an independent installer, which users can double-click to run and follow the prompts to complete the installation. Alternatively, users can directly unzip the green installation package and run the startup program. It supports automatic startup, making it particularly suitable for unattended scenarios such as parking lots. The graphical interface built on Flask and PyWebView allows users to intuitively view the recognition result list, statistical data, and parking records, reducing the usage threshold for non-technical personnel.

[0093] (9) Complete data traceability and auditing capabilities: Since each identification record is atomically encapsulated based on a unique file identifier and retains the first identification timestamp and historical conflict resolution records, the system has complete full lifecycle data traceability capabilities. When identification disputes occur or data auditing is required, the original image, brand identification result, license plate identification result, and decision status information can be quickly located through the file ID, meeting the strict requirements of intelligent transportation management systems for data compliance and traceability. Attached Figure Description

[0094] Figure 1 This invention provides an overall flowchart of a method for incrementally updating vehicle model and license plate recognition.

[0095] Figure 2 To train the loss curve for the brand recognition model,

[0096] Figure 3 The training loss curve for the license plate detection and recognition model. Detailed Implementation

[0097] The present invention will be further illustrated below with reference to embodiments, but these are not intended to limit the scope of protection of the present invention.

[0098] (1) Example 1: See Figures 1-3 Joint identification process implementation

[0099] Following step one, construct the set of images to be processed, preprocess the images, and obtain the preprocessed standard input image. ;

[0100] Step 2: Based on the preprocessed standard input image Perform deep recognition of vehicle brand and model, and calculate vehicle feature vectors sequentially. Compared with categorical logarithmic score And calculate the image accordingly. Belongs to the Brand Category

[0101] Predicted probability Finally, brand prediction labels were obtained. Brand recognition confidence Meanwhile, during model optimization in the offline training phase, the cross-entropy loss function is used. To improve the model's generalization ability;

[0102] Step 3: Calculate the geometric coordinates of the candidate license plate frames and the probability score of the presence of a license plate in that region. After applying confidence level and non-maximum suppression, obtain the set of valid license plate frames. Then, crop the image tiles, calculate the probability of all possible character alignment paths, and finally output the license plate text content. Overall confidence level with license plate recognition ;

[0103] Step 4: Encapsulate the results obtained in the above two steps and calculate the joint credibility. ;

[0104] Step 5: Obtain the current decision state of the record based on the brand, license plate, and combined logical threshold. Subsequently, to address potential historical conflicts involving the same ID, a weighted comprehensive score was used to calculate a final score and retain the optimal candidate. ;

[0105] Step six: Build a signature-based incremental refresh and anti-re-entry mechanism for the entire system, calculate the new / deleted set and update the result set, then determine whether to trigger incremental processing, maintain consistency of the first recognition time, and finally output or store it in the database after mapping it to the database field vector.

[0106] (2) Example 2: System Module Implementation

[0107] In actual deployment, the present invention can be divided into multiple functional modules. These modules can be deployed on the same server or distributed on different machines according to computing resources. Intermediate results are passed between modules through interfaces or message queues.

[0108] The data acquisition module monitors a specified image directory, enabling real-time listening for directory changes or periodic polling. It supports sources such as local folders and network shared directories. This module then passes the collected image file paths to the preprocessing module.

[0109] The image preprocessing module scales, normalizes, and corrects the color space of the original image, outputting a standard image that conforms to the neural network input specifications. Specifically, it scales the image to a fixed size (640×640 pixels), normalizes pixel values ​​to the [-1,1] range, and maintains the RGB channel order.

[0110] The brand recognition module loads a pre-trained classification model and performs inference on the pre-processed images. This module uses the TensorFlow or Keras framework and supports automatic switching between GPU and CPU. After obtaining the feature vectors through inference, it calculates the probability distribution of brand categories using fully connected layers and Softmax, ultimately outputting the predicted label and confidence score. This module also supports hot model reloading, meaning that model file updates take effect without requiring a service restart.

[0111] The license plate detection and recognition module comprises two sub-modules. The detection sub-module employs a lightweight object detection network, outputting the coordinates and existence probability of candidate license plate frames. Valid license plate frames are then selected through confidence thresholding and non-maximum suppression. The recognition sub-module performs optical character recognition on the cropped license plate image, using a CRNN plus CTC architecture, outputting the license plate text and confidence score. Alternatively, the system can also utilize the PaddleOCR engine for recognition.

[0112] The results fusion module encapsulates the brand and license plate results into a single record based on the unique identifier of the image file (such as an MD5 hash value) and calculates the joint confidence score. The module outputs a structured record containing fields such as file ID, brand tag and confidence score, license plate text and confidence score, joint confidence score, and timestamp.

[0113] The rule processing module performs gating and historical conflict resolution. The gating section compares brand confidence, license plate confidence, and joint confidence with preset thresholds to determine the record status as "confirmed" or "pending confirmation." The conflict resolution section automatically selects the optimal record from multiple candidate records that may exist for the same file using a weighted comprehensive score (considering brand confidence, license plate confidence, and text edit distance similarity).

[0114] The incremental update module is responsible for monitoring directory status changes. It determines whether the directory has been modified by calculating the signature of the file list (such as MD5 or SHA1 hash). When the signature changes, the module calculates the set of newly added and deleted files, performs identification only on new files, and removes the records of deleted files from the result set. This module also implements a re-entrancy prevention mechanism, using file locks to prevent the same file from being processed repeatedly. Furthermore, the module retains the first identification timestamp of each record to ensure the originality of historical data is not overwritten.

[0115] The data output module writes the final results to the database, or outputs them as a JSON file or displays them via a web interface. Databases supported include PostgreSQL, MySQL, and SQLite, with PostgreSQL used by default. The system also provides a graphical interface based on Flask and PyWebView, allowing users to intuitively view the list of recognition results and statistical data.

[0116] Communication between modules can be achieved using RESTful APIs or message queues. In a single-machine deployment scenario, all modules run on the same computer; in large-scale scenarios with multiple cameras, the acquisition and preprocessing modules can be deployed on edge devices, while the brand recognition and license plate recognition modules can be deployed on GPU servers to improve overall processing efficiency.

[0117] (3) Example 3: Equipment and Media Implementation

[0118] This embodiment mainly describes the hardware environment, software environment, and deployment method required for the operation of the present invention, and also includes the implementation forms of computer-readable storage media and electronic devices.

[0119] Based on actual usage requirements, the hardware environment requirements for this invention are as follows: During the development phase, a personal computer with an x86_64 architecture, configured with 16GB of RAM and a 512GB solid-state drive, and supporting GPU inference acceleration, is used for model training and multi-process debugging. During the runtime phase, the terminal device is a computer with an x86_64 architecture, requiring 8GB or more of RAM, 2GB or more of available disk space, and a standard office-grade graphics card for stable operation. If a dedicated graphics card is unavailable, the system should automatically switch to CPU mode.

[0120] The software development operating system is a 64-bit version of Windows 11, compatible with the NTFS file system and local network environment, supporting desktop application debugging. Development tools include Python 3.10 or later, along with libraries such as Flask, PyWebView, OpenCV, TensorFlow, and PaddleOCR, packaged using PyInstaller. The runtime platform is also a 64-bit Windows 11 desktop terminal, supporting local standalone deployment. After installation via the installer, users can directly use the graphical interface upon startup.

[0121] The software requires a Python runtime, a PostgreSQL database, relevant model files, and an image processing library to run. The database stores recognition records, and the model files include brand recognition models, license plate detection models, and license plate recognition models, as shown in Tables 1 and 2. If the system needs to support extended functions such as intelligent question answering, a local Ollam service can also be added as an option.

[0122] Table 1 shows the final evaluation results of the brand identity model.

[0123]

[0124] Table 1

[0125] Table 2. Final evaluation results of the license plate detection and recognition model.

[0126]

[0127] Table 2

[0128] In terms of deployment, this invention can be packaged as a standalone installer, which users can run by double-clicking and follow the prompts to complete the installation. Alternatively, users can directly extract the portable, portable package and run the startup program. Upon first startup, the system will automatically check whether the model files are complete and whether the database connection is normal, and then open the graphical interface. The system supports automatic startup, making it convenient for use in unattended scenarios such as parking lots.

[0129] Furthermore, the present invention can also be implemented as a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the steps of the method described in any one of the present invention. The storage medium can be a hard disk, a solid-state drive, flash memory, a read-only memory, or a random access memory, etc. Simultaneously, the present invention can also be implemented as an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, which, when executed by the processor, implements the method described.

Claims

1. A method for incrementally updating vehicle model and license plate recognition, characterized in that, The method specifically includes the following steps: Step 1: Construct the image set and preprocess it to obtain the standard input image. ; Step 2: Deeply identify vehicle brand and model, and calculate feature vectors. Logarithmic score Obtain the brand category probability Output predicted labels With confidence level Training introduces cross-entropy loss To enhance generalization; Step 3: Detect the coordinates and existence probability of candidate license plate frames, and obtain the effective frame set through confidence filtering and non-maximum suppression. After cropping, calculate the character alignment path probability and output the license plate text. With confidence level Step 4: Calculate the joint credibility by integrating brand and license plate results. Step 5: Determine the decision status based on brand, license plate, and combined threshold. For historical conflicts with the same ID, a weighted comprehensive score is applied to retain the best candidate. Step 6: Construct a signature-based incremental refresh and anti-re-entry mechanism, calculate the add / delete set and update the result set, trigger incremental processing as needed to maintain consistency of the first recognition time, and finally map it to the database field output or input.

2. The method according to claim 1, characterized in that, In step one, the steps for constructing the set of images to be processed and the preprocessing are as follows: (1) First, the system constructs an initial set of images to be processed based on the unique identifier of the files by real-time monitoring or periodic polling of the target image directory. : (1) In the formula, The set of images to be identified; For the first Zhang Image; Number of images; These are the height and width of the image, respectively. (2) Next, preprocessing operators are performed on the original image. To eliminate sensor noise and meet the input specifications of the neural network: (2) In the formula, Image preprocessing operators include scaling (resize), mean normalization, and color space correction; This is the preprocessed standard input image.

3. The method according to claim 1, characterized in that, In step two, the steps for performing deep identification of vehicle brand and model are as follows: (1) First, the preprocessed standard input image Input into the pre-trained brand recognition model In this model, deep semantic feature vectors are extracted through multi-layer convolution and global pooling: (3) In the formula, Network for extracting brand features; These are the parameters obtained during network training; The extracted vehicle feature vector, (2) Subsequently, the features are mapped to the classification space through a fully connected layer: (4) In the formula, These are the weight matrix and bias terms for the brand category headers, respectively; The unnormalized categorical logits. (3) Then use the Softmax function to calculate the probability distribution of the image belonging to each brand: (5) In the formula, For image Belongs to the Predicted probabilities for each brand category; The unnormalized logits of image i in the kth brand category are the kth component output after mapping by the fully connected layer. Let i be the unnormalized logarithm score of image i in the j-th brand category, and j be the summation index; This represents the total number of categories in the brand classification system. (4) Then, output the identification label and confidence level based on the maximum a posteriori probability: (6) In the formula, For the finalized brand prediction labels; For the corresponding brand recognition confidence level, (5) Finally, in the model optimization stage, the cross-entropy loss function with label smoothing is adopted. To improve generalization ability: (7) In the formula, Losses due to brand classification; The truth label component after smoothing. (8) In the formula, This is the label smoothing coefficient; For genuine brand labels; This is an indicator function.

4. The method according to claim 1, characterized in that, In step three, the steps for license plate detection and high-precision text recognition are as follows: (1) First, the system uses the license plate detection branch to obtain spatial location information in the image: (9) In the formula, For the first Geometric coordinates of each candidate license plate frame; Score the probability of a license plate existing in the area; This represents the total number of initial candidate regions detected. This is the initial set of license plate frames. (2) Subsequently, a detection threshold was used. Filtering candidate boxes using non-maximum suppression (NMS): (10) In the formula, This is a preset detection confidence threshold; This is the IoU (Intersection over Union) threshold for the NMS algorithm; This is the final set of valid license plate frames selected. (3) Then crop the effective area of ​​the image for recognition: (11) In the formula, For the first A partial cropped image of a license plate; These are the filtered valid license plate frames. (4) Then, the probabilities of all possible character alignment paths are calculated using the OCR model: (12) In the formula, To cut a given patch Under the condition that the candidate text sequence is The conditional probability; The candidate license plate text sequence; This is the set of all possible alignment paths that can be mapped to this text. In order to be in The probability of recognizing a specific character at any given time. (5) Finally, output the optimal text result and its corresponding confidence score: (13) In the formula, This is the index of the optimal license plate candidate; The final license plate text content, i.e., the first... The license plate text sequence corresponding to each candidate ; The overall confidence level for license plate recognition is the score among the best candidate patches. The best text was identified. conditional probability .

5. The method according to claim 1, characterized in that, In step four, the steps for multidimensional result fusion and structured storage are as follows: (1) First, the results of the two branches are atomically encapsulated based on the file's unique identifier: (14) In the formula, A unique index (ID) for the file; This is the original timestamp first generated for this record; For the constructed joint identification record, (2) Subsequently, the joint credibility of vehicle identification is calculated. : In equation (15), The combined credibility score after fusion; Let be the brand recognition confidence score for the i-th image; Let be the overall confidence score for license plate recognition in the i-th image; The weighting of brand identity results in the fusion process.

6. The method according to claim 1, characterized in that, In step five, the steps for performing confidence gating and conflict resolution on the results are as follows: (1) First, the results are classified according to the preset quality and safety thresholds: (16) In the formula, These are the brand, license plate, and combined logic threshold; This record indicates the current decision status ("Confirmed" or "Pending Confirmation"). (2) Subsequently, for potential historical conflicts with the same ID, a weighted comprehensive score is used for automatic selection: (17) In the formula, A set of conflict candidates corresponding to the same file identifier; These are weighting coefficients; This represents the edit distance similarity between the currently identified text and historical high-frequency texts.

7. The method according to claim 1, characterized in that, In step six, the steps for establishing the signature-based incremental refresh and anti-re-entry mechanism for the entire system are as follows: (1) First, the system monitors file change status through directory signatures: (18) In the formula, For the first The complete set of valid image files obtained from round scanning; This is the set of image format suffixes supported by the system. (2) Subsequently, calculate the difference between the sets of the current scan and the previous scan to determine the incremental part: (19) In the formula, This is the set of new files to be processed this time; This is a set of invalid records that have been deleted from the physical disk. (3) Then, the final output result set is maintained by recursively updating: (20) In the formula, For the first Round global result set; For incremental identification operators; To synchronize the cleanup operator, (4) Then, the directory fingerprint signature is calculated to decide whether to trigger the calculation: (21) In the formula, For MD5 or SHA1 hash signatures generated based on the current list of files; This indicates that the recognition process is triggered only when the signature changes. (5) Next, update the timestamp preservation logic to ensure the originality of historical data: (22) In the formula, For historical record identifiers; The updated timestamp; The timestamp of the original record; This is the current system timestamp. (6) Finally, perform structured field mapping vectorization to complete the database write-in: (23) In the formula, Standard field mapping functions; This is the formatted vector that will eventually be written to the database.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements an incrementally updated vehicle model and license plate recognition method as described in any one of claims 1 to 7.

9. A computer-readable storage medium storing computer instructions thereon, characterized in that, When executed by the processor, the computer instructions implement an incremental update method for vehicle model and license plate recognition as described in any one of claims 1-7.