WO2021159655A1 - 数据属性填充方法、装置、设备及计算机可读存储介质 - Google Patents

数据属性填充方法、装置、设备及计算机可读存储介质 Download PDF

Info

Publication number
WO2021159655A1
WO2021159655A1 PCT/CN2020/098768 CN2020098768W WO2021159655A1 WO 2021159655 A1 WO2021159655 A1 WO 2021159655A1 CN 2020098768 W CN2020098768 W CN 2020098768W WO 2021159655 A1 WO2021159655 A1 WO 2021159655A1
Authority
WO
WIPO (PCT)
Prior art keywords
question data
answered
data
attribute
initial question
Prior art date
Application number
PCT/CN2020/098768
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 WO2021159655A1 publication Critical patent/WO2021159655A1/zh

Links

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/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • 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/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • 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

  • This application relates to the field of artificial intelligence technology, and in particular to a data attribute filling method, device, equipment, and computer-readable storage medium.
  • the inventor realizes that filling the attributes of the data generally adopts literal similar clustering, which is not suitable for the scene of large-scale dialogue log mining with multiple knowledge owners, and the corresponding knowledge attributes cannot be supplemented in batches with one operation. Instead, it is necessary to manually set attributes for the questions raised by users, which takes a long time, is error-prone, and the attribute filling efficiency is low. How to efficiently and automatically fill the attributes of the data in the big data scenario is an urgent need in the current field Technical problems solved.
  • the main purpose of this application is to provide a data attribute filling method, device, equipment, and computer-readable storage medium, aiming to solve the technical problem of low data attribute filling efficiency.
  • the present application provides a data attribute filling method, which includes the following steps: predicting the initial question data to be answered through a preset model set to obtain a target prediction result; based on the target prediction result , Obtain the knowledge owner to which the initial question data to be answered belongs, and determine the knowledge base corresponding to the initial question data according to the knowledge owner; calculate the initial question data in the knowledge base and Comprehensive similarity between historical question data; determine whether the similarity is greater than or equal to a first preset threshold; if the similarity is greater than or equal to the first preset threshold, input the initial question data to be answered in advance
  • the present application also provides a data attribute filling device, which includes a memory, a processor, and a data attribute filling device that is stored in the memory and can run on the processor.
  • the highest weighted question data is the question data, and the rest are similar question data.
  • V is the node set
  • E is the edge set
  • the question data is data that has a similar relationship with the question data; it is judged whether the matching degree between the attribute of the historical question data in the knowledge base and the clustering result is greater than or equal to the second preset threshold; if the knowledge base If the degree of matching between the attribute of the historical question data in and the clustering result is greater than or equal to a second preset threshold, the attribute of the clustering result is determined, and the attribute is used to fill the clustering result with the attribute.
  • the present application also provides a computer-readable storage medium having a data attribute filling program stored on the computer-readable storage medium, and the data attribute filling program is executed by a processor to achieve any of the above
  • One of the steps of the data attribute filling method implements the following steps: predict the initial question data to be answered through a preset model set to obtain a target prediction result; and obtain the initial response to be answered based on the target prediction result
  • This application can achieve the purpose of quickly filling attributes of data.
  • FIG. 1 is a schematic structural diagram of the operating environment of the data attribute filling device involved in the solution of the embodiment of the application.
  • Fig. 2 is a schematic flowchart of a first embodiment of a method for filling data attributes of this application.
  • FIG. 3 is a schematic flowchart of a second embodiment of a method for filling data attributes of this application.
  • FIG. 4 is a detailed flowchart of an embodiment of step S103 in FIG. 3.
  • FIG. 5 is a detailed flowchart of an embodiment of step S102 in FIG. 3.
  • FIG. 6 is a detailed flowchart of an embodiment of step S10 in FIG. 2.
  • FIG. 7 is a detailed flowchart of an embodiment of step S70 in FIG. 2.
  • FIG. 8 is a detailed flowchart of an embodiment of step S30 in FIG. 2.
  • FIG. 9 is a schematic diagram of functional modules of an embodiment of the data attribute filling device of this application.
  • the technical solution of the present application can be applied to the field of artificial intelligence technology, and can be based on clustering analysis of problem data to realize rapid filling of attributes of data.
  • This application provides a data attribute filling device.
  • FIG. 1 is a schematic structural diagram of the operating environment of the data attribute filling device involved in the solution of the embodiment of the application.
  • the data attribute filling device includes: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005.
  • the communication bus 1002 is used to implement connection and communication between these components.
  • the user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard), and the network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
  • the memory 1005 can be a high-speed RAM memory or a stable memory (non-volatile memory), such as disk storage.
  • the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
  • the hardware structure of the data attribute filling device shown in FIG. 1 does not constitute a limitation on the data attribute filling device, and may include more or less components than shown in the figure, or a combination of certain components, Or different component arrangements.
  • the memory 1005 which is a computer-readable storage medium, may include an operating system, a network communication module, a user interface module, and a data attribute filling program.
  • the operating system is a program that manages and controls data attribute filling equipment and software resources, and supports the operation of data attribute filling programs and other software and/or programs.
  • the network interface 1004 is mainly used to access the network; the user interface 1003 is mainly used to detect confirmation instructions and edit instructions.
  • the processor 1001 may be used to call a data attribute filling program stored in the memory 1005, and execute operations of the following data attribute filling methods.
  • FIG. 2 is a schematic flowchart of a first embodiment of a method for filling data attributes of this application.
  • the data attribute filling method includes the following steps.
  • Step S10 Predict the initial question data to be answered through the preset model set to obtain the target prediction result.
  • the pre-trained prediction model in the preset model set is used to predict the initial data to be answered, and the question data to be answered is predicted through the preset model set to obtain the effective class prediction result, for example, the preset model
  • the set may include: the language representation bert model and the text classification textcnn model, and then use different models to predict the initial response data to obtain the prediction result.
  • the prediction result may be that the initial response data belongs to the gossip category or the effective category.
  • Step S20 based on the target prediction result, obtain the knowledge owner to which the initial question data to be answered belongs, and determine the knowledge base corresponding to the initial question data to be answered according to the knowledge owner.
  • the nature and relationship of things are called attributes of things.
  • the insurance amount, insurance policy number, and applicant can be classified as "insurance”.
  • the initial question data to be answered belongs to
  • the knowledge owner refers to the classification of the predicted initial data to be answered.
  • different knowledge bases with different classifications have been set up in advance, and the knowledge base is between the initial data to be answered with different knowledge owners
  • There is a mapping relationship so after obtaining the knowledge owner to which the initial question data belongs, the initial question data to be answered can be dispatched to the corresponding knowledge base according to the mapping relationship.
  • Step S30 Calculate the comprehensive similarity between the initial question data to be answered and the historical question data in the knowledge base.
  • the degree of similarity is calculated.
  • the purpose is to obtain other data that has an approximate relationship with the current initial question data to be answered.
  • Other data can include literal similarity.
  • the current initial question data to be answered repeatedly appears "insurance”
  • the corresponding knowledge base also The existence of a piece of historical problem data that has "insurance" multiple times indicates that there is a certain degree of similarity between the two pieces of data.
  • a preset similarity algorithm can be used to calculate, for example, word frequency- Inverse file frequency.
  • Step S40 Determine whether the similarity is greater than or equal to a first preset threshold.
  • the value of the first preset threshold is not limited, for example, it may be 90%.
  • V is a node set
  • E is an edge set
  • the point is the data of each initial question to be answered
  • the edge is the similarity of the data of each initial question to be answered.
  • the point with the largest degree in the graph, that is, the point with the most central position, is used as the representative, that is, the historical question. Data, the degree here is the weight of each point.
  • Step S60 It is judged whether the matching degree between the attribute of the historical question data in the knowledge base and the clustering result is greater than or equal to a second preset threshold.
  • the clustering result and the attribute of the historical question data may be a one-to-one mapping relationship, or may be a one-to-many mapping relationship, and these mapping relationships are all preset.
  • Step S70 If the matching degree between the attribute of the historical question data in the knowledge base and the clustering result is greater than or equal to the second preset threshold, the attribute of the clustering result is determined, and the attribute is used to fill the clustering result with attributes.
  • one knowledge owner corresponds to one knowledge base; there are multiple historical question data under one knowledge base, and the historical question data has different attributes.
  • the attributes of the historical question data in the knowledge base match the clustering results If it is greater than or equal to the second preset threshold, the attributes of the historical question can be filled into the clustering results.
  • the specific filling method is to create a table of attributes to be filled in advance. When the matching degree is greater than or equal to the second preset threshold, the The corresponding attribute is mapped to the attribute table to be filled.
  • the problem data set is clustered through the graph, and the problem data and the similar problem data are separated.
  • the problem data and the similar problem data have the same attributes, and each attribute has a corresponding relationship with the corresponding knowledge base. Different data is stored according to the attributes.
  • the attribute with a higher degree of matching with the clustering result is selected from the knowledge base to realize the filling of the problem attribute.
  • FIG. 3 is a schematic flowchart of a second embodiment of a method for filling data attributes of this application.
  • the initial question data to be answered is predicted through the preset model set, and before the target prediction result is obtained, the data attribute filling method includes the following steps.
  • Step S80 removing punctuation marks in the first initial question data set to be answered by regular expressions to obtain a second initial question data set to be answered.
  • the punctuation marks in the question data are removed by regular expressions to obtain the punctuation removal question data.
  • step S90 synonym conversion is performed on the second initial question data set to be answered by a preset synonym conversion method to obtain a third initial question data set to be answered.
  • step S100 the library function is called to perform literal de-duplication processing on the third initial question data set to be answered to obtain a target question data set to be answered.
  • the target question data set to be answered includes at least one initial question data to be answered.
  • a deduplication action is performed through a library function to obtain literal deduplication problem data.
  • the library function refers to a way of putting functions in a library for use. The method is to compile some commonly used functions and put them in a file for calling.
  • FIG. 4 is a detailed flowchart of an embodiment of step S103 in FIG. 3.
  • the library function is called to perform literal deduplication processing on the third initial question data set to be answered to obtain the target question data set to be answered.
  • the target question data set to be answered includes at least one initial question data to be answered, including The following steps.
  • Step S1001 Sort each third initial question data set in the third initial question data set according to the sentence length by calling the quick sort algorithm in the library function to obtain the sorted third initial question data set.
  • the data to be sorted is divided into two independent parts by sorting, and all the data lengths of one part are smaller than all the data lengths of the other part, and then the two parts of the data are quickly processed separately according to this method. Sorting, the entire sorting process can be carried out recursively, so that the entire data can be turned into an ordered sequence.
  • Step S1002 traverse the sorted third initial question data set to be answered, clear the repeated words, and obtain the target question data set to be answered.
  • the two parts of the sorted data can be traversed at the same time, so that it can identify whether there are duplicate words in time, and if there are duplicate words, remove them to get the problem of literal de-duplication.
  • Data that is, the initial question data to be answered.
  • FIG. 5 is a detailed flowchart of an embodiment of step S102 in FIG. 3.
  • step S90 synonym conversion is performed on the second initial question data set to be answered by a preset synonym conversion method to obtain the third initial question data set to be answered, including the following steps.
  • Step S901 Perform word segmentation on the second initial question data set to be answered to obtain word segmentation data.
  • word segmentation can be performed on the data of the punctuation removal problem by stuttering word segmentation to obtain word segmentation data.
  • Step S902 Obtain the feature vector of the word segmentation data, and calculate the cosine angle value between the feature vector and the feature vector of each word in the preset dictionary.
  • the word segmentation data is first converted into a feature vector form, and then a cosine formula is used to calculate the cosine included angle value between the feature vectors.
  • a cosine formula is used to calculate the cosine included angle value between the feature vectors. The smaller the cosine included angle value, the more similar the feature vectors are.
  • Step S903 It is judged whether the cosine included angle value is less than the preset included angle value.
  • Step S904 If the cosine included angle value is less than the preset included angle value, then synonymous data of each word in the preset dictionary is obtained, and the synonymous data is formed into the third initial question data set to be answered. If the cosine included angle value is greater than If it is equal to the preset angle value, then return to step S903.
  • step S10 predicting the initial question data to be answered through the preset model set, to obtain the target prediction result, includes the following steps.
  • Step S101 Predict the initial question data to be answered through the language representation bert model in the preset model set, and judge whether the initial question data to be answered belongs to a valid type.
  • the initial bert model in order to enable the language representation bert model to be problematic data, it is also necessary to train the language representation bert model before this. That is, the initial bert model is trained with the training sample data of known valid types and invalid types, until the initial bert model can accurately identify the valid types of initial question data to be answered.
  • step S102 if the initial question data to be answered belongs to the valid type, then the valid type prediction result is obtained.
  • step S101 it can be seen from step S101 that whether the initial question data to be answered is an effect type can be identified through the language representation bert model, and then the effect category prediction result can be obtained.
  • the purpose of the bert model to identify the initial question data to be answered is to distinguish all valid questions in the initial question data to be answered. For example, valid questions must belong to a certain knowledge base. If the current question is a human-machine question and answer with insurance Scenario, if the problem data of buying fruits is received, it is invalid data.
  • step S103 the initial question data to be answered is predicted through the text classification textcnn model in the preset model set, and it is judged whether the initial question data to be answered belongs to the small chat type.
  • the initial text classification model also needs to be trained to predict the type of chattering. After the training is completed, that is, after a certain accuracy rate is achieved, the initial question data to be answered can be predicted.
  • Step S104 If the initial question data to be answered belongs to the small chat type, obtain the small chat type prediction result.
  • the text categorization textcnn model is trained by pre-set chatting training samples and non-chattering training samples, so that it has the ability to recognize.
  • Voice data or sigh data are used as small chat type data.
  • Step S105 Combine the prediction result of the effective class and the prediction result of the gossip class to obtain the target prediction result.
  • the small-chat prediction result and the effective prediction result are taken as components of the effective prediction result.
  • step S70 if the matching degree between the attribute of the historical question data in the knowledge base and the clustering result is greater than or equal to
  • the second preset threshold is used to determine the attribute of the clustering result, and using the attribute to fill in the attribute of the clustering result includes the following steps.
  • step S701 if the matching degree between the attribute of the historical question data in the knowledge base and the clustering result is greater than or equal to the second preset threshold, the aggregation is obtained based on the preset mapping relationship between the attribute of the historical question data and the attribute of the clustering result.
  • the attribute set of the class result, and the attribute set of the cluster result includes at least one attribute of the cluster result.
  • Step S702 Mining frequent itemsets in the attribute set of the clustering results, and determining the attributes of the clustering results based on the frequent itemsets.
  • a big data mining platform can be used to mine the attributes that frequently appear in the attribute set of the clustering result.
  • a standard that can be used as a frequent item set can be preset. For example, if the current attribute appears three or more times, the attribute can be set as a frequent item set.
  • step S30 calculating the comprehensive similarity between the initial question data to be answered and the historical question data in the knowledge base, includes the following steps.
  • Step S301 Calculate the literal similarity between the initial question data to be answered and the historical question data in the knowledge base by word frequency-inverse document frequency TF-IDF.
  • jieba is used for word segmentation and sorted into a specified format, and then the gensim library converts the data of each question to be answered into a sparse vector through doc2bow, and then the corpus is processed by word frequency-inverse file frequency TF-IDF. Then the eigenvalues and the sparse matrix similarity are indexed, and finally the literal similarity between the data to be answered is obtained.
  • Step S302 Calculate the semantic similarity between the initial question data to be answered and the historical question data in the knowledge base through the twin network.
  • the twin network is composed of two networks.
  • the two networks have the same structure and share parameters.
  • the model is selected, and the Manhattan distance is calculated. Distance, cosine similarity, etc. are used to measure the spatial similarity between two sentences, and then the semantic similarity can be obtained.
  • Step S303 Prioritize the literal similarity and semantic similarity values respectively according to the magnitude of the similarity value to obtain the comprehensive similarity.
  • the problem data set is clustered through the graph, and the problem data and the similar problem data are separated.
  • the problem data and the similar problem data have the same attributes, and each attribute has a corresponding relationship with the corresponding knowledge base. Different data is stored according to the attributes. Go to the corresponding knowledge base, and then use the bert model to predict whether the unanswered question’s fluency is a valid sentence; use the two-classification model trained by the textcnn model to identify whether it is a small chat, and take the effective non-small chat part, followed by , Siamese network and word frequency-inverse document frequency TF-IDF respectively calculate the literal similarity and semantic similarity, and then cluster the problem data that meets the similarity, and select the attribute that matches the clustering result from the knowledge base. , To realize the filling of the attributes of the question.
  • FIG. 9 is a schematic diagram of functional modules of an embodiment of a data attribute filling device according to the present application.
  • the matching degree judgment module 60 is used to judge the relationship between the attribute of the historical question data in the knowledge base and the clustering result Whether the matching degree is greater than or equal to a second preset threshold;
  • the filling module 70 is configured to determine if the matching degree between the attribute of the historical question data in the knowledge base and the clustering result is greater than or equal to the second preset threshold The attribute of the clustering result, and using the attribute to fill in the attribute of the clustering result.
  • one operation can be achieved through the module in the device, and multiple attributes can be obtained, which improves the efficiency of classifying different initial question data to be answered into different attributes.
  • the application also provides a computer-readable storage medium.
  • the computer-readable storage medium may be non-volatile or volatile.
  • a data attribute filling program is stored on the computer-readable storage medium, and the data attribute filling program is executed by a processor to implement the steps of the data attribute filling method described in any of the above embodiments.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种数据属性填充方法、装置、设备及计算机可读存储介质,该方法包括以下步骤:基于目标预测结果,获取初始待应答问题数据所属的知识属主,并根据知识属主确定与初始待应答问题数据相对应的知识库(S20);计算知识库中的初始待应答问题数据和历史问题数据之间的综合相似度(S30);若相似度大于或等于第一预设阈值,则将初始待应答问题数据输入预先设置的图G=(V,E)的各个节点中,得到聚类结果(S50);若知识库中的历史问题数据的属性与聚类结果的匹配度大于或等于第二预设阈值,则确定聚类结果的属性,并采用属性对聚类结果进行属性填充(S70)。该方法提高了数据属性填充的效率。

