Method and system for automatically generating customs clearance declaration file

By building a customs clearance declaration rule database and matching the basic declaration data, accurate customs clearance declaration documents are generated, and the problems of cumbersome preparation process of customs clearance declaration documents and unpredictability in deep learning are solved, and declaration efficiency and accuracy are improved.

CN119226244AActive Publication Date: 2024-12-31SHENZHEN QIANCHENG INTERNET TECHNOLOGY CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411423980.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-12
Publication Date
2024-12-31
Estimated Expiration
2044-10-12

AI Technical Summary

Technical Problem

The preparation process for customs clearance declaration documents is cumbersome, and it is easy to affect the declaration results due to omissions, missing and errors of data or documents. The unforeseeability of existing deep learning technologies is not applicable to rigorous customs clearance procedures.

Method used

By analyzing historical customs clearance declaration documents, it builds a customs clearance declaration rule library, including document type determination rules and content generation rules, and matches basic declaration data to generate accurate customs clearance declaration documents.

Benefits of technology

It realizes the accurate and efficient generation of customs clearance declaration documents, reduces manual preparation time, improves declaration efficiency, and ensures the integrity and accuracy of documents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119226244A_ABST
    Figure CN119226244A_ABST
Patent Text Reader

Abstract

The invention provides a customs clearance declaration file automatic generation method and system, and the method comprises the steps: analyzing a historical customs clearance declaration file to construct a customs clearance declaration rule base; the customs clearance declaration rule base comprises a file type determination rule for determining a customs clearance declaration file type corresponding to a customs clearance declaration program and a file content generation rule for generating each type of customs clearance declaration file content; matching a file type determination rule corresponding to the basic declaration data in the customs clearance declaration rule base according to a customs clearance declaration file generation request, and determining a corresponding customs clearance declaration file type according to the file type determination rule, and generating a declaration file list corresponding to the target customs clearance declaration program based on the customs clearance declaration file type, and matching a file content generation rule corresponding to each file in the declaration file list in the customs clearance declaration rule library to generate a corresponding customs clearance declaration file, so that the customs clearance declaration file can be accurately and efficiently generated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electronic information technology, and in particular to a method and system for automatically generating customs clearance declaration documents. Background Art

[0002] Customs Clearance refers to the procedures that must be performed in accordance with various laws, regulations and provisions when importing, exporting or transshipping goods in and out of a country's customs territory. The customs clearance process is cumbersome and involves many matters, especially the preparation of customs clearance declaration documents, which takes a lot of time. According to the requirements of relevant laws and regulations, for different goods, the customs clearance documents required for different import and export situations will also be different. Due to the extremely large number of relevant regulations involving various aspects of import and export affairs, the preparation process of customs clearance declaration documents needs to be extremely meticulous. The lack of documents, any flaws in the content or format of the documents will affect the customs clearance declaration results, thereby affecting the processing efficiency of the customs clearance procedure.

[0003] After years of intensive and orderly customs declaration work, a large number of complete customs declaration documents have been accumulated in the customs declaration database. If the experience in historical customs declaration documents can be effectively summarized and utilized, the efficiency of preparing customs declaration documents can be improved, and the impact of omissions, missingness and errors in data or documents on customs declaration results can be reduced. With the development and maturity of artificial intelligence technology, using deep learning technology to learn historical declaration documents in the customs declaration database to summarize declaration experience, thereby assisting or automatically generating customs declaration documents is one of the means to improve the efficiency of preparing customs declaration documents. However, the neural network structure of deep learning essentially uses sample data to train the weight matrix and bias items under a specific neural network structure to obtain the autonomous judgment and decision-making ability of the neural network model, and these weight matrices and bias items are machine-oriented rather than user-oriented, that is, the neural network model can be understood as a black box whose judgment rules are invisible to users. Before it outputs the results, users cannot foresee whether its output results are accurate and reliable. The unpredictability and uncertainty of artificial intelligence technology make it unsuitable for rigorous applications such as customs clearance procedures. Summary of the invention

[0004] Based on the above problems, the present invention proposes a method and system for automatically generating customs clearance declaration documents, which can generate customs clearance declaration documents accurately and efficiently.

[0005] In view of this, a first aspect of the present invention proposes a method for automatically generating customs clearance declaration documents, comprising: Read historical customs clearance declaration documents from the historical database; Parsing the historical customs clearance declaration documents to construct a customs clearance declaration rule base, the customs clearance declaration rule base comprising a file type determination rule for determining a customs clearance declaration document type corresponding to a customs clearance declaration procedure and a file content generation rule for generating the content of each type of customs clearance declaration document; receiving a request for generating a customs clearance declaration document for a target customs clearance declaration procedure, wherein the request for generating a customs clearance declaration document includes basic declaration data of the target customs clearance declaration procedure; Matching the file type determination rule corresponding to the basic declaration data in the customs clearance declaration rule library; Determine the corresponding customs clearance declaration document type according to the document type determination rule; Generate a declaration document list corresponding to the target customs clearance declaration procedure based on the customs clearance declaration document type; The file content generation rules corresponding to each file in the declaration file list are matched in the customs clearance declaration rule library to generate the corresponding customs clearance declaration file.

[0006] Furthermore, the step of parsing the historical customs clearance declaration documents to construct a customs clearance declaration rule base specifically includes: Generate a file identification mark corresponding to each historical customs clearance declaration file in the historical database; Deconstruct the text content of each historical customs clearance declaration document to obtain the text units in the document content; Constructing a customs clearance declaration knowledge graph using the text unit as a basic element, wherein the customs clearance declaration knowledge graph includes a triple identifier for each triple; Establishing the association relationship between the triples in the customs clearance declaration knowledge graph and each historical customs clearance declaration document; Based on the association relationship, the triplet identifier of the triplet is associated and stored with the corresponding historical customs clearance declaration file; Generate a triplet set and a file type set for each customs declaration procedure; Identify the common features of triplets of customs declaration procedures with the same set of document types; Establishing a correspondence between the common features of the triples and the set of file types; The file type determination rules of the customs clearance declaration rule base are established based on the correspondence between the triple common features and the file type set.

[0007] Furthermore, the step of parsing the historical customs clearance declaration documents to construct a customs clearance declaration rule base also includes: Parsing the historical customs clearance declaration documents to obtain format data, content data and layout data corresponding to each historical customs clearance declaration document; The file content generation rules are generated by matching the format data, content data and layout data of historical customs clearance declaration documents of the same type. The file content generation rules include format rules, content rules and layout rules.

[0008] Furthermore, the step of parsing the historical customs clearance declaration documents to obtain content data corresponding to each historical customs clearance declaration document specifically includes: Identify explicit key-value pairs and implicit key-value pairs in the historical customs clearance declaration file according to the position of the file unit in the historical customs clearance declaration file, wherein the explicit key-value pair is a key-value pair containing its key name and key value in the text unit of the historical customs clearance declaration file, and the implicit key-value pair is a key-value pair containing only its key value in the text unit of the historical customs clearance declaration file; Extracting the key names and paragraph numbers of the explicit key-value pairs and the implicit key-value pairs; A correspondence between the key name and the paragraph number is established.

