Payment mode identification method and device, storage medium and program product

By performing text recognition and semantic vectorization on trade contract images and using a vector database to automatically identify payment methods, the problem of low efficiency and accuracy in contract payment method identification has been solved, achieving an efficient and accurate automated identification process.

CN120997858APending Publication Date: 2025-11-21INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511101789.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-07
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

In existing technologies, the recognition efficiency and accuracy of contract payment methods are low, leading to an increase in the number of business personnel required that cannot be increased rapidly in sync, resulting in low recognition efficiency and accuracy.

Method used

By acquiring images of trade contracts, performing text recognition and semantic vectorization, and using a vector database to match payment methods, an automated recognition process can be achieved, reducing reliance on manual labor.

Benefits of technology

It improves the accuracy and efficiency of payment method identification, reduces the burden on business personnel, and avoids errors caused by manual identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120997858A_ABST
    Figure CN120997858A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a payment mode identification method and device, a storage medium and a program product, and relates to the technical field of financial science and technology. The method comprises the steps of obtaining a trade contract image input by a user; performing text recognition on the trade contract image to obtain a trade contract text, and extracting payment element information from the trade contract text; performing semantic vectorization processing on the payment element information to obtain a semantic vector to be recognized; the semantic vector matched with the to-be-recognized semantic vector in a vector database is determined, a target vector is obtained, a payment mode preset for the target vector is determined as the payment mode corresponding to the trade contract image, the vector database comprises the semantic vector and the payment mode preset for the semantic vector, the automatic recognition process of the payment mode can be achieved, and the payment efficiency is improved. According to the invention, the method does not need to depend on manual recognition, shortens the recognition time, avoids the recognition error caused by manual recognition, and improves the recognition accuracy and recognition efficiency of the payment mode.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of financial technology, and in particular, to a payment method identification method and device, a storage medium and a program product. BACKGROUND

[0002] Currently, the payment method agreed in a contract is identified by manual recognition. However, as the amount of contract data to be processed continues to increase, and the contract gradually presents new features such as contract format complication, payment method diversification, real-time update, and digital signature popularization, the difficulty of identification business continues to increase, and the number of skilled business personnel is constantly increasing. However, the number of business personnel cannot be rapidly increased synchronously, resulting in low efficiency and accuracy of contract payment method identification. SUMMARY

[0003] Embodiments of the present application provide a payment method identification method, device, storage medium and program product, which realize the payment method identification function of the contract, to solve the problem of low efficiency and accuracy of contract payment method identification in the prior art.

[0004] In a first aspect, embodiments of the present application provide a payment method identification method, which comprises:

[0005] obtaining a trade contract image input by a user;

[0006] performing text recognition on the trade contract image to obtain trade contract text, and extracting payment element information from the trade contract text;

[0007] performing semantic vectorization processing on the payment element information to obtain a to-be-identified semantic vector;

[0008] determining a semantic vector matching the to-be-identified semantic vector in a vector database to obtain a target vector, and determining a payment method preset for the target vector as a payment method corresponding to the trade contract image, wherein the vector database comprises semantic vectors and payment methods preset for the semantic vectors.

[0009] In the embodiment of the present application, a trade contract image input by a user can be acquired; text recognition is performed on the trade contract image to obtain trade contract text, and payment element information is extracted from the trade contract text; semantic vectorization processing is performed on the payment element information to obtain a to-be-recognized semantic vector; a semantic vector that matches the to-be-recognized semantic vector in a vector database is determined to obtain a target vector, and a payment method preset for the target vector is determined as a payment method corresponding to the trade contract image, the vector database including semantic vectors and payment methods preset for the semantic vectors. In the above technical solution, the trade contract image is processed through text recognition, payment element extraction and semantic vectorization processing in sequence, the to-be-recognized semantic vector corresponding to the trade contract image can be accurately determined, then the vector database and the to-be-recognized semantic vector are compared, the semantic vector that matches the to-be-recognized semantic vector in the vector database is determined to obtain the target vector, and then the payment method preset for the target vector in the vector database is further determined as the payment method corresponding to the trade contract image, so that an automatic recognition process of the payment method can be realized without relying on manual recognition, manpower is saved, the business burden of business personnel is greatly reduced, the recognition time is shortened, and recognition errors caused by manual recognition are avoided, thereby improving the recognition accuracy and efficiency of the payment method.

[0010] In a second aspect, the embodiment of the present application provides a payment method recognition device, which comprises:

[0011] An acquisition module configured to acquire a trade contract image input by a user;

[0012] An extraction module configured to perform text recognition on the trade contract image to obtain trade contract text, and extract payment element information from the trade contract text;

[0013] A vectorization module configured to perform semantic vectorization processing on the payment element information to obtain a to-be-recognized semantic vector;

[0014] A determination module configured to determine a semantic vector that matches the to-be-recognized semantic vector in a vector database to obtain a target vector, and determine a payment method preset for the target vector as a payment method corresponding to the trade contract image, the vector database including semantic vectors and payment methods preset for the semantic vectors.

[0015] In a third aspect, the embodiment of the present application provides an electronic device, which comprises:

[0016] at least one processor; and a memory connected to the at least one processor in communication;

