Waybill verification method and device
The method and device automate bill of lading verification using recognition models and database queries, addressing inefficiencies and inaccuracies in manual processes, ensuring accurate and efficient compliance checks.
Patent Information
- Application Number
- CN202110259014.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-10
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2041-03-10
AI Technical Summary
The existing manual review method of bills of lading is inefficient and difficult to ensure accuracy, lacking a more accurate and efficient verification process.
A method and device utilizing a bill of lading element recognition model to identify and verify information from the bill of lading, combined with official website information and blacklist database queries, to generate verification results and reports.
Achieves accurate and efficient review of bills of lading, reducing fraud risks and improving verification efficiency by automating the process.
Smart Images

Figure CN112862409B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information processing technology, and in particular to a bill of lading verification method and device. Background Art
[0002] The bill of lading is the core property document and logistics document in international trade. In the international document business, the customer will hand over the original and duplicate bill of lading to the issuing bank. The issuing bank's business personnel will scan the paper bill of lading into an electronic image. The back-end professional department will verify the logistics information on the official website of the corresponding shipping company based on the bill of lading information, and then conduct compliance verification in the sanctions blacklist database based on the commodity information and trade participants in the bill of lading. This manual review method of the bill of lading is inefficient and difficult to guarantee accuracy. The existing technology lacks a more accurate and efficient method for reviewing bills of lading. Summary of the invention
[0003] In order to solve the technical problems in the above-mentioned background technology, the present invention proposes a bill of lading verification method and device.
[0004] In order to achieve the above object, according to one aspect of the present invention, a method for verifying a bill of lading is provided, the method comprising:
[0005] Get the text information of the target bill of lading;
[0006] Using a preset bill of lading element recognition model to identify bill of lading element information in the text information;
[0007] Obtaining official website information of the target bill of lading from the official website of the shipping company corresponding to the target bill of lading according to the bill of lading number of the target bill of lading;
[0008] The bill of lading element information is verified based on the official website information to obtain a first verification result.
[0009] Optionally, the bill of lading verification method further includes:
[0010] Obtaining the blacklist query results corresponding to the trade participants of the target bill of lading and the blacklist query results corresponding to the shipping company queried from the sanctions blacklist risk database;
[0011] Determining the risk level of the trading participant according to the blacklist query result corresponding to the trading participant, and determining the risk level of the shipping company according to the blacklist query result corresponding to the shipping company;
[0012] A second verification result is generated according to the risk level of the trading participant and the risk level of the shipping company.
[0013] Optionally, the bill of lading verification method further includes:
[0014] A verification report is generated according to the first verification result and the second verification result, and the verification report is sent to a preset business operator.
[0015] Optionally, the using a preset bill of lading element recognition model to recognize bill of lading element information in the text information specifically includes:
[0016] If there is a bill of lading element extraction template corresponding to the shipping company, extracting bill of lading element information from the text information using the bill of lading element extraction template;
[0017] If there is no bill of lading element extraction template corresponding to the shipping company, a preset bill of lading element recognition model is used to recognize the bill of lading element information in the text information.
[0018] Optionally, the bill of lading verification method further includes:
[0019] Acquire a bill of lading image of the target bill of lading;
[0020] Performing noise reduction and binarization processing on the bill of lading image to obtain a processed bill of lading image;
[0021] The text information is recognized from the processed waybill image according to a preset text recognition model.
[0022] Optionally, the performing denoising and binarization processing on the waybill image to obtain a processed waybill image specifically includes:
[0023] Performing noise reduction processing on the bill of lading image to obtain a noise-reduced bill of lading image;
[0024] Binarizing the de-noised bill of lading image to obtain a binary image of the bill of lading;
[0025] The binary image of the bill of lading is subjected to noise point and interference line removal operations to obtain a processed bill of lading image.
[0026] Optionally, the bill of lading element information includes: shipping company name, bill of lading number, trade participant name, flight number, container number, loading port, unloading port and at least one of container logistics information.
[0027] In order to achieve the above object, according to another aspect of the present invention, a bill of lading verification device is provided, the device comprising:
[0028] A text information acquisition module is used to acquire the text information of the target bill of lading;
[0029] A waybill element information acquisition module, used to identify the waybill element information in the text information using a preset waybill element recognition model;
[0030] An official website information acquisition module, used to acquire the official website information of the target bill of lading from the official website of the shipping company corresponding to the target bill of lading according to the bill of lading number of the target bill of lading;
[0031] The first verification module is used to verify the element information of the bill of lading based on the official website information to obtain a first verification result.
[0032] Optionally, the bill of lading verification device further includes:
[0033] A blacklist query result acquisition module is used to obtain the blacklist query result corresponding to the trade participant of the target bill of lading and the blacklist query result corresponding to the shipping company queried from the sanctions blacklist risk database;
[0034] A risk level determination module, used to determine the risk level of the trading participant according to the blacklist query result corresponding to the trading participant, and to determine the risk level of the shipping company according to the blacklist query result corresponding to the shipping company;
[0035] The second verification module is used to generate a second verification result according to the risk level of the trade participant and the risk level of the shipping company.
[0036] Optionally, the bill of lading verification device further includes:
[0037] The verification report sending module is used to generate a verification report according to the first verification result and the second verification result, and send the verification report to a preset business operator.
[0038] In order to achieve the above-mentioned purpose, according to another aspect of the present invention, a computer device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the above-mentioned bill of lading verification method when executing the computer program.
[0039] In order to achieve the above-mentioned purpose, according to another aspect of the present invention, a computer-readable storage medium is further provided, wherein the computer-readable storage medium stores a computer program, and the computer program implements the steps in the above-mentioned bill of lading verification method when executed in a computer processor.
[0040] The beneficial effects of the present invention are as follows: the present invention extracts bill of lading element information from the text information of the bill of lading according to a preset bill of lading element recognition model, and obtains the official website information of the target bill of lading from the official website of the shipping company, and then automatically verifies the bill of lading element information based on the official website information to obtain a verification result, thereby achieving accurate and efficient review of the bill of lading, and solving the technical problems that the existing method of manually reviewing the bill of lading is low in efficiency and difficult to ensure accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0042] Figure 1 This is a first flow chart of a method for verifying a shipping order according to an embodiment of the present invention;
[0043] Figure 2 is a second flow chart of the method for verifying a shipping order according to an embodiment of the present invention;
[0044] Figure 3 is a flow chart of obtaining bill of lading element information according to an embodiment of the present invention;
[0045] Figure 4 is a flow chart of obtaining text information of a bill of lading according to an embodiment of the present invention;
[0046] Figure 5 is a flow chart of processing a bill of lading image according to an embodiment of the present invention;
[0047] Figure 6 This is a first structural block diagram of a device for verifying a shipping order according to an embodiment of the present invention;
[0048] Figure 7 This is a second structural block diagram of the device for verifying a shipping order according to an embodiment of the present invention;
[0049] Figure 8 It is a schematic diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0050] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0051] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0052] It should be noted that the terms "including" and "having" and any variations thereof in the specification and claims of the present invention and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or apparatus.
[0053] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0054] It should be noted that the bill of lading verification method and device of the present invention can be used in the financial field, and can also be used in other technical fields.
[0055] In order to reduce the fraud risks caused by false trade background, commodity information, sanctions on trade participants, etc., the present invention proposes an intelligent multi-dimensional verification method for waybills. By using OCR image recognition, NLP natural language processing, Selenium-based dynamic crawler and other technologies, automatic review of waybills is achieved.
[0056] Figure 1 is a first flow chart of the method for verifying a shipping order according to an embodiment of the present invention. Figure 1 As shown, in one embodiment of the present invention, the bill of lading verification method of the present invention includes steps S101 to S104.
[0057] Step S101, obtaining text information of the target waybill.
[0058] In an embodiment of the present invention, the text information of the target bill of lading may be text content in the target bill of lading. In an embodiment of the present invention, the text information of the target bill of lading may be obtained by recognizing the bill of lading image of the target bill of lading through a preset text recognition model.
[0059] Step S102: using a preset bill of lading element recognition model to recognize bill of lading element information in the text information.
[0060] Since each shipping company has certain differences in the areas and keywords that display information such as "shipping company name", "flight number", and "container" in the bill of lading image, after obtaining the text information of the bill of lading, it is also necessary to analyze and process the text information to obtain the bill of lading element information.
[0061] In one embodiment of the present invention, the bill of lading element information of the present invention specifically includes: at least one of: shipping company name, bill of lading number, trade participant name, flight number, container number, loading port, unloading port and container logistics information.
[0062] In one embodiment of the present invention, the present invention can use natural language processing technology to train a bill of lading element recognition model, and identify the bill of lading element information in the text information of the target bill of lading according to the bill of lading element recognition model. In one embodiment of the present invention, the bill of lading element recognition model of the present invention can be trained using any available machine learning algorithm in the prior art, such as FastText.
[0063] The specific process of training the bill of lading element recognition model of the present invention can include the following steps 1 to 4.
[0064] Step 1): Extract text information from the inventory delivery note image as sample data for model training.
[0065] Step 2): Process and correct the sample data, extract the feature values of the sample data, perform feature dimension reduction, feature null value processing, and target value conversion processing. At the same time, label the sample data, such as "B / L No", "Booking No" as the bill of lading number.
[0066] Step 3): Model training. The present invention needs to use natural language processing technology for semantic analysis. FastText is the mainstream natural language processing training model in the industry, so the present invention selects the FastText model. Each word is input into the FastText model, and according to the training results, the probability of the word belonging to different tags is output.
[0067] Step 4): Model evaluation: Use samples from the validation set to make predictions on the trained model to verify whether the accuracy of the model predictions meets the requirements. If not, perform iterative tuning.
[0068] Step S103, obtaining the official website information of the target bill of lading from the official website of the shipping company corresponding to the target bill of lading according to the bill of lading number of the target bill of lading.
[0069] In one embodiment of the present invention, this step uses Python+Selenium to drive the Chrome headless browser to access the official website of the corresponding shipping company according to the "shipping company name" and "bill of lading number" in the target bill of lading. Then, according to the coordinates of the required parsed data sorted out by the corresponding shipping company, the corresponding data is obtained through XPath rule parsing and repackaged into a unified JSON format message according to unified rules to obtain the official website information.
[0070] In an embodiment of the present invention, the official website information at least includes each item of bill of lading element information.
[0071] Step S104, verifying the bill of lading element information based on the official website information to obtain a first verification result.
[0072] In an embodiment of the present invention, this step compares and verifies the bill of lading element information obtained in step S102 with the integrated JSON message (i.e., official website information) retrieved from the shipping company's official website in step S103 one by one to obtain a first verification result.
[0073] In one embodiment of the present invention, the verification of this step can specifically be to verify whether there are any mismatch items with the official website. If not, the first verification result is that the verification is passed. If so, the first verification result is that the verification is not passed and the specific mismatch items are given.
[0074] It can be seen that the present invention extracts the bill of lading element information from the text information of the bill of lading according to the preset bill of lading element recognition model, and queries the official website information of the target bill of lading from the official website of the shipping company, and then automatically verifies the bill of lading element information based on the official website information to obtain the verification result, thereby achieving accurate and efficient review of the bill of lading, and solving the technical problems that the existing method of manually reviewing the bill of lading is low in efficiency and difficult to ensure accuracy.
[0075] Figure 2 is a second flow chart of the method for verifying a shipping order according to an embodiment of the present invention. Figure 2 As shown, in one embodiment of the present invention, the bill of lading verification method of the present invention also includes steps S201 to S203.
[0076] Step S201, obtaining the blacklist query results corresponding to the trading participants of the target bill of lading and the blacklist query results corresponding to the shipping company queried from the sanctions blacklist risk database.
[0077] In the embodiment of the present invention, this step can specifically access the sanction blacklist risk database by driving the Chrome headless browser through Python+Selenium. Locate the search box through XPath, and drive the Chrome headless browser through Selenium to enter "trading party name" and "shipping company name" in the input box for retrieval, and obtain the blacklist query results corresponding to the trading party and the blacklist query results corresponding to the shipping company.
[0078] Step S202, determining the risk level of the trading participant according to the blacklist query result corresponding to the trading participant, and determining the risk level of the shipping company according to the blacklist query result corresponding to the shipping company.
[0079] Step S203: generating a second verification result according to the risk level of the trading party and the risk level of the shipping company.
[0080] In one embodiment of the present invention, this step specifically determines whether the risk level of the trading participant and the risk level of the shipping company exceed a preset threshold. If neither exceeds the threshold, the second verification result is a passed verification; if at least one exceeds the threshold, the second verification result is a failed verification, and the specific items exceeding the threshold are given.
[0081] In one embodiment of the present invention, after the second verification result is obtained in the above step S203, the present invention further generates a verification report based on the first verification result and the second verification result, and sends the verification report to a preset business operator. In one embodiment of the present invention, the present invention pre-sets corresponding prompt information for each verification result. In this step, the prompt information corresponding to the first verification result and the second verification result can be obtained respectively, and then the verification report is generated in combination with the prompt information corresponding to the first verification result and the prompt information corresponding to the second verification result.
[0082] In an optional embodiment of the present invention, the verification report of the present invention may be specifically in the form of the following table.
[0083]
[0084] Figure 3 Flow chart of obtaining bill of lading element information according to an embodiment of the present invention, such as Figure 3As shown, in one embodiment of the present invention, the above step S102 uses a preset bill of lading element recognition model to recognize the bill of lading element information in the text information, specifically including step S301 and step S302.
[0085] Step S301: If there is a bill of lading element extraction template corresponding to the shipping company, the bill of lading element extraction template is used to extract bill of lading element information from the text information.
[0086] The present invention combines the bill of lading images commonly used in internal business and finds that the shipping companies involved in the actual business are basically the top 20 shipping companies in terms of shipping business volume and market share. Therefore, a bill of lading element extraction template is archived for the bills of lading of these 20 shipping companies. Through the bill of lading element extraction template, these 20 shipping companies can quickly parse and obtain the bill of lading element information.
[0087] Step S302: If there is no bill of lading element extraction template corresponding to the shipping company, a preset bill of lading element recognition model is used to recognize the bill of lading element information in the text information.
[0088] Figure 4 Flow chart of obtaining text information of a bill of lading according to an embodiment of the present invention, such as Figure 4 As shown, the text information in the above step S101 is specifically obtained through steps S401 to S403.
[0089] Step S401, obtaining a bill of lading image of the target bill of lading.
[0090] Step S402, performing noise reduction and binarization processing on the bill of lading image to obtain a processed bill of lading image.
[0091] Step S403: Recognize the text information from the processed waybill image according to a preset text recognition model.
[0092] In one embodiment of the present invention, the text recognition model of the present invention can be implemented based on OpenCV+tesseract. In one embodiment of the present invention, the present invention can train the text recognition model based on tesseract. Since there are certain differences in the formats of bills of lading of various shipping companies, the present invention needs to continuously perform text recognition training on bills of lading of different shipping companies to improve the recognition accuracy of the text recognition model.
[0093] Figure 5 FIG. 1 is a flow chart of processing a bill of lading image according to an embodiment of the present invention. Figure 5As shown, the above step S402 performs denoising and binarization on the waybill image to obtain the processed waybill image, which specifically includes steps S501 to S503.
[0094] Step S501, performing noise reduction processing on the bill of lading image to obtain a noise-reduced bill of lading image.
[0095] In the embodiment of the present invention, this step specifically removes the noise such as the background and the like of the bill of lading image, retains only the text area, and obtains the de-noised bill of lading image.
[0096] Step S502, binarizing the de-noised waybill image to obtain a binarized image of the waybill.
[0097] Step S503, performing noise point and interference line removal operations on the binary image of the bill of lading to obtain a processed bill of lading image.
[0098] In an embodiment of the present invention, this step specifically performs noise point and interference line removal operations on the binary image of the bill of lading to eliminate its interference with the text area, thereby obtaining a de-interferenced bill of lading image, that is, a processed bill of lading image.
[0099] It can be seen from the above embodiments that the present invention automatically and quickly verifies trade compliance through OCR image recognition, NLP natural language processing, and Python+selenium crawler technology, and ensures that international trade business settled through banks is authentic and compliant through multi-dimensional intelligent detection, thereby reducing the labor cost of the issuing bank and improving verification efficiency.
[0100] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0101] Based on the same inventive concept, an embodiment of the present invention also provides a bill of lading verification device, which can be used to implement the bill of lading verification method described in the above embodiment, as described in the following embodiment. Since the principle of solving the problem by the bill of lading verification device is similar to that of the bill of lading verification method, the embodiment of the bill of lading verification device can refer to the embodiment of the bill of lading verification method, and the repeated parts will not be repeated. As used below, the term "unit" or "module" can be a combination of software and / or hardware that implements the predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0102] Figure 6 is a first structural block diagram of the delivery note verification device according to an embodiment of the present invention, such as Figure 6 As shown, in one embodiment of the present invention, the bill of lading verification device of the present invention includes:
[0103] A text information acquisition module 1 is used to acquire text information of a target bill of lading;
[0104] A waybill element information acquisition module 2 is used to identify the waybill element information in the text information using a preset waybill element recognition model;
[0105] The official website information acquisition module 3 is used to acquire the official website information of the target bill of lading from the official website of the shipping company corresponding to the target bill of lading according to the bill of lading number of the target bill of lading;
[0106] The first verification module 4 is used to verify the bill of lading element information based on the official website information to obtain a first verification result.
[0107] Figure 7 is a second structural block diagram of the delivery note verification device according to an embodiment of the present invention, such as Figure 7 As shown, in one embodiment of the present invention, the bill of lading verification device of the present invention further includes:
[0108] A blacklist query result acquisition module 5 is used to obtain the blacklist query result corresponding to the trade participant of the target bill of lading and the blacklist query result corresponding to the shipping company queried from the sanctions blacklist risk database;
[0109] A risk level determination module 6, configured to determine the risk level of the trading party according to the blacklist query result corresponding to the trading party, and to determine the risk level of the shipping company according to the blacklist query result corresponding to the shipping company;
[0110] The second verification module 7 is used to generate a second verification result according to the risk level of the trade participant and the risk level of the shipping company.
[0111] In one embodiment of the present invention, the bill of lading verification device of the present invention further includes:
[0112] The report sending module is used to generate a verification report according to the first verification result and the second verification result, and send the verification report to a preset business operator.
[0113] In one embodiment of the present invention, the bill of lading element information acquisition module 2 specifically includes:
[0114] A first processing unit is configured to extract bill of lading element information from the text information by using a bill of lading element extraction template corresponding to the shipping company if the bill of lading element extraction template exists;
[0115] The second processing unit is used to use a preset bill of lading element recognition model to identify the bill of lading element information in the text information if there is no bill of lading element extraction template corresponding to the shipping company.
[0116] In one embodiment of the present invention, the bill of lading verification device of the present invention further includes:
[0117] An image acquisition module, used to acquire a bill of lading image of the target bill of lading;
[0118] An image processing module, used for performing noise reduction and binarization processing on the bill of lading image to obtain a processed bill of lading image;
[0119] The text information recognition module is used to recognize the text information from the processed waybill image according to a preset text recognition model.
[0120] In one embodiment of the present invention, the image processing module specifically includes:
[0121] A noise reduction processing unit, used to perform noise reduction processing on the bill of lading image to obtain a noise-reduced bill of lading image;
[0122] A binarization processing unit, used to perform binarization processing on the de-noised bill of lading image to obtain a binarized image of the bill of lading;
[0123] The noise removal processing unit is used to perform noise removal and interference line removal operations on the binary image of the bill of lading to obtain a processed bill of lading image.
[0124] In order to achieve the above object, according to another aspect of the present application, a computer device is also provided. Figure 8 As shown, the computer device includes a memory, a processor, a communication interface and a communication bus. A computer program that can be executed on the processor is stored in the memory. When the processor executes the computer program, the steps in the above-mentioned embodiment method are implemented.
[0125] The processor may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.
[0126] The memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer executable programs and units, such as the corresponding program units in the above method embodiments of the present invention. The processor executes various functional applications of the processor and works data processing by running the non-transitory software programs, instructions and modules stored in the memory, that is, implementing the method in the above method embodiments.
[0127] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0128] The one or more units are stored in the memory, and when executed by the processor, the method in the above embodiment is performed.
[0129] The specific details of the above-mentioned computer device can be understood by referring to the corresponding related descriptions and effects in the above-mentioned embodiments, and will not be repeated here.
[0130] In order to achieve the above purpose, according to another aspect of the present application, a computer-readable storage medium is also provided, wherein the computer-readable storage medium stores a computer program, and the computer program implements the steps in the above-mentioned bill of lading verification method when executed in a computer processor. Those skilled in the art can understand that the implementation of all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and the program can include the processes of the embodiments of the above-mentioned methods when executed. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (Flash Memory), a hard disk (Hard Disk Drive, abbreviated as: HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.
[0131] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0132] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A bill of lading verification method, characterized in that: include: Get the text information of the target bill of lading; Using a preset bill of lading element recognition model to identify bill of lading element information in the text information, the bill of lading element information includes: at least one of: a shipping company name, a bill of lading number, a trade participant name, a flight number, a container number, a loading port, a unloading port, and container logistics information; Obtaining official website information of the target bill of lading from the official website of the shipping company corresponding to the target bill of lading according to the bill of lading number of the target bill of lading; Verify the bill of lading element information based on the official website information to obtain a first verification result; Obtaining the blacklist query results corresponding to the trade participants of the target bill of lading and the blacklist query results corresponding to the shipping company queried from the sanctions blacklist risk database; Determining the risk level of the trading participant according to the blacklist query result corresponding to the trading participant, and determining the risk level of the shipping company according to the blacklist query result corresponding to the shipping company; generating a second verification result according to the risk level of the trading participant and the risk level of the shipping company; Generate a verification report according to the first verification result and the second verification result, and send the verification report to a preset business operator; The specific process of training the bill of lading element recognition model includes: Extract text information from the inventory delivery note image as sample data for model training; Process and correct sample data, extract feature values of sample data, perform feature dimension reduction, feature null value processing, and target value conversion processing, and label the sample data; Use the FastText model for model training. Input each word into the FastText model and output the probability of different labels to which the word belongs based on the training results. Use samples from the validation set to make predictions on the trained model to verify whether the model prediction accuracy meets the requirements. If not, perform iterative tuning. The obtaining, according to the bill of lading number of the target bill of lading, the official website information of the target bill of lading queried from the official website of the shipping company corresponding to the target bill of lading comprises: According to the shipping company name and bill of lading number in the target bill of lading, the headless browser of Chrome is driven by Python+Selenium to access the official website of the corresponding shipping company, and then according to the coordinates of the required parsed data sorted out by the corresponding shipping company, the corresponding data is obtained through XPath rule parsing and repackaged into a unified JSON format message according to unified rules to obtain the official website information; The obtaining of the blacklist query result corresponding to the trade participant of the target bill of lading and the blacklist query result corresponding to the shipping company queried from the sanctions blacklist risk database includes: Use Python+Selenium to drive Chrome's headless browser to access the sanctions blacklist risk database, locate the search box through XPath, and use Selenium to drive Chrome's headless browser to enter the name of the trade participant and the name of the shipping company in the input box for retrieval, and obtain the blacklist query results corresponding to the trade participant and the shipping company.
2. The bill of lading verification method according to claim 1, characterized in that: The step of using a preset bill of lading element recognition model to identify bill of lading element information in the text information specifically includes: If there is a bill of lading element extraction template corresponding to the shipping company, extracting bill of lading element information from the text information using the bill of lading element extraction template; If there is no bill of lading element extraction template corresponding to the shipping company, a preset bill of lading element recognition model is used to recognize the bill of lading element information in the text information.
3. The bill of lading verification method according to claim 1, characterized in that: Also includes: Acquire a bill of lading image of the target bill of lading; Performing noise reduction and binarization processing on the bill of lading image to obtain a processed bill of lading image; The text information is recognized from the processed waybill image according to a preset text recognition model.
4. The bill of lading verification method according to claim 3, characterized in that: The performing of noise reduction and binarization processing on the bill of lading image to obtain the processed bill of lading image specifically includes: Performing noise reduction processing on the bill of lading image to obtain a noise-reduced bill of lading image; Binarizing the de-noised bill of lading image to obtain a binary image of the bill of lading; The binary image of the bill of lading is subjected to noise point and interference line removal operations to obtain a processed bill of lading image.
5. A bill of lading verification device, characterized in that: include: A text information acquisition module is used to acquire the text information of the target bill of lading; a bill of lading element information acquisition module, configured to use a preset bill of lading element recognition model to identify bill of lading element information in the text information, wherein the bill of lading element information includes: at least one of: a shipping company name, a bill of lading number, a trade participant name, a flight number, a container number, a loading port, a unloading port, and container logistics information; An official website information acquisition module, used to acquire the official website information of the target bill of lading from the official website of the shipping company corresponding to the target bill of lading according to the bill of lading number of the target bill of lading; A first verification module, used to verify the element information of the bill of lading based on the official website information to obtain a first verification result; A blacklist query result acquisition module is used to obtain the blacklist query result corresponding to the trade participant of the target bill of lading and the blacklist query result corresponding to the shipping company queried from the sanctions blacklist risk database; A risk level determination module, used to determine the risk level of the trading participant according to the blacklist query result corresponding to the trading participant, and to determine the risk level of the shipping company according to the blacklist query result corresponding to the shipping company; A second verification module, used to generate a second verification result according to the risk level of the trade participant and the risk level of the shipping company; A verification report sending module, used to generate a verification report according to the first verification result and the second verification result, and send the verification report to a preset business operator; The specific process of training the bill of lading element recognition model includes: Extract text information from the inventory delivery note image as sample data for model training; Process and correct sample data, extract feature values of sample data, perform feature dimension reduction, feature null value processing, and target value conversion processing, and label the sample data; Use the FastText model for model training. Input each word into the FastText model and output the probability of different labels to which the word belongs based on the training results. Use samples from the validation set to make predictions on the trained model to verify whether the model prediction accuracy meets the requirements. If not, perform iterative tuning. The official website information acquisition module is specifically used to access the official website of the corresponding shipping company through Python+Selenium to drive the Chrome headless browser according to the shipping company name and bill of lading number in the target bill of lading, and then obtain the corresponding data through XPath rule parsing according to the coordinates of the required parsed data sorted out by the corresponding shipping company and repackage it into a unified JSON format message according to unified rules to obtain the official website information; The blacklist query result acquisition module is specifically used to access the sanctions blacklist risk database through Python+Selenium-driven Chrome headless browser, locate the search box through XPath, and use Selenium to drive the Chrome headless browser to enter the name of the trade participant and the name of the shipping company in the input box for retrieval, so as to obtain the blacklist query results corresponding to the trade participant and the blacklist query results corresponding to the shipping company.
6. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 4 is implemented.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed in a computer processor, the computer program implements the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Credit certificate auditing terminal
CN110414512A
Electronic receipt generating method and device, computer equipment and storage medium
CN111079709A
Verification system and method for authenticity and uniqueness of cross-border mutual-market trade background
CN111311356A
Bill element extraction method and device, electronic equipment and readable storage medium
CN111914835A
Cross-border personal import declaration risk identification and processing method
CN112232721A
