Personalized identification configuration method based on semantic understanding

Through a personalized identification and configuration method based on semantic understanding, using the BGE M3-Embedding model and neural network computing, the data identification problem in the traditional customs declaration process is solved, and high accuracy and high efficiency recognition is achieved, helping enterprises to enhance in international trade Competitive advantage.

CN118967343APending Publication Date: 2024-11-15CHONGQING SUPERLUCY SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411070207.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

The traditional customs declaration process is complicated, the information transmission speed is slow, the paper and electronic version coexist, and the data formats of different companies are different, making it difficult to achieve high-accuracy intelligent data identification and automatic customs declaration.

Method used

Using a personalized identification and configuration method based on semantic understanding, the text is characterized and configuration feature library is fused through the large common language model BGE M3-Embedding, and similarity calculation is performed in combination with the three-layer neural network, and post-processing and rearrangement to obtain the best Best configuration category.

Benefits of technology

It achieves high accuracy (up to 98%) and high efficiency data identification, solves the problem of identifying the diversity of customs declaration data forms, and improves processing efficiency and system maintainability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118967343A_ABST
    Figure CN118967343A_ABST
Patent Text Reader

Abstract

The invention relates to a personalized recognition configuration method based on semantic comprehension. The method comprises the following steps: S1, obtaining a text from a data file; s2, performing feature representation on the text by using a large-scale general language model BGE M3-Embedding, performing splicing fusion on the text and each set of configuration features in a personalized configuration feature library constructed in the same way, and taking a feature vector after splicing fusion as feature representation of the text and each set of configuration; s3, the feature vectors are put into a model for similarity calculation, similarity scores of the text and each set of configuration are obtained, and the most similar configuration serves as the personalized configuration to which the file belongs; and S4, post-processing rearrangement is carried out, rule calculation is carried out on personalized combinations of the highest scores, the score of each result combination is readjusted, and an optimal configuration category is obtained. The method has the advantages of high accuracy, strong generalization and stable processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of automated information processing, and in particular to a personalized recognition configuration method based on semantic understanding. Background Art

[0002] With the acceleration of global economic integration, the vigorous development of international trade has made the logistics industry increasingly important and complex. In this process, customs declaration, as an indispensable part of import and export trade, plays a vital role. An efficient customs declaration process can not only accelerate the circulation of goods, but also reduce corporate operating costs and enhance international competitiveness.

[0003] However, the traditional customs declaration process is cumbersome and time-consuming, and there are still problems such as the widespread use of paper documents, slow information transmission, and inability to fully share information between departments. In addition, customs declaration work requires high professionalism, but there is a relative shortage of professional talents in the market, and companies face difficulties in recruitment and training. With the rapid development of artificial intelligence and big data technology, automation and intelligence are beginning to emerge in the customs declaration industry. However, most companies are not thorough in data transformation, and there are both paper and electronic versions. At the same time, in most cases, different customs declaration companies have different data formats, and the customs declaration data of the same company also varies. It is difficult to make a unified set of intelligent data recognition automatic customs declaration system while ensuring high accuracy, which brings huge challenges to the implementation of intelligence in the customs declaration industry. Summary of the invention

[0004] In view of the above-mentioned deficiencies in the prior art, the technical problem to be solved by this patent application is how to provide a personalized recognition configuration method based on semantic understanding with high accuracy, strong generalization and stable processing efficiency.

[0005] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0006] A personalized recognition configuration method based on semantic understanding includes the following steps: S1: obtaining text from a data file; S2: using a large general language model BGE M3-Embedding to represent the text, and concatenating and fusing the text with each set of configuration features in a personalized configuration feature library constructed in the same way, and the concatenated and fused feature vectors will be used as feature representations of the text and each set of configurations; S3: putting the above feature vectors into the model to perform similarity calculations, obtaining similarity scores between the text and each set of configurations, and taking the most similar configuration as the personalized configuration to which the file belongs; S4: performing post-processing rearrangement, performing rule calculations on personalized combinations with the highest scores, re-adjusting the scores of each result combination, and obtaining the best configuration category;

[0007] As an optimization, in step S1, the method of acquiring text includes but is not limited to direct acquisition and acquisition using OCR technology.

