Contract text desensitization method, computer equipment, readable storage medium and program product

By identifying sensitive content in the contract text and replacing it, the problem of sensitive information leakage in the contract text in the large-scale model review is solved, and the effective desensitization and recovery of the contract text is achieved to ensure the integrity and compliance of the contract.

CN119961949APending Publication Date: 2025-05-09KINGDEE SOFTWARE(CHINA) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411969077.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-05-09

AI Technical Summary

Technical Problem

During the contract drafting stage, when directly inputting the contract text into the big model for review, there is a problem of leakage of sensitive content (such as Party A and B’s name, address, project information, etc.), which makes it an urgent problem to be solved.

Method used

Provide a method for desensitizing contract text, by obtaining contract text and determining its type, selecting an appropriate desensitization algorithm based on the contract type, identifying and replacing sensitive content, generating desensitizing contract text, and resuming the desensitizing text when necessary to ensure the integrity of the contract.

Benefits of technology

It effectively protects sensitive information in the contract to prevent its disclosure, while ensuring that the contract text remains ineffective and compliant after desensitization and recovery processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119961949A_ABST
    Figure CN119961949A_ABST
Patent Text Reader

Abstract

The invention relates to a contract text desensitization method, computer equipment, a readable storage medium and a program product. The method comprises the following steps: acquiring a contract text, and determining a contract type of the contract text; determining a target desensitization algorithm according to the contract type, and determining sensitive content in the contract text based on the target desensitization algorithm; replacing the sensitive content to obtain a desensitized contract text; and after the desensitized contract text is processed, carrying out recovery processing on the desensitized contract text. By adopting the method, contract text desensitization can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a contract text desensitization method, computer equipment, readable storage medium and program product. Background Art

[0002] During the contract drafting stage, when users want to use the big model to review whether the drafted contract is valid and compliant, if the contract text is directly input into the big model, there will be problems with the leakage of sensitive content (such as the names, addresses, project information, etc. of Party A and Party B). Therefore, how to desensitize the contract text has become an issue that needs to be urgently addressed. Summary of the invention

[0003] Based on this, it is necessary to provide a contract text desensitization method, computer equipment, readable storage medium and program product that can realize contract text desensitization in response to the above technical problems.

[0004] In a first aspect, the present application provides a method for desensitizing a contract text, the method comprising: obtaining a contract text and determining the contract type of the contract text; determining a target desensitization algorithm according to the contract type, and determining sensitive content in the contract text based on the target desensitization algorithm; replacing the sensitive content to obtain a desensitized contract text; after processing the desensitized contract text, restoring the desensitized contract text.

[0005] In one of the embodiments, a target desensitization algorithm is determined according to the contract type, and sensitive content in the contract text is determined based on the target desensitization algorithm, including: when the contract type is a template contract type, obtaining a target bookmark identifier corresponding to the contract text, the target bookmark identifier corresponding to the sensitive content position; jumping to the sensitive content position of the contract text according to the target bookmark identifier, and treating the content at the sensitive content position as sensitive content.

[0006] In one of the embodiments, obtaining a target bookmark identifier corresponding to the contract text includes: screening multiple bookmark identifiers corresponding to the contract text according to desensitizing element identifiers in the desensitizing list to obtain a target bookmark identifier corresponding to the contract text.

[0007] In one of the embodiments, a target desensitizing algorithm is determined according to the contract type, and the sensitive content in the contract text is determined based on the target desensitizing algorithm, including: when the contract type is a non-template contract type, a desensitizing algorithm selection interface is displayed, and the desensitizing algorithm selection interface includes a plurality of different desensitizing algorithm controls; if a triggering operation of one of the desensitizing algorithm controls is detected, the desensitizing algorithm corresponding to the triggered desensitizing algorithm control is used as the target desensitizing algorithm, and the sensitive content in the contract text is determined based on the target desensitizing algorithm.

[0008] In one of the embodiments, a target desensitization algorithm is determined according to the contract type, and sensitive content in the contract text is determined based on the target desensitization algorithm, including: when the contract type is a non-template contract type, the contract text is identified by a pre-trained sensitive information identification model to obtain at least one initial content to be desensitized and an initial desensitizing element identifier corresponding to each initial content to be desensitized; and the initial desensitizing element identifier corresponding to at least one initial content to be desensitized is screened according to the desensitizing element identifier in the desensitization list to obtain the sensitive content in the contract text.

[0009] In one of the embodiments, a target desensitization algorithm is determined according to the contract type, and sensitive content in the contract text is determined based on the target desensitization algorithm, including: when the contract type is a non-template contract type, obtaining at least one form field value of the contract text; segmenting the contract text to obtain multiple first text blocks, and filtering at least one second text block from the multiple first text blocks according to at least one form field value; and identifying sensitive content in the contract text from the at least one second text block.

[0010] In one of the embodiments, sensitive content is replaced to obtain a desensitized contract text, including: determining the sensitive element identifier corresponding to the sensitive content; searching a desensitized list based on the sensitive element identifier corresponding to the sensitive content; wherein the desensitized list includes a mapping relationship between the desensitized element identifier and the replacement content; and replacing the sensitive content based on the search result to obtain a desensitized contract text.

