Attribute identification method and device of transported article, electronic equipment and storage medium
Through the classification model and multi-embedding model combined with large language model, dynamic data enhancement and reordering algorithm, the problem of low accuracy in the identification of dangerous goods in the existing technology is solved, and intelligent identification and timely response to dangerous goods is achieved.
Patent Information
- Application Number
- CN202510306646.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-14
- Publication Date
- 2025-07-25
AI Technical Summary
In the prior art, the method of identifying dangerous goods based on preset rules has low recognition accuracy and it is difficult to effectively deal with fuzzy input information and new types of dangerous goods.
The classification model is used to classify item names, combine multi-embedding models and large language models for semantic feature extraction and fusion, and optimize the identification process through dynamic data augmentation and reordering algorithms to generate standard product names and dangerous attributes.
It improves the accuracy and efficiency of hazardous goods identification, can promptly identify emerging hazardous goods, and ensures safety and compliance operations in air transportation.
Smart Images

Figure CN120372373A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence or other related technical fields. Specifically, it relates to a method and device for identifying the attributes of transported items, an electronic device, and a storage medium. Background Art
[0002] The identification of dangerous goods names plays a crucial role in civil aviation transportation safety. Accurately identifying the attributes of dangerous goods is the key to ensuring aviation safety, avoiding potential risks during transportation, and effective sorting and handling. Incorrect attribute identification may lead to the misclassification of dangerous goods, not only threatening the safety of air transportation but also potentially violating transportation regulations, resulting in legal and economic losses. Therefore, constructing an efficient, accurate, and intelligent mechanism for identifying dangerous goods names is one of the core challenges faced by the civil aviation transportation industry.
[0003] In related technologies, in the field of air logistics, the identification and classification of dangerous goods names rely on predefined name rules and databases, and keyword matching is used for identification. This identification method usually requires manual maintenance of a large database containing various dangerous goods categories and their characteristics. Although this method can meet basic needs to a certain extent, due to the lack of intelligent data processing capabilities, its ability to quickly identify and respond to fuzzy input information and new types of dangerous goods is very limited, resulting in problems of low identification accuracy and efficiency, and it is difficult to meet the requirements of the current rapid development of information.
[0004] In view of the above problems, no effective solution has been proposed yet. Summary of the Invention
[0005] Embodiments of the present invention provide a method and device for identifying the attributes of transported items, an electronic device, and a storage medium, so as to at least solve the technical problem of low identification accuracy in the related art of identifying dangerous goods based on preset rules.
[0006] According to one aspect of the embodiments of the present invention, a method for identifying the attributes of transported items is provided, including: receiving an attribute identification request sent by a user terminal, and parsing the attribute identification request to obtain the item name of the item to be identified, where the attribute identification request is used to request the identification of the standard product name and hazard attributes of the transported item, the standard product name is used to indicate the term name of the hazardous item, and the hazard attribute is used to indicate whether the transported item is a hazardous item; inputting the item name of the item to be identified into a classification model, and outputting the category name of the item to be identified; selecting K embedding models based on the item name and the category name, and inputting the item name and the category name into each of the embedding models respectively, and outputting a set of candidate product names of the item to be identified, where K is a positive integer, the embedding model is a pre-constructed model for retrieving product names, and the set of candidate product names is obtained by fusing the output results of the K embedding models; inputting the item name and the set of candidate product names into a large language model, outputting the standard product name and hazard attributes of the item to be identified, and obtaining the attribute identification result of the item to be identified based on the standard product name and the hazard attributes.
[0007] Further, the step of inputting the item name and the category name into each of the embedding models respectively and outputting a set of candidate product names of the item to be identified includes: inputting the item name and the category name into each of the embedding models respectively, extracting semantic features in the item name and the category name through the embedding model to obtain semantic feature vectors; based on the semantic feature vectors, retrieving a vector database through the embedding model to obtain product name retrieval entries; calculating the similarity between the initial candidate product names in the product name retrieval entries and the item name through the embedding model, and screening the product name retrieval entries based on the similarity to obtain a set of initial candidate product names output by each of the embedding models; performing a fusion calculation on the set of initial candidate product names output by each of the embedding models through a fusion algorithm, and outputting a set of candidate product names of the item to be identified.
[0008] Further, after screening the product name retrieval entries based on the similarity to obtain a set of initial candidate product names output by each of the embedding models, it further includes: inputting the set of initial candidate product names output by each of the embedding models into a re-ranking model, and calculating the matching degree between each of the initial candidate product names in the set of initial candidate product names and the item name through the re-ranking model; re-screening the set of initial candidate product names based on the matching degree, and re-ranking the screened set of initial candidate product names to obtain a re-ranked set of initial candidate product names.
[0009] Further, before receiving the attribute recognition request sent by the user terminal, it further includes: collecting a list of item names, scanning the list of item names, and identifying new standard item names; inputting the new standard item names into a pre-trained expansion model to output an expansion item name set, where the expansion model is a pre-trained language model for semantic analysis and expansion; storing the new standard item names and the expansion item names in the expansion item name set in a vector database.
[0010] Further, the step of storing the new standard item names and the expansion item names in the expansion item name set in the vector database further includes: encoding the new standard item names and the expansion item names to obtain standard item name vectors and expansion item name vectors; establishing a mapping relationship between the standard item name vectors and the expansion item name vectors; storing the standard item name vectors, the expansion item name vectors, and the mapping relationship between the standard item name vectors and the expansion item name vectors in the vector database.
[0011] Further, after outputting the candidate item name set of the item to be recognized, it further includes: in the case where the candidate item name set is an empty set, determining that the item to be recognized does not belong to a dangerous item; generating an identification result for the item to be recognized that does not belong to a dangerous item, and returning the identification result to the user terminal.
[0012] Further, the step of obtaining the attribute recognition result of the item to be recognized based on the standard item name and the dangerous attribute includes: retrieving a relational database based on the standard item name to obtain a handling guide for the item to be recognized, where the handling guide includes at least one of the following: packaging regulation information, transportation restriction information; generating the attribute recognition result based on the standard item name, the dangerous attribute, and the handling guide.
[0013] According to another aspect of the embodiments of the present invention, there is also provided an attribute recognition device for transporting items, including: a receiving unit, configured to receive an attribute recognition request sent by a user terminal, and parse the attribute recognition request to obtain the item name of the item to be recognized, wherein the attribute recognition request is used to request the recognition of the standard item name and the dangerous attribute of the transported item, the standard item name is used to indicate the term name of the dangerous item, and the dangerous attribute is used to indicate whether the transported item is a dangerous item; a first output unit, configured to input the item name of the item to be recognized into a classification model and output the category name of the item to be recognized; a second output unit, configured to select K embedding models based on the item name and the category name, and input the item name and the category name into each of the embedding models respectively, and output a candidate item name set of the item to be recognized, where K is a positive integer, the embedding model is a pre-constructed model for retrieving item names, and the candidate item name set is obtained by fusing the output results of the K embedding models; a third output unit, configured to input the item name and the candidate item name set into a large language model, output the standard item name and the dangerous attribute of the item to be recognized, and obtain the attribute recognition result of the item to be recognized based on the standard item name and the dangerous attribute.
[0014] Further, the second output unit includes: a first extraction module, configured to input the item name and the category name into each of the embedding models respectively, extract semantic features in the item name and the category name through the embedding model, and obtain semantic feature vectors; a first retrieval module, configured to retrieve a vector database through the embedding model based on the semantic feature vectors to obtain item name retrieval entries; a first screening module, configured to calculate the similarity between the initial candidate item names in the item name retrieval entries and the item name through the embedding model, and screen the item name retrieval entries based on the similarity to obtain an initial candidate item name set output by each of the embedding models; a first output module, configured to perform a fusion calculation on the initial candidate item name sets output by each of the embedding models through a fusion algorithm, and output the candidate item name set of the item to be recognized.
[0015] Further, the attribute recognition device for transporting items further includes: a first calculation module, configured to input the initial candidate item name sets output by each of the embedding models into a re-ranking model, and calculate the matching degree between each of the initial candidate item names in the initial candidate item name sets and the item name through the re-ranking model; a second screening module, configured to perform a secondary screening on the initial candidate item name sets based on the matching degree, and re-rank the screened initial candidate item name sets to obtain a re-ranked initial candidate item name set.
[0016] Furthermore, the attribute recognition device for the transported item further includes: a first scanning module, configured to collect a list of item names, scan the list of item names, and recognize newly added standard item names; a second output module, configured to input the newly added standard item names into a pre-trained expansion model and output an expansion item name set, where the expansion model is a pre-trained language model for semantic analysis and expansion; a first storage module, configured to store the newly added standard item names and the expansion item names in the expansion item name set in a vector database.
[0017] Furthermore, the first storage module includes: a first encoding sub-module, configured to encode the newly added standard item names and the expansion item names to obtain standard item name vectors and expansion item name vectors; a first establishment sub-module, configured to establish a mapping relationship between the standard item name vectors and the expansion item name vectors; a first storage sub-module, configured to store the standard item name vectors, the expansion item name vectors, and the mapping relationship between the standard item name vectors and the expansion item name vectors in the vector database.
[0018] Furthermore, the attribute recognition device for the transported item further includes: a first determination module, configured to determine that the item to be recognized does not belong to a dangerous item when the candidate item name set is an empty set; a first generation module, configured to generate a recognition result for the item to be recognized that does not belong to a dangerous item and return the recognition result to the client.
[0019] Optionally, the output unit includes: a first acquisition module, configured to retrieve a processing guide for the item to be recognized from a relational database based on the standard item name, where the processing guide includes at least one of the following: packaging regulation information, transportation restriction information; a second generation module, configured to generate the attribute recognition result based on the standard item name, the dangerous attribute, and the processing guide.
[0020] According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, where the computer-readable storage medium includes a stored computer program, and when the computer program runs, it controls the device where the computer-readable storage medium is located to execute any one of the above attribute recognition methods for transported items.
[0021] According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including one or more processors and a memory, where the memory is used to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement any one of the above attribute recognition methods for transported items.
[0022] In this application, through the following steps: receiving an attribute recognition request sent by a client, parsing the attribute recognition request to obtain the item name of the item to be recognized, where the attribute recognition request is used to request the recognition of the standard item name and dangerous attributes of the transported item, the standard item name is used to indicate the term name of the dangerous item, and the dangerous attribute is used to indicate whether the transported item is a dangerous item. Then, inputting the item name of the item to be recognized into a classification model, outputting the category name of the item to be recognized, and based on the item name and the category name, selecting K embedding models, and inputting the item name and the category name into each embedding model respectively, outputting a set of candidate item names of the item to be recognized, where K is a positive integer, and the embedding model is a pre-constructed model for retrieving item names, and the set of candidate item names is obtained by fusing the output results of the K embedding models. Finally, inputting the item name and the set of candidate item names into a large language model, outputting the standard item name and the dangerous attributes of the item to be recognized, and obtaining the attribute recognition result of the item to be recognized based on the standard item name and the dangerous attributes.
[0023] In this application, for the attribute recognition request sent by the client, the item to be recognized for transportation is determined. The item to be recognized for transportation is classified through a classification model. At the same time, according to the classification result, a suitable multi-embedding model is selected. Based on the independent retrieval paths and fusion mechanisms of each embedding model, accurate semantic recognition and vector matching are achieved. Finally, through in-depth analysis based on a large language model, the standard item name and the dangerous attributes of the item to be recognized for transportation are output, achieving the purpose of intelligent recognition of dangerous transported items, obtaining the technical effect of improving the accuracy of the recognition result of dangerous goods, and further solving the technical problem of low recognition accuracy in the related technology of identifying dangerous items based on preset rules. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The illustrative embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0025] Figure 1 is a flowchart of an optional method for recognizing the attributes of a transported item according to an embodiment of the present invention;
[0026] Figure 2 is an architecture diagram of an optional system for recognizing the attributes of a transported item according to an embodiment of the present invention;
[0027] Figure 3 is a flowchart of an optional method for retrieving a standard item name according to an embodiment of the present invention;
[0028] Figure 4 is a flowchart of an optional method for deleting a standard item name according to an embodiment of the present invention;
[0029] Figure 5 It is a flowchart of an optional method for updating the standard product name according to an embodiment of the present invention;
[0030] Figure 6 It is a schematic diagram of an optional attribute recognition device for transported items according to an embodiment of the present invention;
[0031] Figure 7 It is a hardware structure block diagram of an electronic device (or mobile device) for performing the method for recognizing the attributes of transported items according to an embodiment of the present invention. Detailed implementation manners
[0032] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0033] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order different from those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily need to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0034] It should be noted that the method and device for recognizing the attributes of transported items in the present application can be used in the field of artificial intelligence when recognizing the attributes of transported items based on artificial intelligence, and can also be used in any field other than the field of artificial intelligence when recognizing the attributes of transported items based on artificial intelligence. The application fields of the method and device for recognizing the attributes of transported items in the present application are not limited.
[0035] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are information and data that have been authorized by the user or fully authorized by all parties. Moreover, the processing of relevant data, such as collection, storage, use, processing, transmission, provision, disclosure, and application, complies with the relevant laws, regulations, and standards of the relevant regions, takes necessary confidentiality measures, does not violate public order and good customs, and provides corresponding operation entrances for users to choose to authorize or refuse. For example, there is an interface between this system and relevant users or institutions. Before obtaining relevant information, a request for acquisition needs to be sent to the aforementioned users or institutions through the interface, and relevant information can be obtained after receiving the consent information feedback from the aforementioned users or institutions.
[0036] It should be noted that when collecting and analyzing customer information in this application, corresponding operation entrances are provided for users to choose to agree or refuse the results of automated decision-making; if the user chooses to refuse, the expert decision-making process will be entered.
[0037] The following embodiments of the present invention can be applied to various attribute recognition systems / applications / devices for transporting items. By integrating dynamic data augmentation, cargo name classification, multi-embedding model fusion mechanism, hybrid retrieval architecture, and intelligent re-ranking algorithm, the present invention significantly improves the efficiency and accuracy of dangerous goods recognition. First, dynamic data augmentation improves the recognition accuracy of newly emerging or variant product names and reduces the need for manual intervention. Second, the application of cargo name classification and domain-specific models ensures the accurate processing of complex professional information and avoids the limitations of general models. In addition, the multi-embedding model fusion and hybrid retrieval architecture combine the speed of full-text retrieval and the in-depth understanding of semantic retrieval, effectively handle fuzzy queries, and improve the relevance and accuracy of search results. The intelligent re-ranking algorithm further optimizes the user experience and ensures that the results most in line with the requirements are displayed first.
[0038] The present invention will be described in detail below in conjunction with each embodiment.
[0039] Embodiment 1
[0040] According to an embodiment of the present invention, an embodiment of a method for identifying the attributes of transported items is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0041] Figure 1 is a flowchart of an optional method for identifying the attributes of transported items according to an embodiment of the present invention, as Figure 1 shown, the method includes the following steps:
[0042] Step S101: Receive the attribute recognition request sent by the client, and parse the attribute recognition request to obtain the item name of the item to be recognized.
[0043] The implementation entity of the embodiment of the present invention is an attribute recognition system for transporting items, which is applicable to the name recognition of dangerous transported items in scenarios such as airport cargo stations, cargo security inspections, and cargo handling. This system can provide an external access interface to dock with the freight management systems of different airlines, allowing the freight management systems of different airlines to conduct data exchange and service requests. Through this interface, airlines can submit identification requests for transported items in a timely manner, and the system can quickly respond and return the identification results, thereby achieving efficient and accurate attribute recognition of transported items involved by different airlines.
[0044] In the above step S101, the attribute recognition request from the client is received through the external interface. The client can be the freight management system of an airline, the cargo station system, or the terminal of the security inspection department, etc. The attribute recognition request usually contains relevant information about the item to be recognized, and is used to request the recognition of the standard name and dangerous attributes of the input transported item. The standard name is used to indicate the term name of the dangerous item. What the client inputs may be a non-standard name. Through the retrieval and recognition functions of this system, the standard name of the item to be recognized can be output, so as to determine the dangerous attributes of the transported item, that is, whether the transported item to be recognized is a dangerous item, the dangerous level of the item, and the relevant handling guidelines. The recognition of the standard name ensures the accurate classification of items during transportation and handling, promotes compliance operations, and the judgment of dangerous attributes is directly related to aviation safety and is the key basis for determining whether an item can be transported and how to transport it safely.
[0045] Further, before receiving the attribute recognition request sent by the client, it further includes: collecting the item name list, scanning the item name list, and identifying the newly added standard names; inputting the newly added standard names into a pre-trained expansion model to output an expanded name set, where the expansion model is a pre-trained language model for semantic analysis and expansion; storing the newly added standard names and the expanded names in the expanded name set in a vector database.
[0046] The embodiment of the present invention regularly collects newly emerged item names and their relevant information through dynamic data augmentation technology, and generates more relevant variants based on the data generalization function of the large language model. These variants will be added to the vector database to improve the hit rate in subsequent retrieval processes.
[0047] Specifically, the system will regularly or as needed collect the updated list of item names from the latest dangerous goods transportation guidelines and regulations issued by professional cargo management organizations or departments to ensure timely access to newly emerged dangerous goods information and adapt to the changing transportation environment and regulatory requirements. After obtaining the list of item names, the system will scan the list to identify newly added or updated standard item names, usually achieved by comparing with the existing standard item name database in the system. The purpose is to incorporate these newly emerged item names into the system to cover a wider range of dangerous goods types and improve the comprehensiveness of identification.
[0048] Furthermore, for newly added transportation items, the standard item names corresponding to the standard items are input into a pre-trained expansion model. The expansion model is pre-trained based on a large language model and can perform semantic analysis on the standard item names, extract semantic features, and then expand the item names according to the semantic features of the standard item names to generate related expanded item names, obtaining an expanded item name set. For example, if the newly added standard item name is "lithium battery", variants such as "lithium-ion battery" and "rechargeable lithium battery" can be expanded based on the lithium battery. The item name variants in the expanded item name set may include translations in different languages, synonyms, abbreviations, or professional term variants in specific application scenarios, aiming to cover various expressions of the same item in different contexts. This is to increase the diversity of the system database and improve the hit rate during subsequent retrievals. Finally, the newly added standard item names and the item names in the expanded item name set will be converted into vector representations and stored in the vector database, while the relevant information corresponding to the standard item names will be stored in the relational database.
[0049] Furthermore, the step of storing the newly added standard item names and the expanded item names in the expanded item name set into the vector database also includes: encoding the newly added standard item names and expanded item names to obtain standard item name vectors and expanded item name vectors; establishing a mapping relationship between the standard item name vectors and the expanded item name vectors; and storing the standard item name vectors, the expanded item name vectors, and the mapping relationship between the standard item name vectors and the expanded item name vectors in the vector database.
[0050] In some embodiments, when the system identifies a newly added standard product name or an extended product name generated by the extended model, each product name will be encoded through a word embedding model and converted into a standard product name vector or an extended product name vector. The word embedding model can convert text information into a numerical vector of a fixed length, enabling the text information to be understood and processed by machine learning algorithms. After encoding, the system will establish a mapping relationship between the standard product name vector and the extended product name vector. This relationship is established by associating each extended product name vector with the corresponding standard product name vector. The establishment of the mapping relationship ensures that the extended product name vector can accurately reflect the semantic information of its corresponding standard product name. When the system retrieves the extended product name vector, it can trace back to the standard product name through the mapping relationship, thereby providing accurate recognition results. Finally, the system stores the standard product name vector, the extended product name vector, and the mapping relationship between the two in a vector database.
[0051] Through the above steps, the establishment of encoding and mapping relationships helps the system accurately understand the semantic information of product names, thereby providing more accurate results when identifying transported items, especially when dealing with synonyms or expression variants. The efficient retrieval ability of the vector database ensures that the system can quickly respond to users' recognition requests, and can maintain a high response speed and retrieval efficiency even when dealing with large-scale data sets. By dynamically generating extended product name vectors and storing them in the database, the system can continuously expand its recognition ability to cover more item descriptions and variants, ensuring the timely recognition and handling of updated or newly added dangerous goods.
[0052] Step S102: Input the item name of the item to be recognized into the classification model, and output the category name of the item to be recognized.
[0053] It should be noted that inputting the item name into the classification model to identify the type to which the transported item belongs can ensure that the embedding model is configured for in-depth analysis and retrieval based on the item type in the subsequent steps. The classification model is constructed based on deep learning technologies, such as network architectures like convolutional neural networks and long short-term memory networks, and is used to map the item name to a specific category label. Based on a pre-trained data set, the classification model can accurately map the input item product name to a specific category. For example, "sulfuric acid" will be classified as "corrosive substance", while "oxygen cylinder" will be classified as "compressed gas". According to the classification result, the system passes the corresponding category name to the subsequent multi-embedding model fusion mechanism. For items in professional fields, such as chemical items, an embedding model specifically trained for chemical data will be called for analysis to ensure the accuracy of the recognition results.
[0054] Step S103: Select K embedding models based on the item name and the category name, and input the item name and the category name into each embedding model respectively, and output a set of candidate product names of the item to be recognized.
[0055] In the above step S103, the item name is the specific name of the transportation item submitted by the user for requesting identification, and the category name is the category label output by the classification model, reflecting the possible dangerous attributes or characteristics of the item. A deep learning model is pre-constructed for semantic conversion of the item name and retrieval of similar item names. Each embedding model is customized and trained for a specific domain or feature to optimize its performance ability in that domain. Select the most relevant K embedding models according to the category name of the item to ensure the pertinence and efficiency of the subsequent retrieval process. In this way, the system can understand the item name from multiple perspectives, improve the coverage of the candidate item name set, output candidate item name entries based on each embedding model, and fuse them to obtain the candidate item name set. The parallel retrieval of multiple embedding models enables the system to capture the semantic features of the item name from different dimensions, and then generate a more comprehensive and accurate candidate item name set. This mechanism effectively improves the recall rate and accuracy of the retrieval.
[0056] Further, the step of inputting the item name and the category name into each embedding model and outputting the candidate item name set of the item to be identified includes: inputting the item name and the category name into each embedding model respectively, extracting the semantic features in the item name and the category name through the embedding model to obtain semantic feature vectors; based on the semantic feature vectors, retrieving the vector database through the embedding model to obtain item name retrieval entries; calculating the similarity between the initial candidate item names in the item name retrieval entries and the item name through the embedding model, and screening the item name retrieval entries based on the similarity to obtain the initial candidate item name set output by each embedding model; performing a fusion calculation on the initial candidate item name sets output by each embedding model through a fusion algorithm to output the candidate item name set of the item to be identified.
[0057] In some embodiments, inputting the item name and the category name into each embedding model may extract the semantic features in the item name and the category name through the embedding model, and convert the extracted semantic features into numerical vectors to obtain semantic feature vectors. Each embedding model is responsible for an independent retrieval path. After obtaining the semantic feature vectors of the transportation item to be identified, the vector database is retrieved through the semantic feature vectors, and the item name vectors related to the semantic feature vectors are screened out. All embedding models work in parallel, each outputting a retrieval result to obtain the item name retrieval entries.
[0058] Then, the results of the initial screening of each embedding model are further screened through similarity calculation. Specifically, calculate the similarity between each initial candidate product name in the product name retrieval entry and the item name, and screen the product name retrieval entry according to the similarity value, and select the candidate product names with larger similarity values to obtain the set of initial candidate product names. Finally, the sets of initial candidate product names of multiple embedding models are fused, and the fusion algorithm is used to perform fusion calculation on the sets of initial candidate product names output by each of the embedding models. The fusion calculation can be achieved according to the semantic feature similarity to obtain the set of candidate product names of the item to be recognized, and the high relevance and accuracy of the search results are ensured through similarity calculation and fusion calculation.
[0059] Further, after screening the product name retrieval entry based on similarity to obtain the set of initial candidate product names output by each embedding model, it further includes: inputting the set of initial candidate product names output by each embedding model into a re-ranking model, and calculating the matching degree between each initial candidate product name in the set of initial candidate product names and the item name through the re-ranking model; re-screening the set of initial candidate product names based on the matching degree and re-ranking the screened set of initial candidate product names to obtain the re-ranked set of initial candidate product names.
[0060] It should be noted that on the basis of the set of initial candidate product names, using a re-ranking model can improve the relevance of the retrieval results and user satisfaction. Specifically, after each embedding model completes the similarity calculation and screens out the preliminary candidate product names, the system takes these sets as inputs and sends them to the re-ranking model. The re-ranking model is a machine learning model that sorts multiple input product names and can adjust the order of candidate product names in the list based on multiple factors (such as matching degree, commonness of product names, specific attributes of items, etc.), and can also further screen the candidate product names, so that the most relevant and most likely product names can be ranked at the top and displayed to the user side to improve the user experience and the accuracy of the retrieval results.
[0061] In the reordering model, the initial candidate product names are sorted by calculating the matching degree between each initial candidate product name and the original product name. The calculation of the matching degree may be based on more complex semantic understanding, taking into account the context information of the product name, the category name, as well as the generality of the product name and its performance in specific scenarios. A deep neural network, a text matching algorithm, or a rule-based scoring mechanism can be used to quantify the consistency and relevance between each candidate product name and the product name. The calculation of the matching degree aims to more finely evaluate the relevance between each candidate product name and the product name, providing a basis for subsequent screening and sorting, ensuring that the optimization of the candidate product name set is not only based on simple similarity, but also takes into account deeper semantic matching and scenario adaptability. The initial candidate product name set is screened again according to the calculated matching degree, and the candidate product names with relatively low relevance (lower than the matching degree threshold) to the product name are removed. Subsequently, the screened set will be reordered to ensure that the product names with high matching degrees and better meeting the user's needs are displayed first.
[0062] Further, after outputting the candidate product name set of the item to be identified, it also includes: in the case where the candidate product name set is an empty set, determining that the item to be identified does not belong to a dangerous item; generating an identification result for the item to be identified that does not belong to a dangerous item, and returning the identification result to the client.
[0063] It should be noted that when the system completes the retrieval of all embedding models, the screening and reordering of the candidate product name set, but the final candidate product name set is an empty set, indicating that there is no standard product name of a dangerous item that matches the input product name, the system will automatically determine that the item does not belong to the existing dangerous item classification. For non-dangerous items, a relevant identification result is generated, which includes but is not limited to information such as the product name, identification status (safe / non-dangerous), and recommended handling method (such as the regular cargo handling process), and this identification result is directly returned to the client to provide the user with clear and timely feedback, informing the user of the attribute identification conclusion of the item, which is convenient for subsequent logistics arrangements and safety management.
[0064] Step S104, input the product name and the candidate product name set into the large language model, output the standard product name and dangerous attributes of the item to be identified, and obtain the attribute identification result of the item to be identified based on the standard product name and dangerous attributes.
[0065] Further, if the candidate product name set is not an empty set, the input original product name and the retrieved candidate product name set are input into a pre-constructed large language model, and the large language model will conduct in-depth analysis on each candidate product name based on the existing knowledge graph and context information to further judge the standard product name and dangerous attributes of the item to be identified.
[0066] In some embodiments, inside the large language model, through multiple layers of neural networks, in-depth understanding of the input encoded vectors is carried out. Specifically, it includes capturing the correlation between different parts of the input item name and the candidate item names through the attention mechanism layer. The neural network layer, through the attention mechanism and the feed-forward neural network, and in combination with the internal knowledge graph, conducts multi-angle and multi-dimensional understanding of the input information to capture more complex semantic relationships, while analyzing the correlation between the item name and the set of candidate item names in a specific context to ensure the accuracy of the recognition result. Through the processing of multiple layers of neural networks, the model can deeply analyze the item name and the set of candidate item names, and understand their potential meanings and complex relationships.
[0067] Further, the steps of obtaining the attribute recognition result of the item to be recognized based on the standard item name and the hazard attribute include: retrieving the relational database based on the standard item name to obtain the handling guide of the item to be recognized, where the handling guide includes at least one of the following: packaging regulation information, transportation restriction information; generating the attribute recognition result based on the standard item name, the hazard attribute, and the handling guide.
[0068] It should be noted that the relational database stores all the standard item names and their detailed handling guides in civil aviation transportation, including information such as packaging regulations and transportation restrictions, ensuring the structuring and easy query of the data. After determining the standard item name of the item to be recognized, using the standard item name as a keyword, extract the packaging regulation information, transportation restriction information, etc. associated with the standard item name in the relational database to obtain the handling guide of the item to be recognized. Combining the standard item name, the hazard attribute, and the handling guide information, the system will generate a detailed attribute recognition report, which includes a comprehensive description of the item to be recognized, the hazard attribute, and clear guidance on the packaging and transportation of the item. It is the final product of the system recognition process, ensuring that users can comprehensively understand the item attributes and handling requirements.
[0069] Through the above steps, receive the attribute recognition request sent by the user terminal, parse the attribute recognition request to obtain the item name of the item to be recognized. Among them, the attribute recognition request is used to request the recognition of the standard item name and the hazard attribute of the transported item. The standard item name is used to indicate the term name of the hazardous item, and the hazard attribute is used to indicate whether the transported item is a hazardous item. Then, input the item name of the item to be recognized into the classification model, output the category name of the item to be recognized, and select K embedding models based on the item name and the category name. Input the item name and the category name into each embedding model respectively, and output the set of candidate item names of the item to be recognized. Among them, K is a positive integer, and the embedding model is a pre-constructed model for retrieving item names. The set of candidate item names is obtained by fusing the output results of the K embedding models. Finally, input the item name and the set of candidate item names into the large language model, output the standard item name and the hazard attribute of the item to be recognized, and obtain the attribute recognition result of the item to be recognized based on the standard item name and the hazard attribute.
[0070] In this embodiment, the transportation item to be recognized is determined for the attribute recognition request sent by the user terminal. The transportation item to be recognized is classified through a classification model. At the same time, a suitable multi-embedding model is selected according to the classification result. Based on the independent retrieval paths and fusion mechanisms of each embedding model, accurate semantic recognition and vector matching are achieved. Finally, in-depth analysis is performed based on a large language model, and the standard name and dangerous attributes of the transportation item to be recognized are output, achieving the purpose of intelligently recognizing dangerous transportation items, obtaining the technical effect of improving the accuracy of dangerous goods recognition results, and further solving the technical problem of low recognition accuracy in the related art where dangerous goods are recognized based on preset rules.
[0071] The following will be described in detail in combination with another optional specific implementation manner.
[0072] Figure 2 is an optional architecture diagram of a transportation item attribute recognition system according to an embodiment of the present invention, as Figure 2 shown. The overall system architecture mainly consists of an external business system, an application layer, a data layer, and a model layer. The external business system is responsible for interacting with the outside world, such as airlines, cargo inspection departments, etc.; the application layer includes a standard name management module and a standard name matching module for processing transportation item information; the data layer includes a vector database and a relational database for storing and retrieving relevant information of transportation items; the model layer includes an embedding model, a re-ranking model, and a large language model for vectorizing item names, accurately ranking candidate names, and evaluating the final intended name. Specifically,
[0073] The external business system provides an interface to dock with the freight management systems of different airlines.
[0074] The application layer maintains the standard names of items through the standard name management module and performs retrieval and matching of item names using the standard name matching module.
[0075] The standard name management module will update the data in the vector database regularly or as needed. Automatically collect and scan the latest list of transportation item names, and identify new data that needs to be inserted. For each piece of new data, use a pre-trained language model to perform in-depth analysis and expansion on it, generating variants related to the standard name. For example, if the input is "lithium battery", the model may generate variants such as "lithium-ion battery" and "rechargeable lithium battery". Add these variants to the vector database and establish associations with the original data. To improve the hit rate of similar names during the retrieval process, enabling the system to more accurately identify dangerous goods and their related information.
[0076] The data layer is divided into a vector database and a relational database. The former is used to store the vector representations of item names (including standard item names and extended item names extended based on the standard item names), and the latter stores the detailed information of the items.
[0077] The model layer integrates an embedding model, a re-ranking model, and a large language model, supporting semantic understanding of item names, similarity calculation, and generation of recognition results. The model layer can call the databases in the data layer for retrieval and receive the results of database retrieval.
[0078] When identifying the attributes of an item, the standard item name and dangerous attributes of the item are mainly identified. After the user inputs the name of the item to be identified at the user end, it is first preliminarily screened through the standard item name matching module; the input item name is pre-extracted and identified using the embedding model, and the semantic features are converted into vector form, then the vector database is called for retrieval in the vector database; according to the retrieval results, the re-ranking model is used to adjust the order of candidate item names to ensure that the item name that best meets the user's needs is ranked first; finally, with the help of the large language model, in-depth analysis is carried out on each candidate item name to further determine the standard item name and dangerous attributes of the item to be identified, and the processing guidelines corresponding to the standard item name are obtained through the relational database.
[0079] Figure 3 It is an optional standard item name retrieval flowchart according to an embodiment of the present invention. As Figure 3 shown, the standard item name retrieval process includes:
[0080] Step S301, the user logs in to the external business system and accesses the attribute recognition system for transported items through the external business system.
[0081] Step S302, perform login authentication through the standard item name matching module.
[0082] Step S303, the standard item name matching module verifies the user account and returns a token (authentication token) to the external business system.
[0083] Step S304, the external business system sends a service call request to the standard item name matching module, inputting the item name.
[0084] The user or the system inputs the item name of the item to be identified, and this item name will be sent to the classification model for processing. Based on a pre-trained dataset, the classification model can accurately map the input cargo item name to a specific category. For example, "sulfuric acid" will be classified as "corrosive substance", while "oxygen cylinder" will be classified as "compressed gas". According to the classification result, the system passes the corresponding category name to the subsequent multi-embedding model fusion mechanism. For transported items in professional fields, such as chemical items, etc., an embedding model trained specifically for chemical data will be called for analysis and identification to ensure higher accuracy.
[0085] Step S305, authenticate the request through the standard product name matching module;
[0086] Step S306, if the verification is passed, the standard product name matching module retrieves and queries relevant vector data from the embedding model;
[0087] Select appropriate embedding models according to the item name and its category, and these models have been pre-customized and trained. Each embedding model is responsible for an independent retrieval path. When a user queries a certain item name, all embedding models work in parallel and output their respective retrieval results. Finally, the results output by each embedding model are fused using a fusion algorithm to form the final comprehensive result. This method not only improves the robustness of the system but also ensures that even if a certain model performs poorly, other models can provide effective supplementary support.
[0088] Step S307, the embedding model extracts semantic features and performs vector encoding to obtain semantic feature vectors, then calls the vector database to query the corresponding vector data;
[0089] Step S308, the vector database returns the result to obtain the initial candidate product name set;
[0090] Step S309, the embedding model returns the initial candidate product name set to the standard product name matching module;
[0091] After quickly filtering and preliminarily screening the item name input by the user through the word retrieval algorithm to find possible relevant entries, it is also possible to perform in-depth semantic understanding and similarity calculation on the preliminarily screened data to ensure the high relevance and accuracy of the search results.
[0092] Step S310, input the initial candidate product name set into the re-ranking model to re-rank the candidate product names in the initial candidate product name set;
[0093] The re-ranking model can consider more standard product names and in-depth understanding of the original item name, and screen out the product name that best meets the user's needs and rank it among many candidate product names. This process not only improves the accuracy of retrieval but also optimizes the user's search experience.
[0094] Step S311, the re-ranking model returns the re-ranked result to the standard product name matching module;
[0095] Step S312, input the query content and the re-ranked result to the large language model to obtain the final analysis result;
[0096] After classification, preliminary retrieval, and re-ranking are completed, the final candidate product names and related information are input into the large language model. Based on the existing knowledge graph and context information, the large language model will conduct in-depth analysis on each candidate product name, further determine the standard product name of the item to be recognized, and identify the dangerous attributes of the item to be recognized.
[0097] Step S313, the large language model returns the standard product name and attribute information of the item to be queried to the standard product name matching module;
[0098] Step S314, the standard product name matching module integrates the information and returns the attribute recognition result to the external business system.
[0099] Figure 4 It is a flowchart of an optional method for deleting standard product names according to an embodiment of the present invention. As Figure 4 shown, the process of deleting standard product names includes:
[0100] Step S401, the external business system sends a deletion request to the standard product name management module;
[0101] Step S402, the standard product name management module calls the relational database to delete the relevant information in the relational database;
[0102] Step S403, the relational database returns the deletion result to the standard product name management module;
[0103] Step S404, the standard product name management module passes data parameters to the vector database to delete the vector data corresponding to the item;
[0104] Step S405, the vector database returns the deletion result to the standard product name management module;
[0105] Step S406, the standard product name management module returns the final deletion result to the external business system.
[0106] Figure 5 It is a flowchart of an optional method for updating standard product names according to an embodiment of the present invention. As Figure 5 shown, the steps for updating standard product names include:
[0107] Step S501, the external business system sends an update request to the standard product name management module;
[0108] Step S502, the standard product name management module calls the relational database to update the relevant information in the relational database;
[0109] Step S503, the relational database returns the update result to the standard product name management module;
[0110] Step S504, the standard product name management module calls the vector database and deletes the old data in the vector database;
[0111] Step S505, the vector database returns the deletion result to the standard product name management module;
[0112] Step S506, the standard product name management module inputs the updated data into the word embedding model for data vectorization;
[0113] Step S507, the word embedding model stores the updated product name vectors in the vector database;
[0114] Step S508, the vector database returns the vector addition result to the standard product name management module;
[0115] Step S509, the standard product name management module returns the update result to the external business system.
[0116] In the embodiments of the present invention, by integrating dynamic data augmentation, cargo name classification, multi-embedding model fusion mechanism, hybrid retrieval architecture and intelligent re-ranking algorithm, the efficiency and accuracy of dangerous goods identification are significantly improved. First, dynamic data augmentation improves the recognition accuracy of newly emerging or variant product names and reduces the need for manual intervention. Second, the application of cargo name classification and domain-specific models ensures the accurate processing of complex professional information and avoids the limitations of general models. In addition, the multi-embedding model fusion and hybrid retrieval architecture combine the speed of full-text retrieval and the in-depth understanding of semantic retrieval, effectively handle fuzzy queries, and improve the relevance and accuracy of search results. The intelligent re-ranking algorithm further optimizes the user experience and ensures that the results most in line with the requirements are displayed first.
[0117] A detailed description will be given below in conjunction with another embodiment.
[0118] Embodiment 2
[0119] A device for identifying the attributes of transported items provided in this embodiment includes multiple implementation units, each implementation unit corresponding to each implementation step in Embodiment 1 above. Its specific implementation manner and beneficial effects can be referred to the foregoing method embodiments and will not be elaborated here.
[0120] Figure 6 is a schematic diagram of an optional device for identifying the attributes of transported items according to an embodiment of the present invention. As Figure 6 shown, the device for identifying the attributes of transported items may include: a receiving unit 61, a first output unit 62, a second output unit 63, and a third output unit 64, where
[0121] A receiving unit 61, configured to receive an attribute recognition request sent by a client, and parse the attribute recognition request to obtain the item name of the item to be recognized, where the attribute recognition request is used to request the recognition of the standard item name and the dangerous attribute of the transported item, the standard item name is used to indicate the term name of the dangerous item, and the dangerous attribute is used to indicate whether the transported item is a dangerous item;
[0122] A first output unit 62, configured to input the item name of the item to be recognized into a classification model and output the category name of the item to be recognized;
[0123] A second output unit 63, configured to select K embedding models based on the item name and the category name, input the item name and the category name into each embedding model respectively, and output a set of candidate item names of the item to be recognized, where K is a positive integer, the embedding model is a pre-constructed model for retrieving item names, and the set of candidate item names is obtained by fusing the output results of the K embedding models;
[0124] A third output unit 64, configured to input the item name and the set of candidate item names into a large language model, output the standard item name and the dangerous attribute of the item to be recognized, and obtain the attribute recognition result of the item to be recognized based on the standard item name and the dangerous attribute.
[0125] The above-mentioned attribute recognition device for transported items receives an attribute recognition request sent by a client through the receiving unit 61, and parses the attribute recognition request to obtain the item name of the item to be recognized, where the attribute recognition request is used to request the recognition of the standard item name and the dangerous attribute of the transported item, the standard item name is used to indicate the term name of the dangerous item, and the dangerous attribute is used to indicate whether the transported item is a dangerous item; inputs the item name of the item to be recognized into a classification model through the first output unit 62 and outputs the category name of the item to be recognized; selects K embedding models based on the item name and the category name through the second output unit 63, inputs the item name and the category name into each embedding model respectively, and outputs a set of candidate item names of the item to be recognized, where K is a positive integer, the embedding model is a pre-constructed model for retrieving item names, and the set of candidate item names is obtained by fusing the output results of the K embedding models; inputs the item name and the set of candidate item names into a large language model through the third output unit 64, outputs the standard item name and the dangerous attribute of the item to be recognized, and obtains the attribute recognition result of the item to be recognized based on the standard item name and the dangerous attribute.
[0126] In this embodiment, the transportation item to be recognized is determined for the attribute recognition request sent by the user terminal, and the transportation item to be recognized is classified by a classification model. At the same time, a suitable multi-embedding model is selected according to the classification result. Based on the independent retrieval paths and fusion mechanisms of each embedding model, accurate semantic recognition and vector matching are realized. Finally, in-depth analysis is performed based on a large language model, and the standard name and dangerous attributes of the transportation item to be recognized are output, achieving the purpose of intelligently recognizing dangerous transportation items, obtaining the technical effect of improving the accuracy of dangerous goods recognition results, and further solving the technical problem of low recognition accuracy in the related art of recognizing dangerous goods based on preset rules.
[0127] Further, the second output unit includes: a first extraction module, configured to input the item name and the category name into each embedding model respectively, and extract the semantic features in the item name and the category name through the embedding model to obtain semantic feature vectors; a first retrieval module, configured to retrieve a vector database through the embedding model based on the semantic feature vectors to obtain a product name retrieval entry; a first screening module, configured to calculate the similarity between the initial candidate product names in the product name retrieval entry and the item name through the embedding model, and screen the product name retrieval entry based on the similarity to obtain an initial candidate product name set output by each embedding model; a first output module, configured to perform fusion calculation on the initial candidate product name sets output by each embedding model through a fusion algorithm, and output a candidate product name set of the item to be recognized.
[0128] Further, the attribute recognition device for transportation items further includes: a first calculation module, configured to input the initial candidate product name sets output by each embedding model into a re-ranking model, and calculate the matching degree between each initial candidate product name in the initial candidate product name set and the item name through the re-ranking model; a second screening module, configured to perform secondary screening on the initial candidate product name set based on the matching degree, and re-rank the screened initial candidate product name set to obtain a re-ranked initial candidate product name set.
[0129] Further, the attribute recognition device for transportation items further includes: a first scanning module, configured to collect a list of item product names, and scan the list of item product names to identify newly added standard product names; a second output module, configured to input the newly added standard product names into a pre-trained expansion model, and output an expansion product name set, where the expansion model is a pre-trained language model for semantic analysis and expansion; a first storage module, configured to store the newly added standard product names and the expansion product names in the expansion product name set in a vector database.
[0130] Further, the first storage module includes: a first encoding sub-module, configured to encode the newly added standard product names and extended product names to obtain standard product name vectors and extended product name vectors; a first establishing sub-module, configured to establish a mapping relationship between the standard product name vectors and the extended product name vectors; and a first storage sub-module, configured to store the standard product name vectors, the extended product name vectors, and the mapping relationship between the standard product name vectors and the extended product name vectors in a vector database.
[0131] Further, the attribute recognition device for transported items further includes: a first determination module, configured to determine that the item to be recognized does not belong to dangerous goods when the candidate product name set is an empty set; and a first generation module, configured to generate a recognition result for the item to be recognized that does not belong to dangerous goods and return the recognition result to the client.
[0132] Optionally, the output unit includes: a first obtaining module, configured to retrieve a processing guide for the item to be recognized from a relational database based on the standard product name, where the processing guide includes at least one of the following: packaging regulation information and transportation restriction information; and a second generation module, configured to generate an attribute recognition result based on the standard product name, the dangerous attribute, and the processing guide.
[0133] The above-mentioned attribute recognition device for transported items may further include a processor and a memory. The above-mentioned receiving unit 61, the first output unit 62, the second output unit 63, the third output unit 64, etc. are all stored in the memory as program units, and the corresponding functions are implemented by the processor executing the above-mentioned program units stored in the memory.
[0134] The above-mentioned processor includes a kernel, and the kernel retrieves the corresponding program units from the memory. One or more kernels may be provided, and the kernel parameters are adjusted to identify dangerous transported items.
[0135] The above-mentioned memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of, for example, read-only memory (ROM) or flash RAM, and the memory includes at least one storage chip.
[0136] According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, where the computer-readable storage medium includes a stored computer program, and when the computer program runs, it controls the device where the computer-readable storage medium is located to execute any one of the above-mentioned attribute recognition methods for transported items.
[0137] According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including one or more processors and a memory, where the memory is used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors are caused to implement any one of the above-described attribute recognition methods for transported items.
[0138] According to another aspect of the embodiments of the present invention, there is also provided a computer program product. The computer program product includes a computer program, where when the computer program is executed by a processor, it implements any one of the above-described attribute recognition methods for transported items.
[0139] The present application also provides a computer program product, which when executed on a data processing device, is adapted to execute a program initialized with the following method steps: receiving an attribute recognition request sent by a user terminal, and parsing the attribute recognition request to obtain the item name of the item to be recognized, where the attribute recognition request is used to request the recognition of the standard product name and the dangerous attribute of the transported item, the standard product name is used to indicate the term name of the dangerous item, and the dangerous attribute is used to indicate whether the transported item is a dangerous item; inputting the item name of the item to be recognized into a classification model to output the category name of the item to be recognized; selecting K embedding models based on the item name and the category name, and respectively inputting the item name and the category name into each embedding model to output a set of candidate product names of the item to be recognized, where K is a positive integer, and the embedding model is a pre-constructed model for retrieving product names, and the set of candidate product names is obtained by fusing the output results of the K embedding models; inputting the item name and the set of candidate product names into a large language model to output the standard product name and the dangerous attribute of the item to be recognized, and obtaining the attribute recognition result of the item to be recognized based on the standard product name and the dangerous attribute.
[0140] The present application also provides a computer program product, which when executed on a data processing device, is further adapted to execute a program initialized with the following method steps: the step of respectively inputting the item name and the category name into each embedding model to output a set of candidate product names of the item to be recognized includes: respectively inputting the item name and the category name into each embedding model, extracting semantic features in the item name and the category name through the embedding model to obtain semantic feature vectors; based on the semantic feature vectors, retrieving a vector database through the embedding model to obtain product name retrieval entries; calculating the similarity between the initial candidate product names in the product name retrieval entries and the item name through the embedding model, and screening the product name retrieval entries based on the similarity to obtain the set of initial candidate product names output by each embedding model; performing a fusion calculation on the set of initial candidate product names output by each embedding model through a fusion algorithm to output the set of candidate product names of the item to be recognized.
[0141] The present application also provides a computer program product, which, when executed on a data processing device, is also adapted to execute a program initialized with the following method steps: After screening the product name retrieval entries based on similarity to obtain the initial candidate product name sets output by each embedding model, it further includes: inputting the initial candidate product name sets output by each embedding model into a re-ranking model, and calculating the matching degree between each initial candidate product name in the initial candidate product name sets and the item name through the re-ranking model; re-screening the initial candidate product name sets based on the matching degree and re-ranking the screened initial candidate product name sets to obtain the re-ranked initial candidate product name sets.
[0142] The present application also provides a computer program product, which, when executed on a data processing device, is also adapted to execute a program initialized with the following method steps: Before receiving the attribute recognition request sent by the user terminal, it further includes: collecting the product name list of items and scanning the product name list of items to identify the newly added standard product names; inputting the newly added standard product names into a pre-trained expansion model to output an expansion product name set, where the expansion model is a pre-trained language model for semantic analysis and expansion; storing the newly added standard product names and the expansion product names in the expansion product name set into a vector database.
[0143] The step of storing the newly added standard product names and the expansion product names in the expansion product name set into a vector database in the computer program product provided by the present application, when executed on a data processing device, and also adapted to execute a program initialized with the following method steps, further includes: encoding the newly added standard product names and the expansion product names to obtain standard product name vectors and expansion product name vectors; establishing a mapping relationship between the standard product name vectors and the expansion product name vectors; storing the standard product name vectors, the expansion product name vectors, and the mapping relationship between the standard product name vectors and the expansion product name vectors into the vector database.
[0144] The present application also provides a computer program product, which, when executed on a data processing device, is also adapted to execute a program initialized with the following method steps: After outputting the candidate product name set of the item to be recognized, it further includes: in the case where the candidate product name set is an empty set, determining that the item to be recognized does not belong to a dangerous item; generating an identification result for the item to be recognized that does not belong to a dangerous item and returning the identification result to the user terminal.
[0145] The step of obtaining the attribute recognition result of the item to be recognized based on the standard product name and the dangerous attribute in the computer program product provided by the present application, when executed on a data processing device, and also adapted to execute a program initialized with the following method steps, includes: retrieving the processing guide of the item to be recognized based on the standard product name from the relational database, where the processing guide includes at least one of the following: packaging regulation information, transportation restriction information; generating an attribute recognition result based on the standard product name, the dangerous attribute, and the processing guide.
[0146] Figure 7 is a hardware structure block diagram of an electronic device (or mobile device) that implements an attribute recognition method for transporting items according to an embodiment of the present invention. As Figure 7 shown, the electronic device may include one or more processors ( Figure 7 shown as 702a, 702b,..., 702n in , the processor may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), and a memory 704 for storing data. In addition, it may further include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a keyboard, a power supply, and / or a camera. Those of ordinary skill in the art can understand that Figure 7 the structure shown is only schematic and does not limit the structure of the above-mentioned electronic device. For example, the electronic device may further include more or fewer components than those Figure 7 shown in , or have a different configuration from that Figure 7 shown.
[0147] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0148] In the above embodiments of the present invention, the descriptions of the respective embodiments have their own emphases. For parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
[0149] In several embodiments provided by the present application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of the units can be a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the couplings or direct couplings or communication connections shown or discussed with each other can be through some interfaces, and the indirect couplings or communication connections of the units or modules can be electrical or other forms.
[0150] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0151] In addition, in each embodiment of the present invention, each functional unit can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0152] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention. The foregoing storage medium includes: various media such as USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks, or optical discs that can store program codes.
[0153] The above are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.
Claims
1. A method for identifying the attributes of transported items, characterized in that, Including: Receiving an attribute recognition request sent by a user terminal, parsing the attribute recognition request to obtain the item name of the item to be recognized, where the attribute recognition request is used to request the recognition of the standard product name and dangerous attributes of the transported item, the standard product name is used to indicate the term name of the dangerous item, and the dangerous attribute is used to indicate whether the transported item is a dangerous item; Inputting the item name of the item to be recognized into a classification model and outputting the category name of the item to be recognized; Selecting K embedding models based on the item name and the category name, and inputting the item name and the category name into each of the embedding models respectively, and outputting a set of candidate product names of the item to be recognized, where K is a positive integer, and the embedding model is a pre-constructed model for retrieving product names, and the set of candidate product names is obtained by fusing the output results of the K embedding models; Inputting the item name and the set of candidate product names into a large language model, outputting the standard product name and dangerous attributes of the item to be recognized, and obtaining the attribute recognition result of the item to be recognized based on the standard product name and the dangerous attributes.
2. The method according to claim 1, characterized in that The step of inputting the item name and the category name into each of the embedding models respectively and outputting a set of candidate product names of the item to be recognized includes: Inputting the item name and the category name into each of the embedding models respectively, and extracting semantic features in the item name and the category name through the embedding model to obtain semantic feature vectors; Based on the semantic feature vectors, retrieving a vector database through the embedding model to obtain product name retrieval entries; Calculating the similarity between the initial candidate product names in the product name retrieval entries and the item name through the embedding model, and screening the product name retrieval entries based on the similarity to obtain an initial set of candidate product names output by each of the embedding models; Performing a fusion calculation on the initial sets of candidate product names output by each of the embedding models through a fusion algorithm, and outputting a set of candidate product names of the item to be recognized.
3. The method according to claim 2, wherein After screening the product name retrieval entries based on the similarity to obtain an initial set of candidate product names output by each of the embedding models, it further includes: Inputting the initial sets of candidate product names output by each of the embedding models into a re-ranking model, and calculating the matching degree between each of the initial candidate product names in the initial set of candidate product names and the item name through the re-ranking model; Re-screening the initial set of candidate product names based on the matching degree, and re-ranking the screened initial set of candidate product names to obtain the re-ranked initial set of candidate product names.
4. The method according to claim 1, wherein Before receiving the attribute recognition request sent by the user terminal, it further includes: Collecting a list of item product names, scanning the list of item product names, and identifying new standard product names; Inputting the new standard product names into a pre-trained expansion model, and outputting a set of expanded product names, where the expansion model is a pre-trained language model for semantic analysis and expansion; Storing the new standard product names and the expanded product names in the set of expanded product names into a vector database.
5. The method according to claim 4, characterized in that, The step of storing the newly added standard product names and the extended product names in the extended product name set into the vector database further includes: Encoding the newly added standard product names and the extended product names to obtain a standard product name vector and an extended product name vector; Establishing a mapping relationship between the standard product name vector and the extended product name vector; Storing the standard product name vector, the extended product name vector, and the mapping relationship between the standard product name vector and the extended product name vector into the vector database.
6. The method according to claim 1, wherein After outputting the set of candidate product names of the item to be recognized, it further includes: When the set of candidate product names is an empty set, determining that the item to be recognized is not a dangerous item; Generating an identification result for the item to be recognized that is not a dangerous item and returning the identification result to the client.
7. The method according to claim 1, characterized in that, The step of obtaining the attribute identification result of the item to be recognized based on the standard product name and the dangerous attribute includes: Retrieving a relational database based on the standard product name to obtain a handling guide for the item to be recognized, where the handling guide includes at least one of the following: packaging regulation information, transportation restriction information; Generating the attribute identification result based on the standard product name, the dangerous attribute, and the handling guide.
8. An attribute recognition device for transporting articles, characterized in that It includes: A receiving unit, configured to receive an attribute identification request sent by a client and parse the attribute identification request to obtain the product name of the item to be recognized, where the attribute identification request is used to request the recognition of the standard product name and the dangerous attribute of the transported item, the standard product name is used to indicate the term name of the dangerous item, and the dangerous attribute is used to indicate whether the transported item is a dangerous item; A first output unit, configured to input the product name of the item to be recognized into a classification model and output the category name of the item to be recognized; A second output unit, configured to select K embedding models based on the product name and the category name, input the product name and the category name into each of the embedding models respectively, and output a set of candidate product names of the item to be recognized, where K is a positive integer, the embedding model is a pre-constructed model for retrieving product names, and the set of candidate product names is obtained by fusing the output results of the K embedding models; A third output unit, configured to input the product name and the set of candidate product names into a large language model, output the standard product name and the dangerous attribute of the item to be recognized, and obtain the attribute identification result of the item to be recognized based on the standard product name and the dangerous attribute.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, where when the computer program runs, it controls the device where the computer-readable storage medium is located to execute the attribute identification method of the transported item according to any one of claims 1 to 7.
10. An electronic device, characterized in that, It includes one or more processors and a memory, where the memory is used to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the attribute identification method of the transported item according to any one of claims 1 to 7.