[0008] As an optimization, in step S2, when the text is represented by features, the BGE M3-Embedding model generates text embedding representation through a bidirectional encoder, a multi-layer structure, and pre-training and fine-tuning techniques, which can capture the semantic information of the text.

[0009] As an optimization, in step S2, the personalized configuration feature library is constructed by the feature vector of each personalized configuration; using the collected data set, the text feature representations of the files in each configuration category are fused together as the feature vector of the personalized configuration.

[0010] As an optimization, in step S2, the text feature representation and the feature vector of each set of personalized configuration are concatenated and fused into a feature vector with a length of 2048, which is input into the model as the feature vector of the whole combination for similarity calculation.

[0011] As an optimization, the model for similarity calculation in step S3 uses a three-layer neural network to build a similarity model.

[0012] As an optimization, in step S3, when similarity calculation is performed, the obtained text and n configurations are fused to form n×2048 feature vectors and input into the similarity model. After layer-by-layer mapping, n×1 feature vectors are obtained, which represent the final similarity scores of each configuration and text, using the following formula:

[0013] Y n×512 =f sigmoid (f RELU (f RELU (X n×2048 W 2048×1024 +b1)W 1024×512 +b2)W 512×1 +b3)

[0014] The data set was divided into two parts in a ratio of 7:3, and 20 rounds of training were performed on the training set to obtain the final results.

[0015] As an optimization, when post-processing rearrangement is performed in step S4, it is based on whether the personalized configuration information matches the file; the configured personalized processing information is stored in the configuration database, which contains the keywords to be extracted and their regular matching methods, and the similarity score is adjusted by counting the number of matches and the set threshold.

[0016] The present invention has the following effects:

[0017] The present invention performs text processing, feature construction, similarity calculation and personalized configuration rearrangement on complex files, matches each set of information with its unique personalized configuration, and solves the recognition problem caused by the diverse forms of customs declaration information.

[0018] (1) In the text processing stage, the system directly extracts and processes the text content in the file and uses the TF-IDF method to effectively shorten the long text, greatly improving the processing efficiency;

[0019] (2) In the feature construction stage, the system introduces the advanced BGE M3-Embedding model, which generates high-quality text embedding representations, enabling the system to process text data with mixed languages ​​and complex structures. By concatenating and fusing the text feature vector with the configuration category feature vector, the system obtains a feature vector that can fully characterize the relationship between the text and the configuration category.

[0020] (3) The similarity between the text and each configuration was then calculated using the training model, achieving an accuracy of approximately 96.7%;

[0021] (4) In order to enhance the control over the results and improve the maintainability of the system, this paper also designs a personalized configuration rearrangement module. By adjusting and optimizing the similarity scores, the confidence of the recognition results is further improved, and the final accuracy rate reaches 98%.

[0022] In summary, the semantic-based personalized recognition and configuration system has achieved remarkable results in the personalized processing of complex customs declaration materials. With the continuous optimization and improvement of the system, it can further improve the processing efficiency and accuracy in practical applications, thereby helping enterprises to consolidate and enhance their competitive advantages in international trade. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 This is a method flow chart of a personalized recognition configuration method based on semantic understanding described in the present invention.

[0024] Figure 2 The figure is a flow chart of the personalized identification configuration method of the present invention in practice.

[0025] Figure 3 This is the overall process of the personalized recognition configuration described in the present invention.

[0026] Figure 4 A schematic diagram of constructing a configuration category feature library according to the present invention.

[0027] Figure 5 This is a flow chart of the similarity prediction process described in the present invention.

[0028] Figure 6 Schematic diagram of the similar model structure of the present invention

[0029] Figure 7 This is a diagram of the Loss change process in the training process described in the present invention.

[0030] Figure 8 This is a flowchart of the personalized configuration rearrangement described in the present invention. DETAILED DESCRIPTION

[0031] The present invention is further described in detail below in conjunction with the accompanying drawings. In the description of the present invention, it should be understood that the directions or positional relationships indicated by directional words such as "upper, lower" and "top, bottom" are usually based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description. Unless otherwise stated, these directional words do not indicate or imply that the devices or components referred to must have a specific direction or be constructed and operated in a specific direction, and therefore cannot be understood as limiting the scope of protection of the present invention; the directional words "inside and outside" refer to the inside and outside relative to the contours of each component itself.