[0011] In one of the embodiments, the method further includes: displaying a desensitizing element selection interface, the desensitizing element selection interface including a plurality of different desensitizing element controls; and generating a desensitizing list according to the desensitizing elements corresponding to each desensitizing element control that is triggered.

[0012] In one of the embodiments, after the desensitized contract text is processed, the desensitized contract text is restored, including: after the desensitized contract text is reviewed through a large model, the desensitized contract text is restored.

[0013] On the second aspect, the present application also provides a contract text desensitizing device, including: a first determination module, used to obtain a contract text and determine the contract type of the contract text; a second determination module, used to determine a target desensitizing algorithm according to the contract type, and determine the sensitive content in the contract text based on the target desensitizing algorithm; a replacement module, used to replace the sensitive content to obtain a desensitized contract text; and a recovery module, used to restore the desensitized contract text after processing the desensitized contract text.

[0014] In one of the embodiments, the second determination module includes an acquisition unit and a first determination unit. The acquisition unit is used to acquire a target bookmark identifier corresponding to the contract text when the contract type is a template contract type, and the target bookmark identifier corresponds to the sensitive content position; the first determination unit is used to jump to the sensitive content position of the contract text according to the target bookmark identifier, and use the content at the sensitive content position as sensitive content.

[0015] In one of the embodiments, the acquisition unit is specifically used to filter multiple bookmark identifiers corresponding to the contract text according to the desensitizing element identifiers in the desensitizing list to obtain a target bookmark identifier corresponding to the contract text.

[0016] In one of the embodiments, the second determination module includes a display unit and a second determination unit, the display unit being used to display a desensitizing algorithm selection interface when the contract type is a non-template contract type, the desensitizing algorithm selection interface including a plurality of different desensitizing algorithm controls; the second determination unit being used to detect a triggering operation of one of the desensitizing algorithm controls, and then using the desensitizing algorithm corresponding to the triggered desensitizing algorithm control as a target desensitizing algorithm, and determining the sensitive content in the contract text based on the target desensitizing algorithm.

[0017] In one of the embodiments, the second determination module includes a third determination unit, which is used to identify the contract text through a pre-trained sensitive information identification model when the contract type is a non-template contract type, and obtain at least one initial content to be desensitized and an initial desensitized element identifier corresponding to each initial content to be desensitized; and screen the initial desensitized element identifier corresponding to at least one initial content to be desensitized according to the desensitized element identifier in the desensitization list to obtain sensitive content in the contract text.

[0018] In one embodiment, the second determination module includes a fourth determination unit, which is used to obtain at least one form field value of the contract text when the contract type is a non-template contract type; segment the contract text to obtain multiple first text blocks, and filter at least one second text block from the multiple first text blocks according to at least one form field value; and identify sensitive content in the contract text from the at least one second text block.

[0019] In one of the embodiments, the replacement module is specifically used to determine the sensitive element identifier corresponding to the sensitive content; based on the sensitive element identifier corresponding to the sensitive content, search for a desensitized list; wherein the desensitized list includes a mapping relationship between the desensitized element identifier and the replacement content; based on the search result, the sensitive content is replaced to obtain a desensitized contract text.

[0020] In one embodiment, the device also includes a display module and a generation module. The display module is used to display a desensitizing element selection interface, and the desensitizing element selection interface includes multiple different desensitizing element controls; the generation module is used to generate a desensitizing list according to the desensitizing elements corresponding to each triggered desensitizing element control.

[0021] In one of the embodiments, the recovery module is specifically used to recover the desensitized contract text after the desensitized contract text is reviewed through a large model.

[0022] In a third aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the methods described in the first aspect when executing the computer program.

[0023] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any one of the methods described in the first aspect are implemented.

[0024] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of any one of the methods described in the first aspect.

[0025] The above-mentioned contract text desensitization method, computer device, readable storage medium and program product obtain the contract text and determine the contract type of the contract text, then determine the target desensitization algorithm according to the contract type, determine the sensitive content in the contract text based on the target desensitization algorithm, and then replace the sensitive content to obtain the desensitized contract text, thereby achieving desensitization of the contract text. After processing the desensitized contract text, the desensitized contract text is restored to ensure the integrity of the contract and make the contract valid. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0027] Figure 1 This is an application environment diagram of a contract text desensitization method in an embodiment;

[0028] Figure 2 The figure is a flow chart of a method for desensitizing a contract text in one embodiment;

[0029] Figure 3A schematic diagram of a desensitization algorithm selection interface in one embodiment;

[0030] Figure 4 A schematic diagram of a desensitization element selection interface in one embodiment;

[0031] Figure 5 The following is a schematic diagram of a method for desensitizing a contract text in one embodiment;

[0032] Figure 6 It is a structural block diagram of a contract text desensitization device in one embodiment;

[0033] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0034] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0035] The contract text desensitization method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other servers. The contract text desensitization method can be executed on the terminal 102, and can also be implemented through the interaction between the terminal 102 and the server 104. Taking the execution on the terminal 102 as an example, the terminal 102 obtains the contract text and determines the contract type of the contract text; determines the target desensitization algorithm according to the contract type, and determines the sensitive content in the contract text based on the target desensitization algorithm; replaces the sensitive content to obtain a desensitized contract text; after processing the desensitized contract text, the desensitized contract text is restored.