[0009] Furthermore, the steps of constructing a customs clearance declaration knowledge graph using the text unit as a basic element specifically include: Constructing a first element list of historical customs clearance declaration documents, wherein the first element list is a collection of key names and key values ​​of the explicit key-value pairs and the implicit key-value pairs; Extracting noun elements from the first element list to construct a second element list; When the key name and / or key value of any explicit key-value pair or implicit key-value pair in the historical customs clearance file exists in the second element list, identifying the semantic relationship of the corresponding key-value pair to generate a relationship word; Determine the noun element in the key-value pair as an entity element of a triple in the customs clearance declaration knowledge graph; The other element in the key-value pair and the relational term are respectively determined as the attribute element and the relational element of the triple.

[0010] Furthermore, the step of identifying the common features of the triplet of customs declaration procedures with the same set of document types specifically includes: A triplet set of any customs clearance declaration procedure is selected from the customs clearance declaration procedures having the same document type set to be determined as a first triplet set; Determine a set of triples of other customs clearance declaration procedures except the selected customs clearance declaration procedure among the customs clearance declaration procedures having the same document type set as a second set of triples; traversing each triple in the first set of triples to match the triple identifier of the triple with the triple identifier in the second set of triples; When any triple in the first triple set exists in all second triple sets at the same time, determining the corresponding triple as a characteristic element of a triple common feature; The feature elements of the same file type set are combined to generate a triple common feature corresponding to the file type set.

[0011] Furthermore, the step of matching the file type determination rule corresponding to the basic declaration data in the customs clearance declaration rule library specifically includes: Processing the basic declaration data to generate a basic triplet set of the target customs clearance declaration procedure; Matching the basic triplet set with the triplet common features of each file type determination rule; When the triple common feature of any document type determination rule is a subset of the basic triple set, the customs clearance declaration document type of the target customs clearance declaration procedure is determined based on the corresponding document type determination rule.

[0012] Furthermore, the step of processing the basic declaration data to generate a basic triplet set of the target customs clearance declaration procedure specifically includes: Deconstructing the text content of each file in the basic declaration data to obtain text units in the file content; Generate corresponding explicit key-value pairs and implicit key-value pairs based on the position and semantic relationship of the text unit in the file; The explicit key-value pairs and implicit key-value pairs are matched with the triples in the customs clearance declaration knowledge graph to obtain a basic triple set of the basic declaration data.

[0013] Furthermore, the step of matching the explicit key-value pairs and implicit key-value pairs with the triples in the customs clearance declaration knowledge graph to obtain a basic triple set of the basic declaration data specifically includes: Extracting entity elements and attribute elements from each file in the basic declaration data; Matching the entity element and the attribute element with the entity element and the attribute element of the triple in the customs clearance declaration knowledge graph to determine the triple corresponding to the key-value pair; The matched triples are combined to generate the basic triple set.

[0014] The second aspect of the present invention provides a system for automatically generating customs clearance declaration documents, comprising: The historical customs clearance declaration file reading module is used to read the historical customs clearance declaration files from the historical database; a customs clearance declaration rule base construction module, used for parsing the historical customs clearance declaration documents to construct a customs clearance declaration rule base, wherein the customs clearance declaration rule base includes a file type determination rule for determining the customs clearance declaration document type corresponding to the customs clearance declaration procedure and a file content generation rule for generating the content of each type of customs clearance declaration document; A customs clearance declaration document generation request receiving module, used to receive a customs clearance declaration document generation request for a target customs clearance declaration procedure, wherein the customs clearance declaration document generation request includes basic declaration data of the target customs clearance declaration procedure; A file type determination rule matching module, used to match the file type determination rule corresponding to the basic declaration data in the customs clearance declaration rule library; A customs clearance declaration document type determination module, used to determine the corresponding customs clearance declaration document type according to the document type determination rule; A declaration document list generating module, used for generating a declaration document list corresponding to the target customs clearance declaration procedure based on the customs clearance declaration document type; The file content generation rule matching module is used to match the file content generation rule corresponding to each file in the declaration file list in the customs clearance declaration rule library to generate the corresponding customs clearance declaration file.

[0015] The present invention proposes a method and system for automatically generating customs clearance declaration documents, which parses the historical customs clearance declaration documents to construct a customs clearance declaration rule base, wherein the customs clearance declaration rule base includes a file type determination rule for determining the customs clearance declaration document type corresponding to the customs clearance declaration procedure and a file content generation rule for generating the content of each type of customs clearance declaration document, matches the file type determination rule corresponding to the basic declaration data in the customs clearance declaration rule base according to a customs clearance declaration document generation request, determines the corresponding customs clearance declaration document type according to the file type determination rule, generates a declaration document list corresponding to the target customs clearance declaration procedure based on the customs clearance declaration document type, matches the file content generation rule corresponding to each file in the declaration document list in the customs clearance declaration rule base to generate the corresponding customs clearance declaration document, and can accurately and efficiently generate customs clearance declaration documents. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is a flow chart of a method for automatically generating customs clearance declaration documents provided by one embodiment of the present invention; Figure 2 It is a schematic diagram of a system for automatically generating customs clearance declaration documents provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0017] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0018] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.

[0019] In the description of the present invention, the term "multiple" refers to two or more. Unless otherwise clearly defined, the orientation or positional relationship indicated by the terms "upper", "lower", etc. is based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation of the present invention. The terms "connection", "installation", "fixation", etc. should be understood in a broad sense. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be directly connected or indirectly connected through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances. In addition, the terms "first", "second", etc. are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first", "second", etc. can explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, the meaning of "multiple" is two or more.

[0020] In the description of this specification, the description of the terms "one embodiment", "some implementations", "specific embodiments", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0021] A method and system for automatically generating customs declaration documents according to some embodiments of the present invention will be described below with reference to the accompanying drawings.

[0022] like Figure 1 As shown, the first aspect of the present invention proposes a method for automatically generating customs clearance declaration documents, comprising: Read historical customs clearance declaration documents from the historical database; Parsing the historical customs clearance declaration documents to construct a customs clearance declaration rule base, the customs clearance declaration rule base comprising a file type determination rule for determining a customs clearance declaration document type corresponding to a customs clearance declaration procedure and a file content generation rule for generating the content of each type of customs clearance declaration document; receiving a request for generating a customs clearance declaration document for a target customs clearance declaration procedure, wherein the request for generating a customs clearance declaration document includes basic declaration data of the target customs clearance declaration procedure; Matching the file type determination rule corresponding to the basic declaration data in the customs clearance declaration rule library; Determine the corresponding customs clearance declaration document type according to the document type determination rule; Generate a declaration document list corresponding to the target customs clearance declaration procedure based on the customs clearance declaration document type; The file content generation rules corresponding to each file in the declaration file list are matched in the customs clearance declaration rule library to generate the corresponding customs clearance declaration file.

[0023] The historical database is a database consisting of various versions of customs clearance declaration documents submitted in each customs clearance declaration procedure in the past, where the customs clearance declaration results are successful or failed declarations. Furthermore, in the historical database, the customs clearance declaration documents with successful declarations are used to generate positive customs clearance declaration rules, and the customs clearance declaration documents with failed declarations are used to generate reverse customs clearance declaration rules.

