An assisted decision-making method and system based on anomaly event recognition

CN122416425BActive Publication Date: 2026-09-04SHANGHAI INTERNATIONAL PORT
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202610846894.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-12
Publication Date
2026-09-04
Estimated Expiration
2046-06-12

AI Technical Summary

Technical Problem

[0005]针对现有技术中的缺陷,本发明提供一种基于异常事件识别的辅助决策方法和系统,解决了现有技术中难以高效且精准识别港口集装箱堆存异常的问题

Benefits of technology

[0015] This invention establishes a spatial foundation for matching actual stacking positions by acquiring the first row and column relationship of the identification container numbers and anchoring the visual arrangement features of the container numbers. It calculates the maximum number of character matches between container numbers, accurately quantifies the matching degree, and provides a quantitative basis for system container number pairing. By determining the optimal pairing to form an initial set, it achieves accurate preliminary matching between the identified container numbers and the system container numbers. Combining the row and column relationship, it determines the actual stacking position, achieving accurate positioning of the storage location in the yard. Based on the position, it determines the system storage container number set, completing the accurate mapping between container numbers and yard positions. It calculates the set of character matches for the storage positions, quantifies the matching degree of container numbers at the same position, and obtains an optimized set by correcting the identified container numbers with system container numbers, significantly improving the accuracy of container number identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122416425B_ABST
    Figure CN122416425B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of computer vision, in particular to a kind of auxiliary decision-making method and system based on abnormal event identification.The method comprises: constructing a container number identification model, and constructing a score prediction model based on the container number identification model;Collect initial container image of target area, obtain optimized container image based on initial container image and score prediction model;Container number identification is carried out using container number identification model based on optimized container image to obtain identification container number set;System stacking data is obtained, and system storage container number set and optimized identification container number set are obtained according to system stacking data and identification container number set;Determine abnormal event and generate decision suggestion according to system storage container number set and optimized identification container number set.The problem that it is difficult to efficiently and accurately identify port container stacking exception in the prior art is solved, and the efficiency of port yard abnormal event identification and processing is improved by mutual verification of automatic identification of container number and objective data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision technology, specifically to an auxiliary decision-making method and system based on abnormal event recognition. Background Technology

[0002] As a core carrier of global logistics, the efficient and precise management of containers directly impacts the operational efficiency of port terminals and the security of the supply chain. In container yard management, real-time knowledge of each container's number and its precise storage location is a fundamental prerequisite for loading and unloading operations, storage planning, and container retrieval services. Currently, the mainstream container information management methods primarily rely on the Port Operating System (TOS) for data recording and on manual inspections or fixed-point OCR (Optical Character Recognition) equipment for container number verification.

[0003] However, the actual operating environment of container yards is complex and ever-changing, and existing technologies still face many challenges. First, container bodies often suffer from wear, corrosion, and oil stains due to long-term open-air storage, leading to a significant decrease in the accuracy of traditional OCR recognition. Second, the busy operations in container yards, with frequent loading, unloading, and relocation of containers, easily result in misalignment anomalies where the actual storage location of a container does not match the location of the container number recorded by the system. Relying solely on manual inspections is not only inefficient but also makes it difficult to detect and trace problems in a timely manner. In addition, existing image recognition solutions mostly use fixed shooting parameters, making it difficult to adapt to changes in lighting conditions at different times, further affecting the stability of recognition.

[0004] Failure to promptly detect and correct anomalies such as misplaced container numbers will directly lead to a series of management problems, including errors in subsequent loading and unloading operations, delays in container retrieval, and waste of yard resources, resulting in significant losses to port operations. Therefore, there is an urgent need for an intelligent solution that can adapt to complex environments, balance identification accuracy and efficiency, and proactively identify storage anomalies to provide decision support. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides an auxiliary decision-making method and system based on anomaly event recognition, which solves the problem of difficulty in efficiently and accurately identifying port container stacking anomalies in existing technologies.

[0006] To achieve the above objectives, one aspect of the present invention provides an auxiliary decision-making method based on abnormal event identification. The method includes: constructing a container number identification model; constructing a score prediction model based on the container number identification model; acquiring initial container images of a target area; obtaining optimized container images based on the initial container images and the score prediction model; performing container number identification using the container number identification model based on the optimized container images to obtain an identified container number set; acquiring system stacking data; obtaining a system stored container number set and an optimized identified container number set based on the system stacking data and the identified container number set; and determining abnormal events and generating decision suggestions based on the system stored container number set and the optimized identified container number set.

[0007] This invention lays a precise algorithmic foundation for container number recognition and image optimization by constructing a container number recognition model and building a score prediction model based on it. Initial images are collected and combined with the score prediction model to generate optimized container images, improving image quality and enhancing the basic conditions for container number recognition. Based on the optimized images, the container number recognition model is used to identify a set of container numbers, achieving high-precision extraction of container numbers. System stacking data is acquired and combined with the identified container number set to obtain a system-stored container number set and an optimized identified container number set, completing accurate correction and location matching of container numbers. Comparison of the two sets of container numbers determines anomalies and generates decision suggestions, achieving accurate identification and classification of storage anomalies. This significantly improves the accuracy of container number recognition in port yards and the efficiency of anomaly event handling, providing reliable intelligent auxiliary decision support for refined yard management.

[0008] Optionally, the construction of the box number recognition model includes: constructing a basic loss function based on character-level cross-entropy loss; obtaining an expected number of matches threshold and constructing a character match number penalty term based on the expected number of matches threshold; constructing an optimized loss function based on the basic loss function and the character match number penalty term; and constructing the box number recognition model based on the optimized loss function.

[0009] This invention constructs a basic loss function based on character-level cross-entropy loss, ensuring the basic recognition of container numbers at the character level and guaranteeing the accuracy of single-character recognition. It obtains the expected number of matches threshold and constructs a character match number penalty term, effectively constraining the recognition balance of each container number within a single image and avoiding the problem of extremely poor recognition results for some container numbers. By combining the basic loss function and the character match number penalty term to construct an optimized loss function, it achieves dual constraints on container number recognition accuracy and recognition balance. Based on this optimized loss function, a container number recognition model is constructed, making the model training more suitable for the complex scenario of multi-container recognition in a yard, thus improving the overall recognition accuracy and stability of the container number recognition model under complex working conditions.

[0010] Optionally, the step of constructing a score prediction model based on the container number recognition model includes: acquiring a sample image, sample shooting parameters, and the sample's actual container number; calculating the sample container number and sample character confidence score based on the sample image using the container number recognition model; calculating the sample score of the sample image based on the sample character confidence score, the sample container number, and the sample's actual container number; and constructing a score prediction model using the sample score, the sample image, and the sample shooting parameters.

[0011] This invention ensures the training data foundation for the score prediction model by acquiring sample images, sample shooting parameters, and sample real box numbers, guaranteeing the integrity and relevance of the data. Based on the sample images, the box number recognition model calculates the sample box number and sample character confidence, providing accurate recognition data support for sample score calculation. By combining sample character confidence, sample box number, and sample real box number to calculate sample score, the adaptability of the image to box number recognition is quantified, and accurate model prediction labels are established. By using sample scores, sample images, and sample shooting parameters to construct the score prediction model, the model learns the correlation between shooting parameters and recognition results, improving the prediction accuracy and scene generalization ability of the score prediction model.