[0017] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the payment manner identification method of any of the embodiments of the present application.

[0018] In a fourth aspect, the embodiments of the present application provide a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the payment manner identification method of any of the embodiments of the present application.

[0019] In a fifth aspect, the embodiments of the present application provide a computer program product, which includes a computer program, and the computer program is executed by a processor to implement the payment manner identification method of any of the embodiments of the present application.

[0020] The second aspect, the third aspect, the fourth aspect and the fifth aspect of the present application are described in detail in the description of the first aspect, and the beneficial effects of the second aspect, the third aspect, the fourth aspect and the fifth aspect are described in the beneficial effect analysis of the first aspect, which will not be described here.

[0021] In the present application, the name of the payment manner identification device does not constitute a limitation on the device or the function module itself, and in actual implementation, these devices or function modules can appear with other names. As long as the functions of each device or function module are similar to those of the present application, they belong to the scope of the claims of the present application and their equivalents.

[0022] These aspects or other aspects of the present application will be more apparent in the following description. BRIEF DESCRIPTION OF DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor.

[0024] Figure 1 is a flowchart of the payment manner identification method provided by the embodiments of the present application;

[0025] Figure 2 is another flowchart of the payment manner identification method provided by the embodiments of the present application;

[0026] Figure 3 is a structural diagram of the payment manner identification device provided by the embodiments of the present application;

[0027] Figure 4 is a structural diagram of the electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION

[0028] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work should belong to the protection scope of the present application.

[0029] It should be noted that the terms “first”, “second”, “target” and “original” and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms “include”, “have” and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] Figure 1 is a flowchart of a payment method identification method provided by the embodiments of the present application. The embodiments can be applied to a scenario in which a payment method corresponding to a trade contract needs to be identified. The payment method identification method provided by the embodiments of the present application can be executed by a payment method identification device provided by the embodiments of the present application. The device can be implemented in the form of software and / or hardware. In a specific embodiment, the payment method identification device can be integrated in an electronic device, for example, the electronic device can be a computer or the like. The execution subject of the method can be an electronic device. Referring to Figure 1 , the payment method identification method of the embodiments includes but is not limited to the following steps:

[0031] S110, acquiring a trade contract image input by a user.

[0032] The trade contract image is an image of a trade contract to be identified, that is, a paper trade contract can be converted into a digital image through photographing, scanning or the like. One trade contract can correspond to multiple images. The trade contract is an agreement reached between the two parties in trade around the commercial transaction activities such as the sale of goods or the provision of services.

[0033] Specifically, the trade contract image input by the user can be acquired, that is, a contract recognition page is displayed on the display screen of the electronic device, and the contract recognition page includes an image upload control, the user can upload the image of the trade contract to be recognized through the image upload control, and then the electronic device acquires the image uploaded by the user to obtain the trade contract image when detecting a triggering operation of the user on the image upload control.

[0034] S120, text recognition is performed on the trade contract image to obtain trade contract text, and payment element information is extracted from the trade contract text.

[0035] The trade contract text is the text obtained after text recognition is performed on the trade contract image, and is used to represent the specific content in the trade contract image. The payment element information is the text related to the payment intention in the trade contract text.

[0036] Specifically, after obtaining the trade contract image, text recognition can be performed on the trade contract image, that is, preprocessing can be performed on the trade contract image, such as image enhancement, noise reduction, or image correction, and then optical character recognition technology is used to process the preprocessed trade contract image to recognize the text in the trade contract image and obtain the trade contract text.

[0037] Then, the payment element information can be extracted from the trade contract text, for example, the trade contract text can be compared with a preset payment keyword list to determine the text paragraph in which the preset payment keyword exists in the trade contract text. At this time, there can be one text paragraph or multiple text paragraphs, and these text paragraphs are determined as the payment element information. The preset payment keyword list is a pre-set list and can include multiple preset payment keywords. The preset payment keyword is a word used to represent the payment intention.

[0038] S130, performing semantic vectorization processing on the payment element information to obtain a to-be-recognized semantic vector.

[0039] The to-be-recognized semantic vector is a vector obtained after semantic vectorization processing is performed on the payment element information.

[0040] Specifically, after obtaining the payment element information, semantic vectorization processing can be performed on the payment element information to obtain a to-be-recognized semantic vector, that is, the payment element information can be input into a pre-trained vectorization model. At this time, the vectorization model can use the learned model parameters to perform vectorization processing on the payment element information to obtain an output result, and the output result is determined as the to-be-recognized semantic vector. The vectorization model is a pre-trained neural network model used for semantic vectorization of text.

[0041] S140, determine the semantic vector in the vector database that matches the to-be-identified semantic vector, obtain a target vector, and determine the payment method preset for the target vector as the payment method corresponding to the trade contract image.

[0042] The vector database is a pre-constructed database for storing semantic vectors corresponding to contracts, and one contract corresponds to one semantic vector. The vector database can include semantic vectors and payment methods preset for the semantic vectors. The target vector is a semantic vector in the vector database that matches the to-be-identified semantic vector.

