Intelligent identification method for logistics waybill number based on multi-task deep learning
Patent Information
- Application Number
- CN202611345306.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-01
- Publication Date
- 2026-10-30
AI Technical Summary
[0003]然而,现有技术方案在实际应用中仍存在多方面的性能局限与适配短板
1、通过采用共享特征提取层与三并行任务特定输出层的端到端网络架构,将运单号归属识别、格式类型识别与关键业务信息提取三类异质任务纳入统一模型完成联合推理,与现有技术“单字符识别+后置规则匹配”的多模块级联范式不同;既消除了多级模块串联带来的误差累积,实现一次推理同步输出多维度业务信息,提升了单帧图像的处理效率与信息输出完整度,又可借助多任务间的语义特征互补作用反向强化特征表达能力,同步提升各子任务的识别精度,实现了效率与精度的双重提升。
Smart Images

Figure CN123016449A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent image recognition technology, and in particular to an intelligent recognition method for logistics waybill numbers based on multi-task deep learning. Background Technology
[0002] In the field of intelligent identification of logistics waybill numbers, multiple technical solutions have been developed. In the early stages, traditional optical character recognition and rule matching methods were the main approaches. Subsequently, deep learning technology was gradually introduced. The mainstream solution adopts a two-stage cascaded architecture that separates text detection and character recognition. It relies on models such as convolutional neural networks and recurrent neural networks to complete the regional localization of waybill numbers and the parsing of character sequences. Some solutions achieve single-dimensional recognition of waybill numbers through single-task deep learning models, which can support the basic automated entry and sorting verification needs of waybill information in logistics scenarios.
[0003] However, existing technical solutions still have many performance limitations and adaptation shortcomings in practical applications. The two-stage cascaded processing architecture is prone to the phenomenon of error accumulation at each stage. The single-task recognition mode cannot simultaneously output multi-dimensional business information of waybills, which limits the overall processing efficiency and information output completeness. Conventional deep learning models have limited effectiveness in handling long-distance dependencies between waybill numbers and lack adaptability to complex conditions such as soiling, wrinkles, low resolution, and character deformation common in logistics scenarios, making it difficult to guarantee recognition robustness and accuracy. Some multi-task solutions use fixed-weight optimization methods, which are difficult to adapt to the differences in learning difficulty of waybill formats of different express companies, which can easily lead to imbalance in learning progress and mutual interference between tasks. At the same time, the adaptation of new waybill formats requires manual rule updates and full model retraining, resulting in high long-term system maintenance costs. Furthermore, it cannot automatically verify abnormal waybills within the recognition link, requiring additional manual review, which makes it difficult to adapt to the rapidly iterating business needs of the logistics industry. Summary of the Invention
[0004] The purpose of this invention is to provide an intelligent identification method for logistics waybill numbers based on multi-task deep learning, thereby solving the aforementioned technical problems.
[0005] To achieve the above objectives, this invention provides a method for intelligent identification of logistics waybill numbers based on multi-task deep learning, comprising the following steps: S1. Receive the waybill number image, and perform noise reduction, enhancement and geometric correction preprocessing to obtain preprocessed image data; S2. Based on the preprocessed image data, the long-distance dependency relationship of characters is learned through the self-attention mechanism of the Transformer feature extraction module to obtain the feature representation of the waybill number; S3. Based on the feature representation of the waybill number, extract hierarchical features through multi-scale convolution kernels and fuse them to obtain multi-scale fused features; S4. The shared feature extraction layer maps to the specific output layer of multiple parallel tasks, and simultaneously completes the identification of waybill number attribution, format type recognition and key business information extraction to obtain the initial recognition results of multiple tasks. S5. Based on the initial recognition results of the multi-task, the waybill number anomaly detection module completes the format verification and forgery risk judgment, and obtains the recognition result with anomaly mark; S6. Based on the confidence level of the recognition results, the judgment threshold is dynamically adjusted through an adaptive threshold adjustment mechanism to obtain the final recognition result that balances accuracy and recall. S7. During the model training phase, based on the real-time loss values of each task during training, the weight allocation is calculated and adjusted through a dynamic task weight adjustment mechanism to obtain a joint loss function that adapts to the current training state. S8. Based on the joint loss function, the parameters of the shared feature layer and the specific output layer of each task are simultaneously optimized through end-to-end backpropagation to obtain the trained multi-task recognition model. S9. In the new format adaptation stage, for newly added waybill number format samples, some parameters of the model are updated through an online incremental learning mechanism to obtain an updated recognition model adapted to the new format.
[0006] Preferably, the Transformer-based feature extraction module in S2 includes multi-layer cascaded self-attention units; based on the image block sequence obtained by dividing the preprocessed image data, the global dependency relationship of the character sequence and the contextual semantic association are modeled through multi-layer self-attention units to obtain the feature representation of the waybill number containing global semantic information; The formula for calculating the self-attention mechanism is: ; in, Represents the query matrix. Represents the key matrix. Represents a value matrix, Indicates the dimension of the key vector; The feature matrix output by the self-attention operation; It is a normalized exponential function used to map the original attention score to a weight distribution with values ranging from 0 to 1 and a sum of 1.
[0007] Preferably, in S3, the multi-scale feature fusion extracts shallow character texture features, mid-level character structure features, and high-level semantic features by using convolutional kernels with at least three different receptive fields. Channel concatenation and adaptive weighted fusion are then performed on the multi-layer features to obtain multi-scale fusion features that adapt to complex character deformations. The multi-scale fusion features are then input into the task-specific output layer to help improve the recognition accuracy in complex environments. The waybill number anomaly detection module in S5 uses format information and character sequence information from the initial multi-task recognition results to perform matching and verification through a pre-configured waybill number rule base, identifies and marks waybill numbers with abnormal formats or risks of forgery, and obtains anomaly detection results.
[0008] Preferably, the dynamic task weight adjustment mechanism in S7 calculates the dynamic weight of each task using the loss proportion method, and the specific calculation method is as follows: The formula for calculating the total joint loss function is: ; in, Represents the total loss function. Indicates the first Dynamic weights for each task. Indicates the first The loss function for each task. Indicates the total number of tasks; No. The formula for calculating the dynamic weight of each task is: ; in, Indicates the first The real-time loss value of the current training step for each task; For the first The real-time loss value of each task at the current training iteration step; The number of the target task whose weight is currently being calculated; This is the iteration variable used to accumulate the losses of all tasks; Based on the current real-time loss value of each task, the corresponding dynamic weights are calculated using the above formula and substituted into the total loss function to obtain the joint loss function that is dynamically optimized as the training process progresses.
[0009] Preferably, the adaptive threshold adjustment mechanism in S6 dynamically raises or lowers the judgment threshold based on the confidence score of each result in the initial recognition results of the multi-task. In high-confidence scenarios, the threshold is lowered to improve the recall rate, and in low-confidence scenarios, the threshold is raised to ensure the accuracy rate, so as to obtain a final recognition result that balances accuracy and recall rate. The end-to-end training method in S8 is based on the joint loss function. It uses the backpropagation algorithm to synchronously update the network parameters of the shared feature extraction layer and all task-specific output layers, thereby achieving collaborative optimization of multiple recognition tasks. The online incremental learning mechanism in S9 is based on newly added waybill number format samples. It only updates the parameters of the task-specific output layer and the top feature layer, and obtains an updated model adapted to the new waybill number format while retaining the original recognition ability.
[0010] Preferably, a logistics waybill number intelligent recognition system based on multi-task deep learning includes: an image input module, a preprocessing module, a shared feature extraction module, a multi-scale feature fusion module, and a multi-task output module connected in sequence by signals; a dynamic task weight adjustment module connected by signals to the shared feature extraction module and the multi-task output module respectively; and an anomaly detection module and an online learning module connected by signals to the multi-task output module. The shared feature extraction module adopts a Transformer-based network architecture, and the multi-task output module contains multiple parallel task-specific output layers, which are used to simultaneously output three types of recognition results: waybill number attribution, waybill number format type, and key business information.
[0011] Preferably, the output of the image input module is connected to the input of the preprocessing module, and the output of the preprocessing module is connected to the input of the shared feature extraction module; the image input module is used to acquire the original image of the waybill number; the preprocessing module has a cascaded denoising unit, enhancement unit and geometric correction unit built in, used to optimize the image quality and correct the pose of the original image, and output the preprocessed image data to the shared feature extraction module.
[0012] Preferably, the input end of the multi-scale feature fusion module is connected to the feature output end of the shared feature extraction module, and the output end of the multi-scale feature fusion module is connected to the input end of the specific output layer of each task. The multi-task output module includes a waybill number attribution identification submodule, a waybill number format identification submodule, and a key business information extraction submodule. The three submodules are arranged in parallel and share the same fusion feature input, and each independently outputs the identification result of the corresponding dimension.
[0013] Preferably, the system further includes a joint loss function optimization module. The input of the dynamic task weight adjustment module is connected to the loss output of each task-specific output layer, and the output of the dynamic task weight adjustment module is connected to the input of the joint loss function optimization module. The output of the joint loss function optimization module is fed back to the shared feature extraction module and the parameter update of each task-specific output layer. The dynamic task weight adjustment module is used to calculate dynamic weights based on the current loss values of each task and input them into the joint loss function optimization module, thereby updating the parameters of the entire network uniformly through backpropagation.
[0014] Preferably, the input end of the anomaly detection module is connected to the result output end of the multi-task output module and is deployed at the end of the inference output link to perform format compliance verification and forgery risk marking on the recognition results; the input end of the online learning module is connected to the newly added waybill number format sample, and the output end is connected to the parameter update end of the top layer of the shared feature extraction module and the multi-task output module to incrementally update the model parameters without restarting the full training and adapt to the new waybill number format.
[0015] Therefore, the present invention employs the above-mentioned intelligent identification method and system for logistics waybill numbers based on multi-task deep learning, and has the following beneficial effects: 1. By adopting an end-to-end network architecture with a shared feature extraction layer and three parallel task-specific output layers, three heterogeneous tasks—waybill number attribution recognition, format type recognition, and key business information extraction—are incorporated into a unified model to complete joint inference. This differs from the existing multi-module cascade paradigm of "single character recognition + post-rule matching." It not only eliminates the error accumulation caused by multi-level module cascading, but also enables the synchronous output of multi-dimensional business information in a single inference, improving the processing efficiency and information output completeness of a single frame image. Furthermore, it can leverage the complementary semantic features between multiple tasks to inversely enhance feature expression capabilities, simultaneously improving the recognition accuracy of each sub-task, thus achieving a dual improvement in efficiency and accuracy.
[0016] 2. The dynamic task weight allocation algorithm based on real-time loss ratio dynamically calculates the weight coefficients and updates the joint loss function according to the real-time loss value of each task in the current training step, replacing the fixed weight scheme that relies on human experience in the existing technology. It can adaptively perceive the differences in learning difficulty of each task under different waybill formats, and automatically tilt the weights to tasks with larger errors and higher learning difficulty, which alleviates the common problems of task interference and performance imbalance in multi-task learning. It is especially suitable for the industry characteristics of logistics scenarios with diverse waybill formats and large fluctuations in the difficulty of tasks in different batches, and achieves the optimal balance of overall recognition performance without the need for repeated manual parameter tuning.
[0017] 3. By constructing a complementary feature extraction system that combines global sequence modeling with multi-scale convolutional local feature extraction using Transformer, the system captures long-distance semantic dependencies between characters in waybill numbers through a self-attention mechanism. At the same time, it utilizes multi-receptive-field convolutional kernels to supplement shallow character texture and mid-level structural features, thus overcoming the inherent deficiency of a single Transformer model in capturing complex waybill character details such as blurriness, wrinkles, and dirt. This enhances the model's adaptability to problems such as character deformation, low image quality, and partial occlusion in complex logistics scenarios, improving the robustness and accuracy of recognition in harsh environments without increasing inference time.
[0018] 4. By embedding the waybill number anomaly detection module into the recognition link, and combining the format recognition results with character sequence rules, the system automatically marks forged and format-abnormal waybills. At the same time, it dynamically adjusts the judgment threshold based on the confidence value of the recognition results, replacing the independent post-processing rule verification module and fixed threshold judgment scheme in the existing technology. This not only realizes the integrated execution of recognition and verification, reducing the complexity of the system architecture and deployment and maintenance costs, but also dynamically balances the recognition accuracy and recall rate according to the confidence distribution of different application scenarios, flexibly adapting to differentiated business needs such as high accuracy and high recall, and reducing the workload of manual review.
[0019] 5. By adopting an end-to-end joint loss optimization approach to achieve collaborative training of all network parameters, and with the support of an incremental online learning mechanism, when adapting to new waybill formats, only the top-level network parameters need to be updated to complete the capability iteration, replacing the existing technology's phased training and full retraining required for new formats. This reduces the complexity and cycle of model training, shortens the adaptation cost and response time for new waybill formats, and enables continuous iteration of model capabilities while retaining the original recognition capabilities, forming a self-closed-loop operation and maintenance system of "recognition-verification-iteration", reducing the long-term maintenance cost and upgrade threshold of the system.
[0020] 6. By constructing an integrated system architecture that includes an image input module, a preprocessing module, a shared feature extraction module, a multi-scale feature fusion module, a multi-task output module, a dynamic task weight adjustment module, an anomaly detection module, and an online learning module, the cascading connection relationship, signal flow, and functional boundaries between the modules are clearly defined. Training optimization, inference recognition, and iterative update capabilities are integrated into the same system. This reduces cross-module data interaction overhead and deployment complexity, supports pipelined processing in high-concurrency waybill recognition scenarios, and is adaptable to various deployment environments such as edge devices and cloud computing.
[0021] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0022] Figure 1 A schematic diagram of the structure of the intelligent logistics waybill number recognition system based on multi-task deep learning provided by the present invention; Figure 2 A schematic diagram of the multi-task deep learning network architecture of the intelligent identification system for logistics waybill numbers based on multi-task deep learning provided by the present invention; Figure 3 A flowchart illustrating the dynamic task weight adjustment mechanism of the intelligent identification method for logistics waybill numbers based on multi-task deep learning provided by this invention. Figure 4 The overall flowchart of the intelligent identification method for logistics waybill numbers based on multi-task deep learning provided by the present invention is shown. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the embodiments of the present invention and are not intended to limit the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of this application. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout.
[0024] It should be noted that the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, such as a process, method, system, product, or server that includes a series of steps or units, not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such process, method, product, or device.
[0025] The following is in conjunction with the appendix Figures 1-4 The embodiments of the present invention will be described in detail below.
[0026] In existing technologies, logistics waybill number recognition technology has gradually evolved from traditional rule matching and optical character recognition schemes to automated recognition schemes based on deep learning. The mainstream architecture adopts a two-stage cascaded mode that separates text detection and character recognition, relying on convolutional neural networks and recurrent neural networks to complete waybill number area localization and character sequence parsing. Some schemes can achieve single-dimensional waybill number attribution or character information recognition, which can meet the basic automated entry requirements of waybill information in standard scenarios. However, existing two-stage cascaded architectures are prone to error accumulation at each stage, and single-task recognition modes cannot simultaneously output multi-dimensional business information, limiting overall processing efficiency and information completeness. Conventional convolutional networks have limited ability to model long-distance semantic dependencies of waybill numbers, and their recognition accuracy and robustness significantly decrease when faced with complex logistics scenarios such as soiling, wrinkles, low resolution, and character deformation. Some multi-task optimization schemes use fixed weight configurations, which are difficult to adapt to the differences in learning difficulty of waybill formats from different courier companies, and are prone to imbalances in learning progress and mutual interference between tasks. Adding new waybill formats requires manual rule updates and full model retraining, resulting in high long-term system maintenance costs. Furthermore, abnormal waybill verification often relies on independent external rule modules, which cannot be deeply integrated with the recognition link and require additional manual review, making it difficult to adapt to the rapidly iterating business needs of the logistics industry.
[0027] Based on the above analysis and design, the specific implementation details are as follows: The overall system structure is attached. Figure 1As shown, the image input module, preprocessing module, feature extraction module, multi-scale feature fusion module, and multi-task output module are sequentially arranged along the data flow direction, along with a dynamic task weight adjustment module, anomaly detection module, and online learning module; the core network architecture is shown in [reference needed]. Figure 2 As shown, an "end-to-end multi-task joint recognition" is achieved by using a "shared feature base + multi-branch task output" approach, which is illustrated in the following examples: Example 1: This embodiment focuses on the standard and clearly defined logistics waybill number recognition scenario. Taking waybill number SF123456789CN (belonging to SF Express, standard 12-digit format, including key business information such as recipient, sender, weight, and volume) as an example, the complete recognition and training process is executed as follows: S1. Receive the waybill number image, and attach... Figure 1 The preprocessing module sequentially performs image denoising, image enhancement, and geometric correction to remove image acquisition noise, improve character contrast, and correct minor shooting tilt, resulting in preprocessed image data.
[0028] S2. Based on the preprocessed image data, through append... Figure 2 The self-attention mechanism of the shared feature extraction layer based on Transformer is used to learn the long-distance dependency relationship between characters in the waybill number and obtain the feature representation of the waybill number.
[0029] The formula for calculating the self-attention mechanism in this step is: ; in, Represents the query matrix. Represents the key matrix. Represents a value matrix, Indicates the dimension of the key vector; The feature matrix output by the self-attention operation; It is a normalized exponential function used to map the original attention score to a weight distribution with values ranging from 0 to 1 and a sum of 1.
[0030] In practice, image block sequences are obtained based on the preprocessed image data. The global dependencies and contextual semantic associations of the character sequences are modeled layer by layer through multi-layer cascaded self-attention units, and finally the feature representation of the waybill number containing global semantic information is output.
[0031] S3. Based on the feature representation of the waybill number, the multi-scale feature fusion module in Figure 2 is used to extract feature information at different levels using convolutional kernels of various scales and perform feature fusion to obtain multi-scale fused features, which helps to enhance the recognition accuracy of the output layer of each task.
[0032] S4. Based on multi-scale fusion features, the features are mapped to three parallel task-specific output layers in Figure 2 through a shared feature extraction layer. At the same time, the waybill number attribution identification, waybill number format type identification, and waybill number key business information extraction are performed to obtain multi-task initial identification results containing information on attribution to SF Express, standard 12-bit format, receipt and dispatch information, and weight and volume.
[0033] The formula for calculating the total joint loss function in this step is: ; in, Represents the total loss function. Indicates the first Dynamic weights for each task. Indicates the first The loss function for each task. This represents the total number of tasks. In this embodiment, the value is 3, which corresponds to three types of tasks: waybill number attribution identification, waybill number format type identification, and waybill number key business information extraction.
[0034] The formula for calculating the dynamic weight of the i-th task is: ; in, Indicates the first The real-time loss value of the current training step for each task reflects the current learning difficulty and error level of that task. For the first The real-time loss value of each task at the current training iteration step; The number of the target task whose weight is currently being calculated; This is the traversal variable used to accumulate the losses of all tasks.
[0035] Based on the current real-time loss value of each task, the corresponding dynamic weights are calculated using the above formula and substituted into the total loss function to obtain the joint loss function that is dynamically optimized as the training process progresses, automatically tilting the optimization intensity towards tasks with larger errors.
[0036] S5. Based on the initial recognition results of the multi-task, the waybill number anomaly detection module deployed at the end of the output link in Figure 1 is used to match the format information and character sequence information with the pre-configured waybill number rule base, perform format rule verification and forgery risk judgment, determine that the waybill number format is compliant and has no forgery risk, and obtain the recognition result carrying the anomaly mark.
[0037] S6. Based on the confidence value of the initial recognition results of the multi-task, the recognition and judgment threshold is dynamically adjusted through an adaptive threshold adjustment mechanism. In this embodiment, which is a high-confidence scenario, the threshold is appropriately reduced to improve the recall rate, so as to obtain the final recognition result that balances accuracy and recall.
[0038] S7. In the model training phase, based on the real-time loss values of each task during training, the weight ratio of each task is calculated and adjusted through a dynamic task weight adjustment mechanism to obtain a joint loss function that adapts to the current training state. The adjustment process in this step corresponds to Figure 3. Starting from the start of training, the loss calculation, weight calculation, loss weighting, and backpropagation are completed in a loop iteration until the training termination condition is met.
[0039] S8. Based on the joint loss function, the network parameters of the shared feature layer and the task-specific output layer are simultaneously optimized through end-to-end backpropagation training to obtain the trained multi-task recognition model.
[0040] S9. New format adaptation stage: The waybill format in this embodiment is a standard format that has already been covered, so there is no need to trigger the online learning mechanism.
[0041] Example 2: Intelligent Recognition of Waybill Numbers in Complex Environments: This embodiment addresses common logistics scenarios involving complex environments such as soiling, wrinkles, and tilted camera angles. Taking waybill number YTO987654321CN (belonging to YTO Express, standard 12-digit format, exhibiting wrinkles, blurriness, and tilted camera angles) as an example, it focuses on enhancing the robustness of recognition under complex conditions. The specific process is as follows: S1. Receive the waybill number image under complex conditions, and perform noise reduction, enhancement and geometric correction processing in sequence through the preprocessing module to remove noise, improve the contrast of blurred areas, and correct shooting tilt and wrinkle deformation to obtain preprocessed image data.
[0042] S2-S3: Perform the same Transformer feature extraction and multi-scale feature fusion process as in Example 1, and output the feature representation and multi-scale fused features of the waybill number.
[0043] S4. Execute a multi-task parallel recognition process based on multi-scale fusion features and output the initial recognition results of the multi-task process.
[0044] S5. Based on the initial recognition results of the multi-task, the anomaly detection module is used to match the YTO Express waybill rule base for verification, marking the suspected abnormal character areas caused by local blurring, and obtaining the recognition results with anomaly markers.
[0045] S6. The adaptive threshold adjustment process is the same as in Example 1. The judgment threshold is dynamically optimized based on the confidence level of the recognition result, and the corrected stable recognition result is finally output.
[0046] S7-S8, during the model training phase, the weights of each task are calculated and adjusted in real time according to the dynamic weight adjustment process shown in Figure 3. The optimization intensity is tilted towards the tasks with higher recognition difficulty to balance the learning progress of different tasks and obtain a joint loss function that adapts to complex scenarios. Subsequently, the model training is completed through end-to-end backpropagation, and the process is the same as in Example 1.
[0047] S9. The waybill format in this embodiment is an already covered format and does not require triggering online learning.
[0048] This embodiment relies on multi-scale feature fusion and multi-level preprocessing correction to effectively adapt to complex working conditions such as dirt, wrinkles, and tilt in logistics sites. Compared with a single Transformer recognition scheme, the recognition accuracy in complex scenarios is significantly improved, and the robustness is stronger, making it suitable for non-standard shooting scenarios such as warehouses and sorting centers.
[0049] Example 3: This embodiment addresses the newly emerging extended format waybill number recognition scenario. Taking the new format waybill number JD12345678901234567890CN (belonging to JD Logistics, extended 18-digit format) as an example, it leverages an online learning mechanism to achieve rapid adaptation to the new format. The overall process is divided into an initial recognition triggering stage and a secondary recognition output stage after model update. The specific execution logic is as follows: Phase 1: Initial Model Recognition and New Format Triggering S1. Receive the image of the waybill number in the new format, and perform denoising, enhancement and geometric correction processing in sequence through the preprocessing module to obtain the preprocessed image data.
[0050] S2-S3: Through the trained Transformer feature extraction module and multi-scale feature fusion module, feature extraction and feature fusion are performed, and the feature representation and multi-scale fused features of the waybill number are output.
[0051] S4. Parallel recognition is performed through the multi-task output layer, and the initial recognition results of the multi-task are output. Because this format is not covered in the initial training set, the confidence of the initial recognition results is low.
[0052] S5. The anomaly detection module matches the pre-configured rule base, determines that the waybill number format does not conform to the existing standard rules, marks it as a format pending confirmation state, and outputs the recognition result with the anomaly mark.
[0053] S6. For low-confidence results in the initial identification, the adaptive threshold adjustment mechanism automatically raises the judgment threshold to prioritize the identification accuracy, outputs preliminary results for manual review, and triggers the online adaptation process for the new format.
[0054] S7-S8: The initial basic model has been pre-trained end-to-end through the training phase and has stable recognition capabilities in a standard format, providing basic model support for inference in this phase.
[0055] Phase Two: Online Incremental Learning and Final Recognition Output S9. In the new format adaptation stage, based on the newly added waybill number format sample data, the online learning module in Figure 1 is triggered. Through the online incremental learning mechanism, only the parameters of the task-specific output layer and the top feature layer of the Transformer are updated, while the bottom shared feature layer is frozen. Under the premise of retaining the original standard format recognition capability, the updated recognition model adapted to the new format is obtained.
[0056] After the model parameters are updated, the recognition and inference are re-executed for this type of new format waybill. After completing the standard processing flow from S1 to S5 again, S6 is executed again. Based on the high-confidence recognition results output by the updated model, the adaptive threshold adjustment mechanism dynamically optimizes the judgment threshold, thereby improving the recall rate while ensuring accuracy, and obtaining a final recognition result that balances accuracy and recall.
[0057] This embodiment does not require full retraining of the model. Only a small number of new samples are needed to complete the format expansion, which reduces the time and computing cost of adapting to the new format. After adaptation, the accuracy of the original format recognition only decreases slightly, realizing the smooth iteration of the model's capabilities and adapting to the business characteristics of rapid iteration of waybill formats in the logistics industry.
[0058] Example 4: Quantitative Verification of Performance Indicators This example uses a standardized test set to quantitatively verify the overall performance of the present invention. The test dataset contains 10,000 waybill number samples, of which 7,000 are standard format samples, 2,000 are complex variant format samples, and 1,000 are new format samples. The core performance indicators are as follows: The overall recognition accuracy reached 94.3%, which is about 44.6% higher than the 65.2% of traditional recognition methods, reducing the cost of manual error correction; The processing speed for a single image is 0.8 seconds, which is 46.7% faster than the traditional method of 1.5 seconds. The system response time is 0.3 seconds, which can support large-scale concurrent recognition tasks. Molecular task accuracy: Waybill number attribution recognition accuracy 96.8%, waybill number format recognition accuracy 95.2%, key business information extraction accuracy 93.7%, and anomaly detection accuracy 97.1%; High-concurrency processing test: Supports simultaneous processing of 1000 waybill numbers, with an average response time of 0.25 seconds, CPU utilization below 70%, memory usage below 60%, and the pipeline architecture can fully leverage the advantages of parallel computing; Edge computing deployment test: Deployed on an edge device with an ARM Cortex-A76 processor and 8GB of memory, the recognition accuracy reached 91.2% and the processing speed was 1.3 seconds / image, which can meet the needs of local rapid recognition and preliminary verification. Incremental learning test: 500 new format waybill number samples were added, and the learning and adaptation can be completed in just 15 minutes. After adaptation, the overall recognition accuracy rate is 94.1%, which is only 0.2% lower than the original 94.3%. The function can be quickly expanded while retaining the original capabilities.
[0059] In summary, this invention addresses the problems of large error accumulation, weak robustness in complex scenarios, performance imbalance in multi-task operations, high cost of adapting to new formats, and fragmented functional links in existing logistics waybill number recognition solutions. It constructs a feature extraction system that complements global features from Transformer and multi-scale local features, designs an end-to-end joint recognition architecture with three parallel tasks, and incorporates a loss-driven dynamic weight adjustment mechanism, a built-in anomaly detection and adaptive threshold mechanism, and an online incremental learning mechanism. This achieves a comprehensive improvement in recognition accuracy, processing efficiency, and scenario adaptability. Testing and verification show that the recognition accuracy is improved by more than 30% compared to traditional methods, and the processing efficiency is improved by 50%, while reducing the long-term maintenance cost of the system. This invention provides the logistics industry with a high-precision, highly robust, and easily scalable intelligent waybill number recognition solution, supporting the digital upgrade of intelligent logistics management.
[0060] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for intelligent recognition of logistics waybill numbers based on multi-task deep learning, characterized in that, Includes the following steps: S1. Receive the waybill number image, and perform noise reduction, enhancement and geometric correction preprocessing to obtain preprocessed image data; S2. Based on the preprocessed image data, the long-distance dependency relationship of characters is learned through the self-attention mechanism of the Transformer feature extraction module to obtain the feature representation of the waybill number; S3. Based on the feature representation of the waybill number, extract hierarchical features through multi-scale convolution kernels and fuse them to obtain multi-scale fused features; S4. The shared feature extraction layer maps to the specific output layer of multiple parallel tasks, and simultaneously completes the identification of waybill number attribution, format type recognition and key business information extraction to obtain the initial recognition results of multiple tasks. S5. Based on the initial recognition results of the multi-task, the waybill number anomaly detection module completes the format verification and forgery risk judgment, and obtains the recognition result with anomaly mark; S6. Based on the confidence level of the recognition results, the judgment threshold is dynamically adjusted through an adaptive threshold adjustment mechanism to obtain the final recognition result that balances accuracy and recall. S7. During the model training phase, based on the real-time loss values of each task during training, the weight allocation is calculated and adjusted through a dynamic task weight adjustment mechanism to obtain a joint loss function that adapts to the current training state. S8. Based on the joint loss function, the parameters of the shared feature layer and the specific output layer of each task are simultaneously optimized through end-to-end backpropagation to obtain the trained multi-task recognition model. S9. In the new format adaptation stage, for newly added waybill number format samples, some parameters of the model are updated through an online incremental learning mechanism to obtain an updated recognition model adapted to the new format.
2. The intelligent identification method for logistics waybill numbers based on multi-task deep learning according to claim 1, characterized in that: The Transformer-based feature extraction module in S2 contains multi-layered cascaded self-attention units; based on the image block sequence obtained by dividing the preprocessed image data, the global dependency relationship of the character sequence and the contextual semantic association are modeled through multi-layered self-attention units to obtain the feature representation of the waybill number containing global semantic information; The formula for calculating the self-attention mechanism is: ; in, Represents the query matrix. Represents the key matrix. Represents a value matrix, Indicates the dimension of the key vector; The feature matrix output by the self-attention operation; It is a normalized exponential function used to map the original attention score to a weight distribution with values ranging from 0 to 1 and a sum of 1.
3. The intelligent identification method for logistics waybill numbers based on multi-task deep learning according to claim 1, characterized in that: The multi-scale feature fusion in S3 extracts shallow character texture features, mid-level character structure features and high-level semantic features through convolutional kernels with at least three different receptive fields. Channel concatenation and adaptive weighted fusion are performed on the multi-level features to obtain multi-scale fused features that adapt to complex character deformations. The multi-scale fusion features are input into the task-specific output layer to help improve the recognition accuracy in complex environments; The waybill number anomaly detection module in S5 uses format information and character sequence information from the initial multi-task recognition results to perform matching and verification through a pre-configured waybill number rule base, identifies and marks waybill numbers with abnormal formats or risks of forgery, and obtains anomaly detection results.
4. The intelligent identification method for logistics waybill numbers based on multi-task deep learning according to claim 1, characterized in that: The dynamic task weight adjustment mechanism in S7 calculates the dynamic weight of each task using the loss proportion method. The specific calculation method is as follows: The formula for calculating the total joint loss function is: ; in, Represents the total loss function. Indicates the first Dynamic weights for each task. Indicates the first The loss function for each task. Indicates the total number of tasks; No. The formula for calculating the dynamic weight of each task is: ; in, Indicates the first The real-time loss value of the current training step for each task; For the first The real-time loss value of each task at the current training iteration step; The number of the target task whose weight is currently being calculated; This is the iteration variable used to accumulate the losses of all tasks; Based on the current real-time loss value of each task, the corresponding dynamic weights are calculated using the above formula and substituted into the total loss function to obtain the joint loss function that is dynamically optimized as the training process progresses.
5. The intelligent identification method for logistics waybill numbers based on multi-task deep learning according to claim 4, characterized in that: The adaptive threshold adjustment mechanism in S6 dynamically adjusts the decision threshold based on the confidence score of each result in the initial recognition results of multi-tasks. In high-confidence scenarios, the threshold is lowered to improve recall, while in low-confidence scenarios, the threshold is raised to ensure accuracy, resulting in a final recognition result that balances accuracy and recall. The end-to-end training method in S8 is based on the joint loss function. It uses the backpropagation algorithm to synchronously update the network parameters of the shared feature extraction layer and all task-specific output layers, thereby achieving collaborative optimization of multiple recognition tasks. The online incremental learning mechanism in S9 is based on newly added waybill number format samples. It only updates the parameters of the task-specific output layer and the top feature layer, and obtains an updated model adapted to the new waybill number format while retaining the original recognition ability.
6. A logistics waybill number intelligent recognition system based on multi-task deep learning, the system being used to implement the logistics waybill number intelligent recognition method based on multi-task deep learning as described in any one of claims 1-5, characterized in that, include: The system comprises an image input module, a preprocessing module, a shared feature extraction module, a multi-scale feature fusion module, and a multi-task output module, which are sequentially connected by signals. It also includes a dynamic task weight adjustment module that is connected by signals to the shared feature extraction module and the multi-task output module, as well as an anomaly detection module and an online learning module that are connected by signals to the multi-task output module. The shared feature extraction module adopts a Transformer-based network architecture, and the multi-task output module contains multiple parallel task-specific output layers, which are used to simultaneously output three types of recognition results: waybill number attribution, waybill number format type, and key business information.
7. The intelligent identification system for logistics waybill numbers based on multi-task deep learning according to claim 6, characterized in that: The output of the image input module is connected to the input of the preprocessing module, and the output of the preprocessing module is connected to the input of the shared feature extraction module. The image input module is used to acquire the original image of the waybill number. The preprocessing module has a cascaded denoising unit, enhancement unit and geometric correction unit built in it, which is used to optimize the image quality and correct the pose of the original image, and output the preprocessed image data to the shared feature extraction module.
8. The intelligent identification system for logistics waybill numbers based on multi-task deep learning according to claim 7, characterized in that: The input end of the multi-scale feature fusion module is connected to the feature output end of the shared feature extraction module, and the output end of the multi-scale feature fusion module is connected to the input end of the specific output layer of each task. The multi-task output module includes a waybill number attribution identification submodule, a waybill number format identification submodule, and a key business information extraction submodule. The three submodules are arranged in parallel and share the same fusion feature input, and each independently outputs the identification result of the corresponding dimension.
9. The intelligent identification system for logistics waybill numbers based on multi-task deep learning according to claim 8, characterized in that: It also includes a joint loss function optimization module. The input of the dynamic task weight adjustment module is connected to the loss output of each task-specific output layer, and the output of the dynamic task weight adjustment module is connected to the input of the joint loss function optimization module. The output of the joint loss function optimization module is fed back to the shared feature extraction module and the parameter update of each task-specific output layer. The dynamic task weight adjustment module is used to calculate dynamic weights based on the current loss value of each task and input them into the joint loss function optimization module, and update the parameters of the entire network uniformly through backpropagation.
10. The intelligent identification system for logistics waybill numbers based on multi-task deep learning according to claim 9, characterized in that: The input end of the anomaly detection module is connected to the output end of the multi-task output module and is deployed at the end of the inference output link to perform format compliance verification and forgery risk marking on the identification results. The input end of the online learning module receives newly added waybill number format samples, and the output end is connected to the parameter update end of the top layer of the shared feature extraction module and the multi-task output module. This is used to incrementally update the model parameters without restarting the full training and adapt to the new waybill number format.