[0012] Optionally, calculating the sample score of the sample image based on the sample character confidence score, the sample bin number, and the actual sample bin number includes: determining the correct identification character of the sample bin number based on the actual sample bin number; calculating the comprehensive confidence score of each sample bin number in the sample image based on the correct identification character and the sample character confidence score to obtain a comprehensive confidence score set; and extracting the minimum value from the comprehensive confidence score set to obtain the sample score of the sample image.

[0013] This invention determines the correct identification characters for sample box numbers based on the actual box numbers of the samples, accurately anchoring the effective identification results and laying a precise benchmark for subsequent confidence calculation. It combines the confidence of the correct identification characters and sample characters to calculate the comprehensive confidence of a single box number and forms a set, quantifying the recognition reliability of each box number and ensuring the accuracy of single-box recognition evaluation. The minimum value of the comprehensive confidence set is extracted as the sample score. Based on the "barrel effect," this accurately reflects the overall recognition level of the image, objectively quantifying the image's adaptability to box number recognition, and improving the accuracy and objectivity of sample score calculation.

[0014] Optionally, obtaining the system storage box number set and the optimized identification box number set based on the system stacking data and the identification box number set includes: obtaining a first row-column relationship between the identification box numbers in the identification box number set; calculating the maximum number of character matches between each identification box number and each system box number in the system stacking data; determining the best pairing for each identification box number in the system stacking data based on the maximum number of character matches to form an initial system matching box number set; determining the actual stacking position of the box number based on the initial system matching box number set and the first row-column relationship; determining the system storage box number set based on the actual stacking position of the box number and the system stacking data; calculating the stacking position character match number set based on the system storage box number set and the identification box number set; and correcting the identification box number set using the system storage box number set and the stacking position character match number set to obtain the optimized identification box number set.

[0015] This invention establishes a spatial foundation for matching actual stacking positions by acquiring the first row and column relationship of the identification container numbers and anchoring the visual arrangement features of the container numbers. It calculates the maximum number of character matches between container numbers, accurately quantifies the matching degree, and provides a quantitative basis for system container number pairing. By determining the optimal pairing to form an initial set, it achieves accurate preliminary matching between the identified container numbers and the system container numbers. Combining the row and column relationship, it determines the actual stacking position, achieving accurate positioning of the storage location in the yard. Based on the position, it determines the system storage container number set, completing the accurate mapping between container numbers and yard positions. It calculates the set of character matches for the storage positions, quantifies the matching degree of container numbers at the same position, and obtains an optimized set by correcting the identified container numbers with system container numbers, significantly improving the accuracy of container number identification.

[0016] Optionally, determining the actual stacking position of the container number based on the initial system matching container number set and the first row-column relationship includes: constructing a position matching template based on the first row-column relationship; constructing a system container number position layout table based on the initial system matching container number set; traversing the system container number position layout table using the position matching template to obtain a set of overlapping position points; extracting the maximum number of overlapping position points from the set of overlapping position points to obtain the actual stacking position of the container number corresponding to the maximum number of overlapping position points.

[0017] This invention constructs a location matching template based on the first row and column relationship, transforming the visual arrangement of container numbers into a structured template. This anchors the spatial arrangement features of container numbers, providing a unified reference for location matching. Based on the initial set of matched container numbers, a system container number location layout table is constructed, mapping the matched container numbers to the actual locations in the yard. This establishes a framework linking system data with yard locations. By traversing the layout table using the template, a set of overlapping location points is obtained, quantifying the location matching degree and providing precise quantitative basis for location determination. The maximum number of overlapping points is extracted to determine the actual stacking location, locking in the yard location with the highest matching degree. This avoids the positioning deviation caused by single character matching, solving the problem of inaccurate positioning relying solely on container number character matching in traditional methods, and improving the accuracy and uniqueness of determining the actual stacking location of container numbers.

[0018] Optionally, the step of modifying the identification box number set using the system storage box number set and the heap position character matching number set to obtain an optimized identification box number set includes: setting a matching number threshold, comparing the matching number threshold with the elements in the heap position character matching number set; and modifying the identification box number set using the system storage box number set according to the comparison result to obtain an optimized identification box number set.

[0019] This invention precisely defines the boundary for reliable matching of box numbers by setting a matching threshold and comparing it one by one with elements in the heaped character matching set. This effectively avoids accidental character mismatches and provides a clear and scientific basis for box number correction. Based on the comparison results, the system uses a high-confidence stored box number set to specifically correct the identified box number set. Box numbers that meet the matching criteria are accurately replaced to correct recognition errors, while the original recognition results of box numbers that do not meet the criteria are retained to ensure data integrity. This avoids secondary errors caused by blind replacement and improves the overall accuracy of box number recognition.

[0020] Optionally, the step of determining abnormal events and generating decision suggestions based on the system storage container number set and the optimized identification container number set includes: comparing the system storage container number set with the optimized identification container number set to obtain an abnormal container number set; calculating the intersection of the abnormal container number set and the system storage container number set; and generating decision suggestions based on the intersection.

[0021] This invention obtains an abnormal container number set by comparing the system's stored container number set with the optimized identified container number set. It accurately filters out container numbers whose storage locations do not match the system records, pinpoints the core objects of anomaly verification, clarifies the scope of anomaly analysis, and calculates the intersection of the abnormal container number set and the system's stored container number set. From the dimension of container number element existence, it accurately distinguishes anomaly types such as misplaced storage locations, incorrect entry data, or misplaced external containers, providing a basis for differentiated handling. By generating decision suggestions based on the intersection results, it provides targeted solutions for system data correction or manual review and tracing, avoiding indiscriminate handling methods. This improves the accuracy of judgment of abnormal events in the yard, the scientific nature and pertinence of decision-making, and the efficiency of anomaly handling, effectively reducing the risk of errors in port yard operation and management.

[0022] Optionally, generating decision suggestions based on the intersection includes: when the intersection is determined to be a non-empty set, correcting the system stacking data using the abnormal container number set; when the intersection is determined to be an empty set, performing a manual review.

[0023] This invention corrects system stacking data by using abnormal container number sets when the intersection is determined to be a non-empty set. For simple anomalies such as misplaced container storage locations, it achieves automatic and accurate data updates, significantly improving data correction efficiency and reducing manual intervention costs. When the intersection is determined to be an empty set, it initiates manual review. For complex anomalies such as incorrect entry of incoming container numbers or misplacement of external containers, it accurately triggers verification and tracing processes, preventing major anomalies from being missed and causing cascading management problems. Overall, it achieves differentiated and intelligent handling of yard anomalies, accurately distinguishing different types of anomalies and matching corresponding solutions, improving the accuracy and targeting of anomaly handling, effectively ensuring the consistency between system stacking data and the actual storage situation in the yard, and reducing port operation and management risks.

[0024] In another aspect, the present invention provides an auxiliary decision-making system based on anomaly event recognition, comprising: a processor, an input device, an output device, and a memory, wherein the processor, the input device, the output device, and the memory are interconnected, wherein the memory is used to store a computer program, the computer program including program instructions, and the processor is configured to invoke the program instructions to execute the auxiliary decision-making method based on anomaly event recognition as described in any of the preceding aspects of the present invention.

[0025] The present invention provides an auxiliary decision-making system based on abnormal event recognition, which is compact in structure, stable in performance, highly integrated and simple in composition. It can stably execute the auxiliary decision-making method based on abnormal event recognition provided in the preceding aspect of the present invention, further improving the overall applicability and practical application capability of the present invention. Attached Figure Description