[0024] The customs clearance declaration rule base is composed of a plurality of file type determination rules for determining the customs clearance declaration document type corresponding to the customs clearance declaration procedure and file content generation rules for generating the content of each type of customs clearance declaration document. The customs clearance declaration document automatic generation system determines the type of customs clearance declaration document to be generated in the customs clearance declaration procedure based on the file type determination rules in the customs clearance declaration rule base, and generates the corresponding customs clearance declaration document based on the file content generation rules in the customs clearance declaration rule base.

[0025] At the customs clearance declaration procedure level, the customs clearance declaration rule base includes file type determination rules. Each time the customs clearance declaration procedure is initiated, the file type required for customs clearance declaration will be different due to the differences in specific goods, transportation methods, import and export types and modes, etc. The technical solution of the present invention generates the file type determination rules by parsing historical customs clearance declaration files, which are used to determine the type of customs clearance declaration documents required to be submitted for each customs clearance declaration procedure initiated. In the technical solution of the present invention, the so-called file type refers to the file content type such as contract, invoice, packing list, waybill, insurance policy or import and export permit, etc., rather than the encoding format type of files such as pdf format or docx.

[0026] At the customs clearance declaration document level, the customs clearance declaration rule library includes file content generation rules. Each type of customs clearance declaration document corresponds to one or more file content generation rules. Exemplarily, they may include file format rules for constraining the customs clearance declaration file format, file layout rules for constraining the customs clearance document layout, data format rules for constraining the customs clearance file data format, and data range rules for constraining the customs clearance file data range.

[0027] The target customs clearance declaration program is a customs clearance declaration program that needs to generate customs clearance declaration documents, and the basic declaration data is the basic data of the type of customs clearance declaration documents required to be submitted in the declaration data of the target customs clearance declaration program. The customs clearance declaration document generation request is a request triggered by the user when starting the target customs clearance declaration program. It can be an operation request submitted by the user through the client connecting to the customs clearance declaration document automatic generation system, or it can be a request automatically triggered by the customs clearance declaration document automatic generation system according to time conditions or other conditions after the user enters the basic information of the target customs clearance declaration program through the client to start the target customs clearance declaration program. The basic declaration data of the target customs clearance declaration program is entered by the user when starting the target customs clearance declaration program or is associated with the target customs clearance program.

[0028] Furthermore, the step of parsing the historical customs clearance declaration documents to construct a customs clearance declaration rule base specifically includes: Generate a file identification mark corresponding to each historical customs clearance declaration file in the historical database; Deconstruct the text content of each historical customs clearance declaration document to obtain the text units in the document content; Constructing a customs clearance declaration knowledge graph using the text unit as a basic element, wherein the customs clearance declaration knowledge graph includes a triple identifier for each triple; Establishing the association relationship between the triples in the customs clearance declaration knowledge graph and each historical customs clearance declaration document; Based on the association relationship, the triplet identifier of the triplet is associated and stored with the corresponding historical customs clearance declaration file; Generate a triplet set and a file type set for each customs declaration procedure; Identify the common features of triplets of customs declaration procedures with the same set of document types; Establishing a correspondence between the common features of the triples and the set of file types; The file type determination rules of the customs clearance declaration rule base are established based on the correspondence between the triple common features and the file type set.

[0029] Specifically, the file identification identifier is a unique identification identifier of each historical customs clearance declaration file in the historical database, which is used to uniquely identify the corresponding historical customs clearance declaration file in subsequent processing. The triple identifier is a unique identification identifier used to identify the corresponding triple in the customs clearance declaration knowledge graph. In the technical solution of the above implementation, the triples in the triple set are all discrete triples, and each triple is represented by its corresponding triple identifier in the triple set, that is, the triple set does not store the association relationship between each triple.

[0030] Furthermore, the step of deconstructing the text content of each historical customs clearance declaration document to obtain the text units in the document content specifically includes: Extracting the text content of the historical customs clearance declaration document; Segmenting the text content into the largest semantic units with a single part of speech and complete independent meaning; The maximum semantic unit is determined as the text unit.

[0031] Specifically, the largest semantic unit of a single part of speech with a complete and independent meaning can be the smallest semantic unit with a complete and independent meaning, such as "company", "date", "name", etc., or it can be a semantic unit with a single part of speech composed of multiple smaller semantic units with complete and independent meanings, such as "XXX Limited Liability Company", in which "limited", "liability" and "company" are all semantic units with complete and independent meanings, but after they are combined into "XXX Limited Liability Company" to become a larger semantic unit, it still has the characteristics of a single part of speech. Therefore, "XXX Limited Liability Company" is determined as a text unit instead of separately determining "limited", "liability" and "company" as one text unit.

[0032] The triplet set is a data set consisting of triplet identifiers corresponding to the triplet associated with the customs clearance declaration document of the customs clearance declaration procedure. Similarly, in the technical solution of the present invention, a unique file type identifier is configured for each file type to represent each file type, and the file type set is a data set consisting of file type identifiers corresponding to the file types included in the customs clearance declaration procedure.

[0033] It should be known that, in the step of deconstructing the text content of each historical customs clearance declaration document to obtain the text units in the file content, it is not limited to extracting text content from files in text formats such as doc, docx, txt, xls, xlsx, etc., but also performing text recognition on image files such as jpg, png or pdf and other formats to extract text content from these files.

[0034] Furthermore, after the step of generating a triplet set and a file type set for each customs clearance declaration procedure, it also includes: Identify proprietary documents in a customs declaration procedure with the same set of document types, where the proprietary documents are customs declaration documents that are not included in other customs declaration procedures with different sets of document types; The triplet associated with the proprietary document is configured to have a greater feature weight, and the feature weight is stored in association with the customs clearance declaration procedure containing the proprietary document.

[0035] For example, when a triple in a customs declaration procedure has an association with a proprietary document, it is configured as a feature weight greater than 1, and the weight is accumulated according to the number of times it appears in the proprietary document. When a triple in a customs declaration procedure has no association with a proprietary document, its feature weight is configured as a default value, such as 1.

[0036] Furthermore, the step of parsing the historical customs clearance declaration documents to construct a customs clearance declaration rule base also includes: Parsing the historical customs clearance declaration documents to obtain format data, content data and layout data corresponding to each historical customs clearance declaration document; The file content generation rules are generated by matching the format data, content data and layout data of historical customs clearance declaration documents of the same type. The file content generation rules include format rules, content rules and layout rules.

[0037] Specifically, the format data includes the extension data of the historical customs clearance declaration file, such as docx, pdf or jpg, etc. When the extensions of the historical files of the same type are the same, it is determined that the customs clearance declaration file of this type has the limited requirements of the file format, and in the step of matching the format data, content data and layout data of the historical customs clearance declaration files of the same type to generate the file content generation rule, when any type of customs clearance declaration file has the limited requirements of the file format, the limited file format is determined as the format rule of the corresponding file type.

[0038] Furthermore, the step of parsing the historical customs clearance declaration documents to obtain content data corresponding to each historical customs clearance declaration document specifically includes: Identify explicit key-value pairs and implicit key-value pairs in the historical customs clearance declaration file according to the position of the file unit in the historical customs clearance declaration file, wherein the explicit key-value pair is a key-value pair containing its key name and key value in the text unit of the historical customs clearance declaration file, and the implicit key-value pair is a key-value pair containing only its key value in the text unit of the historical customs clearance declaration file; Extracting the key names and paragraph numbers of the explicit key-value pairs and the implicit key-value pairs; A correspondence between the key name and the paragraph number is established.