Description

数据属性填充方法、装置、设备及计算机可读存储介质
本申请要求于2020年2月12日提交中国专利局、申请号为202010088080.6,发明名称为“数据属性填充方法、装置、设备及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及人工智能技术领域,尤其涉及一种数据属性填充方法、装置、设备及计算机可读存储介质。
背景技术
目前,发明人意识到,对数据的属性进行填充一般是采用字面相似聚类的方式,并不适用于多知识属主大规模对话日志挖掘场景,无法通过一次操作即可实现批量补充对应知识属性,而是需要通过人工的方式为用户提出的问题设置属性,耗时较长,且容易出错,且属性填充效率低下,如何在大数据场景下对数据的属性进行高效自动填充,是目前领域亟待解决的技术问题。
技术问题
本申请的主要目的在于提供一种数据属性填充方法、装置、设备及计算机可读存储介质,旨在解决数据属性填充效率低的技术问题。
技术解决方案
为实现上述目的,本申请提供一种数据属性填充方法,所述数据属性填充方法包括以下步骤:通过预置模型集对初始待应答问题数据进行预测,得到目标预测结果;基于所述目标预测结果,获取所述初始待应答问题数据所属的知识属主,并根据所述知识属主确定与所述初始待应答问题数据相对应的知识库;计算所述知识库中的初始待应答问题数据和历史问题数据之间的综合相似度;判断所述相似度是否大于或等于第一预设阈值;若所述相似度大于或等于第一预设阈值,则将所述初始待应答问题数据输入预先设置的图G=(V,E)的各个节点中,根据图中的度确定所述初始待应答问题数据的权重,并基于所述权重对所述初始待应答问题数据进行聚类处理,得到聚类结果,其中,所述聚类结果中权重最高的为问题数据,其余为相似问题数据,V为节点集合,E为边集,所述相似问题数据为与所述问题数据存在相似关系的数据;判断所述知识库中的历史问题数据的属性与所述聚类结果的匹配度是否大于或等于第二预设阈值;若所述知识库中的历史问题数据的属性与所述聚类结果的匹配度大于或等于第二预设阈值,则确定所述聚类结果的属性,并采用所述属性对所述聚类结果进行属性填充。
进一步地,为实现上述目的,本申请还提供一种数据属性填充装置,所述数据属性填充装置包括以下模块:预测模块,用于通过预置模型集对所述初始待应答问题数据进行预测,得到目标预测结果;分类模块,用于基于所述目标预测结果,获取所述初始待应答问题数据所属的知识属主,并根据所述知识属主确定与所述初始待应答问题数据相对应的知识库;识别模块,用于计算所述知识库中的初始待应答问题数据和历史问题数据之间的综合相似度;相似度判断模块,用于判断所述相似度是否大于或等于第一预设阈值;聚类模块,用于若所述相似度大于或等于第一预设阈值,则将所述初始待应答问题数据输入预先设置的图G=(V,E)的各个节点中,根据图中的度确定所述初始待应答问题数据的权重,并基于所述权重对所述初始待应答问题数据进行聚类处理,得到聚类结果,其中,所述聚类结果中权重最高的为问题数据,其余为相似问题数据,V为节点集合,E为边集,所述相似问题数据为与所述问题数据存在相似关系的数据;匹配度判断模块,用于判断所述知识库中的历史问题数据的属性与所述聚类结果的匹配度是否大于或等于第二预设阈值;填充模块,用于若所述知识库中的历史问题数据的属性与所述聚类结果的匹配度大于或等于第二预设阈值,则确定所述聚类结果的属性,并采用所述属性对所述聚类结果进行属性填充。
进一步地,为实现上述目的,本申请还提供一种数据属性填充设备,所述数据属性填充设备包括存储器、处理器以及存储在所述存储器上并可在所述处理器上运行的数据属性填充程序,所述数据属性填充程序被所述处理器执行时实现如上述任一项所述的数据属性填充方法的步骤,例如,实现以下步骤:通过预置模型集对初始待应答问题数据进行预测,得到目标预测结果;基于所述目标预测结果,获取所述初始待应答问题数据所属的知识属主,并根据所述知识属主确定与所述初始待应答问题数据相对应的知识库;计算所述知识库中的初始待应答问题数据和历史问题数据之间的综合相似度;判断所述相似度是否大于或等于第一预设阈值;若所述相似度大于或等于第一预设阈值,则将所述初始待应答问题数据输入预先设置的图G=(V,E)的各个节点中,根据图中的度确定所述初始待应答问题数据的权重,并基于所述权重对所述初始待应答问题数据进行聚类处理,得到聚类结果,其中,所述聚类结果中权重最高的为问题数据,其余为相似问题数据,V为节点集合,E为边集,所述相似问题数据为与所述问题数据存在相似关系的数据;判断所述知识库中的历史问题数据的属性与所述聚类结果的匹配度是否大于或等于第二预设阈值;若所述知识库中的历史问题数据的属性与所述聚类结果的匹配度大于或等于第二预设阈值,则确定所述聚类结果的属性,并采用所述属性对所述聚类结果进行属性填充。
进一步地,为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有数据属性填充程序,所述数据属性填充程序被处理器执行时实现如上述任一项所述的数据属性填充方法的步骤,例如,实现以下步骤:通过预置模型集对初始待应答问题数据进行预测,得到目标预测结果;基于所述目标预测结果,获取所述初始待应答问题数据所属的知识属主,并根据所述知识属主确定与所述初始待应答问题数据相对应的知识库;计算所述知识库中的初始待应答问题数据和历史问题数据之间的综合相似度;判断所述相似度是否大于或等于第一预设阈值;若所述相似度大于或等于第一预设阈值,则将所述初始待应答问题数据输入预先设置的图G=(V,E)的各个节点中,根据图中的度确定所述初始待应答问题数据的权重,并基于所述权重对所述初始待应答问题数据进行聚类处理,得到聚类结果,其中,所述聚类结果中权重最高的为问题数据,其余为相似问题数据,V为节点集合,E为边集,所述相似问题数据为与所述问题数据存在相似关系的数据;判断所述知识库中的历史问题数据的属性与所述聚类结果的匹配度是否大于或等于第二预设阈值;若所述知识库中的历史问题数据的属性与所述聚类结果的匹配度大于或等于第二预设阈值,则确定所述聚类结果的属性,并采用所述属性对所述聚类结果进行属性填充。
有益效果
本申请能够实现对数据进行快速填充属性的目的。
附图说明
图1为本申请实施例方案涉及的数据属性填充设备运行环境的结构示意图。
图2为本申请数据属性填充方法的第一实施例的流程示意图。
图3为本申请数据属性填充方法第二实施例的流程示意图。
图4为图3中步骤S103的一个实施例的细化流程示意图。
图5为图3中步骤S102的一个实施例的细化流程示意图。
图6为图2中步骤S10的一个实施例的细化流程示意图。
图7为图2中步骤S70的一个实施例的细化流程示意图。
图8为图2中步骤S30一实施例的细化流程示意图。
图9为本申请数据属性填充装置的一个实施例的功能模块示意图。
本发明的实施方式
应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。
本申请的技术方案可应用于人工智能技术领域,可基于对问题数据进行聚类分析,实现对数据进行快速填充属性。
本申请提供一种数据属性填充设备。
参照图1,图1为本申请实施例方案涉及的数据属性填充设备运行环境的结构示意图。
如图1所示,该数据属性填充设备包括:处理器1001,例如CPU,通信总线1002、用户接口1003,网络接口1004,存储器1005。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。
本领域技术人员可以理解,图1中示出的数据属性填充设备的硬件结构并不构成对数据属性填充设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
如图1所示,作为一种计算机可读存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及数据属性填充程序。其中,操作系统是管理和控制数据属性填充设备和软件资源的程序,支持数据属性填充程序以及其它软件和/或程序的运行。
在图1所示的数据属性填充设备的硬件结构中,网络接口1004主要用于接入网络;用户接口1003主要用于侦测确认指令和编辑指令等。而处理器1001可以用于调用存储器1005中存储的数据属性填充程序,并执行以下数据属性填充方法的各实施例的操作。
基于上述数据属性填充设备硬件结构,提出本申请数据属性填充方法的各个实施例。
参照图2,图2为本申请数据属性填充方法的第一实施例的流程示意图。本实施例中,数据属性填充方法包括以下步骤。
步骤S10,通过预置模型集对初始待应答问题数据进行预测,得到目标预测结果。
本实施例中,是采用预置模型集中的预先训练好的预测模型对初始待应答数据进行预测的,通过预置模型集对待应答问题数据进行预测,得到有效类预测结果,例如,预置模型集可以包括:语言表征bert模型和文本分类textcnn模型,然后采用不同的模型对初始待应答数据进行预测,从而得到预测结果,预测结果可以是初始待应答数据属于闲聊类或者是有效类。
步骤S20,基于目标预测结果,获取初始待应答问题数据所属的知识属主,并根据知识属主确定与初始待应答问题数据相对应的知识库。
本实施例中,事物的性质与关系,称作事物的属性,例如,可以将保险金额、保险单号和投保人归为“保险”这一属性,本实施例中,初始待应答问题数据所属的知识属主指的是预测到的初始待应答数据所属的分类,在此之前已经预先设置了不同具有不同分类的知识库,并且知识库与具有不同知识属主的初始待应答问题数据之间存在映射关系,因此在获取到初始待应答问题数据所属的知识属主后,就可以根据映射关系将初始待应答问题数据派发到对应的知识库中。
步骤S30,计算知识库中的初始待应答问题数据和历史问题数据之间的综合相似度。
本实施例中,当将具有不同知识属主的初始待应答问题数据派发到对应的知识库中后,需要计算派发的初始待应答问题数据与历史问题数据之间的相似度,计算相似度的目的是为了获取到与当前的初始待应答问题数据存在近似关系的其他数据,其他数据可以包括字面相似度,例如,当前的初始待应答问题数据多次出现“保险”,而对应知识库中也存在一条多次出现“保险”的历史问题数据,则说明这两条数据之间存在一定的相似度,为了计算出这种相似度,可以利用预置的相似度算法进行计算,例如,词频-逆文件频率。
步骤S40,判断相似度是否大于或等于第一预设阈值。
本实施例中,由于知识库中可能存在多条与当前的初始待应答问题数据存在相似的历史问题数据,而那多条历史问题数据不见得都满足预置的相似度,因此,预先设置了第一预设阈值,第一预设阈值的数值不限,例如,可是90%。
步骤S50,若相似度大于或等于第一预设阈值,则将初始待应答问题数据输入预先设置的G=(V,E)的各个节点中,根据图中的度确定初始待应答问题数据的权重,基于权重将初始待应答问题数据进行聚类,得到聚类结果,其中,聚类结果中权重最高的为问题数据,其余为相似问题数据,V为节点集合,E为边集,相似问题数据为与问题数据存在相似关系的数据。
本实施例中,图(Graph)是由顶点的有穷非空集合和顶点之间边的集合组成,可表示为G=(V,E),V为节点集合,E为边集,而本实施例中,点是各个初始待应答问题数据,边是各个初始待应答问题数据的相似度,将图中度(degree)最大的点,也就是最具有中心位置的点作为代表,即历史问题数据,这里的度就是各个点的权重。
步骤S60,判断知识库中的历史问题数据的属性与聚类结果的匹配度是否大于或等于第二预设阈值。
本实施例中,聚类结果与历史问题数据的属性之间可以是一对一的映射关系,也可以是一对多的映射关系,这些映射关系都是预先设置好的。
步骤S70,若知识库中的历史问题数据的属性与聚类结果的匹配度大于或等于第二预设阈值,则确定聚类结果的属性,并采用属性对聚类结果进行属性填充。
本实施例中,一个知识属主对应一个知识库;一个知识库下有多个历史问题数据,历史问题数据具有不同的属性,当知识库中的历史问题数据的属性与聚类结果的匹配度大于或等于第二预设阈值,则可将历史问题的属性填充到聚类结果中去,具体填充的方式是,预先建立属性待填充表,当匹配度大于或等于第二预设阈值则将对应的属性映射到属性待填充表中去。
先是通过图对问题数据集进行聚类,分出问题数据与相似问题数据,问题数据与相似问题数据具有相同的属性,每个属性与相应的知识库存在对应关系,将不同的数据根据属性存储到对应的知识库中,从知识库中选出与聚类结果匹配度较高的属性,实现对问题属性的填充。
参照图3,图3为本申请数据属性填充方法的第二实施例的流程示意图。本实施例中,在步骤S10通过预置模型集对初始待应答问题数据进行预测,得到目标预测结果之前,数据属性填充方法包括以下步骤。
步骤S80,通过正则表达式去除第一初始待应答问题数据集中的标点符号,得到第二初始待应答问题数据集。
本实施例中,通过正则表达式去除问题数据中的标点符号,得到去除标点符号问题数据。
步骤S90,通过预置同义词转换方式对第二初始待应答问题数据集进行同义词转换,得到第三初始待应答问题数据集。
本实施例中,先通过字符串寻找,查找到不同的字或词,然后替换,类似字典查询,譬如,e生宝->e生保;E神宝->e生保,这里面主要是实现了险种的语音纠错和险种描述统一的功能。
步骤S100,调用库函数对第三初始待应答问题数据集进行字面去重处理,得到目标待应答问题数据集,目标待应答问题数据集至少包括一个初始待应答问题数据。
本实施例中,通过库函数执行去重动作,得到字面去重的问题数据,库函数指的是,是把函数放到库里,以供使用的一种方式。其方法是把一些常用到的函数编完放到一个文件里,以供调用。
依次遍历第三初始待应答问题数据集,判断是否存在字面相同的问题数据,单个问题中的重复的字被清除后,还有可能存在其他字面一样的问题数据,例如,连续出现了“挖煤的可以买e生保吗”。若存在字面相同的问题数据,则仅保存一个问题数据,得到目标待应答问题数据集,为避免出现重复的数据,因此仅保存一个问题数据,即目标待应答问题数据集中每个初始待应答问题数据都是唯一的,且各不相同。
参照图4,图4为图3中步骤S103的一个实施例的细化流程示意图。本实施例中,步骤S100,调用库函数对第三初始待应答问题数据集进行字面去重处理,得到目标待应答问题数据集,目标待应答问题数据集至少包括一个初始待应答问题数据,包括以下步骤。
步骤S1001,通过调用库函数中的快速排序算法按照句子长度,对第三初始待应答问题数据集中的每个第三初始待应答问题数据进行排序,得到排序后第三初始待应答问题数据集。
本实施例中,通过排序将待排序的数据分割成独立的两部分,其中一部分的所有数据长度都比另外一部分的所有数据长度都要小,然后再按此方法对这两部分数据分别进行快速排序,整个排序过程可以递归进行,以此可使整个数据变成有序序列。
步骤S1002,遍历所述排序后第三初始待应答问题数据集,清除重复的字,得到目标待应答问题数据集。
本实施例中,在遍历排序后的数据时,可同时遍历到排序数据的两部分,这样就可以及时识别到是否存在重复的字,若存在重复的字,则清除,得到字面去重的问题数据,即初始待应答问题数据。
参照图5,图5为图3中步骤S102的一个实施例的细化流程示意图。本实施例中,步骤S90,通过预置同义词转换方式对第二初始待应答问题数据集进行同义词转换,得到第三初始待应答问题数据集,包括以下步骤。
步骤S901,对第二初始待应答问题数据集进行分词,得到分词数据。
本实施例中,可通过结巴分词的方式对对去除标点符号问题数据进行分词,得到分词数据。
步骤S902,获取分词数据的特征向量,并计算特征向量与预置词库中的各个词的特征向量的余弦夹角值。
本实施例中,先将分词数据转化成特征向量的形式,然后利用余弦公式计算特征向量间的余弦夹角值,余弦夹角值越小,则说明特征向量之间越相似。
步骤S903,判断余弦夹角值是否小于预置夹角值。
本实施例中,为了获取到满足预设条件的余弦夹角值,则需要设置预置的夹角值,例如,20°。
步骤S904,若余弦夹角值小于预置夹角值,则得到预置词库中的各个词的同义数据,将同义数据组成第三初始待应答问题数据集,若余弦夹角值大于或等于预置夹角值,则返回步骤S903。
本实施例中,由于有预置夹角值的约束,因此可以得到小于预置夹角值的数据。若大于或等于预置夹角值,则需要计算分词数据的特征向量与预置词库中的其他词的特征向量的余弦夹角值。
参照图6,图6为图2中步骤S10的一个实施例的细化流程示意图。本实施例中,步骤S10,通过预置模型集对初始待应答问题数据进行预测,得到目标预测结果,包括以下步骤。
步骤S101,通过预置模型集中的语言表征bert模型对初始待应答问题数据进行预测,判断初始待应答问题数据是否属于有效类型。
本实施例中,为了使语言表征bert模型可以是被出有效问题数据,在此之前还需要训练语言表征bert模型。即利用已知有效类型和无效类型的训练样本数据对初始bert模型进行训练,直至初始bert模型可准确识别出有效类型初始待应答问题数据。
步骤S102,若初始待应答问题数据属于有效类型,则获取有效类预测结果。
本实施例中,由步骤步骤S101可知,通过语言表征bert模型可识别出初始待应答问题数据是否为效类型,则可获取效类预测结果。通bert模型对初始待应答问题数据进行识别的目的,是为了区分出所有初始待应答问题数据中的有效问题,例如有效问题必须隶属于某个知识库的,如果当前是购买保险的人机问答场景,则若是接收到购买水果类的问题数据,则属于无效数据。
步骤S103,通过预置模型集中的文本分类textcnn模型对初始待应答问题数据进行预测,判断初始待应答问题数据是否属于闲聊类型。
本实施例中,对初始文本分类模型恶也要进行闲聊类型预测训练,直至训练完成后,即实现一定的准确率后,才能对初始待应答问题数据进行预测。
步骤S104,若初始待应答问题数据属于闲聊类型,则获取闲聊类预测结果。
本实施例中,通过预先设置好的闲聊训练样本和非闲聊训练样本对文本分类textcnn模型进行训练,这样就具备了识别的能力,例如若是在购买保险的人机问答场景,可将接收到笑声的数据或叹气的数据作为闲聊类型的数据。
步骤S105,将有效类预测结果和闲聊类预测结果组合,得到目标预测结果。
本实施例中,将闲聊类预测结果和有效类预测结果作为有效类预测结果的组成部分。
参照图7,图7为图2中步骤S70的一个实施例的细化流程示意图,本实施例中,步骤S70,若知识库中的历史问题数据的属性与聚类结果的匹配度大于或等于第二预设阈值,则确定聚类结果的属性,并采用属性对聚类结果进行属性填充包括以下步骤。
步骤S701,若知识库中的历史问题数据的属性与聚类结果的匹配度大于或等于第二预设阈值,则基于历史问题数据的属性与聚类结果的属性之间预置映射关系获取聚类结果的属性集,聚类结果的属性集包括至少一个聚类结果的属性。
步骤S702,挖掘聚类结果的属性集中的频繁项集,并基于频繁项集确定聚类结果的属性。
本实施例中,可通过大数据挖掘平台,对聚类结果的属性集中频繁出现的属性进行挖掘。可预先设置可作为频繁项集的标准,例如若当前的属性出现三次或三次以上,则可以将该属性设置为频繁项集。
参照图8,图8为图2中步骤S30一实施例的细化流程示意图。本实施例中,步骤S30,计算知识库中的初始待应答问题数据和历史问题数据之间的综合相似度,包括以下步骤。
步骤S301,通过词频-逆文件频率TF-IDF计算知识库中的初始待应答问题数据和历史问题数据之间的字面相似度。
本实施例中,先通过jieba进行分词,整理为指定格式,然后由gensim库将要对比的各个待应答问题数据通过doc2bow转化为稀疏向量,其次通过词频-逆文件频率TF-IDF将语料库进行处理,再特征值和稀疏矩阵相似度建立索引,最后得到各个待应答问题数据之间的字面相似度。
步骤S302,通过孪生网络计算知识库中的初始待应答问题数据和历史问题数据之间的语义相似度。
本实施例中,孪生网络由两个网络构成,两个网络结构相同且共享参数,当两个句子来自统一领域且在结构上有很大的相似度时选择该模型,通过计算曼哈顿距离,欧式距离,余弦相似度等来度量两个句子之间的空间相似度,进而得到语义相似度。
步骤S303,按照似度数值的大小对字面相似度和语义相似度数值分别进行优先级排序,得到综合相似度。
本实施例中,为了获取到更为准确的属性,因此,需要获取字面相似度和语义相似度,将字面相似度和语义相似度组合在一起,才可以获取到相似度,在计算初始待应答问题数据和历史问题数据之间的相似度,并判断相似度是否大于或等于第一预设阈值时,需要字面相似度和语义相似度均大于或等于第一预设阈值,才可以将初始待应答问题数据输入图G=(V,E)的各个节点中。
先是通过图对问题数据集进行聚类,分出问题数据与相似问题数据,问题数据与相似问题数据具有相同的属性,每个属性与相应的知识库存在对应关系,将不同的数据根据属性存储到对应的知识库中,然后,使用bert模型来预测未应答问题的通顺度,是否是一个有效的句子;使用textcnn模型训练的二分类模型来识别是否为闲聊,取其中有效非闲聊部分,其次,孪生网络和词频-逆文件频率TF-IDF分别计算字面相似度和语义相似度,再对满足相似度的问题数据进行聚类,从知识库中选出与聚类结果匹配度较高的属性,实现对问题的属性的填充。
参照图9,图9为本申请数据属性填充装置一实施例的功能模块示意图。本实施例中,数据属性填充装置包括:预测模块10,用于通过预置模型集对所述初始待应答问题数据进行预测,得到目标预测结果;分类模块20,用于基于所述目标预测结果,获取所述初始待应答问题数据所属的知识属主,并根据所述知识属主确定与所述初始待应答问题数据相对应的知识库;识别模块30,用于计算所述知识库中的初始待应答问题数据和历史问题数据之间的综合相似度;相似度判断模块40,用于判断所述相似度是否大于或等于第一预设阈值;聚类模块50,用于若所述相似度大于或等于第一预设阈值,则将所述初始待应答问题数据输入预先设置的图G=(V,E)的各个节点中,根据图中的度确定所述初始待应答问题数据的权重,并基于所述权重对所述初始待应答问题数据进行聚类处理,得到聚类结果,其中,所述聚类结果中权重最高的为问题数据,其余为相似问题数据,V为节点集合,E为边集,所述相似问题数据为与所述问题数据存在相似关系的数据;匹配度判断模块60,用于判断所述知识库中的历史问题数据的属性与所述聚类结果的匹配度是否大于或等于第二预设阈值;填充模块70,用于若所述知识库中的历史问题数据的属性与所述聚类结果的匹配度大于或等于第二预设阈值,则确定所述聚类结果的属性,并采用所述属性对所述聚类结果进行属性填充。
本实施例中,通过本装置中的模块可以实现一次操作,就可以得到多个属性的目的,提升了将不同初始待应答问题数据归为不同属性的效率。
本申请还提供一种计算机可读存储介质。可选的,该计算机可读存储介质可以是非易失性的,也可以是易失性的。
本实施例中,所述计算机可读存储介质上存储有数据属性填充程序,所述数据属性填充程序被处理器执行时实现如上述任一项实施例中所述的数据属性填充方法的步骤。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器或者网络设备等)执行本申请各个实施例所述的方法。
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,这些均属于本申请的保护之内。