[0026] Figure 1This is a flowchart of an auxiliary decision-making method based on abnormal event identification according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of an auxiliary decision-making system based on abnormal event recognition according to an embodiment of the present invention. Detailed Implementation

[0027] Specific embodiments of the present invention will now be described in detail. It should be noted that the embodiments described herein are for illustrative purposes only and are not intended to limit the invention. In the following description, numerous specific details are set forth in order to provide a thorough understanding of the invention. However, it will be apparent to those skilled in the art that these specific details are not necessary to practice the invention. In other instances, well-known circuits, software, or methods have not been specifically described to avoid obscuring the invention.

[0028] Throughout this specification, references to "an embodiment," "an embodiment," "an example," or "an example" mean that a particular feature, structure, or characteristic described in connection with that embodiment or example is included in at least one embodiment of the invention. Therefore, the phrases "in an embodiment," "in an embodiment," "an example," or "an example" appearing in various places throughout the specification do not necessarily refer to the same embodiment or example. Furthermore, specific features, structures, or characteristics can be combined in one or more embodiments or examples in any suitable combination and / or sub-combination. Moreover, those skilled in the art will understand that the illustrations provided herein are for illustrative purposes and are not necessarily drawn to scale.

[0029] Please see Figure 1 In order to solve the problems in the prior art, in an alternative embodiment, such as Figure 1 The auxiliary decision-making method based on anomaly event identification shown includes the following steps: Step S1: Construct a container number recognition model, and construct a score prediction model based on the container number recognition model.

[0030] The construction of the container number recognition model specifically includes the following sub-steps: Step S101: Construct a basic loss function based on character-level cross-entropy loss.

[0031] The basic loss function satisfies the following formula: in, Based on the loss function, The number of image samples. For the first The optimal number of predicted and actual box numbers to be paired in an image using the Hungarian algorithm. The length of the container number in characters. For indicator functions, For the first The first image The first optimal pairing corresponds to the real box number of the first... Bit character index, This position represents a non-padded bit (with a corresponding actual box number). The indicator function is used to filter out non-padded bits, calculating the loss only for valid characters. For the first The first image The first optimal pairing corresponds to the real box number of the first... The predicted position of the character is the actual character. The probability of.

[0032] The above basic loss function This is the basic loss calculation formula for a container number recognition model built on character-level cross-entropy loss. The core of this formula involves multi-level summation and normalization to calculate the overall prediction loss of the container number characters in multiple sample images: first, ... Perform a global traversal of the image samples, and then perform a single image traversal. First, the number of optimal pairing sets between the predicted container numbers obtained by the Hungarian algorithm and the actual container numbers in the image is used. Perform normalization, then iterate through each optimal pairing of the image. The length of the characters surrounding the container number via indicator function Filter out valid character positions without padding The probability of the effective position being predicted by the model as the corresponding real character. The negative logarithm of the result is calculated and summed over all valid character positions. This sum is then normalized. Finally, the calculation results for all images and all optimal pairings are summed and then normalized overall. The smaller the value, the closer the model's prediction of the box number at the character level is to the actual box number.

[0033] It should be noted that the above basic loss function It's not a simple application of character-level cross-entropy loss, but a customized design tailored to the specific needs of multi-container recognition scenarios in port yards: First, by introducing indicator functions The padding is filtered out. Since the number of containers may vary in different images, the model needs to preset a fixed number of predicted outputs. The portion that exceeds the actual number of container numbers is an invalid padding. This indicator function is used to exclude it from the loss calculation, ensuring that only the actual container number characters are constrained.

[0034] Second, the Hungarian algorithm is used to construct the optimal pairing set between predicted container numbers and actual container numbers. In yard images, the visual arrangement of containers may not match the order of their recorded container numbers. Directly calculating losses based on positional order can lead to incorrect penalties. The Hungarian algorithm is used to achieve optimal matching, resolving the ambiguity between predicted and actual order.

[0035] Third, a three-level normalization structure of "image level - pairing level - character level" is adopted (divided by each level respectively). , , This ensures that the contributions of different images and different box numbers to the total loss are balanced, and avoids model training skew caused by differences in the number of box numbers in images.

[0036] In summary, this basic loss function is a systematically customized design based on the general character-level cross-entropy loss, addressing issues such as variable-length output, order ambiguity, and uneven quantity in the multi-container recognition scenario of port yards.

[0037] Step S102: Obtain the expected number of matches threshold, and construct a character match number penalty term based on the expected number of matches threshold.

[0038] The character match count penalty term satisfies the following formula: in, Penalty for the number of character matches. This represents the number of correctly identified characters in the box number. No. The first image The first optimal pairing corresponds to the real box number of the first... The predicted position of the character is the actual character. The probability, This is the threshold for the expected number of matches.