[0032] like Figure 1-8 As shown, a personalized recognition configuration method based on semantic understanding includes the following steps: S1: obtaining text from a data file; S2: using a large general language model BGE M3-Embedding to represent the text, and concatenating and fusing it with each set of configuration features in a personalized configuration feature library constructed in the same way, and the concatenated feature vector will be used as the feature representation of the text and each set of configurations; S3: putting the above feature vector into the model for similarity calculation, obtaining the similarity score between the text and each set of configurations, and taking the most similar configuration as the personalized configuration to which the file belongs; S4: performing post-processing rearrangement, performing rule calculation on the personalized combinations with the highest scores, re-adjusting the score of each result combination, and obtaining the best configuration category.

[0033] In this embodiment, the method of acquiring text includes but is not limited to direct acquisition and acquisition using OCR technology.

[0034] Specifically, the original text extracted from the file data saves the structural position information of the original data in the form of an array. Different rows of data in the array are separated by line breaks, and sentences in the same row are separated by tabs to obtain a text that can be used initially. The TF-IDF (term frequency-inverse document frequency) method is used to shorten the text. According to the words corresponding to the top 50 vectors with the highest weights, the sentences containing these words are screened out and aggregated into a whole according to the above method as the recognition input text.

[0035] In this embodiment, in step S2, when the text is represented by features, the BGE M3-Embedding model generates a text embedding representation through a bidirectional encoder, a multi-layer structure, and pre-training and fine-tuning technology, which can capture the semantic information of the text.

[0036] Specifically, BGE M3-Embedding is a deep learning model based on bidirectional encoder representation, which excels in multilingualism, versatility and multi-granularity. It can support more than 100 working languages ​​and input texts of 8192 lengths.

[0037] Specifically, in view of the multi-language mixture and strong language structure in the document text, the BGE M3-Embedding model can directly encode the text into a feature vector of length 1024.

[0038] In this embodiment, in step S2, the personalized configuration feature library is constructed by the feature vector of each personalized configuration; using the collected data set, the text feature representations of the files in each configuration category are fused together as the feature vector of the personalized configuration.

[0039] Specifically, simple addition is used to perform feature fusion.

[0040] In this embodiment, in step S2, the text feature representation and the feature vector of each set of personalized configuration are concatenated and fused into a feature vector with a length of 2048, which is input into the model as the feature vector of the whole combination for similarity calculation.

[0041] In this embodiment, the model for similarity calculation in step S3 uses a three-layer neural network to build a similarity model.

[0042] In this embodiment, in step S3, when similarity calculation is performed, the obtained text and n configurations are fused to form n×2048 feature vectors and input into the similarity model. After layer-by-layer mapping, n×1 feature vectors are obtained, which represent the final similarity scores of each configuration and text, using the following formula:

[0043] Y n×512 =f sigmoid (f RELU (f RELU (X n×2048 W 2048×1024 +b1)W 1024×512 +b2)W 512×1 +b3)

[0044] The data set was divided into two parts in a ratio of 7:3, and 20 rounds of training were performed on the training set to obtain the final results.

[0045] Specifically, in the first 10 rounds of training, the loss of the model on the training set dropped rapidly and approached stability, but the loss on the test set was still oscillating. Finally, after 20 rounds of training, the loss of the model on the training set was 0.11, and the loss on the test set was 0.085. The accuracy of the test on the entire dataset was about 96.7%.

[0046] In this embodiment, when post-processing rearrangement is performed in step S4, it is based on whether the personalized configured information matches the file; the configured personalized processing information is stored in the configuration database, which contains the keywords to be extracted and their regular matching methods, and the similarity score is adjusted by counting the number of matches and a certain threshold.

[0047] The present invention has the following effects:

[0048] The present invention matches each set of information with its unique personalized configuration by performing text processing, feature construction, similarity calculation and personalized configuration rearrangement on complex files. At the same time, personalized configurations that may be added later can also be directly added using this method. It has strong generalization and solves the recognition problem caused by the diverse forms of customs declaration information.