Claims (20)

  1. 一种数据属性填充方法,其中,所述数据属性填充方法包括以下步骤:
    通过预置模型集对初始待应答问题数据进行预测,得到目标预测结果;
    基于所述目标预测结果,获取所述初始待应答问题数据所属的知识属主,并根据所述知识属主确定与所述初始待应答问题数据相对应的知识库;
    计算所述知识库中的初始待应答问题数据和历史问题数据之间的综合相似度;
    判断所述相似度是否大于或等于第一预设阈值;
    若所述相似度大于或等于第一预设阈值,则将所述初始待应答问题数据输入预先设置的图G=(V,E)的各个节点中,根据图中的度确定所述初始待应答问题数据的权重,基于所述权重将所述初始待应答问题数据进行聚类,得到聚类结果,其中,所述聚类结果中权重最高的为问题数据,其余为相似问题数据,V为节点集合,E为边集,所述相似问题数据为与所述问题数据存在相似关系的数据;
    判断所述知识库中的历史问题数据的属性与所述聚类结果的匹配度是否大于或等于第二预设阈值;
    若所述知识库中的历史问题数据的属性与所述聚类结果的匹配度大于或等于第二预设阈值,则确定所述聚类结果的属性,并采用所述属性对所述聚类结果进行属性填充。
  2. 如权利要求1所述的数据属性填充方法,其中,在所述通过预置模型集对初始待应答问题数据进行预测,得到目标预测结果之前,还包括以下步骤:
    通过正则表达式去除第一初始待应答问题数据集中的标点符号,得到第二初始待应答问题数据集;
    通过预置同义词转换方式对所述第二初始待应答问题数据集进行同义词转换,得到第三初始待应答问题数据集;
    调用库函数对所述第三初始待应答问题数据集进行字面去重处理,得到目标待应答问题数据集,所述目标待应答问题数据集至少包括一个初始待应答问题数据。
  3. 如权利要求2所述的数据属性填充方法,其中,所述调用库函数对所述第三初始待应答问题数据集进行字面去重处理,得到目标待应答问题数据集包括以下步骤:
    通过调用库函数中的快速排序算法按照句子长度,对所述第三初始待应答问题数据集中的每个第三初始待应答问题数据进行排序,得到排序后第三初始待应答问题数据集;
    遍历所述排序后第三初始待应答问题数据集,清除重复的字,得到目标待应答问题数据集。
  4. 如权利要求2所述的数据属性填充方法,其中,所述通过预置同义词转换方式对所述第二初始待应答问题数据集进行同义词转换,得到第三初始待应答问题数据集,包括以下步骤:
    对所述第二初始待应答问题数据集进行分词,得到分词数据;
    获取所述分词数据的特征向量,并计算所述特征向量与预置词库中的各个词的特征向量的余弦夹角值;
    判断所述余弦夹角值是否小于预置夹角值;
    若所述余弦夹角值小于预置夹角值,则得到所述预置词库中的各个词的同义数据,将所述同义数据组成第三初始待应答问题数据集;
    若所述余弦夹角值大于或等于预置夹角值,则继续执行判断所述余弦夹角值是否小于预置夹角值的步骤,直至所述余弦夹角值满足预置夹角值。
  5. 如权利要求1所述的数据属性填充方法,其中,所述通过预置模型集对初始待应答问题数据进行预测,得到目标预测结果,包括以下步骤:
    通过预置模型集中的语言表征bert模型对所述初始待应答问题数据进行预测,判断所述初始待应答问题数据是否属于有效类型;
    若所述初始待应答问题数据属于有效类型,则获取有效类预测结果;
    通过预置模型集中的文本分类textcnn模型对所述初始待应答问题数据进行预测,判断所述初始待应答问题数据是否属于闲聊类型;
    若所述初始待应答问题数据属于闲聊类型,则获取闲聊类预测结果;
    将所述有效类预测结果和闲聊类预测结果组合,得到目标预测结果。
  6. 如权利要求1所述的数据属性填充方法,其中,所述若所述知识库中的历史问题数据的属性与所述聚类结果的匹配度大于或等于第二预设阈值,则确定所述聚类结果的属性,并采用所述属性对所述聚类结果进行属性填充包括:
    若所述知识库中的历史问题数据的属性与所述聚类结果的匹配度大于或等于第二预设阈值,则基于所述历史问题数据的属性与所述聚类结果的属性之间预置映射关系获取聚类结果的属性集,所述聚类结果的属性集包括至少一个聚类结果的属性;
    挖掘所述聚类结果的属性集中的频繁项集,并基于所述频繁项集确定所述聚类结果的属性。
  7. 如权利要求1-6中任一项所述的数据属性填充方法,其中,所述计算所述知识库中的初始待应答问题数据和历史问题数据之间的综合相似度,包括以下步骤:
    通过词频-逆文件频率TF-IDF计算所述知识库中的初始待应答问题数据和历史问题数据之间的字面相似度;
    通过孪生网络计算所述知识库中的初始待应答问题数据和历史问题数据之间的语义相似度;
    按照似度数值的大小对所述字面相似度和所述语义相似度数值分别进行优先级排序,得到综合相似度。
  8. 一种数据属性填充装置,其中,所述数据属性填充装置包括以下模块:
    预测模块,用于通过预置模型集对所述初始待应答问题数据进行预测,得到目标预测结果;
    分类模块,用于基于所述目标预测结果,获取所述初始待应答问题数据所属的知识属主,并根据所述知识属主确定与所述初始待应答问题数据相对应的知识库;
    识别模块,用于计算所述知识库中的初始待应答问题数据和历史问题数据之间的综合相似度;
    相似度判断模块,用于判断所述相似度是否大于或等于第一预设阈值;
    聚类模块,用于若所述相似度大于或等于第一预设阈值,则将所述初始待应答问题数据输入预先设置的图G=(V,E)的各个节点中,根据图中的度确定所述初始待应答问题数据的权重,并基于所述权重对所述初始待应答问题数据进行聚类处理,得到聚类结果,其中,所述聚类结果中权重最高的为问题数据,其余为相似问题数据,V为节点集合,E为边集,所述相似问题数据为与所述问题数据存在相似关系的数据;
    匹配度判断模块,用于判断所述知识库中的历史问题数据的属性与所述聚类结果的匹配度是否大于或等于第二预设阈值;
    填充模块,用于若所述知识库中的历史问题数据的属性与所述聚类结果的匹配度大于或等于第二预设阈值,则确定所述聚类结果的属性,并采用所述属性对所述聚类结果进行属性填充。
  9. 一种数据属性填充设备,其中,所述数据属性填充设备包括存储器、处理器以及存储在所述存储器上并可在所述处理器上运行的数据属性填充程序,所述数据属性填充程序被所述处理器执行时实现以下步骤:
    通过预置模型集对初始待应答问题数据进行预测,得到目标预测结果;
    基于所述目标预测结果,获取所述初始待应答问题数据所属的知识属主,并根据所述知识属主确定与所述初始待应答问题数据相对应的知识库;
    计算所述知识库中的初始待应答问题数据和历史问题数据之间的综合相似度;
    判断所述相似度是否大于或等于第一预设阈值;
    若所述相似度大于或等于第一预设阈值,则将所述初始待应答问题数据输入预先设置的图G=(V,E)的各个节点中,根据图中的度确定所述初始待应答问题数据的权重,基于所述权重将所述初始待应答问题数据进行聚类,得到聚类结果,其中,所述聚类结果中权重最高的为问题数据,其余为相似问题数据,V为节点集合,E为边集,所述相似问题数据为与所述问题数据存在相似关系的数据;
    判断所述知识库中的历史问题数据的属性与所述聚类结果的匹配度是否大于或等于第二预设阈值;
    若所述知识库中的历史问题数据的属性与所述聚类结果的匹配度大于或等于第二预设阈值,则确定所述聚类结果的属性,并采用所述属性对所述聚类结果进行属性填充。
  10. 如权利要求9所述的数据属性填充设备,其中,在所述通过预置模型集对初始待应答问题数据进行预测,得到目标预测结果之前,还实现以下步骤:
    通过正则表达式去除第一初始待应答问题数据集中的标点符号,得到第二初始待应答问题数据集;
    通过预置同义词转换方式对所述第二初始待应答问题数据集进行同义词转换,得到第三初始待应答问题数据集;
    调用库函数对所述第三初始待应答问题数据集进行字面去重处理,得到目标待应答问题数据集,所述目标待应答问题数据集至少包括一个初始待应答问题数据。
  11. 如权利要求10所述的数据属性填充设备,其中,所述调用库函数对所述第三初始待应答问题数据集进行字面去重处理,得到目标待应答问题数据集时,实现以下步骤:
    通过调用库函数中的快速排序算法按照句子长度,对所述第三初始待应答问题数据集中的每个第三初始待应答问题数据进行排序,得到排序后第三初始待应答问题数据集;
    遍历所述排序后第三初始待应答问题数据集,清除重复的字,得到目标待应答问题数据集。
  12. 如权利要求10所述的数据属性填充设备,其中,所述通过预置同义词转换方式对所述第二初始待应答问题数据集进行同义词转换,得到第三初始待应答问题数据集时,实现以下步骤:
    对所述第二初始待应答问题数据集进行分词,得到分词数据;
    获取所述分词数据的特征向量,并计算所述特征向量与预置词库中的各个词的特征向量的余弦夹角值;
    判断所述余弦夹角值是否小于预置夹角值;
    若所述余弦夹角值小于预置夹角值,则得到所述预置词库中的各个词的同义数据,将所述同义数据组成第三初始待应答问题数据集;
    若所述余弦夹角值大于或等于预置夹角值,则继续执行判断所述余弦夹角值是否小于预置夹角值的步骤,直至所述余弦夹角值满足预置夹角值。
  13. 如权利要求9所述的数据属性填充设备,其中,所述通过预置模型集对初始待应答问题数据进行预测,得到目标预测结果时,实现以下步骤:
    通过预置模型集中的语言表征bert模型对所述初始待应答问题数据进行预测,判断所述初始待应答问题数据是否属于有效类型;
    若所述初始待应答问题数据属于有效类型,则获取有效类预测结果;
    通过预置模型集中的文本分类textcnn模型对所述初始待应答问题数据进行预测,判断所述初始待应答问题数据是否属于闲聊类型;
    若所述初始待应答问题数据属于闲聊类型,则获取闲聊类预测结果;
    将所述有效类预测结果和闲聊类预测结果组合,得到目标预测结果。
  14. 如权利要求9所述的数据属性填充设备,其中,所述若所述知识库中的历史问题数据的属性与所述聚类结果的匹配度大于或等于第二预设阈值,则确定所述聚类结果的属性,并采用所述属性对所述聚类结果进行属性填充时,实现以下步骤:
    若所述知识库中的历史问题数据的属性与所述聚类结果的匹配度大于或等于第二预设阈值,则基于所述历史问题数据的属性与所述聚类结果的属性之间预置映射关系获取聚类结果的属性集,所述聚类结果的属性集包括至少一个聚类结果的属性;
    挖掘所述聚类结果的属性集中的频繁项集,并基于所述频繁项集确定所述聚类结果的属性。
  15. 如权利要求9-14中任一项所述的数据属性填充设备,其中,所述计算所述知识库中的初始待应答问题数据和历史问题数据之间的综合相似度时,实现以下步骤:
    通过词频-逆文件频率TF-IDF计算所述知识库中的初始待应答问题数据和历史问题数据之间的字面相似度;
    通过孪生网络计算所述知识库中的初始待应答问题数据和历史问题数据之间的语义相似度;
    按照似度数值的大小对所述字面相似度和所述语义相似度数值分别进行优先级排序,得到综合相似度。
  16. 一种计算机可读存储介质,其中,所述计算机可读存储介质上存储有数据属性填充程序,所述数据属性填充程序被处理器执行时实现以下步骤:
    通过预置模型集对初始待应答问题数据进行预测,得到目标预测结果;
    基于所述目标预测结果,获取所述初始待应答问题数据所属的知识属主,并根据所述知识属主确定与所述初始待应答问题数据相对应的知识库;
    计算所述知识库中的初始待应答问题数据和历史问题数据之间的综合相似度;
    判断所述相似度是否大于或等于第一预设阈值;
    若所述相似度大于或等于第一预设阈值,则将所述初始待应答问题数据输入预先设置的图G=(V,E)的各个节点中,根据图中的度确定所述初始待应答问题数据的权重,基于所述权重将所述初始待应答问题数据进行聚类,得到聚类结果,其中,所述聚类结果中权重最高的为问题数据,其余为相似问题数据,V为节点集合,E为边集,所述相似问题数据为与所述问题数据存在相似关系的数据;
    判断所述知识库中的历史问题数据的属性与所述聚类结果的匹配度是否大于或等于第二预设阈值;
    若所述知识库中的历史问题数据的属性与所述聚类结果的匹配度大于或等于第二预设阈值,则确定所述聚类结果的属性,并采用所述属性对所述聚类结果进行属性填充。
  17. 如权利要求16所述的计算机可读存储介质,其中,在所述通过预置模型集对初始待应答问题数据进行预测,得到目标预测结果之前,还实现以下步骤:
    通过正则表达式去除第一初始待应答问题数据集中的标点符号,得到第二初始待应答问题数据集;
    通过预置同义词转换方式对所述第二初始待应答问题数据集进行同义词转换,得到第三初始待应答问题数据集;
    调用库函数对所述第三初始待应答问题数据集进行字面去重处理,得到目标待应答问题数据集,所述目标待应答问题数据集至少包括一个初始待应答问题数据。
  18. 如权利要求16所述的计算机可读存储介质,其中,所述通过预置模型集对初始待应答问题数据进行预测,得到目标预测结果时,实现以下步骤:
    通过预置模型集中的语言表征bert模型对所述初始待应答问题数据进行预测,判断所述初始待应答问题数据是否属于有效类型;
    若所述初始待应答问题数据属于有效类型,则获取有效类预测结果;
    通过预置模型集中的文本分类textcnn模型对所述初始待应答问题数据进行预测,判断所述初始待应答问题数据是否属于闲聊类型;
    若所述初始待应答问题数据属于闲聊类型,则获取闲聊类预测结果;
    将所述有效类预测结果和闲聊类预测结果组合,得到目标预测结果。
  19. 如权利要求16所述的计算机可读存储介质,其中,所述若所述知识库中的历史问题数据的属性与所述聚类结果的匹配度大于或等于第二预设阈值,则确定所述聚类结果的属性,并采用所述属性对所述聚类结果进行属性填充时,实现以下步骤:
    若所述知识库中的历史问题数据的属性与所述聚类结果的匹配度大于或等于第二预设阈值,则基于所述历史问题数据的属性与所述聚类结果的属性之间预置映射关系获取聚类结果的属性集,所述聚类结果的属性集包括至少一个聚类结果的属性;
    挖掘所述聚类结果的属性集中的频繁项集,并基于所述频繁项集确定所述聚类结果的属性。
  20. 如权利要求16-19中任一项所述的计算机可读存储介质,其中,所述计算所述知识库中的初始待应答问题数据和历史问题数据之间的综合相似度时,实现以下步骤:
    通过词频-逆文件频率TF-IDF计算所述知识库中的初始待应答问题数据和历史问题数据之间的字面相似度;
    通过孪生网络计算所述知识库中的初始待应答问题数据和历史问题数据之间的语义相似度;
    按照似度数值的大小对所述字面相似度和所述语义相似度数值分别进行优先级排序,得到综合相似度。