[0039] Specifically, the explicit key-value pair can be obtained based on the position and semantic relationship of the text unit in the historical customs clearance declaration file. For example, in the historical customs clearance declaration file, there is a text content of "Date: 2024-01-01", which is deconstructed into two text units "Date" and "2024-01-01". According to the position relationship and semantic relationship between the two text units, it can be clearly obtained that it is a set of explicit key-value pairs, in which "Date" is the key name in the key-value pair and "2024-01-01" is the key value in the key-value pair. Content such as page numbers and titles of various levels in the outline structure are usually not marked in front of their content as page numbers or first-level titles, second-level titles and other content types, but their implicit key names can be determined by their position relationship relative to other content in the file, thereby obtaining implicit key-value pairs such as "Page Number: 1".

[0040] Furthermore, the step of matching the content data of historical customs clearance declaration documents of the same type to generate the file content generation rules specifically includes: Match the key names and paragraph numbers of historical customs declaration documents of the same type; When any key name exists simultaneously in the same type of historical customs clearance declaration documents, the key name is determined as the target key name; Calculate the difference in paragraph numbers of the target key name in historical customs clearance declaration documents of the same type; When the difference between the paragraph numbers of any key name in the same type of historical customs clearance declaration documents is less than a preset threshold, the correspondence between the key name and the paragraph number is determined as a file content generation rule for the corresponding file type.

[0041] Furthermore, the step of parsing the historical customs clearance declaration documents to obtain the format data corresponding to each historical customs clearance declaration document specifically includes: The layout data of the explicit content in the explicit key-value pair and the implicit key-value pair is extracted, the explicit content is the text content contained in the text unit, and the layout data includes the font, color, indentation, alignment and other data of the explicit content.

[0042] Furthermore, the steps of constructing a customs clearance declaration knowledge graph using the text unit as a basic element specifically include: Constructing a first element list of historical customs clearance declaration documents, wherein the first element list is a collection of key names and key values ​​of the explicit key-value pairs and the implicit key-value pairs; Extracting noun elements from the first element list to construct a second element list; When the key name and / or key value of any explicit key-value pair or implicit key-value pair in the historical customs clearance file exists in the second element list, identifying the semantic relationship of the corresponding key-value pair to generate a relationship word; Determine the noun element in the key-value pair as an entity element of a triple in the customs clearance declaration knowledge graph; The other element in the key-value pair and the relational term are respectively determined as the attribute element and the relational element of the triple.

[0043] Specifically, in the technical solution of the above implementation mode, the key values ​​and key names in the explicit key-value pairs and implicit key-value pairs in the historical customs clearance declaration file are split into independent text elements, and these text elements are used as basic elements to form the first element list.

[0044] In the step of determining the other element in the key-value pair and the relational term as the triple attribute element and the relational element, when the noun element in the key-value pair is the key name of the key-value pair, the other element is the key value of the key-value pair. On the contrary, when the noun element in the key-value pair is the key value of the key-value pair, the other element is the key name of the key-value pair.

[0045] In the step of extracting noun elements from the first element list for constructing the second element list, the noun elements include words or noun phrases whose part of speech is noun.

[0046] Furthermore, before the step of extracting the elements whose part of speech is noun from the first element list to generate the second element list, the step of performing pronoun replacement is also included, which specifically includes: identifying a pronoun element in said first list of elements; Performing semantic recognition on the text content in the historical customs clearance document to determine the target word referred to by the pronoun element, wherein the target word is a noun or a noun phrase; The target word is used to replace the pronoun element in the first element list.

[0047] In the technical solution of the above implementation mode, the steps of establishing the association relationship between the triples in the customs clearance declaration knowledge graph and each historical customs clearance declaration document are specifically as follows: When a triple is generated based on an explicit key-value pair and an implicit key-value pair in a historical customs clearance declaration document, establishing an association relationship between the triple identifier of the triple in the customs clearance declaration knowledge graph and the file identification identifier of the historical customs clearance declaration document; Alternatively, when a triple generated by an explicit key-value pair or an implicit key-value pair in a historical customs clearance declaration document already exists in the customs clearance declaration knowledge graph, an association relationship is established between the triple identifier of the triple in the customs clearance declaration knowledge graph and the file identification identifier of the historical customs clearance declaration document.

[0048] Furthermore, the step of identifying the common features of the triplet of customs declaration procedures with the same set of document types specifically includes: A triplet set of any customs clearance declaration procedure is selected from the customs clearance declaration procedures having the same document type set as a first triplet set; Determine a set of triples of other customs clearance declaration procedures except the selected customs clearance declaration procedure among the customs clearance declaration procedures having the same document type set as a second set of triples; traversing each triple in the first set of triples to match a triple identifier of the triple with a triple identifier in the second set of triples; When any triple in the first triple set exists in all second triple sets at the same time, determining the corresponding triple as a characteristic element of a triple common feature; The feature elements of the same file type set are combined to generate a triple common feature corresponding to the file type set.

[0049] In the technical solution of the present invention, the same file type set refers to the same file type identifiers in the file type set corresponding to multiple historical customs clearance declaration procedures. The same as mentioned here does not include the same order of the file type identifiers in the file type set, that is, when each file type identifier contained in the file type set corresponding to a historical customs clearance declaration procedure exists in the file type set corresponding to another historical customs clearance declaration procedure, it is determined that the file type sets corresponding to the two historical customs clearance declaration procedures are the same. Of course, according to actual implementation requirements, the order codes of various file types can also be configured in the file type set to constrain the order of various file types in the file type set, so that the order of file type identifiers in the same file type set is also the same.

[0050] In the technical solutions of some embodiments of the present invention, it also includes matching weight features of triplets that appear simultaneously in the first triple set and the second triple set, and determining triplets with similar weight features as feature elements of a triple common feature.

[0051] Furthermore, the step of matching the file type determination rule corresponding to the basic declaration data in the customs clearance declaration rule library specifically includes: Processing the basic declaration data to generate a basic triplet set of the target customs clearance declaration procedure; Matching the basic triplet set with the triplet common features of each file type determination rule; When the triple common feature of any document type determination rule is a subset of the basic triple set, the customs clearance declaration document type of the target customs clearance declaration procedure is determined based on the corresponding document type determination rule.

[0052] The basic declaration data includes the cargo information, cargo order information, cargo transportation information, import and export type and import and export mode and other information associated with the target customs clearance declaration procedure, and the cargo order information specifically includes the transaction subject information, address information and documents such as contracts and invoices of both parties to the transaction. In the technical solutions of some embodiments of the present invention, the customs clearance declaration document generation system establishes a communication connection with an online transaction system, a logistics and transportation system, etc. through an API interface, or establishes a communication connection with an internal management system of an enterprise through an API interface, and obtains the basic declaration data from the online transaction system, the logistics and transportation system and / or the internal management system.

