CN117933424A - Model training method, business wind control method, device and storage medium - Google Patents

Model training method, business wind control method, device and storage medium Download PDF

Info

Publication number
CN117933424A
CN117933424A CN202410138854.XA CN202410138854A CN117933424A CN 117933424 A CN117933424 A CN 117933424A CN 202410138854 A CN202410138854 A CN 202410138854A CN 117933424 A CN117933424 A CN 117933424A
Authority
CN
China
Prior art keywords
text
information
text information
document
entity
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410138854.XA
Other languages
Chinese (zh)
Inventor
郑行
何茂林
曾凡伟
徐进禹
吴歌
王巍
孙清清
宋博文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202410138854.XA priority Critical patent/CN117933424A/en
Publication of CN117933424A publication Critical patent/CN117933424A/en
Pending legal-status Critical Current

Links

Abstract

According to the model training method, the business wind control device and the storage medium, unstructured documents can be firstly obtained, text information contained in the unstructured documents can be extracted from the unstructured documents, text position information of each text information in the unstructured documents is determined, then the text information and the text position information are input into an entity recognition model, the entity recognition model aims at each text information, text information related to the text information is determined from other text information according to the text position information of the text information in the unstructured documents and the text position information of other text information in the unstructured documents, the text information related to the text information is used as reference text information, corresponding entity information is determined according to the reference text information and is used as a prediction entity, and the entity recognition model is trained by taking the deviation between the prediction entity corresponding to each text information and the actual entity information contained in the unstructured documents as an optimization target.

Description