[0043] Specifically, after obtaining the to-be-identified semantic vector, the semantic vector in the vector database that matches the to-be-identified semantic vector can be determined. For example, the similarity of the to-be-identified semantic vector to each semantic vector in the vector database can be calculated, the maximum value in the multiple similarity values is determined, and then the semantic vector corresponding to the maximum value is determined as the target vector.

[0044] Then, the payment method preset for the target vector can be obtained from the vector database, and the payment method preset for the target vector is determined as the payment method corresponding to the trade contract image.

[0045] The technical scheme of the embodiment of the present application can obtain a trade contract image input by a user, perform text recognition on the trade contract image to obtain trade contract text, extract payment element information from the trade contract text, perform semantic vectorization processing on the payment element information to obtain a to-be-identified semantic vector, determine a semantic vector in the vector database that matches the to-be-identified semantic vector, obtain a target vector, and determine the payment method preset for the target vector as the payment method corresponding to the trade contract image. The vector database includes semantic vectors and payment methods preset for the semantic vectors. In the above technical scheme, the trade contract image is processed in sequence through text recognition, payment element extraction, and semantic vectorization processing, the to-be-identified semantic vector corresponding to the trade contract image can be accurately determined, then the vector database and the to-be-identified semantic vector are compared, the semantic vector in the vector database that matches the to-be-identified semantic vector is determined, the target vector is obtained, and then the payment method preset for the target vector in the vector database is further determined as the payment method corresponding to the trade contract image. This can realize an automatic identification process of the payment method, without relying on manual identification, saving manpower, greatly reducing the business burden of business personnel, thereby shortening the identification time, avoiding identification errors caused by manual identification, and improving the identification accuracy and efficiency of the payment method.

[0046] A payment method identification method provided by an embodiment of the present application is described in detail below. Figure 2 is another flowchart of the payment method identification method provided by an embodiment of the present application. The embodiment of the present application is optimized on the basis of the above-mentioned embodiments.Figure 2 The method of the embodiment includes but is not limited to the following steps:

[0047] S210, obtaining a trade contract image input by a user.

[0048] S220, performing text recognition on the trade contract image to obtain trade contract text.

[0049] S230, matching the trade contract text according to a preset regular rule to extract payment element information from the trade contract text.

[0050] The preset regular rule is a regular expression that is set in advance and is a pattern language used for describing, matching and operating text strings. The user can adjust and set the preset regular rule according to actual use requirements, and the embodiment of the present application does not make specific limitations thereon. By using specific characters and syntax structures, a flexible and accurate text pattern can be defined to find and filter string fragments that meet the pattern in a large amount of text content.

[0051] Specifically, after obtaining the trade contract text, a preset regular rule set in advance can be obtained, and then the trade contract text is divided to obtain a plurality of trade contract subtexts, wherein a paragraph is determined as a trade contract subtext, and then each trade contract subtext is matched according to the preset regular rule to determine whether the trade contract subtext meets the preset regular rule. Then, the trade contract subtext that meets the preset regular rule is combined as payment element information, that is, the payment element information can include one or more trade contract subtexts.

[0052] S240, performing semantic vectorization processing on the payment element information to obtain a to-be-recognized semantic vector.

[0053] Optionally, the construction process of the vector database is as follows, including Sa1-Sa4:

[0054] Sa1, obtaining a plurality of contract images in a contract database, and labeling a payment method for each contract image.

[0055] The contract database is used to store a plurality of trade contract images, and one contract image can include a plurality of images. The contract database can include a contract identifier of each contract image, and the contract identifier is a unique identifier of each contract image.

[0056] Specifically, multiple contract images in the contract database can be acquired, that is, multiple trade contracts can be collected in advance, and an identifier is set for each trade contract, denoted as a contract identifier, and then the contract images of the multiple trade contracts and the corresponding contract identifiers are stored in the contract database; then, the payment method is labeled for each contract image, that is, the payment method is labeled for each contract image by manual labeling, and the payment method labeled for each contract image is the payment method preset for the target vector in S140.

[0057] Sa2, text recognition is performed on each contract image to obtain contract text of the corresponding contract image, and payment element information is extracted from the contract text of each contract image to obtain payment element information of the corresponding contract image.

[0058] The contract text is the text obtained by performing text recognition on the contract image, and is used to represent the specific content in the contract image.

[0059] Specifically, for the current contract image in the multiple contract images, the current contract image can be preprocessed, such as image enhancement, noise reduction, or image correction, and the optical character recognition technology is used to process the preprocessed current contract image to recognize the text in the current contract image, and obtain the contract text of the current contract image. Then, the contract text of the current contract image is matched according to the preset regular rule, the payment element information is extracted from the contract text of the current contract image, and the payment element information of the current contract image is obtained. The specific matching steps are the same as S230, and the specific description of S230 can be referred to, and will not be repeated here.

[0060] Sa3, the payment element information of each contract image is subjected to semantic vectorization processing to obtain the semantic vector of the corresponding contract image.

[0061] Specifically, after obtaining the payment element information of each contract image, for the current contract image in the multiple contract images, the payment element information of the current contract image can be input into the pre-trained vectorization model, and the vectorization model uses the learned model parameters to perform vectorization processing on the payment element information of the current contract image to obtain an output result, and the output result is determined as the semantic vector of the current contract image.

[0062] Sa4, the semantic vector of each contract image and the corresponding payment method are stored in the vector database.