[0053] Furthermore, the step of processing the basic declaration data to generate a basic triplet set of the target customs clearance declaration procedure specifically includes: Deconstructing the text content of each file in the basic declaration data to obtain text units in the file content; Generate corresponding explicit key-value pairs and implicit key-value pairs based on the position and semantic relationship of the text unit in the file; The explicit key-value pairs and implicit key-value pairs are matched with the triples in the customs clearance declaration knowledge graph to obtain a basic triple set of the basic declaration data.

[0054] Furthermore, the basic triple set is matched with the triple common features of each file type determination rule, specifically by matching the triple identifier corresponding to the characteristic element of the triple common features of each file type determination rule with the triple identifier of each triple in the basic triple set, and judging whether their triple identifiers are the same; when the triple identifiers corresponding to the triple common features of any file type determination rule exist in the basic triple set, it is determined that the triple common features of the file type determination rule are a subset of the basic triple set.

[0055] Furthermore, the step of matching the explicit key-value pairs and implicit key-value pairs with the triples in the customs clearance declaration knowledge graph to obtain a basic triple set of the basic declaration data specifically includes: Extracting entity elements and attribute elements from each file in the basic declaration data; Matching the entity element and the attribute element with the entity element and the attribute element of the triple in the customs clearance declaration knowledge graph to determine the triple corresponding to the key-value pair; The matched triples are combined to generate the basic triple set.

[0056] Furthermore, the step of extracting entity elements and attribute elements from each file in the basic declaration data specifically includes: Split the key values ​​and key names in the explicit key-value pairs and implicit key-value pairs in each file in the basic declaration data into independent text elements; The third element list is formed by taking the text element as a basic element; Extracting noun elements from the third element list to construct a fourth element list; When the key name and / or key value of any explicit key-value pair or implicit key-value pair exists in the fourth element list, the noun element in the corresponding key-value pair is determined as an entity element of a triple; The other element in the key-value pair is determined as the attribute element of the triple.

[0057] Furthermore, the step of matching the file content generation rules corresponding to each file in the declaration file list in the customs clearance declaration rule library to generate the corresponding customs clearance declaration file specifically includes: Obtaining declaration data of the target customs clearance declaration procedure from the docked data interface; The declaration data is processed according to the file content generation rules corresponding to each file in the declaration file list to generate the corresponding customs clearance declaration file.

[0058] like Figure 2 As shown, the second aspect of the present invention provides a system for automatically generating customs clearance declaration documents, comprising: The historical customs clearance declaration file reading module is used to read the historical customs clearance declaration files from the historical database; a customs clearance declaration rule base construction module, used for parsing the historical customs clearance declaration documents to construct a customs clearance declaration rule base, wherein the customs clearance declaration rule base includes a file type determination rule for determining the customs clearance declaration document type corresponding to the customs clearance declaration procedure and a file content generation rule for generating the content of each type of customs clearance declaration document; A customs clearance declaration document generation request receiving module, used to receive a customs clearance declaration document generation request for a target customs clearance declaration procedure, wherein the customs clearance declaration document generation request includes basic declaration data of the target customs clearance declaration procedure; A file type determination rule matching module, used to match the file type determination rule corresponding to the basic declaration data in the customs clearance declaration rule library; A customs clearance declaration document type determination module, used to determine the corresponding customs clearance declaration document type according to the document type determination rule; A declaration document list generating module, used for generating a declaration document list corresponding to the target customs clearance declaration procedure based on the customs clearance declaration document type; The file content generation rule matching module is used to match the file content generation rule corresponding to each file in the declaration file list in the customs clearance declaration rule library to generate the corresponding customs clearance declaration file.

[0059] The historical database is a database consisting of various versions of customs clearance declaration documents submitted in each customs clearance declaration procedure in the past, where the customs clearance declaration results are successful or failed declarations. Furthermore, in the historical database, the customs clearance declaration documents with successful declarations are used to generate positive customs clearance declaration rules, and the customs clearance declaration documents with failed declarations are used to generate reverse customs clearance declaration rules.

[0060] The customs clearance declaration rule base is composed of a plurality of file type determination rules for determining the customs clearance declaration document type corresponding to the customs clearance declaration procedure and file content generation rules for generating the content of each type of customs clearance declaration document. The customs clearance declaration document automatic generation system determines the type of customs clearance declaration document to be generated in the customs clearance declaration procedure based on the file type determination rules in the customs clearance declaration rule base, and generates the corresponding customs clearance declaration document based on the file content generation rules in the customs clearance declaration rule base.

[0061] At the customs clearance declaration procedure level, the customs clearance declaration rule base includes file type determination rules. Each time the customs clearance declaration procedure is initiated, the file type required for customs clearance declaration will be different due to the differences in specific goods, transportation methods, import and export types and modes, etc. The technical solution of the present invention generates the file type determination rules by parsing historical customs clearance declaration files, which are used to determine the type of customs clearance declaration documents required to be submitted for each customs clearance declaration procedure initiated. In the technical solution of the present invention, the so-called file type refers to the file content type such as contract, invoice, packing list, waybill, insurance policy or import and export permit, etc., rather than the encoding format type of files such as pdf format or docx.

[0062] At the customs clearance declaration document level, the customs clearance declaration rule library includes file content generation rules. Each type of customs clearance declaration document corresponds to one or more file content generation rules. Exemplarily, they may include file format rules for constraining the customs clearance declaration file format, file layout rules for constraining the customs clearance document layout, data format rules for constraining the customs clearance file data format, and data range rules for constraining the customs clearance file data range.

[0063] The target customs clearance declaration program is a customs clearance declaration program that needs to generate customs clearance declaration documents, and the basic declaration data is the basic data of the type of customs clearance declaration documents required to be submitted in the declaration data of the target customs clearance declaration program. The customs clearance declaration document generation request is a request triggered by the user when starting the target customs clearance declaration program. It can be an operation request submitted by the user through the client connecting to the customs clearance declaration document automatic generation system, or it can be a request automatically triggered by the customs clearance declaration document automatic generation system according to time conditions or other conditions after the user enters the basic information of the target customs clearance declaration program through the client to start the target customs clearance declaration program. The basic declaration data of the target customs clearance declaration program is entered by the user when starting the target customs clearance declaration program or is associated with the target customs clearance program.

[0064] Furthermore, the customs clearance declaration rule base construction module includes: A document identification mark generation module, used to generate a document identification mark corresponding to each historical customs clearance declaration document in the historical database; A text content deconstruction module is used to deconstruct the text content of each historical customs clearance declaration document to obtain text units in the document content; A customs clearance declaration knowledge graph construction module, used to construct a customs clearance declaration knowledge graph using the text unit as a basic element, wherein the customs clearance declaration knowledge graph includes a triple identifier for each triple; An association relationship establishment module, used to establish an association relationship between the triples in the customs clearance declaration knowledge graph and each historical customs clearance declaration document; An association storage module, used for associating and storing the triplet identifier of the triplet with the corresponding historical customs clearance declaration file based on the association relationship; A data set generation module, used to generate a triple set and a file type set for each customs clearance declaration procedure; A triplet common feature recognition module, used to recognize triplet common features of customs declaration procedures with the same set of file types; A corresponding relationship establishing module, used for establishing a corresponding relationship between the common features of the triples and the set of file types; The file type determination rule establishing module is used to establish the file type determination rule of the customs clearance declaration rule base based on the corresponding relationship between the triple common features and the file type set.