Model training method, business wind control method, device and storage medium
Technical Field
The present disclosure relates to the field of risk prevention and control, and in particular, to a model training method, a business wind control method, a device, and a storage medium.
Background
In recent years, with the development of computer technology and artificial intelligence technology, the amount of data generated by trade-related services is gradually increasing, so that the risk control of trade-related services is particularly important.
Currently, in the process of performing risk control on trade-related services, risk entity inspection can be performed on unstructured documents submitted by users, such as trade contracts and invoices, and risk control can be performed on the users according to inspection results so as to ensure the safety of personal information or service data of the users, wherein the risk entity can refer to entities such as people contained in a list of trusted executives, objects in a list of restricted transaction objects, and the like.
However, at present, only a manual auditing mode can be adopted to test the risk entity in the unstructured document submitted by the user, so that the accuracy of testing the risk entity is low, and a certain potential safety hazard is brought. At the same time, the efficiency of the inspection of the risk entity is also often low.
Therefore, how to improve the accuracy and efficiency of verifying risk entities in unstructured documents is a urgent problem to be solved.
Disclosure of Invention
The present disclosure provides a model training method, a service wind control method, a device and a storage medium, so as to partially solve the above problems in the prior art.
The technical scheme adopted in the specification is as follows:
the specification provides a model training method, comprising:
Obtaining an unstructured document;
extracting each text information contained in the unstructured document from the unstructured document, and determining text position information of each text information in the unstructured document;
Inputting the text information and the text position information into an entity recognition model to be trained, so that the entity recognition model determines text information related to the text information from other text information according to the text position information of the text information in the unstructured document and the text position information of the other text information in the unstructured document as reference text information for each text information, and determines entity information corresponding to the text information according to the reference text information as a prediction entity corresponding to the text information;
And training the entity recognition model by taking the deviation between the predicted entity corresponding to each text message and the actual entity information contained in the unstructured document as an optimization target.
Optionally, extracting each text information contained in the unstructured document from the unstructured document, and determining text position information of each text information in the unstructured document, which specifically includes:
And inputting the unstructured document into a preset document identification model, so that the document identification model extracts each text information contained in the unstructured document from the unstructured document, and determines the text position information of each text information in the unstructured document.
Optionally, the entity identification model comprises a splicing layer and an identification layer;
inputting the text information and the text position information into an entity recognition model to be trained, so that the entity recognition model can determine text information associated with the text information from other text information according to the text position information of the text information in the unstructured document and the text position information of the other text information in the unstructured document as reference text information, and determine entity information corresponding to the text information according to the reference text information as a prediction entity corresponding to the text information, wherein the method specifically comprises the following steps of:
Inputting the text information and the text position information into a splicing layer in an entity recognition model to be trained, splicing the text characteristics corresponding to each text information and the position characteristics of the text position information of each text information in the unstructured document to obtain spliced characteristics, inputting the spliced characteristics into the recognition layer, enabling the recognition layer to determine text information associated with the text information from other text information according to the text position information of the text information in the unstructured document and the text position information of other text information in the unstructured document based on the spliced characteristics, taking the text information as reference text information, and determining entity information corresponding to the text information according to the reference text information as a prediction entity corresponding to the text information.
Optionally, inputting the text information and the text position information into a splicing layer in the entity recognition model to be trained, so as to splice the text feature corresponding to each text information and the position feature of the text position information of each text information in the unstructured document, thereby obtaining the spliced feature, specifically including:
Inputting the text information and the text position information into a splicing layer in an entity recognition model to be trained, so as to splice text features corresponding to the text information with the position features of the text information in the unstructured document aiming at each text information to obtain sub-splicing features corresponding to the text information;
and splicing the sub-splicing features corresponding to each text message to obtain the spliced features.
Optionally, the unstructured documents of different types correspond to different entity recognition models;
before inputting the text information and the text position information into the entity recognition model to be trained, the method further comprises:
Inputting the unstructured document into a preset document classification model so that the document classification model determines the document type of the unstructured document;
Inputting the text information and the text position information into an entity recognition model to be trained, wherein the method specifically comprises the following steps of:
and inputting the text information and the text position information into an entity recognition model corresponding to the document type.
The specification provides a service wind control method, which comprises the following steps:
Obtaining an unstructured document to be detected;
Extracting each text message contained in the unstructured document to be detected from the unstructured document to be detected, and determining the text position information of each text message in the unstructured document to be detected;
Inputting the text information and the text position information into a pre-trained entity recognition model, so that the entity recognition model is used for each text information, determining text information related to the text information from other text information according to the text position information of the text information in the unstructured document and the text position information of the other text information in the unstructured document, and determining entity information corresponding to the text information according to the reference text information as a target entity corresponding to the text information, wherein the entity recognition model is trained by the model training method;
And matching the target entity corresponding to each text message with a preset risk list, and executing service wind control according to the obtained matching result.
Optionally, extracting each text information contained in the unstructured document to be detected from the unstructured document to be detected, and determining text position information of each text information in the unstructured document to be detected, which specifically includes:
Inputting the unstructured document to be detected into a preset document recognition model, so that the document recognition model extracts each text message contained in the unstructured document to be detected from the unstructured document to be detected, and determines the text position information of each text message in the unstructured document to be detected, wherein the document recognition model refers to the document recognition model mentioned by the model training method.
Optionally, different types of unstructured documents to be detected correspond to different entity recognition models;
Before inputting the text information and the text position information into the pre-trained entity recognition model, the method further comprises:
Inputting the unstructured document to be detected into a preset document classification model to determine the document type corresponding to the unstructured document to be detected, wherein the document classification model refers to the document classification model mentioned by the model training method;
inputting the text information and the text position information into a pre-trained entity recognition model, wherein the method specifically comprises the following steps of:
and inputting the text information and the text position information into an entity recognition model corresponding to the document type.
The present specification provides a model training apparatus comprising:
the acquisition module is used for: for obtaining unstructured documents;
And a determination module: the method comprises the steps of extracting each text information contained in an unstructured document from the unstructured document, and determining text position information of each text information in the unstructured document;
And a prediction module: the method comprises the steps of inputting each text message and the text position information into an entity recognition model to be trained, enabling the entity recognition model to determine text information related to the text message from other text messages according to the text position information of the text message in the unstructured document and the text position information of the other text messages in the unstructured document for each text message, and determining entity information corresponding to the text message according to the reference text message as a prediction entity corresponding to the text message;
Training module: the entity recognition model is trained by taking the deviation between the predicted entity corresponding to each text message and the actual entity information contained in the unstructured document as an optimization target.
Optionally, the determining module is specifically configured to: and inputting the unstructured document into a preset document identification model, so that the document identification model extracts each text information contained in the unstructured document from the unstructured document, and determines the text position information of each text information in the unstructured document.
Optionally, the entity identification model comprises a splicing layer and an identification layer;
The prediction module is specifically configured to: inputting the text information and the text position information into a splicing layer in an entity recognition model to be trained, splicing the text characteristics corresponding to each text information and the position characteristics of the text position information of each text information in the unstructured document to obtain spliced characteristics, inputting the spliced characteristics into the recognition layer, enabling the recognition layer to determine text information associated with the text information from other text information according to the text position information of the text information in the unstructured document and the text position information of other text information in the unstructured document based on the spliced characteristics, taking the text information as reference text information, and determining entity information corresponding to the text information according to the reference text information as a prediction entity corresponding to the text information.
Optionally, the prediction module is further configured to: inputting the text information and the text position information into a splicing layer in an entity recognition model to be trained, so as to splice text features corresponding to the text information with the position features of the text information in the unstructured document aiming at each text information to obtain sub-splicing features corresponding to the text information;
and splicing the sub-splicing features corresponding to each text message to obtain the spliced features.
Optionally, the unstructured documents of different types correspond to different entity recognition models;
The apparatus further comprises: a classification module;
the classification module is specifically configured to: inputting the unstructured document into a preset document classification model so that the document classification model determines the document type of the unstructured document;
The prediction module is further configured to: and inputting the text information and the text position information into an entity recognition model corresponding to the document type.
The present specification provides a computer readable storage medium storing a computer program which when executed by a processor implements the model training method or business wind control method described above.
The present specification provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the above model training method or business wind control method when executing the program.
The above-mentioned at least one technical scheme that this specification adopted can reach following beneficial effect:
According to the model training method provided by the specification, firstly, an unstructured document is obtained, each text message contained in the unstructured document is extracted from the unstructured document, the text position information of each text message in the unstructured document is determined, then, each text message and the text position information are input into an entity recognition model, so that the entity recognition model is trained by taking the deviation between a predicted entity corresponding to each text message and actual entity information contained in the unstructured document as an optimization target according to the text position information of the text message in the unstructured document and the text position information of other text messages in the unstructured document, determining the text information associated with the text message from the other text messages as reference text information, determining the corresponding entity information according to the reference text information, and taking the deviation between the predicted entity corresponding to each text message and the actual entity information contained in the unstructured document as the optimization target.
According to the method, in the process of training the entity identification model, other text information related to each text information contained in the unstructured document can be determined and used as reference text information according to the input text position information, and the predicted entity in the text information is determined by analyzing the relevance between each text information and the reference text information corresponding to each text information, so that the accuracy of entity identification by the entity identification model is greatly improved, the accuracy of business wind control is further improved, and meanwhile the problems of low inspection accuracy, low inspection efficiency and the like caused by the fact that a risk entity is inspected by adopting a manual auditing mode in the prior art are effectively solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the specification, illustrate and explain the exemplary embodiments of the present specification and their description, are not intended to limit the specification unduly. In the drawings:
FIG. 1 is a schematic flow chart of a model training method provided in the present specification;
Fig. 2 is a schematic diagram of a flow diagram of a service wind control method provided in the present specification;
FIG. 3 is a schematic diagram of a model training apparatus provided in the present specification;
fig. 4 is a schematic diagram of a service wind control device provided in the present specification;
Fig. 5 is a schematic structural view of an electronic device corresponding to fig. 1 or fig. 2 provided in the present specification.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the present specification more apparent, the technical solutions of the present specification will be clearly and completely described below with reference to specific embodiments of the present specification and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present specification. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are intended to be within the scope of the present disclosure.
The following describes in detail the technical solutions provided by the embodiments of the present specification with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of a model training method provided in the present specification, including the following steps:
s101: an unstructured document is obtained.
S102: and extracting each text information contained in the unstructured document from the unstructured document, and determining the text position information of each text information in the unstructured document.
The execution subject of the model training method in the present specification may be a terminal device such as a desktop computer or a notebook computer, or may be a client installed in the terminal device, or may be a server. The model training method in the embodiment of the present specification will be described below by taking only the server as an execution subject.
Currently, in the process of performing risk control on trade-related business, risk entity inspection can be performed on unstructured documents submitted by users, such as trade contracts and invoices, and risk control can be performed on the users according to inspection results so as to ensure the safety of personal information or business data of the users. However, at present, only a manual auditing mode can be adopted to test the risk entity in the unstructured document submitted by the user, so that the accuracy of testing the risk entity is low, and a certain potential safety hazard is brought. Meanwhile, the current test efficiency of the risk entity is also often lower.
To solve the above-described problem, in this specification, a server may first acquire an unstructured document, wherein the unstructured document may be an unstructured document such as a trade contract, a logistic order, a customs clearance order, or the like of a user.
The server may extract each text information contained in the unstructured document from the unstructured document and determine text location information for each text information in the unstructured document. The text information contained in the unstructured document can be cargo detail information, import or export port name information and the like in a customs clearance slip, and the text position information of each text information in the unstructured document can reflect the spatial position of each text information in the unstructured document. For example, the server may first convert the unstructured document into a format of a picture, and then may employ text recognition techniques (such as optical character recognition (OCR, optical Character Recognition), etc.) to cause the document recognition model to extract each text information contained in the unstructured document and determine text location information of each text information in the unstructured document.
S103: and inputting the text information and the text position information into an entity recognition model to be trained, so that the entity recognition model determines text information associated with the text information from other text information according to the text position information of the text information in the unstructured document and the text position information of the other text information in the unstructured document as reference text information, and determines entity information corresponding to the text information according to the reference text information as a prediction entity corresponding to the text information.
The server may input each text information and the text position information into the entity recognition model to be trained, and may make the entity recognition model determine, for each text information, the text information associated with the text information from other text information according to the text position information of the text information in the unstructured document and the text position information of other text information in the unstructured document, as reference text information, where, since the text information in the same line or column in the unstructured document is often the same type of entity (such as a person name included in the unstructured document is often in the same line or column), the reference text information may be, for example, text information in the unstructured document in the same line or column as the text information, etc., and further, may refer to the type of the entity in the same line or column as the text information, so as to determine, with greater accuracy, the entity type corresponding to the text information, and further determine, as the predicted entity corresponding to the text information, where, the predicted entity may be the entity name of the entity recognition predicted by the entity recognition model, such as a person name, a transaction item, etc.
It should be noted that the entity recognition model may include a concatenation layer and a recognition layer, the concatenation layer may be a network layer such as a layout language model (Layout Language Model, layoutLM), and the recognition layer may be a network layer such as a named-body recognition model (NAMED ENTITY Recognition model, NER).
Specifically, the server may input each text information and each text position information to a splicing layer in the entity recognition model, and then may splice, for each text information, a text feature corresponding to the text information with a position feature of the text position information of the text information in the unstructured document, to obtain a sub-splice feature corresponding to the text information, and then may splice the sub-splice feature corresponding to each text information to obtain a post-splice feature.
Then, the server can input the spliced features into the recognition layer in the entity recognition model, so that the recognition layer can determine text information associated with the text information from other text information according to the text position information of the text information in the unstructured document and the text position information of other text information in the unstructured document based on the spliced features, and determine entity information corresponding to the text information according to the reference text information as a prediction entity corresponding to the text information.
It should be noted that unstructured documents such as trade contracts, logistics sheets, customs notes and the like often have different formats or types, so for unstructured documents of different formats or types, the unstructured documents of different formats or types can be subjected to entity recognition in the present specification by training different types of entity recognition models, that is, the unstructured documents of different types can correspond to different entity recognition models, for example, for unstructured documents of three different formats or types of trade contracts, logistics sheets and customs notes, three different entity recognition models can correspond to each other.
Specifically, before each text information and text position information are input into the entity recognition model, unstructured documents can be input into a preset document classification model (such as a bi-directional encoder representing a self-attention model, etc.), and then the document classification model can determine the document type of the unstructured document, such as trade contracts or logistics sheets or customs notes, etc. After determining the document type of the unstructured document, each text information and text position information determined by the document identification model may be input into an entity identification model corresponding to the document type to obtain a predicted entity corresponding to each text information.
Of course, in the practical application process, in order to reduce the cost of model training, unstructured documents with similar formats can be used as unstructured documents with the same type according to service requirements, and the unstructured documents with similar formats corresponding to the same type of entity recognition model, for example, unstructured documents with similar formats, namely a logistics sheet and an express sheet, can correspond to the entity recognition model with the same type. Therefore, the number of entity recognition models to be trained can be reduced, and the model training cost is further reduced.
S104: and training the entity recognition model by taking the deviation between the predicted entity corresponding to each text message and the actual entity information contained in the unstructured document as an optimization target.
In the present specification, the server may train the entity recognition model by minimizing a deviation between the predicted entity corresponding to each text information contained in the unstructured document and the actual entity information contained in the unstructured document as a training target. Of course, separate training is required for entity recognition models corresponding to unstructured documents of different formats or types.
According to the method, in the process of training the entity identification model, other text information related to each text information contained in the unstructured document can be determined and used as reference text information according to the input text position information, and the predicted entity in each text information is determined by analyzing the relevance between each text information and the reference text information corresponding to each text information, so that the prediction accuracy of the entity identification model is greatly enhanced, the accuracy of business wind control is further improved, and meanwhile, the problems of low detection accuracy, low detection efficiency and the like caused by the fact that the risk entity is detected by adopting a manual verification mode in the prior art are avoided.
The foregoing mainly describes a model training method, and after the model is trained, the model training method can be applied to service wind control, and a service wind control method provided in the present specification will be described in detail below.
Fig. 2 is a schematic flow chart of a service wind control method provided in the present specification, including the following steps:
s201: and obtaining the unstructured document to be detected.
For the business wind control method provided in the present specification, the execution subject may be a server, or may be a terminal device such as a desktop computer, a notebook computer, etc., and the following will be described in detail by taking the server as an example only.
In the process of business wind control, the server can collect unstructured documents such as trade contracts, logistics sheets and customs notes of users and serve as unstructured documents to be detected, and can identify entities contained in the unstructured documents to be detected through a pre-trained entity identification model, so that risk detection is carried out on the identified entities to execute business wind control, and management and control strategies such as increasing transaction limits, enhancing monitoring frequency and the like can be implemented on trade businesses with risk entities.
S202: and extracting each text message contained in the unstructured document to be detected from the unstructured document to be detected, and determining the text position information of each text message in the unstructured document to be detected.
In the practical application process, the server may first extract each text information contained in the unstructured document to be detected from the unstructured document to be detected and determine the text position information of each text information in the unstructured document to be detected, for example, the server may deploy the document recognition model mentioned in the model training method, and through the document recognition model, each text information contained in the unstructured document to be detected may be recognized and determine the text position information of each text information in the unstructured document to be detected.
S203: and inputting the text information and the text position information into a pre-trained entity recognition model, so that the entity recognition model is used for each text information, determining text information related to the text information from other text information according to the text position information of the text information in the unstructured document and the text position information of the other text information in the unstructured document, and determining entity information corresponding to the text information according to the reference text information as a target entity corresponding to the text information, wherein the entity recognition model is trained by the model training method.
Because the unstructured documents to be detected often have different formats or types in practical application, the server can be further provided with entity recognition models corresponding to the different formats or types of the unstructured documents to be detected, which are obtained by the model training method. In addition, in order to determine the document type of the unstructured document to be detected, a document classification model mentioned in the model training method above may be deployed in the server. That is, the server may first input the unstructured document to be detected into the document classification model to determine the document type corresponding to the unstructured document to be detected, and then may input each text information and text position information determined by the document identification model into the entity identification model corresponding to the document type to identify a target entity (such as a person name, a transaction article name, etc.) included in the unstructured document to be detected, where the identified target entity may be a person name, a transaction article name, etc.
S204: and matching the target entity corresponding to each text message with a preset risk list, and executing service wind control according to the obtained matching result.
After identifying the target entity contained in the unstructured to be detected, the server may match the target entity with a preset risk list, where the risk list may be a disambiguated executed list, a sanctioned list, a restricted transaction list, etc. formulated by a financial institution or an international organization. And then, the server can execute business wind control according to the matching result, for example, can carry out strict due investigation on the business corresponding to the target entity in the list with the belief loss executed, strengthen the fund current and current monitoring and the like.
According to the method, in the process of business wind control, other text information related to each text information contained in unstructured documents can be determined and used as reference text information through the entity identification model according to the input text position information, and the predicted entity in each text information is determined through analyzing the relevance between each text information and the reference text information corresponding to each text information, so that the accuracy of entity identification model for identifying the entity is greatly improved, the accuracy of detecting risk entities contained in the identified entity is further improved, in addition, for different types of unstructured documents to be detected, different types of entity identification models with stronger pertinence obtained through the model training method can be used for identifying, the accuracy of entity identification model for identifying the entities contained in different types of unstructured documents to be detected is further improved, and meanwhile the accuracy of business wind control is also further improved.
The foregoing is a method implemented by one or more embodiments of the present disclosure, and based on the same concept, the present disclosure further provides a corresponding model training device and a service wind control device, as shown in fig. 3 and fig. 4.
Fig. 3 is a schematic diagram of a model training device provided in the present specification, including:
The acquisition module 301: for obtaining unstructured documents;
Determination module 302: the method comprises the steps of extracting each text information contained in an unstructured document from the unstructured document, and determining text position information of each text information in the unstructured document;
prediction module 303: the method comprises the steps of inputting each text message and the text position information into an entity recognition model to be trained, enabling the entity recognition model to determine text information related to the text message from other text messages according to the text position information of the text message in the unstructured document and the text position information of the other text messages in the unstructured document for each text message, and determining entity information corresponding to the text message according to the reference text message as a prediction entity corresponding to the text message;
Training module 304: the entity recognition model is trained by taking the deviation between the predicted entity corresponding to each text message and the actual entity information contained in the unstructured document as an optimization target.
Optionally, the determining module 302 is specifically configured to: and inputting the unstructured document into a preset document identification model, so that the document identification model extracts each text information contained in the unstructured document from the unstructured document, and determines the text position information of each text information in the unstructured document.
Optionally, the entity identification model comprises a splicing layer and an identification layer;
The prediction module 303 is specifically configured to: inputting the text information and the text position information into a splicing layer in an entity recognition model to be trained, splicing the text characteristics corresponding to each text information and the position characteristics of the text position information of each text information in the unstructured document to obtain spliced characteristics, inputting the spliced characteristics into the recognition layer, enabling the recognition layer to determine text information associated with the text information from other text information according to the text position information of the text information in the unstructured document and the text position information of other text information in the unstructured document based on the spliced characteristics, taking the text information as reference text information, and determining entity information corresponding to the text information according to the reference text information as a prediction entity corresponding to the text information.
Optionally, the prediction module 303 is further configured to: inputting the text information and the text position information into a splicing layer in an entity recognition model to be trained, so as to splice text features corresponding to the text information with the position features of the text information in the unstructured document aiming at each text information to obtain sub-splicing features corresponding to the text information; and splicing the sub-splicing features corresponding to each text message to obtain the spliced features.
Optionally, the unstructured documents of different types correspond to different entity recognition models;
the apparatus further comprises: a classification module 305;
The classification module 305 is specifically configured to: inputting the unstructured document into a preset document classification model so that the document classification model determines the document type of the unstructured document;
The prediction module 303 is further configured to: and inputting the text information and the text position information into an entity recognition model corresponding to the document type.
Fig. 4 is a schematic diagram of a service wind control device provided in the present specification, including:
acquisition module 401: the method comprises the steps of acquiring an unstructured document to be detected;
Extraction module 402: the method comprises the steps of extracting each text message contained in an unstructured document to be detected from the unstructured document to be detected, and determining text position information of each text message in the unstructured document to be detected;
Determination module 403: the method comprises the steps of inputting each text message and the text position information into a pre-trained entity recognition model, enabling the entity recognition model to be used for each text message, determining text information related to the text message from other text messages according to the text position information of the text message in the unstructured document and the text position information of the other text messages in the unstructured document, taking the text information as reference text information, and determining entity information corresponding to the text message according to the reference text information, and taking the entity information corresponding to the text message as a target entity corresponding to the text message, wherein the entity recognition model is trained by the model training method;
The wind control module 404: and the method is used for matching the target entity corresponding to each text message with a preset risk list and executing business wind control according to the obtained matching result.
Optionally, the extracting module 402 is specifically configured to: inputting the unstructured document to be detected into a preset document recognition model, so that the document recognition model extracts each text message contained in the unstructured document to be detected from the unstructured document to be detected, and determines the text position information of each text message in the unstructured document to be detected, wherein the document recognition model refers to the document recognition model mentioned by the model training method.
Optionally, different types of unstructured documents to be detected correspond to different entity recognition models;
The apparatus further comprises: a classification module 405;
the classification module 405 is specifically configured to: inputting the unstructured document to be detected into a preset document classification model to determine the document type corresponding to the unstructured document to be detected, wherein the document classification model refers to the document classification model mentioned by the model training method;
the determining module 403 is specifically configured to: and inputting the text information and the text position information into an entity recognition model corresponding to the document type.
The present specification also provides a computer readable storage medium storing a computer program operable to perform the model training method provided in fig. 1 or the business air control method provided in fig. 2 described above.
The present specification also provides a schematic structural diagram of the electronic device shown in fig. 5. At the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile storage, as illustrated in fig. 5, although other hardware required by other services may be included. The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to realize the model training method shown in the figure 1 or the business wind control method shown in the figure 2. Of course, other implementations, such as logic devices or combinations of hardware and software, are not excluded from the present description, that is, the execution subject of the following processing flows is not limited to each logic unit, but may be hardware or logic devices.
In the 90 s of the 20 th century, improvements to one technology could clearly be distinguished as improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software (improvements to the process flow). However, with the development of technology, many improvements of the current method flows can be regarded as direct improvements of hardware circuit structures. Designers almost always obtain corresponding hardware circuit structures by programming improved method flows into hardware circuits. Therefore, an improvement of a method flow cannot be said to be realized by a hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (e.g., field programmable gate array (Field Programmable GATE ARRAY, FPGA)) is an integrated circuit whose logic functions are determined by user programming of the device. A designer programs to "integrate" a digital system onto a PLD without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, such programming is mostly implemented with "logic compiler (logic compiler)" software, which is similar to the software compiler used in program development and writing, and the original code before being compiled is also written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), but HDL is not just one, but a plurality of kinds, such as ABEL(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language), and VHDL (Very-High-SPEED INTEGRATED Circuit Hardware Description Language) and Verilog are currently most commonly used. It will also be apparent to those skilled in the art that a hardware circuit implementing the logic method flow can be readily obtained by merely slightly programming the method flow into an integrated circuit using several of the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, application SPECIFIC INTEGRATED Circuits (ASICs), programmable logic controllers, and embedded microcontrollers, examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic of the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller in a pure computer readable program code, it is well possible to implement the same functionality by logically programming the method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Such a controller may thus be regarded as a kind of hardware component, and means for performing various functions included therein may also be regarded as structures within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in one or more software and/or hardware elements when implemented in the present specification.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, 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 specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
It will be appreciated by those skilled in the art that embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the present specification may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present description can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing is merely exemplary of the present disclosure and is not intended to limit the disclosure. Various modifications and alterations to this specification will become apparent to those skilled in the art. Any modifications, equivalent substitutions, improvements, or the like, which are within the spirit and principles of the present description, are intended to be included within the scope of the claims of the present application.