[0036] The terminal 102 may be, but is not limited to, various desktop computers, laptop computers, smart phones, tablet computers, IoT devices, portable wearable devices, and aircraft. IoT devices may be smart speakers, smart TVs, smart air conditioners, smart vehicle-mounted devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc.

[0037] The server 104 may be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The terminal 102 and the server 104 may be directly or indirectly connected via wired or wireless communication, which is not limited in this application.

[0038] In one embodiment, Figure 2 As shown, a contract text desensitization method is provided, and the method is applied to a computer device (the computer device can be specifically Figure 1 The terminal 102 or the server 104 in the example is used as an example to illustrate, and the following steps are included:

[0039] Step 201, obtain the contract text and determine the contract type of the contract text.

[0040] Among them, the contract text refers to the content of the contract, which includes the names, addresses, project information, contact information and other information of all parties.

[0041] The contract type includes a template contract type and a non-template contract type. A contract text belonging to a template contract type has a bookmark, while a contract text belonging to a non-template contract type does not have a bookmark.

[0042] In one example, a computer device displays a contract text selection interface, which includes multiple contract text controls; if a trigger operation of one of the contract text controls is detected, the initial contract corresponding to the triggered contract text control is loaded; if the initial contract is in a picture format, the initial contract is processed by OCR (Optical Character Recognition) to obtain the contract text, and the contract type of the contract text is determined to be a non-template contract type; if the initial contract is in a document format, it is detected whether there is a bookmark in the initial contract, and if there is a bookmark, the content in the initial contract is used as the contract text, and the contract type of the contract text is determined to be a template contract type; if there is no bookmark, the content in the initial contract is used as the contract text, and the contract type of the contract text is determined to be a non-template contract type.

[0043] Step 202, determining a target desensitization algorithm according to the contract type, and determining sensitive content in the contract text based on the target desensitization algorithm.

[0044] Among them, a variety of desensitization algorithms are deployed in the computer device, for example, at least two of the bookmark recognition desensitization algorithm, the model recognition desensitization algorithm and the vectorized retrieval desensitization algorithm. Sensitive content in the contract text refers to information involved in the contract text that may affect the interests or privacy of the parties, such as the address, name and contact information of Party A and Party B, as well as project information.

[0045] In one example, if the contract type of the contract text is a template contract type, a bookmark recognition desensitization algorithm is selected as the target desensitization algorithm; if the contract type of the contract text is a non-template contract type, a model recognition desensitization algorithm or a vectorized retrieval desensitization algorithm is selected as the target desensitization algorithm.

[0046] In another example, if the contract type of the contract text is a non-template contract type, the desensitizing algorithm selected by the user can be used as the target desensitizing algorithm by displaying a desensitizing algorithm selection interface.

[0047] When the target desensitization algorithm is a bookmark recognition algorithm, a possible implementation method for determining the sensitive content in the contract text based on the target desensitization algorithm is: locating the sensitive content based on the bookmark identifier corresponding to the contract text.

[0048] When the target desensitization algorithm is a model recognition desensitization algorithm, a possible implementation method for determining the sensitive content in the contract text based on the target desensitization algorithm is: identifying the contract text through a pre-trained sensitive information recognition model to obtain the sensitive content.

[0049] When the target desensitizing algorithm is a vectorized retrieval desensitizing algorithm, a possible implementation method for determining sensitive content in a contract text based on the target desensitizing algorithm is: displaying a form field value entry interface, and obtaining all form field values ​​filled in by the user based on the form field value entry interface; segmenting the contract text to obtain multiple first text blocks, quantizing each first text block and each form field value, retrieving a second text similar to each form field value from the multiple first text blocks according to the quantization results, and identifying sensitive content from each second text block.

[0050] Step 203, replace the sensitive content to obtain a desensitized contract text.

[0051] In one possible implementation, a computer device replaces sensitive content based on a desensitizing list to obtain a desensitized contract text, where the desensitizing list includes a mapping relationship between desensitizing element identifiers and replacement content.

[0052] The desensitized list may be pre-stored in the computer device, or the desensitized list may be generated by a desensitizing element selection interface displayed by the computer device based on a trigger operation of the user on the desensitizing element selection interface.

[0053] The desensitized element identifier may be a desensitized element name, for example, Party A's address, Party B's address, Party A's name, and Party B's name, etc. The desensitized list corresponding to the desensitized element identifier is shown in Table 1.

[0054] Table 1

[0055]

[0056] The desensitizing element identifier may also be a desensitizing element code, such as 0001, 0002, 0010 and 0020, etc. The desensitizing list corresponding to the desensitizing element identifier is shown in Table 2.

[0057] Table 2

[0058]

[0059] The desensitizing element identifier can also be a desensitizing element name and a desensitizing element code, for example, Party A's address 0001, Party B's address 0002, Party A's name 0010, and Party B's name 0020, etc. The desensitizing list corresponding to the desensitizing element identifier is shown in Table 3.

[0060] Table 3

[0061]

[0062] In another possible implementation, a computer device replaces sensitive content in a contract text with a random number to obtain a desensitized contract text.

[0063] Step 204, after processing the desensitized contract text, restore the desensitized contract text.

[0064] Among them, after the desensitized contract text is processed, it can refer to the contract review of the desensitized contract text through the big model. The contract review is a review of the contract terms, such as checking whether the amount is consistent in uppercase and lowercase, checking the payment time and checking whether there are any missing terms.

[0065] In one example, a large model is stored in a computer device. After obtaining a desensitized contract text, the computer device runs the large model to perform a contract review on the desensitized contract text to obtain a review result, and restores the desensitized contract text to obtain a restored desensitized contract text; and displays the review result and the restored desensitized contract text.

[0066] In another example, the big model is stored in the cloud platform. After obtaining the desensitized contract text, the computer device calls the big model to perform a contract review on the desensitized contract text, obtains the review result, and restores the desensitized contract text to obtain the restored desensitized contract text; and displays the review result and the restored desensitized contract text.

[0067] In one possible implementation, before the computer device executes step 204, the method further includes: the computer device records the mapping relationship between sensitive content and replacement content to obtain a recovery list; correspondingly, after processing the desensitized contract text, the desensitized contract text is restored, including: after processing the desensitized contract text, the computer device restores the desensitized contract text based on the recovery list.

[0068] A possible implementation method for a computer device to restore a desensitized contract text based on a recovery list is: the computer device searches for the desensitized contract text based on each replacement content in the recovery list, and replaces each replacement content in the searched desensitized contract text with the corresponding sensitive content.

[0069] The above-mentioned contract text desensitization method obtains the contract text and determines the contract type of the contract text, then determines the target desensitization algorithm according to the contract type, determines the sensitive content in the contract text based on the target desensitization algorithm, and then replaces the sensitive content to obtain the desensitized contract text, thereby achieving desensitization of the contract text. After processing the desensitized contract text, the desensitized contract text is restored to ensure the integrity of the contract and make the contract valid.

[0070] In one of the embodiments, a target desensitization algorithm is determined according to the contract type, and sensitive content in the contract text is determined based on the target desensitization algorithm, including: when the contract type is a template contract type, obtaining a target bookmark identifier corresponding to the contract text, the target bookmark identifier corresponding to the sensitive content position; jumping to the sensitive content position of the contract text according to the target bookmark identifier, and treating the content at the sensitive content position as sensitive content.

[0071] For a contract text of the model contract type, there are multiple bookmarks, each of which corresponds to a position in the contract text. The bookmark can be a desensitized element name, a desensitized element code, or a desensitized element name and a desensitized element code, which can be set as needed.

[0072] To obtain the target bookmark identifier corresponding to the contract text, all bookmark identifiers in the contract text may be used as the target bookmark identifiers. This is applicable when all bookmark identifiers are used to mark the location of sensitive content. However, not all bookmark identifiers in some contract texts are used to mark the location of sensitive content. In this case, in order to avoid obtaining the wrong sensitive content, to obtain the target bookmark identifier corresponding to the contract text, the target bookmark identifier corresponding to the location of the sensitive content may be obtained by screening from multiple bookmark identifiers.

[0073] After obtaining the target bookmark identifier, the computer device parses the anchor link corresponding to the target bookmark identifier, jumps to the sensitive content position of the contract text based on the parsing result, and uses the content at the sensitive content position as sensitive content.

[0074] In this embodiment, when the contract type is a template contract type, the sensitive content is determined by using a bookmark mark, which is simple and fast to implement, and the accuracy of the sensitive content obtained is high.

[0075] In one of the embodiments, obtaining a target bookmark identifier corresponding to the contract text includes: screening multiple bookmark identifiers corresponding to the contract text according to desensitizing element identifiers in the desensitizing list to obtain a target bookmark identifier corresponding to the contract text.

[0076] In a possible implementation, each bookmark identifier that is the same as the desensitized element identifier is determined as a target bookmark identifier.

[0077] In this embodiment, the method of filtering multiple bookmark identifiers to obtain the target bookmark identifier through the desensitizing element identifier can avoid the situation where some bookmark identifiers are not used to mark the location of sensitive content, resulting in the error of obtaining sensitive content. In addition, when the desensitizing list is generated based on the trigger operation of the user on the desensitizing element selection interface, the sensitive content that the user wants to desensitize can be obtained based on the desensitizing list, thereby improving the flexibility of obtaining sensitive content and improving the user experience.

[0078] In one of the embodiments, a target desensitizing algorithm is determined according to the contract type, and the sensitive content in the contract text is determined based on the target desensitizing algorithm, including: when the contract type is a non-template contract type, a desensitizing algorithm selection interface is displayed, and the desensitizing algorithm selection interface includes a plurality of different desensitizing algorithm controls; if a triggering operation of one of the desensitizing algorithm controls is detected, the desensitizing algorithm corresponding to the triggered desensitizing algorithm control is used as the target desensitizing algorithm, and the sensitive content in the contract text is determined based on the target desensitizing algorithm.

[0079] like Figure 3 As shown, a schematic diagram of a desensitization algorithm selection interface is provided. The desensitization algorithm selection interface includes multiple desensitization algorithm controls, each of which corresponds to a different desensitization algorithm. Figure 3 In the figure, desensitizing algorithm control 1 and desensitizing algorithm control 2 are used as examples. Desensitizing algorithm control 1 corresponds to the model recognition desensitizing algorithm, and desensitizing algorithm control 2 corresponds to the vectorized retrieval desensitizing algorithm.

[0080] After the computer device displays the desensitizing algorithm selection interface, if it detects a triggering operation of one of the desensitizing algorithm controls, for example, it detects that desensitizing algorithm control 1 is clicked, the desensitizing algorithm corresponding to the triggered desensitizing algorithm control is used as the target desensitizing algorithm, and the sensitive content in the contract text is determined based on the target desensitizing algorithm, that is, the model recognition desensitizing algorithm is used as the target desensitizing algorithm, and the sensitive content in the contract text is determined based on the model recognition desensitizing algorithm.

[0081] In this embodiment, the desensitization algorithm selection interface allows the user to select the desensitization algorithm, thereby improving the flexibility of obtaining the target desensitization algorithm.

[0082] In one of the embodiments, a target desensitization algorithm is determined according to the contract type, and sensitive content in the contract text is determined based on the target desensitization algorithm, including: when the contract type is a non-template contract type, the contract text is identified by a pre-trained sensitive information identification model to obtain at least one initial content to be desensitized and an initial desensitizing element identifier corresponding to each initial content to be desensitized; and the initial desensitizing element identifier corresponding to at least one initial content to be desensitized is screened according to the desensitizing element identifier in the desensitization list to obtain the sensitive content in the contract text.

[0083] The sensitive information identification model may be an NLP (Natural Language Processing) model. The initial content to be desensitized refers to the sensitive content obtained by identifying the contract text using the sensitive information identification model. The initial desensitized element identifier may be a desensitized element name, a desensitized element code, or a desensitized element name and a desensitized element code, which may be set as needed.

[0084] The method for training a sensitive information identification model may include: obtaining a sample contract text, performing supervised training on the sensitive information identification model based on the sample contract text and the label, stopping the training when a training stop condition is reached, and obtaining a trained sensitive information identification model. The label may be the real sensitive content and the real initial desensitization element identifier corresponding to the real sensitive content.

[0085] "The contract text is identified through a pre-trained sensitive information identification model to obtain at least one initial content to be desensitized and an initial desensitizing element identifier corresponding to each initial content to be desensitized; the initial desensitizing element identifier corresponding to at least one initial content to be desensitized is screened according to the desensitizing element identifier in the desensitization list to obtain the sensitive content in the contract text" can be regarded as a model-recognition desensitization algorithm.

[0086] In one possible implementation, when the computer device determines that the contract type of the contract text is a non-sample contract type, the computer device executes the model-recognition desensitization algorithm. In another possible implementation, when the computer device determines that the contract type of the contract text is a non-sample contract type, the computer device displays a desensitization algorithm selection interface, and executes the model-recognition desensitization algorithm when it is detected that the user has selected the model-recognition desensitization algorithm.

[0087] A possible specific implementation method of the model recognition desensitization algorithm is that the computer device calls the sensitive information recognition model, and inputs the contract text into the sensitive information recognition model to obtain at least one initial content to be desensitized and an initial desensitizing element identifier corresponding to each initial content to be desensitized output by the sensitive information recognition model; and the initial content to be desensitized corresponding to the initial desensitizing element identifier in all initial desensitizing element identifiers that are the same as the desensitizing element identifier in the desensitization list is treated as sensitive content.

[0088] In this embodiment, for contract texts that are not template contract types, the contract texts are identified using a pre-trained sensitive information identification model to obtain sensitive content in the contract text, and the efficiency of obtaining sensitive content is high.

[0089] In one of the embodiments, a target desensitization algorithm is determined according to the contract type, and sensitive content in the contract text is determined based on the target desensitization algorithm, including: when the contract type is a non-template contract type, obtaining at least one form field value of the contract text; segmenting the contract text to obtain multiple first text blocks, and filtering at least one second text block from the multiple first text blocks according to at least one form field value; and identifying sensitive content in the contract text from the at least one second text block.

[0090] Among them, the form field value refers to the specific content filled in the contract text, such as "such and such company", "such and such project" and "such and such community".

[0091] "Obtaining at least one form field value of the contract text; segmenting the contract text to obtain multiple first text blocks, and filtering at least one second text block from the multiple first text blocks according to at least one form field value; identifying sensitive content in the contract text from at least one second text block" can be regarded as a vectorized retrieval-style desensitizing algorithm.

[0092] In one possible implementation, when the computer device determines that the contract type of the contract text is a non-template contract type, the computer device executes a vectorized search-based desensitization algorithm. In another possible implementation, when the computer device determines that the contract type of the contract text is a non-template contract type, the computer device displays a desensitization algorithm selection interface, and executes the vectorized search-based desensitization algorithm when it is detected that the user has selected the vectorized search-based desensitization algorithm.

[0093] A possible specific implementation method of the vectorized retrieval-based desensitization algorithm is to display a form field value entry interface, and obtain at least one form field value based on at least one field value input by a user in the form field value entry interface; a computer device divides the contract text according to a separator to obtain multiple first text blocks, wherein the separator may be a punctuation mark, such as at least one of a comma, a period, and a semicolon; the computer device quantizes each form field value and each first text block to obtain a first vector corresponding to each form field value and a second vector corresponding to each first text block; for each first vector, a similarity calculation is performed on the first vector and each second vector, and a target vector is selected from the second vector according to the similarity calculation result, and the first text block corresponding to the target vector is used as the second text block; and a sensitive information recognition model is used to recognize all second text blocks to obtain sensitive content.

[0094] In this embodiment, for a contract text that is not a template contract type, multiple first text blocks are obtained by obtaining form field values ​​and segmenting the contract text, and then a second text block is obtained from the multiple first text blocks by using a quantization process and screening method, and then sensitive content is identified from the second text block. Compared with the method of directly identifying the contract text to obtain sensitive content, the sensitive content obtained is more accurate. In addition, in this embodiment, the second text block is screened by calculating the similarity method, and then the sensitive content is identified, rather than directly using the form field value as the sensitive content, because the form field value entered by the user does not necessarily completely correspond to the content in the contract text. For example, the user enters the abbreviation of the company name, and the contract text contains the full name of the company name. This can avoid the risk of incorrectly obtaining sensitive content by directly obtaining sensitive content using the form field value.

[0095] In one of the embodiments, sensitive content is replaced to obtain a desensitized contract text, including: determining the sensitive element identifier corresponding to the sensitive content; searching a desensitized list based on the sensitive element identifier corresponding to the sensitive content; wherein the desensitized list includes a mapping relationship between the desensitized element identifier and the replacement content; and replacing the sensitive content based on the search result to obtain a desensitized contract text.

[0096] The sensitive element identifier can be a desensitized element name, a desensitized element code, or a desensitized element name and a desensitized element code, which can be set as needed. The search results include the desensitized element identifier that is the same as the sensitive element identifier.

[0097] For different contract types, the method of determining the sensitive element identifier corresponding to the sensitive content is different. In the case where the contract type is a template contract type, the sensitive content is determined based on the target bookmark identifier, so the target bookmark identifier corresponding to the sensitive content can be directly used as the sensitive element identifier corresponding to the sensitive content.

[0098] When the contract type is a non-template contract type and sensitive content is identified by using a model-recognition desensitizing algorithm, since the sensitive information identification model not only outputs the initial content to be desensitized, but also outputs the initial desensitizing element identification corresponding to the initial content to be desensitized, and the sensitive content is screened from all the initial content to be desensitized, the initial desensitizing element identification corresponding to the sensitive content can be directly used as the sensitive element identification corresponding to the sensitive content.

[0099] When the contract type is a non-template contract type and sensitive content is identified by using a vectorized retrieval-based desensitizing algorithm, if the second text block is identified by using a sensitive information identification model, then since the sensitive content identification model will output the initial desensitizing element identifier corresponding to the initial content to be desensitized, the initial desensitizing element identifier corresponding to the sensitive content can be directly used as the sensitive element identifier corresponding to the sensitive content; if the model for identifying the second text block does not output the initial desensitizing element identifier corresponding to the sensitive content, it is necessary to perform business field mapping on the sensitive content to obtain the sensitive element identifier corresponding to the sensitive content.

[0100] A possible implementation method of business field mapping is that the form field value entry interface displayed by the computer device also includes multiple different desensitizing element identifiers, each desensitizing element identifier corresponds to an empty field position for the user to enter, and the empty field position is used for the user to enter the form field value corresponding to the desensitizing element identifier, so that after the user completes the input of the form field value, a business list including the mapping relationship between the desensitizing element identifier and the form field value can be obtained; after the computer device obtains the sensitive content, the sensitive element identifier corresponding to the sensitive content can be obtained through the business list.

[0101] After obtaining the sensitive element identifier corresponding to the sensitive content, a desensitized element identifier that is identical to the sensitive element identifier corresponding to the sensitive content is searched from the sensitive list, and the replacement content corresponding to the desensitized element identifier that is identical to the sensitive element identifier is used to replace the sensitive content in the contract text to obtain a desensitized contract text.

[0102] In this embodiment, the sensitive content in the contract text is replaced by a desensitizing list, and this replacement method is highly efficient.

[0103] In one of the embodiments, the method further includes: displaying a desensitizing element selection interface, the desensitizing element selection interface including a plurality of different desensitizing element controls; and generating a desensitizing list according to the desensitizing elements corresponding to each desensitizing element control that is triggered.

[0104] like Figure 4As shown, a schematic diagram of a desensitizing element selection interface is provided, which includes desensitizing element controls corresponding to five desensitizing elements, namely, Party A's address, Party B's address, Party A's name, Party B's name and project information, as well as an example of a confirmation option control.

[0105] In one possible implementation, a computer device displays a desensitizing element selection interface, and a user can select a desensitizing element by clicking on the desensitizing element selection interface. After detecting a trigger operation for a determined option control, the computer device obtains the desensitizing elements corresponding to each desensitizing element control triggered by the user; a total desensitizing list is stored in the computer device, and the total desensitizing list includes a mapping relationship between desensitizing element identifiers and replacement contents, wherein the volume of the mapping relationships in the total desensitizing list is greater than or equal to the volume of the mapping relationships in the desensitizing list; the computer device obtains the mapping relationship between the desensitizing element identifiers and replacement contents related to the desensitizing elements triggered by the user from the total desensitizing list, thereby obtaining the desensitizing list.

[0106] In this embodiment, by displaying the desensitizing element selection interface, a desensitizing list is generated according to the desensitizing elements corresponding to each triggered desensitizing element control, thereby realizing user-defined desensitizing list. That is, the user can customize the scope of desensitization, so that the sensitive content selected based on the desensitization list meets the user's desensitization needs. Therefore, this method can improve the desensitization flexibility of the contract text.

[0107] In summary, if Figure 5 As shown, the present application provides a schematic diagram of a contract text desensitization method, and the steps of the contract text desensitization method are as follows:

[0108] After receiving the contract review instruction for the contract text, the computer device obtains the contract text, determines the contract type of the contract text, and displays the desensitizing element selection interface, and generates a desensitizing list according to the desensitizing elements corresponding to each of the desensitizing element controls that are triggered. If the contract type is a template contract type, the computer device obtains the target bookmark identifier corresponding to the contract text, jumps to the sensitive content built-in of the contract text according to the target bookmark identifier, and uses the content at the sensitive content position as sensitive content. In other words, if the contract type is a template contract type, the sensitive content is obtained by bookmark recognition.

[0109] If the contract type is a non-template contract type, the computer device displays a desensitization algorithm selection interface; if the user selects a model-recognition desensitization algorithm based on the desensitization algorithm selection interface, the computer device identifies the contract text through a pre-trained sensitive information identification model, obtains at least one initial content to be desensitized and an initial desensitizing element identifier corresponding to each initial content to be desensitized, and screens the initial desensitizing element identifier corresponding to at least one initial content to be desensitized according to the desensitizing element identifier in the desensitization list to obtain sensitive content in the contract text. In other words, if the contract type is a non-template contract type and the user selects a model-recognition desensitization algorithm, the sensitive content is obtained by model recognition.

[0110] If the user selects the vectorized search-based desensitization algorithm based on the desensitization algorithm selection interface, the computer device obtains at least one form field value of the contract text; divides the contract text to obtain multiple first text blocks, and selects at least one second text block from the multiple first text blocks according to at least one form field value; and identifies sensitive content in the contract text from the at least one second text block. In other words, if the contract type is a template contract type and the user selects the vectorized search-based desensitization algorithm, the form field value is obtained, and the sensitive content is obtained by vectorized retrieval.

[0111] After obtaining the sensitive content, replace the sensitive content based on the desensitization list to obtain the desensitized contract text. Call the big model to review the desensitized contract text, obtain the review result, and restore the desensitized contract text to obtain the restored desensitized contract text; display the review result and the restored desensitized contract text.

[0112] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0113] Based on the same inventive concept, the embodiment of the present application also provides a contract text desensitization device for implementing the contract text desensitization method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more embodiments of the contract text desensitization device provided below can refer to the limitations of the contract text desensitization method above, and will not be repeated here.