[0063] In the embodiments of the present application, the payment method is labeled for each contract image, which can improve the accuracy of the payment method in the vector database; then, each contract image is processed through text recognition, payment element extraction and semantic vectorization processing in turn, which can improve the calculation efficiency and reduce the implementation complexity, and further improve the determination accuracy and determination efficiency of the semantic vector corresponding to each contract image, thereby improving the construction accuracy and construction efficiency of the vector database, and providing an accurate data basis for subsequent determination of the payment method of the trade contract image to be recognized.

[0064] Optionally, after storing the semantic vector of each contract image and the corresponding payment method into the vector database, the plurality of semantic vectors in the vector database can be clustered, and the cluster semantic vector of the corresponding cluster center is determined based on the semantic vectors in each cluster, and then the cluster semantic vector of the cluster center, the plurality of semantic vectors in the vector database and the corresponding payment method are stored into the index file.

[0065] The cluster center is the center position of the cluster, and other semantic vectors in the same cluster are relatively close to the cluster center under a certain distance measure; the cluster semantic vector is the semantic vector of the cluster center.

[0066] The index file is used to store the cluster semantic vector of the cluster center, the plurality of semantic vectors in the vector database and the corresponding payment method, so as to facilitate subsequent quick and accurate retrieval and access to the semantic vectors included in a specific cluster.

[0067] Specifically, the plurality of semantic vectors in the vector database can be clustered, that is, the plurality of semantic vectors can be processed by using a clustering algorithm to cluster similar semantic vectors into a category, such as setting the semantic vectors with close distances to belong to the same cluster, so as to obtain a plurality of clusters; then, the cluster semantic vector of the corresponding cluster center is determined based on the semantic vectors in each cluster, that is, the cluster semantic vector of the cluster center is determined according to the rules of the clustering algorithm, such as for each cluster, the mean vector of all semantic vectors in the current cluster can be calculated, and the mean vector is determined as the cluster semantic vector of the cluster center of the current cluster; then, the unique identifier of the cluster semantic vector of each cluster center can be set to obtain the cluster center identifier of the corresponding cluster center, such as by generating a hash value or assigning a unique number, so as to distinguish different clusters.

[0068] Then, the clustering semantic vector of the clustering center, the plurality of semantic vectors in the vector database, and the corresponding payment method clustering can be stored into the index file. Specifically, a hierarchical index structure of the index file can be constructed, i.e., a top index (i.e., an inverted index) and a bottom storage (i.e., an inverted list). The inverted index includes a plurality of inverted index items, the inverted list is a core storage unit of the inverted index, and one inverted index item corresponds to one inverted list. Then, the clustering semantic vector of each cluster and the corresponding clustering center identifier are stored in the inverted index as an inverted index item. The clustering center identifier is a unique identifier of the inverted index item, i.e., one clustering center identifier corresponds to one inverted list, i.e., one cluster corresponds to one inverted list. Then, all semantic vectors included in each cluster and the storage location of the payment method mapping table are stored in the inverted list corresponding to the clustering center identifier, so that when a semantic vector included in a certain cluster is searched, the corresponding inverted list can be located directly according to the clustering center identifier without traversing all data, which greatly improves the efficiency of data query and use.

[0069] The storage location of the payment method mapping table is the location of the payment method mapping table in the index file, for example, the tail of the index file. The payment method mapping table is used to save the corresponding relationship between the identifier corresponding to the semantic vector and the payment method corresponding to the semantic vector. The identifier corresponding to the semantic vector is the contract identifier corresponding to each contract image in the contract database, and the contract identifier is the unique identifier of each contract image, i.e., the unique identifier of each semantic vector.

[0070] In the embodiment of the present application, the clustering semantic vector of the clustering center, the plurality of semantic vectors in the vector database, and the corresponding payment method clustering are stored into the index file, which can facilitate subsequent query of all semantic vectors included in the cluster to which the clustering center belongs, thereby improving the efficiency of obtaining the candidate semantic vector and the efficiency of identifying the payment method. In addition, the vector database is not directly operated, which can prevent the influence of misoperation, resist malicious attacks and destruction, and thus guarantee the data security and the data integrity.

[0071] Optionally, the compressed semantic vector can be stored in the inverted list to save the file size of the index file.

[0072] Optionally, the payment method mapping table can include the corresponding relationship between the identifier corresponding to the semantic vector and the payment method code corresponding to the semantic vector, to save the file size of the index file. The payment method code is a numerical code corresponding to the payment method. The corresponding relationship between the payment method code and the payment method (i.e., represented in the form of a text string) can be stored in a preset payment code list, so as to facilitate determination of the corresponding payment method based on the payment method code.

[0073] S250, calculate the similarity between the to-be-identified semantic vector and the cluster semantic vector of each cluster center in the index file, and determine the cluster to which the cluster center corresponding to the maximum value of the similarity belongs as the target cluster.

[0074] The target cluster is a cluster similar to the to-be-identified semantic vector.

[0075] Specifically, after obtaining the to-be-identified semantic vector, the cluster semantic vector of the cluster center of each cluster in the index file can be obtained, and the similarity between the to-be-identified semantic vector and the cluster semantic vector of each cluster center can be calculated. Then, the maximum value of the plurality of similarities is determined, and the cluster to which the cluster center corresponding to the maximum value belongs is determined as the target cluster.

[0076] S260, extract the semantic vectors belonging to the target cluster from the index file to obtain a plurality of candidate semantic vectors.

[0077] The candidate semantic vector is all semantic vectors included in the target cluster in the index file.

[0078] Specifically, in the index file, the corresponding inverted list can be located based on the cluster center identifier of the cluster center of the target cluster, and then all semantic vectors stored in the inverted list can be obtained, and the semantic vectors are determined as the candidate semantic vectors.

[0079] Optionally, if the compressed semantic vector is stored in the inverted list, the corresponding inverted list can be located based on the cluster center identifier of the cluster center of the target cluster, and then all semantic vectors stored in the inverted list can be obtained, and the decompressed semantic vector is determined as the candidate semantic vector.

[0080] S270, calculate the similarity between the to-be-identified semantic vector and each candidate semantic vector, and determine the candidate semantic vector corresponding to the maximum value of the similarity as the target vector.

[0081] Specifically, the similarity between the to-be-identified semantic vector and each candidate semantic vector can be calculated, and the maximum value of the plurality of similarities is determined. If the candidate semantic vector corresponding to the maximum value exists, it indicates that only one candidate semantic vector in the plurality of candidate semantic vectors matches the to-be-identified semantic vector, and the candidate semantic vector corresponding to the maximum value can be determined as the target vector.

[0082] If there are at least two candidate semantic vectors corresponding to the maximum value of the similarity, it indicates that at least two candidate semantic vectors in the plurality of candidate semantic vectors match the to-be-identified semantic vector. In this case, the target vector determination request can be generated based on the candidate semantic vectors corresponding to the maximum value of the similarity, that is, the target vector determination request can include at least two candidate semantic vectors corresponding to the maximum value of the similarity and the corresponding contract text. Then, the target vector determination request is displayed on the display screen of the electronic device, that is, at least two candidate semantic vectors included in the target vector determination request can be displayed, and each candidate semantic vector corresponds to a selection control and a detail viewing control. Then, the user can click the detail viewing control to view the contract text corresponding to the candidate semantic vector and select a candidate semantic vector that best matches the to-be-identified semantic vector from the displayed at least two candidate semantic vectors, denoted as an optimal candidate semantic vector, and click the selection control corresponding to the optimal candidate semantic vector. After that, the electronic device can obtain selection information of the user for the target vector determination request after detecting the triggering operation of the user for the selection control, and determine the candidate semantic vector corresponding to the selection information as the target vector. The target vector determination request is used to solicit the user's opinion to determine the final target vector. The selection information is the feedback content of the user for the target vector determination request. When there are at least two candidate semantic vectors corresponding to the maximum value of the similarity, the final target vector is determined by manual selection, which can improve the determination accuracy of the target vector, and thus provides an accurate data basis for subsequent determination of the payment method.

[0083] S280, determining the payment method preset for the target vector as the payment method corresponding to the trade contract image.

[0084] Specifically, the payment method corresponding to the identifier of the target vector can be obtained by querying the payment method mapping table based on the identifier of the target vector, and the payment method is determined as the payment method corresponding to the trade contract image.

[0085] Alternatively, the payment method corresponding to the identifier of the target vector can be obtained by querying the payment method mapping table based on the identifier of the target vector, and the payment method corresponding to the payment method code can be obtained by querying the preset payment code list based on the payment method code. Then, the payment method is determined as the payment method corresponding to the trade contract image.

[0086] Optionally, if there are at least two candidate semantic vectors corresponding to the maximum value of the similarity, after determining the payment method preset for the target vector as the payment method corresponding to the trade contract image, the to-be-identified semantic vector and the payment method corresponding to the trade contract image can be stored in the vector database, which can enrich the vector database and provide an accurate data basis for subsequent determination of the payment method of other trade contract images, thereby improving the recognition efficiency and recognition accuracy of the payment method.

[0087] It should be noted that after the new semantic vector is inserted into the vector database, the index file can be adaptively updated to store the newly added semantic vector and the corresponding payment method clustering into the index file, which can ensure data consistency and improve the recognition accuracy of the payment method.

[0088] Optionally, if there are multiple copies of the trade contract image, after determining the payment method preset for the target vector as the payment method corresponding to the trade contract image, a corresponding contract identifier can be set for each copy of the trade contract image, and the payment method of the corresponding trade contract image is labeled for each copy of the trade contract image to form a payment method identification report, that is, the payment method identification report can include the contract identifier corresponding to the trade contract image and the corresponding payment method, and then the payment method identification report is fed back to the user terminal of the user, such as through email and / or SMS, etc. Feedback to the user terminal of the user for the user to view the detailed identification result, thereby improving the user experience.

[0089] For example, when the business personnel need to identify the payment method corresponding to each trade contract in multiple trade contracts, the trade contract image corresponding to each trade contract can be obtained, and then S210 to S280 are used to identify each trade contract image to determine the payment method corresponding to each trade contract, such as payment upon delivery, cash on delivery or prepayment of part of the payment, etc.

[0090] The technical scheme of the embodiment of the present application can obtain a trade contract image input by a user, perform text recognition on the trade contract image to obtain trade contract text, and then match the trade contract text according to a preset regular rule to extract payment element information from the trade contract text. The preset regular rule can improve the calculation efficiency and reduce the implementation complexity, thereby improving the matching efficiency and accuracy, and thus improving the extraction efficiency and accuracy of the payment element information. Then, the payment element information is subjected to semantic vectorization processing to obtain a to-be-recognized semantic vector, the similarity between the to-be-recognized semantic vector and the clustering semantic vector of each cluster center in the index file is calculated, and the cluster to which the cluster center corresponding to the maximum value of the similarity belongs is determined as a target cluster, which can improve the determination accuracy and efficiency of the target cluster and provide an accurate data basis for subsequent determination of a target vector. Then, the semantic vectors belonging to the target cluster are extracted from the index file to obtain a plurality of candidate semantic vectors, which can improve the acquisition efficiency of the candidate semantic vectors. The similarity between the to-be-recognized semantic vector and each candidate semantic vector is calculated, and the candidate semantic vector corresponding to the maximum value of the similarity is determined as the target vector, which can improve the calculation efficiency and reduce the implementation complexity. Moreover, it is not necessary to calculate the similarity between the to-be-recognized semantic vector and all semantic vectors, but only the similarity between the to-be-recognized semantic vector and all candidate semantic vectors needs to be calculated, thereby improving the determination accuracy and efficiency of the target vector and saving the calculation resources, and providing an accurate data basis for subsequent determination of a payment method. Finally, the payment method preset for the target vector is determined as the payment method corresponding to the trade contract image, which can realize an automatic recognition process of the payment method, does not need to rely on manual recognition, saves manpower, greatly reduces the business burden of business personnel, thereby shortens the recognition time, avoids recognition errors caused by manual recognition, and thus improves the recognition accuracy and efficiency of the payment method.

[0091] Figure 3 is a structural schematic diagram of a payment method recognition device provided by the embodiment of the present application, referring to Figure 3 The payment method recognition device can include:

[0092] The obtaining module 310 is configured to obtain a trade contract image input by a user.

[0093] The extraction module 320 is configured to perform text recognition on the trade contract image to obtain trade contract text, and extract payment element information from the trade contract text.

[0094] The vectorization module 330 is configured to perform semantic vectorization processing on the payment element information to obtain a to-be-recognized semantic vector.

[0095] The determining module 340 is configured to determine a semantic vector in the vector database that matches the to-be-identified semantic vector, obtain a target vector, and determine the payment method preset for the target vector as the payment method corresponding to the trade contract image. The vector database includes semantic vectors and payment methods preset for the semantic vectors.

[0096] In an embodiment, the vector database in the determining module 340 is constructed in the following manner:

[0097] A plurality of contract images in the contract database are obtained, and a payment method is labeled for each contract image.

[0098] Text recognition is performed on each contract image to obtain contract text corresponding to the contract image, and payment element information is extracted from the contract text of each contract image to obtain payment element information corresponding to the contract image.

[0099] The payment element information of each contract image is subjected to semantic vectorization processing to obtain a semantic vector corresponding to the contract image.

[0100] The semantic vector of each contract image and the corresponding payment method are stored in the vector database.

[0101] In an embodiment, the payment method identification apparatus further includes a first storage module, which is specifically configured to:

[0102] After the semantic vector of each contract image and the corresponding payment method are stored in the vector database, the plurality of semantic vectors in the vector database are clustered, and a cluster semantic vector corresponding to a cluster center in each cluster is determined based on the semantic vectors in the cluster.

[0103] The cluster semantic vector of the cluster center, the plurality of semantic vectors in the vector database, and the corresponding payment method cluster are stored in an index file.

[0104] In an embodiment, the determining module 340 determines a semantic vector in the vector database that matches the to-be-identified semantic vector, and obtains a target vector, including:

[0105] The similarity between the to-be-identified semantic vector and the cluster semantic vector of each cluster center in the index file is calculated, and a cluster to which a cluster center corresponding to a maximum value of the similarity belongs is determined as a target cluster.

[0106] The semantic vectors belonging to the target cluster are extracted from the index file to obtain a plurality of candidate semantic vectors.

[0107] The similarity between the to-be-identified semantic vector and each candidate semantic vector is calculated, and a candidate semantic vector corresponding to a maximum value of the similarity is determined as a target vector.

[0108] In an embodiment, if there are at least two candidate semantic vectors corresponding to the maximum value of the similarity, the determining module 340 determines the candidate semantic vector corresponding to the maximum value of the similarity as the target vector, including: generating a target vector determination request based on the candidate semantic vector corresponding to the maximum value of the similarity, and displaying the target vector determination request; obtaining selection information of the user for the target vector determination request, and determining the candidate semantic vector corresponding to the selection information as the target vector;

[0109] Correspondingly, the payment mode recognition device further includes a second storage module, which is specifically configured to: after determining the payment mode preset for the target vector as the payment mode corresponding to the trade contract image, store the payment mode corresponding to the trade contract image and the to-be-recognized semantic vector into the vector database.

[0110] In an embodiment, the extraction module 320 extracts the payment element information from the trade contract text, including:

[0111] According to the preset regular rule, the trade contract text is matched, and the payment element information is extracted from the trade contract text.

[0112] In an embodiment, if there are multiple trade contract images, the payment mode recognition device further includes a feedback module, which is specifically configured to:

[0113] After determining the payment mode preset for the target vector as the payment mode corresponding to the trade contract image, the payment mode corresponding to each trade contract image is labeled, a payment mode recognition report is formed, and the payment mode recognition report is fed back to the user terminal of the user.

[0114] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional modules is taken as an example for illustration, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the above described functional modules can refer to the corresponding process in the foregoing method embodiments, which will not be described here.

[0115] The payment mode recognition device provided in the embodiment can be applied to the payment mode recognition method provided in any of the above embodiments, and has corresponding functions and beneficial effects.

[0116] Figure 4 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. Figure 4 A block diagram of an exemplary electronic device 11 suitable for implementing the embodiments of the present application is shown. Figure 4 The electronic device 11 shown is merely an example, and should not impose any limitation on the functions and use range of the embodiment.

[0117] like Figure 4 As shown, the electronic device 11 is represented in the form of a general-purpose computing electronic device. The components of the electronic device 11 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and bus 18 connecting different system components (including system memory 28 and processing unit 16).

[0118] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0119] Electronic device 11 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 11, including volatile and non-volatile media, removable and non-removable media.

[0120] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Electronic device 11 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (… Figure 4 Not shown; usually referred to as a "hard drive"). Although Figure 4 As not shown, disk drives for reading and writing to removable non-volatile disks (e.g., "floppy disks") and optical disc drives for reading and writing to removable non-volatile optical discs (e.g., portable compact disk read-only memory, digital multifunction optical disc read-only memory, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. System memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this application.

[0121] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of this application.

[0122] Electronic device 11 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with electronic device 11, and / or with any device that enables electronic device 11 to communicate with one or more other computing devices (e.g., network interface card and modem, etc.). This communication can be performed via input / output (I / O) interface 22. Furthermore, electronic device 11 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 20.

[0123] like Figure 4 As shown, network adapter 20 communicates with other modules of electronic device 11 via bus 18. It should be understood that, although... ​ As not shown, other hardware and / or software modules may be used in conjunction with electronic device 11, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, Redundant Array of Independent Disks (RAID) systems, tape drives, and data backup storage systems.

[0124] Processing unit 16 executes various functional applications and page displays by running programs stored in system memory 28, such as implementing a payment method identification method provided in this application embodiment, the method including:

[0125] Obtain the trade contract image input by the user;

[0126] Text recognition is performed on trade contract images to obtain the trade contract text, and payment element information is extracted from the trade contract text;

[0127] The payment element information is semantically vectorized to obtain the semantic vector to be identified.

[0128] The semantic vector that matches the semantic vector to be identified in the vector database is determined to obtain the target vector, and the payment method preset for the target vector is determined as the payment method corresponding to the trade contract image. The vector database includes the semantic vector and the payment method preset for the semantic vector.

[0129] Of course, those skilled in the art can understand that the processor can also implement the technical solutions of the payment method identification method provided by any embodiment of the application.

[0130] The embodiment of the application provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to implement, for example, a payment method identification method provided by the embodiment of the application, the method comprises the following steps:

[0131] An image of a trade contract input by a user is acquired;

[0132] Text recognition is performed on the trade contract image to obtain trade contract text, and payment element information is extracted from the trade contract text;

[0133] The payment element information is subjected to semantic vectorization processing to obtain a to-be-identified semantic vector;

[0134] A semantic vector matched with the to-be-identified semantic vector in a vector database is determined to obtain a target vector, and a payment method preset for the target vector is determined as a payment method corresponding to the trade contract image, and the vector database comprises the semantic vector and the payment method preset for the semantic vector.

[0135] The computer storage medium of the embodiment can adopt any combination of one or more computer readable media. The computer readable medium can be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination thereof. More specific examples (non-exhaustive list) of the computer readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, the computer readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or component.

[0136] These computer readable program instructions can be provided to a processor of a computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. These computer readable program instructions can also be stored in a computer readable storage medium that can direct a computer, a programmable data processing apparatus, and the other

[0137] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process, such that the instructions which execute on the computer, other programmable data processing apparatus, or other device implement the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0138] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process, such that the instructions which execute on the computer, other programmable data processing apparatus, or other device implement the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0139] Embodiments of the present application also provide a computer program product, comprising a computer program which, when executed by a processor, implements a payment method identification method as provided by the embodiments of the present application, the method comprising:

[0140] obtaining a trade contract image input by a user;

[0141] performing text recognition on the trade contract image to obtain trade contract text, and extracting payment element information from the trade contract text;

[0142] performing semantic vectorization processing on the payment element information to obtain a to-be-identified semantic vector;

[0143] determining a semantic vector matching the to-be-identified semantic vector in a vector database to obtain a target vector, and determining a payment method preset for the target vector as a payment method corresponding to the trade contract image, the vector database comprising semantic vectors and payment methods preset for the semantic vectors.

