Data processing method and device
By expanding the vocabulary of the target system and determining semantic recognition rules, and correcting it in combination with user feedback information, the problem of difficult to improve the corpus meaning recognition function of the target system in the prior art is solved, and the semantic recognition ability is improved.
Patent Information
- Application Number
- CN201910394645.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-05-13
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2039-05-13
AI Technical Summary
The prior art is difficult to improve the corpus meaning recognition function of the target system based on user data generated during interaction with the target system.
By obtaining updated entries from the data sources associated with the target system, expanding the vocabulary of the target system, determining semantic recognition rules based on the statement construction and entry attributes in the historical user corpus, and correcting these rules in combination with user feedback information.
The semantic recognition capability of the target system is improved, and the corpus meaning recognition function is improved during the interaction between the user and the target system, which solves the problem that it is difficult for user data to improve the semantic recognition of the system.
Smart Images

Figure CN112016329B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of natural language understanding, and in particular to a data processing method and device. Background Art
[0002] Natural language understanding and semantic recognition are often used in the process of interaction between users and machine systems. For example, users enter command text in the operating interface of the target system and enter voice commands in the voice input module. After the human-computer interaction system is initially built successfully, the problem often encountered is how to use user data to continuously improve the system and make the system's semantic recognition function more and more intelligent.
[0003] In the related art, in order to improve the semantic recognition function of the target system, a user feedback channel is provided to improve the system's performance through the user's active feedback on the results of semantic recognition. For example, in some speaker applications, users can click on a result that they are not satisfied with to judge the voice interaction behavior. For another example, some interactive systems can also provide users with telephone complaints for feedback. However, due to the lack of subjective initiative in user active feedback, the number of feedback results is too small, and it is difficult to further improve the performance of the system. In addition, in addition to the user feedback mechanism, other methods for improving the semantic recognition function of the system have appeared in the related art, such as randomly sampling and labeling user logs, and then iteratively training the model to improve the accuracy of semantic recognition through the model. However. In this method, random sampling lacks pertinence, and a large amount of data needs to be sampled to train the model to achieve the expected effect. This method has a large workload and poor operability.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present invention provide a data processing method and device to at least solve the technical problem in the related art that it is difficult to improve the corpus meaning recognition function of the target system based on the user data generated during the interaction between the user and the target system.
[0006] According to one aspect of an embodiment of the present invention, a data processing method is provided, comprising: obtaining updated entries from a data source associated with a target system to expand the vocabulary of the target system, wherein the target system performs operation behaviors based on corpus input by a user, and each entry in the vocabulary has corresponding attributes in the field corresponding to the target system; determining semantic recognition rules based on the sentence structure of each historical user corpus and the attributes of the entries in multiple historical user corpora, wherein the historical user corpora include corpora generated when a user interacts with the target system; after the target system determines the meaning of the target corpus input by the user according to the semantic recognition rules and performs the target operation behavior based on the meaning of the target corpus, obtaining user feedback information on the target operation behavior; and correcting the semantic recognition rules based on the feedback information.
[0007] According to another aspect of an embodiment of the present invention, another data processing method is provided, including: obtaining updated entries from a data source associated with a television to expand the vocabulary of the television, wherein the television performs an operation based on a corpus input by a user, and each entry in the vocabulary has corresponding attributes in the field of video playback; determining semantic recognition rules based on the sentence structure of each historical user corpus and the attributes of the entry in multiple historical user corpora, wherein the historical user corpora include corpora generated when a user interacts with the television; obtaining feedback information from the user on the target operation after the television determines the meaning of the target corpus input by the user according to the semantic recognition rules and performs the target operation based on the meaning of the target corpus; and correcting the semantic recognition rules based on the feedback information.
[0008] According to another aspect of an embodiment of the present invention, a data processing device is also provided, including: an expansion unit, used to obtain updated entries from a data source associated with a target system to expand the vocabulary of the target system, wherein the target system performs operation behaviors based on corpus input by a user, and each entry in the vocabulary has corresponding attributes in the field corresponding to the target system; a determination unit, used to determine semantic recognition rules based on the sentence structure and attributes of the entries of each historical user corpus in multiple historical user corpora, wherein the historical user corpora include corpora generated when a user interacts with the target system; an acquisition unit, used to obtain user feedback information on the target operation behavior after the target system determines the meaning of the target corpus input by the user according to the semantic recognition rules and performs the target operation behavior based on the meaning of the target corpus; and a correction unit, used to correct the semantic recognition rules based on the feedback information.
[0009] In an embodiment of the present invention, a method of constructing semantic recognition rules is adopted. By expanding the vocabulary of the target system and determining the attributes of the entries, the semantic recognition rules are determined based on the sentence structure of the user corpus and the attributes of the entries, and the semantic recognition rules are corrected based on the user's feedback information on the target operation behavior, thereby achieving the purpose of improving the semantic recognition ability of the target system, thereby achieving the technical effect of improving the corpus meaning recognition function of the target system in the process of interaction between the user and the target system, and further solving the technical problem in the related art that it is difficult to improve the corpus meaning recognition function of the target system based on the user data generated in the process of interaction between the user and the target system. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0011] Figure 1 is a hardware structure block diagram of a computer terminal according to a data processing method of an embodiment of the present invention;
[0012] Figure 2 is a flow chart of a data processing method according to an embodiment of the present invention;
[0013] Figure 3 is a flow chart of another data processing method according to an embodiment of the present invention;
[0014] Figure 4 is a schematic diagram of a data processing device according to an embodiment of the present invention;
[0015] Figure 5 is a schematic diagram of an optional data processing device according to an embodiment of the present application Figure 1 ;
[0016] Figure 6 is a schematic diagram of an optional data processing device according to an embodiment of the present application Figure 2 ;
[0017] Figure 7 is a schematic diagram of an optional data processing device according to an embodiment of the present application Figure 3 ;
[0018] Figure 8 is a schematic diagram of an optional data processing device according to an embodiment of the present application Figure 4 ;
[0019] Fig. 9 is a schematic diagram of an optional data processing device according to an embodiment of the present application Figure 5 ;
[0020] Fig.10 is a schematic diagram of an optional data processing device according to an embodiment of the present application Figure 6 ;
[0021] Fig.11 is a schematic diagram of an optional data processing device according to an embodiment of the present application Figure 7 ;as well as
[0022] Fig.12 It is a structural block diagram of a computer terminal according to an embodiment of the present application. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0025] Example 1
[0026] According to an embodiment of the present invention, an embodiment of a data processing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0027] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computer terminal (or mobile device) for implementing a data processing method. Figure 1As shown, the computer terminal 10 (or mobile device 10) may include one or more (only one is shown in the figure) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), and a memory 104 for storing data. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0028] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the data processing method in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the data processing method of the above-mentioned application program is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0029] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).
[0030] Under the above operating environment, this application provides Figure 2 The data processing method shown. Figure 2 is a flow chart of a data processing method according to Embodiment 1 of the present invention.
[0031] Step 21, obtaining updated entries from a data source associated with the target system to expand the vocabulary of the target system, wherein the target system performs operation behaviors based on the corpus input by the user, and each entry in the vocabulary has corresponding attributes in the field corresponding to the target system.
[0032] It should be noted that users can input corpora to interact with the target system. Specifically, after the user inputs the corpus, the target system recognizes the meaning of the user corpus based on its own natural language understanding function, and converts the meaning of the user corpus into control instructions to control the target system to perform operational behaviors. In this process, the recognition of terms in the corpus plays a key role in the recognition of the meaning of the user corpus. In real life, business content is updated quickly and new terms will continue to appear. Therefore, it is necessary to update the vocabulary of the target system in a timely manner so that the target system can accurately and quickly recognize more user corpora, thereby more efficiently performing corresponding operational behaviors and improving the user's interactive experience.
[0033] For example, in the video playback business, TV series, movies, short videos, etc. are constantly updated. In order to facilitate users to search for new and popular videos by voice or text, new video names are updated daily. The updated video names are obtained from the data source associated with the video playback system and added to the vocabulary of the video playback system; in the navigation business, due to the establishment and changes of buildings, roads, and bridges, the timely update of place names, especially new store names and place names, will also enable users to have a better travel experience with the help of the navigation system. The updated place names are obtained based on the data source associated with the navigation system and added to the vocabulary of the navigation system; in the field of audio playback, for example, when the user interacts with the speaker by voice to instruct the speaker to play audio, the recognition and understanding of the new song name is crucial to the accuracy of the audio playback. Therefore, the updated audio name in the data source associated with the audio playback system is obtained and added to the vocabulary of the audio playback system.
[0034] In addition, it should be noted that the same entry may have different attribute meanings in different fields, and the attributes of the entry in the corresponding field affect the recognition of the meaning of the user corpus. For example, "Peppa Pig" can be the name of a cartoon or a video clip in the video field, while in the e-commerce field, "Peppa Pig" can be a search tag for toys, clothing, etc. Therefore, after adding the acquired entry to the vocabulary of the target system, it is necessary to determine its attributes in the corresponding field.
[0035] According to the above-mentioned embodiment of the present application, obtaining updated entries from a data source associated with a target system to expand the vocabulary of the target system includes: obtaining updated entries from at least one of the following data sources: a search log corresponding to the target system, data in relevant web pages of the target system; adding the obtained entries to the vocabulary of the target system, and matching corresponding attributes for each entry in the vocabulary.
[0036] It should be noted that the entries in the vocabulary corresponding to the target system are derived from the entries in the local log of the system, as well as the updated entries. The updated entries are obtained from the data source associated with the target system. Specifically, the data source associated with the target system can be the relevant vertical category search logs in the target system. For example, for the video playback system, the logs generated by searching for videos in the search interface and clicking on videos in the video display interface; for the audio playback system, the logs generated by searching for audio in the search interface and clicking on audio in the audio display interface; for the navigation system, the logs generated by searching and clicking on locations in the navigation interface. In addition, it can also be data crawled from web pages related to the target system. For example, for a video playback system, entries can be crawled from web pages other than the video playback system. For example, the homepage of a website usually displays the latest entries in the field. Entries can be crawled from the homepages of other video websites and added to the vocabulary of the video playback system. For an audio playback system, entries can be crawled from web pages of audio websites other than the audio playback system and added to the vocabulary of the audio playback system.
[0037] In addition, due to the large number of data sources and high noise, it is necessary to clean the entry data based on multiple word frequencies. For example, in the video field, basic words such as "hello" and "video" that appear too frequently are cleaned and no longer added to the system vocabulary. For search terms and click terms, corresponding word frequencies are set to clean the terms. Specifically, for word frequencies with too small search clicks, adding them to the vocabulary is not very useful for subsequent semantic recognition, but will increase the workload of vocabulary attribute annotation. These terms are cleaned and no longer added to the system vocabulary. Furthermore, regression tests are performed on the terms added to the vocabulary to confirm that no new errors are introduced to the system or other errors are caused. Parts that are uncertain or fail the test are then manually checked to complete the expansion of the vocabulary.
[0038] Step S22, determining semantic recognition rules based on the sentence structure and the attributes of the terms in each of the multiple historical user corpora, wherein the historical user corpora include corpora generated when the user interacts with the target system.
[0039] Specifically, corpus is generated during the interaction between the user and the target system. For example, the user's voice input information to the navigation system in historical time is the historical user corpus of the navigation system, and the user's search history on the video playback software is the historical user corpus of the video playback software.
[0040] When identifying the meaning of a corpus, it is necessary not only to identify the attribute meaning of the terms, but also to identify the relationship between terms. For example, for the corpus "I want to watch Journey to the West", the structure of the corpus is determined to be "I + watch + video name". "I" and "watch" are basic words, and there is no need to mark their attributes in the video field. The attributes of "Journey to the West" can be TV series, cartoons, and movies, etc. The semantic recognition rule is "I want to watch + video name". Based on multiple historical user corpora, the rules are summarized and extracted to obtain effective semantic recognition rules to accurately recognize the target corpus input by the user.
[0041] Step S23, after the target system determines the meaning of the target corpus input by the user according to the semantic recognition rule and performs the target operation behavior based on the meaning of the target corpus, the user's feedback information on the target operation behavior is obtained.
[0042] Specifically, the user inputs the target corpus into the target system, identifies the meaning of the target corpus in the field corresponding to the target system according to the determined semantic recognition rules, converts the meaning into the system's execution command, and then executes the target operation behavior based on the execution command. The target operation behavior may be the expected behavior required by the user, or it may be something that the user does not need. Therefore, it is necessary to obtain user feedback to judge the semantic recognition results of the target corpus.
[0043] According to the above-mentioned embodiment of the present application, the semantic recognition rules are modified based on at least one of the following feedback information: the user's negative evaluation of the target operation behavior, the user correcting the input of the target corpus, and the user not interacting with the target operation behavior.
[0044] For example, when a user inputs "I want to listen to song A" into an audio playback tool, and the audio playback tool plays song B, the user says "How stupid, I heard it wrong" and "So stupid". By observing the logs, we can find that the user denies the system.
[0045] For another example, a user says to the video playback system, "I want to see warm shoes", but there is no correct feedback in the displayed video, so the user corrects it to "I want to see warm strings". A user says to the navigation system, "Find a place to refuel", but there is no correct feedback, so the system corrects it to "Find a gas station". The self-correction behavior of such users is counted, that is, the behavior of users who correct their pronunciation or expression to obtain correct system feedback when they cannot get correct feedback from the system is counted.
[0046] For another example, the semantic recognition rules can also be modified based on the user's actual usage behavior. Specifically, it refers to whether the user actually uses the results returned by the system after receiving the system's response. For example, in a video playback system, after the system gives a command to play the video and starts playing the video, does the user actually watch it? In an audio playback system, after the system plays music, does the user actually listen to it? In a navigation system, after the system gives the search results, does the user make a choice and perform route planning and navigation? After the system gives the navigation results, does the user actually use the navigation results? Specifically, whether the navigation results are actually used can be determined based on the proportion of the actual navigation time to the total navigation time.
[0047] Step S24, modifying the semantic recognition rules based on the feedback information.
[0048] Specifically, suspicious error results can be obtained through the user's negative evaluation of the target operation behavior, and the attributes of the terms involved in the target corpus and the semantic recognition rules can be marked as errors, thereby correcting the semantic recognition rules. The system's ability to recall incorrect semantic recognition rules can also be increased by having the user correct the input of the target corpus when correct feedback is not obtained. The effect of semantic recognition can also be judged by checking whether the user interacts with the target operation behavior. If the user does not interact with the target operation behavior, it indicates that there is a possibility that the semantic recognition effect is poor. The semantic recognition rules can be marked and monitored to improve the accuracy of the interactive system.
[0049] According to the above-mentioned embodiment of the present application, step S22, based on the sentence structure and the attributes of the entries in each of the multiple historical user corpora, determines the semantic recognition rules, including: determining the attributes of the entries in the historical user corpora in the field corresponding to the target system based on the vocabulary, and annotating the attributes of the entries in the historical user corpora in the form of labels; determining the expression mode of a historical user corpus based on the sentence structure and the labels of the entries of the historical user corpus; determining the number of occurrences of different expression modes in the multiple historical user corpora respectively; determining the expression mode that appears more than a preset number of times as the first mode; when the first mode is different from the expression mode already existing in the mode library, adding the first mode to the mode library to obtain an updated mode library; determining the semantic recognition rules based on the updated mode library.
[0050] For example, a historical corpus in the video playback system is "I want to watch Peppa Pig", and the attribute of "Peppa Pig" in the video field is " <video>", with the label " <video>"Annotate the entry "Peppa Pig", the expression pattern of this historical user corpus is "I want to see <video>", in multiple historical user corpora, statistical expression patterns "I want to see <video>" appears, if the preset number is 300 times, in the expression mode "I want to see <video>"When the number of occurrences is greater than 300, it indicates that the expression pattern is a high-frequency expression pattern. Since the system itself has stored some expression patterns, in order to expand the expression patterns in the pattern library, it is necessary to select expression patterns in the high-frequency expression patterns that are not covered by the existing expression patterns in the pattern library. For example, if " <video>"Serials" are high frequency, and the existing rules include "I want to watch <video> ”," <video>TV series", does not exist" <video>TV series", then <video>The word "TV series" is added to the pattern library. The multiple expression patterns in the pattern library constitute semantic recognition rules. The expression meaning of the target corpus is determined by matching the expression pattern of the target corpus with the expression pattern in the pattern library.
[0051] Through this embodiment, the expression patterns of historical user corpus are automatically extracted, and high-frequency expression patterns that are not covered by existing expression patterns are extracted and added to the pattern library, thereby injecting the latest high-frequency expression patterns into the pattern library, increasing the adaptability of semantic recognition rules and improving the accuracy of recognition of new hot corpus.
[0052] According to the above embodiment of the present application, the method also includes: before determining the attributes of the entries in the historical user corpus in the field corresponding to the target system based on the vocabulary, when the same user corpus exists in multiple historical user corpora, deduplication operation is performed on the same user corpus.
[0053] It should be noted that the amount of historical user corpora obtained from the logs is huge. In order to improve the efficiency of expression pattern extraction, the historical user corpora can be filtered before the expression pattern is extracted. For example, the user may input the same user corpus multiple times at a time. In order to avoid repeated recognition of term attribute tags and determination of expression patterns for the same user corpus, the completely identical user corpora can be deduplicated to delete duplicate user corpora, reduce workload, and improve the efficiency of expression pattern extraction.
[0054] According to the above-mentioned embodiment of the present application, the method also includes: after determining the expression pattern of a historical user corpus based on the sentence structure and the label of the entry of the historical user corpus, judging whether the expression pattern belongs to an expression pattern prohibited by the system, wherein the expression pattern prohibited by the system at least includes an expression pattern whose meaning cannot be determined; in the case that the expression pattern belongs to an expression pattern prohibited by the system, deleting the expression pattern.
[0055] It should be noted that some high-frequency expression patterns may be system-prohibited and invalid expression patterns. For example, there are some expression patterns with impolite wording. Adding them to the pattern library is contrary to public order and good morals. Some expression patterns that cannot determine the semantics of the corpus and are only used as high-frequency expressions, while adding them to the pattern library, take up storage space and are ineffective in identifying the meaning of the target user corpus. Before adding them to the pattern library, the high-frequency user corpus is evaluated and checked, and the expression patterns prohibited by the system are deleted, thereby preventing the expression patterns prohibited by the system from being added to the pattern library.
[0056] According to the above-mentioned embodiment of the present application, step S22, based on the sentence structure and the attributes of the entries in each of the multiple historical user corpora, determines the semantic recognition rules, including: determining the attributes of the entries in the historical user corpora in the candidate database in the field corresponding to the target system, and annotating the attributes of the entries in the historical user corpora in the form of labels; constructing a training data set based on the historical user corpora with the tags of the entries; obtaining a target model based on the data training in the training data set; and determining the semantic recognition rules based on the target model.
[0057] It should be noted that, based on the acquisition of multiple historical user corpora, in addition to extracting high-frequency expression patterns that are not covered by existing expression patterns to determine semantic recognition rules, the semantic recognition rules can also be determined by model training. Specifically, the attributes of the entries in the acquired historical user corpora are annotated, and the annotated historical user corpora are used as a training data set for deep learning. By combining the features of the low-level historical user corpora, representation learning is performed to form more abstract high-level representation attribute categories to discover the distributed feature representation of language expression and obtain the target model for semantic recognition. During semantic recognition, the target user corpus is input into the model, and the meaning of the target user corpus is determined based on the output of the model to improve the efficiency and accuracy of semantic recognition.
[0058] According to the above-mentioned embodiment of the present application, the method also includes: before determining the semantic recognition rule based on the sentence structure and the attributes of the entries of each historical user corpus in the multiple historical user corpora, the multiple historical user corpora are screened according to preset rules, wherein the preset rules include at least one of the following: whether it is a user corpus whose semantics the target system has doubts about, whether it is a user corpus in which the expression method appears for the first time in the multiple historical user corpora; and the historical user corpora that meet the preset rules are placed in a candidate database.
[0059] It should be noted that data annotation is required before model training, which will consume a lot of manpower. Therefore, before sending the historical user corpus for annotation, the data is screened and targeted data is selected for annotation. For example, the historical user corpus that is not understood during the natural language generation process is screened to improve the targeting of model training. For another example, user corpus with the same expression pattern is only extracted once to avoid repeated annotation. For example, "I want to read Journey to the West", "I want to read Dream of the Red Chamber", and "I want to read Water Margin" are user corpora with the same expression pattern, and only one is extracted for annotation, which is labeled as "I want to read <video>", which can save at least half of the labor costs. For another example, there are some suspicious logs with the same domain name and intent value but different slot values. The user corpus in the suspicious logs can be screened out for annotation, which can reduce time and labor costs and make model training more targeted.
[0060] According to the above-mentioned embodiment of the present application, the method also includes: expanding the entries according to the type of the label of the entries in each historical user corpus, and expanding the user corpus based on the sentence structure of the historical user corpus and the expanded entries; adding the expanded user corpus to the training data set.
[0061] It should be noted that in order to increase the amount of basic training data and make the model training more comprehensive, after the user corpus is annotated, the user corpus will be expanded according to the annotation type. Specifically, "I want to watch Journey to the West" will be annotated as "I want to watch <video>", can be based on" <video>"The entries are expanded into "Romance of the Three Kingdoms", "Dream of Red Mansions" and other entries, and the expanded user corpus "I want to watch Romance of the Three Kingdoms", "I want to watch Dream of Red Mansions" and other user corpora are obtained. The expanded user corpus is added to the training, which doubles the increment of training data and makes the training more sufficient.
[0062] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0063] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0064] Example 2
[0065] Under the above operating environment, this application provides Figure 3 The data processing method shown. Figure 3 It is a schematic diagram of the framework of the data processing method according to the second embodiment of the present invention.
[0066] The data processing method provided in this embodiment is mainly divided into three parts. The first part: acquiring entries and corpus data from the data source, the second part: preprocessing the data after acquisition, and the third part: constructing a three-level closed loop based on the preprocessed data to improve the semantic recognition ability of the target system.
[0067] Specifically, when acquiring data from the data source, entries can be acquired from the basic vocabulary and the crawled vocabulary, where the basic vocabulary is the local vocabulary of the target system, and the entries in the crawled vocabulary are crawled from web pages related to the target system. After acquiring the entries, the data is cleaned and sorted, thereby expanding the system's dictionary and completing the construction of a first-level closed loop.
[0068] When acquiring data from the data source, the user corpus can be obtained based on the expanded dictionary and user examples, online data, and offline data. Specifically, the online data and offline data can be online logs or offline logs generated by users clicking to search for content in the target system. The online logs are screened and the data is annotated. The offline logs are first captured and generalized, and then the data is screened and sorted, and manual inspection is performed to build a secondary closed loop. It should be noted that when building a secondary closed loop, a rule closed loop or a model closed loop can be constructed. The construction of the rule closed loop first removes duplicates and screens the user corpus through a detection tool, and then annotates the attributes of the filtered user corpus based on the written rules. The expression mode of each user corpus is determined through grammar editing, and high-frequency expression modes that are not covered by the existing expression mode are extracted to expand the existing rule library. The model closed loop is based on the corpus data annotated with attributes and the expression mode obtained by the rule closed loop to train the model. After the rule closed loop and the model closed loop are built, regression testing is performed and the release is online.
[0069] In addition, when acquiring data from the data source, user buried data can also be obtained, specifically, including user self-correction data, negative evaluation of the system, and whether the user actually uses the content pushed by the system based on the user corpus. Based on the buried data, an automatic feedback loop of problems is constructed, that is, a three-level closed loop, and the second-level closed loop is corrected based on the third-level closed loop.
[0070] Through this embodiment, according to the acquisition and preprocessing of data, three levels of closed loops of the system are constructed based on the preprocessed data, so as to improve the semantic recognition function of the system and make the semantic recognition function of the system enter a benign iteration.
[0071] Example 3
[0072] According to an embodiment of the present invention, another data processing method is also provided, the method comprising:
[0073] Updated entries are obtained from a data source associated with the television to expand the vocabulary of the video, wherein the television performs operation behaviors based on the corpus input by the user, and each entry in the vocabulary has corresponding attributes in the field of video playback.
[0074] Specifically, in the video playback business, TV series, movies, short videos, etc. are constantly updated. In order to facilitate users to search for new and popular videos by voice or text, new video names updated daily are guaranteed. The updated video names are obtained from the data source associated with the video playback system and added to the vocabulary of the video playback system.
[0075] Based on the sentence structure and the attributes of the entries of each of the multiple historical user corpora, a semantic recognition rule is determined, wherein the historical user corpora include corpora generated when the user interacts with the television.
[0076] Specifically, when identifying the meaning of the corpus, it is necessary not only to identify the attribute meaning of the terms, but also to identify the relationship between the terms. For example, for the corpus "I want to watch Journey to the West", the structure of the corpus is determined to be "I + watch + video name". "I" and "watch" are basic words, and there is no need to mark their attributes in the video field. The attributes of "Journey to the West" can be TV series, cartoons, and movies, etc. The semantic recognition rule is "I want to watch + video name". Based on multiple historical user corpora, the rules are summarized and extracted to obtain effective semantic recognition rules to accurately perform semantic recognition on the target corpus input by the user.
[0077] After the television determines the meaning of the target corpus input by the user according to the semantic recognition rule and performs the target operation behavior based on the meaning of the target corpus, the feedback information of the user on the target operation behavior is obtained.
[0078] It should be noted that the user inputs the target corpus into the target system, identifies the meaning of the target corpus in the field corresponding to the target system according to the determined semantic recognition rules, converts the meaning into the system's execution command, and then executes the target operation behavior based on the execution command. The target operation behavior may be the expected behavior required by the user, or it may be something that the user does not need. Therefore, it is necessary to obtain user feedback to judge the semantic recognition results of the target corpus.
[0079] Modify semantic recognition rules based on feedback information.
[0080] Specifically, suspicious error results can be obtained through the user's negative evaluation of the target operation behavior, and the attributes of the terms involved in the target corpus and the semantic recognition rules can be marked as errors, thereby correcting the semantic recognition rules. The system's ability to recall incorrect semantic recognition rules can also be increased by having the user correct the input of the target corpus when correct feedback is not obtained. The effect of semantic recognition can also be judged by checking whether the user interacts with the target operation behavior. If the user does not interact with the target operation behavior, it indicates that there is a possibility that the semantic recognition effect is poor. The semantic recognition rules can be marked and monitored to improve the accuracy of the interactive system.
[0081] In an embodiment of the present invention, a method of constructing semantic recognition rules is adopted. By expanding the vocabulary of the target system and determining the attributes of the entries, the semantic recognition rules are determined based on the sentence structure of the user corpus and the attributes of the entries, and the semantic recognition rules are corrected based on the user's feedback information on the target operation behavior, thereby achieving the purpose of improving the semantic recognition ability of the target system, thereby achieving the technical effect of improving the corpus meaning recognition function of the target system in the process of interaction between the user and the target system, and further solving the technical problem in the related art that it is difficult to improve the corpus meaning recognition function of the target system based on the user data generated in the process of interaction between the user and the target system.
[0082] Example 4
[0083] According to an embodiment of the present invention, a device for implementing the above data processing method is also provided. Figure 4 As shown, the device includes: an expansion unit 41, a determination unit 42, an acquisition unit 43 and a correction unit 44.
[0084] Specifically, the expansion unit 41 is used to obtain updated entries from a data source associated with the target system to expand the vocabulary of the target system, wherein the target system performs operation behaviors based on the corpus input by the user, and each entry in the vocabulary has corresponding attributes in the field corresponding to the target system.
[0085] It should be noted that users can input corpora to interact with the target system. Specifically, after the user inputs the corpus, the target system recognizes the meaning of the user corpus based on its own natural language understanding function, and converts the meaning of the user corpus into control instructions to control the target system to perform operational behaviors. In this process, the recognition of terms in the corpus plays a key role in the recognition of the meaning of the user corpus. In real life, business content is updated quickly and new terms will continue to appear. Therefore, it is necessary to update the vocabulary of the target system in a timely manner so that the target system can accurately and quickly recognize more user corpora, thereby more efficiently performing corresponding operational behaviors and improving the user's interactive experience.
[0086] For example, in the video playback business, TV series, movies, short videos, etc. are constantly updated. In order to facilitate users to search for new and popular videos by voice or text, new video names are updated daily. The updated video names are obtained from the data source associated with the video playback system and added to the vocabulary of the video playback system; in the navigation business, due to the establishment and changes of buildings, roads, and bridges, the timely update of place names, especially new store names and place names, will also enable users to have a better travel experience with the help of the navigation system. The updated place names are obtained based on the data source associated with the navigation system and added to the vocabulary of the navigation system; in the field of audio playback, for example, when the user interacts with the speaker by voice to instruct the speaker to play audio, the recognition and understanding of the new song name is crucial to the accuracy of the audio playback. Therefore, the updated audio name in the data source associated with the audio playback system is obtained and added to the vocabulary of the audio playback system.
[0087] In addition, it should be noted that the same entry may have different attribute meanings in different fields, and the attributes of the entry in the corresponding field affect the recognition of the meaning of the user corpus. For example, "Peppa Pig" can be the name of a cartoon or a video clip in the video field, while in the e-commerce field, "Peppa Pig" can be a search tag for toys, clothing, etc. Therefore, after adding the acquired entry to the vocabulary of the target system, it is necessary to determine its attributes in the corresponding field.
[0088] The determination unit 42 is used to determine a semantic recognition rule based on the sentence structure and the attribute of the word entry of each historical user corpus in multiple historical user corpora, wherein the historical user corpora include corpora generated when the user interacts with the target system.
[0089] It should be noted that corpus is generated during the interaction between the user and the target system. For example, the user's voice input information to the navigation system in historical time is the historical user corpus of the navigation system, and the user's search history on the video playback software is the historical user corpus of the video playback software.
[0090] When identifying the meaning of a corpus, it is necessary not only to identify the attribute meaning of the terms, but also to identify the relationship between terms. For example, for the corpus "I want to watch Journey to the West", the structure of the corpus is determined to be "I + watch + video name". "I" and "watch" are basic words, and there is no need to mark their attributes in the video field. The attributes of "Journey to the West" can be TV series, cartoons, and movies, etc. The semantic recognition rule is "I want to watch + video name". Based on multiple historical user corpora, rules are summarized and extracted to obtain effective semantic recognition rules to accurately recognize the target corpus input by the user.
[0091] The acquisition unit 43 is used to acquire user feedback information on the target operation behavior after the target system determines the meaning of the target corpus input by the user according to the semantic recognition rule and performs the target operation behavior based on the meaning of the target corpus.
[0092] It should be noted that the user inputs the target corpus into the target system, identifies the meaning of the target corpus in the field corresponding to the target system according to the determined semantic recognition rules, converts the meaning into the system's execution command, and then executes the target operation behavior based on the execution command. The target operation behavior may be the expected behavior required by the user, or it may be something that the user does not need. Therefore, it is necessary to obtain user feedback to judge the semantic recognition results of the target corpus.
[0093] The correction unit 44 is used to correct the semantic recognition rules based on the feedback information.
[0094] Specifically, the correction unit 44 can obtain suspicious error results through the user's negative evaluation of the target operation behavior, and mark the attributes of the terms involved in the target corpus and the semantic recognition rules as errors, thereby correcting the semantic recognition rules. The system can also increase its ability to recall erroneous semantic recognition rules by correcting the input of the target corpus when the user does not get correct feedback. The effect of semantic recognition can also be judged by checking whether the user interacts with the target operation behavior. If the user does not interact with the target operation behavior, it indicates that there is a possibility that the semantic recognition effect is not good. The semantic recognition rules are marked and monitored to improve the accuracy of the interactive system.
[0095] It should be noted that the expansion unit 41, the determination unit 42, the acquisition unit 43 and the correction unit 44 correspond to steps S21 to S24 in Example 1, and the four modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules, as part of the device, can be run in the computer terminal 10 provided in Example 1.
[0096] According to the above embodiments of the present application, Figure 5 As shown, the determining unit 42 includes: a first determining module 421 , a second determining module 422 , a third determining module 423 , a fourth determining module 424 , a first adding module 425 and a fifth determining module 426 .
[0097] Specifically, the first determination module 421 is used to determine the attributes of the entries in the historical user corpus in the field corresponding to the target system based on the vocabulary, and to annotate the attributes of the entries in the historical user corpus in the form of tags;
[0098] A second determination module 422, for determining an expression mode of a piece of historical user corpus based on a sentence structure of the piece of historical user corpus and a label of a word entry;
[0099] The third determination module 423 is used to respectively determine the number of occurrences of different expression patterns in the plurality of historical user corpora;
[0100] A fourth determination module 424, configured to determine an expression pattern that occurs more than a preset number of times as a first pattern;
[0101] A first adding module 425 is used to add the first pattern to the pattern library to obtain an updated pattern library when the first pattern is different from the expression pattern already existing in the pattern library;
[0102] The fifth determination module 426 is used to determine semantic recognition rules based on the updated pattern library.
[0103] For example, a historical corpus in the video playback system is "I want to watch Peppa Pig", and the attribute of "Peppa Pig" in the video domain is " <video>", with the label " <video>"Annotate the entry "Peppa Pig", the expression pattern of this historical user corpus is "I want to see <video>", in multiple historical user corpora, statistical expression patterns "I want to see <video>" appears, if the preset number is 300 times, in the expression mode "I want to see <video>"When the number of occurrences is greater than 300, it indicates that the expression pattern is a high-frequency expression pattern. Since the system itself has stored some expression patterns, in order to expand the expression patterns in the pattern library, it is necessary to select expression patterns in the high-frequency expression patterns that are not covered by the existing expression patterns in the pattern library. For example, if " <video>"Serials" are high frequency, and the existing rules include "I want to watch <video> ”," <video>TV series", does not exist" <video>TV series", then <video>The word "TV series" is added to the pattern library. The multiple expression patterns in the pattern library constitute semantic recognition rules. The expression meaning of the target corpus is determined by matching the expression pattern of the target corpus with the expression pattern in the pattern library.
[0104] Through this embodiment, the expression patterns of historical user corpus are automatically extracted, and high-frequency expression patterns that are not covered by existing expression patterns are extracted and added to the pattern library, thereby injecting the latest high-frequency expression patterns into the pattern library, increasing the adaptability of semantic recognition rules and improving the accuracy of recognition of new hot corpus.
[0105] It should be noted that the first determination module 421, the second determination module 422, the third determination module 423, the fourth determination module 424, the first adding module 425 and the fifth determination module 426 correspond to the steps in Example 1, and the six modules are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules as part of the device can be run in the computer terminal 10 provided in Example 1.
[0106] According to the above embodiments of the present application, Figure 6 As shown, the determination unit 4 further includes: a deduplication module 427 .
[0107] Specifically, the deduplication module 427 is used to deduplicate identical user corpora before determining the attributes of the entries in the historical user corpora in the domain corresponding to the target system based on the vocabulary, if identical user corpora exist in multiple historical user corpora, to dedupe identical user corpora.
[0108] It should be noted that the amount of historical user corpora obtained from the logs is huge. In order to improve the efficiency of expression pattern extraction, the historical user corpora can be filtered before the expression pattern is extracted. For example, the user may input the same user corpus multiple times at a time. In order to avoid repeated recognition of term attribute tags and determination of expression patterns for the same user corpus, the completely identical user corpora can be deduplicated to delete duplicate user corpora, reduce workload, and improve the efficiency of expression pattern extraction.
[0109] It should be noted that the above-mentioned deduplication module 427 corresponds to the steps in Example 1, and the examples and application scenarios implemented by the module and the corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned module as part of the device can be run in the computer terminal 10 provided in Example 1.
[0110] According to the above embodiments of the present application, Figure 7 As shown, the determination unit 42 further includes: a judgment module 428 and a deletion module 429 .
[0111] Specifically, the judgment module 428 is used to determine whether the expression mode belongs to the expression mode prohibited by the system after determining the expression mode of the historical user corpus based on the sentence structure of the historical user corpus and the label of the entry, wherein the expression mode prohibited by the system at least includes the expression mode whose meaning cannot be determined;
[0112] The deletion module 429 is used to delete the expression pattern when the expression pattern is an expression pattern prohibited by the system.
[0113] It should be noted that some high-frequency expression patterns may be system-prohibited and invalid expression patterns. For example, there are some expression patterns with impolite wording. Adding them to the pattern library is contrary to public order and good morals. Some expression patterns that cannot determine the semantics of the corpus and are only used as high-frequency expressions, while adding them to the pattern library, take up storage space and are ineffective in identifying the meaning of the target user corpus. In order to prevent the expression patterns prohibited by the system from being added to the pattern library, the high-frequency user corpus is evaluated and checked before being added to the pattern library, and the expression patterns prohibited by the system are deleted.
[0114] It should be noted that the above-mentioned determination module 428 and deletion module 429 correspond to the steps in Example 1, and the examples and application scenarios implemented by the two modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules as part of the device can be run in the computer terminal 10 provided in Example 1.
[0115] According to the above embodiments of the present application, Figure 8 As shown, the above device further includes: a screening unit 81 and an adding unit 82.
[0116] Specifically, the screening unit 81 is used to screen the multiple historical user corpora according to preset rules before determining the semantic recognition rules based on the sentence structure and the attributes of the entries of each historical user corpora in the multiple historical user corpora, wherein the preset rules include at least one of the following: whether the user corpora are doubtful about the semantics of the corpora by the target system, whether the user corpora are the user corpora where the expression method appears for the first time in the multiple historical user corpora;
[0117] The adding unit 82 is used to add the historical user corpus that meets the preset rules into the candidate database.
[0118] It should be noted that data annotation is required before model training, which will consume a lot of manpower. Therefore, before sending the historical user corpus for annotation, the data is screened and targeted data is selected for annotation. For example, the historical user corpus that is not understood during the natural language generation process is screened to improve the targeting of model training. For another example, user corpus with the same expression pattern is only extracted once to avoid repeated annotation. For example, "I want to read Journey to the West", "I want to read Dream of the Red Chamber", and "I want to read Water Margin" are user corpora with the same expression pattern, and only one is extracted for annotation, which is labeled as "I want to read <video>", which can save at least half of the labor costs. For another example, there are some suspicious logs with the same domain name and intent value but different slot values. The user corpus in the suspicious logs can be screened out for annotation, which can reduce time and labor costs and make model training more targeted.
[0119] It should be noted that the above-mentioned screening unit 81 and adding unit 82 correspond to the steps in Example 1, and the examples and application scenarios implemented by the two modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules as part of the device can be run in the computer terminal 10 provided in Example 1.
[0120] According to the above embodiments of the present application, Fig. 9 As shown, the determination unit 42 includes: a sixth determination module 4210 , a construction module 4211 , a training module 4212 and a seventh determination module 4213 .
[0121] Specifically, the sixth determination module 4210 is used to determine the attributes of the entries in the historical user corpus in the candidate database in the field corresponding to the target system, and to annotate the attributes of the entries in the historical user corpus in the form of tags;
[0122] A construction module 4211 is used to construct a training data set based on the historical user corpus that has completed the labeling of the entries;
[0123] A training module 4212 is used to obtain a target model based on data in a training data set;
[0124] The seventh determination module 4213 is used to determine semantic recognition rules based on the target model.
[0125] It should be noted that, based on the acquisition of multiple historical user corpora, in addition to extracting high-frequency expression patterns that are not covered by existing expression patterns to determine semantic recognition rules, the semantic recognition rules can also be determined by model training. Specifically, the attributes of the entries in the acquired historical user corpora are annotated, and the annotated historical user corpora are used as a training data set for deep learning. By combining the features of the low-level historical user corpora, representation learning is performed to form more abstract high-level representation attribute categories to discover the distributed feature representation of language expression and obtain the target model for semantic recognition. During semantic recognition, the target user corpus is input into the model, and the meaning of the target user corpus is determined based on the output of the model to improve the efficiency and accuracy of semantic recognition.
[0126] It should be noted that the sixth determination module 4210, construction module 4211, training module 4212 and seventh determination module 4213 correspond to the steps in Example 1, and the four modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules, as part of the device, can be run in the computer terminal 10 provided in Example 1.
[0127] According to the above embodiments of the present application, Fig.10 As shown, the determination unit also includes: an expansion module 4214 and a second adding module 4215.
[0128] Specifically, the expansion module 4214 is used to expand the entries according to the type of the tag of each entry in the historical user corpus, and expand the user corpus based on the sentence structure of the historical user corpus and the expanded entries;
[0129] The second adding module 4215 is used to add the expanded user corpus to the training data set.
[0130] It should be noted that in order to increase the amount of basic training data and make the model training more comprehensive, after the user corpus is annotated, the user corpus will be expanded according to the annotation type. Specifically, "I want to watch Journey to the West" will be annotated as "I want to watch <video>", can be based on" <video>"The entries are expanded into "Romance of the Three Kingdoms", "Dream of Red Mansions" and other entries, and the expanded user corpus "I want to watch Romance of the Three Kingdoms", "I want to watch Dream of Red Mansions" and other user corpora are obtained. The expanded user corpus is added to the training, which doubles the increment of training data and makes the training more sufficient.
[0131] It should be noted that the expansion module 4214 and the second adding module 4215 correspond to the steps in Example 1, and the examples and application scenarios implemented by the two modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules as part of the device can be run in the computer terminal 10 provided in Example 1.
[0132] According to the above-mentioned embodiment of the present application, wherein: the semantic recognition rules are modified based on at least one of the following feedback information: the user's negative evaluation of the target operation behavior, the user correcting the input of the target corpus, and the user not interacting with the target operation behavior.
[0133] For example, when a user inputs "I want to listen to song A" into an audio player, and the audio player plays song B, the user says "How stupid, I heard it wrong" or "How stupid", and the user's denial of the system can be found by observing the logs.
[0134] For another example, a user says to the video playback system "I want to see warm shoes", but there is no correct feedback in the displayed video, so the user corrects it to "I want to see warm strings"; a user says to the navigation system "Find a place to refuel", but there is no correct feedback, so the user corrects it to "Find a gas station". The self-correction behaviors of such users are counted, that is, the behaviors of users who correct their pronunciation or expressions to obtain correct system feedback when they cannot get correct feedback from the system are counted.
[0135] For another example, the semantic recognition rules can also be modified based on the user's actual usage behavior. Specifically, it refers to whether the user actually uses the results returned by the system after receiving the system's response. For example, in a video playback system, after the system gives a command to play the video and starts playing the video, does the user actually watch it? In an audio playback system, after the system plays music, does the user actually listen to it? In a navigation system, after the system gives the search results, does the user make a choice and perform route planning and navigation? After the system gives the navigation results, does the user actually use the navigation results? Specifically, whether the navigation results are actually used can be determined based on the proportion of the actual navigation time to the total navigation time.
[0136] According to the above embodiments of the present application, Fig.11 As shown, the acquisition unit 43 includes: an acquisition module 431 and a third adding module 432 .
[0137] Specifically, the acquisition module 431 is used to acquire updated entries from at least one of the following data sources: search logs corresponding to the target system, data in relevant web pages of the target system;
[0138] The third adding module 432 is used to add the acquired terms to the vocabulary of the target system and match corresponding attributes for each term in the vocabulary.
[0139] It should be noted that the entries in the vocabulary corresponding to the target system are derived from the entries in the local log of the system, as well as the updated entries. The updated entries are obtained from the data source associated with the target system. Specifically, the data source associated with the target system can be the relevant vertical category search logs in the target system. For example, for the video playback system, the logs generated by searching for videos in the search interface and clicking on videos in the video display interface; for the audio playback system, the logs generated by searching for audio in the search interface and clicking on audio in the audio display interface; for the navigation system, the logs generated by searching and clicking on locations in the navigation interface. In addition, it can also be data crawled from web pages related to the target system. For example, for a video playback system, entries can be crawled from web pages other than the video playback system. For example, the homepage of a website usually displays the latest entries in the field. Entries can be crawled from the homepages of other video websites and added to the vocabulary of the video playback system. For an audio playback system, entries can be crawled from web pages of audio websites other than the audio playback system and added to the vocabulary of the audio playback system.
[0140] In addition, due to the large number of data sources and high noise, it is necessary to clean the entry data based on multiple word frequencies. For example, in the video field, basic words such as "hello" and "video" that appear too frequently are cleaned and no longer added to the system vocabulary. For search terms and click terms, corresponding word frequencies are set to clean the terms. Specifically, for word frequencies with too small search clicks, adding them to the vocabulary is not very useful for subsequent semantic recognition, but will increase the workload of vocabulary attribute annotation. These terms are cleaned and no longer added to the system vocabulary. Furthermore, regression tests are performed on the terms added to the vocabulary to confirm that no new errors are introduced to the system or other errors are caused. Parts that are uncertain or fail the test are then manually checked to complete the expansion of the vocabulary.
[0141] It should be noted that the acquisition module 431 and the third adding module 432 correspond to the steps in Example 1, and the examples and application scenarios implemented by the two modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules as part of the device can be run in the computer terminal 10 provided in Example 1.
[0142] Example 5
[0143] The embodiment of the present invention can provide a computer terminal, which can be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal can also be replaced by a terminal device such as a mobile terminal.
[0144] Optionally, in this embodiment, the computer terminal may be located in at least one network device among a plurality of network devices of the computer network.
[0145] In this embodiment, the above-mentioned computer terminal can execute the program code of the following steps in the data processing method of the application: obtaining updated entries from a data source associated with the target system to expand the vocabulary of the target system, wherein the target system performs operation behaviors based on the corpus input by the user, and each entry in the vocabulary has corresponding attributes in the field corresponding to the target system; determining semantic recognition rules based on the sentence structure and attributes of the entries of each historical user corpus in multiple historical user corpora, wherein the historical user corpora include corpora generated when the user interacts with the target system; after the target system determines the meaning of the target corpus input by the user according to the semantic recognition rules, and performs the target operation behavior based on the meaning of the target corpus, obtaining user feedback information on the target operation behavior; and correcting the semantic recognition rules based on the feedback information.
[0146] In this embodiment, the computer terminal can also execute the program code of the following steps in the data processing method of the application: obtaining updated entries from a data source associated with the television to expand the vocabulary of the television, wherein the television performs operation behaviors based on the corpus input by the user, and each entry in the vocabulary has corresponding attributes in the field of video playback; determining semantic recognition rules based on the sentence structure and the attributes of the entries of each historical user corpus in multiple historical user corpora, wherein the historical user corpora include corpora generated when the user interacts with the television; after the television determines the meaning of the target corpus input by the user according to the semantic recognition rules, and performs the target operation behavior based on the meaning of the target corpus, obtaining user feedback information on the target operation behavior; and correcting the semantic recognition rules based on the feedback information.
[0147] Optionally, Fig.12 is a structural block diagram of a computer terminal according to an embodiment of the present invention. Fig.12 As shown, the computer terminal A may include: one or more (only one is shown in the figure) processors and a memory.
[0148] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the data processing method and device in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned data processing method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal A via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0149] The processor can call the information and application programs stored in the memory through the transmission device to perform the following steps: obtain updated entries from the data source associated with the target system to expand the vocabulary of the target system, wherein the target system performs operation behaviors based on the corpus input by the user, and each entry in the vocabulary has corresponding attributes in the field corresponding to the target system; determine semantic recognition rules based on the sentence structure and attributes of the entries of each historical user corpus in multiple historical user corpora, wherein the historical user corpora include corpora generated when the user interacts with the target system; after the target system determines the meaning of the target corpus input by the user according to the semantic recognition rules and performs the target operation behavior based on the meaning of the target corpus, obtain user feedback information on the target operation behavior; and modify the semantic recognition rules based on the feedback information.
[0150] Optionally, the processor may also execute the following steps of program code: determining the attributes of entries in the historical user corpus in the domain corresponding to the target system based on the vocabulary, and annotating the attributes of the entries in the historical user corpus in the form of labels; determining the expression pattern of a historical user corpus based on the sentence structure of the historical user corpus and the label of the entry; determining the number of occurrences of different expression patterns in multiple historical user corpora respectively; determining an expression pattern with a number of occurrences greater than a preset number as a first pattern; when the first pattern is different from an expression pattern already existing in the pattern library, adding the first pattern to the pattern library to obtain an updated pattern library; and determining semantic recognition rules based on the updated pattern library.
[0151] Optionally, the processor may also execute the following program code: before determining the attributes of entries in the historical user corpus in the domain corresponding to the target system based on the vocabulary, if the same user corpus exists in multiple historical user corpora, deduplication operation is performed on the same user corpus.
[0152] Optionally, the processor may also execute the following steps of program code: after determining the expression pattern of a historical user corpus based on the sentence structure and entry label of the historical user corpus, determine whether the expression pattern belongs to an expression pattern prohibited by the system, wherein the expression pattern prohibited by the system at least includes an expression pattern whose meaning cannot be determined; if the expression pattern belongs to an expression pattern prohibited by the system, delete the expression pattern.
[0153] Optionally, the processor may also execute the program code of the following steps: before determining the semantic recognition rules based on the sentence structure and word attributes of each historical user corpus in multiple historical user corpora, the multiple historical user corpora are screened according to preset rules, wherein the preset rules include at least one of the following: whether the user corpus is a user corpus in which the target system has doubts about the semantics of the corpus, and whether the user corpus is a user corpus in which the expression appears for the first time in multiple historical user corpora; and the historical user corpora that meet the preset rules are placed in a candidate database.
[0154] Optionally, the processor may also execute the program code of the following steps: determining semantic recognition rules based on the sentence structure and the attributes of the entries in each of the multiple historical user corpora, including: determining the attributes of the entries in the historical user corpora in the candidate database in the field corresponding to the target system, and annotating the attributes of the entries in the historical user corpora in the form of labels; constructing a training data set based on the historical user corpora with the tags of the entries completed; obtaining a target model based on the data training in the training data set; and determining semantic recognition rules based on the target model.
[0155] Optionally, the processor may also execute the following program code: expand entries according to the type of labels of the entries in each historical user corpus, and expand the user corpus based on the sentence structure of the historical user corpus and the expanded entries; and add the expanded user corpus to the training data set.
[0156] Optionally, the processor may also execute the program code of the following steps: modifying the semantic recognition rules based on at least one of the following feedback information: the user's negative evaluation of the target operation behavior, the user correcting the input of the target corpus, and the user not interacting with the target operation behavior.
[0157] Optionally, the processor can also execute the following steps of program code: obtaining updated entries from at least one of the following data sources: the search log corresponding to the target system, the data in the relevant web pages of the target system; adding the obtained entries to the vocabulary of the target system, and matching the corresponding attributes for each entry in the vocabulary. The embodiment of the present invention adopts the method of constructing semantic recognition rules, by expanding the vocabulary of the target system and determining the attributes of the entries, determining the semantic recognition rules based on the sentence structure of the user corpus and the attributes of the entries, and correcting the semantic recognition rules based on the user's feedback information on the target operation behavior, so as to achieve the purpose of improving the semantic recognition ability of the target system, thereby achieving the technical effect of improving the corpus meaning recognition function of the target system in the process of interaction between the user and the target system, thereby solving the technical problem in the related art that it is difficult to improve the corpus meaning recognition function of the target system based on the user data generated in the process of interaction between the user and the target system.
[0158] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: obtaining updated entries from a data source associated with the television to expand the vocabulary of the television, wherein the television performs operation behaviors based on the corpus input by the user, and each entry in the vocabulary has corresponding attributes in the field of video playback; determining semantic recognition rules based on the sentence structure and attributes of the entries of each historical user corpus in multiple historical user corpora, wherein the historical user corpora include corpora generated when the user interacts with the television; after the television determines the meaning of the target corpus input by the user according to the semantic recognition rules and performs the target operation behavior based on the meaning of the target corpus, obtaining user feedback information on the target operation behavior; and correcting the semantic recognition rules based on the feedback information.
[0159] By adopting the embodiment of the present invention, a method of constructing semantic recognition rules is adopted. By expanding the vocabulary of the target system and determining the attributes of the entries, the semantic recognition rules are determined based on the sentence structure of the user corpus and the attributes of the entries, and the semantic recognition rules are corrected based on the user's feedback information on the target operation behavior, thereby achieving the purpose of improving the semantic recognition ability of the target system, thereby achieving the technical effect of improving the corpus meaning recognition function of the target system in the process of interaction between the user and the target system, and further solving the technical problem in the related art that it is difficult to improve the corpus meaning recognition function of the target system based on the user data generated in the process of interaction between the user and the target system.
[0160] It can be understood by those skilled in the art that Fig.12 The structure shown is for illustration only, and the computer terminal may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a handheld computer, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Fig.12 The structure of the electronic device is not limited. For example, the computer terminal 10 may also include Fig.12 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Fig.12 Different configurations are shown.
[0161] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0162] Example 6
[0163] The embodiment of the present invention further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the data processing method provided in the first embodiment.
[0164] Optionally, in this embodiment, the above storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0165] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: obtaining updated entries from a data source associated with the target system to expand the vocabulary of the target system, wherein the target system performs operation behaviors based on the corpus input by the user, and each entry in the vocabulary has corresponding attributes in the field corresponding to the target system; determining semantic recognition rules based on the sentence structure and attributes of the entries of each historical user corpus in multiple historical user corpora, wherein the historical user corpora include corpora generated when the user interacts with the target system; after the target system determines the meaning of the target corpus input by the user according to the semantic recognition rules, and performs the target operation behavior based on the meaning of the target corpus, obtaining user feedback information on the target operation behavior; and correcting the semantic recognition rules based on the feedback information.
[0166] Based on the sentence structure and the attributes of the terms in each of the multiple historical user corpora, the semantic recognition rules are determined, including: determining the attributes of the terms in the historical user corpora in the field corresponding to the target system based on the vocabulary, and annotating the attributes of the terms in the historical user corpora in the form of labels; determining the expression mode of a historical user corpus based on the sentence structure and the labels of the terms in the historical user corpora; determining the number of occurrences of different expression modes in the multiple historical user corpora respectively; determining the expression mode with a number of occurrences greater than a preset number as the first mode; when the first mode is different from the expression mode already existing in the mode library, adding the first mode to the mode library to obtain an updated mode library; and determining the semantic recognition rules based on the updated mode library.
[0167] Before determining the attributes of the entries in the historical user corpus in the domain corresponding to the target system based on the lexicon, if the same user corpus exists in multiple historical user corpora, a deduplication operation is performed on the same user corpus.
[0168] After determining the expression pattern of a historical user corpus based on the sentence structure and the label of the entry of the historical user corpus, it is judged whether the expression pattern belongs to the expression pattern prohibited by the system, wherein the expression pattern prohibited by the system at least includes the expression pattern whose meaning cannot be determined; in the case that the expression pattern belongs to the expression pattern prohibited by the system, the expression pattern is deleted.
[0169] Based on the sentence structure and word attributes of each of the multiple historical user corpora, before determining the semantic recognition rules, the multiple historical user corpora are screened according to preset rules, wherein the preset rules include at least one of the following: whether the target system has doubts about the semantics of the corpus, whether it is the user corpus where the expression appears for the first time in the multiple historical user corpora; the historical user corpora that meet the preset rules are put into the candidate database.
[0170] Based on the sentence structure and the attributes of the entries in each of the multiple historical user corpora, the semantic recognition rules are determined, including: determining the attributes of the entries in the historical user corpora in the candidate database in the field corresponding to the target system, and annotating the attributes of the entries in the historical user corpora in the form of labels; constructing a training data set based on the historical user corpora with the tags of the entries; obtaining a target model based on the data training in the training data set; and determining the semantic recognition rules based on the target model.
[0171] The entries are expanded according to the type of the label of each entry in the historical user corpus, and the user corpus is expanded based on the sentence structure of the historical user corpus and the expanded entries; the user corpus obtained after the expansion is added to the training data set.
[0172] The semantic recognition rules are modified based on at least one of the following feedback information: a negative evaluation of the target operation behavior by the user, a correction of the input of the target corpus by the user, and a failure of the user to interact with the target operation behavior.
[0173] Obtaining updated entries from a data source associated with a target system to expand the vocabulary of the target system includes: obtaining updated entries from at least one of the following data sources: a search log corresponding to the target system, data in a related web page of the target system; adding the obtained entries to the vocabulary of the target system, and matching corresponding attributes for each entry in the vocabulary.
[0174] Optionally, in this embodiment, the storage medium is also configured to store program code for executing the following steps: obtaining updated entries from a data source associated with the television to expand the vocabulary of the television, wherein the television performs an operation based on a corpus input by the user, and each entry in the vocabulary has corresponding attributes in the field of video playback; determining semantic recognition rules based on the sentence structure and attributes of the entries of each historical user corpus in multiple historical user corpora, wherein the historical user corpora include corpora generated when the user interacts with the television; obtaining user feedback on the target operation after the television determines the meaning of the target corpus input by the user according to the semantic recognition rules and performs the target operation based on the meaning of the target corpus; and correcting the semantic recognition rules based on the feedback information.
[0175] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0176] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0177] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0178] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0179] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0180] If 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 technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0181] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.< / video> < / video> < / video> < / video> < / video> < / video> < / video> < / video> < / video> < / video> < / video> < / video> < / video> < / video> < / video> < / video> < / video> < / video> < / video> < / video> < / video> < / video> < / video> < / video> < / video> < / video>
Claims
1. A data processing method, wherein: include: Acquire updated terms from a data source associated with a target system to expand the vocabulary of the target system, wherein the target system performs an operation based on the corpus input by the user, and each term in the vocabulary has a corresponding attribute in the field corresponding to the target system; Determining semantic recognition rules based on the sentence structure and the attributes of the entries of each of the multiple historical user corpora, wherein the historical user corpora include corpora generated when the user interacts with the target system; After the target system determines the meaning of the target corpus input by the user according to the semantic recognition rule and performs the target operation behavior based on the meaning of the target corpus, obtaining feedback information of the user on the target operation behavior; Modifying the semantic recognition rule based on the feedback information; Based on the sentence structure and entry attributes of each of the multiple historical user corpora, determining the semantic recognition rules includes: determining the attributes of the entries in the historical user corpora in the field corresponding to the target system based on the vocabulary, and annotating the attributes of the entries in the historical user corpora in the form of labels; determining the expression mode of a historical user corpus based on the sentence structure and entry labels of the historical user corpus; updating the pattern library according to the expression modes of the multiple historical user corpora to obtain an updated pattern library; and determining the semantic recognition rules based on the updated pattern library.
2. The method according to claim 1, wherein: Updating the pattern library according to the expression patterns of the plurality of historical user corpora includes: Determining the number of occurrences of different expression patterns in the plurality of historical user corpora respectively; Determine an expression pattern whose occurrence number is greater than a preset number as a first pattern; When the first pattern is different from an existing expression pattern in the pattern library, adding the first pattern to the pattern library to obtain an updated pattern library; The semantic recognition rule is determined based on the updated pattern library.
3. The method according to claim 2, wherein: The method further comprises: Before determining the attributes of the entries in the historical user corpus in the domain corresponding to the target system based on the lexicon, if the same user corpus exists in the plurality of historical user corpora, a deduplication operation is performed on the same user corpus.
4. The method according to claim 2, wherein: The method further comprises: After determining an expression pattern of a piece of historical user corpus based on a sentence structure of the piece of historical user corpus and a label of a word entry, determining whether the expression pattern belongs to an expression pattern prohibited by the system, wherein the expression pattern prohibited by the system at least includes an expression pattern whose meaning cannot be determined; In the case where the expression pattern is an expression pattern prohibited by the system, the expression pattern is deleted.
5. The method according to claim 1, wherein: The method further comprises: Based on the sentence structure and the attributes of the entries of each of the multiple historical user corpora, before determining the semantic recognition rule, the multiple historical user corpora are screened according to preset rules, wherein the preset rules include at least one of the following: whether the user corpora are in doubt about the semantics of the corpora by the target system, and whether the user corpora are the user corpora where the expression appears for the first time in the multiple historical user corpora; The historical user corpus that meets the preset rules is put into the candidate database.
6. The method according to claim 5, wherein: Based on the sentence structure and word attributes of each of the multiple historical user corpora, the semantic recognition rules are determined to include: Determining the attributes of the entries in the historical user corpus in the candidate database in the domain corresponding to the target system, and annotating the attributes of the entries in the historical user corpus in the form of tags; Constructing a training data set based on the historical user corpus with completed tag annotation of entries; Obtaining a target model based on data training in the training data set; The semantic recognition rules are determined based on the target model.
7. The method according to claim 6, wherein: The method further comprises: Expanding entries according to the type of the tag of each entry in the historical user corpus, and expanding the user corpus based on the sentence structure of the historical user corpus and the expanded entries; The expanded user corpus is added to the training data set.
8. The method of claim 1, wherein: The semantic recognition rule is modified based on at least one of the following feedback information: a user's negative evaluation of the target operation behavior, a user correcting an input of the target corpus, and a user not interacting with the target operation behavior.
9. The method according to claim 1, wherein: Acquiring updated terms from a data source associated with a target system to expand the vocabulary of the target system includes: Obtaining updated entries from at least one of the following data sources: a search log corresponding to the target system, data in a related web page of the target system; The acquired terms are added to the vocabulary of the target system, and corresponding attributes are matched for each term in the vocabulary.
10. A data processing method, wherein: include: Acquire updated terms from a data source associated with the television to expand a vocabulary of the television, wherein the television performs an operation based on corpus input by a user, and each term in the vocabulary has a corresponding attribute in the field of video playback; Determining semantic recognition rules based on the sentence structure and the attributes of the entries of each of the plurality of historical user corpora, wherein the historical user corpora include corpora generated when the user interacts with the television; After the television determines the meaning of the target language input by the user according to the semantic recognition rule and performs a target operation behavior based on the meaning of the target language, obtaining feedback information of the user on the target operation behavior; Modifying the semantic recognition rule based on the feedback information; Based on the sentence structure and entry attributes of each of the multiple historical user corpora, determining the semantic recognition rules includes: determining the attributes of the entries in the historical user corpora in the field corresponding to the television based on the vocabulary, and annotating the attributes of the entries in the historical user corpora in the form of tags; determining the expression pattern of a historical user corpus based on the sentence structure and entry tags of the historical user corpus; updating the pattern library according to the expression patterns of the multiple historical user corpora to obtain an updated pattern library; and determining the semantic recognition rules based on the updated pattern library.
11. A data processing device, wherein: include: An expansion unit, configured to obtain updated entries from a data source associated with a target system to expand the vocabulary of the target system, wherein the target system performs an operation based on the corpus input by the user, and each entry in the vocabulary has a corresponding attribute in a field corresponding to the target system; A determination unit, configured to determine a semantic recognition rule based on the sentence structure and the attribute of the word entry of each of the plurality of historical user corpora, wherein the historical user corpora include corpora generated when the user interacts with the target system; an acquisition unit, configured to acquire user feedback information on the target operation behavior after the target system determines the meaning of the target corpus input by the user according to the semantic recognition rule and performs the target operation behavior based on the meaning of the target corpus; A correction unit, configured to correct the semantic recognition rule based on the feedback information; The determination unit is used to determine the attributes of the entries in the historical user corpus in the field corresponding to the target system based on the vocabulary, and to annotate the attributes of the entries in the historical user corpus in the form of labels; determine the expression pattern of a historical user corpus based on the sentence structure and the label of the entry; update the pattern library according to the expression patterns of the multiple historical user corpora to obtain an updated pattern library; and determine the semantic recognition rules based on the updated pattern library.
12. A processor, wherein: The processor is used to run a program, wherein the program executes the data processing method according to any one of claims 1 to 10 when running.
Citation Information
Patent Citations
Self-updating semantic understanding system and method
CN107015969A