A risk detection method, apparatus, device, and computer-readable storage medium
By classifying text sequences and characters and combining them with similarity information, the problem of low versatility and accuracy in text information extraction is solved, thereby improving the accuracy and versatility of business risk detection.
Patent Information
- Application Number
- CN202110949754.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-18
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2041-08-18
AI Technical Summary
Existing technologies suffer from low versatility and low accuracy in text information extraction, especially in business risk detection where it is difficult to accurately extract key information.
By classifying text sequences and classifying characters, similarity information is determined, thereby extracting key target information from the text sequences. Combining coarse-grained and fine-grained methods improves the accuracy and versatility of information extraction.
It significantly improves the accuracy and versatility of business risk detection, enabling more accurate extraction of key target information and enhancing the performance of business risk detection.
Smart Images

Figure CN114281984B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a risk detection method, apparatus, device, and computer-readable storage medium. Background Technology
[0002] Currently, two main technical solutions are used for information extraction from text: one is to extract key information that strongly matches preset rules from the text; the other is to extract key information from the text using text classification and sequence labeling techniques. The first solution suffers from low versatility, while the second solution suffers from low accuracy. Summary of the Invention
[0003] This application provides a risk detection method, apparatus, device, and computer-readable storage medium, which can at least improve the accuracy and versatility of business risk detection.
[0004] This application provides a risk detection method, the method comprising:
[0005] Obtain multiple text sequences corresponding to the target text information of the target business, wherein each text sequence includes multiple characters;
[0006] Each text sequence is classified to obtain a set of sequence labels corresponding to each text sequence;
[0007] The characters of each text sequence are classified to obtain character labels corresponding to the characters of each text sequence;
[0008] Determine the similarity information between each sequence label in the sequence label set corresponding to each text sequence and the character label corresponding to each character in the multiple characters of each text sequence;
[0009] Based on the similarity information, the target sequence label corresponding to each character among multiple characters in each text sequence is determined from the sequence label set;
[0010] Based on the target sequence label, extract key target information from each text sequence;
[0011] Based on the key information of the target, conduct business risk detection on the target business.
[0012] This application provides a risk detection device, the device comprising:
[0013] The acquisition module is used to acquire multiple text sequences corresponding to the target text information of the target business, wherein each text sequence includes multiple characters;
[0014] The text sequence classification module is used to classify each text sequence to obtain a set of sequence labels corresponding to each text sequence.
[0015] The character classification module is used to classify multiple characters in each text sequence to obtain character labels corresponding to the multiple characters in each text sequence;
[0016] The first determining module is used to determine the similarity information between each sequence label in the sequence label set corresponding to each text sequence and the character label corresponding to each character in the multiple characters of each text sequence;
[0017] The second determining module is used to determine the target sequence label corresponding to each character among multiple characters of each text sequence from the sequence label set based on the similarity information;
[0018] An extraction module is used to extract target key information from each text sequence based on the target sequence label;
[0019] The risk detection module is used to perform business risk detection on the target business based on the target key information.
[0020] In some optional embodiments, the extraction module described above includes:
[0021] The extraction unit is used to extract consecutive characters with the same target sequence label from each text sequence as the target key information.
[0022] In some optional embodiments, the text sequence classification module described above includes:
[0023] The sequence feature extraction unit is used to input each text sequence into the sequence feature extraction network to extract sequence features and obtain the sequence feature information corresponding to each text sequence.
[0024] A sequence classification unit is used to input the sequence feature information corresponding to each text sequence into a sequence classification network for sequence classification to obtain the label feature information corresponding to each text sequence; wherein, the label feature information represents the probability that the sequence label corresponding to each text sequence is any preset label in a preset label set;
[0025] The determining unit is configured to, when the probability that the sequence label corresponding to each text sequence is any preset label in the preset label set is greater than or equal to a preset threshold, use the preset label as the sequence label corresponding to each text sequence to obtain the sequence label set.
[0026] In some optional embodiments, the character classification module described above includes:
[0027] A determining unit is used to determine character feature information corresponding to multiple characters in each text sequence;
[0028] The character classification unit is used to input the character feature information corresponding to multiple characters of each text sequence into the character classification network for character classification, and obtain the character labels corresponding to the multiple characters.
[0029] In some optional embodiments, the determining unit includes:
[0030] The morphological feature extraction subunit is used to input the multiple characters into the morphological feature extraction network for morphological feature extraction to obtain the morphological feature information corresponding to the multiple characters;
[0031] The semantic feature extraction subunit is used to input the multiple characters into the semantic feature extraction network to extract semantic features and obtain the semantic feature information corresponding to the multiple characters.
[0032] The context feature extraction subunit is used to input the multiple characters into the context feature extraction network to extract context features and obtain context feature information corresponding to the multiple characters.
[0033] A subunit is defined for using the morphological feature information, the semantic feature information, and the contextual feature information as the character feature information.
[0034] In some optional embodiments, the above-described apparatus further includes:
[0035] The feature construction module is used to construct features for each text sequence to obtain a new sequence corresponding to each text sequence;
[0036] The sequence feature extraction unit is further configured to input each text sequence and the corresponding newly added sequence into the sequence feature extraction network for sequence feature extraction, thereby obtaining the sequence feature information corresponding to each text sequence.
[0037] In some optional embodiments, the acquisition module described above includes:
[0038] The acquisition unit is used to acquire the target text information of the target service;
[0039] The parsing unit is used to parse the target text information to obtain character text;
[0040] A semantic segmentation unit is used to perform semantic segmentation on the character text to obtain multiple original sequences;
[0041] A sequence filtering unit is used to perform sequence filtering on the plurality of original sequences to obtain the plurality of text sequences.
[0042] This application also provides a risk detection device, which includes a processor and a memory. The memory stores at least one instruction or at least one program, which is loaded and executed by the processor to implement the risk detection method described above.
[0043] This application also provides a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the risk detection method described above.
[0044] The risk detection method, apparatus, equipment, and computer-readable storage medium provided in this application have the following technical advantages:
[0045] This application classifies each text sequence from multiple text sequences to obtain a text sequence label set corresponding to each text sequence. This label set allows for a coarse-grained, accurate, and comprehensive representation of the target key information within each text sequence. Furthermore, by classifying each character within a text sequence, character labels are obtained, allowing for a fine-grained, accurate, and comprehensive representation of the target key information within each text sequence. By determining similarity information, target sequence labels are identified from the text sequence label set corresponding to each character in each text sequence. This combines coarse-grained and fine-grained approaches to accurately and comprehensively represent the target key information within each text sequence. Extracting target key information from each text sequence based on target sequence labels improves the accuracy and comprehensiveness of the target key information. Finally, using this target key information for business risk detection significantly improves the accuracy and comprehensiveness of business risk detection, thereby enhancing its performance.
[0046] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0047] To more clearly illustrate the technical solutions and advantages in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0048] Figure 1 This is a schematic diagram of an optional structure of a distributed system applied to a blockchain system, as provided in an embodiment of this application.
[0049] Figure 2 This is a schematic diagram of a risk detection system provided in an embodiment of this application;
[0050] Figure 3 This is a flowchart illustrating a risk detection method provided in an embodiment of this application;
[0051] Figure 4 This is a flowchart illustrating a text sequence classification process provided in an embodiment of this application;
[0052] Figure 5 This is a flowchart illustrating the process of determining character feature information corresponding to multiple characters in each text sequence, as provided in an embodiment of this application.
[0053] Figure 6 This is a schematic diagram of a model training scenario provided in an embodiment of this application;
[0054] Figure 7 This is a schematic diagram of a target key information extraction scenario provided in an embodiment of this application;
[0055] Figure 8 This is a schematic diagram of a smart contract application provided in an embodiment of this application;
[0056] Figure 9 This is a flowchart illustrating a contract review process provided in an embodiment of this application;
[0057] Figure 10 This is a schematic diagram of the structure of a risk detection device provided in an embodiment of this application;
[0058] Figure 11 This is a hardware structure block diagram of a risk detection server provided in an embodiment of this application for a risk detection method. Detailed Implementation
[0059] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0060] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0061] The risk detection system provided in this application can be a distributed system. Taking a blockchain system as an example, see [link to relevant documentation]. Figure 1 , Figure 1 This is an optional structural diagram of the distributed system 100 provided in this application embodiment applied to a blockchain system. It consists of multiple nodes (any form of computing device in the network, such as servers or user terminals) and clients, forming a peer-to-peer (P2P) network. The P2P protocol is an application layer protocol running on top of the Transmission Control Protocol (TCP). In the distributed system, any machine, such as a server or terminal, can join and become a node. A node includes a hardware layer, a middleware layer, an operating system layer, and an application layer.
[0062] See Figure 1 The functions of each node in the blockchain system shown include:
[0063] 1) Routing: A basic function of nodes used to support communication between nodes.
[0064] In addition to routing capabilities, nodes can also have the following functions:
[0065] 2) Applications are deployed in the blockchain to implement specific business needs. They record data related to the implementation of functions to form record data, carry digital signatures in the record data to indicate the source of the task data, and send the record data to other nodes in the blockchain system. When other nodes successfully verify the source and integrity of the record data, they add the record data to a temporary block.
[0066] For example, the business logic implemented by the application includes:
[0067] 2.1) A wallet is used to provide the function of trading virtual resources, including initiating transactions (i.e., sending the transaction record of the current transaction to other nodes in the blockchain system. After the other nodes successfully verify the transaction, they store the transaction record data in the temporary block of the blockchain as a response to acknowledge the validity of the transaction; of course, the wallet also supports querying the remaining virtual resources in the virtual resource address.
[0068] 2.2) Shared ledger, used to provide functions such as storage, query and modification of ledger data. It sends the record data of the operation on the ledger data to other nodes in the blockchain system. After the other nodes verify the validity, as a response to acknowledge the validity of the ledger data, they store the record data in a temporary block. They can also send confirmation to the node that initiated the operation.
[0069] 2.3) Smart contracts are computerized protocols that can execute the terms of a contract. They are implemented through code deployed on a shared ledger that executes when certain conditions are met. Based on actual business needs, the code is used to complete automated transactions, such as querying the logistics status of goods purchased by a buyer and transferring the buyer's virtual resources to the merchant's address after the buyer signs for the goods. Of course, smart contracts are not limited to executing contracts for transactions; they can also execute contracts for processing received information.
[0070] 3) A blockchain consists of a series of blocks that are sequentially generated. Once a new block is added to the blockchain, it will not be removed. The blocks contain the data submitted by the nodes in the blockchain system.
[0071] Please see Figure 2 , Figure 2 This is a schematic diagram of a risk detection system provided in an embodiment of this application, such as... Figure 2 As shown, the system may include a server 01 and a terminal 02. In this embodiment, the server 01 can receive target text information of a target business uploaded by the terminal 02, extract key target information from the target text information, perform business risk detection on the target business based on the key target information, and send the business risk detection results to the terminal 02. Optionally, the server 01 may include physical devices such as smartphones, desktop computers, tablets, laptops, smart speakers, digital assistants, augmented reality (AR) / virtual reality (VR) devices, and smart wearable devices. It may also include software running on the aforementioned physical devices, such as applications and websites.
[0072] In this embodiment, terminal 02 can be used to upload target text information of the target business to server 01 and receive business risk detection results sent by server 01. Optionally, terminal 02 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0073] The aforementioned server 01 and terminal 02 can be connected directly or indirectly via wired or wireless communication. This application does not impose any limitations on this connection. Furthermore, it should be noted that the aforementioned... Figure 2 The corresponding system architecture is merely one example of a risk detection system architecture provided in this specification. In practical applications, other system architectures may also be included.
[0074] This application also relates to natural language processing and machine learning technologies in the field of artificial intelligence.
[0075] Natural Language Processing (NLP) is an important field within computer science and artificial intelligence. It studies the theories and methods for enabling effective communication between humans and computers using natural language. NLP is a science that integrates linguistics, computer science, and mathematics. Therefore, research in this field involves natural language—the language people use in daily life—and thus it has a close relationship with linguistic research. NLP techniques typically include text processing, semantic understanding, machine translation, question answering, and knowledge graphs.
[0076] Machine learning (ML) is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and instructional learning.
[0077] The risk detection method of this application is described below. This specification provides the method operation steps as shown in the embodiments or flowcharts, but based on conventional or non-inventive labor, more or fewer operation steps may be included. The order of steps listed in the embodiments is merely one of many possible execution orders and does not represent the only execution order. In actual system or server products, the methods shown in the embodiments or drawings can be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment).
[0078] In a specific embodiment, Figure 3 As shown, this application provides a flowchart of a risk detection method. (Refer to...) Figure 3 The risk detection method includes:
[0079] S301: Obtain multiple text sequences corresponding to the target text information of the target business, wherein each text sequence includes multiple characters.
[0080] In this embodiment, the target business can be any business requiring business risk detection, and the target text information can be text information related to the business interests of the target business. Specifically, the target business can be various contractual businesses, including but not limited to labor contracts, lease contracts, and transaction contracts. Correspondingly, the target text information can be contract texts for various contractual businesses, including but not limited to labor contract texts, lease contract texts, and transaction contract texts.
[0081] In this embodiment of the application, the information format of the target text information may include, but is not limited to, PDF, Word, and image formats.
[0082] In this embodiment, multiple text sequences can be obtained based on preprocessing operations on the target text information. It is understood that each text sequence may include multiple characters. The preprocessing operations include parsing, semantic segmentation, and sequence filtering.
[0083] S303: Perform text sequence classification on each text sequence to obtain a set of sequence labels corresponding to each text sequence.
[0084] In this embodiment of the application, each text sequence is classified to obtain multiple secondary labels corresponding to each text sequence, as well as the primary label to which each secondary label belongs.
[0085] To facilitate the representation of the relationship between each secondary tag and its subordinate primary tag, embodiments of this application can establish a correspondence between each secondary tag and its subordinate primary tag among the multiple secondary tags corresponding to each text sequence, thereby obtaining multiple sequence tags.
[0086] Taking the target text information as a transaction contract text as an example, multiple text sequences include text sequence A. If text sequence A is classified into multiple secondary tags, such as "product name", "unit price" and "model specification", and these secondary tags belong to the primary tag "subject information", then the multiple sequence tags in the sequence tag set corresponding to text sequence A can be represented as "subject information - product name", "subject information - unit price" and "subject information - model specification".
[0087] In this embodiment of the application, by classifying each text sequence, a sequence label set corresponding to each text sequence can be obtained that is both versatile and accurate.
[0088] S305: Perform character classification on multiple characters of each text sequence to obtain character labels corresponding to multiple characters of each text sequence.
[0089] In this embodiment of the application, character classification is performed on multiple characters of each text sequence to obtain secondary labels corresponding to multiple characters of each text sequence. It can be understood that the secondary labels corresponding to multiple characters of each text sequence are the character labels corresponding to multiple characters of each text sequence.
[0090] In this embodiment of the application, by classifying multiple characters in each text sequence, character tags corresponding to multiple characters in each text sequence can be obtained with high versatility and high accuracy. Since the character tags corresponding to each character in each text sequence can reflect the target key information in each text sequence from a fine-grained perspective, this is also conducive to improving the versatility and accuracy of the target key information.
[0091] S307: Determine the similarity information between each sequence label in the sequence label set corresponding to each text sequence and the character label corresponding to each character in the plurality of characters of each text sequence.
[0092] In this embodiment of the application, similarity information can characterize the similarity between each sequence label in the sequence label set corresponding to each text sequence and the character label corresponding to each character among multiple characters in each text sequence.
[0093] As can be seen from the above scheme, each sequence label includes each secondary label corresponding to each text sequence and its subordinate primary label, and each character label is the secondary label corresponding to each character.
[0094] In an optional embodiment, the number of identical consecutive characters in each sequence tag and each character tag can be used as the similarity between each sequence tag and each character tag. Taking the sequence tag "Transaction Party Information - Party A" and the character tags "Party A" and "Party B" as an example, if the sequence tag "Transaction Party Information" and the character tag "Party A" have 2 identical consecutive characters, then the similarity between "Transaction Party Information - Party A" and the character tag "Party A" is 2. If the sequence tag "Transaction Party Information" and the character tag "Party B" have 0 identical consecutive characters, then the similarity between "Transaction Party Information - Party A" and the character tag "Party B" is 0.
[0095] In an optional embodiment, each sequence label and each character label can be represented in the form of concatenated vectors. The similarity between each sequence label and each character label can be obtained by calculating the Euclidean distance, pre-distance, or Manhattan distance between the concatenated vectors of each sequence label and each character label.
[0096] S309: Based on the similarity information, determine the target sequence label corresponding to each character among the multiple characters of each text sequence from the sequence label set.
[0097] In this embodiment of the application, the target sequence label can be the sequence label with the highest similarity to the character label corresponding to each character among multiple characters in each text sequence in each sequence label set.
[0098] Taking the number of identical consecutive characters in each sequence label and each character label as the similarity between each sequence label and each character label, and taking the sequence label "Transaction Information - Party A", the sequence label "Target Information - Unit Price" and the character label "Party A" as an example, since the similarity between the sequence label "Transaction Information - Party A" and the character label "Party A" is 2, and the similarity between the sequence label "Target Information - Unit Price" and the character label "Party A" is 0, it can be determined that the target sequence label corresponding to the character label "Party A" is "Transaction Information - Party A".
[0099] S311: Extract target key information from each text sequence based on the target sequence label.
[0100] In this embodiment of the application, the target key information can be consecutive characters in each text sequence whose character labels are target sequence labels.
[0101] Accordingly, the extraction of target key information from each text sequence based on the target sequence label includes:
[0102] Extract consecutive characters with the same target sequence label from each text sequence as the target key information.
[0103] Since the sequence label set corresponding to each text sequence has high accuracy and high versatility, and the character label corresponding to each character among multiple characters in each text sequence has high accuracy and high versatility, the target sequence label corresponding to each character among multiple characters in each text sequence determined from the sequence label set based on similarity information has high accuracy and high versatility.
[0104] S313: Based on the target key information, perform business risk detection on the target business.
[0105] In this embodiment of the application, the target key information involves the business interests of the target business. By extracting highly versatile and accurate target key information from multiple text sequences corresponding to the target text information of the target business, the accuracy and versatility of business risk detection can be improved when business risk detection of the target business is performed based on the target key information.
[0106] In an optional embodiment, extracting key target information from each text sequence can also facilitate error correction of the target text information by the business personnel in charge of the target business.
[0107] In one specific embodiment, each text sequence can be input into a target sequence classification model for text sequence classification, resulting in a sequence label set corresponding to each text sequence. Specifically, the target sequence classification model includes a sequence feature extraction network and a sequence classification network.
[0108] In a specific embodiment, to illustrate how to classify each text sequence using a target sequence classification model, such as... Figure 4 The diagram shown is a flowchart illustrating a text sequence classification process provided in an embodiment of this application. (Refer to...) Figure 4 The above-mentioned text sequence classification for each text sequence yields a set of sequence labels corresponding to each text sequence, including:
[0109] S401: Input each text sequence into a sequence feature extraction network to extract sequence features and obtain the sequence feature information corresponding to each text sequence.
[0110] In one specific embodiment, the sequence feature extraction network can be implemented using a Bidirectional Encode Representation from Transformers (BERT) model derived from machine translation models. The sequence feature extraction network implemented using the BERT model can encode each text sequence to obtain a text sequence vector corresponding to each text sequence, and can also extract sequence features from the text sequence vectors corresponding to each text sequence to obtain the sequence feature information corresponding to each text sequence.
[0111] It is understandable that the sequence feature information corresponding to each text sequence can characterize the sequence features of each text sequence.
[0112] S403: Input the sequence feature information corresponding to each text sequence into a sequence classification network for sequence classification to obtain the label feature information corresponding to each text sequence; wherein, the label feature information represents the probability that the sequence label corresponding to each text sequence is any preset label in a preset label set.
[0113] In this embodiment, the preset tag set can be a set of pre-defined candidate tags. Specifically, any preset tag in the preset tag set includes any preset secondary tag and its subordinate primary tag, which can be represented as "primary tag - secondary tag".
[0114] In this embodiment, the sequence classification network can be implemented using a fully connected network. Specifically, a fully connected network can further abstract the sequence feature information corresponding to each text sequence, and can also classify each text sequence based on the further abstracted sequence feature information.
[0115] In this embodiment, the fully connected network includes an input layer, an intermediate layer, and an input layer. Specifically, the number of intermediate layers in the fully connected network can be determined based on actual application requirements. In general application scenarios, the number of intermediate layers can be set to two.
[0116] Specifically, the dimension of the input layer of a fully connected network is determined based on the dimension of the sequence feature information of each text sequence. The dimension of the output layer of a fully connected network is determined based on the preset number of labels in a preset label set. It can be understood that a fully connected network also has the function of adjusting the dimensions from the input layer to the output layer.
[0117] S405: If the probability that the sequence label corresponding to each text sequence is any preset label in the preset label set is greater than or equal to a preset threshold, the preset label is used as the sequence label corresponding to each text sequence to obtain the sequence label set.
[0118] In this embodiment, the preset threshold is a pre-set threshold that can be determined according to actual application needs. In general application scenarios, the preset threshold can be set to 0.5.
[0119] In this embodiment of the application, when the sequence label corresponding to each text sequence is any preset label in the preset label set that is greater than or equal to 0.5, any preset label is used as the sequence label corresponding to each text sequence to obtain the sequence label set.
[0120] Since the key target information in each text sequence has a crucial impact on the sequence label of each text sequence, meaning that the set of sequence labels corresponding to each text sequence is determined based on the key target information in each text sequence, obtaining the set of sequence labels corresponding to each text sequence in this embodiment is beneficial for subsequent extraction of the key target information in each text sequence.
[0121] In one specific embodiment, multiple characters from each text sequence can be input into a target character classification model for character classification, resulting in a character label corresponding to each character in each text sequence. Specifically, the text target sequence classification model includes a character feature extraction network and a character classification network.
[0122] In a specific embodiment, to illustrate how to classify multiple characters in each text sequence, the above-mentioned character classification of multiple characters in each text sequence to obtain character labels corresponding to multiple characters in each text sequence includes:
[0123] Determine the character feature information corresponding to multiple characters in each text sequence;
[0124] The character feature information corresponding to multiple characters in each text sequence is input into a character classification network for character classification to obtain character labels corresponding to the multiple characters.
[0125] In this embodiment of the application, the character feature information corresponding to multiple characters in each text sequence may include, but is not limited to, morphological feature information, semantic feature information, and contextual feature information corresponding to multiple characters in each text sequence.
[0126] The morphological features of multiple characters in each text sequence can characterize whether these characters are alphanumeric, numeric, or Chinese characters. The semantic features of multiple characters in each text sequence can characterize their part-of-speech (noun, adjective, verb, etc.). The contextual features of multiple characters in each text sequence can characterize the characters preceding and following them.
[0127] In this embodiment, the character classification network can be implemented using a Conditional Random Field (CRF) sequence labeling model. Specifically, the sequence labeling method used by the CRF sequence labeling model can be the BIO (B-begin, I-inside, O-outside) labeling method.
[0128] In an optional embodiment, if the output of the character classification network is a character label encoding corresponding to multiple characters, it is also necessary to decode the character label encoding corresponding to multiple characters to obtain the character labels corresponding to multiple characters.
[0129] In one specific embodiment, to illustrate how to determine the character feature information corresponding to multiple characters in each text sequence, such as... Figure 5 The diagram shown is a flowchart illustrating the process for determining character feature information corresponding to multiple characters in each text sequence, as provided in an embodiment of this application. (Refer to...) Figure 5 The character feature information corresponding to multiple characters in each text sequence mentioned above includes:
[0130] S501: Input the multiple characters into the morphological feature extraction network to extract morphological features and obtain the morphological feature information corresponding to the multiple characters.
[0131] In this embodiment, the character feature extraction network described above may include a morphological feature extraction network. It is understood that the morphological feature extraction network can be implemented using morphological feature extraction tools. Specifically, morphological feature extraction tools may include, but are not limited to, convolutional neural networks, recurrent neural networks, and machine translation models.
[0132] S503: Input the multiple characters into the semantic feature extraction network to extract semantic features and obtain the semantic feature information corresponding to the multiple characters.
[0133] In this embodiment, the character feature extraction network described above may include a semantic feature extraction network. It is understood that the semantic feature extraction network can be implemented using semantic feature extraction tools. Specifically, semantic feature extraction tools may include, but are not limited to, convolutional neural networks, recurrent neural networks, and machine translation models.
[0134] S505: Input the multiple characters into the context feature extraction network to extract context features and obtain the context feature information corresponding to the multiple characters.
[0135] In this embodiment, the character feature extraction network described above may include a context feature extraction network. It is understood that the context feature extraction network can be implemented using context feature extraction tools. Specifically, context feature extraction tools may include, but are not limited to, convolutional neural networks, recurrent neural networks, and machine translation models.
[0136] S507: The morphological feature information, the semantic feature information, and the context feature information are used as the character feature information.
[0137] In this embodiment of the application, by using morphological feature information, semantic feature information and contextual feature information as character feature information, the character features corresponding to multiple characters can be effectively represented.
[0138] In a specific embodiment, to improve the accuracy and versatility of the sequence feature information corresponding to each text sequence, and further improve the accuracy and versatility of the target key information, the above method further includes:
[0139] Feature construction is performed on each text sequence to obtain the new sequence corresponding to each text sequence;
[0140] Accordingly, the sequence feature extraction network that inputs each text sequence into the sequence feature extraction network to extract sequence features, and obtains the sequence feature information corresponding to each text sequence, includes:
[0141] Each text sequence and its corresponding newly added sequence are input into the sequence feature extraction network to extract sequence features, thereby obtaining the sequence feature information corresponding to each text sequence.
[0142] In this application embodiment, the feature construction method may include, but is not limited to, attribute segmentation, attribute combination, binning, partitioning, and cross features.
[0143] In this embodiment, each text sequence and the newly added sequence obtained by feature construction of each text sequence are input into the sequence feature extraction network for sequence feature extraction. The resulting sequence feature information corresponding to each text sequence can have higher breadth and accuracy.
[0144] In one specific embodiment, multiple text sequences can be obtained by preprocessing the target text information. Specifically, the preprocessing process includes parsing, semantic segmentation, and sequence filtering in sequence.
[0145] In a specific embodiment, to illustrate the process of acquiring multiple text sequences, the multiple text sequences corresponding to the target text information of the target service mentioned above include:
[0146] Obtain the target text information of the target service;
[0147] The target text information is parsed to obtain character text;
[0148] The character text is semantically segmented to obtain multiple original sequences;
[0149] Sequence filtering is performed on the multiple original sequences to obtain the multiple text sequences.
[0150] In this embodiment of the application, the target text information can be obtained by scanning the original text of the target business, or it can be the electronic text or image of the original text of the target business.
[0151] In this embodiment of the application, parsing the target text information specifically involves deformatting the target text information. Correspondingly, the character text can be the deformatted target text information.
[0152] In this embodiment of the application, the multiple original sequences may include character sequences, sentence sequences and / or paragraph sequences obtained by semantically segmenting character text.
[0153] In an optional embodiment, the plurality of original sequences may further include invalid sequences, which may specifically be sequences composed of invalid spaces and / or garbled characters.
[0154] In one specific embodiment, sequence filtering can be implemented using regular expressions. By performing sequence filtering on multiple original sequences, invalid sequences in multiple original sequences can be filtered out, resulting in multiple text sequences.
[0155] In one specific embodiment, to illustrate the training process of the target sequence classification model, the above method further includes:
[0156] Obtain multiple training texts corresponding to the training text information;
[0157] Multiple training texts are input into a preset sequence classification model to perform sequence classification, resulting in a set of predicted training sequence labels corresponding to the multiple training texts.
[0158] Obtain the target training sequence label set corresponding to multiple training texts;
[0159] Based on the predicted training sequence label set and the target training sequence label set, determine the first target loss of the preset sequence classification model;
[0160] If the first target loss does not meet the first preset condition, the first model parameters of the preset sequence classification model are adjusted according to the first target loss, and the first target loss is updated based on the preset sequence classification model after adjusting the first model parameters.
[0161] If the first target loss satisfies the first preset condition, the preset sequence classification model corresponding to the first target loss satisfying the first preset condition is used as the target sequence classification model.
[0162] In an optional embodiment, the first target loss may satisfy the first preset condition as follows: the first target loss is less than or equal to a first threshold. The first threshold can be determined based on actual application requirements.
[0163] In an optional embodiment, the first target loss may satisfy the first preset condition if the number of model iterations corresponding to the first target loss is greater than or equal to a second threshold. The second threshold can be determined based on actual application requirements.
[0164] In a specific embodiment, the first model parameters of the preset sequence classification model may include the network parameters of the sequence feature extraction network and the network parameters of the sequence classification network of the preset sequence classification model.
[0165] In one specific embodiment, to illustrate the training process of the target character classification model, the above method further includes:
[0166] Obtain multiple training texts corresponding to the training text information;
[0167] Obtain multiple training characters for each training text;
[0168] Multiple training characters of each training text are input into a preset character classification model for character classification, and the predicted training character label corresponding to each training character in the multiple training characters of each training text is obtained.
[0169] Obtain the target training character label corresponding to each training character among multiple training characters in each training text;
[0170] The second target loss of the preset character classification model is determined based on the predicted training character label and the target training character label corresponding to each training character in multiple training characters of each training text.
[0171] If the second objective loss does not meet the second preset condition, the second model parameters of the preset character classification model are adjusted according to the second objective loss, and the second objective loss is updated based on the preset character classification model after adjusting the second model parameters.
[0172] If the second target loss satisfies the second preset condition, the preset character classification model corresponding to the second target loss satisfying the second preset condition is used as the target character classification model.
[0173] In an optional embodiment, the second target loss may satisfy the second preset condition if the second target loss is less than or equal to a third threshold. The third threshold can be determined based on actual application requirements.
[0174] In an optional embodiment, the second objective loss may satisfy the second preset condition if the number of model iterations corresponding to the second objective loss is greater than or equal to a fourth threshold. The fourth threshold can be determined based on actual application requirements.
[0175] In one specific embodiment, the second model parameters of the preset character classification model may include the network parameters of the morphological feature extraction network, the semantic feature extraction network, and the context feature extraction network of the preset character classification model, as well as the network parameters of the character classification network.
[0176] In one specific embodiment, the multiple training texts corresponding to the above-mentioned acquisition of training text information include:
[0177] Obtain training text information for the target business;
[0178] The training text information is parsed, semantically segmented, and sequence filtered sequentially to obtain multiple training texts.
[0179] In this embodiment, by preprocessing the target text information of the target business, multiple text sequences are obtained. Each text sequence is then classified to obtain a corresponding text sequence tag set. This tag set allows for a coarse-grained, accurate, and comprehensive representation of the target key information within each text sequence. Furthermore, by classifying each character within a text sequence, character tags are obtained. These tags allow for a fine-grained, accurate, and comprehensive representation of the target key information within each text sequence. Using a maximum similarity matching method, target sequence tags are determined from the text sequence tag set of each text sequence. This combines coarse-grained and fine-grained approaches to accurately and comprehensively represent the target key information within each text sequence. Extracting target key information from each text sequence based on this information improves the accuracy and comprehensiveness of the target key information. Finally, using this target key information to predict business risks significantly improves the accuracy and comprehensiveness of business risk prediction, thereby enhancing its performance.
[0180] like Figure 6 The diagram shown is a schematic representation of a model training scenario provided in an embodiment of this application. Rectangular boxes represent information, and rounded rectangles represent processing. The specific training process can be referred to the training processes of the target sequence classification model and the target character classification model described above, and will not be elaborated upon here.
[0181] like Figure 7 The diagram shown is a schematic representation of a target key information extraction scenario provided by an embodiment of this application. Rectangular frames represent information, and rounded rectangles represent processing. The specific target key information extraction process can be referred to the foregoing embodiments and will not be repeated here.
[0182] like Figure 8 The diagram shown is a schematic representation of a smart contract application provided in an embodiment of this application. (Refer to...) Figure 8 The smart contract application may include a contract review module 801, a contract comparison module 802, and an advanced configuration module 803.
[0183] The contract review module 801 includes a standard contract review submodule 804 and a non-standard contract review submodule 805. The standard contract submodule 804 includes a templated information extraction unit 804a, a risk suggestion display unit 804b, and an information graph display unit 804c. The non-standard contract review submodule 805 includes a natural language processing (NLP) algorithm information extraction unit 805a, an information extraction result error correction unit 805b, a risk suggestion display unit 805c, and an information graph display unit 805d.
[0184] The contract comparison module 802 may include a first contract comparison unit 802a, a second contract comparison unit 802b, and a third contract comparison unit 802c. The first contract comparison unit 802a can be used to compare different contract texts, all in Word format; the second contract comparison unit 802b can be used to compare different contract texts, all in TXT format; and the third contract comparison unit 802c can be used to compare contracts in image or PDF scan format with contracts in editable electronic text format (Word, editable PDF).
[0185] The advanced configuration module 803 may include a standard contract template configuration unit 803a, a contract review rule configuration unit 803b, a tag configuration unit 803c, and a non-standard contract information extraction training unit 803d.
[0186] In an optional embodiment, when the contract is a standard contract, the standard contract review submodule 804 reviews the standard contract. Specifically, multiple standard contract templates can be pre-configured in the standard contract template configuration unit 803a. When extracting information from the standard contract, the templated information extraction unit 804a can obtain the corresponding standard contract template from the standard contract template configuration unit 803a, extract information from the standard contract according to the corresponding standard contract template, and send the information extraction results to the risk suggestion display unit 804b and the information graph display unit 804c. The risk suggestion display unit 804b performs risk detection on the standard contract based on the information extraction results and the preset contract review rules obtained from the contract review rule configuration unit 803b, and displays risk suggestions. The information graph display unit 804c displays the standard contract as an information graph based on the information extraction results.
[0187] In an optional embodiment, when the contract is a non-standard contract, the non-standard contract review submodule 805 is used to review the non-standard contract.
[0188] In an optional embodiment, when the non-standard contract is a general non-standard contract, the label configuration unit 803c includes multiple general character labels and multiple sequence labels. The non-standard contract information extraction training unit 803d can train a general NLP algorithm information extraction model based on the training samples of the general non-standard contract and the multiple general character labels and multiple sequence labels. It is understood that the general NLP algorithm information extraction model may include a preprocessing network, a sequence feature extraction network, a character feature extraction network, and a similarity matching network. The natural language algorithm extraction unit 805a can use the trained general NLP algorithm information extraction model to extract information from the general non-standard contract, obtain target key information, and send the target key information to the information extraction result correction unit 805b. The information extraction result correction unit 805b is user-oriented and can be used to manually correct the target key information, obtaining the corrected target key information. The information extraction result correction unit 805b sends the corrected target key information to the risk suggestion display unit 805c and the information graph display unit 805d. The risk suggestion display unit 805c performs risk detection on the standard contract based on the corrected key target information and displays risk suggestions. The infographic display unit 805d displays the standard contract as an infographic based on the corrected key target information.
[0189] In an optional embodiment, when the non-standard contract is a user-defined non-standard contract, the label configuration unit 803c includes multiple user-defined character labels and multiple sequence labels. The non-standard contract information extraction training unit 803d can train an adaptive NLP algorithm information extraction model based on the user-defined non-standard contract training samples and the general multiple character labels and multiple sequence labels. It is understood that the adaptive NLP algorithm information extraction model may include a preprocessing network, a sequence feature extraction network, a character feature extraction network, and a similarity matching network. The natural language algorithm extraction unit 805a can use the trained adaptive NLP algorithm information extraction model to extract information from the user-defined non-standard contract, obtain target key information, and send the target key information to the information extraction result correction unit 805b. The information extraction result correction unit 805b is user-facing and can be used to manually correct the target key information, obtaining the corrected target key information. The information extraction result correction unit 805b sends the corrected target key information to the risk suggestion display unit 805c and the information graph display unit 805d. The risk suggestion display unit 805c performs risk detection on the standard contract based on the corrected key target information and displays risk suggestions. The infographic display unit 805d displays the standard contract as an infographic based on the corrected key target information.
[0190] It is understood that the risk detection method provided in this application embodiment can be applied to the non-standard contract review submodule 805.
[0191] In an optional embodiment, the information extraction results output by the templated information extraction unit 804a and / or the target key information output by the information extraction result correction unit 805c are input into the contract comparison module 802, which can compare contracts with the same or different text formats.
[0192] like Figure 9 The diagram shown is a flowchart illustrating a contract review process according to an embodiment of this application. (Refer to...) Figure 9 The contract review process can be referenced. Figure 8 Detailed description of Contract Review Module 801.
[0193] like Figure 10 The diagram shown is a structural schematic of a risk detection device 1000 provided in an embodiment of this application. (Refer to...) Figure 10 The device includes:
[0194] The acquisition module 1001 is used to acquire multiple text sequences corresponding to the target text information of the target business, wherein each text sequence includes multiple characters;
[0195] The text sequence classification module 1003 is used to classify each text sequence to obtain a set of sequence labels corresponding to each text sequence.
[0196] The character classification module 1005 is used to classify multiple characters in each text sequence to obtain character labels corresponding to the multiple characters in each text sequence;
[0197] The first determining module 1007 is used to determine the similarity information between each sequence label in the sequence label set corresponding to each text sequence and the character label corresponding to each character in the multiple characters of each text sequence;
[0198] The second determining module 1009 is used to determine the target sequence label corresponding to each character among multiple characters of each text sequence from the sequence label set based on the similarity information.
[0199] Extraction module 1011 is used to extract target key information from each text sequence based on the target sequence label;
[0200] The risk detection module 1013 is used to perform business risk detection on the target business based on the target key information.
[0201] In some optional embodiments, the extraction module 1011 includes:
[0202] The extraction unit is used to extract consecutive characters with the same target sequence label from each text sequence as the target key information.
[0203] In some optional embodiments, the text sequence classification module 1003 described above includes:
[0204] The sequence feature extraction unit is used to input each text sequence into the sequence feature extraction network to extract sequence features and obtain the sequence feature information corresponding to each text sequence.
[0205] A sequence classification unit is used to input the sequence feature information corresponding to each text sequence into a sequence classification network for sequence classification to obtain the label feature information corresponding to each text sequence; wherein, the label feature information represents the probability that the sequence label corresponding to each text sequence is any preset label in a preset label set;
[0206] The determining unit is configured to, when the probability that the sequence label corresponding to each text sequence is any preset label in the preset label set is greater than or equal to a preset threshold, use the preset label as the sequence label corresponding to each text sequence to obtain the sequence label set.
[0207] In some optional embodiments, the character classification module 1005 described above includes:
[0208] A determining unit is used to determine character feature information corresponding to multiple characters in each text sequence;
[0209] The character classification unit is used to input the character feature information corresponding to multiple characters of each text sequence into the character classification network for character classification, and obtain the character labels corresponding to the multiple characters.
[0210] In some optional embodiments, the determining unit includes:
[0211] The morphological feature extraction subunit is used to input the multiple characters into the morphological feature extraction network for morphological feature extraction to obtain the morphological feature information corresponding to the multiple characters;
[0212] The semantic feature extraction subunit is used to input the multiple characters into the semantic feature extraction network to extract semantic features and obtain the semantic feature information corresponding to the multiple characters.
[0213] The context feature extraction subunit is used to input the multiple characters into the context feature extraction network to extract context features and obtain context feature information corresponding to the multiple characters.
[0214] A subunit is defined for using the morphological feature information, the semantic feature information, and the contextual feature information as the character feature information.
[0215] In some optional embodiments, the above-described apparatus further includes:
[0216] The feature construction module is used to construct features for each text sequence to obtain a new sequence corresponding to each text sequence;
[0217] The sequence feature extraction unit is further configured to input each text sequence and the corresponding newly added sequence into the sequence feature extraction network for sequence feature extraction, thereby obtaining the sequence feature information corresponding to each text sequence.
[0218] In some optional embodiments, the acquisition module 1001 described above includes:
[0219] The acquisition unit is used to acquire the target text information of the target service;
[0220] The parsing unit is used to parse the target text information to obtain character text;
[0221] A semantic segmentation unit is used to perform semantic segmentation on the character text to obtain multiple original sequences;
[0222] A sequence filtering unit is used to perform sequence filtering on the plurality of original sequences to obtain the plurality of text sequences.
[0223] The apparatus and method embodiments described herein are based on the same inventive concept.
[0224] This application also provides a risk detection device, the device including a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the risk detection method embodiment as described above.
[0225] The devices and methods described in the device embodiments are based on the same inventive concept.
[0226] This application also provides a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the risk detection method embodiment described above.
[0227] The storage media and method embodiments described in the computer-readable storage medium embodiments are based on the same inventive concept.
[0228] This application also provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations described above.
[0229] This application provides a risk detection server, which includes a processor and a memory. The memory stores at least one instruction, at least one program, code set, or instruction set. The at least one instruction, at least one program, code set, or instruction set is loaded and executed by the processor to implement the risk detection method applied to a target server as provided in the above method embodiments.
[0230] The memory can be used to store software programs and modules. The processor executes various functional applications and risk detection by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area. The program storage area can store the operating system, application programs required for the functions, etc.; the data storage area can store data created according to the use of the device, etc. In addition, the memory can include high-speed random access memory, and can also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory can also include a memory controller to provide the processor with access to the memory.
[0231] The methods and embodiments provided in this application can be executed on mobile terminals, computer terminals, servers, or similar computing devices. Taking running on a server as an example, Figure 11 This is a hardware structure block diagram of a risk detection server provided in an embodiment of this application for a risk detection method. For example... Figure 11 As shown, the risk detection server 1100 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 1110 (CPUs 1110 may include, but are not limited to, microprocessors such as MCUs or programmable logic devices such as FPGAs), a memory 1130 for storing data, and one or more storage media 1120 (e.g., one or more mass storage devices) for storing application programs 1123 or data 1122. The memory 1130 and storage media 1120 may be temporary or persistent storage. The program stored in the storage media 1120 may include one or more modules, each module may include a series of instruction operations on the server. Furthermore, the CPU 1110 may be configured to communicate with the storage media 1120 and execute the series of instruction operations in the storage media 1120 on the server 1100. Server 1100 may also include one or more power supplies 1160, one or more wired or wireless network interfaces 1150, one or more input / output interfaces 1140, and / or one or more operating systems 1121, such as Windows Server. TM Mac OS x TM Unix TM Linux TM FreeBSD TM etc.
[0232] The input / output interface 1140 can be used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of server 1100. In one example, the input / output interface 1140 includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the input / output interface 1140 may be a radio frequency (RF) module for wireless communication with the Internet.
[0233] Those skilled in the art will understand that Figure 11 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, server 1100 may also include... Figure 11 The more or fewer components shown, or having the same Figure 11 The different configurations shown.
[0234] The embodiments of this application also provide a storage medium, which can be disposed in a risk detection server to store at least one instruction, at least one program, code set or instruction set related to the risk detection method in the method embodiments. The at least one instruction, the at least one program, the code set or instruction set is loaded and executed by the processor to implement the risk detection method provided in the above method embodiments.
[0235] Optionally, in this embodiment, the storage medium may be located at at least one of the multiple network servers in a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0236] The embodiments of this application also provide a storage medium, which can be disposed in a risk detection server to store at least one instruction, at least one program, code set or instruction set related to the risk detection method in the method embodiments. The at least one instruction, the at least one program, the code set or instruction set is loaded and executed by the processor to implement the risk detection method provided in the above method embodiments.
[0237] Optionally, in this embodiment, the storage medium may be located at at least one of the multiple network servers in a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0238] As can be seen from the embodiments of the risk detection method, apparatus, device, and computer-readable storage medium provided in this application, this application classifies each text sequence in a plurality of text sequences to obtain a text sequence tag set corresponding to each text sequence. This text sequence tag set can accurately and broadly represent the target key information in each text sequence from a coarse-grained perspective. By classifying each character in a plurality of characters in each text sequence to obtain a character tag corresponding to each character in a plurality of characters ... By using key target information to predict business risks for target businesses, the accuracy and scope of business risk prediction can be significantly improved, thereby enhancing the performance of business risk prediction.
[0239] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, specific embodiments have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a different order than that shown in the embodiments and still achieve the desired result. Additionally, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0240] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the apparatus embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0241] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0242] The above description is only a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A risk detection method, characterized in that, The method includes: Obtain multiple text sequences corresponding to the target text information of the target business, wherein each text sequence includes multiple characters; Each text sequence is classified to obtain a set of sequence labels corresponding to each text sequence; The characters of each text sequence are classified to obtain character labels corresponding to the characters of each text sequence; Determine the similarity information between each sequence label in the sequence label set corresponding to each text sequence and the character label corresponding to each character in the multiple characters of each text sequence; Based on the similarity information, the target sequence label corresponding to each character among multiple characters in each text sequence is determined from the sequence label set; Based on the target sequence label, extract key target information from each text sequence; Based on the key information of the target, conduct business risk detection on the target business.
2. The method according to claim 1, characterized in that, The step of extracting target key information from each text sequence based on the target sequence label includes: Extract consecutive characters with the same target sequence label from each text sequence as the target key information.
3. The method according to claim 1, characterized in that, The step of classifying each text sequence to obtain the sequence label set corresponding to each text sequence includes: Each text sequence is input into a sequence feature extraction network to extract sequence features, thereby obtaining the sequence feature information corresponding to each text sequence. The sequence feature information corresponding to each text sequence is input into a sequence classification network for sequence classification to obtain the label feature information corresponding to each text sequence; wherein, the label feature information represents the probability that the sequence label corresponding to each text sequence is any preset label in a preset label set; If the probability that the sequence label corresponding to each text sequence is any preset label in the preset label set is greater than or equal to a preset threshold, then the preset label is used as the sequence label corresponding to each text sequence to obtain the sequence label set.
4. The method according to claim 1, characterized in that, The step of classifying multiple characters in each text sequence to obtain character labels corresponding to multiple characters in each text sequence includes: Determine the character feature information corresponding to multiple characters in each text sequence; The character feature information corresponding to multiple characters in each text sequence is input into a character classification network for character classification to obtain character labels corresponding to the multiple characters.
5. The method according to claim 4, characterized in that, The step of determining the character feature information corresponding to multiple characters in each text sequence includes: The multiple characters are input into a morphological feature extraction network for morphological feature extraction to obtain the morphological feature information corresponding to the multiple characters; The multiple characters are input into a semantic feature extraction network for semantic feature extraction to obtain semantic feature information corresponding to the multiple characters; The multiple characters are input into a context feature extraction network to extract context features, thereby obtaining context feature information corresponding to the multiple characters; The morphological feature information, the semantic feature information, and the contextual feature information are used as the character feature information.
6. The method according to claim 3, characterized in that, The method further includes: Feature construction is performed on each text sequence to obtain the new sequence corresponding to each text sequence; The step of inputting each text sequence into a sequence feature extraction network for sequence feature extraction to obtain the sequence feature information corresponding to each text sequence includes: Each text sequence and its corresponding newly added sequence are input into the sequence feature extraction network to extract sequence features, thereby obtaining the sequence feature information corresponding to each text sequence.
7. The method according to any one of claims 1 to 6, characterized in that, The multiple text sequences corresponding to the target text information of the target business include: Obtain the target text information of the target service; The target text information is parsed to obtain character text; The character text is semantically segmented to obtain multiple original sequences; Sequence filtering is performed on the multiple original sequences to obtain the multiple text sequences.
8. A risk detection device, characterized in that, The device includes: The acquisition module is used to acquire multiple text sequences corresponding to the target text information of the target business, wherein each text sequence includes multiple characters; The text sequence classification module is used to classify each text sequence to obtain a set of sequence labels corresponding to each text sequence. The character classification module is used to classify multiple characters in each text sequence to obtain character labels corresponding to the multiple characters in each text sequence; The first determining module is used to determine the similarity information between each sequence label in the sequence label set corresponding to each text sequence and the character label corresponding to each character in the multiple characters of each text sequence; The second determining module is used to determine the target sequence label corresponding to each character among multiple characters of each text sequence from the sequence label set based on the similarity information; An extraction module is used to extract target key information from each text sequence based on the target sequence label; The risk detection module is used to perform business risk detection on the target business based on the target key information.
9. A risk detection device, characterized in that, The device includes a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the risk detection method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or instruction set is loaded and executed by a processor to implement the risk detection method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Text recognition method and device, electronic equipment and medium
CN111737455A
Data analysis processing method and device based on open source information
CN111897947A