Text processing method and device, equipment, storage medium and program product
By using pre-constructed vector dictionary and target task model to process text in the call center customer service field, the problem of excessive computing resources and insufficient accuracy of existing large models is solved, and more efficient and accurate text processing and analysis is achieved.
Patent Information
- Application Number
- CN202510281472.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2045-03-11
AI Technical Summary
In the field of call center customer service, the existing large models cannot meet business needs due to excessive computing resources, and their response speed cannot meet actual needs in terms of accuracy.
The target vector is obtained by obtaining the target text and processing it based on a pre-constructed vector dictionary. The vector dictionary consists of multiple samples and corresponding text vectors, and the text vector is obtained at least based on the semantic eigenvector and the local difference vector. Then, the target vector is processed based on the target task model to obtain the text processing results. The target task model is a text classification model, text clustering model or sentiment analysis model in the call center customer service field.
It improves the accuracy and efficiency of text processing, and is more targeted than the general large model method, and can process and analyze text data in the customer service field more quickly.
Smart Images

Figure CN120216684A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular, to a text processing method, apparatus, device, storage medium, and program product. Background Art
[0002] In the field of call center customer service, a large amount of text is generated every day, such as work order text, which records the demands of users. Text processing and analysis are the keys to the analysis of the enterprise's core business services and are beneficial to improving the user service experience.
[0003] Although relevant large models have been open-sourced, for text processing in the field of call center customer service, the response speed often cannot meet the actual business needs due to the excessive computing resources required and the fact that they are for all users. In addition, the large models are general large models, and their accuracy cannot meet the actual needs in the field of call center customer service. Summary of the Invention
[0004] This application provides a text processing method, apparatus, device, storage medium, and program product, which can not only improve the accuracy of text processing but also improve the efficiency of text processing.
[0005] In a first aspect, an embodiment of this application provides a text processing method, including: obtaining a target text; processing the target text based on a pre-constructed vector dictionary to obtain a target vector; where the vector dictionary consists of multiple samples and corresponding text vectors; the text vector is obtained at least according to a semantic feature vector and a local difference vector; the local difference vector is obtained according to a local feature and a difference feature; processing the target vector based on a target task model to obtain a text processing result; where the target task model is any one of a text classification model, a text clustering model, and a sentiment analysis model in the field of call center customer service.
[0006] In a second aspect, an embodiment of this application further provides a text processing apparatus, including: a target text obtaining module, configured to obtain a target text; a text processing module, configured to process the target text based on a pre-constructed vector dictionary to obtain a target vector; where the vector dictionary consists of multiple samples and corresponding text vectors; the text vector is obtained at least according to a semantic feature vector and a local difference vector; a vector processing module, configured to process the target vector based on a target task model to obtain a text processing result; where the target task model is any one of a text classification model, a text clustering model, and a sentiment analysis model in the field of call center customer service.
[0007] In a third aspect, an embodiment of the present application further provides an electronic device, which includes: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the text processing method as described in the embodiment of the present application.
[0008] In a fourth aspect, an embodiment of the present application further provides a storage medium containing computer-executable instructions, and the computer-executable instructions are used to execute the text processing method as described in the embodiment of the present application when executed by a computer processor.
[0009] In a fifth aspect, an embodiment of the present application further provides a computer program product, including a computer program, and the computer program implements the text processing method as described in the embodiment of the present application when executed by a processor.
[0010] The technical solution of the embodiment of the present application is to obtain a target text; process the target text based on a pre-constructed vector dictionary to obtain a target vector; wherein, the vector dictionary is composed of multiple samples and corresponding text vectors; the text vector is obtained at least according to a semantic feature vector and a local difference vector; the local difference vector is obtained according to a local feature and a difference feature; process the target vector based on a target task model to obtain a text processing result; wherein, the target task model is any one of a text classification model, a text clustering model, and a sentiment analysis model in the field of call center customer service. In the embodiment of the present application, by processing the target text through a pre-constructed vector dictionary to obtain a target vector, and then using the target task model to process the target vector, since the target vector includes a semantic feature vector and a local difference vector, the accuracy of text processing can be improved, and the target task model is any one of a text classification model, a text clustering model, and a sentiment analysis model in the field of call center customer service. Compared with the method of using a general large model, the efficiency of text processing can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In combination with the accompanying drawings and with reference to the following specific embodiments, the above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the original elements and elements are not necessarily drawn to scale.
[0012] Figure 1 It is a schematic flowchart of a text processing method provided by an embodiment of the present application;
[0013] Figure 2 It is a schematic structural diagram of a text processing device provided by an embodiment of the present application;
[0014] Figure 3 A schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0015] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not used to limit the protection scope of the present disclosure.
[0016] It should be understood that the steps described in the method embodiments of the present disclosure can be executed in different orders and / or executed in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this regard. The term "including" and its variations used herein are open-ended, that is, "including but not limited to". It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence relationship of the functions executed by these devices, modules or units. It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive. Those skilled in the art should understand that unless clearly stated otherwise in the context, it should be understood as "one or more". It can be understood that the data involved in the technical solution of the present application (including but not limited to the data itself, the acquisition or use of the data) should comply with the requirements of the corresponding laws, regulations and related regulations.
[0017] Figure 1 A schematic flowchart of a text processing method provided by an embodiment of the present application. This method can be executed by a text processing device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, which can be a mobile terminal, a PC or a server, etc. As Figure 1 shown, the method includes:
[0018] S110. Obtain a target text.
[0019] In this embodiment, the target text is not limited. For example, it can be a work order text generated by a work order system of a call center, or it can be a text converted from a telephone recording, or it can be an online customer service text, etc. The target text is used to record the problems or demands of user complaints.
[0020] S120. Process the target text based on a pre-constructed vector dictionary to obtain a target vector.
[0021] Among them, the vector dictionary is composed of multiple samples and corresponding text vectors; the text vectors are obtained at least based on semantic feature vectors and local difference vectors; the local difference vectors are obtained based on local features and difference features.
[0022] In this embodiment, the target text can be matched with each sample in the vector dictionary. If the match is successful, the text vector of the corresponding sample is used as the target vector of the target sample.
[0023] Optionally, processing the target text based on a pre-constructed vector dictionary to obtain a target vector includes: matching the target text with the samples in the vector dictionary to obtain a matching result; if the matching result is successful, using the corresponding vector in the vector dictionary as the target vector; if the matching result is unsuccessful, updating the vector dictionary based on the target text to process the target text based on the updated vector dictionary.
[0024] In this embodiment, if the target text can be successfully matched with the samples in the vector dictionary, it means that there is a sample in the vector dictionary that is the same as the target text, and the corresponding vector in the vector dictionary is used as the target vector; if the target text fails to match the samples in the vector dictionary, it means that there is no sample in the vector dictionary that is the same as the target text, and the vector dictionary is updated based on the target text to process the target text based on the updated vector dictionary. Among them, the update method is similar to the method of constructing the vector dictionary.
[0025] In this embodiment, before the target task model processes, the method of using the vector dictionary to obtain the target vector can directly obtain the text representation (vector representation) corresponding to the target text, so that the model does not need to learn the text representation from scratch, thereby reducing the complexity of the model and accelerating the model training and model prediction speed. At the same time, the vector dictionary provides semantic information, local information, and difference information, thereby improving the performance of the model.
[0026] Optionally, the construction method of the vector dictionary is as follows: obtain a training set including multiple tasks; perform local feature processing on each sample in the training set to obtain multiple target local features corresponding to each sample; perform difference processing on each sample in the training set to obtain multiple difference features corresponding to each sample; perform vector processing on each sample in the training set to obtain a semantic feature vector corresponding to each sample; for each sample, process the corresponding multiple target local features and the multiple difference features to obtain a local difference vector corresponding to each sample; splice the semantic feature vector and the local difference vector to obtain a text vector corresponding to each sample.
[0027] Among them, multiple tasks can be understood as text classification tasks, text clustering tasks, and sentiment analysis tasks.
[0028] In this embodiment, each sample in the training set can be used to extract local features in any way, such as a convolutional neural network or an N-gram method, to obtain multiple target local features corresponding to each sample.
[0029] In this embodiment, each sample in the training set can be processed for differences in any way, such as fuzzy matching or similarity calculation, to obtain multiple difference features corresponding to each sample.
[0030] In this embodiment, each sample in the training set can be vector-processed by any general large model, that is, through the general large model, a semantic feature vector corresponding to each sample can be obtained.
[0031] In this embodiment, for each sample, the corresponding multiple target local features can be vector-processed to obtain a local fusion vector, each difference feature can be directly used as a difference vector, and the local fusion vector and multiple difference vectors can be fused to obtain a local difference vector corresponding to each sample.
[0032] In this embodiment, the semantic feature vector and the local difference vector are concatenated, such as horizontally or vertically, to obtain a text vector corresponding to each sample.
[0033] Optionally, processing the local features of each sample in the training set to obtain multiple target local features corresponding to each sample includes: respectively setting a first set window size, a second set window size, a third set window size, and a fourth set window size; where the first set window size is less than the second set window size; the second set window size is less than the third set window size; the third set window size is less than the fourth set window size; respectively extracting features from each sample according to the first set window size, the second set window size, the third set window size, and the fourth set window size to obtain multiple initial local features corresponding to each set window size of each sample; counting the number of occurrences of each initial local feature corresponding to each set window size; and using the initial local features with the number of occurrences greater than the set threshold as the target local features corresponding to the corresponding set window size.
[0034] Exemplarily, the first set window size is 1, the second set window size is 2, the third set window size is 3, and the fourth set window size is 4.
[0035] Exemplarily, for each sample, feature extraction can be performed in a way that slides from left to right with a first set window size and a moving step of 1, to obtain multiple initial local features corresponding to the first set window size. For example, for "I love you", the multiple initial local features are respectively "I", "love", "you".
[0036] Exemplarily, for each sample, feature extraction can be performed in a way that slides from left to right with a second set window size and a moving step of 1, to obtain multiple initial local features corresponding to the second set window size. For example, for "I love you", the multiple initial local features are respectively "I love", "love you".
[0037] Exemplarily, for each sample, feature extraction can be performed in a way that slides from left to right with a third set window size and a moving step of 1, to obtain multiple initial local features corresponding to the third set window size. For example, for "I love machine learning", the multiple initial local features are respectively "I love machine", "love machine learning", "machine learning", "learning".
[0038] Exemplarily, for each sample, feature extraction can be performed in a way that slides from left to right with a fourth set window size and a moving step of 1, to obtain multiple initial local features corresponding to the fourth set window size. For example, for "I love machine learning, because machine learning is very popular", the multiple initial local features are respectively "I love machine", "love machine learning", "machine learning", "learning because", "because machine", "machine learning", "learning very", "very popular". Exemplarily, taking the set threshold as 2, since the number of occurrences of the "machine learning" initial local feature is 2, which is equal to the set threshold, therefore, the "machine learning" initial local feature can be used as the target local feature corresponding to the fourth set window size. And so on, the target local feature (one or more) for each set window size of each sample can be obtained, so that multiple target local features corresponding to each sample can be obtained.
[0039] Optionally, perform differential processing on each sample in the training set to obtain multiple differential features corresponding to each sample, including: for any target sample, determine the number of intersection terms between the target sample and each sample in the remaining samples of the training set; wherein, the remaining samples and the target sample form the training set; wherein, the number of intersection terms is the number of words that coexist in the target sample and any one of the remaining samples; determine the number of union terms between the target sample and each sample in the remaining samples of the training set; wherein, the number of union terms is the number of words after merging and deduplication of the target sample and any one of the remaining samples; based on the number of intersection terms, the number of union terms and the differential coefficient, determine the differential features between the target sample and each sample in the remaining samples.
[0040] In this embodiment, each sample in the training set can be segmented to construct a word set corresponding to each sample.
[0041] In this embodiment, the target sample is any one sample in the training set.
[0042] Exemplarily, taking the training set as an example with 3 samples, taking the target sample as A, and the remaining samples are denoted as B and C respectively, the number of intersection terms between A and B can be determined, that is, the number of words that coexist in A and B, and the number of intersection terms between A and C, that is, the number of words that coexist in A and C. The number of union terms between A and B can be determined, that is, the number of words after merging and deduplication of A and B, and the number of union terms between A and C, that is, the number of words after merging and deduplication of A and C.
[0043] Exemplarily, taking the differential coefficient as 1, the differential feature between A and B is: 1 - (the number of intersection terms between A and B / the number of union terms between A and B); the differential feature between A and C is: 1 - (the number of intersection terms between A and C / the number of union terms between A and C).
[0044] In this embodiment, the method of determining the differential features between the target sample and each sample in the remaining samples based on the number of intersection terms, the number of union terms and the differential coefficient makes the vector dictionary have the characteristics of global difference, which is convenient for improving the performance of subsequent models, such as the performance of text clustering.
[0045] Optionally, for each of the samples, processing the corresponding multiple target local features and the multiple difference features to obtain a local difference vector corresponding to each sample, including: performing vector transformation on the multiple target local features corresponding to each setting window size of each sample to obtain a local vector corresponding to each setting window size of each sample; fusing the local vectors corresponding to each setting window size in each sample to obtain a local fusion vector corresponding to each sample; fusing the local fusion vector corresponding to each sample with the multiple difference features corresponding to each sample to obtain a local difference vector corresponding to each sample.
[0046] In this embodiment, there is no limitation on the way of vector transformation. For example, it can be transformed by one-hot encoding, bag-of-words model, using a shallow neural network model, etc.
[0047] In this embodiment, the local vectors corresponding to each setting window size in each sample can be fused, such as horizontal splicing or vertical splicing, etc., to obtain a local fusion vector corresponding to each sample. In this embodiment, the difference features can be directly used as vectors.
[0048] In this embodiment, the local fusion vector corresponding to each sample can be spliced with the multiple difference features corresponding to each sample to obtain a local difference vector corresponding to each sample.
[0049] S130. Processing the target vector based on the target task model to obtain a text processing result.
[0050] Among them, the target task model is any one of a text classification model, a text clustering model, and a sentiment analysis model in the field of call center customer service. Among them, the text processing result may vary according to the task. For example, for a classification task, if the target task model is a text classification model, the text processing result may be a text classification result. For a clustering task, if the target task model is a text clustering model, the text processing result may be a text clustering result. For a sentiment analysis task, if the target task model is a sentiment analysis model, the text processing result may be a sentiment analysis result.
[0051] In this embodiment, if it is a classification task, the target text is taken as the work order text, and the target task model is taken as the text classification model. The work order text can be classified using the text classification model to analyze which types of problems the user complains about more. If it is a clustering task, the target text is taken as the telephone recording text, and the target task model is taken as the text clustering model. The work order text can be clustered and statistically analyzed using the text clustering model to analyze which aspects the complained problems are concentrated in. If it is a sentiment analysis task, the target text is taken as the online customer service text, and the target task model is taken as the sentiment analysis model. The online customer service text can be analyzed using the sentiment analysis model to analyze whether there is a particularly dissatisfied emotion when the user describes the problem.
[0052] It should be noted that the samples in the training set of the target task model can be the same as those in the training set for constructing the vector dictionary.
[0053] The technical solution of the embodiment of the present application is to obtain a target text; process the target text based on a pre-constructed vector dictionary to obtain a target vector; wherein, the vector dictionary is composed of multiple samples and corresponding text vectors; the text vector is obtained at least according to a semantic feature vector and a local difference vector; the local difference vector is obtained according to a local feature and a difference feature; process the target vector based on a target task model to obtain a text processing result; wherein, the target task model is any one of a text classification model, a text clustering model, and a sentiment analysis model in the field of call center customer service. In the embodiment of the present application, by processing the target text through the pre-constructed vector dictionary to obtain the target vector, and then using the target task model to process the target vector, since the target vector includes a semantic feature vector and a local difference vector, the accuracy of text processing can be improved, and the target task model is any one of a text classification model, a text clustering model, and a sentiment analysis model in the field of call center customer service. Compared with the method of using a general large model (training a general large model requires a large amount of computing resources), it is not only more targeted but also can improve the efficiency of text processing.
[0054] Figure 2 The following is a schematic structural diagram of a text processing device provided by an embodiment of the present application, as Figure 2 shown, the device includes: a target text acquisition module 210, a text processing module 220, and a vector processing module 230;
[0055] The target text acquisition module 210 is used to acquire a target text;
[0056] A text processing module 220, configured to process the target text based on a pre-constructed vector dictionary to obtain a target vector; wherein, the vector dictionary consists of multiple samples and corresponding text vectors; the text vector is obtained at least according to a semantic feature vector and a local difference vector;
[0057] A vector processing module 230, configured to process the target vector based on a target task model to obtain a text processing result; wherein, the target task model is any one of a text classification model, a text clustering model, and a sentiment analysis model in the field of call center customer service.
[0058] The technical solution of the embodiment of the present application obtains a target text through a target text acquisition module; processes the target text through a text processing module based on a pre-constructed vector dictionary to obtain a target vector; wherein, the vector dictionary consists of multiple samples and corresponding text vectors; the text vector is obtained at least according to a semantic feature vector and a local difference vector; the local difference vector is obtained according to local features and difference features; processes the target vector through a vector processing module based on a target task model to obtain a text processing result; wherein, the target task model is any one of a text classification model, a text clustering model, and a sentiment analysis model in the field of call center customer service. In the embodiment of the present application, by processing the target text through a pre-constructed vector dictionary to obtain a target vector, and then using the target task model to process the target vector, since the target vector includes a semantic feature vector and a local difference vector, the accuracy of text processing can be improved, and the target task model is any one of a text classification model, a text clustering model, and a sentiment analysis model in the field of call center customer service. Compared with the method of using a general large model, the efficiency of text processing can be improved.
[0059] Optionally, the text processing module is specifically configured to: match the target text with the samples in the vector dictionary to obtain a matching result; if the matching result is a successful match, use the corresponding vector in the vector dictionary as the target vector; if the matching result is a failed match, update the vector dictionary based on the target text to process the target text based on the updated vector dictionary.
[0060] Optionally, the above-mentioned device further includes a construction module, configured to obtain a training set including multiple tasks; perform local feature processing on each sample in the training set to obtain multiple target local features corresponding to each sample; perform difference processing on each sample in the training set to obtain multiple difference features corresponding to each sample; perform vector processing on each sample in the training set to obtain a semantic feature vector corresponding to each sample; for each sample, process the corresponding multiple target local features and the multiple difference features to obtain a local difference vector corresponding to each sample; splice the semantic feature vector and the local difference vector to obtain a text vector corresponding to each sample.
[0061] Optionally, the construction module is further configured to: respectively set a first set window size, a second set window size, a third set window size, and a fourth set window size; wherein, the first set window size is smaller than the second set window size; the second set window size is smaller than the third set window size; the third set window size is smaller than the fourth set window size; respectively extract features from each sample according to the first set window size, the second set window size, the third set window size, and the fourth set window size to obtain multiple initial local features corresponding to each set window size of each sample; count the occurrence times of each initial local feature corresponding to each set window size; use the initial local features with the occurrence times greater than or equal to a set threshold as the target local features corresponding to the corresponding set window size.
[0062] Optionally, the construction module is further configured to: for any target sample, determine the number of intersection terms between the target sample and each sample in the remaining samples in the training set; wherein, the remaining samples and the target sample form the training set; wherein, the number of intersection terms is the number of words that coexist in the target sample and any one of the remaining samples; determine the number of union terms between the target sample and each sample in the remaining samples in the training set; wherein, the number of union terms is the number of words after merging and removing duplicates of the target sample and any one of the remaining samples; based on the number of intersection terms, the number of union terms, and a difference coefficient, determine the difference features between the target sample and each sample in the remaining samples.
[0063] Optionally, the building block is further configured to: perform vector transformation on multiple target local features corresponding to each set window size of each piece of sample to obtain local vectors corresponding to each set window size of each piece of sample; fuse the local vectors corresponding to each set window size in each piece of sample to obtain a local fusion vector corresponding to each piece of sample; fuse the local fusion vector corresponding to each piece of sample with multiple difference features corresponding to each piece of sample to obtain a local difference vector corresponding to each piece of sample.
[0064] The text processing device provided by the embodiments of the present application can execute the text processing method provided by any embodiment of the present disclosure, and has functional modules and beneficial effects corresponding to the execution of the method.
[0065] Figure 3 FIG. shows a schematic structural diagram of an electronic device 10 that can be used to implement an embodiment of the present application. The electronic device is intended to represent various forms of digital computers, such as, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present application described and / or claimed herein.
[0066] As Figure 3 shown, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. The memory stores a computer program executable by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the random access memory (RAM) 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the read-only memory (ROM) 12, and the random access memory (RAM) 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.
[0067] Multiple components in the electronic device 10 are connected to the input / output (I / O) interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disc, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0068] The processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as method text processing.
[0069] In some embodiments, the method text processing can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the read-only memory (ROM) 12 and / or the communication unit 19. When the computer program is loaded into the random access memory (RAM) 13 and executed by the processor 11, one or more steps of the method text processing described above can be executed. Alternatively, in other embodiments, the processor 11 can be configured to execute the method text processing in any other suitable way (e.g., by means of firmware).
[0070] The various embodiments of the systems and technologies described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs, which can be executed and / or interpreted on a programmable system including at least one programmable processor, the programmable processor can be a special or general-purpose programmable processor, can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0071] A computer program for implementing the method of the present application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The computer programs can be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0072] In the context of the present application, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0073] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, speech input, or tactile input).
[0074] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.
[0075] A computing system can include a client and a server. The client and the server are generally remote from each other and typically interact through a communication network. The client-server relationship is created by computer programs that run on respective computers and have a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, solving the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.
[0076] An embodiment of the present application also provides a computer program product, including a computer program, which when executed by a processor, implements the text processing method provided in any embodiment of the present application.
[0077] In the process of implementing the computer program product, computer program code for performing the operations of the present application can be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network - including a local area network (LAN) or a wide area network (WAN) - or can be connected to an external computer (e.g., connected through the Internet using an Internet service provider).
[0078] Note that the above is only a preferred embodiment of the present application and the technical principles applied. Those skilled in the art will understand that the present application is not limited to the specific embodiments here, and various obvious changes, re-adjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the present application. Therefore, although the present application has been described in more detail through the above embodiments, the present application is not limited to the above embodiments only. Without departing from the concept of the present application, more other equivalent embodiments can be included, and the scope of the present application is determined by the scope of the appended claims.
Claims
1. A text processing method, characterized in that: include: Get the target text; The target text is processed based on a pre-constructed vector dictionary to obtain a target vector; wherein the vector dictionary is composed of a plurality of samples and corresponding text vectors; the text vector is obtained at least according to a semantic feature vector and a local difference vector; the local difference vector is obtained according to a local feature and a difference feature; The target vector is processed based on a target task model to obtain a text processing result; wherein the target task model is any one of a text classification model, a text clustering model, and a sentiment analysis model in the field of call center customer service.
2. The method according to claim 1, characterized in that The target text is processed based on a pre-built vector dictionary to obtain a target vector, including: Matching the target text with samples in the vector dictionary to obtain a matching result; If the matching result is a successful match, the corresponding vector in the vector dictionary is used as the target vector; If the matching result is a matching failure, the vector dictionary is updated based on the target text, so as to process the target text based on the updated vector dictionary.
3. The method according to claim 1, characterized in that in, The vector dictionary is constructed as follows: Obtain a training set that includes a variety of tasks; Performing local feature processing on each sample in the training set to obtain multiple target local features corresponding to each sample; Performing difference processing on each sample in the training set to obtain a plurality of difference features corresponding to each sample; Performing vector processing on each sample in the training set to obtain a semantic feature vector corresponding to each sample; For each of the samples, processing the corresponding multiple target local features and the multiple difference features to obtain a local difference vector corresponding to each of the samples; The semantic feature vector and the local difference vector are concatenated to obtain a text vector corresponding to each sample.
4. The method according to claim 3, characterized in that Perform local feature processing on each sample in the training set to obtain multiple target local features corresponding to each sample, including: A first setting window size, a second setting window size, a third setting window size and a fourth setting window size are set respectively; wherein the first setting window size is smaller than the second setting window size; the second setting window size is smaller than the third setting window size; the third setting window size is smaller than the fourth setting window size; Performing feature extraction on each sample according to the first set window size, the second set window size, the third set window size, and the fourth set window size, respectively, to obtain a plurality of initial local features corresponding to each set window size corresponding to each sample; Count the number of occurrences of each initial local feature corresponding to each set window size; The initial local features whose occurrence times are greater than or equal to the set threshold are used as target local features of the corresponding set window size.
5. The method according to claim 3, characterized in that: Performing difference processing on each sample in the training set to obtain multiple difference features corresponding to each sample, including: For any target sample, determine the number of intersection terms between the target sample and each of the remaining samples in the training set; wherein the remaining samples and the target sample constitute the training set; wherein the number of intersection terms is the number of words that exist in common in the target sample and any one of the remaining samples; Determine the number of union terms between the target sample and each of the remaining samples in the training set; wherein the number of union terms is the number of words removed from the target sample after the target sample is combined with any one of the remaining samples; Based on the number of intersection terms, the number of union terms and the difference coefficient, the difference feature between the target sample and each sample in the remaining samples is determined.
6. The method according to claim 4, characterized in that For each of the samples, the corresponding multiple target local features and the multiple difference features are processed to obtain a local difference vector corresponding to each of the samples, including: Performing vector conversion on a plurality of target local features corresponding to each set window size of each sample to obtain a local vector corresponding to each set window size of each sample; Fusing the local vectors corresponding to each set window size in each sample to obtain a local fusion vector corresponding to each sample; The local fusion vector corresponding to each sample is fused with the multiple difference features corresponding to each sample to obtain the local difference vector corresponding to each sample.
7. A text processing device, characterized in that: include: A target text acquisition module is used to acquire the target text; A text processing module, used to process the target text based on a pre-built vector dictionary to obtain a target vector; wherein the vector dictionary is composed of a plurality of samples and corresponding text vectors; the text vector is obtained at least according to a semantic feature vector and a local difference vector; The vector processing module is used to process the target vector based on the target task model to obtain a text processing result; wherein the target task model is any one of a text classification model, a text clustering model and a sentiment analysis model in the field of call center customer service.
8. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the text processing method as described in any one of claims 1-6.
9. A storage medium comprising computer executable instructions, wherein the computer executable instructions are used to perform the text processing method according to any one of claims 1 to 6 when executed by a computer processor.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the text processing method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Emotion analysis method and device
CN106502989A
Image text matching discrimination method and system based on fine-grained semantic feature difference
CN114329034A
Aspect-level sentiment analysis method and device, electronic equipment and storage medium
CN115017916A
Text analysis method, sentiment classification model, device, medium, terminal and product
CN115828889A
Text matching method and device, electronic equipment and storage medium
CN118797048A