[0039] The aforementioned character matching penalty term is used to constrain the balance of container number recognition within the same container image, avoiding situations where some container numbers are clearly recognized while others are poorly recognized: it first iterates through all... Zhang image samples, for a single image The Hungarian algorithm was used to obtain the matching results. The optimal pairing of predicted container numbers with actual container numbers is determined by an indicator function. (in The threshold for the expected number of matches is usually set to 3) to accurately filter out the number of correctly identified characters. Poor recognition of fewer than 3 pairs For these substandard pairs, iterate through their pairs. The position of the incorrectly recognized character ( This only indicates the quantity, not the order of the characters. The traversal only occurs when the number is 1. (In the set of incorrectly identified characters), the computational model predicts that the character at that position is a real character. probability The sum of the differences from 1 is used to quantify the degree of recognition error of the pairing. Finally, all pairings that trigger penalties are divided at the sample level (by 1). ) and single-image paired layers (divided by Normalize the result to obtain the overall penalty term. During model training, an additional loss is applied to container numbers with fewer than 3 characters recognized in a single image, forcing the model to optimize these weakly recognized container numbers. Ultimately, this ensures that all container numbers in the same image can be stably recognized with at least 3 characters, achieving a balanced improvement in container number recognition quality.

[0040] set up The reason is that the prediction of the container number recognition model is difficult to be 100% correct under all circumstances, especially since the container number may be worn, oily, etc. In this application scenario, the same image usually contains multiple containers. In such a strict recognition scenario, it is even more difficult to guarantee 100% accuracy. Therefore, this invention does not pursue the accurate recognition of every character of every container number. Generally, it is only necessary to recognize more than 2 characters to compare and confirm with the pre-stored container numbers in the port management system. In order to reduce the probability of coincidence, 3 characters can usually be set to leave room for error.

[0041] Step S103: Construct an optimized loss function based on the basic loss function and the character matching number penalty term.

[0042] Optimize the loss function Satisfy the following formula: in, For penalty weights.

[0043] Step S104: Construct a box number recognition model based on the optimized loss function.

[0044] In this embodiment, the container number recognition model constructed based on the optimized loss function adopts an end-to-end sequence recognition architecture of CNN+Transformer. It consists of a visual feature extraction module, a Transformer sequence modeling module, and a character classification output module connected in series. The visual feature extraction module uses a lightweight ResNet18 network to extract two-dimensional visual features of the container number region in the container image. After feature reshaping and position encoding, the one-dimensional sequence feature vector is input into the Transformer sequence modeling module. This module has a 4-layer encoder, an 8-head self-attention mechanism, a 128-dimensional word embedding dimension, and a 512-dimensional feedforward network dimension, specifically capturing the global order dependency relationship between the 11-digit container number characters. Finally, through a fully connected layer combined with the Softmax activation function, it outputs a combination of numbers and uppercase letters. The model employs a 36-character set alignment to determine the character probability distribution at each position of the container number. Basic model parameters include: input container number images uniformly resized to 512×256 pixels; training batch size set to 32; expected match threshold h fixed at 3; AdamW optimizer used; initial learning rate set to 1e-4 with cosine annealing for learning rate decay; 60 training epochs; and an early stopping mechanism to terminate training if the validation set loss does not decrease for 5 consecutive epochs to prevent overfitting. The logic of combining model training with the loss function is as follows: first, container image samples labeled with real container numbers undergo data augmentation processing such as random cropping, brightness / contrast adjustment, and slight rotation before being input into the model for forward propagation to obtain the predicted container number sequence. Then, the Hungarian algorithm is used to optimally pair the predicted container number sequence with the real container number sequence to obtain the predicted container number sequence within a single image. Find the optimal pairing set, and calculate the character-level cross-entropy base loss based on this pairing set. Penalty for matching number of characters The total loss is obtained by directly summing the two. Subsequently, the total loss gradient is backpropagated to all trainable parameters of the CNN layer and Transformer encoder of the model through backpropagation. The parameters are iteratively updated using gradient descent. During training, the optimization loss function simultaneously constrains the overall character recognition accuracy and the balance of container number recognition in a single image. Additional penalties are imposed on container number predictions with fewer than 3 correctly recognized characters in a single image, forcing the model to prioritize optimizing such weak container number predictions. Finally, a container number recognition model is constructed that ensures overall recognition accuracy while avoiding some container numbers being clearly recognized while others are poorly recognized in a single image.

[0045] The scoring prediction model constructed based on the box number recognition model includes: Step S111: Obtain the sample image, sample shooting parameters, and sample real box number.

[0046] In this embodiment, sample images, sample shooting parameters, and sample real container numbers are acquired through on-site collection at the port yard. These three elements are linked one-to-one using a unique sample number, forming a standardized training sample set. The sample images are container body images collected in various scenarios within the container yard, covering different shooting angles such as front, oblique, and side views, and shooting distances ranging from 3 to 10 meters. The image resolution is uniformly 1920×1080 pixels. The sample shooting parameters are the equipment parameters recorded synchronously with each sample image acquisition, specifically including key information such as the focal length, aperture, shutter speed, and ISO sensitivity of the shooting equipment, stored in a structured format. The sample real container number is the manually and precisely labeled 11 standard container numbers (including uppercase letters and numbers) on the container body of each valid sample image. After labeling, samples with incorrect or missing labels are removed through a second verification process. Finally, the data is stored in structured text format, linked to the corresponding sample images and shooting parameters, ensuring the accuracy and completeness of the sample data.

[0047] Step S112: Based on the sample image, calculate the sample box number and sample character confidence level using the box number recognition model.

[0048] In this embodiment, sample images collected on-site at the port yard are first subjected to standardized preprocessing consistent with the training phase of the container number recognition model, adjusting them to the input size suitable for the model without additional data augmentation, ensuring that the input format matches the model. Then, the preprocessed sample images are input into the already constructed container number recognition model. The model's CNN visual feature extraction module extracts the visual features of the container number region. After feature reshaping and positional encoding, the feature vectors are input into the Transformer sequence modeling module to capture the global dependencies between the 11-digit container number characters. Finally, the model's character classification output... The module outputs the probability distribution of the corresponding number and uppercase letter for each character position of the 11-digit bin number. Based on the probability distribution output by the model, the maximum value in the probability distribution of each character position is determined as the confidence score of the sample character at that position. The confidence scores of the 11 characters are combined in order of bin number position to form the confidence score of the sample character corresponding to the sample image. At the same time, according to the character category corresponding to the maximum value in the probability distribution of each character position, the module decodes the data in order of the 11-digit bin number to obtain the sample bin number corresponding to the sample image. Finally, it achieves a precise one-to-one correspondence between the sample bin number of a single sample image and the confidence scores of the sample characters arranged in order of position.

[0049] Step S113: Calculate the sample score of the sample image based on the sample character confidence level, the sample bin number, and the sample real bin number.

[0050] The calculation of the sample score of the sample image based on the sample character confidence level, the sample bin number, and the sample real bin number specifically includes the following sub-steps: Step S11301: Determine the correct identification character of the sample box number based on the actual sample box number.

[0051] In this embodiment, the actual box number of the sample is precisely compared with the sample box number output by the model according to the fixed character position of the 11-digit box number. Based on each character of the actual box number of the sample, it is determined whether the character at the corresponding position of the sample box number is the correct recognition result. If the character at a certain position of the sample box number is completely consistent with the character at the same position of the actual box number of the sample, then the character is determined as the correct recognition character of the sample box number at that position. After completing the comparison and determination of all positions in sequence, all correctly recognized characters in the sample box number and the corresponding box number position information are collected to form the set of correctly recognized characters of the sample box number.

[0052] Step S11302: Calculate the comprehensive confidence score of each sample box number in the sample image based on the correctly identified character and the confidence score of the sample character, and obtain a comprehensive confidence score set.

[0053] In this embodiment, for each sample box number in the sample image, firstly, based on the determined correctly identified characters and their corresponding 11-digit box number fixed positions, the confidence scores corresponding to all correctly identified character positions are precisely extracted from the confidence scores of each sample character of the sample box number, and the confidence scores of incorrectly identified character positions are removed (these scores do not participate in the overall confidence score calculation); then, the arithmetic mean of all extracted confidence scores of correctly identified character positions is calculated, and the mean result is used as the overall confidence score of the sample box number, thereby characterizing the overall correct identification confidence level of the sample box number; finally, the overall confidence scores corresponding to each sample box number in the sample image are collected and organized according to the unique identifier of the box number to form the overall confidence score set corresponding to the sample image, realizing a one-to-one precise association between each sample box number and its corresponding overall confidence score.

[0054] Step S11303: Extract the minimum value from the comprehensive confidence set to obtain the sample score of the sample image.

[0055] In this embodiment, a comprehensive confidence score set is set for each sample image. This set includes the calculated comprehensive confidence score value for each container number within the sample image. Each value represents the overall correct identification confidence level of the corresponding container number. Then, the minimum comprehensive confidence score value is directly extracted from all values ​​in the comprehensive confidence score set and directly determined as the sample score of the sample image. This method is based on the "barrel effect" design, where the sample score is determined by the container number with the lowest identification confidence level within the sample image. This quantifies the overall identification balance of all container numbers within a single sample image, avoiding situations where some container numbers have high identification confidence and others have extremely low identification confidence.

[0056] Step S11304: Construct a score prediction model using the sample score, the sample image, and the sample shooting parameters.

[0057] In this embodiment, a large number of sample images, corresponding sample shooting parameters (such as aperture, shutter speed, ISO sensitivity, focal length, etc.), and sample scores calculated by the container number recognition model are first collected. For each sample image, image quality features related only to image sharpness, illumination uniformity, contrast, and texture sharpness are extracted (these can be the output of a pre-trained convolutional neural network such as EfficientNet-Lite0 pooling layer, outputting a 1280-dimensional image quality feature vector, or manually designed features such as brightness, contrast, and texture). Semantic features such as container number and container appearance are discarded. At the same time, the sample shooting parameters are standardized and normalized. The image quality feature vector is concatenated with the standardized shooting parameters to form the model input vector. The sample score is used as the regression objective to train a score prediction model. This model adopts a lightweight regression architecture (such as a multilayer perceptron or gradient boosting tree) and optimizes by minimizing the mean square error between the predicted score and the actual sample score. The model only learns the correlation between image quality features, shooting parameters and box number recognition sample scores, avoiding the interference of image semantic content on the prediction results. After training, it can quickly predict the expected sample score of the image captured under any input image quality feature vector and candidate shooting parameters, thus providing an efficient objective function for subsequent parameter optimization.

[0058] Step S2: Acquire initial container images of the target area, and obtain optimized container images based on the initial container images and the score prediction model.

[0059] In this embodiment, an initial container image is captured on the target container area, with a resolution of 1920×1080 pixels. This image is then input into a lightweight feature extraction network, such as the EfficientNet-Lite0 model pre-trained on ImageNet. Its fully connected classification layer is removed, and the 1280-dimensional feature vector output from the global average pooling layer is used as the image feature representation. This feature extraction network is identical to the one used when training the score prediction model, and only requires one forward inference calculation on the initial image; subsequent optimization processes do not repeat the extraction process.

[0060] The extracted 1280-dimensional image features are used as fixed inputs, and the trained score prediction model is used as the objective function to maximize the search within a preset shooting parameter space. The shooting parameter space is defined as a three-dimensional continuous space: aperture value A∈[2.8,16] (F-value, step size 0.3), shutter speed T∈[1 / 1000,1 / 30] seconds (sampled in logarithmic coordinates, step size 0.1), and ISO sensitivity I∈[100,3200] (sampled in logarithmic coordinates, step size 0.2). To minimize the time interval between two shots, a Bayesian optimization algorithm is used for parameter search, with the following configuration: In the initialization phase, 10 initial parameter combinations are selected in the parameter space using Latin hypercube sampling, and each combination is input into the score prediction model to obtain a predicted score. In the iterative optimization phase, each iteration fits the score distribution of existing sampling points based on Gaussian process regression. The next parameter combination to be evaluated is selected using the expectation boosting acquisition function. This combination, along with fixed image features, is input into the score prediction model to obtain a new predicted score, which is then added to historical data. The maximum number of iterations is set to 30. The forward inference time of the score prediction model in each iteration is approximately 8 milliseconds (based on a lightweight neural network accelerated by TensorRT). The total time for 30 iterations is approximately 240 milliseconds. Adding the computation time of Gaussian process regression (approximately 50 milliseconds), the total optimization time is controlled within 300 milliseconds. Simultaneously, 4.7 seconds are reserved for camera parameter adjustment and image acquisition, allowing the entire process to be completed within 5 seconds. After the iteration, the parameter combination with the highest predicted score is selected from all evaluated parameter combinations as the optimized shooting parameters.

[0061] The optimized shooting parameters are sent to the camera's control interface via serial port or Ethernet communication protocol, triggering the camera to execute parameter adjustment instructions. After the camera returns feedback that the parameter adjustment is complete, it immediately triggers the camera to re-acquire an image of the target area, which is the optimized container image.

[0062] Step S3: Based on the optimized container image, use the container number recognition model to perform container number recognition to obtain a set of recognized container numbers.

[0063] In this embodiment, the optimized container image is input into the trained container number recognition model. The model's visual feature extraction module extracts the two-dimensional visual features of the container number region. After feature reshaping and position encoding, the one-dimensional sequence feature vector is input into the Transformer sequence modeling module to accurately capture the global order dependency relationship between the 11-digit container number characters. Then, the character classification output module outputs the probability distribution of 36 types of characters (digits and uppercase letters) for each character position. Based on the probability distribution of each character position, the character corresponding to the maximum probability is selected and decoded according to the position order of the 11-digit container number to obtain the independent identification container number corresponding to all containers in the optimized container image. Finally, all the decoded identification container numbers are structured and collected according to the actual arrangement position of the containers in the image to form an identification container number set containing all valid recognition results. Each identification container number in the set is associated with the corresponding container entity in the image.

[0064] Step S4: Obtain system stacking data, and obtain system storage box number set and optimized identification box number set based on the system stacking data and the identification box number set.

[0065] In this embodiment, the system stacking data corresponding to the target container area is obtained through the standardized data interface of the port / terminal operating system (TOS). This type of data is the core information of container stacking that is stored in real time by the TOS system in accordance with the port yard stacking management specifications after the container has been registered and filed upon entering the port. The obtained system stacking data specifically includes the standard 11-digit container number, the precise stacking location information of the container in the yard (including stacking area, bay, row number, column number, and layer number), the row, column, and layer stacking relationship between containers, and the configuration information related to the yard stacking rules. All data is structured and dynamically updated by the TOS system.

[0066] The specific steps for obtaining the system storage box number set and the optimized identification box number set based on the system stacking data and the identification box number set include the following: Step S401: Obtain the first row and column relationship between the identification box numbers in the identification box number set.

[0067] In this embodiment, based on the actual visual arrangement of each container entity in the optimized container image, and combined with the one-to-one association between each identified container number and its corresponding container entity in the identified container number set, the extraction of the first row and column relationship between the identified container numbers is carried out. First, the optimized container image is visually located to determine the range of two-dimensional pixel coordinates of each container in the image. Based on the visual perspective of the image capture, the arrangement dimension is set as rows horizontally and columns vertically. The relative row and column position association features between each container entity are calculated. Then, each identified container number is bound to the visual row and column position information of its corresponding container. The row and column numbers of all identified container numbers and the association information of container numbers in the same row and adjacent rows and columns are statistically analyzed. Finally, according to the row and column rules of the image visual arrangement, a structured association table is constructed with the identified container number as the unique index, containing the relative row number, column number, and the correspondence between adjacent identified container numbers. This structured association table is the first row and column relationship between the identified container numbers in the identified container number set, providing a positional reference at the image visual level for the subsequent matching of the actual stacking position of the container numbers.

[0068] Step S402: Calculate the maximum number of character matches for each of the identified box numbers and each of the system box numbers in the system stack data.

[0069] In this embodiment, for each 11-digit standard identification box number in the identification box number set, character-level pairing calculations are performed sequentially with all 11-digit standard system box numbers in the system stack data. For each pair of identification box numbers and system box numbers, a precise comparison is performed digit by digit according to the fixed character positions of the 11-digit box numbers. The number of characters with completely identical characters in the same position in the two sets of box numbers is counted, and this number is the character matching number corresponding to the pairing. For a single identification box number, all character matching numbers obtained after pairing with all system box numbers are collected, and the character matching number with the largest value is extracted and determined as the maximum character matching number corresponding to the identification box number. After completing the calculation of the maximum character matching number for all identification box numbers, a one-to-one association mapping table between identification box numbers and corresponding maximum character matching numbers is constructed to provide quantitative data support for determining the optimal pairing in the future.

[0070] Step S403: Based on the maximum number of character matches, determine the best pairing for each of the identified box numbers in the system stack data to form an initial system matching box number set.

[0071] In this embodiment, based on the constructed association mapping table between identification box numbers and their corresponding maximum character matching counts, for each identification box number in the identification box number set, all system box numbers whose character matching count calculated by pairing with the identification box number is equal to its maximum character matching count are precisely selected from all system box numbers in the system stacking data. These selected system box numbers are then determined as the best-paired system box numbers corresponding to the identification box number in the system stacking data. It should be noted that it is allowed for a single identification box number to match two or more system box numbers. This situation may occur in extreme cases such as when the number of correctly identified characters of the identification box number is small, and it does not affect the subsequent stacking position matching analysis. Subsequently, all identification box numbers are associated and bound one by one with all their corresponding best-paired system box numbers. The association results are structured and organized using the identification box number as the unique index. The final association set containing all identification box numbers and their corresponding best-paired system box numbers is the initial system matching box number set, which provides the basic pairing basis for determining the actual stacking position of the box numbers in the subsequent process.

[0072] Step S404: Determine the actual stacking position of the box number based on the initial system matching box number set and the first row-column relationship.

[0073] Specifically, determining the actual stacking position of the boxes based on the initial system matching box number set and the first row-column relationship includes the following sub-steps: Step S40401: Construct a position matching template based on the first row-column relationship.

[0074] In this embodiment, based on the first row-column relationship corresponding to the set of identified container numbers, and taking the optimization of the row-column arrangement rules from the visual perspective of container images as a benchmark, the construction of a position matching template is carried out. First, core position arrangement feature information is extracted from the first row-column relationship, including the distribution range of the row and column numbers of the identified container numbers, the number of identified container numbers contained in each row and column, the relative row-column adjacency relationship between different identified container numbers, and the distribution of empty positions, and redundant information unrelated to the position arrangement is removed. Then, a standardized two-dimensional row-column template framework is constructed, with the horizontal dimension of the template set as rows and the vertical dimension set as columns. The template is divided into dimensions according to the actual row and column numbers in the first row-column relationship, and the position arrangement of the identified container numbers is transformed into corresponding position nodes in the template. The nodes only represent the relative positional relationship of the containers rather than specific container number information. This creates a standardized location matching template that retains only the row and column arrangement structure without specific container number identifiers. For example, if four containers are identified in the optimized image in a common "L-shaped" visual arrangement in port yards, i.e., there are two containers in the first horizontal row and only one container in the second vertical column (located in the second row), then the constructed location matching template is a 2×2 two-dimensional grid, where (1,1), (1,2), and (2,1) are valid location nodes with containers, and (2,2) is an empty node without containers. The template only restores the structural features of the L-shaped arrangement and does not contain any container number information. This template completely restores the actual visual row and column arrangement structure of the container numbers in the optimized container image, providing a unified and standardized structural reference for subsequent traversal of the system's container number location layout table and calculation of the number of overlapping locations.

[0075] Step S40402: Construct a system box number location layout table based on the initial system matching box number set.

[0076] In this embodiment, firstly, a one-to-one mapping relationship is established between the best-matched system container numbers and the actual row and column positions in the yard, based on the core location information of the actual row and column positions corresponding to all best-matched system container numbers in the initial system matching container number set. Then, using the identified container number as the unique core index, each identified container number and all its corresponding best-matched system container numbers, as well as the actual row and column position information in the yard for each system container number, are associated and integrated to form three-dimensional association data of identified container number-system container number-stacking location. Subsequently, a two-dimensional system container number position layout table framework consistent with the actual stacking row and column dimensions in the yard is constructed. The horizontal axis of the table represents the actual row number in the yard, and the vertical axis represents the actual column number in the yard. This is done according to the three-dimensional association data. The actual row and column positions in the yard are determined by filling all the best-paired system container numbers corresponding to each identified container number into the corresponding position nodes of the layout table. If a single identified container number matches two or more best-paired system container numbers, all matching system container numbers are filled into their respective yard row and column position nodes. The resulting system container number position layout table achieves precise binding between the identified container number, the best-paired system container number, and the actual stacking row and column positions in the port yard. It fully presents the actual row and column arrangement of each best-paired system container number in the yard, providing a layout reference at the actual location level of the yard for subsequent traversal comparison and calculation of overlapping position points using the position matching template.

[0077] Step S40403: Use the location matching template to traverse the system box number location layout table to obtain a set of overlapping location points.

[0078] In this embodiment, using the constructed location matching template as a fixed structural reference, location matching calculation is performed within the effective row and column range of the system container number location layout table using a sliding traversal method. During the traversal, the two-dimensional row and column structure of the location matching template and the relative arrangement of its internal location nodes remain unchanged. Following a row-by-row, column-by-column translation rule, the template is slid sequentially to different target matching positions within the system container number location layout table. For each target position after the template's sliding, all location nodes in the template are precisely compared one by one with the corresponding location nodes in the system container number location layout table. Only location nodes in the template that correspond to the identified container number are counted, and those that match the location nodes in the layout table are included. The number of nodes that match the optimal system box number at the corresponding position is the number of overlapping position points corresponding to the template traversing at the target position. The correspondence between empty position nodes in the template and empty nodes in the layout table is not included in the point count. After the sliding traversal of all target matching positions within the effective range of the system box number position layout table is completed, the number of overlapping position points calculated in each traversal is fully collected. All point counts are structured and organized according to the traversal position order, and finally a set of overlapping position points containing all traversal matching results is formed. Each value in the set uniquely corresponds to a target traversal position of the position matching template in the system box number position layout table.

[0079] Step S40404: Extract the maximum number of overlapping positions from the set of overlapping positions to obtain the actual stacking position of the box number corresponding to the maximum number of overlapping positions.

[0080] In this embodiment, a full numerical search is first performed on the generated set of overlapping position points to extract the maximum number of overlapping position points. Simultaneously, all target traversal positions corresponding to this maximum value in the system container number location layout table are precisely located. Based on these target traversal positions, the actual storage location information of the port yard bound to the system container number location layout table is associated. The location data of the shell area and shell position stored in the TOS system are extracted, along with auxiliary location information such as row number and column number. This set of standardized yard location data containing shell areas and shell positions is the actual stacking location of the container number. If multiple target traversal positions correspond to the same maximum number of overlapping position points, the first matching position is directly selected as the final actual stacking location of the container number, ensuring the uniqueness of the location determination. The final actual stacking location of the container number is the standardized storage location information registered in the port / terminal operating system TOS, precisely corresponding to the actual storage area and tag number of the yard, providing a unique and accurate yard location benchmark for subsequent determination of the system-stored container number set.

[0081] Step S405: Determine the system storage box number set based on the actual stacking position of the box number and the system stacking data.

[0082] In this embodiment, the actual stacking location of the determined container number is used as the core location index (this index contains a complete set of yard storage location information, such as bay area, bay position, row number, column number, and layer number, as registered in the TOS system). Based on this location index, a precise location matching search is performed in the system stacking data to extract all yard storage records in the system stacking data that completely match the location index. The corresponding 11-digit standard system container number is then extracted from these valid records. The validity of the extracted system container numbers is verified, and invalid container number data that has been moved or cancelled is removed. All valid system container numbers are then structured and organized according to their actual stacking position (row, column, layer) in the yard. The final set of container numbers under the bay area and bay position is the system storage container number set, and each system container number in the set is bound to the corresponding yard storage position.

[0083] Step S406: Calculate the set of matching characters in the heap storage position based on the system storage box number set and the identification box number set.

[0084] In this embodiment, based on the precise storage location information of the actual stacking position of the determined container number, the system storage container number set and the identification container number set are precisely paired one-to-one according to the same storage location. This differs from the previous method of matching overall container numbers without positional constraints. Following the row, column, and layer numbering order of the storage locations under that bay area, a unique system storage container number and a unique identification container number are matched to each storage location, forming a container number pairing group indexed by the storage location. For each group of system storage container numbers and identification container numbers in the same storage location, the fixed character positions of the 11-digit standard container number are then used for pairing. By comparing each character, the number of characters in the same position that are completely identical in the two sets of container numbers is counted. This number is the character matching number corresponding to that storage position. Container numbers with high or even completely identical character matching numbers during the overall matching process may have a high probability of having a character matching number of 0 after being paired with the same storage position if there is a misplacement of storage position during actual loading and unloading. After calculating the character matching number of all storage position container number pairing groups, the character matching numbers corresponding to all storage positions are structured and collected in the order of storage position numbering, and finally a set of storage position character matching numbers that corresponds one-to-one with the storage positions in the yard is formed.

[0085] Step S407: The set of identification box numbers is modified using the system storage box number set and the set of heap storage character matching numbers to obtain an optimized set of identification box numbers.

[0086] The process of modifying the identification box number set using the system storage box number set and the heap storage bit character matching number set to obtain an optimized identification box number set specifically includes the following sub-steps: Step S40701: Set a matching number threshold and compare the matching number threshold with the elements in the set of matching numbers of heap characters.

[0087] In this embodiment, combining the container number encoding rules with the actual matching requirements of the port yard, the threshold for character matching in the storage positions is set to 3. Then, a full traversal of the set of character matching counts for each storage position is performed, and the character matching count for each storage position is precisely compared with the threshold 3. The comparison results for each storage position with a matching count greater than or equal to 3 and less than 3 are recorded. All comparison results are then structured and aggregated according to the storage position number order to form a storage position matching count comparison result table. This provides a clear basis for subsequent correction and identification of the container number set based on the comparison results. The reason for setting 3 as the threshold, and the extremely low probability of accidental mismatches under this condition, is that the 11-digit standard container number consists of 36 character classes: the digits 0-9 and 26 uppercase English letters. The probability of a single character being randomly and accidentally matched correctly is 1 / 36, and the probability of three consecutive characters being randomly and accidentally matched correctly is (1 / 36). 3The calculated probability is approximately 1 / 46656, which is already extremely low. Furthermore, the container numbers actually used in the port follow international coding standards, and their prefix codes, check codes, and other fields have fixed coding rules, rather than being completely random character combinations. This further reduces the possibility of random and accidental matching of 3 characters between different container numbers. In this scenario, container numbers are matched one by one in the stacking positions under the same bay area. The probability of multiple container numbers having a random 3-character match will decrease exponentially and become almost negligible. Therefore, a threshold of 3 can effectively avoid accidental mismatches.

[0088] Step S40702: Based on the comparison result, the identification box number set is modified using the system storage box number set to obtain an optimized identification box number set.

[0089] In this embodiment, based on the comparison results of the character matching count of each stacking position in the stacking position matching count comparison result table with the threshold 3, following the correction principle of prioritizing high confidence of the system storage container number, a targeted container number correction operation is carried out on the identification container number set in combination with the system storage container number set, thereby obtaining an optimized identification container number set; for stacking positions with a character matching count greater than or equal to 3, the original identification container number in the identification container number set under that stacking position is directly replaced with the corresponding system storage container number in the system storage container number set. Because the system container number in the port / terminal operating system TOS undergoes strict compliance verification during the entry and filing stage, the last digit of the 11-digit standard container number is a dedicated verification digit. For each storage location, the system verifies the validity of the container number using a verification algorithm. Only valid container numbers can be entered into the TOS system, with a confidence level far exceeding that of container numbers obtained through image recognition. This replacement effectively corrects character recognition errors in the container numbers. For storage locations with fewer than 3 matching characters, no container number replacement operation is performed, and the original container number under that storage location in the container number set is retained. After completing the correction judgment and operation for all storage locations, the container numbers under each storage location that have been replaced or retained as is are structurally collected and organized according to the bay area and bay position corresponding to the actual stacking location of the container number, and the storage location number order, ultimately forming an optimized set of container numbers that corresponds one-to-one with the actual stacking location in the storage yard.

[0090] Step S5: Determine abnormal events and generate decision suggestions based on the system storage box number set and the optimized identification box number set.

[0091] The process of determining abnormal events and generating decision suggestions based on the system storage box number set and the optimized identification box number set specifically includes the following sub-steps: Step S501: Compare the system storage container number set with the optimized identification container number set to obtain the abnormal container number set.

[0092] In this embodiment, using the bay area bay number and storage location number corresponding to the actual stacking position of the container number as a unique index, the system storage container number set and the optimized identification container number set are compared one by one with precise 11-character full comparison according to the same storage location. Since the optimized identification container number set has completed the replacement and correction of the high-confidence container numbers in the system, there are only two results for the system storage container number and the optimized identification container number under the same storage location: the characters are completely consistent, or the difference is so great that they can be directly determined as different container numbers without the need for additional fuzzy matching judgment. Based on this comparison rule, all container number groups with inconsistent comparison results under the two storage locations are screened out. The corresponding system storage container number and optimized identification container number in this type of container number group are uniformly collected. At the same time, each collected container number is bound to its corresponding yard storage location information. The final set containing inconsistent container numbers under all storage locations and their corresponding location information is the abnormal container number set.

[0093] It should be noted that when the abnormal set is empty, it indicates that there is no abnormality; when it is not empty, it indicates that an abnormality exists.

[0094] Step S502: Calculate the intersection of the abnormal container number set and the system storage box number set.

[0095] In this embodiment, the constraint of the storage location associated with the container number is discarded. Instead, a precise intersection operation is performed on the abnormal container number set and the system-stored container number set, focusing solely on the unique existence of the 11-digit standard container number. First, all container number elements in the abnormal container number set are fully traversed. Using the complete consistency of the 11 characters as the sole criterion, each container number is verified to exist as an independent and valid element in the system-stored container number set. This system-stored container number set is a legally valid set of container numbers registered with the TOS system, possessing the highest information confidence. Then, all container number elements verified as "existing" are structurally collected and organized, forming a standardized intersection result set according to the container number character order. The result of this intersection operation will serve as the core basis for distinguishing the types of abnormal events in the storage yard, providing precise container number data support for generating targeted decision-making suggestions for different abnormal scenarios.

[0096] Step S503: Generate decision suggestions based on the intersection.

[0097] The specific steps for generating decision suggestions based on the intersection are as follows: Step S50301: When it is determined that the intersection is a non-empty set, the system stacking data is corrected using the abnormal container number set.

[0098] In this embodiment, when the intersection is determined to be a non-empty set, it indicates that the anomaly detected in this identification is a misalignment of container stacking positions during the actual stacking process in the yard. There is no issue of incorrect entry of container numbers or misplacement of containers outside the shooting range into this stacking area (there are no errors in container transportation). Only targeted correction of the stacking position information in the system stacking data is needed. Based on the actual stacking position information of the container number corresponding to the container number in the abnormal container number set, combined with optimizing the one-to-one binding relationship between each container number in the identified container number set and the shell area and stacking position, the system stacking data management interface of the port / terminal operating system TOS is used to correct each container in the intersection. The system accurately retrieves the original storage location information of the container number from the stacking data and corrects it to the actual stacking location of the container number identified in this case, including the bay area, bay position, and storage location information. It also performs a coordinated correction on all misaligned container numbers in the abnormal container number set to ensure that the storage location updates for each container number are synchronized and conflict-free. After all location information corrections are completed, the TOS system automatically retains a full record of this correction, including the original storage location before correction, the new storage location after correction, the correction time, and the data source. This ensures that the correction operation of the system stacking data is traceable, enabling the corrected system stacking data to accurately match the actual container storage situation in the yard.

[0099] Step S50302: If the intersection is determined to be an empty set, a manual review is performed.

[0100] In this embodiment, when the intersection is determined to be an empty set, it indicates that the discovered yard anomaly is not a simple misalignment of container storage locations, but a serious anomaly involving incorrect entry of container numbers or containers outside the shooting range being mistakenly placed in this storage area. If such anomalies are not handled promptly, they can easily trigger a chain of management errors in subsequent storage planning, loading and unloading operations, and container handling. Therefore, a standardized manual review process must be initiated immediately. During the manual review phase, staff first combine the original visual information of the container numbers from the optimized container images with on-site verification of the actual container numbers at the abnormal storage locations. They then double-verify the original identified container numbers in the optimized identification set that have not been replaced by the system's container numbers to check for misidentification due to factors such as container number wear, image blurring, or identification algorithm deviation. If the verification confirms an identification error, the optimized identification is corrected promptly. The container number set is collected, and the abnormal container number set and other relevant comparison data are updated simultaneously. The anomaly determination process ends here. If the identification result is accurately verified by manual review, it indicates that the anomaly is a real problem in the actual yard operation and management. The anomaly tracing process must be initiated immediately to check the entire chain of information, including the abnormal container's entry registration record, gate verification data, loading and unloading operation logs, and stacking scheduling instructions, to clarify the specific cause and responsible link of the anomaly. At the same time, on-site personnel should be quickly arranged to transport the container corresponding to the abnormal container number to its compliant stacking location registered in the TOS system to complete the return of the abnormal container. All operation records of manual review, anomaly tracing, and container return must be entered into the port / terminal operating system TOS in real time for retention. This provides data reference for the prevention and control of similar anomalies in the future and ensures the traceability of the yard management process.

[0101] like Figure 2 As shown, in another aspect, the present invention also provides an auxiliary decision-making system based on abnormal event recognition, including: a processor, an input device, an output device, and a memory, wherein the processor, the input device, the output device, and the memory are interconnected, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the relevant steps of a relevant embodiment of the auxiliary decision-making method based on abnormal event recognition of the present invention.

[0102] This invention provides an auxiliary decision-making system based on abnormal event recognition. The functional components can be integrated into a single processing unit, or each component can exist physically separately, or two or more components can be integrated into one unit. The integrated components can be implemented in hardware or as software functions.

[0103] 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 the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be covered within the scope of the claims and specification of the present invention.

Claims

1. A decision support method based on abnormal event identification, characterized in that, The method includes: Constructing a container number recognition model, and constructing a score prediction model based on the container number recognition model, including: Obtain sample images, sample shooting parameters, and sample actual box numbers; Based on the sample image, the confidence level of the sample box number and sample character is calculated using the box number recognition model. The sample score of the sample image is calculated based on the sample character confidence score, the sample bin number, and the sample real bin number; A score prediction model is constructed using the sample score, the sample image, and the sample shooting parameters; Acquire initial container images of the target area, and obtain optimized container images based on the initial container images and the score prediction model; Based on the optimized container image, the container number recognition model is used to identify the container number and obtain a set of identified container numbers; Obtain system stack data, and based on the system stack data and the set of identification box numbers, obtain a system storage box number set and an optimized set of identification box numbers; Abnormal events are identified and decision suggestions are generated based on the system storage box number set and the optimized identification box number set.

2. The auxiliary decision-making method based on abnormal event identification according to claim 1, characterized in that, The construction of the box number recognition model includes: The basic loss function is constructed based on character-level cross-entropy loss; Obtain the expected number of matches threshold, and construct a character match count penalty term based on the expected number of matches threshold; An optimized loss function is constructed based on the basic loss function and the character matching number penalty term; A box number recognition model is constructed based on the optimized loss function.

3. The auxiliary decision-making method based on abnormal event identification according to claim 1, characterized in that, The calculation of the sample score for the sample image based on the sample character confidence level, the sample bin number, and the sample true bin number includes: The correct identification character for the sample box number is determined based on the actual box number of the sample. The comprehensive confidence score of each sample box number in the sample image is calculated based on the correctly identified character and the confidence score of the sample character to obtain a comprehensive confidence score set. The minimum value is extracted from the comprehensive confidence set to obtain the sample score of the sample image.

4. The auxiliary decision-making method based on abnormal event identification according to claim 1, characterized in that, The step of obtaining the system storage box number set and the optimized identification box number set based on the system stacking data and the identification box number set includes: Obtain the first row and column relationship between the identification box numbers in the set of identification box numbers; Calculate the maximum number of character matches for each of the identified box numbers and each of the system box numbers in the system stack data; Based on the maximum number of character matches, the best pairing for each of the identified box numbers is determined in the system stack data to form an initial system matching box number set; The actual stacking position of the boxes is determined based on the initial system matching box number set and the first row-column relationship; The system storage box number set is determined based on the actual stacking position of the box number and the system stacking data; Calculate the set of matching characters in the heap storage position based on the system storage box number set and the identification box number set; The set of identification box numbers is modified using the system storage box number set and the set of matching characters in the heap storage position to obtain an optimized set of identification box numbers.

5. The auxiliary decision-making method based on abnormal event identification according to claim 4, characterized in that, The step of determining the actual stacking position of the box number based on the initial system matching box number set and the first row-column relationship includes: A position matching template is constructed based on the first row-column relationship; A system container number location layout table is constructed based on the initial system matching container number set; The system box number location layout table is traversed using the location matching template to obtain a set of overlapping location points; Extract the maximum number of overlapping positions from the set of overlapping positions to obtain the actual stacking position of the box number corresponding to the maximum number of overlapping positions.

6. The auxiliary decision-making method based on abnormal event identification according to claim 4, characterized in that, The step of modifying the identification box number set using the system storage box number set and the heap bit character matching number set to obtain an optimized identification box number set includes: Set a matching number threshold and compare the matching number threshold with the elements in the set of matching numbers of heap characters; Based on the comparison results, the set of identification box numbers is modified using the system storage box number set to obtain an optimized set of identification box numbers.

7. The auxiliary decision-making method based on abnormal event identification according to claim 1, characterized in that, The step of determining abnormal events and generating decision suggestions based on the system storage box number set and the optimized identification box number set includes: The abnormal container number set is obtained by comparing the system storage container number set with the optimized identification container number set; Calculate the intersection of the set of abnormal container numbers and the set of system storage box numbers; Decision suggestions are generated based on the intersection.

8. The auxiliary decision-making method based on abnormal event identification according to claim 7, characterized in that, The step of generating decision suggestions based on the intersection includes: When the intersection is determined to be a non-empty set, the system stacking data is corrected using the set of abnormal container numbers; If the intersection is determined to be an empty set, a manual review is performed.

9. A decision support system based on abnormal event recognition, characterized in that, include: The system includes a processor, an input device, an output device, and a memory, all interconnected. The memory stores a computer program, which includes program instructions. The processor is configured to invoke the program instructions to execute an auxiliary decision-making method based on anomaly event recognition as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Dynamic container number identification method and system based on container yard and medium

    CN115457562A

  • Intelligent camera system based on image processing algorithm and optimization method

    CN119888630A

  • Deep learning-based operation container information identification method and system

    CN121170826A