[0049] (1) In the text processing stage, the system directly extracts and processes the text content in the file and uses the TF-IDF method to effectively shorten the long text, greatly improving the processing efficiency;

[0050] (2) In the feature construction stage, the system introduces the advanced BGE M3-Embedding model, which generates high-quality text embedding representations, enabling the system to process text data with mixed languages ​​and complex structures. By concatenating and fusing the text feature vector with the configuration category feature vector, the system obtains a feature vector that can fully characterize the relationship between the text and the configuration category.

[0051] (3) The similarity between the text and each configuration was then calculated using the training model, achieving an accuracy of approximately 96.7%;

[0052] (4) In order to enhance the control over the results and improve the maintainability of the system, this paper also designs a personalized configuration rearrangement module. By adjusting and optimizing the similarity scores, the confidence of the recognition results is further improved, and the final accuracy rate reaches 98%.

[0053] In summary, the semantic-based personalized recognition and configuration system has achieved remarkable results in the personalized processing of complex customs declaration materials. With the continuous optimization and improvement of the system, it can further improve the processing efficiency and accuracy in practical applications, thereby helping enterprises to consolidate and enhance their competitive advantages in international trade.

[0054] Finally, it should be noted that those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A personalized recognition configuration method based on semantic understanding, characterized in that: The following steps are involved: S1: Get text from data files; S2: Use the large-scale general language model BGE M3-Embedding to represent the text features, and concatenate and fuse them with each set of configuration features in the personalized configuration feature library built in the same way. The concatenated and fused feature vectors will be used as the feature representation of the text and each set of configurations. S3: Put the above feature vector into the model to calculate the similarity, obtain the similarity score between the text and each configuration, and take the most similar configuration as the personalized configuration to which the file belongs; S4: Perform post-processing rearrangement, perform rule calculation on the personalized combinations with the highest scores, readjust the score of each result combination, and obtain the best configuration category.

2. The personalized recognition configuration method based on semantic understanding according to claim 1, characterized in that: In step S1, the method of acquiring the text includes but is not limited to direct acquisition and acquisition using OCR technology.

3. The personalized recognition configuration method based on semantic understanding according to claim 2, characterized in that: In step S2, when the text is represented by features, the BGE M3-Embedding model generates text embedding representation through a bidirectional encoder, a multi-layer structure, and pre-training and fine-tuning techniques, which can capture the semantic information of the text.

4. The personalized recognition configuration method based on semantic understanding according to claim 3 is characterized in that: In step S2, a personalized configuration feature library is constructed from the feature vectors of each personalized configuration; using the collected data set, the text feature representations of the files in each configuration category are fused together as the feature vectors of the personalized configuration.

5. The personalized recognition configuration method based on semantic understanding according to claim 4, characterized in that: In step S2, the text feature representation and the feature vector of each set of personalized configuration are concatenated and fused into a feature vector with a length of 2048, which is input into the model as the feature vector of the whole combination for similarity calculation.

6. The personalized recognition configuration method based on semantic understanding according to claim 5, characterized in that: The model for similarity calculation in step S3 uses a three-layer neural network to build a similarity model.

7. The personalized recognition configuration method based on semantic understanding according to claim 6, characterized in that: In step S3, when similarity calculation is performed, the obtained text and n configurations are fused to form n×2048 feature vectors and input into the similarity model. After layer-by-layer mapping, n×1 feature vectors are obtained, which represent the final similarity scores of each configuration and text, using the following formula: Y n×512 =f sigmoid (f RELU (f RELU (X n×2048 W 2048×1024 +b1)W 1024×512 +b2)W 512×1 +b3) The data set was divided into two parts in a ratio of 7:3, and 20 rounds of training were performed on the training set to obtain the final results.

8. The personalized recognition configuration method based on semantic understanding according to claim 6, characterized in that: When post-processing rearrangement is performed in step S4, it is based on whether the personalized configuration information matches the file; the configured personalized processing information is stored in the configuration database, which contains the keywords to be extracted and their regular matching methods. The similarity score is adjusted by counting the number of matches and the set threshold.