PCT/CN2020/098768 2020-02-12 2020-06-29 数据属性填充方法、装置、设备及计算机可读存储介质 WO2021159655A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010088080.6A CN111339248A (zh) 2020-02-12 2020-02-12 数据属性填充方法、装置、设备及计算机可读存储介质
CN202010088080.6 2020-02-12

Publications (1)

Publication Number Publication Date
WO2021159655A1 true WO2021159655A1 (zh) 2021-08-19

Family

ID=71182154

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/098768 WO2021159655A1 (zh) 2020-02-12 2020-06-29 数据属性填充方法、装置、设备及计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN111339248A (zh)
WO (1) WO2021159655A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111339248A (zh) * 2020-02-12 2020-06-26 平安科技(深圳)有限公司 数据属性填充方法、装置、设备及计算机可读存储介质
CN112541054B (zh) * 2020-12-15 2023-08-29 平安科技(深圳)有限公司 知识库的标问标答的治理方法、装置、设备及存储介质
CN113204974B (zh) * 2021-05-14 2022-06-17 清华大学 对抗文本的生成方法、装置、设备及存储介质
CN113239697B (zh) * 2021-06-01 2023-03-24 平安科技(深圳)有限公司 实体识别模型训练方法、装置、计算机设备及存储介质
CN113761178A (zh) * 2021-08-11 2021-12-07 北京三快在线科技有限公司 一种数据的展示方法和装置

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104133866A (zh) * 2014-07-18 2014-11-05 国家电网公司 一种面向智能电网的缺失数据填充方法
CN106844781A (zh) * 2017-03-10 2017-06-13 广州视源电子科技股份有限公司 数据处理的方法及装置
CN108932301A (zh) * 2018-06-11 2018-12-04 天津科技大学 数据填充方法及装置
CN109460775A (zh) * 2018-09-20 2019-03-12 国家计算机网络与信息安全管理中心 一种基于信息熵的数据填充方法及装置
CN110287179A (zh) * 2019-06-25 2019-09-27 广东工业大学 一种数据缺失属性值的填充设备、装置及方法
US20190332673A1 (en) * 2015-12-31 2019-10-31 Shanghai Xiaoi Robot Technology Co., Ltd. Methods, devices, and systems for constructing intelligent knowledge base
CN110659268A (zh) * 2019-08-15 2020-01-07 中国平安财产保险股份有限公司 基于聚类算法的数据填充方法、装置及计算机设备
CN110674621A (zh) * 2018-07-03 2020-01-10 北京京东尚科信息技术有限公司 一种属性信息填充方法和装置
CN111339248A (zh) * 2020-02-12 2020-06-26 平安科技(深圳)有限公司 数据属性填充方法、装置、设备及计算机可读存储介质

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104133866A (zh) * 2014-07-18 2014-11-05 国家电网公司 一种面向智能电网的缺失数据填充方法
US20190332673A1 (en) * 2015-12-31 2019-10-31 Shanghai Xiaoi Robot Technology Co., Ltd. Methods, devices, and systems for constructing intelligent knowledge base
CN106844781A (zh) * 2017-03-10 2017-06-13 广州视源电子科技股份有限公司 数据处理的方法及装置
CN108932301A (zh) * 2018-06-11 2018-12-04 天津科技大学 数据填充方法及装置
CN110674621A (zh) * 2018-07-03 2020-01-10 北京京东尚科信息技术有限公司 一种属性信息填充方法和装置
CN109460775A (zh) * 2018-09-20 2019-03-12 国家计算机网络与信息安全管理中心 一种基于信息熵的数据填充方法及装置
CN110287179A (zh) * 2019-06-25 2019-09-27 广东工业大学 一种数据缺失属性值的填充设备、装置及方法
CN110659268A (zh) * 2019-08-15 2020-01-07 中国平安财产保险股份有限公司 基于聚类算法的数据填充方法、装置及计算机设备
CN111339248A (zh) * 2020-02-12 2020-06-26 平安科技(深圳)有限公司 数据属性填充方法、装置、设备及计算机可读存储介质