Claims (15)

1. A model training method, comprising:
Obtaining an unstructured document;
extracting each text information contained in the unstructured document from the unstructured document, and determining text position information of each text information in the unstructured document;
Inputting the text information and the text position information into an entity recognition model to be trained, so that the entity recognition model determines text information related to the text information from other text information according to the text position information of the text information in the unstructured document and the text position information of the other text information in the unstructured document as reference text information for each text information, and determines entity information corresponding to the text information according to the reference text information as a prediction entity corresponding to the text information;
And training the entity recognition model by taking the deviation between the predicted entity corresponding to each text message and the actual entity information contained in the unstructured document as an optimization target.
2. The method according to claim 1, extracting each text information contained in the unstructured document from the unstructured document, and determining text position information of each text information in the unstructured document, specifically comprising:
And inputting the unstructured document into a preset document identification model, so that the document identification model extracts each text information contained in the unstructured document from the unstructured document, and determines the text position information of each text information in the unstructured document.
3. The method of claim 1, wherein the entity recognition model comprises a splicing layer and a recognition layer;
inputting the text information and the text position information into an entity recognition model to be trained, so that the entity recognition model can determine text information associated with the text information from other text information according to the text position information of the text information in the unstructured document and the text position information of the other text information in the unstructured document as reference text information, and determine entity information corresponding to the text information according to the reference text information as a prediction entity corresponding to the text information, wherein the method specifically comprises the following steps of:
Inputting the text information and the text position information into a splicing layer in an entity recognition model to be trained, splicing the text characteristics corresponding to each text information and the position characteristics of the text position information of each text information in the unstructured document to obtain spliced characteristics, inputting the spliced characteristics into the recognition layer, enabling the recognition layer to determine text information associated with the text information from other text information according to the text position information of the text information in the unstructured document and the text position information of other text information in the unstructured document based on the spliced characteristics, taking the text information as reference text information, and determining entity information corresponding to the text information according to the reference text information as a prediction entity corresponding to the text information.
4. The method of claim 3, wherein the text information and the text position information are input to a splicing layer in the entity recognition model to be trained, so as to splice the text feature corresponding to each text information and the position feature of the text position information of each text information in the unstructured document, and obtain the spliced feature, and specifically includes:
Inputting the text information and the text position information into a splicing layer in an entity recognition model to be trained, so as to splice text features corresponding to the text information with the position features of the text information in the unstructured document aiming at each text information to obtain sub-splicing features corresponding to the text information;
and splicing the sub-splicing features corresponding to each text message to obtain the spliced features.
5. The method of claim 1, wherein different types of unstructured documents correspond to different entity recognition models;
before inputting the text information and the text position information into the entity recognition model to be trained, the method further comprises:
Inputting the unstructured document into a preset document classification model so that the document classification model determines the document type of the unstructured document;
Inputting the text information and the text position information into an entity recognition model to be trained, wherein the method specifically comprises the following steps of:
and inputting the text information and the text position information into an entity recognition model corresponding to the document type.
6. A business wind control method, comprising:
Obtaining an unstructured document to be detected;
Extracting each text message contained in the unstructured document to be detected from the unstructured document to be detected, and determining the text position information of each text message in the unstructured document to be detected;
Inputting the text information and the text position information into a pre-trained entity recognition model, so that the entity recognition model is trained by the method according to any one of claims 1-5 for each text information, determining text information related to the text information from other text information according to the text position information of the text information in the unstructured document and the text position information of the other text information in the unstructured document, and determining entity information corresponding to the text information according to the reference text information as reference text information;
And matching the target entity corresponding to each text message with a preset risk list, and executing service wind control according to the obtained matching result.
7. The method of claim 6, extracting each text information contained in the unstructured document to be detected from the unstructured document to be detected, and determining text position information of each text information in the unstructured document to be detected, specifically comprising:
Inputting the unstructured document to be detected into a preset document recognition model, so that the document recognition model extracts each text message contained in the unstructured document to be detected from the unstructured document to be detected, and determines the text position information of each text message in the unstructured document to be detected, wherein the document recognition model refers to the document recognition model mentioned by the method according to any one of claims 1-5.
8. The method of claim 6, wherein different types of unstructured documents to be detected correspond to different entity recognition models;
Before inputting the text information and the text position information into the pre-trained entity recognition model, the method further comprises:
Inputting the unstructured document to be detected into a preset document classification model to determine the document type corresponding to the unstructured document to be detected, wherein the document classification model refers to the document classification model mentioned by the method according to any one of claims 1-5;
inputting the text information and the text position information into a pre-trained entity recognition model, wherein the method specifically comprises the following steps of:
and inputting the text information and the text position information into an entity recognition model corresponding to the document type.
9. A model training apparatus comprising:
the acquisition module is used for: for obtaining unstructured documents;
And a determination module: the method comprises the steps of extracting each text information contained in an unstructured document from the unstructured document, and determining text position information of each text information in the unstructured document;
And a prediction module: the method comprises the steps of inputting each text message and the text position information into an entity recognition model to be trained, enabling the entity recognition model to determine text information related to the text message from other text messages according to the text position information of the text message in the unstructured document and the text position information of the other text messages in the unstructured document for each text message, and determining entity information corresponding to the text message according to the reference text message as a prediction entity corresponding to the text message;
Training module: the entity recognition model is trained by taking the deviation between the predicted entity corresponding to each text message and the actual entity information contained in the unstructured document as an optimization target.
10. The apparatus of claim 9, the determining module is specifically configured to: and inputting the unstructured document into a preset document identification model, so that the document identification model extracts each text information contained in the unstructured document from the unstructured document, and determines the text position information of each text information in the unstructured document.
11. The apparatus of claim 9, wherein the entity recognition model comprises a splicing layer and a recognition layer;
The prediction module is specifically configured to: inputting the text information and the text position information into a splicing layer in an entity recognition model to be trained, splicing the text characteristics corresponding to each text information and the position characteristics of the text position information of each text information in the unstructured document to obtain spliced characteristics, inputting the spliced characteristics into the recognition layer, enabling the recognition layer to determine text information associated with the text information from other text information according to the text position information of the text information in the unstructured document and the text position information of other text information in the unstructured document based on the spliced characteristics, taking the text information as reference text information, and determining entity information corresponding to the text information according to the reference text information as a prediction entity corresponding to the text information.
12. The apparatus of claim 11, the prediction module further to: inputting the text information and the text position information into a splicing layer in an entity recognition model to be trained, so as to splice text features corresponding to the text information with the position features of the text information in the unstructured document aiming at each text information to obtain sub-splicing features corresponding to the text information;
and splicing the sub-splicing features corresponding to each text message to obtain the spliced features.
13. The apparatus of claim 9, different types of unstructured documents corresponding to different entity recognition models;
The apparatus further comprises: a classification module;
the classification module is specifically configured to: inputting the unstructured document into a preset document classification model so that the document classification model determines the document type of the unstructured document;
The prediction module is further configured to: and inputting the text information and the text position information into an entity recognition model corresponding to the document type.
14. A computer readable storage medium storing a computer program which, when executed by a processor, implements the method of any of the preceding claims 1-8.
15. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of any of the preceding claims 1-8 when the program is executed.
CN202410138854.XA 2024-01-31 2024-01-31 Model training method, business wind control method, device and storage medium Pending CN117933424A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410138854.XA CN117933424A (en) 2024-01-31 2024-01-31 Model training method, business wind control method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410138854.XA CN117933424A (en) 2024-01-31 2024-01-31 Model training method, business wind control method, device and storage medium

