WO2021139486A1 - 文本增量方法、装置及终端设备 - Google Patents
文本增量方法、装置及终端设备 Download PDFInfo
- Publication number
- WO2021139486A1 WO2021139486A1 PCT/CN2020/136069 CN2020136069W WO2021139486A1 WO 2021139486 A1 WO2021139486 A1 WO 2021139486A1 CN 2020136069 W CN2020136069 W CN 2020136069W WO 2021139486 A1 WO2021139486 A1 WO 2021139486A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- text
- incremented
- feature matrix
- feature
- preset
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/332—Query formulation
- G06F16/3329—Natural language query formulation or dialogue systems
Definitions
- This application belongs to the technical field of natural language processing, and in particular relates to a text increment method, device, terminal device, and computer-readable storage medium.
- the inventor realizes that in many artificial intelligence fields such as question answering systems and machine translation, there is a need to generate other text data based on original text data.
- a human-machine question answering system when a user asks a robot, the robot's answer needs to be related to the user's question, that is, the answer text data generated by the robot is required to be correlated with the text data the user asks.
- One of the purposes of the embodiments of this application is to provide a text increment method, device, terminal device, and computer-readable storage medium, and provide a new text increment solution, which improves the incremental text and the to-be-incremented text The degree of relevance.
- the first aspect of the embodiments of the present application provides a text increment method, including:
- the feature matrix is input into a variational autoencoder corresponding to the text theme to obtain the incremental text of the text to be incremented.
- a second aspect of the embodiments of the present application provides a text increment device, including:
- the acquisition module is used to acquire the text to be incremented
- An extraction module configured to perform feature extraction on the text to be incremented to obtain a feature matrix corresponding to the text to be incremented
- the determining module is used to determine the text subject of the text to be incremented
- the increment module is used to input the characteristic matrix into the variational autoencoder corresponding to the text theme to obtain the incremental text of the text to be incremented.
- the third aspect of the embodiments of the present application provides a terminal device, including: a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor executes the computer program When realized:
- the feature matrix is input into a variational autoencoder corresponding to the text theme to obtain the incremental text of the text to be incremented.
- the fourth aspect of the embodiments of the present application provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following is achieved:
- the feature matrix is input into a variational autoencoder corresponding to the text theme to obtain the incremental text of the text to be incremented.
- the fifth aspect of the embodiments of the present application also provides a computer program product, which when the computer program product runs on a terminal device, enables the terminal device to execute:
- the feature matrix is input into a variational autoencoder corresponding to the text theme to obtain the incremental text of the text to be incremented.
- the embodiment of the present application has the beneficial effect of first extracting the feature matrix of the text to be incremented to determine the text theme of the text to be incremented, and then combining the VAE corresponding to the text theme to generate the incremental text.
- the VAE corresponding to the text topic is used to generate incremental text, and different topics are set to a different VAE;
- the distribution calculated by the VAE depends on the input variables, all samples of this distribution will be generated and input Similar or related output itself can help to achieve certainty when generating text. Therefore, through the dual effects of these two aspects, the complete randomness when generating text is avoided, and the correlation between the incremental text and the text to be incremented is improved. Thereby, the quality of text generation can be greatly improved.
- FIG. 1 is a schematic structural diagram of a mobile phone to which the text increment method provided by an embodiment of the present application is applicable;
- FIG. 2 is a schematic flowchart of a text increment method provided by an embodiment of the present application
- FIG. 3 is a schematic flowchart of step 202 in the text increment method provided by an embodiment of the present application.
- FIG. 4 is a schematic structural diagram of a VAE in a text increment method provided by an embodiment of the present application
- FIG. 5 is a schematic structural diagram of a text increment device provided by an embodiment of the present application.
- Fig. 6 is a schematic structural diagram of a terminal device to which the text increment method provided by an embodiment of the present application is applicable.
- the text incremental method provided by the embodiments of this application can be applied to mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR)/virtual reality (VR) devices, notebook computers, and super mobile personal Computer (ultra-mobile personal computer, UMPC), netbooks, personal digital assistants (personal On terminal devices such as digital assistant (PDA), or servers, the embodiments of the present application do not impose any restrictions on the specific types of terminal devices.
- servers include, but are not limited to, independent servers, cloud servers, distributed servers, and server clusters.
- the terminal device may be a station (STAION, ST) in a WLAN, a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, and a wireless local loop (Wireless Local Loop) phone.
- STAION station
- ST station
- cellular phone a cellular phone
- cordless phone a Session Initiation Protocol (SIP) phone
- SIP Session Initiation Protocol
- WLAN Wireless Local Loop
- WLL Wireless Loop
- PDA handheld device with wireless communication function
- computing device or other processing equipment connected to wireless modem
- vehicle-mounted equipment car networking terminal
- computer, laptop computer, handheld communication device handheld computing Equipment
- satellite wireless equipment wireless modem cards
- TV set top boxes STB
- CPE customer premise equipment
- a mobile terminal in a 5G network or a mobile terminal in a public land mobile network (Public Land Mobile Network, PLMN) network that will evolve in the future.
- PLMN Public Land Mobile Network
- the wearable device can also be a general term for applying wearable technology to intelligently design daily wear and develop wearable devices, such as glasses, gloves, Watches, clothing and shoes, etc.
- a wearable device is a portable device that is directly worn on the body or integrated into the user's clothes or accessories.
- Wearable devices are not only a kind of hardware device, but also realize powerful functions through software support, data interaction, and cloud interaction.
- wearable smart devices include full-featured, large-sized, complete or partial functions that can be implemented without relying on smart phones, such as smart watches or smart glasses, and only focus on a certain type of application function, and need to be used in conjunction with other devices such as smart phones. , Such as all kinds of smart bracelets and smart jewelry for physical sign monitoring.
- Fig. 1 shows a block diagram of a part of the structure of a mobile phone provided in an embodiment of the present application.
- the mobile phone includes: radio frequency (Radio Frequency (RF) circuit 110, memory 120, input unit 130, display unit 140, sensor 150, audio circuit 160, wireless fidelity (WiFi) module 170, processor 180, power supply 190 and other components.
- RF Radio Frequency
- the RF circuit 110 can be used for receiving and sending signals during information transmission or communication. In particular, after receiving the downlink information of the base station, it is processed by the processor 180; in addition, the designed uplink data is sent to the base station.
- the RF circuit includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, and the like.
- the RF circuit 110 can also communicate with the network and other devices through wireless communication.
- the above-mentioned wireless communication can use any communication standard or protocol, including but not limited to the Global System of Mobile Communication System (Global System of Mobile Communication).
- GSM Global System for Mobile Communications
- GPRS General Packet Radio Service
- CDMA Code Division Multiple Access
- WCDMA Wideband Code Division Multiple Access
- LTE Long Term Evolution
- SMS Short Message Service
- the memory 120 may be used to store software programs and modules.
- the processor 180 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 120.
- the memory 120 may mainly include a program storage area and a data storage area.
- the program storage area may store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.), and a boot loader (Boot Loader). Etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, phone book, etc.), etc.
- the memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices. It can be understood that, in this embodiment of the present application, the memory 120 stores a text increment program.
- the input unit 130 may be used to receive inputted numeric or character information, and generate key signal input related to user settings and function control of the mobile phone 100.
- the input unit 130 may include a touch panel 131 and other input devices 132.
- the touch panel 131 also called a touch screen, can collect user touch operations on or near it (for example, the user uses any suitable objects or accessories such as fingers, stylus, etc.) on the touch panel 131 or near the touch panel 131. Operation), and drive the corresponding connection device according to the preset program.
- the touch panel 131 may include two parts: a touch detection device and a touch controller.
- the touch detection device detects the user's touch position, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it To the processor 180, and can receive and execute the commands sent by the processor 180.
- the touch panel 131 can be implemented in multiple types such as resistive, capacitive, infrared, and surface acoustic wave.
- the input unit 130 may also include other input devices 132.
- the other input device 132 may include, but is not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackball, mouse, and joystick.
- the display unit 140 may be used to display information input by the user or information provided to the user and various menus of the mobile phone.
- the display unit 140 may include a display panel 141.
- the display panel 141 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
- the touch panel 131 can cover the display panel 141. When the touch panel 131 detects a touch operation on or near it, it transmits it to the processor 180 to determine the type of the touch event, and then the processor 180 responds to the touch event. The type provides corresponding visual output on the display panel 141.
- the touch panel 131 and the display panel 141 are used as two independent components to realize the input and input functions of the mobile phone, but in some embodiments, the touch panel 131 and the display panel 141 can be integrated. Realize the input and output functions of the mobile phone.
- the mobile phone 100 may also include at least one sensor 150, such as a light sensor, a motion sensor, and other sensors.
- the light sensor may include an ambient light sensor and a proximity sensor.
- the ambient light sensor can adjust the brightness of the display panel 141 according to the brightness of the ambient light.
- the proximity sensor can close the display panel 141 and/or when the mobile phone is moved to the ear. Or backlight.
- the accelerometer sensor can detect the magnitude of acceleration in various directions (usually three-axis), and can detect the magnitude and direction of gravity when it is stationary.
- mobile phone posture applications such as horizontal and vertical screen switching, related Games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, percussion), etc.; as for other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which can be configured in mobile phones, we will not here Go into details.
- the audio circuit 160, the speaker 161, and the microphone 162 can provide an audio interface between the user and the mobile phone.
- the audio circuit 160 can transmit the electrical signal converted from the received audio data to the speaker 161, which is converted into a sound signal for output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal, which is then output by the audio circuit 160. After being received, it is converted into audio data, and then processed by the audio data output processor 180, and then sent to, for example, another mobile phone via the RF circuit 110, or the audio data is output to the memory 120 for further processing.
- WiFi is a short-distance wireless transmission technology.
- the mobile phone can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 170. It provides users with wireless broadband Internet access.
- FIG. 1 shows the WiFi module 170, it is understandable that it is not a necessary component of the mobile phone 100, and can be omitted as needed without changing the essence of the invention.
- the processor 180 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. It executes by running or executing software programs and/or modules stored in the memory 120 and calling data stored in the memory 120. Various functions and processing data of the mobile phone can be used to monitor the mobile phone as a whole.
- the processor 180 may include one or more processing units; preferably, the processor 180 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, application programs, etc. , The modem processor mainly deals with wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 180. It can be understood that, in the embodiment of the present application, a text increment program is stored in the memory 120, and the processor 180 may be used to call and execute the text increment program stored in the memory 120, so as to realize the Text increment method.
- the mobile phone 100 also includes a power source 190 (such as a battery) for supplying power to various components.
- a power source 190 such as a battery
- the power source may be logically connected to the processor 180 through a power management system, so that functions such as charging, discharging, and power consumption management can be managed through the power management system.
- the mobile phone 100 may also include a camera.
- the position of the camera on the mobile phone 100 may be front-mounted, rear-mounted, or built-in (which can extend out of the body when in use), which is not limited in the embodiment of the present application.
- the mobile phone 100 may include a single camera, a dual camera, or a triple camera, etc., which is not limited in the embodiment of the present application.
- Cameras include, but are not limited to, wide-angle cameras, telephoto cameras, or depth cameras.
- the mobile phone 100 may include three cameras, of which one is a main camera, one is a wide-angle camera, and one is a telephoto camera.
- the multiple cameras may be all front-mounted, or all rear-mounted, or all built-in, or at least partially front-mounted, or at least partially rear-mounted, or at least partially built-in, etc.
- the application embodiment does not limit this.
- the mobile phone 100 may also include a Bluetooth module, etc., which will not be repeated here.
- Fig. 2 shows an implementation flowchart of a text increment method provided by an embodiment of the present application.
- the text increment method is applied to terminal equipment.
- the text increment method can be applied to the mobile phone 100 having the above hardware structure.
- the text increment method includes steps S201 to S204, and the specific implementation principles of each step are as follows.
- the text to be incremented is an object for text increment, such as sentence text.
- the to-be-incremented text can be the text input by the user through the input unit of the terminal device; it can also be the voice data collected by the user through the audio collection unit of the terminal device; it can also be the text captured by the user through the camera of the terminal device.
- a picture of the text can also be a picture including text that the user scans instantly through the scanning device of the terminal device; it can also be the text originally stored in the terminal device; it can even be the terminal device from other terminal devices through a wired or wireless network The text obtained at the location, etc.
- the text in the picture needs to be extracted as the text to be incremented by enabling the image recognition function of the terminal device; for voice data, the audio-to-text function of the terminal device needs to be recognized for The text is the text to be incremented.
- the audio-to-text function is enabled to obtain the text input by the user.
- the user can activate the text increment function of the terminal device by clicking a specific physical button or virtual button of the terminal device.
- the terminal device will automatically follow steps S202 to steps for the text entered by the user.
- the process of S204 performs processing to obtain the incremental text. It should be noted here that the order of the user inputting text and clicking the button can be interchanged, that is, you can click the button first, and then get the text input by the user.
- the text input by the user is automatically processed according to the process from step S202 to step S204. .
- the terminal device when the user wants to increment the text stored in the terminal device, he can activate the text increment function of the terminal device by clicking a specific physical button or virtual button. And if the text to be incremented is selected, the terminal device will automatically process the selected text to be incremented according to the process from step S202 to step S204 to obtain the incremental text. What needs to be explained here is that the order of clicking the button and selecting the text can be interchanged, that is, you can also select the text first, and then enable the text increment function of the terminal device.
- S202 Perform feature extraction on the text to be incremented to obtain a feature matrix corresponding to the text to be incremented.
- Step S202 is a step of performing feature extraction on the text to be incremented, obtaining a feature matrix corresponding to the text to be incremented, and implementing a low-dimensional matrix to represent the text.
- the feature extraction of the text to be incremented may be performed through the word vector model to obtain the feature matrix corresponding to the text to be incremented.
- the text to be incremented is converted into a feature matrix through the word vector model.
- Word vector models include but are not limited to word2vec (word to vector), ELMo, and BERT (Bidirectional Encoder Representation from Transformers) models.
- word2vec word to vector
- ELMo word to vector
- BERT Binary Encoder Representation from Transformers
- the word vector model is used to convert the abstract existing text in the real world into a vector or matrix that can be operated on by mathematical formulas. Processing the data into machine-processable data enables the implementation of this application.
- step S202 includes: performing feature extraction on the to-be-incremented text through a preset BERT model to obtain a feature matrix corresponding to the to-be-incremented text.
- the text to be incremented is converted into an N ⁇ 768-dimensional feature matrix through a preset BERT model.
- the preset BERT model includes 24 coding layers, that is to say, the BERT Large model is adopted.
- Transformer in this model The number of blocks is 24; wherein, the text to be incremented includes N characters, and N is a positive integer.
- Each row in the feature matrix corresponds to a foreign character (or a Chinese character) of the text to be incremented.
- the feature matrix can reflect the semantic features of the text to be incremented.
- the text to be incremented is "I love my motherland!"
- the number of Chinese characters including punctuation marks is 7
- the number of Chinese characters excluding punctuation marks is 6.
- a BERT model including 12 coding layers that is, a BERT Base model, is used, and the number of Transformer blocks in the model is 12.
- step S202 includes step S2021 to step S2023.
- the to-be-incremented text first perform word segmentation and part-of-speech tagging, and then remove stop words according to the preset stop word dictionary, and remove non-prepositions, localizers, and modal particles according to the part-of-speech of the words after the word segmentation. Feature words, get the keyword set of the text to be incremented.
- Step S2021 filters some noise data by acquiring the keywords of the text to be incremented, and while ensuring the accuracy of the results, it also appropriately reduces the amount of data, improves the processing efficiency, reduces the occupation of system resources, and reduces the cost of computing power.
- the terminal device pre-stores the corresponding relationship between the keyword and the feature vector, and obtains the feature vector corresponding to each keyword by searching for the corresponding relationship between the keyword and the feature vector.
- step S2022 the corresponding relationship between the keyword and the feature vector is established in advance, and the method for establishing the corresponding relationship is as follows:
- the corpus of various channels is crawled through web crawler technology and organized into a collection of documents.
- each feature vector has the same dimension, and an N-dimensional (N is a positive integer) word vector is used, and the value of each word vector is between 0 to 1, or -1 to 1.
- the corresponding relationship between keywords and feature vectors is established.
- the feature vector corresponding to the keyword can be obtained, and each keyword can be converted into a feature vector.
- combining the feature vectors corresponding to all keywords is to splice the feature vectors of all keywords to generate a feature matrix.
- the feature matrix obtained by combining M 1 ⁇ N eigenvectors can be M ⁇ N dimensional or 1 ⁇ (M+N) dimension.
- a deep learning network model is used to perform feature extraction on the text to be incremented to obtain a feature matrix corresponding to the text to be incremented.
- the deep learning network model is used to extract the features of the text to be incremented.
- the deep learning network model outputs the feature matrix corresponding to the text to be incremented.
- the deep learning network model may be a deep learning network model based on machine learning technology, including but not limited to a deep convolutional neural network model, and a deep residual convolutional neural network model (Res Net), etc.
- deep convolutional neural network models include but are not limited to AlexNet, VGG-Net, and DenseNet.
- the loss function used can be one of 0-1 loss function, absolute value loss function, logarithmic loss function, exponential loss function, and hinge loss function, or a combination of at least both.
- the process of training the model can be implemented on a terminal device or on other terminal devices that communicate with the terminal device.
- the terminal device stores the trained model, or other terminal devices push the trained model to the terminal device, the terminal device can perform feature extraction on the acquired text to be incremented.
- the to-be-incremented text obtained by the terminal device in the process of text increment can also be used to increase the data of the sample database of the training model, and perform further optimization of the model on the terminal device or other terminal devices.
- the terminal device then stores the further optimized model in the terminal device to replace the previous model. By optimizing the model in this way, the data breadth of the model is increased, thereby increasing the scope of application of the solution of the present application.
- step 203 the text theme of the text to be incremented is determined, so that in the subsequent step S204, a variational autoencoder (Variational Autoencoder, VAE) corresponding to the text theme is used to increase the feature matrix.
- a variational autoencoder Variational Autoencoder, VAE
- a document topic generation model (Latent Dirichlet Allocation, LDA) is used to identify the text topic of the text to be incremented.
- LDA is an unsupervised machine learning technology that can be used to identify the subject information hidden in a large-scale document collection or corpus.
- step S202 and step S203 are described in front and back, and the labels are also different in size, but the front and back in the description and the size of the labels do not mean that the sequence relationship of the steps is specifically limited.
- step S202 may be performed before step S203, may also be performed after step S203, or may be performed simultaneously with step S203.
- the present application does not specifically limit the timing relationship between steps S202 and S203.
- the terminal device prestores multiple VAEs, and each VAE corresponds to a text theme. After the text subject of the text to be incremented is determined in step 203, the VAE corresponding to the text subject of the text to be incremented is determined from a plurality of pre-stored VAEs, so that the text to be incremented is incremented based on the determined VAE.
- the text increment is performed based on the VAE corresponding to the text subject of the text to be incremented, which greatly improves the correlation between the increment text and the text to be incremented, and greatly improves the accuracy of text generation.
- VAE consists of two parts, including encoder and decoder.
- VAE's encoder does not directly output codes, but considers that all codes conform to a normal distribution.
- the mean and variance calculation module of the encoder calculates the mean and variance of the normal distribution. Based on the mean and variance, a normal distribution can be determined. , Sampling from the determined normal distribution to obtain a sample code, and then input this sample code into the generator of the decoder to generate incremental text data. That is to say, in the embodiment of this application, it can be considered that each text to be incremented corresponds to a code in the normal distribution.
- the normal distribution is estimated from the existing training data, and then only the normal By sampling in the distribution, new codes can be obtained to generate incremental text data.
- a relatively simple Recurrent Neural Network is used as the encoder and decoder.
- the encoder will receive the characteristic matrix as input, and output the variance and mean value.
- the decoder determines the normal distribution based on the variance and mean value, and samples from the normal distribution to obtain the sample code.
- the sample code vector sampled from the normal distribution is input at each time step of the RNN of the decoder, so that the output of each time step is connected to a fully connected layer and the softmax function to generate each word at that position
- the probability of occurrence we choose the word with the highest probability as the word that appears at this time step. It should be noted that if the length of the generated text does not actually have that many time steps, the part that exceeds the length will generate a preset character to represent padding.
- the BERT mentioned above The N ⁇ 768-dimensional feature matrix output by the Large model.
- the encoder After receiving this feature matrix, the encoder returns a vector with a dimension of 1 ⁇ 256; this vector is then connected to two fully connected layers, and the two fully connected layers output two For a vector of size 1 ⁇ 256, these two outputs are the mean and variance.
- the high-dimensional text vector output by the BERT model contains extremely rich information, which is very suitable for VAE encoders to process it into semantic encoding.
- the distribution calculated by VAE depends on Input variables, all sampling of this distribution will generate output similar or related to the input, which itself can help achieve certainty when generating text, so the dual effect of the combination of BERT model and VAE avoids randomness when generating text.
- the correlation between the incremental text and the to-be-incremented text is greatly improved, so that the quality of text generation can be greatly improved.
- the corpus in the corpus is first classified into text topics, and then a VAE is trained for each category of corpus, so as to obtain multiple VAEs corresponding to different text themes.
- the feature matrix of the text to be incremented is extracted first, and the text topic of the text to be incremented is determined, and then the incremental text is generated by combining the VAE corresponding to the text topic.
- the VAE corresponding to the text topic is used to generate incremental text, and different topics are set to a different VAE;
- the distribution calculated by the VAE depends on the input variables, all samples of this distribution will be generated and input Similar or related output itself can help to achieve certainty when generating text. Therefore, through the dual effects of these two aspects, the complete randomness when generating text is avoided, and the correlation between the incremental text and the text to be incremented is improved. Thereby, the quality of text generation can be greatly improved.
- FIG. 5 shows a structural block diagram of the text increment device provided in an embodiment of the present application. For ease of description, only the information related to the embodiment of the present application is shown. section.
- the device includes:
- the obtaining module 51 is used to obtain the text to be incremented
- the extraction module 52 is configured to perform feature extraction on the text to be incremented to obtain a feature matrix corresponding to the text to be incremented;
- the determining module 53 is used to determine the text subject of the text to be incremented
- the increment module 54 is configured to input the characteristic matrix into a variational autoencoder corresponding to the text theme to obtain the incremental text of the text to be incremented.
- the extraction module 52 specifically includes:
- the conversion sub-module is used to convert the to-be-incremented text into a feature matrix through a preset word vector model.
- the conversion sub-module specifically includes:
- the conversion unit is configured to perform feature extraction on the text to be incremented by using a preset BERT model to obtain a feature matrix corresponding to the text to be incremented.
- the conversion unit specifically includes:
- the conversion subunit is used to convert the text to be incremented into an N ⁇ 768-dimensional feature matrix through a preset BERT model, the preset BERT model including 24 coding layers; wherein, the text to be incremented Contains N characters, and N is a positive integer.
- the conversion sub-module specifically includes:
- the first acquiring unit is configured to acquire the keywords of the text to be incremented
- the second acquiring unit is configured to acquire the feature vector corresponding to each of the keywords
- the combination unit is used to combine all the feature vectors corresponding to the keywords to generate a feature matrix.
- the increment module 54 specifically includes:
- a sampling sub-module configured to determine a normal distribution according to the mean value and the variance, and sample the normal distribution to obtain a sampling code
- a generating sub-module is used to input the sample code into the decoder of the variational auto-encoder to generate the incremental text of the text to be incremented.
- the description is relatively simple, and for related parts, please refer to the description of the method embodiment part.
- FIG. 6 is a schematic structural diagram of a terminal device provided by an embodiment of the application.
- the terminal device 6 of this embodiment includes: at least one processor 60 (only one processor is shown in FIG. 6), a memory 61, and a memory 61 that is stored in the memory 61 and can be processed in the at least one processor.
- the computer program 62 running on the processor 60 implements the steps in the foregoing method embodiments when the processor 60 executes the computer program 62.
- a terminal device includes: a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and when the processor executes the computer program:
- the feature matrix is input into a variational autoencoder corresponding to the text theme to obtain the incremental text of the text to be incremented.
- the text to be incremented is converted into a feature matrix through a preset word vector model.
- the preset BERT model includes 24 coding layers; wherein, the to-be-incremented text includes N characters, and N Is a positive integer.
- the sample code is input into the decoder of the variational autoencoder to generate the incremental text of the to-be-incremented text.
- the embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it realizes:
- the feature matrix is input into a variational autoencoder corresponding to the text theme to obtain the incremental text of the text to be incremented.
- the text to be incremented is converted into a feature matrix through a preset word vector model.
- the preset BERT model includes 24 coding layers; wherein, the to-be-incremented text includes N characters, and N Is a positive integer.
- the sample code is input into the decoder of the variational autoencoder to generate the incremental text of the to-be-incremented text.
- the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the implementation of all or part of the processes in the methods of the above-mentioned embodiments can be accomplished by instructing relevant hardware through computer-readable instructions.
- the computer-readable instructions can be stored in a non-volatile computer readable. In the storage medium, when the computer-readable instructions are executed, they may include the processes of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database, or other media used in the embodiments provided in this application may include non-volatile and/or volatile memory.
- Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
- Volatile memory may include random access memory (RAM) or external cache memory.
- RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Computational Linguistics (AREA)
- Human Computer Interaction (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- Machine Translation (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
一种文本增量方法、装置及终端设备,适用于自然语言处理技术领域,所述方法包括:获取待增量文本(S201);对所述待增量文本进行特征提取,获得所述待增量文本对应的特征矩阵(S202);确定所述待增量文本的文本主题(S203);将所述特征矩阵输入与所述文本主题对应的变分自编码器,获得所述待增量文本的增量文本(S204)。该方法提高了增量文本与待增量文本的相关度,从而大大提高了生成文本的准确度。
Description
本申请要求于2020年01月08日在中国专利局提交的、申请号为 202010019294.8 、发明名称为“文本增量方法、装置及终端设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请属于自然语言处理技术领域,尤其涉及一种文本增量方法、装置、终端设备及计算机可读存储介质。
当前,发明人意识到,在诸如问答***、机器翻译等很多人工智能领域,都有根据原始文本数据生成其他文本数据的需求。例如人机问答***中,当用户询问机器人时,机器人的回答需与用户的问题相关,也就是说,要求机器人生成的回答文本数据与用户询问的文本数据之间相关联。
但是传统的文本生成模型面临的挑战是,生成的文本随机性过强,因此,亟需提供一种新的文本增量方案。
本申请实施例的目的之一在于:提供一种文本增量方法、装置、终端设备及计算机可读存储介质,提供了一种新的文本增量方案,提高了增量文本与待增量文本的相关度。
为解决上述技术问题,本申请实施例采用的技术方案是:
本申请实施例的第一方面提供了一种文本增量方法,包括:
获取待增量文本;
对所述待增量文本进行特征提取,获得所述待增量文本对应的特征矩阵;
确定所述待增量文本的文本主题;
将所述特征矩阵输入与所述文本主题对应的变分自编码器,获得所述待增量文本的增量文本。
本申请实施例的第二方面提供了一种文本增量装置,包括:
获取模块,用于获取待增量文本;
提取模块,用于对所述待增量文本进行特征提取,获得所述待增量文本对应的特征矩阵;
确定模块,用于确定所述待增量文本的文本主题;
增量模块,用于将所述特征矩阵输入与所述文本主题对应的变分自编码器,获得所述待增量文本的增量文本。
本申请实施例的第三方面提供了一种终端设备,包括:存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现:
获取待增量文本;
对所述待增量文本进行特征提取,获得所述待增量文本对应的特征矩阵;
确定所述待增量文本的文本主题;
将所述特征矩阵输入与所述文本主题对应的变分自编码器,获得所述待增量文本的增量文本。
本申请实施例的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现:
获取待增量文本;
对所述待增量文本进行特征提取,获得所述待增量文本对应的特征矩阵;
确定所述待增量文本的文本主题;
将所述特征矩阵输入与所述文本主题对应的变分自编码器,获得所述待增量文本的增量文本。
本申请实施例的第五方面还提供了一种计算机程序产品,当所述计算机程序产品在终端设备上运行时,使得所述终端设备执行时实现:
获取待增量文本;
对所述待增量文本进行特征提取,获得所述待增量文本对应的特征矩阵;
确定所述待增量文本的文本主题;
将所述特征矩阵输入与所述文本主题对应的变分自编码器,获得所述待增量文本的增量文本。
本申请实施例与现有技术相比存在的有益效果是:通过先提取待增量文本的特征矩阵,确定待增量文本的文本主题,再结合与文本主题对应的VAE生成增量文本。一方面,利用与文本主题对应的VAE生成增量文本,不同的主题设置一个不同的VAE;另一方面,由于VAE计算出的分布依赖于输入的变量,所有对这个分布的采样都会生成与输入相似或相关的输出,其本身可以帮助生成文本时实现确定性,因而通过这两方面的双重作用就避免了生成文本时的完全随机性,提高了增量文本与待增量文本的相关度,从而可以大幅提升文本生成的质量。
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或示范性技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1是本申请一实施例提供的文本增量方法所适用于的手机的结构示意图;
图2是本申请一实施例提供的文本增量方法的流程示意图;
图3是本申请一实施例提供的文本增量方法中步骤202的流程示意图;
图4是本申请一实施例提供的文本增量方法中VAE的结构示意图;
图5是本申请一实施例提供的文本增量装置的结构示意图;
图6是本申请一实施例提供的文本增量方法所适用于的终端设备的结构示意图。
以下描述中,为了说明而不是为了限定,提出了诸如特定***结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域技术人员应当清楚,在没有这些具体细节的其他实施例中也可以实现本申请。在其他情况中,省略对众所周知的***、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。
下面通过具体实施例来说明本申请的技术方案。
本申请实施例提供的文本增量方法可以应用于手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile
personal computer,UMPC)、上网本、个人数字助理(personal
digital assistant,PDA)、或服务器等终端设备上,本申请实施例对终端设备的具体类型不作任何限制。其中,服务器包括但不限于独立服务器、云端服务器、分布式服务器和服务器集群等。
例如,所述终端设备可以是WLAN中的站点(STAION,ST),可以是蜂窝电话、无绳电话、会话启动协议(Session InitiationProtocol,SIP)电话、无线本地环路(Wireless Local
Loop,WLL)站、PDA、具有无线通信功能的手持设备、计算设备或连接到无线调制解调器的其它处理设备、车载设备、车联网终端、电脑、膝上型计算机、手持式通信设备、手持式计算设备、卫星无线设备、无线调制解调器卡、电视机顶盒(set top box,STB)、用户驻地设备(customer premise equipment,CPE)和/或用于在无线***上进行通信的其它设备以及下一代通信***,例如,5G网络中的移动终端或者未来演进的公共陆地移动网络(Public Land Mobile Network,PLMN)网络中的移动终端等。
作为示例而非限定,当所述终端设备为可穿戴设备时,该可穿戴设备还可以是应用穿戴式技术对日常穿戴进行智能化设计、开发出可以穿戴的设备的总称,如眼镜、手套、手表、服饰及鞋等。可穿戴设备即直接穿在身上,或是整合到用户的衣服或配件的一种便携式设备。可穿戴设备不仅仅是一种硬件设备,更是通过软件支持以及数据交互、云端交互来实现强大的功能。广义穿戴式智能设备包括功能全、尺寸大、可不依赖智能手机实现完整或者部分的功能,如智能手表或智能眼镜等,以及只专注于某一类应用功能,需要和其它设备如智能手机配合使用,如各类进行体征监测的智能手环、智能首饰等。
以所述终端设备为手机为例。图1示出的是与本申请实施例提供的手机的部分结构的框图。参考图1,手机包括:射频(Radio
Frequency,RF)电路110、存储器120、输入单元130、显示单元140、传感器150、音频电路160、无线保真(wireless fidelity,WiFi)模块170、处理器180、以及电源190等部件。本领域技术人员可以理解,图1中示出的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
下面结合图1对手机的各个构成部件进行具体的介绍:
RF电路110可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,给处理器180处理;另外,将设计上行的数据发送给基站。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路110还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯***(Global System of Mobile
communication,GSM)、通用分组无线服务(General
Packet Radio Service,GPRS)、码分多址(Code
Division Multiple Access,CDMA)、宽带码分多址(Wideband
Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE)、电子邮件、以及短消息服务(Short
Messaging Service,SMS)等。
存储器120可用于存储软件程序以及模块,处理器180通过运行存储在存储器120的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。存储器120可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作***、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)、引导装载程序(Boot Loader)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器120可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。可以理解的是,本申请实施例中,存储器120中存储有文本增量的程序。
输入单元130可用于接收输入的数字或字符信息,以及产生与手机100的用户设置以及功能控制有关的键信号输入。具体地,输入单元130可包括触控面板131以及其他输入设备132。触控面板131,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板131上或在触控面板131附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板131可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器180,并能接收处理器180发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板131。除了触控面板131,输入单元130还可以包括其他输入设备132。具体地,其他输入设备132可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。
显示单元140可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元140可包括显示面板141,可选的,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode, OLED)等形式来配置显示面板141。进一步的,触控面板131可覆盖显示面板141,当触控面板131检测到在其上或附近的触摸操作后,传送给处理器180以确定触摸事件的类型,随后处理器180根据触摸事件的类型在显示面板141上提供相应的视觉输出。虽然在图1中,触控面板131与显示面板141是作为两个独立的部件来实现手机的输入和输入功能,但是在某些实施例中,可以将触控面板131与显示面板141集成而实现手机的输入和输出功能。
手机100还可包括至少一种传感器150,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板141的亮度,接近传感器可在手机移动到耳边时,关闭显示面板141和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于手机还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。
音频电路160,扬声器161,传声器162可提供用户与手机之间的音频接口。音频电路160可将接收到的音频数据转换后的电信号,传输到扬声器161,由扬声器161转换为声音信号输出;另一方面,传声器162将收集的声音信号转换为电信号,由音频电路160接收后转换为音频数据,再将音频数据输出处理器180处理后,经RF电路110以发送给比如另一手机,或者将音频数据输出至存储器120以便进一步处理。
WiFi属于短距离无线传输技术,手机通过WiFi模块170可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图1示出了WiFi模块170,但是可以理解的是,其并不属于手机100的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。
处理器180是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器120内的软件程序和/或模块,以及调用存储在存储器120内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器180可包括一个或多个处理单元;优选的,处理器180可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作***、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器180中。可以理解的是,本申请实施例中,存储器120中存储有文本增量的程序,而处理器180可以用于调用存储器120中存储的文本增量的程序并执行,以实现本申请实施例的文本增量方法。
手机100还包括给各个部件供电的电源190(比如电池),优选的,电源可以通过电源管理***与处理器180逻辑相连,从而通过电源管理***实现管理充电、放电、以及功耗管理等功能。
尽管未示出,手机100还可以包括摄像头。可选地,摄像头在手机100的上的位置可以为前置的,也可以为后置的,还可以为内置的(在使用时可伸出机身),本申请实施例对此不作限定。
可选地,手机100可以包括单摄像头、双摄像头或三摄像头等,本申请实施例对此不作限定。摄像头包括但不限于广角摄像头、长焦摄像头或深度摄像头等。
例如,手机100可以包括三摄像头,其中,一个为主摄像头、一个为广角摄像头、一个为长焦摄像头。
可选地,当手机100包括多个摄像头时,这多个摄像头可以全部前置,或者全部后置,或者全部内置,或者至少部分前置,或者至少部分后置,或者至少部分内置等,本申请实施例对此不作限定。
另外,尽管未示出,手机100还可以包括蓝牙模块等,在此不再赘述。
图2示出了本申请实施例提供的一种文本增量方法的实现流程图。所述文本增量方法应用于终端设备。作为示例而非限定,该文本增量方法可以应用于具有上述硬件结构的手机100中。所述文本增量方法包括步骤S201至步骤S204,各个步骤的具体实现原理如下。
S201,获取待增量文本。
在本申请实施例中,所述待增量文本为进行文本增量的对象,例如句子文本等。
待增量文本可以是用户通过终端设备的输入单元即时输入的文本;还可以是用户通过终端设备的音频采集单元即时采集到的语音数据;还可以是用户通过终端设备的摄像头即时拍摄到的包括文本的图片;还可以是用户通过终端设备的扫描装置即时扫描到的包括文本的图片;还可以是原本已存储在终端设备中的文本;甚至可以是终端设备通过有线或无线网络从其它终端设备处所获取到的文本等。
需要说明的是,针对包括文本的图片,需要通过启用终端设备的图片识别功能提取图片中的文本作为待增量文本;针对语音数据,需要通过启动终端设备的音频转文字功能识别语音数据中的文本作为待增量文本。
在本申请一种非限定性使用场景中,当用户通过终端设备的音频采集单元采集到用户语音输入的一段语音数据后,启用音频转文字功能,获取到用户输入的文本,这时若用户想要进行文本增量,用户可以通过点击终端设备特定的物理按键或者虚拟按键的方式启用终端设备的文本增量功能,在这种模式下,终端设备会对用户输入的文本自动按照步骤S202至步骤S204的过程进行处理,得到增量文本。此处需要说明的是,用户输入文本和点击按键的顺序可以互换,即也可以先点击按键,再获取用户输入的文本,最后针对用户输入的文本自动按照步骤S202至步骤S204的过程进行处理。
在本申请另一种非限定性使用场景中,当用户想要对终端设备已经存储的文本进行增量时,可以通过点击特定的物理按键或者虚拟按键的方式启用终端设备的文本增量功能,并选定待增量文本,则终端设备会对选定的待增量文本自动按照步骤S202至步骤S204的过程进行处理,得到增量文本。此处需要说明的是,点击按键和选定文本的顺序可以互换,即也可以先选定文本,再启用终端设备的文本增量功能。
S202,对所述待增量文本进行特征提取,获得所述待增量文本对应的特征矩阵。
步骤S202为对待增量文本进行特征提取的步骤,获得所述待增量文本对应的特征矩阵,实现采用低维的矩阵表示文本。
在本申请一些实施例中,可以通过词向量模型对待增量文本进行特征提取,获得所述待增量文本对应的特征矩阵。也就是说,通过词向量模型将待增量文本转换成特征矩阵。
词向量模型包括但不限于word2vec(word to vector),ELMo,和BERT(Bidirectional Encoder Representation from Transformers)等模型。本申请实施例通过步骤S202,利用词向量模型,把真实世界抽象存在的文本转换成可以进行数学公式操作的向量或矩阵。将数据处理成可由机器处理的数据,使得本申请能够实施。
需要说明的是,在利用词向量模型之前,需要完成对词向量模型的训练,预训练产生词向量。此外,在对词向量模型的训练过程中,为了获得更准确的特征提取结果,可以保留待增量文本中的标点符号,对完整的待增量文本进行特征提取。
示例性地,BERT模型的训练过程中,为了能够在庞大的数据集上进行非监督的预训练,在训练过程中随机选择了用于训练的训练语句中15%的词作为要遮盖的词。这样的遮盖设计是为了让BERT模型实现对被遮盖位置进行填空,实现非监督的训练。
作为本申请一非限制性示例,步骤S202包括:通过预设的BERT模型对所述待增量文本进行特征提取,获得所述待增量文本对应的特征矩阵。
示例性地,通过预设的BERT模型将所述待增量文本转换为N×768维的特征矩阵,预设的所述BERT模型包括24层编码层,也就是说采用的是BERT Large模型,该模型中Transformer
块的个数为24个;其中,所述待增量文本包括N个字符,N为正整数。
特征矩阵中的每一行对应着待增量文本的一个外文字符(或一个中文字),显然特征矩阵可以反映待增量文本的语义特征。
例如,待增量文本为“我爱我的祖国!”,包括标点符号的中文字的字数为7,不包括标点符号的中文字的字数为6。
另一示例性地,采用包括12层编码层的BERT模型,即BERT Base模型,该模型中Transformer 块的个数为12个。
作为本申请另一非限制性示例,如图3所示,步骤S202包括步骤S2021至步骤S2023。
S2021,获取所述待增量文本的关键词。
其中,针对所述待增量文本,先进行分词和词性标注,然后根据预设的停用词词典去除停用词,并且根据分词后的词语的词性,去掉介词、方位词和语气词等非特征词,得到待增量文本的关键词集合。
步骤S2021通过获取待增量文本的关键词,过滤了一些噪音数据,保证结果精度的同时,也适当的减少了数据量,提高了处理效率,减少了***资源占用,降低了算力成本。
S2022,获取每个所述关键词对应的特征向量。
其中,终端设备预存有关键词与特征向量的对应关系,通过查找关键词与特征向量的对应关系,获取每个关键词对应的特征向量。
需要说明的是,在步骤S2022之前,预先建立关键词与特征向量的对应关系,对应关系的建立方法如下:
首先,通过网络爬虫技术爬取各种渠道的语料整理成为文档集合。
然后,运用开源的分词工具,对每篇文档进行分词和词性标注,然后根据预设的停用词词典去除停用词,并且根据分词后的词语的词性,去掉介词、方位词和语气词等非特征词,得到关键词集合。
最后,利用开源的词向量训练工具Word2Vec,训练上述关键词集合,得到不同的关键词对应的特征向量,将关键词与特征向量的对应关系进行存储,存储于词向量数据库。示例性的,每个特征向量都具有相同的维度,利用N维(N为正整数)的词向量,每个词向量的数值均在0至1,或-1至1之间。
通过上述方法建立好了关键词与特征向量的对应关系。通过查找对应关系,就可以获取到关键词对应的特征向量,从而将每个关键词转化成特征向量。
S2023,将所有所述关键词对应的所述特征向量进行组合,生成特征矩阵。
其中,将所有关键词对应的特征向量进行组合,是将所有关键词的特征向量进行拼接,以生成特征矩阵。
例如,当特征向量为1×N维,预设数量为M(M为正整数)时,M个1×N维的特征向量组合得到的特征矩阵可以为M×N维,也可以为1×(M+N)维。
在本申请一些实施例中,利用深度学习网络模型对待增量文本进行特征提取,获得与待增量文本对应的特征矩阵。
深度学习网络模型用于提取待增量文本的特征。当待增量文本输入深度学习网络模型,深度学习网络模型输出待增量文本对应的特征矩阵。深度学习网络模型可以为以机器学习技术为基础的深度学习网络模型,包括但不限于深度卷积神经网络模型,和深度残差卷积神经网络模型(Res Net)等。其中,深度卷积神经网络模型包括但不限于AlexNet,VGG-Net,和DenseNet等。
可以理解的是,在利用深度学习网络模型之前,需要完成对深度学习网络模型的训练。在训练深度学习网络模型的过程中,采用的损失函数可以为0-1损失函数,绝对值损失函数,对数损失函数,指数损失函数和铰链损失函数中的一种或者至少两者的组合。
需要说明的是,训练模型的过程,包括训练深度学习网络模型和训练词向量模型的过程,可以在终端设备实现,也可以在与终端设备进行通信连接的其他终端设备上实现。当终端设备将训练好的模型存储好,或者其他终端设备将训练好的模型推送至终端设备后,从而实现在终端设备对获取到的待增量文本进行特征提取。需要说明的是,终端设备在文本增量过程中获得的待增量文本还可以用以增加训练模型的样本数据库的数据,在终端设备或其他终端设备端执行模型的进一步优化,终端设备或其他终端设备再将进一步优化的模型存储到终端设备中以替换之前的模型。通过这种方式优化模型,提高了模型的数据广度,从而提高了本申请方案的适用范围。
S203,确定所述待增量文本的文本主题。
在步骤203中,确定待增量文本的文本主题,从而在后续的步骤S204中通过与文本主题对应的变分自编码器(Variational Autoencoder,VAE)实现对特征矩阵的增量。
在本申请一些实施例中,利用文档主题生成模型(Latent Dirichlet Allocation,LDA)识别所述待增量文本的文本主题。LDA是一种非监督机器学习技术,可以用来识别大规模文档集(document collection)或语料库(corpus)中潜藏的主题信息。
可以理解的是,此处仅为示例性说明,不能解释为对本申请的具体限制。所有能实现确定待增量文本的文本主题的方式都适用于本申请。
需要说明的是,虽然步骤S202和步骤S203在描述上有前后之分,标号也有大小之分,但是描述上的前后之分和标号的大小之分都不代表具体限制了步骤的先后时序关系。在本申请实施例中,步骤S202可以在步骤S203之前执行,还可以在步骤S203之后执行,还可以与步骤S203同时执行,本申请不具体限定步骤S202和S203之间的时序关系。
S204,将所述特征矩阵输入与所述文本主题对应的变分自编码器VAE,获得所述待增量文本的增量文本。
在本申请实施例中,终端设备预存有多个VAE,每个VAE对应一种文本主题。在步骤203确定待增量文本的文本主题后,从预存的多个VAE中确定出待增量文本的文本主题对应的VAE,从而基于确定出的VAE对待增量文本进行增量。
将特征矩阵输入文本主题对应的VAE,获得待增量文本的增量文本。基于与待增量文本的文本主题对应的VAE进行文本增量,大大提高了增量文本与待增量文本的相关程度,大幅提升了文本生成的准确度。
如图4所示,VAE由两部分构成,包括编码器与解码器。VAE的编码器不直接输出编码,而是认为所有的编码都符合一个正态分布,编码器的均值和方差计算模块计算出正态分布的均值与方差,基于均值与方差可以确定一个正态分布,从确定出的正态分布中进行采样获得一个采样编码,之后将这个采样编码输入到解码器的生成器中生成增量文本数据。也就是说,在本申请实施例中,可以认为每个待增量文本都对应着正态分布中的一个编码,先通过已有的训练数据估计出这个正态分布,之后只需要从正态分布中采样就可以获得新的编码来生成增量文本数据。
作为本申请一非限制性示例,使用一个较为简单的循环神经网络(Recurrent Neural Network,RNN)作为编码器和解码器。该编码器会接收特征矩阵作为输入,输出方差和均值,解码器基于方差和均值确定正态分布,在正态分布中进行采样获得采样编码。将从正态分布中采样得到的采样编码向量在解码器的RNN的每一个时间步进行输入,这样每一个时间步的输出在接入一个全连接层和softmax函数后生成每个词在该位置出现的概率,我们选择概率最大的词作为出现在这个时间步的词。需要说明的是,若生成的文本长度实际没有那么多个时间步,则超出长度的部分均会生成一个预设字符代表填充。
示例性地,上文所提到BERT
Large模型输出的N×768维的特征矩阵,编码器接收这个特征矩阵后返回一个维度为1×256的向量;这个向量之后分别接入两个全连接层,两个全连接层分别输出两个大小为1×256的向量,这两个输出就是均值和方差。基于均值和方差确定一个正态分布,在正态分布进行采样,获得采样编码,将采样编码加上一个方差后输入到解码器中,解码器会逐字符的生成增量文本。需要说明的是,本申请实施例能够生成增量文本,是因为对采样编码加上了方差,所以不会生成完全一样的增量文本。
在上述示例中,一方面,使用BERT模型输出的高维文本向量蕴含了极为丰富的信息量,非常适合于VAE的编码器将其加工为语义编码,另一方面,VAE计算出的分布依赖于输入的变量,所有对这个分布的采样都会生成与输入相似或相关的输出,其本身可以帮助生成文本时实现确定性,因而通过BERT模型和VAE结合的双重作用避免了生成文本时的随机性,大大提高了增量文本与待增量文本的相关度,从而可以大幅提升文本生成的质量。
可以理解的是,在利用VAE进行文本增量之前,需要完成对VAE的训练。
在本申请一非限制性示例中,获取到用于训练模型的大规模语料集后,先对语料集中的语料进行文本主题分类,再针对每个类别的语料,分别训练一个VAE,从而得到多个对应不同文本主题的VAE。
在本申请另一非限制性示例中,获取到用于训练模型的大规模语料集后,先基于语料集中的语料训练一个基础VAE;然后,在对语料集中的语料进行文本主题分类的基础上,针对每个类别的语料,基于基础VAE进行再训练,得到一个VAE,从而得到多个对应不同文本主题的VAE。
可以理解的是,在上述两个非限制性示例中,为了提高VAE文本增量结果的准确度,针对每种文本主题,语料集中都有对应的大规模语料。
本申请实施例通过先提取待增量文本的特征矩阵,并确定待增量文本的文本主题,再结合与文本主题对应的VAE生成增量文本。一方面,利用与文本主题对应的VAE生成增量文本,不同的主题设置一个不同的VAE;另一方面,由于VAE计算出的分布依赖于输入的变量,所有对这个分布的采样都会生成与输入相似或相关的输出,其本身可以帮助生成文本时实现确定性,因而通过这两方面的双重作用就避免了生成文本时的完全随机性,提高了增量文本与待增量文本的相关度,从而可以大幅提升文本生成的质量。
需要说明的是,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
对应于上文实施例所述的文本的增量方法,图5示出了本申请实施例提供的文本的增量装置的结构框图,为了便于说明,仅示出了与本申请实施例相关的部分。
参照图5,该装置包括:
获取模块51,用于获取待增量文本;
提取模块52,用于对所述待增量文本进行特征提取,获得所述待增量文本对应的特征矩阵;
确定模块53,用于确定所述待增量文本的文本主题;
增量模块54,用于将所述特征矩阵输入与所述文本主题对应的变分自编码器,获得所述待增量文本的增量文本。
其中,所述提取模块52,具体包括:
转换子模块,用于通过预设的词向量模型将所述待增量文本转换成特征矩阵。
其中,所述转换子模块,具体包括:
转换单元,用于通过预设的BERT模型对所述待增量文本进行特征提取,获得所述待增量文本对应的特征矩阵。
其中,所述转换单元,具体包括:
转换子单元,用于通过预设的BERT模型将所述待增量文本转换为N×768维的特征矩阵,预设的所述BERT模型包括24层编码层;其中,所述待增量文本包括N个字符,N为正整数。
其中,所述转换子模块,具体包括:
第一获取单元,用于获取所述待增量文本的关键词;
第二获取单元,用于获取每个所述关键词对应的特征向量;
组合单元,用于将所有所述关键词对应的所述特征向量进行组合,生成特征矩阵。
其中,所述增量模块54,具体包括:
输入子模块,用于将所述特征矩阵输入与所述文本主题对应的变分自编码器的编码器,得到所述特征矩阵的均值和方差;
采样子模块,用于根据所述均值和所述方差确定正态分布,从所述正态分布中进行采样获得采样编码;
生成子模块,用于将所述采样编码输入到变分自编码器的解码器中生成所述待增量文本的增量文本。
对于装置实施例而言,由于其与方法实施例基本相似,所以描述得比较简单,相关之处参见方法实施例部分的说明即可。
图6为本申请一实施例提供的终端设备的结构示意图。如图6所示,该实施例的终端设备6包括:至少一个处理器60(图6中仅示出一个处理器)、存储器61以及存储在所述存储器61中并可在所述至少一个处理器60上运行的计算机程序62,所述处理器60执行所述计算机程序62时实现上述各个方法实施例中的步骤。
在本申请实施例中,一种终端设备,包括:存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现:
获取待增量文本;
对所述待增量文本进行特征提取,获得所述待增量文本对应的特征矩阵;
确定所述待增量文本的文本主题;
将所述特征矩阵输入与所述文本主题对应的变分自编码器,获得所述待增量文本的增量文本。
在本申请实施例中,所述处理器执行所述计算机程序时还实现:
通过预设的词向量模型将所述待增量文本转换成特征矩阵。
在本申请实施例中,所述处理器执行所述计算机程序时还实现:
通过预设的BERT模型对所述待增量文本进行特征提取,获得所述待增量文本对应的特征矩阵。
在本申请实施例中,所述处理器执行所述计算机程序时还实现:
通过预设的BERT模型将所述待增量文本转换为N×768维的特征矩阵,预设的所述BERT模型包括24层编码层;其中,所述待增量文本包括N个字符,N为正整数。
在本申请实施例中,所述处理器执行所述计算机程序时还实现:
获取所述待增量文本的关键词;
获取每个所述关键词对应的特征向量;
将所有所述关键词对应的所述特征向量进行组合,生成特征矩阵。
在本申请实施例中,所述处理器执行所述计算机程序时还实现:
将所述特征矩阵输入与所述文本主题对应的变分自编码器的编码器,得到所述特征矩阵的均值和方差;
根据所述均值和所述方差确定正态分布,从所述正态分布中进行采样获得采样编码;
将所述采样编码输入到变分自编码器的解码器中生成所述待增量文本的增量文本。
本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现:
获取待增量文本;
对所述待增量文本进行特征提取,获得所述待增量文本对应的特征矩阵;
确定所述待增量文本的文本主题;
将所述特征矩阵输入与所述文本主题对应的变分自编码器,获得所述待增量文本的增量文本。
在本申请实施例中,所述计算机程序被处理器执行时还实现:
通过预设的词向量模型将所述待增量文本转换成特征矩阵。
在本申请实施例中,所述计算机程序被处理器执行时还实现:
通过预设的BERT模型对所述待增量文本进行特征提取,获得所述待增量文本对应的特征矩阵。
在本申请实施例中,所述计算机程序被处理器执行时还实现:
通过预设的BERT模型将所述待增量文本转换为N×768维的特征矩阵,预设的所述BERT模型包括24层编码层;其中,所述待增量文本包括N个字符,N为正整数。
在本申请实施例中,所述计算机程序被处理器执行时还实现:
获取所述待增量文本的关键词;
获取每个所述关键词对应的特征向量;
将所有所述关键词对应的所述特征向量进行组合,生成特征矩阵。
在本申请实施例中,所述计算机程序被处理器执行时还实现:
将所述特征矩阵输入与所述文本主题对应的变分自编码器的编码器,得到所述特征矩阵的均值和方差;
根据所述均值和所述方差确定正态分布,从所述正态分布中进行采样获得采样编码;
将所述采样编码输入到变分自编码器的解码器中生成所述待增量文本的增量文本。
本领域普通技术人员可以理解,所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink) DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制。尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。
Claims (20)
- 一种文本增量方法,其中,包括:获取待增量文本;对所述待增量文本进行特征提取,获得所述待增量文本对应的特征矩阵;确定所述待增量文本的文本主题;将所述特征矩阵输入与所述文本主题对应的变分自编码器,获得所述待增量文本的增量文本。
- 如权利要求1所述的文本增量方法,其中,对所述待增量文本进行特征提取,获得所述待增量文本对应的特征矩阵,包括:通过预设的词向量模型将所述待增量文本转换成特征矩阵。
- 如权利要求2所述的文本增量方法,其中,所述通过预设的词向量模型将所述待增量文本转换成特征矩阵,包括:通过预设的BERT模型对所述待增量文本进行特征提取,获得所述待增量文本对应的特征矩阵。
- 如权利要求3所述的文本增量方法,其中,所述通过预设的BERT模型对所述待增量文本进行特征提取,获得所述待增量文本对应的特征矩阵,包括:通过预设的BERT模型将所述待增量文本转换为N×768维的特征矩阵,预设的所述BERT模型包括24层编码层;其中,所述待增量文本包括N个字符,N为正整数。
- 如权利要求2所述的文本增量方法,其中,通过预设的词向量模型将所述待增量文本转换成特征矩阵,包括:获取所述待增量文本的关键词;获取每个所述关键词对应的特征向量;将所有所述关键词对应的所述特征向量进行组合,生成特征矩阵。
- 如权利要求1所述的文本增量方法,其中,所述将所述特征矩阵输入与所述文本主题对应的变分自编码器,获得所述待增量文本的增量文本,包括:将所述特征矩阵输入与所述文本主题对应的变分自编码器的编码器,得到所述特征矩阵的均值和方差;根据所述均值和所述方差确定正态分布,从所述正态分布中进行采样获得采样编码;将所述采样编码输入到变分自编码器的解码器中生成所述待增量文本的增量文本。
- 一种文本增量装置,其中,包括:获取模块,用于获取待增量文本;提取模块,用于对所述待增量文本进行特征提取,获得所述待增量文本对应的特征矩阵;确定模块,用于确定所述待增量文本的文本主题;增量模块,用于将所述特征矩阵输入与所述文本主题对应的变分自编码器,获得所述待增量文本的增量文本。
- 如权利要求7所述的文本增量装置,其中,所述提取模块,具体包括:转换子模块,用于通过预设的词向量模型将所述待增量文本转换成特征矩阵。
- 如权利要求8所述的文本增量装置,其中,所述转换子模块,具体包括:转换单元,用于通过预设的BERT模型对所述待增量文本进行特征提取,获得所述待增量文本对应的特征矩阵。
- 如权利要求9所述的文本增量装置,其中,所述转换单元,具体包括:转换子单元,用于通过预设的BERT模型将所述待增量文本转换为N×768维的特征矩阵,预设的所述BERT模型包括24层编码层;其中,所述待增量文本包括N个字符,N为正整数。
- 如权利要求8所述的文本增量装置,其中,所述转换子模块,具体包括:第一获取单元,用于获取所述待增量文本的关键词;第二获取单元,用于获取每个所述关键词对应的特征向量;组合单元,用于将所有所述关键词对应的所述特征向量进行组合,生成特征矩阵。
- 一种终端设备,其中,包括:存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现:获取待增量文本;对所述待增量文本进行特征提取,获得所述待增量文本对应的特征矩阵;确定所述待增量文本的文本主题;将所述特征矩阵输入与所述文本主题对应的变分自编码器,获得所述待增量文本的增量文本。
- 如权利要求12所述的终端设备,其中,所述处理器执行所述计算机程序时还实现:通过预设的词向量模型将所述待增量文本转换成特征矩阵。
- 如权利要求13所述的终端设备,其中,所述处理器执行所述计算机程序时还实现:通过预设的BERT模型对所述待增量文本进行特征提取,获得所述待增量文本对应的特征矩阵。
- 如权利要求14所述的终端设备,其中,所述处理器执行所述计算机程序时还实现:通过预设的BERT模型将所述待增量文本转换为N×768维的特征矩阵,预设的所述BERT模型包括24层编码层;其中,所述待增量文本包括N个字符,N为正整数。
- 如权利要求13所述的终端设备,其中,所述处理器执行所述计算机程序时还实现:获取所述待增量文本的关键词;获取每个所述关键词对应的特征向量;将所有所述关键词对应的所述特征向量进行组合,生成特征矩阵。
- 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其中,所述计算机程序被处理器执行时实现:获取待增量文本;对所述待增量文本进行特征提取,获得所述待增量文本对应的特征矩阵;确定所述待增量文本的文本主题;将所述特征矩阵输入与所述文本主题对应的变分自编码器,获得所述待增量文本的增量文本。
- 如权利要求17所述的计算机可读存储介质,其中,所述处理器执行所述计算机程序时还实现:通过预设的词向量模型将所述待增量文本转换成特征矩阵。
- 如权利要求18所述的计算机可读存储介质,其中,所述处理器执行所述计算机程序时还实现:通过预设的BERT模型对所述待增量文本进行特征提取,获得所述待增量文本对应的特征矩阵。
- 如权利要求19所述的计算机可读存储介质,其中,所述处理器执行所述计算机程序时还实现:通过预设的BERT模型将所述待增量文本转换为N×768维的特征矩阵,预设的所述BERT模型包括24层编码层;其中,所述待增量文本包括N个字符,N为正整数。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010019294.8 | 2020-01-08 | ||
CN202010019294.8A CN111241815A (zh) | 2020-01-08 | 2020-01-08 | 文本增量方法、装置及终端设备 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021139486A1 true WO2021139486A1 (zh) | 2021-07-15 |
Family
ID=70872435
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/136069 WO2021139486A1 (zh) | 2020-01-08 | 2020-12-14 | 文本增量方法、装置及终端设备 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111241815A (zh) |
WO (1) | WO2021139486A1 (zh) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111241815A (zh) * | 2020-01-08 | 2020-06-05 | 平安科技(深圳)有限公司 | 文本增量方法、装置及终端设备 |
CN112527969B (zh) * | 2020-12-22 | 2022-11-15 | 上海浦东发展银行股份有限公司 | 增量意图聚类方法、装置、设备及存储介质 |
CN116894436B (zh) * | 2023-09-06 | 2023-12-15 | 神州医疗科技股份有限公司 | 基于医学命名实体识别的数据增强方法及*** |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108763284A (zh) * | 2018-04-13 | 2018-11-06 | 华南理工大学 | 一种基于深度学习和主题模型的问答***实现方法 |
CN109886388A (zh) * | 2019-01-09 | 2019-06-14 | 平安科技(深圳)有限公司 | 一种基于变分自编码器的训练样本数据扩充方法和装置 |
CN109918477A (zh) * | 2019-02-18 | 2019-06-21 | 华南理工大学 | 一种基于变分自编码器的分布式检索资源库选择方法 |
CN110196930A (zh) * | 2019-05-22 | 2019-09-03 | 山东大学 | 一种多模态客服自动回复方法及*** |
CN110516055A (zh) * | 2019-08-16 | 2019-11-29 | 西北工业大学 | 一种结合bert的用于教学任务的跨平台智能问答实现方法 |
CN111241815A (zh) * | 2020-01-08 | 2020-06-05 | 平安科技(深圳)有限公司 | 文本增量方法、装置及终端设备 |
-
2020
- 2020-01-08 CN CN202010019294.8A patent/CN111241815A/zh active Pending
- 2020-12-14 WO PCT/CN2020/136069 patent/WO2021139486A1/zh active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108763284A (zh) * | 2018-04-13 | 2018-11-06 | 华南理工大学 | 一种基于深度学习和主题模型的问答***实现方法 |
CN109886388A (zh) * | 2019-01-09 | 2019-06-14 | 平安科技(深圳)有限公司 | 一种基于变分自编码器的训练样本数据扩充方法和装置 |
CN109918477A (zh) * | 2019-02-18 | 2019-06-21 | 华南理工大学 | 一种基于变分自编码器的分布式检索资源库选择方法 |
CN110196930A (zh) * | 2019-05-22 | 2019-09-03 | 山东大学 | 一种多模态客服自动回复方法及*** |
CN110516055A (zh) * | 2019-08-16 | 2019-11-29 | 西北工业大学 | 一种结合bert的用于教学任务的跨平台智能问答实现方法 |
CN111241815A (zh) * | 2020-01-08 | 2020-06-05 | 平安科技(深圳)有限公司 | 文本增量方法、装置及终端设备 |
Also Published As
Publication number | Publication date |
---|---|
CN111241815A (zh) | 2020-06-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10956771B2 (en) | Image recognition method, terminal, and storage medium | |
KR102360659B1 (ko) | 기계번역 방법, 장치, 컴퓨터 기기 및 기억매체 | |
WO2020108483A1 (zh) | 模型训练方法、机器翻译方法、计算机设备和存储介质 | |
CN111428516B (zh) | 一种信息处理的方法以及装置 | |
WO2021139486A1 (zh) | 文本增量方法、装置及终端设备 | |
CN103578474B (zh) | 一种语音控制方法、装置和设备 | |
CN111402866B (zh) | 语义识别方法、装置及电子设备 | |
CN110209784B (zh) | 消息交互方法、计算机设备及存储介质 | |
WO2021159877A1 (zh) | 问答方法及装置 | |
CN113421547B (zh) | 一种语音处理方法及相关设备 | |
CN112820299B (zh) | 声纹识别模型训练方法、装置及相关设备 | |
CN113378556A (zh) | 提取文本关键字的方法及装置 | |
CN111597804B (zh) | 一种实体识别模型训练的方法以及相关装置 | |
CN113821589B (zh) | 一种文本标签的确定方法及装置、计算机设备和存储介质 | |
CN112685578B (zh) | 一种多媒体信息内容提供方法及装置 | |
CN107918496A (zh) | 一种输入纠错方法和装置、一种用于输入纠错的装置 | |
CN111159338A (zh) | 一种恶意文本的检测方法、装置、电子设备及存储介质 | |
CN108536638A (zh) | 智能书签的设置方法、移动终端、***及可读存储介质 | |
CN108345612A (zh) | 一种问题处理方法和装置、一种用于问题处理的装置 | |
CN108595107B (zh) | 一种界面内容处理方法及移动终端 | |
CN112214605A (zh) | 一种文本分类方法和相关装置 | |
JP2024516570A (ja) | データ処理方法、装置、コンピュータ機器及びコンピュータプログラム | |
WO2022227507A1 (zh) | 唤醒程度识别模型训练方法及语音唤醒程度获取方法 | |
WO2021073434A1 (zh) | 对象行为的识别方法、装置及终端设备 | |
CN110019648B (zh) | 一种训练数据的方法、装置及存储介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20912417 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20912417 Country of ref document: EP Kind code of ref document: A1 |