[0065] Specifically, the file identification identifier is a unique identification identifier of each historical customs clearance declaration file in the historical database, which is used to uniquely identify the corresponding historical customs clearance declaration file in subsequent processing. The triple identifier is a unique identification identifier used to identify the corresponding triple in the customs clearance declaration knowledge graph. In the technical solution of the above implementation, the triples in the triple set are all discrete triples, and each triple is represented by its corresponding triple identifier in the triple set, that is, the triple set does not store the association relationship between each triple.

[0066] Furthermore, the text content deconstruction module includes: A text content extraction module, used to extract the text content of the historical customs clearance declaration document; A maximum semantic unit segmentation module, used to segment the text content into maximum semantic units of a single part of speech with complete independent meaning; The text unit determination module is used to determine the maximum semantic unit as the text unit.

[0067] Specifically, the largest semantic unit of a single part of speech with a complete and independent meaning can be the smallest semantic unit with a complete and independent meaning, such as "company", "date", "name", etc., or it can be a semantic unit with a single part of speech composed of multiple smaller semantic units with complete and independent meanings, such as "XXX Limited Liability Company", in which "limited", "liability" and "company" are all semantic units with complete and independent meanings, but after they are combined into "XXX Limited Liability Company" to become a larger semantic unit, it still has the characteristics of a single part of speech. Therefore, "XXX Limited Liability Company" is determined as a text unit instead of separately determining "limited", "liability" and "company" as one text unit.

[0068] The triplet set is a data set consisting of triplet identifiers corresponding to the triplet associated with the customs clearance declaration document of the customs clearance declaration procedure. Similarly, in the technical solution of the present invention, a unique file type identifier is configured for each file type to represent each file type, and the file type set is a data set consisting of file type identifiers corresponding to the file types included in the customs clearance declaration procedure.

[0069] It should be known that, in the step of deconstructing the text content of each historical customs clearance declaration document to obtain the text units in the file content, it is not limited to extracting text content from files in text formats such as doc, docx, txt, xls, xlsx, etc., but also performing text recognition on image files such as jpg, png or pdf and other formats to extract text content from these files.

[0070] Furthermore, the customs clearance declaration rule base construction module also includes: A proprietary document identification module, used to identify proprietary documents in a customs clearance declaration procedure with the same document type set, wherein the proprietary documents are customs clearance declaration documents not included in other customs clearance declaration procedures with different document type sets; The feature weight configuration module is used to configure the triplet associated with the proprietary document to have a larger feature weight, and the feature weight is stored in association with the customs clearance declaration procedure containing the proprietary document.

[0071] For example, when a triple in a customs declaration procedure has an association with a proprietary document, it is configured as a feature weight greater than 1, and the weight is accumulated according to the number of times it appears in the proprietary document. When a triple in a customs declaration procedure has no association with a proprietary document, its feature weight is configured as a default value, such as 1.

[0072] Furthermore, the customs clearance declaration rule base construction module also includes: A historical customs clearance declaration file parsing module, used to parse the historical customs clearance declaration files to obtain format data, content data and layout data corresponding to each historical customs clearance declaration file; The file content generation rule generation module is used to match the format data, content data and layout data of historical customs clearance declaration documents of the same type to generate the file content generation rules, wherein the file content generation rules include format rules, content rules and layout rules.

[0073] Specifically, the format data includes the extension data of the historical customs clearance declaration file, such as docx, pdf or jpg, etc. When the extensions of the historical files of the same type are the same, it is determined that the customs clearance declaration file of this type has the limited requirements of the file format, and in the step of matching the format data, content data and layout data of the historical customs clearance declaration files of the same type to generate the file content generation rule, when any type of customs clearance declaration file has the limited requirements of the file format, the limited file format is determined as the format rule of the corresponding file type.

[0074] Furthermore, the historical customs clearance declaration document parsing module includes: a key-value pair identification module, used for identifying explicit key-value pairs and implicit key-value pairs in the historical customs clearance declaration file according to the position of the file unit in the historical customs clearance declaration file, wherein the explicit key-value pair is a key-value pair containing its key name and key value in the text unit of the historical customs clearance declaration file, and the implicit key-value pair is a key-value pair containing only its key value in the text unit of the historical customs clearance declaration file; A key-value pair data extraction module, used to extract the key name and paragraph number of the explicit key-value pair and the implicit key-value pair; The corresponding relationship establishing module is used to establish the corresponding relationship between the key name and the paragraph number.

[0075] Specifically, the explicit key-value pair can be obtained based on the position and semantic relationship of the text unit in the historical customs clearance declaration file. For example, in the historical customs clearance declaration file, there is a text content of "Date: 2024-01-01", which is deconstructed into two text units "Date" and "2024-01-01". According to the position relationship and semantic relationship between the two text units, it can be clearly obtained that it is a set of explicit key-value pairs, in which "Date" is the key name in the key-value pair and "2024-01-01" is the key value in the key-value pair. Content such as page numbers and titles of various levels in the outline structure are usually not marked in front of their content as page numbers or first-level titles, second-level titles and other content types, but their implicit key names can be determined by their position relationship relative to other content in the file, thereby obtaining implicit key-value pairs such as "Page Number: 1".

[0076] Furthermore, the file content generation rule generation module includes: Key-value pair data matching module, used to match the key name and paragraph number of historical customs declaration documents of the same type; A target key name determination module, used for determining any key name as a target key name when the key name exists simultaneously in the same type of historical customs clearance declaration documents; A paragraph number difference calculation module, used to calculate the paragraph number difference of the target key name in the same type of historical customs clearance declaration documents; The file content generation rule determination module is used to determine the correspondence between the key name and the paragraph number as the file content generation rule of the corresponding file type when the difference between the paragraph numbers of any key name in the same type of historical customs clearance declaration documents is less than a preset threshold.

[0077] Furthermore, the historical customs clearance declaration document parsing module includes: The layout data extraction module is used to extract the layout data of the explicit content in the explicit key-value pairs and the implicit key-value pairs, wherein the explicit content is the text content contained in the text unit, and the layout data includes the font, color, indentation, alignment and other data of the explicit content.

[0078] Furthermore, the customs clearance declaration knowledge graph construction module includes: A first element list construction module, used to construct a first element list of historical customs clearance declaration documents, wherein the first element list is a collection of key names and key values ​​of the explicit key-value pairs and the implicit key-value pairs; A second element list construction module, used for extracting noun elements from the first element list for constructing a second element list; a relation word generating module, configured to, when a key name and / or key value of any explicit key-value pair or implicit key-value pair in the historical customs clearance document exists in the second element list, identify the semantic relationship of the corresponding key-value pair and generate a relation word; An entity element determination module, used to determine the noun element in the key-value pair as an entity element of a triple in the customs clearance declaration knowledge graph; The attribute element and relationship element determination module is used to determine the other element in the key-value pair and the relationship word as the attribute element and relationship element of the triple respectively.

[0079] Specifically, in the technical solution of the above implementation mode, the key values ​​and key names in the explicit key-value pairs and implicit key-value pairs in the historical customs clearance declaration file are split into independent text elements, and these text elements are used as basic elements to form the first element list.

