Logistics knowledge graph generation method and device, equipment and storage medium
By classifying and labeling logistics documents in the logistics knowledge base, a logistics knowledge graph is established, which solves the problem of high time consumption when directly reading logistics documents and improves the efficiency and accuracy of logistics management knowledge extraction.
Patent Information
- Application Number
- CN202310273931.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-20
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2043-03-20
AI Technical Summary
In existing technologies, learning logistics management knowledge by directly reading a large number of logistics documents is time-consuming and costly, and cannot efficiently extract the required knowledge.
The logistics documents in the logistics knowledge base are classified, and logistics type information is labeled. Based on this information, a logistics knowledge graph is built, and neural network models are used to identify document types and relationships.
It saves time and costs associated with reading logistics documents, improves the efficiency and accuracy of extracting logistics management knowledge, and enables more intuitive knowledge filtering.
Smart Images

Figure CN116257639B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electronic information technology, and in particular to a method, apparatus, device, and storage medium for generating a logistics knowledge graph. Background Technology
[0002] With the rapid development of logistics technology, it is especially important for enterprises to learn about logistics management.
[0003] Currently, logistics management knowledge is mainly learned by manually reading a large number of logistics documents.
[0004] However, directly reading a large number of logistics documents is time-consuming and cannot extract the necessary logistics management knowledge from the massive amount of documents, resulting in low efficiency in extracting logistics management knowledge. Summary of the Invention
[0005] This invention provides a method, apparatus, equipment, and storage medium for generating a logistics knowledge graph, which saves time costs associated with reading logistics documents and improves the efficiency of extracting logistics management knowledge.
[0006] According to one aspect of the present invention, a method for generating a logistics knowledge graph is provided, comprising:
[0007] The logistics documents in the logistics knowledge base are classified to obtain logistics documents of at least one type, and the logistics document types are labeled with logistics type information.
[0008] A logistics knowledge graph is built based on logistics type information and various logistics documents.
[0009] According to another aspect of the present invention, a logistics knowledge graph generation apparatus is provided, comprising:
[0010] The logistics document classification module is used to classify various logistics documents in the logistics knowledge base, obtain logistics documents of at least one logistics document type, and label the logistics document types with logistics type information.
[0011] The logistics knowledge graph building module is used to build a logistics knowledge graph based on logistics type information and various logistics documents.
[0012] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0013] At least one processor; and
[0014] A memory communicatively connected to the at least one processor; wherein,
[0015] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the logistics knowledge graph generation method according to any embodiment of the present invention.
[0016] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the logistics knowledge graph generation method according to any embodiment of the present invention.
[0017] The technical solution of this invention classifies logistics documents in a logistics knowledge base to obtain logistics documents of at least one type, and labels the logistics document types with logistics type information. Based on the logistics type information and each logistics document, a logistics knowledge graph is established. This solves the problems of high time cost of directly reading a large number of logistics documents, inability to obtain the required logistics management knowledge from massive amounts of logistics documents, and low efficiency of logistics management knowledge extraction. It saves the time cost of reading logistics documents and improves the efficiency of logistics management knowledge extraction.
[0018] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart of a logistics knowledge graph generation method provided in Embodiment 1 of the present invention;
[0021] Figure 2 This is a flowchart of a logistics knowledge graph generation method provided in Embodiment 2 of the present invention;
[0022] Figure 3 This is a flowchart of a logistics knowledge graph generation method provided in Embodiment 2 of the present invention;
[0023] Figure 4 This is a diagram of the logistics knowledge graph platform architecture applicable to Embodiment 2 of the present invention;
[0024] Figure 5This is a schematic diagram of the structure of a logistics knowledge graph generation device according to Embodiment 3 of the present invention;
[0025] Figure 6 This is a schematic diagram of the structure of an electronic device that implements the logistics knowledge graph generation method of this invention. Detailed Implementation
[0026] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0028] Example 1
[0029] Figure 1 This is a flowchart illustrating a logistics knowledge graph generation method according to Embodiment 1 of the present invention. This embodiment of the invention is applicable to the generation of logistics knowledge graphs. The method can be executed by a logistics knowledge graph generation device, which can be implemented in hardware and / or software and can be configured in an electronic device that carries the function of generating logistics knowledge graphs.
[0030] See Figure 1 The logistics knowledge graph generation method shown includes:
[0031] S110. Classify the logistics documents in the logistics knowledge base to obtain logistics documents of at least one type, and label the logistics document types with logistics type information.
[0032] The logistics knowledge base is used to store logistics documents. These documents record logistics management knowledge, which may include logistics-related business and technical information. A logistics document type can be a classification result obtained after categorizing logistics documents. The same logistics document can belong to at least one logistics document type. The same logistics document type can include at least one logistics document. Logistics type information can include specific identification information for each logistics document type. For example, logistics type information can be keywords corresponding to each logistics document type.
[0033] Optionally, logistics documents in the logistics knowledge base can be classified by manual screening to obtain logistics documents of at least one type. The logistics type information corresponding to each logistics document type can be determined, and the logistics document type can be labeled with logistics type information.
[0034] Optionally, logistics documents from the logistics knowledge base can be input into a logistics document classification model. The model outputs logistics documents of at least one document type, determining the corresponding logistics type information and labeling the document types. This logistics document classification model can be used to classify logistics documents. Optionally, the model can include neural network models, logistic regression models, Naive Bayes models, decision tree models, support vector machine models, random forest models, or gradient boosting tree models, etc.
[0035] S120. Based on logistics type information and various logistics documents, establish a logistics knowledge graph.
[0036] A logistics knowledge graph can include information on various logistics types, the relationships between these types, and the logistics documents contained within each type. The relationships between different logistics types can include information on similar logistics types or logistics documents belonging to the same category.
[0037] Specifically, logistics type information can be defined as entities in a logistics knowledge graph. This can be achieved by inputting logistics type information and various logistics documents into a pre-trained logistics document type relationship recognition model. The model outputs the relationships between different logistics type information items. Based on these relationships, related logistics type information items are connected to generate the logistics knowledge graph. The logistics document type relationship recognition model is used to identify the relationships between different logistics type information items. Optionally, the logistics document type relationship recognition model can include neural network models, logistic regression models, Naive Bayes models, decision tree models, support vector machine models, random forest models, or gradient boosting tree models, etc.
[0038] The technical solution of this invention classifies logistics documents in a logistics knowledge base to obtain logistics documents of at least one type, and labels the logistics document types with logistics type information. Based on the logistics type information and each logistics document, a logistics knowledge graph is established. This solves the problems of high time cost from directly reading a large number of logistics documents and low efficiency in extracting the required logistics management knowledge from the massive amount of logistics documents. By using a logistics knowledge graph, the required logistics management knowledge can be filtered more intuitively, saving the time cost of reading logistics documents and improving the efficiency of logistics management knowledge extraction.
[0039] In an optional embodiment of the present invention, the logistics documents in the logistics knowledge base are classified to obtain logistics documents under at least one logistics document type, and the logistics document types are labeled with logistics type information. Specifically, this involves: obtaining logistics type information of at least one logistics document type input manually; inputting the logistics type information of each logistics document type and each logistics document into a type labeling information detection model to obtain the logistics document type to which each logistics document belongs, as output by the type labeling information detection model; the training samples of the type labeling information detection model include logistics documents under the logistics document type and standard logistics type information of the logistics document type; and labeling the logistics document type with the logistics type information corresponding to the logistics document type.
[0040] In this system, the "human" can be a user providing logistics type information for logistics documents. The human tool possesses certain logistics management knowledge. The accuracy of logistics type information input by the human is relatively high. The type labeling information detection model can be used to learn the logistics type information of at least one manually input logistics document type and classify each logistics document based on this information. Optionally, the type labeling information detection model can include neural network models, logistic regression models, Naive Bayes models, decision tree models, support vector machine models, random forest models, or gradient boosting tree models, etc. For example, the type labeling information detection model can include a Bi-LSTM (Bi-directional Long Short-Term Memory) model based on a neural network classification algorithm. The logistics document type can determine the classification result of the logistics document. There is a correspondence between the manually input logistics type information and the logistics document type. Based on the correspondence between the logistics type information and the logistics document type, the logistics type information of each classified logistics document type can be determined. Optionally, the standard logistics type information and the manually input logistics type information can differ in quantity, content, and correspondence with the logistics document type. This can be understood as follows: standard logistics type information is used to train the type labeling information detection model. Manually input logistics document type information is used to classify logistics documents.
[0041] Specifically, the training process for the type labeling information detection model is as follows: Logistics documents under the logistics document type, along with standard logistics type information for that type, are used as training samples. The standard logistics type information and each logistics sample are input into the untrained initial model. Based on the logistics documents under each logistics document type output by the initial model, the logistics document type to which each logistics document belongs is output. The initial model is then tuned until its output accuracy is greater than or equal to a preset accuracy threshold. At this point, the initial model is considered the successfully trained type labeling information detection model.
[0042] This solution obtains logistics type information for at least one manually input logistics document type. It then inputs this information, along with the logistics document itself, into a type labeling information detection model. The model outputs the logistics document type to which each document belongs. The corresponding logistics type information is then used to label the logistics document type. By combining the manually input logistics type information with the type labeling information detection model, the solution achieves classification of various logistics document types, further improving the efficiency and accuracy of classification. This, in turn, enhances the efficiency and accuracy of logistics knowledge graph generation.
[0043] In an optional embodiment of the present invention, before classifying the logistics documents in the logistics knowledge base, the method further includes: collecting publicly available logistics documents; obtaining internally related logistics documents; and adding the obtained logistics documents to the logistics knowledge base.
[0044] Publicly available logistics documents may include industry research reports related to logistics management knowledge, publicly available academic papers on logistics management knowledge, and policies related to logistics management knowledge. Internal logistics-related documents include research materials and findings related to logistics management knowledge within the enterprise.
[0045] Specifically, publicly available logistics documents can be collected using Python (web scraping) technology, as well as internal logistics-related documents, and then the collected logistics documents can be added to the logistics knowledge base.
[0046] This solution collects publicly available logistics documents and internally related logistics documents before classifying them in the logistics knowledge base. These acquired documents are then added to the knowledge base, further enriching its quantity and improving the comprehensiveness and accuracy of the generated logistics knowledge graph. Furthermore, establishing a logistics knowledge base accelerates the development of logistics management knowledge resources, facilitates rapid resource sharing, increases the speed of communication, and elevates the level of resource development and utilization of logistics management knowledge.
[0047] Example 2
[0048] Figure 2 This is a flowchart of a logistics knowledge graph generation method provided in Embodiment 2 of the present invention. Based on the above embodiments, this embodiment of the present invention specifies "classifying logistics documents in the logistics knowledge base" as "extracting corresponding logistics terms from each logistics document; classifying each logistics document according to the corresponding logistics terms," thereby improving the accuracy of logistics document classification, ensuring the relevance of each logistics document type, and further improving the accuracy of the logistics knowledge graph. It should be noted that parts not detailed in this embodiment of the present invention can be found in the descriptions of other embodiments.
[0049] See Figure 2 The logistics knowledge graph generation method shown includes:
[0050] S210. Extract the corresponding logistics terms from each logistics document.
[0051] Logistics terms can be words associated with logistics management knowledge. These terms can be extracted from logistics documents. Categorizing logistics documents based on the logistics terms extracted from them results in a stronger correlation between the resulting document types and the documents themselves.
[0052] Specifically, based on a pre-defined logistics terminology database, the system can search for logistics terms contained in each logistics document to determine the corresponding logistics terms for each document.
[0053] S220. Based on the logistics terms corresponding to each logistics document, classify each logistics document to obtain at least one type of logistics document, and label the logistics document type with logistics type information.
[0054] Optionally, the same logistics document type may include at least one logistics document. The same logistics document may also belong to at least one logistics document type.
[0055] Specifically, logistics documents containing the same logistics term can be grouped into the same logistics document type. Classifying these documents yields at least one logistics document type. Optionally, logistics terms can be directly used as logistics type information, and the logistics document types can be labeled with this information.
[0056] S230. Based on the logistics document type, logistics type information, and each logistics document, establish a logistics knowledge graph.
[0057] The technical solution of this invention extracts corresponding logistics terms from various logistics documents, classifies the logistics documents according to the corresponding logistics terms, obtains logistics documents of at least one type, and annotates the logistics document types with logistics type information. Based on the logistics document types, logistics type information, and each logistics document, a logistics knowledge graph is established. By extracting logistics terms from each logistics document and classifying the logistics documents according to the logistics terms that are more relevant to each logistics document, the accuracy of logistics document classification is improved, the relevance of each logistics document in the obtained logistics document types is guaranteed, and the accuracy of the logistics knowledge graph is further improved.
[0058] In an optional embodiment of the present invention, corresponding logistics terms are extracted from each logistics document, specifically: logistics text is obtained from the logistics document; the logistics text is segmented into words; and the segmentation results are filtered to obtain logistics terms.
[0059] Logistics text can be the text content information of logistics documents.
[0060] Specifically, text extraction tools can be used to extract logistics text from logistics documents, and word segmentation tools can be used to segment the logistics text. The segmentation results can be filtered according to a pre-defined logistics thesaurus to obtain the logistics terms present in the thesaurus. Text extraction tools can include Iconico HTML (Hyper Text Markup Language) text extractors (standard markup language text extractors) or web crawlers, etc. Word segmentation tools can include Jieba segmentation or Bi-LSTM (Bidirectional Short Word Memory Network) + CRF segmenter (Sequence Markup Segmenter), etc.
[0061] This solution extracts logistics text from logistics documents, segments the logistics text into words, and filters the segmentation results to obtain logistics terms. It comprehensively considers the textual content information of logistics documents, further improving the relevance between logistics terms and logistics text, increasing the accuracy of classifying logistics documents based on logistics terms, and thus improving the accuracy of the generated logistics knowledge graph.
[0062] In an optional embodiment of the present invention, the word segmentation results are filtered to obtain logistics terms, specifically: obtaining stop words; removing words associated with stop words from the word segmentation results to obtain logistics terms; and updating the stop words based on the word segmentation results.
[0063] Stop words can be words unrelated to logistics management knowledge. Optionally, stop words can include words without substantive content, such as modal particles, adverbs, prepositions, and conjunctions, as well as words that appear in various logistics documents but have no meaning for word segmentation. Stop words can be pre-stored in a stop word library or stop word list.
[0064] Specifically, stop words can be obtained from a stop word library or stop word list, words associated with stop words can be removed from the word segmentation results to obtain logistics terms, and the stop words can be updated based on the word segmentation results.
[0065] This solution obtains logistics terms by acquiring stop words and removing related words from the word segmentation results. By using stop words, the word segmentation results are filtered, reducing the dimensionality of logistics terms and improving the relevance between logistics terms and logistics documents. The stop words are updated based on the word segmentation results, further supplementing the stop words and ensuring their comprehensiveness and accuracy. This further improves the efficiency and accuracy of logistics term selection, thereby enhancing the efficiency and accuracy of generating a logistics knowledge graph.
[0066] In an optional embodiment of the present invention, the logistics documents are classified according to the logistics terms corresponding to each logistics document. Specifically, this is done by: processing the logistics terms corresponding to the logistics documents to obtain the word vectors corresponding to the logistics documents; and classifying the logistics documents according to the word vectors corresponding to each logistics document.
[0067] Specifically, word vector generation tools can be used to process logistics-related terms in logistics documents to obtain word vectors for each document. Clustering algorithms can then be used to cluster the word vectors of each logistics document, resulting in a cluster of at least one type of logistics document. Word vector generation tools can include Word2VEC or Glove (Global Vectors for Word Representation, a word representation tool based on global word frequency statistics). Clustering algorithms can include KMeans clustering or hierarchical clustering.
[0068] Optionally, a keyword generation algorithm can be used to filter keywords in the clustering results. From the word vectors of each logistics document within the same cluster, keywords for each logistics document in the same cluster can be determined as logistics type information. The keyword generation algorithm can include the LDA (Latent Dirichlet Allocation, document topic generation model) algorithm.
[0069] Optionally, a term frequency analysis algorithm can be used to analyze the term frequency of each clustering result. From the term vectors of each logistics document in the same clustering result, the logistics words with higher frequencies are identified as logistics type information. Specifically, the higher the term frequency of a logistics word, the stronger the correlation between that logistics word and each logistics document. The term frequency analysis algorithm can include the TF-IDF (Term Frequency-Inverse Document Frequency) algorithm.
[0070] This solution processes logistics terms corresponding to logistics documents to obtain word vectors for those documents. Based on these word vectors, each logistics document is categorized. This categorization using word vectors improves the accuracy of the logistics document classification and, consequently, the accuracy of the logistics knowledge graph.
[0071] Figure 3 This is a flowchart of a logistics knowledge graph generation method provided in Embodiment 2 of the present invention. Figure 4 This is a diagram of the logistics knowledge graph platform architecture applicable to Embodiment 2 of the present invention. See also... Figure 3 The logistics knowledge graph generation method shown includes:
[0072] S310. Construct a logistics knowledge base.
[0073] in, Figure 4 The knowledge base shown is the logistics knowledge base in this solution.
[0074] Specifically, web scraping can be used to obtain publicly available logistics documents related to logistics management knowledge, such as publicly available industry research reports, papers, and policies, as well as internal logistics documents related to logistics management knowledge, such as research materials and findings within enterprises. For example... Figure 4 As shown, a logistics knowledge base can be built using methods such as text import, text viewing, and text download.
[0075] S320. Construct a corpus.
[0076] Specifically, internal logistics-related terms and external logistics terminology can be collected to generate a pre-defined logistics thesaurus. Jieba segmentation can be used to segment the logistics text of each logistics document. Stop words can be removed from the segmentation results. Stop words include conjunctions in Chinese and words that are meaningless to the segmentation. Stop words can be determined based on an open-source stop word list. The stop word list can be updated based on the segmentation results. The Word2VEC tool can be used to convert logistics terms into word vectors, thus completing the process of building the corpus.
[0077] S330, Text Content Mining.
[0078] Optionally, the word vectors of each logistics document can be clustered using algorithms such as KMeans clustering or hierarchical clustering to obtain logistics documents of at least one logistics document type. Figure 3 The text content clustering shown Figure 4 The generated clustering results are shown. Optionally, the LDA algorithm can be used to calculate keywords from the clustering results to obtain logistics type information for each logistics document type. Figure 3 The text keywords shown are Figure 4 The generated text keywords are shown. Optionally, the TF-IDF algorithm can be applied to the clustering results to obtain logistics type information for each logistics document type, i.e. Figure 3 The unsupervised text classification shown and Figure 4 The generated target-free classification is shown.
[0079] Optionally, logistics type information for at least one logistics document type can be manually input. This information, along with the logistics document itself, is then fed into a type labeling information detection model to obtain the logistics document type to which each document belongs, as output by the model. That is... Figure 3Supervised text classification and Figure 4 The generated target text classification is shown.
[0080] S340, Construct a logistics knowledge graph.
[0081] Specifically, a logistics knowledge graph can be constructed based on logistics type information and various logistics documents. Figure 3 The knowledge graph construction shown is illustrated. The logistics knowledge graph is an example of this. Figure 3 The knowledge graph shown and Figure 4 The logistics management knowledge graph shown is shown below. (See also...) Figure 4 The diagram shows the architecture of a logistics knowledge graph platform. The logistics knowledge graph platform can be a B / S (Browser / Server) architecture. The webpage content can include a logistics management knowledge base module, a file import module, a knowledge graph results display module, and a knowledge graph results list module. The logistics management knowledge base module is used to manage the construction and updating of the logistics knowledge base. The file import module is used to import logistics documents. The knowledge graph results display module is used to display the generated knowledge graph. The knowledge graph results list module is used to display the generated knowledge graph in a list format. Optionally, the knowledge graph results display module and the knowledge graph results list module can be visualized using Citespace open-source software (a visualization and analysis software) based on Java technology. Citespace open-source software includes various commonly used configuration buttons, making it easy for users to adjust the display effects and results.
[0082] This solution improves the speed of reading and summarizing existing logistics documents by performing text mining and knowledge extraction, and conducting clustering, keyword extraction and classification analyses from the content and text dimensions. It avoids the subjective bias caused by human reading and reduces the time and money costs of seeking human interpretation.
[0083] Example 3
[0084] Figure 5 This is a schematic diagram of a logistics knowledge graph generation device provided in Embodiment 3 of the present invention. This embodiment of the present invention is applicable to the generation of logistics knowledge graphs. The device can execute a logistics knowledge graph generation method and can be implemented in hardware and / or software. The device can be configured in an electronic device that carries the function of generating logistics knowledge graphs.
[0085] See Figure 5The logistics knowledge graph generation device shown includes a logistics document classification module 510 and a logistics knowledge graph creation module 520. The logistics document classification module 510 is used to classify logistics documents in the logistics knowledge base to obtain logistics documents of at least one logistics document type, and to label the logistics document types with logistics type information. The logistics knowledge graph creation module 520 is used to create a logistics knowledge graph based on the logistics type information and each logistics document.
[0086] The technical solution of this invention classifies logistics documents in a logistics knowledge base to obtain logistics documents of at least one type, and labels the logistics document types with logistics type information. Based on the logistics type information and each logistics document, a logistics knowledge graph is established. This solves the problems of high time cost from directly reading a large number of logistics documents and low efficiency in extracting the required logistics management knowledge from the massive amount of logistics documents. By using a logistics knowledge graph, the required logistics management knowledge can be filtered more intuitively, saving the time cost of reading logistics documents and improving the efficiency of logistics management knowledge extraction.
[0087] In an optional embodiment of the present invention, the logistics document classification module 510 includes: a logistics term extraction unit, used to extract corresponding logistics terms from each logistics document; and a logistics document classification unit, used to classify each logistics document according to the corresponding logistics terms.
[0088] In an optional embodiment of the present invention, the logistics term extraction unit includes: a logistics text acquisition subunit, used to acquire logistics text from logistics documents; a logistics text segmentation subunit, used to segment the logistics text; and a logistics term filtering subunit, used to filter the segmentation results to obtain logistics terms.
[0089] In an optional embodiment of the present invention, the logistics term filtering subunit includes: a stop word acquisition subunit for acquiring stop words; a stop word removal subunit for removing words associated with stop words from the word segmentation results to obtain logistics terms; and a stop word update subunit for updating stop words according to the word segmentation results.
[0090] In an optional embodiment of the present invention, the logistics document classification unit includes: a word vector determination subunit, used to process the logistics words corresponding to the logistics documents to obtain the word vectors corresponding to the logistics documents; and a logistics document classification subunit, used to classify each logistics document according to the word vectors corresponding to each logistics document.
[0091] In an optional embodiment of the present invention, the logistics document classification module 510 includes: a manual input unit for acquiring logistics type information of at least one logistics document type manually input; a model output unit for inputting the logistics type information of each logistics document type and each logistics document into a type labeling information detection model to obtain the logistics document type to which each logistics document belongs, output by the type labeling information detection model; the training samples of the type labeling information detection model include logistics documents under the logistics document type and standard logistics type information of the logistics document type; and a logistics document type labeling unit for labeling the logistics document type with the logistics type information corresponding to the logistics document type.
[0092] In an optional embodiment of the present invention, before the logistics document classification module 510 classifies the logistics documents in the logistics knowledge base, the device further includes: a public logistics document collection module for collecting public logistics documents; an internal logistics document acquisition module for acquiring internal logistics-related logistics documents; and a logistics knowledge base update module for adding the acquired logistics documents to the logistics knowledge base.
[0093] The logistics knowledge graph generation device provided in this embodiment of the invention can execute the logistics knowledge graph generation method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0094] In the technical solutions of this invention, the acquisition, storage, and application of logistics type information, such as internal logistics-related logistics documents, publicly available logistics documents, stop words, and at least one manually input logistics document type, all comply with relevant laws and regulations and do not violate public order and good morals.
[0095] Example 4
[0096] Figure 6 A schematic diagram of an electronic device 600 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0097] like Figure 6As shown, the electronic device 600 includes at least one processor 601 and a memory, such as a read-only memory (ROM) 602 or a random access memory (RAM) 603, communicatively connected to the at least one processor 601. The memory stores computer programs executable by the at least one processor. The processor 601 can perform various appropriate actions and processes based on the computer program stored in the ROM 602 or loaded into the RAM 603 from storage unit 608. The RAM 603 may also store various programs and data required for the operation of the electronic device 600. The processor 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0098] Multiple components in electronic device 600 are connected to I / O interface 605, including: input unit 606, such as keyboard, mouse, etc.; output unit 607, such as various types of displays, speakers, etc.; storage unit 608, such as disk, optical disk, etc.; and communication unit 609, such as network card, modem, wireless transceiver, etc. Communication unit 609 allows electronic device 600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0099] Processor 601 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 601 performs the various methods and processes described above, such as the logistics knowledge graph generation method.
[0100] In some embodiments, the logistics knowledge graph generation method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded into and / or installed on electronic device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by processor 601, one or more steps of the logistics knowledge graph generation method described above may be performed. Alternatively, in other embodiments, processor 601 may be configured to perform the logistics knowledge graph generation method by any other suitable means (e.g., by means of firmware).
[0101] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0102] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0103] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0104] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0105] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0106] A computing system can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system. It addresses the shortcomings of traditional physical hosts and VPS (Virtual Private Server) services, such as high management difficulty and weak business scalability.
[0107] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0108] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for generating a logistics knowledge graph, characterized in that, The method includes: The logistics documents in the logistics knowledge base are classified to obtain logistics documents of at least one type, and the logistics document types are labeled with logistics type information. A logistics knowledge graph is established based on the logistics type information and each of the logistics documents; wherein, the logistics knowledge graph includes each of the logistics type information, the relationships between the logistics type information, and each logistics document contained in each of the logistics type information; The step of establishing a logistics knowledge graph based on the logistics type information and each of the logistics documents includes: The logistics type information is identified as an entity in the logistics knowledge graph; The logistics type information and each of the logistics documents are input into a pre-trained logistics document type relationship recognition model, and the relationship between each of the logistics type information is output. Based on the relationships between the various logistics type information, the related logistics type information is connected to generate a logistics knowledge graph; The classification of the logistics documents in the logistics knowledge base includes: Extract the corresponding logistics terms from each of the aforementioned logistics documents; Based on the logistics terms corresponding to each logistics document, classify the logistics documents accordingly; The step of extracting corresponding logistics terms from each of the logistics documents includes: Obtain the logistics text from the aforementioned logistics document; The logistics text is segmented into words; The word segmentation results are filtered to obtain logistics terms; The step of filtering the word segmentation results to obtain logistics terms includes: Obtain stop words; wherein, the stop words include words without substantial content and words that appear in all logistics documents and are meaningless to word segmentation; wherein, the words without substantial content include modal particles, adverbs, prepositions and conjunctions; Words associated with the stop words are removed from the word segmentation results to obtain logistics terms; The stop words are updated based on the word segmentation results.
2. The method according to claim 1, characterized in that, The classification of the logistics documents based on the corresponding logistics terms includes: The logistics terms corresponding to the logistics document are processed to obtain the word vectors corresponding to the logistics document; The logistics documents are classified based on the word vectors corresponding to each document.
3. The method according to claim 1, characterized in that, The process of classifying the logistics documents in the logistics knowledge base to obtain logistics documents under at least one logistics document type, and then labeling the logistics document types with logistics type information, includes: Obtain logistics type information for at least one type of logistics document that is manually entered; The logistics type information of each of the logistics document types and each of the logistics documents are input into the type labeling information detection model to obtain the logistics document type to which each of the logistics documents belongs, as output by the type labeling information detection model; the training samples of the type labeling information detection model include logistics documents under the logistics document type and the standard logistics type information of the logistics document type; The logistics document type is labeled with the logistics type information corresponding to the logistics document type.
4. The method according to claim 1, characterized in that, Before classifying the various logistics documents in the logistics knowledge base, the following steps are also included: Collect publicly available logistics documents; and Retrieve logistics documents associated with internal logistics; Add the acquired logistics documents to the logistics knowledge base.
5. A logistics knowledge graph generation device, characterized in that, The device includes: The logistics document classification module is used to classify various logistics documents in the logistics knowledge base, obtain logistics documents of at least one type, and label the logistics document types with logistics type information. A logistics knowledge graph building module is used to build a logistics knowledge graph based on each of the logistics documents; wherein, the logistics knowledge graph includes information on each of the logistics types, the relationships between the information on each of the logistics types, and each logistics document contained in each of the logistics types. The logistics knowledge graph building module is specifically used for: The logistics type information is identified as an entity in the logistics knowledge graph; The logistics type information and each of the logistics documents are input into a pre-trained logistics document type relationship recognition model, and the relationship between each of the logistics type information is output. Based on the relationships between the various logistics type information, the related logistics type information is connected to generate a logistics knowledge graph; The logistics document classification module includes: The logistics term extraction unit is used to extract corresponding logistics terms from each of the logistics documents. The logistics document classification unit is used to classify each logistics document according to the logistics terms corresponding to each document. The logistics term extraction unit includes: The logistics text acquisition subunit is used to acquire logistics text from the logistics document; The logistics text segmentation subunit is used to segment the logistics text into words; The logistics term filtering subunit is used to filter the word segmentation results to obtain logistics terms; The logistics term filtering subunit includes: The stop word acquisition unit is used to acquire stop words; wherein, the stop words include words without substantial content and words that appear in all logistics documents and have no meaning to the word segmentation; wherein, the words without substantial content include modal particles, adverbs, prepositions and conjunctions; The stop word removal unit is used to remove words associated with the stop words from the word segmentation results to obtain logistics terms; The stop word update subunit is used to update the stop words based on the word segmentation results.
6. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the logistics knowledge graph generation method according to any one of claims 1-4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the logistics knowledge graph generation method according to any one of claims 1-4.
Citation Information
Patent Citations
Knowledge graph construction method and device, equipment and storage medium
CN112749284A