Data processing method, device and computer readable storage medium
Through the LDA model and topic contribution factor calculation, the problem of low accuracy of multi-topic consultation record summaries in the existing technology is solved, and accurate extraction of customer consultation records and improvement of service quality are achieved.
Patent Information
- Application Number
- CN201810144716.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-02-12
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2038-02-12
AI Technical Summary
When the existing technology processes customer consultation records, it is difficult to accurately extract multi-topic consultation situations, resulting in low summary accuracy and reduced service quality.
The implicit Dirichlet distribution (LDA) model is used to determine the probability distribution of each sentence in each topic in the customer consultation record, calculate the topic contribution factor, and select relevant topics and sentences as summaries to provide to online customer service.
The accuracy of the summary of customer consultation records is improved, allowing online customer service to quickly and accurately understand customer needs, thereby improving service quality.
Smart Images

Figure CN110209763B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a data processing method, device, and computer-readable storage medium. Background Art
[0002] With the vigorous development of Internet e-commerce, online customer service systems have become an important part of e-commerce websites and an essential tool for displaying the corporate website image and strengthening the interaction between enterprises and visitors.
[0003] Sometimes in online customer service, customer service needs to understand a large amount of customer consultation record information at once. For example, when customer service transfers, it is necessary to quickly understand the consultation record information of the previous customer service and the customer in a short time. Another example is when a customer leaves a message. When receiving the message, the customer may say a lot of problem descriptions, and the customer service needs to read a lot of customer messages. Even in normal connection, when encountering promotional activities, each customer service receives many customers at the same time, and it is difficult to respond quickly. At this time, the customer may continuously enter a lot of consultation record information. When the customer service receives the current customer, it is necessary to quickly read the customer consultation record information and respond. Therefore, there is an urgent need to extract the most critical small amount of consultation record information that can represent the meaning of the customer's consultation from these large amounts of consultation record information.
[0004] In some related technologies, by judging the similarity between each sentence in the consultation record and the entire conversation, sentences with high similarity are screened out and displayed as summary sentences. Summary of the invention
[0005] The inventors found that a customer consultation conversation usually includes multiple consultation topics. For example, when consulting business issues, some small talk is inevitable; when consulting about returns and exchanges, the order information may be described first; pre-sales consultation may include consultation on the field issues of each product itself, etc. Most of the above consultation record summary algorithms are based on a general summary of the entire conversation. This results in a greatly reduced accuracy of the summary when there are multiple consultation topics in the consultation record, which cannot accurately reflect the actual needs of customers and reduces service quality.
[0006] A technical problem to be solved by the present disclosure is: how to improve the accuracy of summarizing customer consultation records and improve service quality.
[0007] According to some embodiments of the present disclosure, a data processing method is provided, including: determining the probability distribution of each sentence in a client's consultation record on each topic; determining the contribution factor of each topic to the consultation record based on the probability distribution of each sentence in the consultation record on each topic; selecting a preset number of topics based on the contribution factor of each topic in the consultation record; and determining sentences to serve as consultation summaries based on the probability distribution of each sentence on the selected topics.
[0008] In some embodiments, determining the probability distribution of each sentence in a customer's consultation record on each topic includes: dividing the consultation record into different sentences and segmenting each sentence; generating a training sample for each sentence after segmentation, and inputting all training samples corresponding to the consultation record into an implicit Dirichlet allocation LDA model for training to obtain the probability distribution of each sentence in the consultation record on each topic.
[0009] In some embodiments, inputting all training samples corresponding to the consultation records into the LDA model for training includes: randomly assigning a topic number to each word in the consultation record; resampling the topic number corresponding to each word in the consultation record according to the following Gibbs sampling formula, and repeating this step until the Gibbs sampling converges.
[0010]
[0011] Among them, z i represents the topic number corresponding to the i-th word, It means to remove the part with subscript i. represents the word in the mth sentence, Indicates the topic number corresponding to the word in the mth sentence, represents the number of words generated by the kth topic in the mth sentence, α k represents the prior pseudo count of events in the Dirichlet distribution of sentence topics, β t Represents the prior pseudo count of events in the Dirichlet distribution of topic words, K represents the number of topics, and V represents the number of words corresponding to the topics; the probability of each word in each sentence on each topic is counted to obtain the probability distribution of each sentence on each topic.
[0012] In some embodiments, determining the contribution factor of each topic to the consultation record includes: adding the probability values of each sentence on the same topic to obtain the contribution factor of the topic in the consultation record.
[0013] In some embodiments, determining the contribution factor of each topic to the consultation record includes: determining the contribution factor of each topic to the consultation record based on the probability distribution of each sentence in the consultation record on each topic and the function of the current online customer service.
[0014] In some embodiments, determining the contribution factor of each topic to the consultation record includes: determining the relevance of each topic to the function of the current online customer service based on the probability distribution of each word in the consultation record on each topic; and determining the contribution factor of the topic in the consultation record as the product of the sum of the probability distribution values of each sentence on the same topic and the relevance of the topic to the function of the current online customer service.
[0015] In some embodiments, the number of topics in a consultation record is determined based on the business scenario and the length of the consultation record; or, the preset number of selected topics is determined based on the business scenario and the length of the consultation record; or, the number of sentences in the consultation summary is determined based on the business scenario, the length of the consultation record and the number of selected topics.
[0016] According to other embodiments of the present disclosure, a data processing device is provided, including: a sentence probability determination module for determining the probability distribution of each sentence in a client's consultation record on each topic; a topic contribution determination module for determining the contribution factor of each topic to the consultation record based on the probability distribution of each sentence in the consultation record on each topic; a topic selection module for selecting a preset number of topics based on the contribution factor of each topic in the consultation record; and a consultation summary determination module for determining a sentence as a consultation summary based on the probability distribution of each sentence on a selected topic.
[0017] In some embodiments, the sentence probability determination module is used to divide the consultation record into different sentences, and segment each sentence, generate a training sample for each sentence after segmentation, and input all the training samples corresponding to the consultation record into the implicit Dirichlet allocation LDA model for training to obtain the probability distribution of each sentence in the consultation record on each topic.
[0018] In some embodiments, the sentence probability determination module is used to: randomly assign a topic number to each word in the consultation record; resample the topic number corresponding to each word in the consultation record according to the following Gibbs sampling formula, and repeat this step until the Gibbs sampling converges.
[0019]
[0020] Among them, z i represents the topic number corresponding to the i-th word, It means to remove the part with subscript i. represents the word in the mth sentence, Indicates the topic number corresponding to the word in the mth sentence, represents the number of words generated by the kth topic in the mth sentence, αk represents the prior pseudo count of events in the Dirichlet distribution of sentence topics, β t Represents the prior pseudo count of events in the Dirichlet distribution of topic words, K represents the number of topics, and V represents the number of words corresponding to the topics; the probability of each word in each sentence on each topic is counted to obtain the probability distribution of each sentence on each topic.
[0021] In some embodiments, the topic contribution determination module is used to add the probability values of each sentence on the same topic to obtain the contribution factor of the topic in the consultation record.
[0022] In some embodiments, the topic contribution determination module is also used to determine the contribution factor of each topic to the consultation record based on the probability distribution of each sentence in the consultation record on each topic and the function of the current online customer service.
[0023] In some embodiments, the topic contribution determination module is used to determine the relevance of each topic to the functions of the current online customer service based on the probability distribution of each word in the consultation record on each topic, and the sum of the probability distribution values of each sentence on the same topic and the product of the relevance of the topic to the functions of the current online customer service are determined as the contribution factor of the topic in the consultation record.
[0024] In some embodiments, the number of topics in a consultation record is determined based on the business scenario and the length of the consultation record; or, the preset number of selected topics is determined based on the business scenario and the length of the consultation record; or, the number of sentences in the consultation summary is determined based on the business scenario, the length of the consultation record and the number of selected topics.
[0025] According to some further embodiments of the present disclosure, a data processing apparatus is provided, comprising: a memory; and a processor coupled to the memory, wherein the processor is configured to execute a data processing method as in any of the aforementioned embodiments based on instructions stored in the memory device.
[0026] According to some further embodiments of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, wherein the program, when executed by a processor, implements the data processing method in any of the aforementioned embodiments.
[0027] The present invention first determines the probability distribution of each sentence in the customer consultation record on each topic, and further determines the contribution factor of each topic in the consultation record. The sentences with higher probabilities are more relevant to the corresponding topics, and the topics with higher contribution factors are more important in the consultation record. The topics and sentences of the summary are further selected and provided to the online customer service, which improves the accuracy of summarizing the customer consultation records and enables the online customer service to quickly and accurately understand the real needs of the customer consultation, thereby improving the service quality.
[0028] Other features and advantages of the present disclosure will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0030] Figure 1 A flowchart diagram showing a data processing method according to some embodiments of the present disclosure is provided.
[0031] Figure 2 A flowchart schematically illustrates a data processing method according to other embodiments of the present disclosure.
[0032] Figure 3 A flowchart diagram showing a data processing method according to some further embodiments of the present disclosure is provided.
[0033] Figure 4 A schematic diagram showing the structure of a data processing device according to some embodiments of the present disclosure.
[0034] Figure 5 A schematic diagram showing the structure of a data processing device according to other embodiments of the present disclosure.
[0035] Figure 6 A schematic diagram showing the structure of a data processing device according to some further embodiments of the present disclosure. DETAILED DESCRIPTION
[0036] The technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is by no means intended to limit the present disclosure and its application or use. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0037] The present disclosure proposes a data processing method for improving the accuracy of extracting summaries from customer consultation records. Figure 1 Some embodiments of the data processing method of the present disclosure are described.
[0038] Figure 1 Flowcharts of some embodiments of the data processing method disclosed herein. Figure 1 As shown, the method of this embodiment includes: steps S110 to S140.
[0039] Step S110, determining the probability distribution of each sentence in the customer's consultation record on each topic.
[0040] In some embodiments, LDA (Latent Dirichlet Allocation) may be used to determine the probability distribution of each sentence in the consultation record on each topic.
[0041] like Figure 2 As shown, step S110 may include steps S112 to S114. Step S112 may first obtain the consultation record of the customer, divide the consultation record into different sentences, and perform word segmentation on each sentence. The word segmentation method may utilize the word segmentation method according to the dictionary or the word segmentation method using the hidden Markov model in the prior art. When the word segmentation is performed, the punctuation marks and stop words (such as function words, interjections, and other words without actual meaning) in the sentence may be removed first to clean the sentence, which will not be described in detail here.
[0042] Further, in step S114, a training sample is generated for each sentence after word segmentation, and all the training samples corresponding to the consultation record are input into the LDA model for training to obtain the probability distribution of each sentence in the consultation record on each topic. A one-dimensional array can be generated for each sentence after word segmentation, and each value in the array represents the number of each word in the sentence. The word number can be a preset value (for example, an int value is used as the word number), and the same word corresponds to a unique number, and different words have different numbers. For example, the array corresponding to one sentence is (1,2,3,4), and the array corresponding to another sentence is (2,8,11,17,18,21). All the training samples input into the LDA model are the arrays corresponding to each sentence in the consultation record.
[0043] Optionally, when training the LDA model, a Gibbs sampling algorithm may be used, which may include steps S1122 to 1128. First, in step S1122, a topic number is randomly assigned to each word in the consultation record. The number and number of topics are preset, and the number of topics can be determined according to the business scenario and the length of the consultation record. For example, the higher the level of online customer service, the fewer topics; the more online customer service that is transferred to the customer, the more topics; the longer the consultation record, the more topics. The number of tasks to be processed by each online customer service can be obtained to determine the busyness of the online customer service, and the busyness can be divided into different levels corresponding to different processing capacity values. The higher the busyness, the lower the processing capacity value; the corresponding transfer value is determined according to the number of online customer service that is transferred to the customer; different consultation record length thresholds are set, and the corresponding consultation quantity value is determined according to the consultation record length; the processing capacity value, transfer value and consultation quantity value are weighted to obtain the weight of the consultation record, and different threshold ranges are set. According to the threshold range corresponding to the weight of the consultation record, the number of topics of the consultation record is determined. The larger the weight of the consultation record, the more topics there are.
[0044] Further, in step S1124, the topic number corresponding to each word in the consultation record is resampled according to the following Gibbs sampling formula.
[0045]
[0046] In formula (1), z i represents the topic number corresponding to the i-th word, It means to remove the part with subscript i. represents the word in the mth sentence, Indicates the topic number corresponding to the word in the mth sentence, represents the number of words generated by the kth topic in the mth sentence, α k represents the prior pseudo count of events in the Dirichlet distribution of sentence topics, β t represents the prior pseudo count of events in the Dirichlet distribution of topic words, K represents the number of topics, V represents the number of words corresponding to the topics, and M represents the number of sentences. Represents the conditional probability of Gibbs sampling for each word corresponding to the topic. i, m, k are positive integers.
[0047] Further, in step S1126, it is determined whether the Gibbs sampling has converged, if so, executing step S1128, otherwise returning to step S1124.
[0048] Finally, step S1128, the probability of each word in each sentence on each topic is counted to obtain the probability distribution of each sentence on each topic. For example, the probability of each word in a sentence on a topic is added to obtain the probability of the sentence on the topic.
[0049] Traditional LDA models are generally used to determine article topics. The training samples are a large number of articles. Different articles may not be related. After the model is trained, the corresponding topics can be obtained by inputting new articles. In the above embodiment, each sentence in the consultation record is used as a training sample, which has a certain relevance. Finally, the contribution of the topic is evaluated from the consultation record as a whole based on the probability distribution of the sentence, and each consultation record is retrained, which changes the application method of the traditional LDA model.
[0050] In certain embodiments, it is also possible to determine the probability distribution of each sentence on each topic in the consultation record of the client according to historical statistical data. For example, the consultation record of statistical history determines multiple topics of customer consultation, and the mode of manual marking can be adopted. Further statistical words occurring in the consultation record of historical history can be set with a threshold value, and the key words whose number of occurrences exceed the threshold value are counted, and the probability of the key words on the topic is determined according to the ratio of the number of times a key word occurs in a topic to the total number of occurrences, and then the probability of each key word on each topic is determined. According to the key words occurring in each sentence in the current consultation record, the probability distribution of each sentence on each topic is determined. Specifically, the probability of each key word on the same topic in the sentence is added together to obtain the probability of the sentence on the topic.
[0051] Step S120, determining the contribution factor of each topic to the consultation record based on the probability distribution of each sentence in the consultation record on each topic.
[0052] In some embodiments, the probability values of each sentence on the same topic can be added together to obtain the contribution factor of the topic in the consultation record. For example, the contribution factor of a topic in the consultation record can be calculated according to the following formula.
[0053]
[0054] In formula (2), W k represents the contribution factor of topic k in the consultation record, It represents the probability value of sentence m on topic k, where k and m are positive integers and M is the total number of sentences.
[0055] In some embodiments, the contribution factor of each topic to the consultation record can be determined based on the probability distribution of each sentence in the consultation record on each topic and the function of the current online customer service.
[0056] For example, in order to provide more accurate services to customers, online customer service can be divided into pre-sales consulting customer service, after-sales customer service, etc. Pre-sales customer service can include pre-sales customer service in charge of different types of goods, after-sales customer service can also include after-sales customer service in charge of different types of goods, and can also include logistics consulting customer service, return and exchange consulting customer service, complaint handling customer service, etc.
[0057] Furthermore, based on the probability distribution of each word on each topic, the relevance of each topic to the function of the current online customer service is determined; the sum of the probability distribution values of each sentence on the same topic and the product of the relevance of the topic to the function of the current online customer service are determined as the contribution factor of the topic in the consultation record.
[0058] The probability distribution of each word in the consultation record on each topic can be obtained by using the LDA model or statistical historical data. Preset words related to various functions of online customer service, add the probability values of words related to the same function corresponding to a topic, and get the relevance of the topic to the function. Preset words related to various functions of online customer service can be obtained by counting the number of times various words appear when customers consult questions related to a function in historical consultation records, and take words with a number exceeding a threshold as words related to the function. For example, if the consultation record contains 100 words, the probability of each word on topic 1 can be obtained. Among the 100 words, there are 10 words related to the current customer service function. Then add the probabilities of these 10 words on topic 1 to get the relevance of topic 1 to the current customer service function.
[0059] The contribution factor of a topic in the consultation record can be determined according to the following formula.
[0060]
[0061] In formula (3), W k represents the contribution factor of topic k in the consultation record, represents the probability value of sentence m on topic k, c k It represents the relevance of topic k to the current customer service function, k and m are positive integers, and M is the total number of sentences.
[0062] The method of the above embodiment can summarize sentences related to the functions of the current online customer service and the topics that the customer most wants to express during consultation, and display them to the current online customer service, so that the customer service can quickly and accurately understand the customer's needs and improve service quality.
[0063] Step S130, selecting a preset number of topics according to the contribution factor of each topic in the consultation record.
[0064] The topics are arranged in descending order according to the contribution factors in the consultation record, and a preset number of topics are selected starting from the topic with the largest contribution factor. The preset number of selected topics can be directly determined by the online customer service. For example, when the online customer service is connected, the option of the number of topics that can be viewed can be displayed to the customer service, and the number of topics to be viewed input by the online customer service is used as the preset number, and the preset number of topics are selected starting from the topic with the largest contribution factor.
[0065] The preset number of selected topics can also be determined according to the business scenario and the length of the consultation record. For example, the busier the online customer service is, the fewer the preset number is; the more online customer service staff are transferred for customers, the more the preset number is; the longer the consultation record is, the more the preset number is. The number of tasks to be processed by each online customer service can be obtained to determine the busyness of the online customer service, and the busyness can be divided into different levels corresponding to different processing capacity values. The higher the busyness, the lower the processing capacity value; according to the number of online customer service staff transferred for customers, the corresponding transfer value is determined; different consultation record length thresholds are set, and the corresponding consultation volume value is determined according to the consultation record length; the processing capacity value, transfer value and consultation volume value are weighted to obtain the weight of the consultation record, and different threshold ranges are set. According to the threshold range corresponding to the weight of the consultation record, the preset number of topics is determined. The larger the weight of the consultation record, the more preset number. The preset number is less than the total number of topics in the consultation record. For example, 1-3 are generally selected.
[0066] Step S140, determining the sentences to be used as the consultation summary according to the probability distribution of each sentence on the selected topic.
[0067] Arrange the sentences in descending order according to their probability values on the same topic, and select a preset number of sentences starting from the sentence with the highest probability as the sentences of the consultation summary corresponding to the topic. A certain number of consultation summary sentences can be determined for each selected topic, and the sentences of the consultation summary corresponding to different topics can be different. The number of consultation summary sentences can be directly determined by the online customer service. For example, when the online customer service is connected, the option of viewing the number of consultation summary sentences can be displayed to the customer service, and the corresponding number of consultation summary sentences are displayed according to the number of sentences to be viewed input by the online customer service.
[0068] The number of sentences in the consultation summary can also be determined according to the business scenario, the length of the consultation record and the number of selected topics. For example, the busier the online customer service is, the fewer sentences in the consultation summary; the more online customer service is transferred to the customer, the more sentences in the consultation summary; the longer the consultation record is, the more sentences in the consultation summary; the more topics are selected, the fewer sentences in the consultation summary corresponding to each topic. Generally speaking, the number of sentences that the online customer service can read quickly is limited. Therefore, the total number of sentences in the consultation summary can be preset, and the number of sentences in the consultation summary of each topic can be automatically adjusted according to the number of selected topics. The number of sentences in the consultation summary of each topic can be automatically adjusted according to the contribution factor of the selected topic. The larger the contribution factor, the more sentences correspond to the topic. For example, two topics are selected, and the total number of sentences in the preset consultation summary is 5. The contribution factor of topic 1 is large, then 3 sentences in the consultation summary are selected for topic 1, and 2 sentences in the consultation summary are selected for topic 2.
[0069] The method of the above embodiment adaptively adjusts the number of selected topics, the number of sentences in the consultation summary, etc. according to the business scenario, the length of the consultation record, etc., so that the online customer service can quickly and accurately understand the most important content in the consultation record, thereby providing customers with more accurate and high-quality services.
[0070] In some embodiments, the sentences of the consultation summary can be sorted in descending order of relevance to the current online customer service's duties and displayed to the online customer service. The relevance of the sentences of the consultation summary to the online customer service's duties is the relevance of the corresponding topic to the online customer service's duties.
[0071] Furthermore, the sentence of the consultation summary can be displayed together with the consultation record; in response to the online customer service clicking on the sentence of the consultation summary, the user jumps to the corresponding position in the consultation record, so that the online customer service can further understand the customer's consultation content in detail.
[0072] The method of the above embodiment first determines the probability distribution of each sentence in the customer consultation record on each topic, and further determines the contribution factor of each topic in the consultation record. The higher the probability, the more relevant the sentence is to the corresponding topic, and the higher the contribution factor, the higher the importance of the topic in the consultation record. The topic and sentence of the summary are further selected and provided to the online customer service, which improves the accuracy of summarizing the customer consultation record and enables the online customer service to quickly and accurately understand the real needs of the customer consultation, thereby improving the service quality.
[0073] The present disclosure also provides a data processing device, Figure 4 Some embodiments of a data processing apparatus are described.
[0074] Figure 4Figure 1 is a structural diagram of some embodiments of the data processing device disclosed in the present invention. Figure 4 As shown, the apparatus 40 of this embodiment includes: a sentence probability determination module 402 , a topic contribution determination module 404 , a topic selection module 406 , and a consultation summary determination module 408 .
[0075] The sentence probability determination module 402 is used to determine the probability distribution of each sentence in the customer's consultation record on each topic. For example, the sentence probability determination module 402 is used to execute step S110.
[0076] In some embodiments, the sentence probability determination module 402 is used to divide the consultation record into different sentences, and segment each sentence, generate a training sample for each sentence after segmentation, and input all the training samples corresponding to the consultation record into the implicit Dirichlet allocation LDA model for training to obtain the probability distribution of each sentence in the consultation record on each topic.
[0077] Further, the sentence probability determination module 402 is used to: randomly assign a topic number to each word in the consultation record; resample the topic number corresponding to each word in the consultation record according to the following Gibbs sampling formula, and repeat this step until the Gibbs sampling converges.
[0078]
[0079] Among them, z i represents the topic number corresponding to the i-th word, It means to remove the part with subscript i. represents the word in the mth sentence, Indicates the topic number corresponding to the word in the mth sentence, represents the number of words generated by the kth topic in the mth sentence, α k represents the prior pseudo count of events in the Dirichlet distribution of sentence topics, β t Represents the prior pseudo count of events in the Dirichlet distribution of topic words, K represents the number of topics, and V represents the number of words corresponding to the topics; the probability of each word in each sentence on each topic is counted to obtain the probability distribution of each sentence on each topic.
[0080] The topic contribution determination module 404 is used to determine the contribution factor of each topic to the consultation record according to the probability distribution of each sentence in the consultation record on each topic. For example, the topic contribution determination module 404 is used to execute step S120.
[0081] In some embodiments, the topic contribution determination module 404 is used to add the probability values of each sentence on the same topic to obtain the contribution factor of the topic in the consultation record.
[0082] In some embodiments, the topic contribution determination module 404 is further used to determine the contribution factor of each topic to the consultation record based on the probability distribution of each sentence in the consultation record on each topic and the function of the current online customer service.
[0083] Furthermore, the topic contribution determination module 404 is used to determine the relevance of each topic to the function of the current online customer service based on the probability distribution of each word in the consultation record on each topic, and the sum of the probability distribution values of each sentence on the same topic and the product of the relevance of the topic to the function of the current online customer service are determined as the contribution factor of the topic in the consultation record.
[0084] The topic selection module 406 is used to select a preset number of topics according to the contribution factor of each topic in the consultation record. For example, the topic selection module 406 is used to execute step S130.
[0085] Optionally, the topic selection module 406 is used to arrange the topics in descending order according to their contribution factors in the consultation record, and select a preset number of topics starting from the topic with the largest contribution factor.
[0086] The consultation summary determination module 408 is used to determine the sentences used as the consultation summary according to the probability distribution of each sentence on the selected topic. For example, the consultation summary determination module 408 is used to execute step S140.
[0087] Optionally, the consultation summary determination module 408 is used to arrange the sentences in descending order according to their probability values on the same topic, and select a preset number of sentences starting from the sentence with the highest probability as the sentences of the consultation summary corresponding to the topic.
[0088] The number of topics in the consultation record is determined based on the business scenario and the length of the consultation record; or, the preset number of selected topics is determined based on the business scenario and the length of the consultation record; or, the number of sentences in the consultation summary is determined based on the business scenario, the length of the consultation record and the number of selected topics.
[0089] The data processing apparatus in the embodiments of the present disclosure may be implemented by various computing devices or computer systems. Figure 5 as well as Figure 6 Give a description.
[0090] Figure 5 Figure 1 is a structural diagram of some embodiments of the data processing device disclosed in the present invention. Figure 5As shown, the device 50 of this embodiment includes: a memory 510 and a processor 520 coupled to the memory 510 , and the processor 520 is configured to execute the data processing method in any of some embodiments of the present disclosure based on the instructions stored in the memory 510 .
[0091] The memory 510 may include, for example, a system memory, a fixed non-volatile storage medium, etc. The system memory may store, for example, an operating system, an application program, a boot loader, a database, and other programs.
[0092] Figure 6 FIG. 1 is a structural diagram of some other embodiments of the data processing device disclosed in the present invention. Figure 6 As shown, the device 60 of this embodiment includes: a memory 610 and a processor 620, which are similar to the memory 510 and the processor 520 respectively. It can also include an input and output interface 630, a network interface 640, a storage interface 650, etc. These interfaces 630, 640, 650 and the memory 610 and the processor 620 can be connected, for example, through a bus 660. Among them, the input and output interface 630 provides a connection interface for input and output devices such as a display, a mouse, a keyboard, and a touch screen. The network interface 640 provides a connection interface for various networked devices, for example, it can be connected to a database server or a cloud storage server. The storage interface 650 provides a connection interface for external storage devices such as SD cards and USB flash drives.
[0093] The present disclosure also provides a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the data processing method in any of the aforementioned embodiments.
[0094] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable non-transient storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0095] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0096] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0097] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0098] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A data processing method, comprising: Determine the probability distribution of each sentence in the customer's consultation record on each topic, wherein the number of topics in the consultation record is determined according to the business scenario and the length of the consultation record; Determining the contribution factor of each topic in the consultation record according to the probability distribution of each sentence in the consultation record on each topic, including: determining the relevance of each topic to the function of the current online customer service according to the probability distribution of each word in the consultation record on each topic, and determining the sum of the probability distribution values of each sentence on the same topic and the product of the relevance of the topic to the function of the current online customer service as the contribution factor of the topic in the consultation record; Selecting a preset number of topics according to the contribution factor of each topic in the consultation record; According to the probability distribution of each sentence on the selected topic, the sentence to be used as the consultation summary is determined.
2. The data processing method according to claim 1, wherein: Determining the probability distribution of each sentence on each topic in the customer's consultation record includes: Dividing the consultation record into different sentences and performing word segmentation on each sentence; A training sample is generated for each sentence after word segmentation, and all training samples corresponding to the consultation record are input into the implicit Dirichlet allocation LDA model for training to obtain the probability distribution of each sentence in the consultation record on each topic.
3. The data processing method according to claim 2, wherein: The inputting all training samples corresponding to the consultation records into the LDA model for training comprises: Randomly assign a topic number to each word in the consultation record; Resample the topic number corresponding to each word in the consultation record according to the following Gibbs sampling formula, and repeat this step until Gibbs sampling converges. Among them, z i represents the topic number corresponding to the i-th word, It means to remove the part with subscript i. represents the word in the mth sentence, Indicates the topic number corresponding to the word in the mth sentence, represents the number of words generated by the kth topic in the mth sentence, α k represents the prior pseudo count of events in the Dirichlet distribution of sentence topics, β t represents the prior pseudo count of events in the Dirichlet distribution of topic words, K represents the number of topics, and V represents the number of words corresponding to the topic; The probability of each word in each sentence on each topic is counted to obtain the probability distribution of each sentence on each topic.
4. The data processing method according to any one of claims 1 to 3, wherein: The preset number of selected topics is determined based on the business scenario and the length of the consulting record; Alternatively, the number of sentences in the consulting summary is determined based on the business scenario, the length of the consulting record, and the number of selected topics.
5. A data processing device, comprising: A sentence probability determination module, used to determine the probability distribution of each sentence in the customer's consultation record on each topic, wherein the number of topics in the consultation record is determined according to the business scenario and the length of the consultation record; A topic contribution determination module is used to determine the contribution factor of each topic in the consultation record according to the probability distribution of each sentence in the consultation record on each topic, including: determining the relevance of each topic to the function of the current online customer service according to the probability distribution of each word in the consultation record on each topic, and determining the sum of the probability distribution values of each sentence on the same topic and the product of the relevance of the topic to the function of the current online customer service as the contribution factor of the topic in the consultation record; A topic selection module, used to select a preset number of topics according to the contribution factor of each topic in the consultation record; The consultation summary determination module is used to determine the sentences that serve as the consultation summary based on the probability distribution of each sentence on the selected topic.
6. The data processing device according to claim 5, wherein: The sentence probability determination module is used to divide the consultation record into different sentences, and segment each sentence, generate a training sample for each sentence after segmentation, and input all the training samples corresponding to the consultation record into the implicit Dirichlet allocation LDA model for training to obtain the probability distribution of each sentence in the consultation record on each topic.
7. The data processing device according to claim 6, wherein: The sentence probability determination module is used for: Randomly assign a topic number to each word in the consultation record; Resample the topic number corresponding to each word in the consultation record according to the following Gibbs sampling formula, and repeat this step until Gibbs sampling converges. Among them, z i represents the topic number corresponding to the i-th word, It means to remove the part with subscript i. represents the word in the mth sentence, Indicates the topic number corresponding to the word in the mth sentence, represents the number of words generated by the kth topic in the mth sentence, α k represents the prior pseudo count of events in the Dirichlet distribution of sentence topics, β t represents the prior pseudo count of events in the Dirichlet distribution of topic words, K represents the number of topics, and V represents the number of words corresponding to the topic; The probability of each word in each sentence on each topic is counted to obtain the probability distribution of each sentence on each topic.
8. The data processing device according to any one of claims 5 to 7, wherein: The preset number of selected topics is determined based on the business scenario and the length of the consulting record; Alternatively, the number of sentences in the consulting summary is determined based on the business scenario, the length of the consulting record, and the number of selected topics.
9. A data processing device, comprising: Memory; as well as A processor coupled to the memory, wherein the processor is configured to execute the data processing method according to any one of claims 1 to 4 based on instructions stored in the memory device.
10. A computer-readable storage medium having a computer program stored thereon, wherein: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Automatic abstract generation method based on concept semantic unit
CN105320642A
Method for displaying hot topics based on remote sensing data
CN105608217A
Session abstract generation method and device
CN106407178A
Management method and management system of intelligent customer service knowledge base
CN106570708A
Application label mining method and device, and application searching method and server
CN106682169A
