Method and device for identifying letter of credit terms
By obtaining the semantic units of the letter of credit terms and determining their positive and negative example labels, combined with the BiLSTM and CRF models, the problem of insufficient accuracy in the identification of letter of credit terms in the prior art is solved, and a more efficient and accurate identification effect is achieved.
Patent Information
- Application Number
- CN202210110547.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-29
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2042-01-29
AI Technical Summary
In the prior art, the method of identifying the naming entity of the letter of credit clause is insufficient, mainly due to the insufficient word characteristics in the name dictionary, resulting in low recognition accuracy.
A method of identification of letter of credit terms is adopted, by obtaining semantic units and determining their corresponding positive and negative example tags, identifying semantic units that are allowed or not allowed as identification information based on the tag, and combining BiLSTM and CRF models to train the recognition model to improve the recognition accuracy.
The accuracy and efficiency of identification information of letter of credit terms are improved, errors caused by overlapping semantic units and understanding differences are avoided, and the accuracy of the identification model is enhanced.
Smart Images

Figure CN114443848B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method and device for identifying letter of credit terms. Background Art
[0002] A letter of credit is a written document issued by a bank to an exporter (seller) at the request of an importer (buyer), guaranteeing payment for goods. A letter of credit typically includes multiple clauses, which describe various information related to the letter of credit. To correctly interpret the terms in a letter of credit, you first need to correctly identify the named entity.
[0003] There are three main methods for identifying named entities in letter of credit terms. The first method is to match each word (or character) in the letter of credit terms with words (or characters) in a name dictionary to determine the named entities in the letter of credit terms. The second method is to use a bidirectional long short-term memory model (BiLSTM) and conditional random fields (CRF) training to obtain a score for each word (or character) belonging to the corresponding label, thereby determining the named entities in the letter of credit terms. The third method is to combine the above two methods to determine the named entities in the letter of credit terms. Using these methods, the features of the words (or characters) in the name dictionary are insufficient, so the accuracy of the named entities determined in the letter of credit terms is too low. Summary of the Invention
[0004] The present application provides a method and device for identifying letter of credit terms, so as to improve the accuracy of identification information of letter of credit terms.
[0005] In a first aspect, the present application provides a method for identifying terms of a letter of credit, the method comprising: obtaining a semantic unit of the terms of a letter of credit; determining a label corresponding to the semantic unit, the label including a positive label and a negative label corresponding to the semantic unit, the positive label being used to indicate a semantic unit that is allowed to be used as identification information, and the negative label being used to indicate a semantic unit that is not allowed to be used as identification information; determining identification information of the terms of the letter of credit based on the label, the identification information including the semantic unit corresponding to the positive label and excluding the semantic unit corresponding to the negative label.
[0006] By adopting this method, the identification device of the letter of credit terms can determine the semantic units that are allowed to be used as identification information based on the semantic units of the letter of credit terms and the positive example labels, and can also determine the semantic units that are not allowed to be used as identification information based on the semantic units of the letter of credit terms and the negative example labels, thereby improving the accuracy of the identification information of the letter of credit terms.
[0007] In one possible design, the method further includes: the identification information does not include a semantic unit adjacent to the semantic unit corresponding to the negative example label.
[0008] In a possible design, determining the label corresponding to the semantic unit includes: searching a label correspondence table according to the semantic unit to determine the label corresponding to the semantic unit, where the label correspondence table includes a correspondence between the semantic unit and the label.
[0009] By adopting this design, the efficiency of the identification device for the terms of letter of credit in identifying the identification information of the terms of letter of credit can be improved.
[0010] In one possible design, determining a label corresponding to a semantic unit includes: determining a similarity value based on at least two manually annotated candidate labels corresponding to the same semantic unit; and determining a label for the semantic unit based on the candidate labels according to the similarity value.
[0011] By adopting this design, the accuracy of the label determined by the identification device of the letter of credit terms can be improved.
[0012] In one possible design, the method further includes: obtaining semantic units and identification information of multiple letter of credit clauses, each piece of identification information includes a semantic unit corresponding to a positive example label and does not include a semantic unit corresponding to a negative example label; determining a recognition model based on the semantic units and identification information of the multiple letter of credit clauses, the recognition model being used to determine the identification information of the letter of credit clauses based on the semantic units of the letter of credit clauses.
[0013] In one possible design, a recognition model is determined based on the speech semantic units and identification information of multiple letter of credit clauses, including: based on the semantic units and identification information of multiple letter of credit clauses, determining the probability of a label corresponding to each semantic unit being used as identification information, and the probability is used to determine the identification information of the letter of credit clause corresponding to the semantic unit of the letter of credit clause.
[0014] In a second aspect, the present application further provides a device for identifying terms of a letter of credit, the device comprising:
[0015] An acquisition module is used to acquire semantic units of the terms of the letter of credit;
[0016] The processing module is used to determine the label corresponding to the semantic unit. The label includes a positive label and a negative label corresponding to the semantic unit. The positive label is used to indicate the semantic unit that is allowed to be used as identification information, and the negative label is used to indicate the semantic unit that is not allowed to be used as identification information.
[0017] The processing module is further configured to determine identification information of the terms of the letter of credit based on the label, where the identification information includes semantic units corresponding to the positive example label and does not include semantic units corresponding to the negative example label.
[0018] In one possible design, the identification information does not include semantic units adjacent to the semantic unit corresponding to the negative label.
[0019] In a possible design, the processing module is specifically configured to: search a label correspondence table according to the semantic unit to determine the label corresponding to the semantic unit, where the label correspondence table includes a correspondence between the semantic unit and the label.
[0020] In a possible design, the processing module is specifically configured to: determine a similarity value based on at least two manually annotated candidate labels corresponding to the same semantic unit; and determine a label of the semantic unit based on the candidate labels according to the similarity value.
[0021] In one possible design, the acquisition module is further used to: acquire semantic units and identification information of multiple letter of credit terms, each piece of identification information includes a semantic unit corresponding to a positive example label and does not include a semantic unit corresponding to a negative example label; the processing module is further used to: determine a recognition model based on the semantic units and identification information of multiple letter of credit terms, and the recognition model is used to determine the identification information of the letter of credit terms based on the semantic units of the letter of credit terms.
[0022] In one possible design, the processing module is specifically used to: determine the probability of the label corresponding to each semantic unit being used as identification information based on the semantic units and identification information of multiple letter of credit terms, and the probability is used to determine the identification information of the letter of credit terms corresponding to the semantic unit of the letter of credit terms.
[0023] In a third aspect, the present application further provides an electronic device comprising a processor, wherein the processor is configured to implement the steps of the method for identifying the terms of a letter of credit as described in the first aspect and any possible design thereof when executing a computer program stored in a memory.
[0024] In a fourth aspect, the present application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method for identifying the terms of a letter of credit as described in the first aspect and any possible design thereof.
[0025] In a fifth aspect, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the method for identifying the terms of the letter of credit as described in the first aspect and any possible design thereof.
[0026] In addition, the technical effects brought about by the second to fifth aspects can be found in the description of the first aspect above and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0028] Figure 1 A flowchart of a method for identifying letter of credit terms provided in an embodiment of the present application;
[0029] Figure 2 A flowchart of another method for identifying letter of credit terms provided in an embodiment of the present application;
[0030] Figure 3 A flowchart of another method for identifying letter of credit terms provided in an embodiment of the present application;
[0031] Figure 4 A schematic diagram of the structure of a device for identifying letter of credit terms provided in an embodiment of the present application;
[0032] Figure 5 A schematic structural diagram of another device for identifying letter of credit terms provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solutions and advantages of this application clearer, this application will be further described in detail below with reference to the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application. The acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.
[0034] In order to improve the accuracy of identification information of letter of credit terms, embodiments of the present application provide a method and apparatus for identifying letter of credit terms.
[0035] The following is an explanation of the terms involved in this application:
[0036] Kappa value: also known as Kappa coefficient, Kappa coefficient can be used for consistency testing.
[0037] Below, the embodiments of the present application are described in detail with reference to the accompanying drawings.
[0038] Figure 1 The flowchart of a method for identifying letter of credit terms provided in an embodiment of the present application specifically includes the following steps:
[0039] S101: The letter of credit clause recognition device obtains the semantic unit of the letter of credit clause.
[0040] Specifically, the letter of credit terms identification device can determine at least one semantic unit based on the letter of credit terms. Letter of credit terms include, for example, Section 46A Documents Required, Section 47A Additional Conditions, and Section 78 Instructions To Pay / Accept / Negotiate Bank. A semantic unit includes at least one word. For example, if the letter of credit terms include "Bill of Lading Must Not Show Invoice Value," the semantic units of the letter of credit terms may include "Bill of Lading," "Must," "Not," "Show," and "Invoice Value." It should be understood that in this example, because "Invoice Value" is a complete semantic unit, "Invoice" cannot be considered a separate semantic unit in this context.
[0041] Optionally, when a special word appears in a letter of credit clause, the letter of credit clause recognition device determines to interrupt the semantic unit based on the special word. In other words, the content before and after the special word cannot be considered as a separate semantic unit. For example, assuming the special word includes "Of," and the letter of credit clause includes "Drafts Must Be Established For 100 Persent Of Invoice Value," since the letter of credit clause includes the special word "Of," "100 Persent Of Invoice Value" cannot be considered as a semantic unit. Therefore, the semantic units of the letter of credit clause may include: "Drafts," "Must," "Be," "Established," "For," "100 Persent," "Of," and "Invoice Value." It should be understood that special words can be determined based on actual needs and are not limited in this application.
[0042] By adopting this method, the letter of credit clause identification device can more accurately determine the semantic units of the letter of credit clause, thereby improving the accuracy of the identification information of the letter of credit clause.
[0043] S102: The letter of credit terms recognition device determines a label corresponding to the semantic unit, where the label includes a positive label and a negative label corresponding to the semantic unit. The positive label is used to indicate a semantic unit that is allowed to be used as identification information, and the negative label is used to indicate a semantic unit that is not allowed to be used as identification information.
[0044] Specifically, positive labels usually indicate semantic units that have practical significance and are in line with the interests of researchers of a specific problem (for example, descriptions of bills of lading, bills of exchange, etc. in this application), and negative labels usually indicate semantic units that have practical significance but are not in line with the interests of researchers of a specific problem (for example, descriptions of quantity, number, date, value, etc. in this application). For example, positive labels can include various document names, with values such as Invoice, Bill Of Lading, and Beneficiary Certificate, etc., and negative labels are recorded as non-label labels, with values such as Value, Number, and Date, etc. It should be understood that there can be multiple positive and negative labels, and this application does not limit them.
[0045] Among them, the positive example Invoice tag corresponds to the semantic unit Invoice, and the positive example Invoice tag is used to indicate that the semantic unit Invoice is allowed to be used as identification information of the letter of credit terms; the positive example Bill Of Lading tag corresponds to the semantic unit Bill Of Lading, and the positive example Bill Of Lading tag is used to indicate that the semantic unit Bill Of Lading is allowed to be used as identification information of the letter of credit terms; the positive example Beneficiary Certificate tag corresponds to the semantic unit Beneficiary Certificate, and the positive example Beneficiary Certificate tag is used to indicate that the semantic unit Beneficiary Certificate is allowed to be used as identification information of the letter of credit terms.
[0046] Similarly, the negative example Value tag corresponds to the semantic unit Value, and the negative example Value tag is used to indicate that the semantic unit Value is not allowed to be used as identification information of the letter of credit terms; the negative example Number tag corresponds to the semantic unit Number, and the negative example Number tag is used to indicate that the semantic unit Number is not allowed to be used as identification information of the letter of credit terms; the negative example Date tag corresponds to the semantic unit Date, and the negative example Date tag is used to indicate that the semantic unit Date is not allowed to be used as identification information of the letter of credit terms.
[0047] It is worth mentioning that when the negative example Value tag corresponds to the semantic unit Value, the negative example Value tag is also used to indicate that the new semantic unit (such as the semantic unit Invoice Value) composed of the semantic unit Value and other words (such as Invoice) is not allowed to be used as identification information of the letter of credit terms; and when the negative example Value tag corresponds to the semantic unit Value, the negative example Value tag is also used to indicate that other words that can form a semantic unit with the semantic unit Value (such as Invoice) are not allowed to be used as identification information of the letter of credit terms.
[0048] Illustratively, the negative example Value tag corresponds to the semantic unit Value. If the negative example appears together with Invoice or other document names, that is, Invoice Value, then the negative example Value tag is used to indicate that Invoice in the semantic unit Invoice Value is not allowed to be used as identification information of the letter of credit terms; the negative example Number tag corresponds to the semantic unit Number. If the negative example appears together with Packing List or other document names, that is, Packing list Number, then the negative example Number tag is used to indicate that Packing list in the semantic unit Packing list Number is not allowed to be used as identification information of the letter of credit terms; the negative example Date tag corresponds to the semantic unit Date. If the negative example Date appears together with Bill of lading, that is, Bill of lading date, then the negative example Date tag is used to indicate that Bill of lading in the semantic unit Bill of ladingdate is not allowed to be used as identification information of the letter of credit terms.
[0049] Tags also include O-type tags, which generally indicate semantic units without practical meaning (for example, adjectives and prepositions used to connect sentences in this application). O-type tags are used to indicate semantic units that are not allowed to be used as identification information. Examples include O-type Must tags, O-type Not tags, and O-type Show tags.
[0050] In a possible design of S102, the letter of credit terms identification device may determine a similarity value based on at least two manually marked alternative labels corresponding to the same semantic unit; the letter of credit terms identification device may also determine a label of the semantic unit based on the similarity value and the alternative labels.
[0051] Specifically, the letter of credit terms identification device can obtain at least two alternative label sets corresponding to the same semantic unit set from the manual interface. The letter of credit terms identification device can also determine a similarity value based on the at least two alternative label sets. The similarity value is, for example, a Kappa value. The letter of credit terms identification device can also determine the label corresponding to each semantic unit in the semantic unit set based on the similarity value and the alternative label set. Among them, the calculation method of the Kappa value can refer to the existing technology and is not limited in this application. It should be understood that a semantic unit set includes two or more semantic units, and an alternative label set includes two or more alternative labels. The alternative labels in the alternative label set respectively correspond to the semantic units in the semantic unit set.
[0052] Exemplarily, the letter of credit terms identification device may also obtain a labeling rule from a manual interface, where the labeling rule is used to determine candidate labels. The letter of credit terms identification device may obtain from the manual interface two candidate label sets (e.g., each candidate label set includes n candidate labels, n≥2) determined by two labelers for the same semantic unit set (e.g., the semantic unit set includes n semantic units, n≥2) according to the labeling rule. The letter of credit terms identification device may determine the labels corresponding to the n semantic units in the semantic unit set based on the Kappa value of the two candidate label sets. For example, when the similarity value is greater than or equal to a certain threshold (e.g., 0.8), the letter of credit terms identification device may randomly select n candidate labels from one of the candidate label sets as the labels corresponding to the n semantic units in the semantic unit set. Conversely, when the similarity value is less than a certain threshold, the letter of credit terms identification device may obtain the labels corresponding to the n semantic units from the manual interface. The labels may be determined by a third labeler based on the candidate labels in the above two candidate label sets.
[0053] With this design, the letter of credit terms identification device can determine the label of the semantic unit based on the consistency of the two candidate label sets, thereby improving the accuracy of determining the label corresponding to the semantic unit.
[0054] Furthermore, the letter of credit terms identification device may also use the above method to determine the labels of multiple semantic units, thereby determining a label correspondence table, which may be used to indicate the correspondence between multiple semantic units and multiple labels.
[0055] Optionally, the label correspondence table may include a positive label correspondence table, a negative label correspondence table, and a Class O label correspondence table. Table 1 is a possible negative label correspondence table provided in this application, where the semantic unit example is the semantic unit corresponding to the negative label in the letter of credit terms example, and the negative label is the label corresponding to the semantic unit example.
[0056] Table 1
[0057]
[0058]
[0059] In a possible design of S102, the letter of credit clause recognition device may search a label correspondence table according to the semantic unit to determine the label corresponding to the semantic unit, where the label correspondence table includes the correspondence between the semantic unit and the label.
[0060] Specifically, the letter of credit clause identification device can obtain a label correspondence table from a manual interface, where the label correspondence table can include a correspondence between at least one semantic unit and a label corresponding to the at least one semantic unit. For example, the label correspondence table can be a rule dictionary obtained by manual annotation.
[0061] S103: The letter of credit clause identification device determines identification information of the letter of credit clause based on the label, wherein the identification information includes semantic units corresponding to the positive label and does not include semantic units corresponding to the negative label. The identification information of the letter of credit clause may be a named entity of the letter of credit clause.
[0062] Optionally, the identification information does not include the semantic unit corresponding to the O-type tag.
[0063] For example, the semantic units of the letter of credit clause "Bill Of Lading Must Not Show Invoice Value" include Bill Of Lading, Must, Not, Show, and Invoice Value. Bill Of Lading corresponds to the positive example Bill Of Lading tag, Must corresponds to a Class O tag, Not corresponds to a Class O tag, Show corresponds to a Class O tag, and Invoice corresponds to a Class O tag. Value corresponds to a non-label tag. It is worth noting that Invoice corresponds to the tag O because it is followed by Value (a non-label tag). Therefore, the letter of credit clause identification device can determine that the identification information of this letter of credit clause is Bill Of Lading.
[0064] Optionally, the letter of credit terms identification device may determine a tag sequence based on the tags of the semantic units of the letter of credit terms, and may also determine the identification information of the letter of credit terms based on the tag sequence.
[0065] For example, the label sequence corresponding to the above-mentioned letter of credit clause "Bill Of Lading Must Not Show Invoice Value" is shown in Table 2. The annotation adopts the BIO format, where B stands for Begin, indicating the beginning of an entity, I stands for Inside, indicating the part within the entity boundary, and O represents a non-entity. In addition, the present invention adds a Non-label label to forcibly indicate a non-entity, and doc represents a semantic unit / copy / word. In this example, Bill Of Lading is an entity, and its entity category is bill of lading. Here, doc-bill-of-lading is used to represent the bill of lading entity category name. Specifically, Bill is the beginning of this entity, so it is labeled B_doc-bill-of-lading; Of and Lading are both within the boundary of the entity, so they are labeled I_doc-bill-of-lading; the label of Value is Non-label, and the document name adjacent to the label must be marked with O, so that the accuracy of the label sequence can be guaranteed. The letter of credit terms identification device can determine that the contents corresponding to the B series and I series tags are the document name information required to be identified by the letter of credit terms based on the tag sequence, that is, Bill of Lading is the identification information of the letter of credit terms.
[0066] Table 2
[0067] word Label Bill B_doc-Bill-Of-Lading Of I_doc-Bill-Of-Lading Lading I_doc-Bill-Of-Lading Must O Not O Show O Invoice O Value Non-label
[0068] By adopting this method, the letter of credit terms identification device can determine the identification information based on the positive example label and the negative example label, thereby improving the accuracy of the identification information of the letter of credit terms.
[0069] Optionally, the semantic unit includes at least two overlapping semantic units, and the label corresponding to at least one of the overlapping semantic units is a negative label, and the identification information determined by the letter of credit terms identification device does not include the overlapping semantic units. Alternatively, the identification information does not include semantic units adjacent to the semantic unit corresponding to the negative label.
[0070] For example, assuming that a semantic unit of a letter of credit clause includes "Invoice Value," where "Value" corresponds to a negative example "Value" tag, the letter of credit clause identification device may determine that the identification information does not include "Invoice Value," even if "Invoice" corresponds to a positive example "Invoice" tag. Alternatively, assuming that a semantic unit of a letter of credit clause includes "Invoice Value," where "Invoice Value" corresponds to a negative example "Invoice Value" tag, the letter of credit clause identification device may determine that the identification information does not include "Invoice," even if "Invoice" corresponds to a positive example "Invoice" tag. Alternatively, assuming that a semantic unit of a letter of credit clause includes "Invoice Value," where "Value" corresponds to a negative example "Value" tag, the letter of credit clause identification device may determine that the identification information does not include "Invoice," which is adjacent to the semantic unit "Value."
[0071] With this design, the identification device for letter of credit terms can avoid errors in identification information caused by overlapping semantic units, as well as errors in identification information caused by differences in semantic understanding, thereby improving the accuracy of the identification information of the letter of credit terms.
[0072] Figure 2 The flowchart of a method for identifying letter of credit terms provided in an embodiment of the present application specifically includes the following steps:
[0073] S201: The letter of credit clause recognition device obtains semantic units and identification information for multiple letter of credit clauses. Each piece of identification information includes a semantic unit corresponding to a positive label and does not include a semantic unit corresponding to a negative label. Specifically, the letter of credit clause recognition device may determine the semantic units and identification information for the multiple letter of credit clauses based on the label correspondence table in S102. The semantic units and identification information for the multiple letter of credit clauses obtained using this method can be used to train a recognition model, thereby improving the accuracy of the recognition model.
[0074] Illustratively, the letter of credit terms identification device may use a computer programming language (Python) to back-tag multiple unlabeled corpora (letter of credit terms with undetermined identification information) according to the label correspondence table in S102, thereby determining the semantic unit corresponding to the letter of credit terms, the label corresponding to the semantic unit, and the alternative identification information corresponding to the letter of credit terms; the letter of credit terms identification device may also obtain indication information from a manual interface, which is used to indicate whether the alternative identification information is correct; the letter of credit terms identification device may also determine the semantic units and identification information of multiple letter of credit terms based on the alternative identification information and the indication information.
[0075] S202: The letter of credit clause recognition device determines a recognition model based on the semantic units and recognition information of the plurality of letter of credit clauses. The recognition model is used to determine the recognition information of the letter of credit clauses based on the semantic units of the letter of credit clauses.
[0076] Specifically, the letter of credit clause recognition device can determine a recognition model based on the semantic units and identification information of multiple letter of credit clauses using BiLSTM and CRF. Further, the letter of credit clause recognition device can determine the identification information of any letter of credit clause using the recognition model.
[0077] Optionally, the letter of credit terms identification device can determine the probability of the label corresponding to each semantic unit being used as identification information based on the semantic units and identification information of multiple letter of credit terms, and the probability is used to determine the recognition model.
[0078] Using this method, the letter of credit terms recognition device can determine multiple semantic units and identification information of the letter of credit terms used to determine the recognition model, and can also determine the recognition model used to determine the identification information of the letter of credit terms. Therefore, this method can improve the accuracy of the recognition model, thereby improving the accuracy of the identification information of the letter of credit terms.
[0079] In one possible example, the letter of credit clause identification device may determine, based on a semantic unit in the letter of credit clause, multiple probability values corresponding to each semantic unit and multiple candidate tags, and determine the tag corresponding to the semantic unit based on the multiple probability values. Furthermore, the letter of credit clause identification device may determine identification information of the letter of credit clause based on the tags corresponding to the multiple semantic units in the letter of credit clause.
[0080] For example, a semantic unit includes a word, such as Figure 3 As shown, assume that the terms of the letter of credit include n words, which are represented by w0, w1, w2…w i …w n (i=0, 1, 2, ... n); the recognition model can process the above n words separately through the Long Short-Term Memory (LSTM) network; the recognition model includes multiple candidate tags (for example, all tags in the tag correspondence table), and the multiple candidate tags are represented as tag1, tag2, tag3...tag j …tag m (j=0, 1, 2, ... m). The letter of credit terms recognition device can determine multiple probability values corresponding to the word and multiple candidate labels, and determine the best path label corresponding to the word based on the multiple probability values. The labels corresponding to n words are represented as y0, y1, y2...y i …y n(i=0, 1, 2, ... n).
[0081] In a possible design, the letter of credit terms recognition device can determine the state feature probability value (Emission Score) corresponding to each semantic unit and multiple candidate tags through BiLSTM.
[0082] For example, still taking a word including a word as an example, the credit clause recognition device can calculate the state feature probability value corresponding to each word and multiple candidate labels through BiLSTM, where the word w i and alternative tags j The corresponding state feature probability is expressed as es i,j The letter of credit terms recognition device can determine the current tag of the word through BiLSTM according to the state feature probability values corresponding to each word and multiple alternative tags. c The letter of credit terms identification device may use the current label as the label of the word.
[0083] Optionally, the letter of credit terms identification device can also determine the state transition matrix of any of the above semantic units based on the above state feature probability through CRF, and can also determine the label of the semantic unit based on the state transition probability value corresponding to each of the above semantic units through CRF.
[0084] For example, the letter of credit terms identification device can determine the tag of the semantic unit from the current tag to the next tag tag according to the current tag through CRF. d The state transition probability value (Transition Score), where the label of the semantic unit changes from tag c Transfer to tag d The state transition probability value is expressed as p c,d The letter of credit clause recognition device can also determine the state transition matrix of each semantic unit according to the state transition probability value. Table 3 shows a possible state transition matrix.
[0085] Table 3
[0086]
[0087] Optionally, the letter of credit clause identification device may determine the identification information of the letter of credit clause based on tags corresponding to multiple semantic units in the letter of credit clause.
[0088] For example, assuming the terms of the letter of credit include w i 、w i+1 and w i+2 Three words. The letter of credit terms recognition device can determine the tag sequence tag according to the following formula 1j tag k tag f (or t j t k t f ) as the score of the tag sequence of the letter of credit terms, the score is expressed as The calculation formula is:
[0089]
[0090] The letter of credit clause identification device can also determine the identification information of the letter of credit clause based on the score. With this design, the accuracy of the identification information of the letter of credit clause can be improved.
[0091] Figure 4 The figure shows a schematic diagram of the modular structure of a device for identifying letter of credit terms provided in an embodiment of the present application. The device may include an acquisition module 401 and a processing module 402. Acquisition module 401 may be used to perform sending and / or receiving actions, and processing module 402 may be used to perform processing actions. For example, acquisition module 401 may be used to acquire semantic units of letter of credit terms. Processing module 402 may be used to determine the tags corresponding to the semantic units. Processing module 402 may also be used to determine identification information of the letter of credit terms based on the tags.
[0092] In one possible design, the identification information does not include semantic units adjacent to the semantic unit corresponding to the negative label.
[0093] In a possible design, the processing module 402 is specifically configured to search a tag correspondence table according to the semantic unit to determine the tag corresponding to the semantic unit, where the tag correspondence table includes a correspondence between the semantic unit and the tag.
[0094] In one possible design, the processing module 402 is specifically configured to: determine a similarity value based on at least two manually annotated candidate labels corresponding to the same semantic unit; and determine a label of the semantic unit based on the candidate labels according to the similarity value.
[0095] In one possible design, the acquisition module 401 is further used to: acquire semantic units and identification information of multiple letter of credit terms, each piece of identification information includes a semantic unit corresponding to a positive example label and does not include a semantic unit corresponding to a negative example label; the processing module 402 is further used to: determine a recognition model based on the semantic units and identification information of multiple letter of credit terms, and the recognition model is used to determine the identification information of the letter of credit terms based on the semantic units of the letter of credit terms.
[0096] In one possible design, the processing module 402 is specifically used to: determine the probability of the label corresponding to each semantic unit being used as identification information based on the semantic units and identification information of multiple letter of credit terms, and the probability is used to determine the identification information of the letter of credit terms corresponding to the semantic unit of the letter of credit terms.
[0097] Figure 5 A schematic structural diagram of a device for identifying letter of credit terms provided in an embodiment of the present application is shown.
[0098] The electronic device in the embodiment of the present application may include a processor 501. The processor 501 is the control center of the device, and can use various interfaces and lines to connect the various parts of the device, by running or executing instructions stored in the memory 502 and calling data stored in the memory 502. Optionally, the processor 501 may include one or more processing units. The processor 501 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 501. In some embodiments, the processor 501 and the memory 502 may be implemented on the same chip. In some embodiments, they may also be implemented separately on independent chips.
[0099] Processor 501 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of this application. A general-purpose processor can be a microprocessor or any conventional processor. The steps performed by the device for identifying letter of credit terms disclosed in the embodiments of this application can be performed directly by a hardware processor or by a combination of hardware and software modules in the processor.
[0100] In an embodiment of the present application, the memory 502 stores instructions that can be executed by at least one processor 501. The at least one processor 501 can be used to execute the aforementioned communication process performed by the identification device of the letter of credit terms by executing the instructions stored in the memory 502.
[0101] The memory 502 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 502 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 502 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 502 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0102] In the embodiment of the present application, the device may further include a communication interface 503, and the electronic device may transmit data through the communication interface 503. For example, the electronic device is a device for identifying terms of a letter of credit, and the communication interface 503 may be used to execute the acquisition module 401.
[0103] Optional, can be Figure 5 The processor 501 (or the processor 501 and the memory 502) shown implements Figure 4 The acquisition module 401 and / or processing module 402 shown, that is, the actions of the acquisition module 401 and / or the processing module 402 can be executed by the processor 501 (or the processor 501 and the memory 502).
[0104] Based on the same application concept, the embodiment of the present application also provides a computer-readable storage medium, which may store instructions. When the instructions are executed on a computer, the computer executes the operation steps provided in the above method embodiment. The computer-readable storage medium may be Figure 5 Memory 502 is shown.
[0105] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0106] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0107] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0108] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0109] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.
Claims
1. A method for identifying the terms of a letter of credit, characterized in that: The method comprises: Get the semantic unit of the letter of credit terms; Determining a label corresponding to the semantic unit, the label including a positive label and a negative label corresponding to the semantic unit, the positive label being used to indicate a semantic unit that is allowed to be used as identification information, and the negative label being used to indicate a semantic unit that is not allowed to be used as identification information; Determining identification information of the letter of credit terms based on the label, the identification information including the semantic unit corresponding to the positive example label and excluding the semantic unit corresponding to the negative example label; The identification information does not include a semantic unit adjacent to the semantic unit corresponding to the negative example label.
2. The method according to claim 1, wherein Determining the label corresponding to the semantic unit includes: A tag correspondence table is searched according to the semantic unit to determine the tag corresponding to the semantic unit, where the tag correspondence table includes a correspondence between semantic units and tags.
3. The method according to claim 1, wherein Determining the label corresponding to the semantic unit includes: Determining a similarity value between at least two manually annotated candidate tags corresponding to the same semantic unit; The label of the semantic unit is determined according to the similarity value and the candidate labels.
4. The method according to claim 1, wherein The method further comprises: Acquire semantic units and identification information of multiple letter of credit clauses, where each identification information includes a semantic unit corresponding to a positive label and does not include a semantic unit corresponding to a negative label; A recognition model is determined based on the semantic units and identification information of the multiple letter of credit terms, and the recognition model is used to determine the identification information of the letter of credit terms based on the semantic units of the letter of credit terms.
5. The method according to claim 4, wherein Determining a recognition model based on the phonetic semantic units and recognition information of the plurality of letter of credit clauses includes: Based on the semantic units and identification information of the multiple letter of credit terms, a probability of a label corresponding to each semantic unit being used as identification information is determined, and the probability is used to determine an identification model of the letter of credit terms corresponding to the semantic unit of the letter of credit terms.
6. A device for identifying the terms of a letter of credit, characterized in that: The device comprises: An acquisition module, configured to acquire semantic units of the terms of the letter of credit; a processing module, the processing module being configured to determine a label corresponding to the semantic unit, the label comprising a positive label and a negative label corresponding to the semantic unit, the positive label being configured to indicate a semantic unit that is permitted to be used as identification information, and the negative label being configured to indicate a semantic unit that is not permitted to be used as identification information; The processing module is further configured to determine identification information of the letter of credit terms based on the label, wherein the identification information includes a semantic unit corresponding to the positive example label and does not include a semantic unit corresponding to the negative example label; The identification information does not include a semantic unit adjacent to the semantic unit corresponding to the negative example label.
7. The device according to claim 6, characterized in that The processing module is specifically used for: A tag correspondence table is searched according to the semantic unit to determine the tag corresponding to the semantic unit, where the tag correspondence table includes a correspondence between semantic units and tags.
8. The device according to claim 6, wherein The processing module is specifically used for: Determining a similarity value between at least two manually annotated candidate tags corresponding to the same semantic unit; The label of the semantic unit is determined according to the similarity value and the candidate labels.
9. The device according to claim 6, wherein The acquisition module is further used for: Acquire semantic units and identification information of multiple letter of credit clauses, where each identification information includes a semantic unit corresponding to a positive label and does not include a semantic unit corresponding to a negative label; The processing module is further configured to: A recognition model is determined based on the semantic units and identification information of the multiple letter of credit terms, and the recognition model is used to determine the identification information of the letter of credit terms based on the semantic units of the letter of credit terms.
10. The device according to claim 9, wherein The processing module is specifically used for: Based on the semantic units and identification information of the multiple letter of credit terms, a probability of the tag corresponding to each semantic unit being used as identification information is determined, and the probability is used to determine the identification information of the letter of credit terms corresponding to the semantic unit of the letter of credit terms.
11. An electronic device, characterized in that: The electronic device comprises a processor, and the processor is configured to implement the steps of the method according to any one of claims 1 to 5 when executing a computer program stored in a memory.
12. A computer-readable storage medium, characterized in that The device stores a computer program, which implements the steps of the method according to any one of claims 1 to 5 when executed by a processor.
13. A computer program product, characterized in that The invention comprises a computer program, which implements the steps of the method according to any one of claims 1 to 5 when the computer program is executed by a processor.