[0114] In an exemplary embodiment, Figure 6 As shown, a contract text desensitization device is provided. The contract text desensitization device 600 includes: a first determination module 601, a second determination module 602, a replacement module 603 and a recovery module 604, wherein:

[0115] The first determination module 601 is used to obtain a contract text and determine the contract type of the contract text;

[0116] A second determination module 602 is used to determine a target desensitization algorithm according to the contract type, and determine sensitive content in the contract text based on the target desensitization algorithm;

[0117] A replacement module 603 is used to replace sensitive content to obtain a desensitized contract text;

[0118] The recovery module 604 is used to recover the desensitized contract text after processing the desensitized contract text.

[0119] In one embodiment, the second determination module 602 includes an acquisition unit and a first determination unit. The acquisition unit is used to acquire a target bookmark identifier corresponding to the contract text when the contract type is a template contract type, and the target bookmark identifier corresponds to the sensitive content position; the first determination unit is used to jump to the sensitive content position of the contract text according to the target bookmark identifier, and use the content at the sensitive content position as sensitive content.

[0120] In one of the embodiments, the acquisition unit is specifically used to filter multiple bookmark identifiers corresponding to the contract text according to the desensitizing element identifiers in the desensitizing list to obtain a target bookmark identifier corresponding to the contract text.

[0121] In one of the embodiments, the second determination module 602 includes a display unit and a second determination unit, the display unit being used to display a desensitizing algorithm selection interface when the contract type is a non-template contract type, the desensitizing algorithm selection interface including a plurality of different desensitizing algorithm controls; the second determination unit being used to detect a triggering operation of one of the desensitizing algorithm controls, and then using the desensitizing algorithm corresponding to the triggered desensitizing algorithm control as a target desensitizing algorithm, and determining the sensitive content in the contract text based on the target desensitizing algorithm.

[0122] In one embodiment, the second determination module 602 includes a third determination unit, which is used to identify the contract text through a pre-trained sensitive information identification model when the contract type is a non-template contract type, and obtain at least one initial content to be desensitized and an initial desensitized element identifier corresponding to each initial content to be desensitized; and screen the initial desensitized element identifier corresponding to at least one initial content to be desensitized according to the desensitized element identifier in the desensitization list to obtain sensitive content in the contract text.

[0123] In one embodiment, the second determination module 602 includes a fourth determination unit, which is used to obtain at least one form field value of the contract text when the contract type is a non-template contract type; segment the contract text to obtain multiple first text blocks, and filter at least one second text block from the multiple first text blocks according to at least one form field value; and identify sensitive content in the contract text from the at least one second text block.

[0124] In one of the embodiments, the replacement module 603 is specifically used to determine the sensitive element identifier corresponding to the sensitive content; based on the sensitive element identifier corresponding to the sensitive content, search the desensitizing list; wherein the desensitizing list includes a mapping relationship between the desensitizing element identifier and the replacement content; based on the search result, replace the sensitive content to obtain a desensitized contract text.

[0125] In one embodiment, the device also includes a display module and a generation module. The display module is used to display a desensitizing element selection interface, and the desensitizing element selection interface includes multiple different desensitizing element controls; the generation module is used to generate a desensitizing list according to the desensitizing elements corresponding to each triggered desensitizing element control.

[0126] In one embodiment, the recovery module 604 is specifically used to recover the desensitized contract text after the desensitized contract text is reviewed through a large model.

[0127] Each module in the above-mentioned contract text desensitization device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0128] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 7As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a method for desensitizing a contract text is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0129] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0130] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps described in any of the above method embodiments when executing the computer program.

[0131] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps described in any of the above method embodiments are implemented.

[0132] In one embodiment, a computer program product is provided, including a computer program, which implements the steps described in any of the above method embodiments when executed by a processor.

[0133] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0134] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0135] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0136] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A contract text desensitization method, characterized in that: The method comprises: Obtaining a contract text and determining a contract type of the contract text; Determine a target desensitization algorithm according to the contract type, and determine sensitive content in the contract text based on the target desensitization algorithm; The sensitive content is replaced to obtain a desensitized contract text; After the desensitized contract text is processed, the desensitized contract text is restored.

2. The method according to claim 1, characterized in that: The step of determining a target desensitization algorithm according to the contract type and determining sensitive content in the contract text based on the target desensitization algorithm includes: In the case where the contract type is a template contract type, obtaining a target bookmark identifier corresponding to the contract text, wherein the target bookmark identifier corresponds to a sensitive content position; Jump to the sensitive content position of the contract text according to the target bookmark identifier, and use the content at the sensitive content position as the sensitive content.

3. The method according to claim 2, characterized in that The step of obtaining a target bookmark identifier corresponding to the contract text includes: The multiple bookmark identifiers corresponding to the contract text are screened according to the desensitizing element identifiers in the desensitizing list to obtain the target bookmark identifier corresponding to the contract text.

4. The method according to claim 1, characterized in that: The step of determining a target desensitization algorithm according to the contract type and determining sensitive content in the contract text based on the target desensitization algorithm includes: In the case where the contract type is a non-sample contract type, a desensitizing algorithm selection interface is displayed, wherein the desensitizing algorithm selection interface includes a plurality of different desensitizing algorithm controls; If a triggering operation of one of the desensitizing algorithm controls is detected, the desensitizing algorithm corresponding to the triggered desensitizing algorithm control is used as the target desensitizing algorithm, and the sensitive content in the contract text is determined based on the target desensitizing algorithm.

5. The method according to claim 1 or 4, characterized in that: The step of determining a target desensitization algorithm according to the contract type and determining sensitive content in the contract text based on the target desensitization algorithm includes: In the case where the contract type is a non-template contract type, the contract text is identified by a pre-trained sensitive information identification model to obtain at least one initial content to be desensitized and an initial desensitized element identifier corresponding to each initial content to be desensitized; The initial desensitizing element identifier corresponding to at least one of the initial contents to be desensitized is screened according to the desensitizing element identifier in the desensitizing list to obtain the sensitive content in the contract text.

6. The method according to claim 1 or 4, characterized in that: The step of determining a target desensitization algorithm according to the contract type and determining sensitive content in the contract text based on the target desensitization algorithm includes: In the case where the contract type is a non-template contract type, obtaining at least one form field value of the contract text; Segmenting the contract text to obtain a plurality of first text blocks, and filtering the plurality of first text blocks according to the at least one form field value to obtain at least one second text block; Sensitive content in the contract text is identified from the at least one second text block.

7. The method according to claim 1, characterized in that The sensitive content is replaced to obtain a desensitized contract text, including: Determine the sensitive element identifier corresponding to the sensitive content; Based on the sensitive element identifier corresponding to the sensitive content, searching for a desensitization list; wherein the desensitization list includes a mapping relationship between the desensitization element identifier and the replacement content; The sensitive content is replaced based on the search result to obtain the desensitized contract text.

8. The method according to claim 7, characterized in that The method further comprises: Displaying a desensitizing factor selection interface, wherein the desensitizing factor selection interface includes a plurality of different desensitizing factor controls; The desensitization list is generated according to the desensitization elements corresponding to each of the desensitization element controls that are triggered.

9. The method according to claim 1, characterized in that: After the desensitized contract text is processed, restoring the desensitized contract text includes: After the desensitized contract text is reviewed through the large model, the desensitized contract text is restored.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 9 are implemented.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.

12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.