[0144] The computer program product can be implemented in one or more computer programs comprising computer program code. A computer program in the present context can be a piece of software written to either be run on the user computer, run partially on the user computer, run on a stand-alone software package, run partially on the user computer and partially on a remote computer, or run entirely on a remote computer or server. In the case of running partially on the user computer and partially on a remote computer, the remote computer can be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or the remote computer can be connected to the user computer through an external computer (for example, through an Internet Service Provider to the Internet).

[0145] Those skilled in the art should understand that the modules or steps of the present application described above can be implemented by general computing devices, which can be concentrated on a single computing device or distributed on a network composed of multiple computing devices, and can be implemented by computer-executable program codes, which can be stored in storage devices and executed by computing devices, or can be implemented by individual integrated circuit modules, or a plurality of modules or steps can be implemented by a single integrated circuit module. Therefore, the present application is not limited to any specific combination of hardware and software.

[0146] It should be noted that in the technical solutions of the embodiments of the present application, the collected information is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of related data comply with relevant laws, regulations and standards of relevant countries and regions, necessary security measures are taken, public order and good customs are not violated, and appropriate operation portals are provided for the user to choose authorization or refusal; in addition, appropriate operation portals are provided for the user to choose to agree or refuse automatic decision results; if the user chooses to refuse, the expert decision process is entered.

[0147] It should be noted that the above are only preferred embodiments of the present application and the technical principles applied. Those skilled in the art will understand that the present application is not limited to the specific embodiments herein, and those skilled in the art can make various obvious changes, readjustments and substitutions without departing from the scope of the present application. Therefore, although the present application has been described in detail through the above embodiments, the present application is not limited to the above embodiments, and can include more other equivalent embodiments without departing from the inventive concept of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims

1. A payment method identification method characterized by, The method comprises: obtaining a trade contract image input by a user; performing text recognition on the trade contract image to obtain trade contract text, and extracting payment element information from the trade contract text; performing semantic vectorization processing on the payment element information to obtain a to-be-recognized semantic vector; determining a semantic vector matching the to-be-recognized semantic vector in a vector database to obtain a target vector, and determining a payment method preset for the target vector as a payment method corresponding to the trade contract image, wherein the vector database comprises semantic vectors and payment methods preset for the semantic vectors.

2. The payment method identification method according to claim 1, characterized by, The construction process of the vector database is as follows: obtaining multiple contract images in a contract database, and labeling a payment method for each contract image; performing text recognition on each contract image to obtain contract text corresponding to the contract image, and extracting payment element information from the contract text of each contract image to obtain payment element information corresponding to the contract image; performing semantic vectorization processing on the payment element information of each contract image to obtain a semantic vector corresponding to the contract image; storing the semantic vector of each contract image and the corresponding payment method in the vector database.

3. The payment method identification method according to claim 2, characterized by, After storing the semantic vector of each contract image and the corresponding payment method in the vector database, the method further comprises: clustering multiple semantic vectors in the vector database, and determining a cluster semantic vector of a corresponding cluster center based on semantic vectors in each cluster; storing the cluster semantic vector of the cluster center, the multiple semantic vectors in the vector database, and the corresponding payment method in an index file.

4. The payment method identification method according to claim 3, characterized by, The determination of the semantic vector matching the to-be-recognized semantic vector in the vector database to obtain the target vector comprises: calculating the similarity between the to-be-recognized semantic vector and the cluster semantic vector of each cluster center in the index file, and determining the cluster to which the cluster center corresponding to the maximum value of the similarity belongs as a target cluster; extracting semantic vectors belonging to the target cluster from the index file to obtain multiple candidate semantic vectors; calculating the similarity between the to-be-recognized semantic vector and each candidate semantic vector, and determining the candidate semantic vector corresponding to the maximum value of the similarity as the target vector.

5. The payment method identification method according to claim 4, characterized by, If there are at least two candidate semantic vectors corresponding to the maximum value of the similarity, determining the candidate semantic vector corresponding to the maximum value of the similarity as the target vector comprises: generating a target vector determination request based on the candidate semantic vector corresponding to the maximum value of the similarity, and displaying the target vector determination request; obtaining selection information of the user for the target vector determination request, and determining the candidate semantic vector corresponding to the selection information as the target vector; Correspondingly, after determining the payment method preset for the target vector as the payment method corresponding to the trade contract image, the method further comprises: storing the to-be-recognized semantic vector and the payment method corresponding to the trade contract image in the vector database.

6. The payment method identification method according to claim 1, characterized by, The extraction of the payment element information from the trade contract text comprises: The payment element information is extracted from the trade contract text according to a preset regular rule.

7. The payment method identification method according to claim 1, characterized by, If there are multiple copies of the trade contract image, after determining the payment method preset for the target vector as the payment method corresponding to the trade contract image, the method further comprises: For each trade contract image, the payment method of the corresponding trade contract image is labeled to form a payment method identification report, and the payment method identification report is fed back to the user terminal of the user.

8. An electronic device, comprising: The electronic device comprises: at least one processor; and a memory connected in communication with the at least one processor; wherein The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the payment method identification method of any one of claims 1 to 7.

9. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the payment method identification method of any one of claims 1 to 7.

10. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the payment method identification method of any one of claims 1 to 7.