Also Published As

Publication number Publication date
CN111339248A (zh) 2020-06-26

Similar Documents

Publication Publication Date Title
WO2021159655A1 (zh) 数据属性填充方法、装置、设备及计算机可读存储介质
JP7170779B2 (ja) 自動的な意図のマイニング、分類、及び配置のための方法及びシステム
WO2021093755A1 (zh) 问题的匹配方法及装置、问题的回复方法及装置
US10956464B2 (en) Natural language question answering method and apparatus
CN109582793B (zh) 模型训练方法、客服系统及数据标注系统、可读存储介质
CN109670163B (zh) 信息识别方法、信息推荐方法、模板构建方法及计算设备
WO2020164276A1 (zh) 网页数据爬取方法、装置、系统及计算机可读存储介质
WO2017097231A1 (zh) 话题处理方法及装置
WO2017190527A1 (zh) 一种文本数据分类方法及服务器
JP6355840B2 (ja) ストップワード識別方法および装置
CN111047563B (zh) 一种应用于医学超声图像的神经网络构建方法
WO2023065642A1 (zh) 语料筛选方法、意图识别模型优化方法、设备及存储介质
WO2020232898A1 (zh) 文本分类方法、装置、电子设备及计算机非易失性可读存储介质
CN108268438B (zh) 一种页面内容提取方法、装置以及客户端
US20200004786A1 (en) Corpus generating method and apparatus, and human-machine interaction processing method and apparatus
WO2018121145A1 (zh) 段落向量化的方法和装置
WO2024098623A1 (zh) 跨媒体检索及模型训练方法、装置、设备、菜谱检索系统
JP2023541742A (ja) ソートモデルのトレーニング方法及び装置、電子機器、コンピュータ可読記憶媒体、コンピュータプログラム
WO2023240878A1 (zh) 一种资源识别方法、装置、设备以及存储介质
CN110781673B (zh) 文档验收方法、装置、计算机设备及存储介质
CN116797195A (zh) 工单处理方法、装置、计算机设备和计算机可读存储介质
CN111930949B (zh) 搜索串处理方法、装置、计算机可读介质及电子设备
CN116644183B (zh) 文本分类方法、装置及存储介质
CN112925895A (zh) 自然语言软件运维方法及装置
CN110442696B (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: 20919349

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: 20919349

Country of ref document: EP

Kind code of ref document: A1