Publications (1)

Publication Number Publication Date
CN117933424A true CN117933424A (en) 2024-04-26

Family

ID=90764681

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410138854.XA Pending CN117933424A (en) 2024-01-31 2024-01-31 Model training method, business wind control method, device and storage medium

Country Status (1)

Country Link
CN (1) CN117933424A (en)

Similar Documents

Publication Publication Date Title
CN113886584A (en) Information detection method, device and equipment for application program
CN113221555B (en) Keyword recognition method, device and equipment based on multitasking model
CN112417093B (en) Model training method and device
CN115238826B (en) Model training method and device, storage medium and electronic equipment
CN112015869A (en) Risk detection method, device and equipment for text to be issued
CN113887206B (en) Model training and keyword extraction method and device
CN116186330B (en) Video deduplication method and device based on multi-mode learning
CN110008252B (en) Data checking method and device
CN116188895A (en) Model training method and device, storage medium and electronic equipment
CN117933424A (en) Model training method, business wind control method, device and storage medium
CN111046658B (en) Method, device and equipment for recognizing disorder text
CN111539962A (en) Target image classification method, device and medium
CN117035695B (en) Information early warning method and device, readable storage medium and electronic equipment
CN110728150B (en) Named entity screening method, named entity screening device, named entity screening equipment and readable medium
CN115017915B (en) Model training and task execution method and device
CN116340852B (en) Model training and business wind control method and device
CN118035830A (en) Credential information identification model generation and credential information identification method, device and equipment
CN116739801A (en) Application monitoring method, device, electronic equipment and computer readable storage medium
CN115017905A (en) Model training and information recommendation method and device
CN115759070A (en) Intention identification method and device, storage medium and electronic equipment
CN117952229A (en) Model training method, business wind control method, device and storage medium
CN116091004A (en) Report information processing method and device, storage medium and electronic equipment
CN116861976A (en) Training method, device, equipment and storage medium of anomaly detection model
CN115511278A (en) Method, device and equipment for risk detection of merchant image
CN117313739A (en) Training method, device, equipment and storage medium of language model

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination