WO2021052148A1 - 基于人工智能的合同敏感词校验方法、装置、计算机设备及存储介质 - Google Patents

基于人工智能的合同敏感词校验方法、装置、计算机设备及存储介质 Download PDF

Info

Publication number
WO2021052148A1
WO2021052148A1 PCT/CN2020/112337 CN2020112337W WO2021052148A1 WO 2021052148 A1 WO2021052148 A1 WO 2021052148A1 CN 2020112337 W CN2020112337 W CN 2020112337W WO 2021052148 A1 WO2021052148 A1 WO 2021052148A1
Authority
WO
WIPO (PCT)
Prior art keywords
contract
words
word
text data
sensitive
Prior art date
Application number
PCT/CN2020/112337
Other languages
English (en)
French (fr)
Inventor
石明川
刘从宽
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021052148A1 publication Critical patent/WO2021052148A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification

Definitions

  • Sensitive word filtering is an important part of text information management. It mainly refers to a text processing method that detects specific sensitive words in a given text, highlights or replaces accurately located sensitive words.
  • the matching rules of the contract can be set in advance to achieve the purpose of sensitive word verification.
  • the inventor realizes that the sensitive word verification is not performed on the manually added rule information at present, which may cause a greater impact on the later drafted contract. Defects cause certain economic losses to any party in the contract.
  • This application provides a method for verifying contract sensitive words based on artificial intelligence, including:
  • the text preprocessing module is used to obtain a contract text data set, and perform a preprocessing operation on the contract text data set to obtain a numerical vector contract word set;
  • the matching recognition module is used to match the contract text entered by the user through the matching algorithm based on the classification of the sensitive word harm level, until the matched sensitive word reaches the preset harm level, stop matching, and complete the contract text Check sensitive words and re-edit the contract text.
  • the present application also provides a computer device that includes a memory and a processor.
  • the memory stores an artificial intelligence-based contract-sensitive word verification program that can run on the processor.
  • the smart contract sensitive word verification program is executed by the processor, the following steps are implemented:
  • the words in the numerical vector contract word set are classified into the hazard levels of sensitive words
  • the contract text entered by the user is matched through a matching algorithm, until the matched sensitive word reaches the preset harm level, the matching is stopped, the sensitive word verification of the contract text is completed, and Re-edit the contract text.
  • this application also provides a computer-readable storage medium that stores an artificial intelligence-based contract-sensitive word verification program, and the artificial intelligence-based contract-sensitive word verification program can be used by an artificial intelligence-based contract-sensitive word verification program. Or executed by multiple processors to achieve the following steps:
  • the words in the numerical vector contract word set are classified into the hazard levels of sensitive words
  • the contract text entered by the user is matched through a matching algorithm, until the matched sensitive word reaches the preset harm level, the matching is stopped, the sensitive word verification of the contract text is completed, and Re-edit the contract text.
  • FIG. 1 is a schematic flowchart of a method for verifying contract sensitive words based on artificial intelligence according to an embodiment of the application
  • FIG. 3 is a schematic diagram of modules of an artificial intelligence-based contract sensitive word verification device provided by an embodiment of the application.
  • This application provides a method for verifying contract sensitive words based on artificial intelligence.
  • FIG. 1 it is a schematic flowchart of a method for verifying contract sensitive words based on artificial intelligence according to an embodiment of the present application.
  • the method can be executed by a device, and the device can be implemented by software and/or hardware.
  • the contract text data set is generated by combining contract texts, among which, modules.
  • the preferred embodiment of the present application performs preprocessing operations on the contract text data set,
  • the contract text data set is transformed into a numerical vector contract word set.
  • the preprocessing operations include deduplication, word segmentation, destop words, and weight calculation.
  • the specific implementation steps of the preprocessing operation are:
  • the preferred embodiment of the present application first performs a deduplication operation on the text data set.
  • this application uses the Euclidean distance formula to de-duplicate the contract text data set, wherein the Euclidean distance formula is as follows:
  • d represents the distance between the contract text data sets
  • w 1j and w 2j are any two contract text data respectively.
  • this application presets the distance threshold to be 0.1.
  • the preset dictionary includes a statistical dictionary and a prefix dictionary.
  • the statistical dictionary is a dictionary constructed by all possible word segmentation obtained by statistical methods.
  • the statistical dictionary counts the frequency of the contribution of adjacent characters in the corpus and calculates mutual information. When the mutual information of adjacent characters is greater than a preset threshold, it is recognized as a constituent word.
  • the threshold described in this application Is 0.6.
  • the prefix dictionary includes the prefix of each participle in the statistical dictionary.
  • This application calculates the correlation strength between the feature words of the contract text data set after the stop words are removed by constructing a dependency relationship graph, and calculates the feature words of the contract text data set after the stop words are removed by the correlation strength
  • the importance score of is obtained, and the weight of the feature words of the contract text data set after the stop words are removed.
  • the calculating the importance score of the characteristic word includes:
  • the correlation strength between the feature words W i and W j is:
  • the feature word weight is obtained, so that the feature word is expressed in the form of a numerical vector, and the numerical vector contract word set is obtained.
  • the value vector contract word set is classified into the harm level of sensitive words.
  • the sensitive words in the contract-sensitive word information database are obtained in the following three ways: Method one, receiving contract-sensitive words entered by the user; Method two, downloading the contract from the search engine through keywords Sensitive words; and/or Method 3. Crawling from professional contract websites to obtain contract sensitive words; preferably, this application uses Ontology Web Language (OWL) to obtain the contract sensitive words in the contract sensitive word database. The sensitive words are compiled to complete the construction of the contract sensitive word information database.
  • OWL Ontology Web Language
  • the classification of contract-sensitive words includes: 1) uncivilized words, including various dirty characters; 2) discordant words, including names of various government departments and various reactionary words Vocabulary; 3) Untidy language, including various children’s taboos; 4) Words with completely opposite meanings under different semantics; 5) Words that need to be marked in the contract development process.
  • this application classifies the numerical vector contract word set according to the classification of the sensitive word related information database and the contract sensitive word.
  • the hazard levels of the sensitive words are divided into three levels, I, II, and III (the hazard level is from high to low), and among them, they belong to the above-mentioned aspects 1) and 2).
  • the hazard level is classified as I; for sensitive words in the above-mentioned aspect 3), the hazard level is classified as II; for the sensitive words in the above-mentioned aspects 4) and 5), the hazard level is classified as III.
  • the contract text input by the user is matched through a matching algorithm, until the matched sensitive word reaches the preset harm level, the matching is stopped, and the sensitive word verification of the contract text is completed And re-edit the contract text.
  • the matching algorithm includes the Wu-Manber algorithm, or WM algorithm for short.
  • the WM algorithm uses a hash table to select a subset of the pattern string set to completely match the current text, including three tables: SHIFT, HASH, and PREFIX. Identify the number of characters skipped by the character string in the contract text entered by the user through the SHIFT table, and determine the characters in the contract text entered by the user after judging the number of characters according to the HASH table and the PREFix table The string matches the candidate patterns, verifies which candidate patterns match exactly, and uses the candidate patterns that can be completely matched to perform the matching operation of the contract text.
  • an index value index is obtained through the hash function mapping, and the index value index is used as the offset to obtain the value in the SHIFT table, and the value in the SHIFT table determines that the current string is read.
  • this application also includes the presupposition that when five level III hazard level vocabularies are received, one level II hazard level vocabulary will be obtained, and when two level II hazardous level vocabularies are received, a level I hazard level vocabulary will be generated Based on the rules of the sex level sensitive vocabulary, when the hazard level reaches the hazard level I or II, the matching is terminated and the contract text data is re-edited.
  • the artificial intelligence-based computer device 1 may be a PC (Personal Computer), or a terminal device such as a smart phone, a tablet computer, or a portable computer, or a server.
  • the computer device 1 at least includes a memory 11, a processor 12, a communication bus 13, and a network interface 14.
  • the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, and the like.
  • the memory 11 may be an internal storage unit of the computer device 1 in some embodiments, such as a hard disk of the computer device 1. In other embodiments, the memory 11 may also be an external storage device of the computer device 1, such as a plug-in hard disk, a smart media card (SMC), and a secure digital (SD) equipped on the computer device 1. Card, Flash Card, etc. Further, the memory 11 may also include both an internal storage unit of the computer device 1 and an external storage device.
  • the memory 11 can be used not only to store application software and various data installed in the computer device 1, such as the code of the contract sensitive word verification program 01 based on artificial intelligence, etc., but also to temporarily store data that has been output or will be output. .
  • the processor 12 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip, for running program codes or processing stored in the memory 11 Data, such as the execution of the contract sensitive word verification program 01 based on artificial intelligence.
  • CPU central processing unit
  • controller microcontroller
  • microprocessor or other data processing chip, for running program codes or processing stored in the memory 11 Data, such as the execution of the contract sensitive word verification program 01 based on artificial intelligence.
  • the communication bus 13 is used to realize the connection and communication between these components.
  • FIG. 2 only shows the computer device 1 with components 11-14 and the contract sensitive word verification program 01 based on artificial intelligence.
  • the definition of may include fewer or more components than shown, or a combination of certain components, or a different component arrangement.
  • the memory 11 stores the artificial intelligence-based contract-sensitive word verification program 01; the processor 12 executes the artificial intelligence-based contract-sensitive word verification program 01 stored in the memory 11 When implementing the following steps:
  • Step 1 Obtain a contract text data set, and perform a preprocessing operation on the contract text data set to obtain a numerical vector contract word set.
  • the contract text data set is generated by combining contract texts, wherein the contract texts are obtained in the following two ways: Method 1: Obtaining from the databases of major enterprises; The second way is to obtain by searching keywords from the corpus.
  • the preferred embodiment of the present application performs preprocessing operations on the contract text data set,
  • the contract text data set is transformed into a numerical vector contract word set.
  • the preprocessing operations include deduplication, word segmentation, destop words, and weight calculation.
  • the specific implementation steps of the preprocessing operation are:
  • this application uses the Euclidean distance formula to de-duplicate the contract text data set, wherein the Euclidean distance formula is as follows:
  • the preset dictionary includes a statistical dictionary and a prefix dictionary.
  • the statistical dictionary is a dictionary constructed by all possible word segmentation obtained by statistical methods.
  • the statistical dictionary counts the frequency of the contribution of adjacent characters in the corpus and calculates mutual information. When the mutual information of adjacent characters is greater than a preset threshold, it is recognized as a constituent word.
  • the threshold described in this application Is 0.6.
  • the prefix dictionary includes the prefix of each participle in the statistical dictionary.
  • the prefixes of the word “China Ping An” in the statistical dictionary are “ ⁇ ”, “ ⁇ ”, and “China Ping”;
  • the prefix is "country” and so on.
  • This application uses the possible word segmentation results of the contract text data set obtained by the statistical dictionary, and obtains the final segmentation form according to the segmentation position of the word through the prefix dictionary, thereby obtaining the characteristics of the contract text data set word.
  • the stop words are words that have no actual meaning in the text function words, which have no effect on the classification of the text, but the frequency of occurrence is high, so the text classification will be reduced.
  • the stop words include commonly used pronouns, prepositions, etc. .
  • the stop words may be " ⁇ ", " ⁇ ", "but”, " ⁇ ” and so on.
  • This application uses a pre-built stop vocabulary table to match words in the contract text data set after word segmentation one by one, wherein when the feature words in the contract text data set after word segmentation match the stop word list When successful, the successfully matched feature words are filtered, and when the feature words in the contract text data set after word segmentation are unsuccessfully matched with the stop vocabulary, the unsuccessful words are retained.
  • the pre-built stop vocabulary list is downloaded through a web page.
  • This application calculates the correlation strength between the feature words of the contract text data set after the stop words are removed by constructing a dependency relationship graph, and calculates the feature words of the contract text data set after the stop words are removed by the correlation strength
  • the importance score of is obtained, and the weight of the feature words of the contract text data set after the stop words are removed.
  • the calculating the importance score of the characteristic word includes:
  • f grav (W i, W j) represents the feature words W i and W j of gravity
  • tfidf (W i) represents a TF-IDF value of the characteristic word W i is
  • tfidf (W j) represents the feature words W j of TF -IDF value
  • TF means word frequency
  • IDF means inverse document frequency index
  • d is the Euclidean distance between the word vectors of feature words W i and W j;
  • the correlation strength between the feature words W i and W j is:
  • the feature word weight is obtained, so that the feature word is expressed in the form of a numerical vector, and the numerical vector contract word set is obtained.
  • Step 2 According to the pre-built contract sensitive word information database, the value vector contract word set is classified into the harm level of sensitive words.
  • the sensitive words in the contract sensitive word information database are obtained through the following three methods: method one, receiving contract sensitive words entered by the user; method two, downloading the contract from the search engine through keywords Sensitive words; and/or Method 3. Crawling from professional contract websites to obtain contract sensitive words; preferably, this application uses Ontology Web Language (OWL) to obtain the contract sensitive words in the contract sensitive word database. The sensitive words are compiled to complete the construction of the contract sensitive word information database.
  • OWL Ontology Web Language
  • the classification of contract-sensitive words includes: 1) uncivilized words, including various dirty characters; 2) discordant words, including names of various government departments and various reactionary words Vocabulary; 3) Untidy language, including various children’s taboos; 4) Words with completely opposite meanings under different semantics; 5) Words that need to be marked in the contract development process.
  • this application classifies the numerical vector contract word set according to the classification of the sensitive word related information database and the contract sensitive word.
  • the hazard levels of the sensitive words are divided into three levels, I, II, and III (the hazard level is from high to low), and among them, they belong to the above-mentioned aspects 1) and 2).
  • the hazard level is classified as I; for sensitive words in the above-mentioned aspect 3), the hazard level is classified as II; for the sensitive words in the above-mentioned aspects 4) and 5), the hazard level is classified as III.
  • Step 3 Based on the classification of the sensitive word harm level, the contract text entered by the user is matched through a matching algorithm, until the matched sensitive word reaches the preset harm level, the matching is stopped, and the sensitive word correction of the contract text is completed. Verify and re-edit the contract text.
  • the matching algorithm includes the Wu-Manber algorithm, or WM algorithm for short.
  • the WM algorithm uses a hash table to select a subset of the pattern string set to completely match the current text, including three tables: SHIFT, HASH, and PREFIX. Identify the number of characters skipped by the character string in the contract text entered by the user through the SHIFT table, and determine the characters in the contract text entered by the user after judging the number of characters according to the HASH table and the PREFix table The string matches the candidate patterns, verifies which candidate patterns match exactly, and uses the candidate patterns that can be completely matched to perform the matching operation of the contract text.
  • an index value index is obtained through the hash function mapping, and the index value index is used as the offset to obtain the value in the SHIFT table, and the value in the SHIFT table determines that the current string is read.
  • this application receives the contract text entered by the user, and uses the WM algorithm to perform matching search.
  • the corresponding damage level of the above-mentioned sensitive word is divided to obtain the corresponding damage level of the contract. .
  • the matching is stopped, and the contract text is re-edited to complete the sensitive word verification of the contract text.
  • the contract text target string target suppose the cursor i, the pattern prefix length m, the character block length B, and the prefix length C.
  • This application takes target[i-B+1...i] and finds its corresponding value SHIFT[target[i-B+1...i]] in the SHIFT table.
  • this application also includes the presupposition that when five level III hazard level vocabularies are received, one level II hazard level vocabulary will be obtained, and when two level II hazard level vocabularies are received, a level I hazard level vocabulary will be generated. Based on the rules of the sex level sensitive vocabulary, when the hazard level reaches the hazard level I or II, the matching is terminated and the contract text data is re-edited.
  • the artificial intelligence-based contract sensitive word verification device includes text preprocessing
  • the module 10, the classification module 20, and the matching recognition module 30 are exemplary:
  • the level division module 20 is configured to: according to a pre-built contract sensitive word information database, the words in the numerical vector contract word set are classified into the hazard levels of sensitive words.
  • the matching recognition module 30 is configured to match the contract text input by the user through a matching algorithm based on the classification of the sensitive word harm level, until the matched sensitive word reaches the preset harm level, stop matching, and complete the contract Check the sensitive words of the text, and re-edit the contract text.
  • the embodiments of the present application also propose a computer-readable storage medium.
  • the computer-readable storage medium may be non-volatile or volatile.
  • the computer-readable storage medium stores an artificial intelligence-based Contract sensitive word verification program, the artificial intelligence-based contract sensitive word verification program can be executed by one or more processors to achieve the following operations:
  • the words in the numerical vector contract word set are classified into the hazard levels of sensitive words
  • the contract text entered by the user is matched through a matching algorithm, until the matched sensitive word reaches the preset harm level, the matching is stopped, the sensitive word verification of the contract text is completed, and Re-edit the contract text.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Machine Translation (AREA)

Abstract

一种基于人工智能的合同敏感词校验方法、装置以及计算机可读存储介质,涉及人工智能技术,该方法包括:获取合同文本数据集,对所述合同文本数据集进行预处理操作,得到数值向量合同词语集(S1);根据预先构建的合同敏感词信息库,对所述数值向量合同词语集中的词语进行敏感词危害等级的划分(S2);基于所述敏感词危害等级的划分,通过匹配算法对用户输入的合同文本进行匹配,直至匹配的敏感词达到预设的危害等级时,停止匹配,完成所述合同文本的敏感词校验,并重新编辑所述合同文本(S3)。该方法实现了合同敏感词的精准检验。

Description

基于人工智能的合同敏感词校验方法、装置、计算机设备及存储介质
本申请要求于2019年9月16日提交中国专利局、申请号为CN201910878460.7,发明名称为“基于人工智能的合同敏感词校验方法、装置及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及人工智能技术领域,尤其涉及一种基于人工智能的合同敏感词校验方法、装置、计算机设备及存储介质。
背景技术
敏感词过滤,是文字信息管理的一项重要内容。它主要是指在给定的文本当中,对于特定的敏感词进行检测,高亮或替换准确定位的敏感词的一种文本处理方法。在合同开发时,可以提前设置合同的匹配规则达到敏感词校验的目的,但发明人意识到目前并未对人工添加的规则信息做敏感词校验,可能对后期起草的合同造成较大的缺陷,给合同任意方造成一定的经济损失。
发明内容
本申请提供一种基于人工智能的合同敏感词校验方法、装置、计算机设备及存储介质。
本申请提供的一种基于人工智能的合同敏感词校验方法,包括:
获取合同文本数据集,对所述合同文本数据集进行预处理操作,得到数值向量合同词语集;
根据预先构建的合同敏感词信息库,对所述数值向量合同词语集中的词语进行敏感词危害等级的划分;
基于所述敏感词危害等级的划分,通过匹配算法对用户输入的合同文本进行匹配,直至匹配的敏感词达到预设的危害等级时,停止匹配,完成所述合同文本的敏感词校验,并重新编辑所述合同文本。
此外,本申请还提供一种基于人工智能的合同敏感词校验装置,该装置包括:
文本预处理模块,用于获取合同文本数据集,对所述合同文本数据集进行预处理操作,得到数值向量合同词语集;
等级划分模块,用于根据预先构建的合同敏感词信息库,对所述数值向量合同词语集中的词语进行敏感词危害等级的划分;
匹配识别模块,用于基于所述敏感词危害等级的划分,通过匹配算法对用户输入的合同文本进行匹配,直至匹配的敏感词达到预设的危害等级时,停止匹配,完成所述合同文本的敏感词校验,并重新编辑所述合同文本。
此外,本申请还提供一种计算机设备,该计算机设备包括存储器和处理器,所述存储器中存储有可在所述处理器上运行的基于人工智能的合同敏感词校验程序,所述基于人工智能的合同敏感词校验程序被所述处理器执行时实现如下步骤:
获取合同文本数据集,对所述合同文本数据集进行预处理操作,得到数值向量合同词语集;
根据预先构建的合同敏感词信息库,对所述数值向量合同词语集中的词语进行敏感词危害等级的划分;
基于所述敏感词危害等级的划分,通过匹配算法对用户输入的合同文本进行匹配,直至匹配的敏感词达到预设的危害等级时,停止匹配,完成所述合同文本的敏感词校验,并 重新编辑所述合同文本。
此外,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有基于人工智能的合同敏感词校验程序,所述基于人工智能的合同敏感词校验程序可被一个或者多个处理器执行,以实现如下步骤:
获取合同文本数据集,对所述合同文本数据集进行预处理操作,得到数值向量合同词语集;
根据预先构建的合同敏感词信息库,对所述数值向量合同词语集中的词语进行敏感词危害等级的划分;
基于所述敏感词危害等级的划分,通过匹配算法对用户输入的合同文本进行匹配,直至匹配的敏感词达到预设的危害等级时,停止匹配,完成所述合同文本的敏感词校验,并重新编辑所述合同文本。
附图说明
图1为本申请一实施例提供的基于人工智能的合同敏感词校验方法的流程示意图;
图2为本申请一实施例提供的计算机设备的内部结构示意图;
图3为本申请一实施例提供的基于人工智能的合同敏感词校验装置的模块示意图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请提供一种基于人工智能的合同敏感词校验方法。参照图1所示,为本申请一实施例提供的基于人工智能的合同敏感词校验方法的流程示意图。该方法可以由一个装置执行,该装置可以由软件和/或硬件实现。
在本实施例中,基于人工智能的合同敏感词校验方法包括:
S1、获取合同文本数据集,对所述合同文本数据集进行预处理操作,得到数值向量合同词语集。
本申请较佳实施例中,所述合同文本数据集是通对过合同文本进行组合产生的,其中,模块。
进一步地,由于所述合同文本属于非结构化或半结构化数据,无法直接被分类算法识别,较佳地,本申请较佳实施例通过对所述合同文本数据集进行预处理操作,将所述合同文本数据集转化为数值向量合同词语集。其中,所述预处理操作包括去重、分词、去停用词以及权重计算。详细地,所述预处理操作具体实施步骤为:
a.去重:
当所述合同文本数据集存在重复的合同文本时,会降低合同文本分类的精度,因此,本申请较佳实施例首先对所述文本数据集执行去重操作。
优选地,本申请通过欧式距离公式对所述合同文本数据集进行去重操作,其中,所述欧式距离公式如下:
Figure PCTCN2020112337-appb-000001
其中,d表示所述合同文本数据集之间的距离,w 1j和w 2j分别为任意2个合同文本数据,当两个合同文本数据之间的距离小于预设距离阈值,则删除其中一个合同文本数据。优选地,本申请预设所述距离阈值为0.1。
b.分词:
本申请通过预设的策略将所述合同文本数据集中的词语与预设的词典中的词条进行匹配,得到所述合同文本数据集的特征词,并将所述特征词用空格符号隔开。优选地,本 申请较佳实施例中,所述预设的词典包含统计词典和前缀词典。所述统计词典是由统计方法得到的所有可能的分词构造的词典。所述统计词典统计相邻字在语料库中贡献的频度并计算互信息,当所述相邻字互相出现信息大于预设的阈值时,即认定为构成词,优选地,本申请所述阈值为0.6。所述前缀词典包括所述统计词典中每一个分词的前缀,例如所述统计词典中的词“中国平安”的前缀分别是“中”、“中国”、“中国平”;词“平安”的前缀是“国”等。本申请利用所述统计词典得到的所述合同文本数据集可能的分词结果,并通过所述前缀词典根据分词的切分位置,得到最终的切分形式,从而得到所述合同文本数据集的特征词。
c.去停用词:
所述停用词是文本功能词中没有什么实际意义的词,对文本的分类没有什么影响,但是出现频率高,于是,会降低文本分类,其中所述停用词包括常用的代词、介词等。例如,所述停用词可以为“的”、“在”、“不过”以及“了”等等。本申请通过预先构建好的停用词表与分词后的所述合同文本数据集中词语进行一一匹配,其中,当分词后的所述合同文本数据集中的特征词与所述停用词表匹配成功时,将所述匹配成功的特征词过滤,当分词后的所述合同文本数据集中的特征词与所述停用词表匹配不成功时,将所述匹配不成功的词语保留。其中,所述预先构建好的停用词表通过网页下载得到。
d.权重计算:
本申请通过构建依存关系图计算去停用词后的所述合同文本数据集的特征词之间的关联强度,通过所述关联强度计算去停用词后的所述合同文本数据集的特征词的重要度得分,得到去停用词后的所述合同文本数据集的特征词的权重。详细地,所述计算所述特征词的重要度得分包括:
计算去停用词后的所述合同文本数据集的特征词中任意两个特征词W i和W j的依存关联度:
Figure PCTCN2020112337-appb-000002
其中,Dep(W i,W j)表示所述特征词W i和W j的依存关联度,len(W i,W j)表示所述特征词W i和W j之间的依存路径长度,b是超参数;
计算去停用词后的所述合同文本数据集的特征词W i和W j的引力:
Figure PCTCN2020112337-appb-000003
其中,f grav(W i,W j)表示特征词W i和W j的引力,tfidf(W i)表示特征词W i的TF-IDF值,tfidf(W j)表示特征词W j的TF-IDF值,TF表示词频,IDF表示逆文档频率指数,d是特征词W i和W j的词向量之间的欧式距离;
根据计算出的所述依存关联度和所述引力得到所述特征词W i和W j之间的关联强度为:
weight(W i,W j)=Dep(W i,W j)*f grav(W i,W j)
建立无向图G=(V,E),其中V是顶点的集合,E是边的集合;
根据所述关联强度计算出所述特征词W i的重要度得分:
Figure PCTCN2020112337-appb-000004
其中,
Figure PCTCN2020112337-appb-000005
是与顶点W i有关的集合,η为阻尼系数。
根据所述特征词重要度得分,得到所述特征词权重,从而将所述特征词表示成数值向量形式,得到所述数值向量合同词语集。
S2、根据预先构建的合同敏感词信息库,对所述数值向量合同词语集中进行敏感词危害等级的划分。
本申请较佳实施例中,所述合同敏感词信息库中的敏感词通过以下三种种方式获取: 方式一、接收用户输入的合同敏感词;方式二、通过关键词从搜索引擎中下载得到合同敏感词;和/或方式三、从专业合同网站进行爬取得到合同敏感词;较佳地,本申请通过网络本体语言(Ontology Web Language,OWL)对得到的所述合同敏感词信息库中的敏感词进行编译,完成所述合同敏感词信息库的构建。
进一步地,本申请优先地对合同敏感词进行分类,其中所述合同敏感词分类包括:1)不文明用语,包括各种脏字;2)不和谐用语,包括各种政府部门名称以及各种反动词汇;3)不整洁用语,包括各种儿童禁忌;4)在不同语义下意思完全相反的词语;5)在合同开发过程中,需要标记的词语等。
较佳地,本申请根据所述敏感词关联信息库以及所述合同敏感词的分类对所述数值向量合同词语集进行危害等级的划分。详细地,本申请较佳实施例中,所述敏感词的危害等级依次划分为Ⅰ、Ⅱ、Ⅲ三种等级(危害等性由高到低),其中,属于上述方面1)、2)的敏感词,其危害等级划为Ⅰ;属于上述方面3)的敏感词,其危害等级划为Ⅱ;属于上述方面4)、5)的敏感词,其危害等级划为Ⅲ。
S3、基于所述敏感词危害等级的划分,通过匹配算法对用户输入的合同文本进行匹配,直至匹配的敏感词达到预设的危害等级时,停止匹配,完成所述合同文本的敏感词校验并重新编辑所述合同文本。
本申请较佳实施例中,所述匹配算法包括Wu-Manber算法,简称WM算法。其中,所述WM算法通过使用散列表选择模式串集合中的一个子集与当前文本进行完全匹配,包括:SHIFT、HASH以及PREFIX三个表。通过所述SHIFT表识别所述用户输入的合同文本中的字符串跳过的字符数,根据所述HASH表和PREFIx表对所述字符数进行判断后决定所述用户输入的合同文本中的字符串匹配候选模式,并验证哪个候选模式完全匹配,并使用能够完全匹配的候选模式进行合同文本的匹配操作。例如:对于x=x1…xB的字符串,通过hash函数映射得到一个索引值index,以该索引值index作为偏移得到SHIFT表中的值,所述SHIFT表中的值决定读到当前字符串x后可以跳过的字符数;设当前比较的字符串x的hash值为h,如果SHIFT[h]=0,说明可能产生了匹配,于是,用所述h值作为索引,查HASH表找到HASH[h],所述HASH[h]存储的是指针,分别指向模式链表和PREFIx表两个单独的表。
较佳地,本申请接收用户输入的合同文本,利用所述WM算法进行匹配查找,当匹配查找到敏感词时,根据上述敏感词的相应危害等级的划分,从而得知此合同相应的危害等级。直至匹配的敏感词达到所述危害等级Ⅰ或Ⅱ时,停止匹配,并重新编辑所述合同文本,完成所述合同文本的敏感词校验。例如:对于合同文本目标串target,假设游标i,模式前缀长度m,字符快长度B,前缀长度C。本申请取target[i-B+1...i],查找其在SHIFT表中的对应值SHIFT[target[i-B+1...i]],如果查找不到,则i+=m-B+1,如果其值为c(c!=0),进行i+=c,再执行上述操作。如果其SHIFT值等于0,则需要取出target[i-m+1...i-m+C],在SHIFT[de]=0对应PREFIX结合中查找PREFIX[target[i-m+1...i-m+C]],如果查找不到,则将游标i+=1;如果查找到,则用target[i-m+1]开始的子串,依次匹配满足条件的所有模式串,直到找到匹配位置,终止匹配,基于上述所建立敏感词关联信息,得出所述合同文本相应危害等级。
进一步地,本申请还包括预设当收到五个Ⅲ级危害性等级词汇,便得到一个Ⅱ级危害性等级词汇,当收到二个Ⅱ级危害性等级词汇,便会生成一个Ⅰ级危害性等级敏感词汇的规则,基于所述规则,当危害等级达到Ⅰ或Ⅱ危害等级时,终止匹配并重新对所述合同文本数据进行编辑。
发明还提供一种计算机设备。参照图2所示,为本申请一实施例提供的计算机设备的内部结构示意图。
在本实施例中,所述基于人工智能的计算机设备1可以是PC(Personal Computer,个 人电脑),或者是智能手机、平板电脑、便携计算机等终端设备,也可以是一种服务器等。该计算机设备1至少包括存储器11、处理器12,通信总线13,以及网络接口14。
其中,存储器11至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、磁性存储器、磁盘、光盘等。存储器11在一些实施例中可以是计算机设备1的内部存储单元,例如该计算机设备1的硬盘。存储器11在另一些实施例中也可以是计算机设备1的外部存储设备,例如计算机设备1上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,存储器11还可以既包括计算机设备1的内部存储单元也包括外部存储设备。存储器11不仅可以用于存储安装于计算机设备1的应用软件及各类数据,例如基于人工智能的合同敏感词校验程序01的代码等,还可以用于暂时地存储已经输出或者将要输出的数据。
处理器12在一些实施例中可以是一中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器或其他数据处理芯片,用于运行存储器11中存储的程序代码或处理数据,例如执行基于人工智能的合同敏感词校验程序01等。
通信总线13用于实现这些组件之间的连接通信。
网络接口14可选的可以包括标准的有线接口、无线接口(如WI-FI接口),通常用于在该计算机设备1与其他电子设备之间建立通信连接。
可选地,该计算机设备1还可以包括用户接口,用户接口可以包括显示器(Display)、输入单元比如键盘(Keyboard),可选的用户接口还可以包括标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在计算机设备1中处理的信息以及用于显示可视化的用户界面。
图2仅示出了具有组件11-14以及基于人工智能的合同敏感词校验程序01的计算机设备1,本领域技术人员可以理解的是,图1示出的结构并不构成对计算机设备1的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。
在图2所示的计算机设备1实施例中,存储器11中存储有基于人工智能的合同敏感词校验程序01;处理器12执行存储器11中存储的基于人工智能的合同敏感词校验程序01时实现如下步骤:
步骤一、获取合同文本数据集,对所述合同文本数据集进行预处理操作,得到数值向量合同词语集。
本申请较佳实施例中,所述合同文本数据集是通对过合同文本进行组合产生的,其中,所述合同文本通过以下两种方式获取:方式一、从各大企业数据库中获取得到;方式二、通过从语料库中搜索关键字获取。
进一步地,由于所述合同文本属于非结构化或半结构化数据,无法直接被分类算法识别,较佳地,本申请较佳实施例通过对所述合同文本数据集进行预处理操作,将所述合同文本数据集转化为数值向量合同词语集。其中,所述预处理操作包括去重、分词、去停用词以及权重计算。详细地,所述预处理操作具体实施步骤为:
a.去重:
当所述合同文本数据集存在重复的合同文本时,会降低合同文本分类的精度,因此,本申请较佳实施例首先对所述文本数据集执行去重操作。
优选地,本申请通过欧式距离公式对所述合同文本数据集进行去重操作,其中,所述欧式距离公式如下:
Figure PCTCN2020112337-appb-000006
其中,d表示所述合同文本数据集之间的距离,w 1j和w 2j分别为任意2个合同文本数据,当两个合同文本数据之间的距离小于预设距离阈值,则删除其中一个合同文本数据。优选地,本申请预设所述距离阈值为0.1。
b.分词:
本申请通过预设的策略将所述合同文本数据集中的词语与预设的词典中的词条进行匹配,得到所述合同文本数据集的特征词,并将所述特征词用空格符号隔开。优选地,本申请较佳实施例中,所述预设的词典包含统计词典和前缀词典。所述统计词典是由统计方法得到的所有可能的分词构造的词典。所述统计词典统计相邻字在语料库中贡献的频度并计算互信息,当所述相邻字互相出现信息大于预设的阈值时,即认定为构成词,优选地,本申请所述阈值为0.6。所述前缀词典包括所述统计词典中每一个分词的前缀,例如所述统计词典中的词“中国平安”的前缀分别是“中”、“中国”、“中国平”;词“平安”的前缀是“国”等。本申请利用所述统计词典得到的所述合同文本数据集可能的分词结果,并通过所述前缀词典根据分词的切分位置,得到最终的切分形式,从而得到所述合同文本数据集的特征词。
c.去停用词:
所述停用词是文本功能词中没有什么实际意义的词,对文本的分类没有什么影响,但是出现频率高,于是,会降低文本分类,其中所述停用词包括常用的代词、介词等。例如,所述停用词可以为“的”、“在”、“不过”以及“了”等等。本申请通过预先构建好的停用词表与分词后的所述合同文本数据集中词语进行一一匹配,其中,当分词后的所述合同文本数据集中的特征词与所述停用词表匹配成功时,将所述匹配成功的特征词过滤,当分词后的所述合同文本数据集中的特征词与所述停用词表匹配不成功时,将所述匹配不成功的词语保留。其中,所述预先构建好的停用词表通过网页下载得到。
d.权重计算:
本申请通过构建依存关系图计算去停用词后的所述合同文本数据集的特征词之间的关联强度,通过所述关联强度计算去停用词后的所述合同文本数据集的特征词的重要度得分,得到去停用词后的所述合同文本数据集的特征词的权重。详细地,所述计算所述特征词的重要度得分包括:
计算去停用词后的所述合同文本数据集的特征词中任意两个特征词W i和W j的依存关联度:
Figure PCTCN2020112337-appb-000007
其中,Dep(W i,W j)表示所述特征词W i和W j的依存关联度,len(W i,W j)表示所述特征词W i和W j之间的依存路径长度,b是超参数;
计算去停用词后的所述合同文本数据集的特征词W i和W j的引力:
Figure PCTCN2020112337-appb-000008
其中,f grav(W i,W j)表示特征词W i和W j的引力,tfidf(W i)表示特征词W i的TF-IDF值,tfidf(W j)表示特征词W j的TF-IDF值,TF表示词频,IDF表示逆文档频率指数,d是特征词W i和W j的词向量之间的欧式距离;
根据计算出的所述依存关联度和所述引力得到所述特征词W i和W j之间的关联强度为:
weight(W i,W j)=Dep(W i,W j)*f grav(W i,W j)
建立无向图G=(V,E),其中V是顶点的集合,E是边的集合;
根据所述关联强度计算出所述特征词W i的重要度得分:
Figure PCTCN2020112337-appb-000009
其中,
Figure PCTCN2020112337-appb-000010
是与顶点W i有关的集合,η为阻尼系数。
根据所述特征词重要度得分,得到所述特征词权重,从而将所述特征词表示成数值向量形式,得到所述数值向量合同词语集。
步骤二、根据预先构建的合同敏感词信息库,对所述数值向量合同词语集中进行敏感词危害等级的划分。
本申请较佳实施例中,所述合同敏感词信息库中的敏感词通过以下三种种方式获取:方式一、接收用户输入的合同敏感词;方式二、通过关键词从搜索引擎中下载得到合同敏感词;和/或方式三、从专业合同网站进行爬取得到合同敏感词;较佳地,本申请通过网络本体语言(Ontology Web Language,OWL)对得到的所述合同敏感词信息库中的敏感词进行编译,完成所述合同敏感词信息库的构建。
进一步地,本申请优先地对合同敏感词进行分类,其中所述合同敏感词分类包括:1)不文明用语,包括各种脏字;2)不和谐用语,包括各种政府部门名称以及各种反动词汇;3)不整洁用语,包括各种儿童禁忌;4)在不同语义下意思完全相反的词语;5)在合同开发过程中,需要标记的词语等。
较佳地,本申请根据所述敏感词关联信息库以及所述合同敏感词的分类对所述数值向量合同词语集进行危害等级的划分。详细地,本申请较佳实施例中,所述敏感词的危害等级依次划分为Ⅰ、Ⅱ、Ⅲ三种等级(危害等性由高到低),其中,属于上述方面1)、2)的敏感词,其危害等级划为Ⅰ;属于上述方面3)的敏感词,其危害等级划为Ⅱ;属于上述方面4)、5)的敏感词,其危害等级划为Ⅲ。
步骤三、基于所述敏感词危害等级的划分,通过匹配算法对用户输入的合同文本进行匹配,直至匹配的敏感词达到预设的危害等级时,停止匹配,完成所述合同文本的敏感词校验并重新编辑所述合同文本。
本申请较佳实施例中,所述匹配算法包括Wu-Manber算法,简称WM算法。其中,所述WM算法通过使用散列表选择模式串集合中的一个子集与当前文本进行完全匹配,包括:SHIFT、HASH以及PREFIX三个表。通过所述SHIFT表识别所述用户输入的合同文本中的字符串跳过的字符数,根据所述HASH表和PREFIx表对所述字符数进行判断后决定所述用户输入的合同文本中的字符串匹配候选模式,并验证哪个候选模式完全匹配,并使用能够完全匹配的候选模式进行合同文本的匹配操作。例如:对于x=x1…xB的字符串,通过hash函数映射得到一个索引值index,以该索引值index作为偏移得到SHIFT表中的值,所述SHIFT表中的值决定读到当前字符串x后可以跳过的字符数;设当前比较的字符串x的hash值为h,如果SHIFT[h]=0,说明可能产生了匹配,于是,用所述h值作为索引,查HASH表找到HASH[h],所述HASH[h]存储的是指针,分别指向模式链表和PREFIx表两个单独的表。
较佳地,本申请接收用户输入的合同文本,利用所述WM算法进行匹配查找,当匹配查找到敏感词时,根据上述敏感词的相应危害等级的划分,从而得知此合同相应的危害等级。直至匹配的敏感词达到所述危害等级Ⅰ或Ⅱ时,停止匹配,并重新编辑所述合同文本,完成所述合同文本的敏感词校验。例如:对于合同文本目标串target,假设游标i,模式前缀长度m,字符快长度B,前缀长度C。本申请取target[i-B+1...i],查找其在SHIFT表中的对应值SHIFT[target[i-B+1...i]],如果查找不到,则i+=m-B+1,如果其值为c(c!=0),进行i+=c,再执行上述操作。如果其SHIFT值等于0,则需要取出target[i-m+1...i-m+C],在SHIFT[de]=0对应PREFIX结合中查找PREFIX[target[i-m+1...i-m+C]],如果查找不到,则将游标i+=1;如果查找到,则用target[i-m+1]开始的子串,依次匹配满足条件的所有模式串,直到找到匹配位置,终止匹配,基于上述所建立敏感词关联信息,得出所述合同文本相应危害等级。
进一步地,本申请还包括预设当收到五个Ⅲ级危害性等级词汇,便得到一个Ⅱ级危害 性等级词汇,当收到二个Ⅱ级危害性等级词汇,便会生成一个Ⅰ级危害性等级敏感词汇的规则,基于所述规则,当危害等级达到Ⅰ或Ⅱ危害等级时,终止匹配并重新对所述合同文本数据进行编辑。
例如,参照图3所示,为本申请基于人工智能的合同敏感词校验装置一实施例中的模块示意图,该实施例中,所述基于人工智能的合同敏感词校验装置包括文本预处理模块10、等级划分模块20、匹配识别模块30示例性地:
所述文本预处理模块10用于:获取合同文本数据集,对所述合同文本数据集进行预处理操作,得到数值向量合同词语集。
所述等级划分模块20用于:根据预先构建的合同敏感词信息库,对所述数值向量合同词语集中的词语进行敏感词危害等级的划分。
所述匹配识别模块30用于基于所述敏感词危害等级的划分,通过匹配算法对用户输入的合同文本进行匹配,直至匹配的敏感词达到预设的危害等级时,停止匹配,完成所述合同文本的敏感词校验,并重新编辑所述合同文本。
上述文本预处理模块10、等级划分模块20、匹配识别模块30等模块被执行时所实现的功能或操作步骤与上述实施例大体相同,在此不再赘述。
此外,本申请实施例还提出一种计算机可读存储介质,所述计算机可读存储介质可以是非易失性,也可以是易失性,所述计算机可读存储介质上存储有基于人工智能的合同敏感词校验程序,所述基于人工智能的合同敏感词校验程序可被一个或多个处理器执行,以实现如下操作:
获取合同文本数据集,对所述合同文本数据集进行预处理操作,得到数值向量合同词语集;
根据预先构建的合同敏感词信息库,对所述数值向量合同词语集中的词语进行敏感词危害等级的划分;
基于所述敏感词危害等级的划分,通过匹配算法对用户输入的合同文本进行匹配,直至匹配的敏感词达到预设的危害等级时,停止匹配,完成所述合同文本的敏感词校验,并重新编辑所述合同文本。
本申请计算机可读存储介质具体实施方式与上述基于人工智能的合同敏感词校验装置和方法各实施例基本相同,在此不作累述。
需要说明的是,上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。并且本文中的术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、装置、物品或者方法不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、装置、物品或者方法所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、装置、物品或者方法中还存在另外的相同要素。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种基于人工智能的合同敏感词校验方法,其中,所述方法包括:
    获取合同文本数据集,对所述合同文本数据集进行预处理操作,得到数值向量合同词语集;
    根据预先构建的合同敏感词信息库,对所述数值向量合同词语集中的词语进行敏感词危害等级的划分;
    基于所述敏感词危害等级的划分,通过匹配算法对用户输入的合同文本进行匹配,直至匹配的敏感词达到预设的危害等级时,停止匹配,完成所述合同文本的敏感词校验,并重新编辑所述合同文本。
  2. 如权利要求1所述的基于人工智能的合同敏感词校验方法,其中,所述预处理操作包括去重、分词、去停用词、以及权重计算;
    其中,所述去重包括:
    利用欧式距离公式对所述合同文本数据集进行去重操作,所述欧式距离公式如下:
    Figure PCTCN2020112337-appb-100001
    其中,d表示所述合同文本数据集之间的距离,w 1j和w 2j分别为任意2个合同文本数据;
    所述分词包括:
    通过预设的策略将所述合同文本数据集与预设的词典中的词条进行匹配,得到所述合同文本数据集的特征词,并将所述特征词用空格符号隔开;
    所述去停用词包括:
    通过预先构建好的停用词表与所述合同文本数据集中的特征词进行一一匹配,其中,当所述合同文本数据集中的特征词与所述停用词表匹配成功时,将所述匹配成功的特征词过滤;及
    所述权重计算包括:
    通过构建依存关系图计算去停用词后的所述合同文本数据集的特征词之间的关联强度,并通过所述关联强度计算出去停用词后的所述合同文本数据集的特征词的重要度得分,得到去停用词后的所述合同文本数据集的特征词的权重,将去停用词后的所述合同文本数据集的特征词表示成数值向量形式,得到所述数值向量合同词语集。
  3. 如权利要求2所述的基于人工智能的合同敏感词校验方法,其中,所述计算去停用词后的所述合同文本数据集的特征词的重要度得分,包括:
    计算所述特征词中任意两个特征词W i和W j的依存关联度:
    Figure PCTCN2020112337-appb-100002
    其中,Dep(W i,W j)表示所述特征词W i和W j的依存关联度,len(W i,W j)表示所述特征词W i和W j之间的依存路径长度,b是超参数;
    计算所述特征词W i和W j的引力:
    Figure PCTCN2020112337-appb-100003
    其中,f grav(W i,W j)表示特征词W i和W j的引力,tfidf(W i)表示特征词W i的TF-IDF值,tfidf(W j)表示特征词W j的TF-IDF值,TF表示词频,IDF表示逆文档频率指数,d是特征词W i和W j的词向量之间的欧式距离;
    根据计算出的所述依存关联度和所述引力得到所述特征词W i和W j之间的关联强度为:
    weight(W i,W j)=Dep(W i,W j)*f grav(W i,W j)
    根据所述关联强度计算出所述特征词W i的重要度得分:
    Figure PCTCN2020112337-appb-100004
    其中,
    Figure PCTCN2020112337-appb-100005
    是与顶点W i有关的集合,η为阻尼系数。
  4. 如权利要求1所述的基于人工智能的合同敏感词校验方法,其中,所述预先构建的合同敏感词信息库包括:
    接收用户输入的合同敏感词;
    通过关键词从搜索引擎中下载得到合同敏感词;和/或
    从专业合同网站进行爬取得到合同敏感词;及
    通过网络本体语言对所述合同敏感词进行编译,完成所述合同敏感词信息库的构建。
  5. 如权利要求1至4中任一项所述的基于人工智能的合同敏感词校验方法,其中,所述匹配算法包括:
    通过预设的SHIFT表识别所述用户输入的合同文本中的字符串跳过的字符数,根据预设的HASH表和PREFIx表对所述字符数进行判断后决定所述用户输入的合同文本中的字符串匹配候选模式,根据决定的所述字符串匹配候选模式进行合同文本的匹配。
  6. 如权利要求1所述的基于人工智能的合同敏感词校验方法,其中,所述合同文本数据集是通对过合同文本进行组合产生的。
  7. 如权利要求6所述的基于人工智能的合同敏感词校验方法,其中,所述合同文本从各大企业数据库中获取得到和/或通过从语料库中搜索关键字获取。
  8. 一种计算机设备,其中,所述计算机设备包括存储器和处理器,所述存储器上存储有可在所述处理器上运行的基于人工智能的合同敏感词校验程序,所述基于人工智能的合同敏感词校验程序被所述处理器执行时实现如下步骤:
    获取合同文本数据集,对所述合同文本数据集进行预处理操作,得到数值向量合同词语集;
    根据预先构建的合同敏感词信息库,对所述数值向量合同词语集中的词语进行敏感词危害等级的划分;
    基于所述敏感词危害等级的划分,通过匹配算法对用户输入的合同文本进行匹配,直至匹配的敏感词达到预设的危害等级时,停止匹配,完成所述合同文本的敏感词校验,并重新编辑所述合同文本。
  9. 如权利要求8所述的计算机设备,其中,所述对所述合同文本数据集进行预处理操作,得到数值向量合同词语集,其中,所述预处理操作包括去重、分词、去停用词、以及权重计算;
    所述去重包括:
    利用欧式距离公式对所述合同文本数据集进行去重操作,所述欧式距离公式如下:
    Figure PCTCN2020112337-appb-100006
    其中,d表示所述合同文本数据集之间的距离,w 1j和w 2j分别为任意2个合同文本数据;
    所述分词包括:
    通过预设的策略将所述合同文本数据集与预设的词典中的词条进行匹配,得到所述合同文本数据集的特征词,并将所述特征词用空格符号隔开;
    所述去停用词包括:
    通过预先构建好的停用词表与所述合同文本数据集中的特征词进行一一匹配,其中,当所述合同文本数据集中的特征词与所述停用词表匹配成功时,将所述匹配成功的特征词过滤;及
    所述权重计算包括:
    通过构建依存关系图计算去停用词后的所述合同文本数据集的特征词之间的关联强度,并通过所述关联强度计算出去停用词后的所述合同文本数据集的特征词的重要度得分,得到去停用词后的所述合同文本数据集的特征词的权重,将去停用词后的所述合同文本数据集的特征词表示成数值向量形式,得到所述数值向量合同词语集。
  10. 如权利要求9所述的计算机设备,其中,所述计算去停用词后的所述合同文本数据集的特征词的重要度得分,包括:
    计算去停用词后的所述合同文本数据集的特征词中任意两个特征词W i和W j的依存关联度:
    Figure PCTCN2020112337-appb-100007
    其中,Dep(W i,W j)表示所述特征词W i和W j的依存关联度,len(W i,W j)表示所述特征词W i和W j之间的依存路径长度,b是超参数;
    计算所述特征词W i和W j的引力:
    Figure PCTCN2020112337-appb-100008
    其中,f grav(W i,W j)表示特征词W i和W j的引力,tfidf(W i)表示特征词W i的TF-IDF值,tfidf(W j)表示特征词W j的TF-IDF值,TF表示词频,IDF表示逆文档频率指数,d是特征词W i和W j的词向量之间的欧式距离;
    根据计算出的所述依存关联度和所述引力得到所述特征词W i和W j之间的关联强度为:
    weight(W i,W j)=Dep(W i,W j)*f grav(W i,W j)
    根据所述关联强度计算出所述特征词W i的重要度得分:
    Figure PCTCN2020112337-appb-100009
    其中,
    Figure PCTCN2020112337-appb-100010
    是与顶点W i有关的集合,η为阻尼系数。
  11. 如权利要求8所述的计算机设备,其中,所述预先构建的合同敏感词信息库,包括:
    接收用户输入的合同敏感词;
    通过关键词从搜索引擎中下载得到合同敏感词;和/或
    从专业合同网站进行爬取得到合同敏感词;及
    通过网络本体语言对所述合同敏感词进行编译,完成所述合同敏感词信息库的构建。
  12. 如权利要求8至11中任一项所述的计算机设备,其中,所述匹配算法包括:
    通过预设的SHIFT表识别所述用户输入的合同文本中的字符串跳过的字符数,根据预设的HASH表和PREFIx表对所述字符数进行判断后决定所述用户输入的合同文本中的字符串匹配候选模式,根据决定的所述字符串匹配候选模式进行合同文本的匹配。
  13. 如权利要求8所述的计算机设备,其中,所述合同文本数据集是通对过合同文本进行组合产生的。
  14. 一种基于人工智能的合同敏感词校验装置,其中,所述装置包括:
    文本预处理模块,用于获取合同文本数据集,对所述合同文本数据集进行预处理操作,得到数值向量合同词语集;
    等级划分模块,用于根据预先构建的合同敏感词信息库,对所述数值向量合同词语集中的词语进行敏感词危害等级的划分;
    匹配识别模块,用于基于所述敏感词危害等级的划分,通过匹配算法对用户输入的合同文本进行匹配,直至匹配的敏感词达到预设的危害等级时,停止匹配,完成所述合同文本的敏感词校验,并重新编辑所述合同文本。
  15. 一种计算机可读存储介质,其中,所述计算机可读存储介质上存储有基于人工智能的合同敏感词校验程序,所述基于人工智能的合同敏感词校验程序可被一个或者多个处理器执行,以实现如下步骤:
    获取合同文本数据集,对所述合同文本数据集进行预处理操作,得到数值向量合同词语集;
    根据预先构建的合同敏感词信息库,对所述数值向量合同词语集中的词语进行敏感词危害等级的划分;
    基于所述敏感词危害等级的划分,通过匹配算法对用户输入的合同文本进行匹配,直至匹配的敏感词达到预设的危害等级时,停止匹配,完成所述合同文本的敏感词校验,并重新编辑所述合同文本。
  16. 如权利要求15所述的计算机可读存储介质,其中,所述对所述合同文本数据集进行预处理操作,得到数值向量合同词语集,其中,所述预处理操作包括去重、分词、去停用词、以及权重计算;
    所述去重包括:
    利用欧式距离公式对所述合同文本数据集进行去重操作,所述欧式距离公式如下:
    Figure PCTCN2020112337-appb-100011
    其中,d表示所述合同文本数据集之间的距离,w 1j和w 2j分别为任意2个合同文本数据;
    所述分词包括:
    通过预设的策略将所述合同文本数据集与预设的词典中的词条进行匹配,得到所述合同文本数据集的特征词,并将所述特征词用空格符号隔开;
    所述去停用词包括:
    通过预先构建好的停用词表与所述合同文本数据集中的特征词进行一一匹配,其中,当所述合同文本数据集中的特征词与所述停用词表匹配成功时,将所述匹配成功的特征词过滤;及
    所述权重计算包括:
    通过构建依存关系图计算去停用词后的所述合同文本数据集的特征词之间的关联强度,并通过所述关联强度计算出去停用词后的所述合同文本数据集的特征词的重要度得分,得到去停用词后的所述合同文本数据集的特征词的权重,将去停用词后的所述合同文本数据集的特征词表示成数值向量形式,得到所述数值向量合同词语集。
  17. 如权利要求16所述的计算机可读存储介质,其中,所述计算去停用词后的所述合同文本数据集的特征词的重要度得分,包括:
    计算去停用词后的所述合同文本数据集的特征词中任意两个特征词W i和W j的依存关联度:
    Figure PCTCN2020112337-appb-100012
    其中,Dep(W i,W j)表示所述特征词W i和W j的依存关联度,len(W i,W j)表示所述特征词W i和W j之间的依存路径长度,b是超参数;
    计算所述特征词W i和W j的引力:
    Figure PCTCN2020112337-appb-100013
    其中,f grav(W i,W j)表示特征词W i和W j的引力,tfidf(W i)表示特征词W i的TF-IDF值,tfidf(W j)表示特征词W j的TF-IDF值,TF表示词频,IDF表示逆文档频率指数,d是特征词W i和W j的词向量之间的欧式距离;
    根据计算出的所述依存关联度和所述引力得到所述特征词W i和W j之间的关联强度为:
    weight(W i,W j)=Dep(W i,W j)*f grav(W i,W j)
    根据所述关联强度计算出所述特征词W i的重要度得分:
    Figure PCTCN2020112337-appb-100014
    其中,
    Figure PCTCN2020112337-appb-100015
    是与顶点W i有关的集合,η为阻尼系数。
  18. 如权利要求15所述的计算机可读存储介质,其中,所述预先构建的合同敏感词信息库,包括:
    接收用户输入的合同敏感词;
    通过关键词从搜索引擎中下载得到合同敏感词;和/或
    从专业合同网站进行爬取得到合同敏感词;及
    通过网络本体语言对所述合同敏感词进行编译,完成所述合同敏感词信息库的构建。
  19. 如权利要求15至17中任一项所述的计算机可读存储介质,其中,所述匹配算法包括:
    通过预设的SHIFT表识别所述用户输入的合同文本中的字符串跳过的字符数,根据预设的HASH表和PREFIx表对所述字符数进行判断后决定所述用户输入的合同文本中的字符串匹配候选模式,根据决定的所述字符串匹配候选模式进行合同文本的匹配。
  20. 如权利要求15所述的计算机可读存储介质,其中,所述合同文本数据集是通对过合同文本进行组合产生的。
PCT/CN2020/112337 2019-09-16 2020-08-30 基于人工智能的合同敏感词校验方法、装置、计算机设备及存储介质 WO2021052148A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910878460.7 2019-09-16
CN201910878460.7A CN110765761A (zh) 2019-09-16 2019-09-16 基于人工智能的合同敏感词校验方法、装置及存储介质

Publications (1)

Publication Number Publication Date
WO2021052148A1 true WO2021052148A1 (zh) 2021-03-25

Family

ID=69330580

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/112337 WO2021052148A1 (zh) 2019-09-16 2020-08-30 基于人工智能的合同敏感词校验方法、装置、计算机设备及存储介质

Country Status (2)

Country Link
CN (1) CN110765761A (zh)
WO (1) WO2021052148A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117236328A (zh) * 2023-11-10 2023-12-15 深圳市泰铼科技有限公司 基于数据分析的金融文本智能核查系统

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110765761A (zh) * 2019-09-16 2020-02-07 平安科技(深圳)有限公司 基于人工智能的合同敏感词校验方法、装置及存储介质
CN111368521B (zh) * 2020-02-29 2023-04-07 重庆百事得大牛机器人有限公司 用于法律顾问服务的管理方法
CN112926301B (zh) * 2020-12-28 2023-02-14 广州坚和网络科技有限公司 基于敏感词库构建的敏感词监控方法及装置
CN113450196A (zh) * 2021-06-29 2021-09-28 上海至贤工程管理咨询有限公司 一种建设工程具有大数据分析功能的在线招投标管理系统
CN113779065A (zh) * 2021-08-23 2021-12-10 深圳价值在线信息科技股份有限公司 数据比对的验证方法、装置、终端设备及介质
CN115456589A (zh) * 2022-09-19 2022-12-09 国网河南省电力公司信息通信公司 一种基于深度学习的合同审核方法和装置
CN117592088B (zh) * 2024-01-18 2024-03-29 青岛闪收付信息技术有限公司 一种电子合同文本敏感数据信息优化处理方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106055541A (zh) * 2016-06-29 2016-10-26 清华大学 一种新闻内容敏感词过滤方法及系统
US20160321243A1 (en) * 2014-01-10 2016-11-03 Cluep Inc. Systems, devices, and methods for automatic detection of feelings in text
CN109766441A (zh) * 2018-12-28 2019-05-17 北京奇安信科技有限公司 文本分类方法、装置及系统
CN110177182A (zh) * 2019-04-15 2019-08-27 中国平安人寿保险股份有限公司 敏感数据处理方法、装置、计算机设备及存储介质
CN110765761A (zh) * 2019-09-16 2020-02-07 平安科技(深圳)有限公司 基于人工智能的合同敏感词校验方法、装置及存储介质

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110032632A (zh) * 2019-04-04 2019-07-19 平安科技(深圳)有限公司 基于文本相似度的智能客服问答方法、装置及存储介质
CN110196893A (zh) * 2019-05-05 2019-09-03 平安科技(深圳)有限公司 基于文本相似度的非主观题阅卷方法、装置及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160321243A1 (en) * 2014-01-10 2016-11-03 Cluep Inc. Systems, devices, and methods for automatic detection of feelings in text
CN106055541A (zh) * 2016-06-29 2016-10-26 清华大学 一种新闻内容敏感词过滤方法及系统
CN109766441A (zh) * 2018-12-28 2019-05-17 北京奇安信科技有限公司 文本分类方法、装置及系统
CN110177182A (zh) * 2019-04-15 2019-08-27 中国平安人寿保险股份有限公司 敏感数据处理方法、装置、计算机设备及存储介质
CN110765761A (zh) * 2019-09-16 2020-02-07 平安科技(深圳)有限公司 基于人工智能的合同敏感词校验方法、装置及存储介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117236328A (zh) * 2023-11-10 2023-12-15 深圳市泰铼科技有限公司 基于数据分析的金融文本智能核查系统
CN117236328B (zh) * 2023-11-10 2024-01-30 深圳市泰铼科技有限公司 基于数据分析的金融文本智能核查系统