[0080] In the step of determining the other element in the key-value pair and the relational term as the triple attribute element and the relational element, when the noun element in the key-value pair is the key name of the key-value pair, the other element is the key value of the key-value pair. On the contrary, when the noun element in the key-value pair is the key value of the key-value pair, the other element is the key name of the key-value pair.

[0081] In the step of extracting noun elements from the first element list for constructing the second element list, the noun elements include words or noun phrases whose part of speech is noun.

[0082] Furthermore, the customs clearance declaration knowledge graph construction module also includes a pronoun replacement module, which specifically includes: a pronoun element recognition module, used to recognize the pronoun elements in the first element list; A target word determination module, used for performing semantic recognition on the text content in the historical customs clearance document to determine the target word referred to by the pronoun element, wherein the target word is a noun or a noun phrase; A pronoun element replacement module is used to replace the pronoun elements in the first element list with the target word.

[0083] In the technical solution of the above-mentioned implementation mode, the association relationship establishment module is specifically used to establish an association relationship between the triple identifier of the triple in the customs clearance declaration knowledge graph and the file identification identifier of the historical customs clearance declaration file when a triple is generated based on an explicit key-value pair and an implicit key-value pair in a historical customs clearance declaration file; Alternatively, when a triple generated by an explicit key-value pair or an implicit key-value pair in a historical customs clearance declaration document already exists in the customs clearance declaration knowledge graph, an association relationship is established between the triple identifier of the triple in the customs clearance declaration knowledge graph and the file identification identifier of the historical customs clearance declaration document.

[0084] Furthermore, the triple common feature recognition module includes: A first triplet set determination module, configured to select a triplet set of any customs clearance declaration procedure from customs clearance declaration procedures having the same file type set and determine it as a first triplet set; A second triplet set determination module, configured to determine the triplet sets of other customs clearance declaration programs except the selected customs clearance declaration program among the customs clearance declaration programs having the same file type set as the second triplet set; a triple identifier matching module, configured to traverse each triple in the first triple set to match the triple identifier of the triple with the triple identifier in the second triple set; a characteristic element determination module, configured to determine the corresponding triple as a characteristic element of a triple common feature when any triple in the first triple set exists in all second triple sets at the same time; The feature elements of the same file type set are combined to generate a triple common feature corresponding to the file type set.

[0085] In the technical solution of the present invention, the same file type set refers to the same file type identifiers in the file type set corresponding to multiple historical customs clearance declaration procedures. The same as mentioned here does not include the same order of the file type identifiers in the file type set, that is, when each file type identifier contained in the file type set corresponding to a historical customs clearance declaration procedure exists in the file type set corresponding to another historical customs clearance declaration procedure, it is determined that the file type sets corresponding to the two historical customs clearance declaration procedures are the same. Of course, according to actual implementation requirements, the order codes of various file types can also be configured in the file type set to constrain the order of various file types in the file type set, so that the order of file type identifiers in the same file type set is also the same.

[0086] In the technical solutions of some embodiments of the present invention, it also includes matching weight features of triplets that appear simultaneously in the first triple set and the second triple set, and determining triplets with similar weight features as feature elements of a triple common feature.

[0087] Furthermore, the file type determination rule matching module includes: A basic triplet set generation module, used for processing the basic declaration data to generate a basic triplet set of the target customs clearance declaration procedure; A triplet common feature matching module, used to match the basic triplet set with the triplet common features of each file type determination rule; The customs clearance declaration document type determination module is used to determine the customs clearance declaration document type of the target customs clearance declaration procedure based on the corresponding file type determination rule when the triple common characteristics of any file type determination rule are a subset of the basic triple set.

[0088] The basic declaration data includes the cargo information, cargo order information, cargo transportation information, import and export type and import and export mode and other information associated with the target customs clearance declaration procedure, and the cargo order information specifically includes the transaction subject information, address information and documents such as contracts and invoices of both parties to the transaction. In the technical solutions of some embodiments of the present invention, the customs clearance declaration document generation system establishes a communication connection with an online transaction system, a logistics and transportation system, etc. through an API interface, or establishes a communication connection with an internal management system of an enterprise through an API interface, and obtains the basic declaration data from the online transaction system, the logistics and transportation system and / or the internal management system.

[0089] Furthermore, the basic triple set generation module includes: A text content deconstruction module, used for deconstructing the text content of each file in the basic declaration data to obtain text units in the file content; A key-value pair generation module, used to generate corresponding explicit key-value pairs and implicit key-value pairs based on the position and semantic relationship of the text unit in the file; The triple matching module is used to match the explicit key-value pairs and implicit key-value pairs with the triples in the customs clearance declaration knowledge graph to obtain a basic triple set of the basic declaration data.

[0090] Furthermore, the basic triple set is matched with the triple common features of each file type determination rule, specifically by matching the triple identifier corresponding to the characteristic element of the triple common features of each file type determination rule with the triple identifier of each triple in the basic triple set, and judging whether their triple identifiers are the same; when the triple identifiers corresponding to the triple common features of any file type determination rule exist in the basic triple set, it is determined that the triple common features of the file type determination rule are a subset of the basic triple set.

[0091] Furthermore, the triple matching module includes: An entity element and attribute element extraction module, used to extract entity elements and attribute elements from each file in the basic declaration data; An entity element and attribute element matching module, used for matching the entity element and attribute element with the entity element and attribute element of the triple in the customs clearance declaration knowledge graph to determine the triple corresponding to the key-value pair; The triplet matching module is specifically used to combine the matched triples to generate the basic triplet set.

[0092] Furthermore, the entity element and attribute element extraction module includes: A text element splitting module is used to split the key values ​​and key names in the explicit key-value pairs and implicit key-value pairs in each file in the basic declaration data into independent text elements; A third element list construction module, used to construct the third element list using the text element as a basic element; A fourth element list construction module, used for extracting noun elements from the third element list for constructing a fourth element list; an entity element determination module, configured to determine the noun element in the corresponding key-value pair as an entity element of a triple when the key name and / or key value of any explicit key-value pair or implicit key-value pair exists in the fourth element list; The attribute element determination module is used to determine another element in the key-value pair as the attribute element of the triple.

[0093] Furthermore, the file content generation rule matching module includes: A declaration data acquisition module, used to obtain the declaration data of the target customs clearance declaration procedure from the docked data interface; The declaration data processing module is used to process the declaration data according to the file content generation rules corresponding to each file in the declaration file list to generate corresponding customs clearance declaration files.

[0094] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0095] According to the embodiments of the present invention as described above, these embodiments do not describe all the details in detail, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and changes can be made based on the above description. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can make good use of the present invention and the modified use based on the present invention. The present invention is limited only by the claims and their full scope and equivalents.

Claims

1. A method for automatically generating customs clearance declaration documents, characterized in that: include: Read historical customs clearance declaration documents from the historical database; Parsing the historical customs clearance declaration documents to construct a customs clearance declaration rule base, the customs clearance declaration rule base comprising a file type determination rule for determining a customs clearance declaration document type corresponding to a customs clearance declaration procedure and a file content generation rule for generating the content of each type of customs clearance declaration document; receiving a request for generating a customs clearance declaration document for a target customs clearance declaration procedure, wherein the request for generating a customs clearance declaration document includes basic declaration data of the target customs clearance declaration procedure; Matching the file type determination rule corresponding to the basic declaration data in the customs clearance declaration rule library; Determine the corresponding customs clearance declaration document type according to the document type determination rule; Generate a declaration document list corresponding to the target customs clearance declaration procedure based on the customs clearance declaration document type; The file content generation rules corresponding to each file in the declaration file list are matched in the customs clearance declaration rule library to generate the corresponding customs clearance declaration file.

2. The method for automatically generating customs declaration documents according to claim 1, characterized in that: The steps of parsing the historical customs clearance declaration documents to construct a customs clearance declaration rule base specifically include: Generate a file identification mark corresponding to each historical customs clearance declaration file in the historical database; Deconstruct the text content of each historical customs clearance declaration document to obtain the text units in the document content; Constructing a customs clearance declaration knowledge graph using the text unit as a basic element, wherein the customs clearance declaration knowledge graph includes a triple identifier for each triple; Establishing the association relationship between the triples in the customs clearance declaration knowledge graph and each historical customs clearance declaration document; Based on the association relationship, the triplet identifier of the triplet is associated and stored with the corresponding historical customs clearance declaration file; Generate a triplet set and a file type set for each customs declaration procedure; Identify the common features of triplets of customs declaration procedures with the same set of document types; Establishing a correspondence between the common features of the triples and the set of file types; The file type determination rules of the customs clearance declaration rule base are established based on the correspondence between the triple common features and the file type set.

3. The method for automatically generating customs declaration documents according to claim 2, characterized in that: The step of parsing the historical customs clearance declaration documents to construct a customs clearance declaration rule base also includes: Parsing the historical customs clearance declaration documents to obtain format data, content data and layout data corresponding to each historical customs clearance declaration document; The file content generation rules are generated by matching the format data, content data and layout data of historical customs clearance declaration documents of the same type. The file content generation rules include format rules, content rules and layout rules.

4. The method for automatically generating customs declaration documents according to claim 3, characterized in that: The step of parsing the historical customs clearance declaration files to obtain the content data corresponding to each historical customs clearance declaration file specifically includes: Identify explicit key-value pairs and implicit key-value pairs in the historical customs clearance declaration file according to the position of the file unit in the historical customs clearance declaration file, wherein the explicit key-value pair is a key-value pair containing its key name and key value in the text unit of the historical customs clearance declaration file, and the implicit key-value pair is a key-value pair containing only its key value in the text unit of the historical customs clearance declaration file; Extracting the key names and paragraph numbers of the explicit key-value pairs and the implicit key-value pairs; A correspondence between the key name and the paragraph number is established.

5. The method for automatically generating customs declaration documents according to claim 4, characterized in that: The steps of constructing a customs clearance declaration knowledge graph using the text unit as the basic element specifically include: Constructing a first element list of historical customs clearance declaration documents, wherein the first element list is a collection of key names and key values ​​of the explicit key-value pairs and the implicit key-value pairs; Extracting noun elements from the first element list to construct a second element list; When the key name and / or key value of any explicit key-value pair or implicit key-value pair in the historical customs clearance file exists in the second element list, identifying the semantic relationship of the corresponding key-value pair to generate a relationship word; Determine the noun element in the key-value pair as an entity element of a triple in the customs clearance declaration knowledge graph; The other element in the key-value pair and the relational term are respectively determined as the attribute element and the relational element of the triple.

6. The method for automatically generating customs declaration documents according to claim 2, characterized in that: The steps of identifying the common features of triples of customs declaration procedures with the same set of document types specifically include: A triplet set of any customs clearance declaration procedure is selected from the customs clearance declaration procedures having the same document type set to be determined as a first triplet set; Determine a set of triples of other customs clearance declaration procedures except the selected customs clearance declaration procedure among the customs clearance declaration procedures having the same document type set as a second set of triples; traversing each triple in the first set of triples to match the triple identifier of the triple with the triple identifier in the second set of triples; When any triple in the first triple set exists in all second triple sets at the same time, determining the corresponding triple as a characteristic element of a triple common feature; The feature elements of the same file type set are combined to generate a triple common feature corresponding to the file type set.

7. The method for automatically generating customs declaration documents according to claim 6, characterized in that: The step of matching the file type determination rule corresponding to the basic declaration data in the customs clearance declaration rule library specifically includes: Processing the basic declaration data to generate a basic triplet set of the target customs clearance declaration procedure; Matching the basic triplet set with the triplet common features of each file type determination rule; When the triple common feature of any document type determination rule is a subset of the basic triple set, the customs clearance declaration document type of the target customs clearance declaration procedure is determined based on the corresponding document type determination rule.

8. The method for automatically generating customs declaration documents according to claim 7, characterized in that: The step of processing the basic declaration data to generate a basic triplet set of the target customs clearance declaration procedure specifically includes: Deconstructing the text content of each file in the basic declaration data to obtain text units in the file content; Generate corresponding explicit key-value pairs and implicit key-value pairs based on the position and semantic relationship of the text unit in the file; The explicit key-value pairs and implicit key-value pairs are matched with the triples in the customs clearance declaration knowledge graph to obtain a basic triple set of the basic declaration data.

9. The method for automatically generating customs declaration documents according to claim 8, characterized in that: The step of matching the explicit key-value pairs and implicit key-value pairs with the triples in the customs clearance declaration knowledge graph to obtain a basic triple set of the basic declaration data specifically includes: Extracting entity elements and attribute elements from each file in the basic declaration data; Matching the entity element and the attribute element with the entity element and the attribute element of the triple in the customs clearance declaration knowledge graph to determine the triple corresponding to the key-value pair; The matched triples are combined to generate the basic triple set.

10. A system for automatically generating customs declaration documents, characterized in that: include: The historical customs clearance declaration file reading module is used to read the historical customs clearance declaration files from the historical database; a customs clearance declaration rule base construction module, used for parsing the historical customs clearance declaration documents to construct a customs clearance declaration rule base, wherein the customs clearance declaration rule base includes a file type determination rule for determining the customs clearance declaration document type corresponding to the customs clearance declaration procedure and a file content generation rule for generating the content of each type of customs clearance declaration document; A customs clearance declaration document generation request receiving module, used to receive a customs clearance declaration document generation request for a target customs clearance declaration procedure, wherein the customs clearance declaration document generation request includes basic declaration data of the target customs clearance declaration procedure; A file type determination rule matching module, used to match the file type determination rule corresponding to the basic declaration data in the customs clearance declaration rule library; A customs clearance declaration document type determination module, used to determine the corresponding customs clearance declaration document type according to the document type determination rule; A declaration document list generating module, used for generating a declaration document list corresponding to the target customs clearance declaration procedure based on the customs clearance declaration document type; The file content generation rule matching module is used to match the file content generation rule corresponding to each file in the declaration file list in the customs clearance declaration rule library to generate the corresponding customs clearance declaration file.

Citation Information

Patent Citations

  • Entity recognition model training method, image recognition method, device and equipment

    CN115761770A

  • Customs import and export declaration method, system and equipment based on intelligent coding and medium

    CN117010779A

  • Carbon policy knowledge graph construction system based on text analysis

    CN117407535A

  • Collecting, organizing, and searching knowledge about a dataset

    US20160132572A1