Also Published As

Publication number Publication date
CN110765761A (zh) 2020-02-07

Similar Documents

Publication Publication Date Title
WO2021052148A1 (zh) 基于人工智能的合同敏感词校验方法、装置、计算机设备及存储介质
WO2019184217A1 (zh) 热点事件分类方法、装置及存储介质
US11030199B2 (en) Systems and methods for contextual retrieval and contextual display of records
WO2020140373A1 (zh) 一种意图识别方法、识别设备及计算机可读存储介质
US9104979B2 (en) Entity recognition using probabilities for out-of-collection data
CN107168954B (zh) 文本关键词生成方法及装置和电子设备及可读存储介质
US9798776B2 (en) Systems and methods for parsing search queries
US8983826B2 (en) Method and system for extracting shadow entities from emails
WO2019037258A1 (zh) 信息推荐的装置、方法、系统及计算机可读存储介质
US9251289B2 (en) Matching target strings to known strings
WO2022148055A1 (zh) 一种文件检索方法及计算设备
WO2012142553A2 (en) Identifying query formulation suggestions for low-match queries
CN109299235B (zh) 知识库搜索方法、装置及计算机可读存储介质
CN110309251B (zh) 文本数据的处理方法、装置和计算机可读存储介质
WO2020258481A1 (zh) 个性化文本智能推荐方法、装置及计算机可读存储介质
WO2021051934A1 (zh) 基于人工智能的合同关键条款提取方法、装置及存储介质
WO2022105497A1 (zh) 文本筛选方法、装置、设备及存储介质
CA2809021C (en) Systems and methods for lexicon generation
CN111325033A (zh) 实体识别方法、装置、电子设备及计算机可读存储介质
JP2011090463A (ja) 文書検索システム、情報処理装置およびプログラム
CN114491056A (zh) 数字警务场景下的改进poi搜索的方法和系统
CN113268987B (zh) 一种实体名称识别方法、装置、电子设备和存储介质
CN110083679B (zh) 搜索请求的处理方法、装置、电子设备和存储介质
CN117216217B (zh) 一种档案智能分类与检索方法
CN116610782B (zh) 文本检索方法、装置、电子设备及介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20866230

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20866230

Country of ref document: EP

Kind code of ref document: A1