An information processing method, apparatus and electronic device

By identifying the semantic slot candidate set from the query information and segmenting it using various preset rules, the problem of low semantic slot filling accuracy is solved, achieving higher semantic slot filling accuracy and resource efficiency.

CN116561248BActive Publication Date: 2026-01-20CHINA MOBILE COMM LTD RES INST +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210100335.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-27
Publication Date
2026-01-20
Estimated Expiration
2042-01-27

AI Technical Summary

Technical Problem

In existing technologies, semantic slot filling is not very accurate, especially in the case of high error rates in Chinese word segmentation, ignoring contextual information and user state in multi-turn dialogues, and high model training costs.

Method used

By determining the candidate set of semantic slots corresponding to the query information, multiple preset rules are used for segmentation, and semantic slots are filled according to the segmentation results. By combining a model-based, preset rule-based and user input-based method, the candidate set of semantic slots is dynamically adjusted to improve the accuracy of semantic slot filling.

Benefits of technology

It improves the accuracy of semantic slot filling, reduces the impact of word segmentation errors, dynamically adjusts to adapt to specific scenarios, and reduces the resource consumption of model training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116561248B_ABST
    Figure CN116561248B_ABST
Patent Text Reader

Abstract

The application provides an information processing method, device and electronic equipment, and relates to the field of natural language processing. The method comprises the following steps: determining a semantic slot candidate set corresponding to query information according to the query information input by a user; wherein the query information corresponds to a plurality of word slots, and the semantic slot candidate set comprises at least one semantic slot corresponding to each word slot; splitting the query information according to N kinds of preset rules according to the semantic slot candidate set, to obtain a splitting result corresponding to the N kinds of preset rules; wherein each kind of preset rule corresponds to one splitting result; performing semantic slot filling according to the N kinds of splitting results, determining a semantic slot filling result corresponding to each kind of splitting result, and determining a target semantic slot filling result from the semantic slot filling results corresponding to the N kinds of splitting results. The application combines the word segmentation process with the semantic slot candidate set, and respectively screens the splitting results from N kinds of angles, thereby improving the accuracy of semantic slot filling.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of natural language processing, and particularly to an information processing method and device and electronic equipment. BACKGROUND

[0002] With the rapid development of artificial intelligence related technologies, intelligent dialogue systems, as an important entry of human-computer interaction, play an increasingly important role. Task-oriented dialogue systems, which aim to perform specific tasks for users, are a hot spot in current intelligent dialogue system research. The main work includes natural language understanding, dialogue management and natural language generation. In the natural language understanding stage, two important technologies, namely intent recognition and semantic slot filling, are mainly involved. Semantic slot filling refers to the process of extracting entities in user input content, which is an important way for the system to obtain information.

[0003] In the prior art method, the following defects exist:

[0004] (1) Semantic slot filling depends on the word segmentation result. For the natural language processing process of Chinese, due to the flexibility of Chinese word combination, many works need to first segment the object to be processed, divide the text into the smallest semantic unit, and then perform subsequent processing. However, for some proper nouns or out-of-vocabulary words, a general word segmentation system may incorrectly segment them into several parts, which will interfere with the downstream semantic slot filling work, leading to the accumulation of errors in the entire work. Moreover, in the semantic slot filling process, the object to be processed is mainly the entity, so the probability of occurrence of proper nouns and out-of-vocabulary words is high, and the probability of segmentation error will also increase.

[0005] (2) The slot filling problem of multi-turn dialogue does not consider the influence of the overall semantics of the input sentence on semantic slot filling. Task-oriented dialogue usually supports the system to collect information through multi-turn interaction, so the user state and context information have certain information input for the semantic slot filling process. However, many current model-based dialogue systems predict according to the current user input text, ignoring the information gain brought by the context information and user state for slot filling. Especially in the process of collecting multiple slots, all the necessary semantic slots have not been collected, and the probability distribution of each semantic slot contained in the user input information is not completely equal, and the slot to be collected should have a higher weight. Therefore, in the dialogue system, the relationship between each functional module is not completely sequential reasoning, but is coupled and brings information gain.

[0006] (3) The model cannot quickly respond to the personalized semantic slot filling work of the user in a specific field, and the retraining cost is high. When using the model for semantic slot filling, a large amount of data is needed for model training, which is effective in the general field, but in a specific personalized scene, there will be problems of insufficient data and rapid changes. In the case of insufficient data, it is difficult to fully obtain useful features, and overfitting problems are also easy to occur. Rapid data changes require multiple training data, which occupies a lot of resources.

[0007] In summary, the above defects result in low accuracy of semantic slot filling. SUMMARY

[0008] The purpose of the present application is to provide an information processing method and device, and an electronic method, device and electronic equipment, to avoid the problem of low accuracy of semantic slot filling in the prior art.

[0009] To achieve the above-mentioned purpose, an embodiment of the present application provides an information processing method, comprising:

[0010] According to the query information input by the user, determine the semantic slot candidate set corresponding to the query information; wherein the query information corresponds to a plurality of word slots, and the semantic slot candidate set includes at least one semantic slot corresponding to each word slot;

[0011] According to the semantic slot candidate set, the query information is segmented according to N kinds of preset rules, and the segmentation results corresponding to the N kinds of preset rules are obtained; wherein each kind of preset rule corresponds to a segmentation result;

[0012] According to the N kinds of segmentation results, the semantic slot filling is carried out, the semantic slot filling result corresponding to each segmentation result is determined, and the target semantic slot filling result is determined from the semantic slot filling results corresponding to the N kinds of segmentation results.

[0013] Optionally, the information processing method, wherein the query information input by the user is determined, and the semantic slot candidate set corresponding to the query information is determined, comprising:

[0014] According to the query information, the semantic slot candidate set corresponding to the query information is determined from the preset method;

[0015] The preset method includes at least one of the following methods: matching the query information with the semantic slot based on model training, matching the query information with the semantic slot based on the preset rule, and matching the query information with the semantic slot based on user input.

[0016] Optionally, the information processing method, wherein the query information is determined from the preset method, and the semantic slot candidate set corresponding to the query information is determined, comprising:

[0017] According to the query information, determine the word slot of the query information;

[0018] According to the word slot, determine the flat slot and / or dependent slot corresponding to the word slot;

[0019] According to the flat slot and / or the dependent slot, determine the semantic slot candidate set corresponding to the flat slot and / or the dependent slot.

[0020] Optionally, the information processing method, wherein the N kinds of preset rules include a first rule of cutting according to the word slot length attribute, and the cutting of the query information according to the N kinds of preset rules to obtain the cutting result corresponding to the N kinds of preset rules includes:

[0021] According to the semantic slot candidate set, determine the plurality of word slots corresponding to the query information;

[0022] According to the plurality of word slots, establish a directed acyclic graph, and according to the directed acyclic graph, determine the length of each path connected; wherein the elements of the directed acyclic graph are word slots;

[0023] According to the length of each path connected and the first rule, determine the first cutting result based on the longest word slot length.

[0024] Optionally, the information processing method, wherein the N kinds of preset rules include a second rule of cutting according to the word slot number attribute, and the cutting of the query information according to the N kinds of preset rules to obtain the cutting result corresponding to the N kinds of preset rules includes:

[0025] According to the semantic slot candidate set, determine the plurality of word slots corresponding to the query information;

[0026] According to the plurality of word slots, establish a directed acyclic graph, and according to the directed acyclic graph, determine the length of each path connected; wherein the elements of the directed acyclic graph are word slots;

[0027] According to the length of each path connected and the second rule, determine the second cutting result based on the most word slots.

[0028] Optionally, the information processing method, wherein according to the N kinds of cutting results, the semantic slot filling result corresponding to each cutting result is determined, including:

[0029] For each cutting result, determine the intent corresponding to each semantic slot of the cutting result according to the intent knowledge base;

[0030] sort the intents corresponding to the semantic slots according to the same type of the semantic slots;

[0031] combine the intents output according to the different types of the semantic slots, and determine the semantic slot filling result corresponding to each segmentation result.

[0032] Optionally, the information processing method, wherein the sorting the intents corresponding to the semantic slots according to the same type of the semantic slots comprises:

[0033] for each intent corresponding to the semantic slots, scoring the same type of the semantic slots according to a preset formula, and sorting the intents corresponding to the semantic slots according to the intent scoring results;

[0034] wherein the preset formula comprises:

[0035] Score = input[slot] / 2 + input[slot] / intent[slot];

[0036] wherein intent[slot] is the total number of required semantic slots of the first intent, input[slot] is the number of times of the required semantic slots of the first intent appearing in the query information, and Score is the intent scoring result of the first intent.

[0037] Optionally, the information processing method, wherein the determining the intent corresponding to each semantic slot of the segmentation result according to the intent knowledge base comprises:

[0038] constructing a first correspondence matrix of each word slot and at least one corresponding semantic slot according to the query information;

[0039] constructing a second relationship matrix of the word slot and the intent according to each element in the first correspondence matrix and the intent knowledge base; the intent knowledge base comprises the correspondence relationship between the semantic slot and at least one intent;

[0040] determining the intent corresponding to each semantic slot of the segmentation result according to the second relationship matrix.

[0041] To achieve the above object, an embodiment of the present application further provides an electronic device comprising a processor and a transceiver, wherein the processor is configured to determine a semantic slot candidate set corresponding to query information input by a user according to the query information; wherein the query information corresponds to a plurality of word slots, and the semantic slot candidate set comprises at least one semantic slot corresponding to each word slot.

[0042] The processor is further configured to split the query information according to N preset rules according to the semantic slot candidate set, to obtain a split result corresponding to each of the N preset rules; each preset rule corresponds to a split result.

[0043] The processor is further configured to perform semantic slot filling according to the N split results, to determine a semantic slot filling result corresponding to each split result, and to determine a target semantic slot filling result from the semantic slot filling results corresponding to the N split results.

[0044] Optionally, the electronic device, wherein the processor is specifically configured to:

[0045] determine a semantic slot candidate set corresponding to the query information from a preset method according to the query information;

[0046] The preset method includes at least one of the following methods: matching the query information with a semantic slot obtained based on model training, matching the query information with a semantic slot determined based on a preset rule, and matching the query information with a semantic slot determined based on user input.

[0047] Optionally, the electronic device, wherein the processor is specifically configured to:

[0048] determine a word slot of the query information according to the query information;

[0049] determine a flat slot and / or a dependent slot corresponding to the word slot according to the word slot;

[0050] determine the semantic slot candidate set corresponding to the flat slot and / or the dependent slot according to the flat slot and / or the dependent slot.

[0051] Optionally, the electronic device, wherein the processor is specifically configured to:

[0052] determine a plurality of word slots corresponding to the query information according to the semantic slot candidate set;

[0053] establish a directed acyclic graph according to the plurality of word slots, and determine a length of each path connected according to the directed acyclic graph; an element of the directed acyclic graph is a word slot;

[0054] determine a first split result based on a longest word slot length according to the length of each path connected and the first rule.

[0055] Optionally, the electronic device, wherein the processor is specifically configured to:

[0056] determine a plurality of word slots corresponding to the query information according to the semantic slot candidate set;

[0057] According to the plurality of word slots, a directed acyclic graph is established, and according to the directed acyclic graph, a length of each path connected is determined; wherein, an element of the directed acyclic graph is a word slot;

[0058] According to the length of each path connected and the second rule, a second segmentation result based on the largest number of word slots is determined.

[0059] Optionally, the electronic device, wherein the processor is specifically configured to:

[0060] According to the intent knowledge base, for each segmentation result, an intent corresponding to each semantic slot of the segmentation result is determined;

[0061] According to semantic slots of the same type, intents corresponding to the semantic slots are sorted;

[0062] According to the intents output by sorting the semantic slots of different types, a semantic slot filling result corresponding to each segmentation result is determined.

[0063] Optionally, the electronic device, wherein the processor is specifically configured to:

[0064] According to a preset formula, for each intent corresponding to the semantic slots, semantic slots of the same type are scored, and according to an intent score result, intents corresponding to the semantic slots are sorted;

[0065] The preset formula includes:

[0066] Score = input[slot] / 2 + input[slot] / intent[slot];

[0067] Wherein, intent[slot] is the total number of required semantic slots of a first intent, input[slot] is the number of times that the required semantic slots of the first intent appear in the query information, and Score is an intent score result of the first intent.

[0068] Optionally, the electronic device, wherein the processor is specifically configured to:

[0069] According to the query information, a first correspondence matrix of each word slot and at least one corresponding semantic slot is constructed;

[0070] According to each element in the first correspondence matrix and the intent knowledge base, a second relationship matrix of the word slots and the intents is constructed; the intent knowledge base includes a corresponding relationship between semantic slots and at least one intent;

[0071] According to the second relationship matrix, an intent corresponding to each semantic slot of a segmentation result is determined.

[0072] To achieve the above object, the embodiments of the present application further provide an information processing device, comprising:

[0073] A first processing module is configured to determine a semantic slot candidate set corresponding to the query information according to the user input query information, wherein the query information corresponds to a plurality of word slots, and the semantic slot candidate set comprises at least one semantic slot corresponding to each word slot;

[0074] A second processing module is configured to split the query information according to N preset rules according to the semantic slot candidate set, to obtain a split result corresponding to each preset rule, wherein each preset rule corresponds to a split result;

[0075] A third processing module is configured to perform semantic slot filling according to the N split results, to determine a semantic slot filling result corresponding to each split result, and to determine a target semantic slot filling result from the semantic slot filling results corresponding to the N split results.

[0076] Optionally, in the information processing device, the first processing module comprises:

[0077] A first processing unit is configured to determine the semantic slot candidate set corresponding to the query information from a preset method according to the query information;

[0078] The preset method comprises at least one of the following methods: matching the query information with a semantic slot trained based on a model, matching the query information with a semantic slot determined based on a preset rule, and matching the query information with a semantic slot determined based on user input.

[0079] Optionally, in the information processing device, the first processing unit comprises:

[0080] A first determining subunit is configured to determine a word slot of the query information according to the query information;

[0081] A second determining subunit is configured to determine a parallel slot and / or a dependent slot corresponding to the word slot according to the word slot;

[0082] A third determining subunit is configured to determine the semantic slot candidate set corresponding to the parallel slot and / or the dependent slot according to the parallel slot and / or the dependent slot.

[0083] Optionally, in the information processing device, the second processing module comprises:

[0084] A first determining unit is configured to determine a plurality of word slots corresponding to the query information according to the semantic slot candidate set;

[0085] The second determining unit is configured to establish a directed acyclic graph according to the plurality of word slots, and determine a length of each path connected according to the directed acyclic graph; wherein an element of the directed acyclic graph is a word slot;

[0086] The third determining unit is configured to determine a first segmentation result based on a longest word slot length according to the length of each path connected and the first rule.

[0087] Optionally, the second processing module of the information processing apparatus further includes:

[0088] The fourth determining unit is configured to determine a plurality of word slots corresponding to the query information according to the semantic slot candidate set;

[0089] The fifth determining unit is configured to establish a directed acyclic graph according to the plurality of word slots, and determine a length of each path connected according to the directed acyclic graph; wherein an element of the directed acyclic graph is a word slot;

[0090] The sixth determining unit is configured to determine a second segmentation result based on a maximum number of word slots according to the length of each path connected and the second rule.

[0091] Optionally, the third processing module of the information processing apparatus includes:

[0092] The second processing unit is configured to determine, for each segmentation result, an intent corresponding to each semantic slot of the segmentation result according to an intent knowledge base;

[0093] The third processing unit is configured to sort the intents corresponding to the semantic slots according to semantic slots of the same type;

[0094] The fourth processing unit is configured to combine the intents output according to the semantic slots of different types to determine a semantic slot filling result corresponding to each segmentation result.

[0095] Optionally, the third processing unit of the information processing apparatus includes:

[0096] The first processing subunit is configured to score the semantic slots of the same type according to a preset formula for each intent corresponding to the semantic slots, and sort the intents corresponding to the semantic slots according to the intent score results;

[0097] The preset formula includes:

[0098] Score = input[slot] / 2 + input[slot] / intent[slot];

[0099] Wherein, the intent[slot] is the total number of required semantic slots of the first intent, the input[slot] is the number of times that the required semantic slots of the first intent appear in the query information, and the Score is the intent score result of the first intent.

[0100] Optionally, in the information processing device, the second processing unit comprises:

[0101] The second processing subunit is configured to construct a first correspondence matrix of each word slot and at least one corresponding semantic slot according to the query information.

[0102] The third processing subunit is configured to construct a second relationship matrix of the word slot and the intent according to each element in the first correspondence matrix and the intent knowledge base.

[0103] The fourth processing subunit is configured to determine the intent corresponding to each semantic slot of the segmentation result according to the second relationship matrix.

[0104] To achieve the above object, an embodiment of the present application further provides an electronic device, comprising a transceiver, a processor, a memory, and a program or instruction stored in the memory and executable on the processor; the processor executes the program or instruction to implement the information processing method according to any one of the above.

[0105] To achieve the above object, an embodiment of the present application further provides a readable storage medium having a program or instruction stored thereon, the program or instruction being executable by a processor to implement the steps of the information processing method according to any one of the above.

[0106] The above technical solution of the present application has the following advantages:

[0107] In the above technical solution, the information processing method determines a semantic slot candidate set corresponding to the query information according to the user input; wherein the query information corresponds to a plurality of word slots, and the semantic slot candidate set comprises at least one semantic slot corresponding to each word slot; according to the semantic slot candidate set, the query information is segmented according to N preset rules to obtain segmentation results corresponding to the N preset rules; wherein each preset rule corresponds to a segmentation result; semantic slot filling is performed according to the N segmentation results to determine semantic slot filling results corresponding to each segmentation result, and a target semantic slot filling result is determined from the semantic slot filling results corresponding to the N segmentation results; the combination of the word segmentation process and the semantic slot candidate set is realized, and the segmentation results are respectively screened from N angles, thereby improving the accuracy of semantic slot filling. BRIEF DESCRIPTION OF DRAWINGS

[0108] Figure 1 One of the flowcharts of the information processing method provided by the embodiment of the present application;

[0109] Figure 2 One of the flowcharts of the information processing method provided by the embodiment of the present application;

[0110] Figure 3 The structural schematic diagram of the electronic device provided by the embodiment of the present application;

[0111] Figure 4 The module schematic diagram of the information processing device provided by the embodiment of the present application;

[0112] Figure 5 The structural schematic diagram of the electronic device provided by another embodiment of the present application. DETAILED DESCRIPTION

[0113] To make the technical problems, technical solutions and advantages of the present application clearer, the following will be described in detail with reference to the accompanying drawings and specific embodiments.

[0114] It should be understood that the "one embodiment" or "an embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner.

[0115] In various embodiments of the present application, it should be understood that the size of the serial number of the following processes does not mean the order of execution, and the execution order of the processes should be determined by their functions and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0116] It should be known that, with the rapid development of artificial intelligence related technology, intelligent dialogue system as an important entrance of human-computer interaction, plays an increasingly important role. Intelligent dialogue system is indispensable in application scenarios including customer service system, telephone assistant, service robot, home appliance control, automatic driving, voice assistant, chat robot, etc. Task-oriented dialogue system, which aims to perform specific tasks for users, is the focus of current intelligent dialogue system research. Compared with single-turn question-answering dialogue system based on search mode, task-oriented dialogue system involves user state saving and information collection, and has higher complexity. Compared with the relatively high complexity of casual dialogue system, task-oriented dialogue has relatively stable dialogue content and relatively closed dialogue scene, and is more implementable. The main work of task-oriented dialogue system includes natural language understanding (NLU), dialogue management (DM) and natural language generation (NLG).

[0117] Natural language understanding is an important foundation of intelligent dialogue system, which mainly processes the user input sentence or the result of speech recognition, extracts the user's dialogue intent and the information contained in the user input. The application of natural language understanding in question and answer dialogue system is not as extensive as in task-oriented dialogue system. The mainstream technology of current question and answer dialogue is still based on search engine related technology. For standard questions, the answer given by the system is pre-configured, and the system does not understand the user's input. In the future, natural language understanding technology will be applied to analyze user input, combined with natural language generation technology to give system reply, which can bring more vivid question and answer service to users. The improvement of natural language understanding effect can enrich the information obtained from user input, so that the system can collect more intelligence and provide more data and more reliable support for the subsequent modules.

[0118] Dialogue management is divided into two sub-modules, dialogue state tracking (DST) and dialogue policy learning (DPL), which mainly update the system state according to the results of NLU and generate corresponding system actions. There are three main methods for DST: rule-based method, generative model and discriminative model. Although there are many related researches on generative model and discriminative model, in the industry, the rule-based method is still mainly used due to the limitation of related data resources. The research related to DPL generally models into reinforcement learning or deep reinforcement learning. Similar to DST, the rule-based method is also mainly used in the industry.

[0119] Natural language generation: the system action output by DM is expressed in natural language form. That is, how to naturally ask the user to supplement other slot values and clarify ambiguous information. The natural language generation module can bring direct experience to users, and its performance is closely related to the user's satisfaction. Although in task-oriented dialogue system, the final reply of the dialogue system may be a certain action (such as calling various interfaces), during the process of collecting information in multiple rounds of dialogue, the system still needs to ask the user for the corresponding information in a more friendly way. Therefore, natural language generation determines the overall evaluation of the user on the whole dialogue system.

[0120] In the natural language understanding stage, two important technologies are mainly involved, namely, intent recognition and semantic slot filling. The intent recognition, as the name implies, is to determine what the user wants to do or the topic the user is inquiring about. The intent recognition is essentially a text classification problem. Unlike tasks such as sentiment classification, the intent classification has various and flexible modes. In a task-oriented dialogue system, the user is usually allowed to upload data and intent labels autonomously, and different users have different needs and understandings of the classification results. The semantic slot filling refers to the process of extracting entities in the user input, which is an important way for the system to obtain information. Here, the entity mainly refers to an entity that has an impact on the execution of a task. For example, in the ticket booking scenario, the entities such as location, time, and quantity are necessary for the execution of the task, and the airline name is an optional information, but it will directly affect the execution of the task, so these are the objects of semantic slot filling. The common semantic slot filling techniques mainly include rule and dictionary-based semantic slot filling and model-based semantic slot filling. The rule and dictionary-based semantic slot filling has the advantages of flexibility, rapidity, and dynamic adjustment, but it is difficult to solve the parts that cannot be covered by rules and dictionaries. The model-based semantic slot filling usually regards the semantic slot filling process as a sequence labeling task, which can break the limitations of the rule and dictionary-based mode to a certain extent, but it needs to prepare a large amount of data, and it is less applicable to scenarios with large data changes.

[0121] The present application aims at the problem of low semantic slot filling accuracy in the prior art, and provides an information processing method, device and electronic equipment.

[0122] As shown in Figure 1 The information processing method of the embodiment of the present application comprises:

[0123] In step 100, the query information input by the user is used to determine a semantic slot candidate set corresponding to the query information. The query information corresponds to a plurality of word slots, and the semantic slot candidate set includes at least one semantic slot corresponding to each word slot.

[0124] For example, when the query information input by the user is "How much is a ticket to Xi'an?", the word slot in this sentence is only "Xi'an", and the possible corresponding semantic slots are "departure place" and "destination". The "fee" that the user wants to obtain is not obtained from the user input, but may be a third-party interface or a database in a system, and is not an object of semantic slot extraction.

[0125] In step 200, the query information is divided according to N preset rules based on the semantic slot candidate set, and N division results corresponding to the N preset rules are obtained. Each preset rule corresponds to a division result, and N is a positive integer.

[0126] Step 300, according to the N segmentation results, the semantic slot filling is determined, and the target semantic slot filling result is determined from the N semantic slot filling results corresponding to the segmentation results.

[0127] In this embodiment, steps 100 to 200 are used to segment the query information according to the N preset rules based on the semantic slot candidate set, prevent the general model-based segmentation from affecting the semantic slot boundary of the specific scene, and interfere with the semantic slot filling. Further, by step 300, the semantic slot filling results corresponding to each of the N segmentation results are scored and sorted, and the top preset number of best slot filling results required by the system are selected, thereby improving the accuracy of semantic slot filling.

[0128] Optionally, the step 100 comprises:

[0129] Step 110, according to the query information, determining the semantic slot candidate set corresponding to the query information from the preset method;

[0130] The preset method comprises at least one of the following methods: matching the query information with the semantic slot based on model training, matching the query information with the semantic slot based on the preset rule, and matching the query information with the semantic slot based on user input.

[0131] According to the query information, the present application matches the semantic slot candidate set corresponding to the query information from the preset method. If matching, the matching result is listed in the preliminary screening set, and the position of the matching term in the sequence, the standardized value, and the possible semantic slot name are recorded.

[0132] Specifically, the present application loads the semantic slot based on model training, the semantic slot based on the preset rule, and the semantic slot based on user input, and matches at least one of the semantic slot based on model training, the semantic slot based on the preset rule, and the semantic slot based on user input according to the query information and the preset method, to obtain the semantic slot candidate set corresponding to the query information.

[0133] It should be noted that the semantic slot based on model training is trained in an offline manner, and the model is preloaded into the system. The model can be updated or expanded regularly according to business needs. The model is loaded into the memory system in the form of a file when the program starts.

[0134] The semantic slot based on the preset rule can be preloaded by the system or configured by the user, and is mainly used to solve the problem of not being able to exhaust the semantic slot type. For example: time, phone number, website, email, etc. The form of the rule includes but is not limited to regular expression; the semantic slot based on the preset rule is added to the rule queue in the memory.

[0135] The semantic slot determined based on the user input, supporting user import of custom words, prefix tree establishment for user custom data for quick query and instant modification, user custom data uploaded by the user according to business needs or edited on the platform, and capable of being modified at any time and taking effect immediately.

[0136] The present application distinguishes the semantic slot into a general semantic slot based on model training and a semantic slot based on preset rules, and an individual semantic slot based on user input, and the semantic slot based on user input opens an editing and uploading interface for user dictionary entries, supports user import of custom words, dynamically loads custom words, responds to user configuration in time, and calculates filling effect in a customized field using a search and matching degree score method.

[0137] In this embodiment, the semantic slot candidate set refers to the part in the user input that may be a semantic slot value and the corresponding semantic slot. For example, in the query information "go to Peking University this afternoon", "today" and "this afternoon" may be values of the semantic slots of time and time period, "Beijing" may be a destination or a departure place, and "Peking University" may be a university name. Among them, the time and time period may be extracted based on a semantic slot based on model training or a semantic slot based on preset rules, and the university name of "Peking University" is searched based on a semantic slot determined based on user input. Through step 110, the semantic slot candidate set corresponding to the query information can be determined from the preset method.

[0138] Here, the step 110 adopts different ways of processing: 1) for a general semantic dictionary, a matching method combining a semantic slot based on model training and a semantic slot based on preset rules is adopted, so that the system has higher universality; 2) for an individual custom dictionary, a rule and prefix tree query method is adopted, supporting dynamic expansion of the custom dictionary, reducing resource consumption of constant retraining of data, and to some extent, solving the problem of insufficient data.

[0139] Optionally, the step 110 comprises:

[0140] According to the query information, determining a word slot of the query information;

[0141] According to the word slot, determining a parallel slot and / or a dependent slot corresponding to the word slot;

[0142] According to the parallel slot and / or the dependent slot, determining a semantic slot candidate set corresponding to the parallel slot and / or the dependent slot.

[0143] It should be noted that according to whether the semantic slots are independent of each other and whether the subsequent slots depend on the results of the previous slots, the relationship between the slots can be divided into parallel slots and dependent slots. The parallel slots refer to that the semantic slots are independent of each other, for example, the three slots in the taxi, the departure location semantic slot, the destination location semantic slot, and the departure time semantic slot, and the three semantic slots do not have a direct dependent relationship. The dependent slots refer to whether the subsequent semantic slots depend on the results of the previous semantic slots, for example, the mobile phone number semantic slot. The mobile phone number formats are different in different countries (the attributes of the semantic slots are different), so the country semantic slot will affect the selection of the mobile phone number semantic slot.

[0144] In this embodiment, according to the query information, the word slot of the query information is determined, the current user state is obtained, and whether the word slot needs to depend on other semantic slots is determined according to the word slot and the current user state. If the dependent semantic slots of some semantic slots are not obtained in the current user state, these dependent slots are not included in the candidate set. If the current user state is collecting slots, only the semantic slots required by the current intent are processed. The user state here includes but is not limited to: the initial state of the first input; the state of inputting related content, such as the query information of the first input "ticket booking" and the query information of the subsequent inquiry "price"; the state of non-related content in the same chat, such as the query information of the first input "ticket booking" and the query information of the subsequent inquiry "weather".

[0145] For example, when the query information is "How much is the ticket to Xi'an?", the semantic slots in this sentence should only be "Xi'an", which may correspond to the semantic slots of "departure location", "destination", and "how much" (i.e. the fee) as the information that the user wants to obtain, which is not obtained from the user input and may be a third-party interface or a database in the system, which is not the object of semantic slot extraction. However, the semantic slot of "transfer station 1-n" cannot be directly obtained from the current user input and needs to be obtained in other interactions.

[0146] In order to solve the problem of selecting the results when there are multiple divisions of semantic slots. For example, when the query information is "Help me buy a ticket from Kunming to Tianjin.", the two semantic slots of "Kunming" and "Tianjin" need to be correctly divided, instead of being divided into "tomorrow" representing time. In order to correctly divide, the application divides the query information by using N preset rules.

[0147] Optionally, the N preset rules include a first rule of dividing according to the length attribute of the word slot, and the step 200 includes:

[0148] According to the semantic slot candidate set, a plurality of word slots corresponding to the query information are determined.

[0149] It should be noted that, since the semantic slot candidate set includes at least one semantic slot corresponding to the word slot, according to the semantic slot candidate set, a plurality of word slots corresponding to the query information can be determined. For example, the query information is "today afternoon to Peking University", the semantic slot candidate set includes semantic slots obtained based on model training, such as destination, departure place, etc.; the semantic slots determined based on the preset rules, such as time or time period; the semantic slots determined based on user input, and the word slot of the query information can be determined as "Beijing" according to the destination and the departure place; the word slot of the query information is determined as "today", "afternoon" according to the time or time period; the word slot of the query information is determined as "Peking University" according to the semantic slot determined based on user input, etc.

[0150] According to the plurality of word slots, a directed acyclic graph is established, and according to the directed acyclic graph, the length of each path connected is determined; wherein the elements of the directed acyclic graph are word slots;

[0151] According to the length of each path connected and the first rule, a first segmentation result based on the longest word slot length is determined.

[0152] In this embodiment, the starting position S i start and the ending position S i end of the plurality of word slots {S1, S2, …, Sn} determined are established in the sequence. i start i end i The dynamic programming finds the optimal path Route, and defines the length of any part that can be marked as a certain word slot as d i , d i is the number of characters of the part, for any path R i , the word slot has m, then the length D of the path R i = Σd i , the optimal path is the path with the maximum length D among all paths; wherein the optimal definition is that the total length of the characters of the semantic slot is the longest, according to the length of each path connected and the first rule, the optimal path Route found is traversed, thereby determining the first segmentation result based on the longest word slot length.

[0153] Optionally, the N preset rules include a second rule of cutting according to the number of word slots, and the step 200 includes:

[0154] According to the semantic slot candidate set, a plurality of word slots corresponding to the query information are determined.​​

[0155] It should be noted that, since the semantic slot candidate set includes at least one semantic slot corresponding to the word slot, according to the semantic slot candidate set, a plurality of word slots corresponding to the query information can be determined. For example, the query information is "go to Peking University this afternoon", the semantic slot candidate set includes semantic slots obtained based on model training, such as destination, departure place, etc.; semantic slots determined based on preset rules, such as time or time period, etc.; semantic slots determined based on user input, and the word slot of the query information can be determined as "Beijing" according to the destination and the departure place; the word slot of the query information is determined as "today", "afternoon" according to the time or time period; the word slot of the query information is determined as "Peking University" according to the semantic slot determined based on user input, etc.

[0156] According to the plurality of word slots, a directed acyclic graph is established, and according to the directed acyclic graph, the length of each path connected is determined; wherein the elements of the directed acyclic graph are word slots;

[0157] According to the length of each path connected and the second rule, a second segmentation result based on the largest number of word slots is determined.

[0158] In this embodiment, the starting position S i start and the ending position S i end of the plurality of word slots {S1, S2, …, Sn} determined in the sequence are established into a directed acyclic graph (DAG), the points in the directed acyclic graph are the word slots, the edges are the connection lines l i start between the starting position S i end and the ending position S i of the word slot i; the dynamic programming finds the optimal path Route, defines the length of any part that can be marked as a certain word slot as d, and d = 1, for any path R i , the word slots have m, then the length D of the path R i is m*d = m; the optimal path is the path with the largest length D in all paths, wherein the optimal definition is the largest number of matched semantic slots, according to the length of each path connected and the second rule, the optimal path Route found is traversed, thereby determining the second segmentation result based on the longest word slot length.

[0159] The first segmentation result and the second segmentation result are explained below through specific examples. For example, when the query information is "I want to listen to Beijing's Jinshan", a plurality of word slots can be determined, such as a word slot with a length of 1, such as "listen", a word slot with a length of 2, such as "Beijing", "Jinshan", and the like. According to the directed acyclic graph and the first principle, that is, the longest principle, "Beijing's Jinshan" is segmented out. According to the directed acyclic graph and the second principle, that is, the principle of the most word slots, "Beijing" and "Jinshan", two word slots representing a place, are segmented out. The present application modifies the segmentation method of word segmentation, combines the word segmentation process with the semantic slot candidate set, prevents the semantic slot from being incorrectly segmented, and improves the accuracy by screening the segmentation results from the number of matching words and the length of the matching words.

[0160] Optionally, the step 300 comprises:

[0161] The step 310 comprises determining, for each segmentation result, an intent corresponding to each semantic slot of the segmentation result according to an intent knowledge base.

[0162] Here, the corresponding intent and classification are provided for different questions, that is, different questions are collected in advance, and the intent and classification are set in advance, so that an intent knowledge base is formed, and the intent knowledge base contains at least one intent corresponding to the segmentation result. For example, the segmentation result is a combined segmentation result of time and departure place, and the intent knowledge base determines that the slot position required by the intent "book a ticket" and the slot position required by the intent "rent a car" are possible. The combination can correspond to multiple intents.

[0163] The step 320 comprises sorting the intents corresponding to the semantic slots according to the same type of semantic slot.

[0164] For example, when the obtained word slot is "Beijing", the corresponding same type of semantic slot can be a destination, a departure place, a city, and the like. It is not possible to match a time, a date, and the like. Here, the present application sorts the intents of the same type of semantic slot. For example, when the same type of semantic slot includes a destination and a departure place, the intents A-C corresponding to the destination are sorted, the intents D and F corresponding to the departure place are sorted, and finally the intents A-F are sorted and output according to the same type of semantic slot.

[0165] The step 330 comprises combining the sorted intents of the different types of semantic slots to determine a semantic slot filling result corresponding to each segmentation result.

[0166] In this embodiment, the intents output by the semantic slots of different types are combined according to the order of the semantic slots, for example, the intents a1, a2 and a3 output by the semantic slots of the first type are combined with the intents b1 and b2 output by the semantic slots of the first type, so as to determine six semantic slot filling results corresponding to the segmentation result, if the priority of a1 is the highest and the priority of b1 is also the highest, the semantic slot filling result of the combination a1-b1 has the highest priority, and according to the semantic slot filling result, a plurality of intents with higher possibility can be determined.

[0167] Optionally, the step 320 comprises:

[0168] For each intent corresponding to the semantic slot, the same type of semantic slot is scored according to a preset formula, and the intent corresponding to the semantic slot is sorted according to the intent score result.

[0169] The preset formula comprises:

[0170] Score=input[slot] / 2+input[slot] / intent[slot];

[0171] Wherein, intent[slot] is the total number of required semantic slots of the first intent, input[slot] is the number of times of the required semantic slots of the first intent appearing in the query information, and Score is the intent score result of the first intent.

[0172] The present application scores and sorts each intent, so that the sorting result is more clear, the priority of the intent is more intuitive, and the accuracy of data processing is improved.

[0173] Optionally, the step 310 comprises:

[0174] According to the query information, a first correspondence matrix of each word slot and at least one corresponding semantic slot is constructed;

[0175] According to each element in the first correspondence matrix and the intent knowledge base, a second relationship matrix of the word slot and the intent is constructed; the intent knowledge base comprises a corresponding relationship between the semantic slot and at least one intent;

[0176] According to the second relationship matrix, the intent corresponding to each semantic slot of the segmentation result is determined.

[0177] In this embodiment, according to the query information, a vector with a length of q that can be replaced by a word slot is obtained: Input = {word1, word2, …, wordq}, and the corresponding relationship between the word slot and the semantic slot of the query information is a first corresponding matrix S: S = (sij), where 1<=i<=q, 1<=j<=sum(slot), where sum(slot) is the total number of optional semantic slots, each element sij of the matrix S can correspond to multiple intents, and thus the result of the query is a second relationship matrix K corresponding to the word slot result and the intent: K = (kij) where 1<=i<=q*sum(slot), 1<=j<=sum(intent), where sum(intent) is the total number of optional intents; all intents in the second relationship matrix K are traversed, and the total number of semantic slots required for each intent is recorded, and the number of times the semantic slots in the intent appear in the user input is counted.

[0178] It should be noted that there can be several semantic slots in each intent, such as a departure place, a destination, a time, and a quantity for a ticket booking intent, and a place and a time for a weather checking intent. If other intents except the weather checking intent are excluded through preliminary screening, the semantic slot filling only needs to judge the semantic slots in the weather checking intent, and does not need to judge other semantic slots.

[0179] For example, the user input query information is “I want to go to Beijing tomorrow”, and after preliminary judgment, it is known that “tomorrow” can be a time or a date, and “Beijing” can be a departure place, a destination, or a city; S represents the corresponding relationship between “tomorrow” and “Beijing” and the time, date, departure place, destination, and city, such as combination 1: time, departure place, and combination 2: time, destination. Here, combination 1: time, departure place, can be a slot required by the intent “book a ticket” or a slot required by the intent “rent a car”, and the combination can correspond to multiple intents.

[0180] Specifically, the step 300 of determining the target semantic slot filling result from the semantic slot filling results corresponding to the N kinds of segmentation results can be understood as follows: the first segmentation result outputs X1 filling results, the second segmentation result outputs X2 filling results, the Nth segmentation result outputs Xn filling results, and finally (X1+X2+…+Xn) filling results are input into the above-mentioned preset formula (the preset formula includes: Score=input[slot] / 2+input[slot] / intent[slot]), so as to obtain the ranking of the semantic slot filling results corresponding to the N kinds of segmentation results, and output the preset value kinds of possible results that meet the semantic slot filling according to the demand, wherein the preset value represents the number of intents with the highest possibility, which can be an intent used in the current user state or an intent used in the subsequent user state, and the present application does not limit it.

[0181] As shown in Figure 2 As shown in Figure 2 As shown in the simple flowchart shown in

[0182] In summary, the application aims at the problem that semantic slot filling depends on the word segmentation result, modifies the segmentation method of word segmentation, combines the word segmentation process with the search result of slot filling, prevents the semantic slot from being incorrectly divided, and respectively screens the segmentation result from the number of matched words and the length of matched words; for the slot filling of multi-round dialogue, the influence of the overall semantics of the input sentence on the semantic slot filling is not considered, the dictionary corresponding to the semantic slot is divided into a general system dictionary and a personalized self-defined dictionary, the self-defined dictionary adopts an intent-combined search method to fill the semantic slot, the semantic slot filling is processed step by step, the filling effect is scored according to the user's question after preliminary filling, and the semantic slot filling is combined with the intent and the context; for the problem that the model cannot quickly respond to the personalized semantic slot filling work of the user in a specific field, and the retraining cost is high, an editing and uploading interface of the dictionary entry is opened for the user, the user is supported to import the customized words, the customized words are dynamically loaded, the user configuration is responded in time, and the filling effect is calculated in the customized field by using the searching and matching degree scoring method.

[0183] As shown in Figure 3 The electronic device 300 provided by the embodiment of the application comprises a processor 310 and a transceiver 320, and the processor 310 is configured to:

[0184] The processor 310 is configured to determine a semantic slot candidate set corresponding to the query information according to the query information input by the user, wherein the query information corresponds to a plurality of word slots, and the semantic slot candidate set comprises at least one semantic slot corresponding to each word slot.

[0185] The processor 310 is further configured to divide the query information according to N preset rules according to the semantic slot candidate set, to obtain a segmentation result corresponding to each of the N preset rules, wherein each preset rule corresponds to a segmentation result.

[0186] The processor 310 is further configured to fill the semantic slot according to the N segmentation results, to determine a semantic slot filling result corresponding to each segmentation result, and to determine a target semantic slot filling result from the semantic slot filling results corresponding to the N segmentation results.

[0187] The embodiment of the application can combine the word segmentation process with the semantic slot candidate set, and respectively screen the segmentation result from N angles, thereby improving the accuracy of semantic slot filling.

[0188] Optionally, the electronic device 300, wherein the processor 310 is specifically configured to:

[0189] determine the semantic slot candidate set corresponding to the query information from a preset method according to the query information;

[0190] The preset method comprises at least one of the following: matching the query information with a semantic slot obtained based on model training, matching the query information with a semantic slot determined based on a preset rule, and matching the query information with a semantic slot determined based on user input.

[0191] Optionally, the electronic device 300, wherein the processor 310 is specifically configured to:

[0192] According to the query information, determine a word slot of the query information;

[0193] According to the word slot, determine a flat slot and / or a dependent slot corresponding to the word slot;

[0194] According to the flat slot and / or the dependent slot, determine a semantic slot candidate set corresponding to the flat slot and / or the dependent slot.

[0195] Optionally, the electronic device 300, wherein the processor 310 is specifically configured to:

[0196] According to the semantic slot candidate set, determine a plurality of word slots corresponding to the query information;

[0197] According to the plurality of word slots, establish a directed acyclic graph, and according to the directed acyclic graph, determine a length of each path connected; wherein an element of the directed acyclic graph is a word slot;

[0198] According to the length of each path connected and the first rule, determine a first segmentation result based on the longest word slot length.

[0199] Optionally, the electronic device 300, wherein the processor 310 is specifically configured to:

[0200] According to the semantic slot candidate set, determine a plurality of word slots corresponding to the query information;

[0201] According to the plurality of word slots, establish a directed acyclic graph, and according to the directed acyclic graph, determine a length of each path connected; wherein an element of the directed acyclic graph is a word slot;

[0202] According to the length of each path connected and the second rule, determine a second segmentation result based on the maximum number of word slots.

[0203] Optionally, the electronic device 300, wherein the processor 310 is specifically configured to:

[0204] For each segmentation result, according to an intent knowledge base, determine an intent corresponding to each semantic slot of the segmentation result;

[0205] According to the same type of semantic slot, the intents corresponding to the semantic slot are sorted;

[0206] According to different types of the semantic slot, the output intents are combined, and the semantic slot filling result corresponding to each segmentation result is determined.

[0207] Optionally, the electronic device 300, wherein the processor 310 is specifically configured to:

[0208] According to a preset formula, the semantic slot of the same type is scored for each intent corresponding to the semantic slot, and the intent corresponding to the semantic slot is sorted according to the intent score result;

[0209] The preset formula includes:

[0210] Score = input [slot] / 2 + input [slot] / intent [slot];

[0211] Wherein, intent [slot] is the total number of required semantic slots of the first intent, input [slot] is the number of times of the required semantic slots of the first intent appearing in the query information, and Score is the intent score result of the first intent.

[0212] Optionally, the electronic device 300, wherein the processor 310 is specifically configured to:

[0213] According to the query information, a first correspondence matrix of each word slot and at least one corresponding semantic slot is constructed;

[0214] According to each element in the first correspondence matrix and the intent knowledge base, a second relationship matrix of the word slot and the intent is constructed; the intent knowledge base includes the correspondence relationship between the semantic slot and at least one intent;

[0215] According to the second relationship matrix, the intent corresponding to each semantic slot of the segmentation result is determined.

[0216] It should be noted that the above electronic device provided by the embodiment of the present application can realize all method steps realized by the above information processing method embodiment, and can achieve the same technical effects. Therefore, the same parts and beneficial effects of the method embodiment will not be described in detail.

[0217] As shown in Figure 4 The embodiment of the present application also provides an information processing device, which includes:

[0218] The first processing module 10 is configured to determine a semantic slot candidate set corresponding to the query information according to the user input query information, wherein the query information corresponds to a plurality of word slots, and the semantic slot candidate set comprises at least one semantic slot corresponding to each word slot.

[0219] The second processing module 20 is configured to split the query information according to N preset rules according to the semantic slot candidate set, to obtain a split result corresponding to each of the N preset rules, wherein each preset rule corresponds to a split result.

[0220] The third processing module 30 is configured to perform semantic slot filling according to the N split results, to determine a semantic slot filling result corresponding to each split result, and to determine a target semantic slot filling result from the semantic slot filling results corresponding to the N split results.

[0221] Optionally, in the information processing apparatus, the first processing module 10 comprises:

[0222] A first processing unit is configured to determine the semantic slot candidate set corresponding to the query information from a preset method according to the query information.

[0223] The preset method comprises at least one of the following methods: matching the query information with a semantic slot based on model training, matching the query information with a semantic slot based on a preset rule, and matching the query information with a semantic slot based on user input.

[0224] Optionally, in the information processing apparatus, the first processing unit comprises:

[0225] A first determination subunit is configured to determine a word slot of the query information according to the query information.

[0226] A second determination subunit is configured to determine a flat slot and / or a dependent slot corresponding to the word slot according to the word slot.

[0227] A third determination subunit is configured to determine the semantic slot candidate set corresponding to the flat slot and / or the dependent slot according to the flat slot and / or the dependent slot.

[0228] Optionally, in the information processing apparatus, the second processing module 20 comprises:

[0229] A first determination unit is configured to determine a plurality of word slots corresponding to the query information according to the semantic slot candidate set.

[0230] A second determination unit is configured to establish a directed acyclic graph according to the plurality of word slots, and determine a length of each path connected according to the directed acyclic graph, wherein an element of the directed acyclic graph is a word slot.

[0231] The third determining unit is configured to determine, according to the length of each path connection and the first rule, a first segmentation result based on the longest word slot length.

[0232] Optionally, in the information processing apparatus, the second processing module 20 further includes:

[0233] The fourth determining unit is configured to determine a plurality of word slots corresponding to the query information according to the semantic slot candidate set.

[0234] The fifth determining unit is configured to establish a directed acyclic graph according to the plurality of word slots, and determine the length of each path connection according to the directed acyclic graph, wherein an element of the directed acyclic graph is a word slot.

[0235] The sixth determining unit is configured to determine, according to the length of each path connection and the second rule, a second segmentation result based on the largest number of word slots.

[0236] Optionally, in the information processing apparatus, the third processing module 30 includes:

[0237] The second processing unit is configured to determine, for each segmentation result, an intent corresponding to each semantic slot of the segmentation result according to an intent knowledge base.

[0238] The third processing unit is configured to sort the intents corresponding to the semantic slots according to semantic slots of the same type.

[0239] The fourth processing unit is configured to combine the intents output according to semantic slots of different types to determine a semantic slot filling result corresponding to each segmentation result.

[0240] Optionally, in the information processing apparatus, the third processing unit includes:

[0241] The first processing subunit is configured to, for each intent corresponding to the semantic slot, score the semantic slots of the same type according to a preset formula, and sort the intents corresponding to the semantic slots according to the intent score result.

[0242] The preset formula includes:

[0243] Score = input[slot] / 2 + input[slot] / intent[slot];

[0244] Wherein, intent[slot] is the total number of required semantic slots of the first intent, input[slot] is the number of times of the required semantic slots of the first intent appearing in the query information, and Score is the intent score result of the first intent.

[0245] Optionally, in the information processing apparatus, the second processing unit comprises:

[0246] a second processing subunit configured to construct a first correspondence matrix of each word slot and at least one corresponding semantic slot according to the query information;

[0247] a third processing subunit configured to construct a second relationship matrix of the word slot and the intent according to each element in the first correspondence matrix and the intent knowledge base; the intent knowledge base comprises a correspondence relationship between the semantic slot and at least one intent;

[0248] a fourth processing subunit configured to determine the intent corresponding to each semantic slot of the segmentation result according to the second relationship matrix.

[0249] It should be noted that the above-mentioned device provided by the embodiments of the present application can realize all the method steps realized by the above-mentioned information processing method embodiments, and can achieve the same technical effects. Here, the same parts and beneficial effects in the method embodiments will not be described in detail.

[0250] The embodiments of the present application also provide an electronic device, as shown in the figure, comprising: a processor 501; and a memory 503 connected with the processor 501 through a bus interface 502, wherein the memory 503 is used to store programs and data used by the processor 501 in performing operations, and the processor 501 invokes and executes the programs and data stored in the memory 503. Figure 5

[0251] Wherein, the transceiver 504 is connected with the bus interface 502, and is used to receive and send data under the control of the processor 501, and specifically, the processor 501 executes the following processes:

[0252] According to the query information input by the user, determine the semantic slot candidate set corresponding to the query information; wherein the query information corresponds to a plurality of word slots, and the semantic slot candidate set comprises at least one semantic slot corresponding to each word slot;

[0253] According to the semantic slot candidate set, the query information is segmented according to N kinds of preset rules, and N kinds of segmentation results corresponding to the N kinds of preset rules are obtained; wherein each kind of preset rule corresponds to one kind of segmentation result;

[0254] According to the N kinds of segmentation results, the semantic slot filling is performed, the semantic slot filling result corresponding to each kind of segmentation result is determined, and the target semantic slot filling result is determined from the semantic slot filling results corresponding to the N kinds of segmentation results.

[0255] Optionally, the processor 501 is specifically configured to:

[0256] ​determine, according to the query information, a semantic slot candidate set corresponding to the query information from preset methods;

[0257] The preset methods include at least one of the following: matching the query information with a semantic slot based on model training, matching the query information with a semantic slot based on preset rules, and matching the query information with a semantic slot based on user input.

[0258] Optionally, the processor 501 is specifically configured to:

[0259] determine, according to the query information, a word slot of the query information;

[0260] determine, according to the word slot, a flat slot and / or a dependent slot corresponding to the word slot;

[0261] determine, according to the flat slot and / or the dependent slot, the semantic slot candidate set corresponding to the flat slot and / or the dependent slot.

[0262] Optionally, the processor 501 is specifically configured to:

[0263] determine, according to the semantic slot candidate set, a plurality of word slots corresponding to the query information;

[0264] establish a directed acyclic graph according to the plurality of word slots, and determine a length of each path connected according to the directed acyclic graph; an element of the directed acyclic graph is a word slot;

[0265] determine, according to the length of each path connected and the first rule, a first segmentation result based on the longest word slot length.

[0266] Optionally, the processor 501 is specifically configured to:

[0267] determine, according to the semantic slot candidate set, a plurality of word slots corresponding to the query information;

[0268] establish a directed acyclic graph according to the plurality of word slots, and determine a length of each path connected according to the directed acyclic graph; an element of the directed acyclic graph is a word slot;

[0269] determine, according to the length of each path connected and the second rule, a second segmentation result based on the largest number of word slots.

[0270] Optionally, the processor 501 is specifically configured to:

[0271] determine, according to an intent knowledge base, an intent corresponding to each semantic slot of each segmentation result for each segmentation result;

[0272] According to the same type of semantic slot, the intent corresponding to the semantic slot is sorted;

[0273] According to the different types of semantic slots, the output intents are combined, and the semantic slot filling result corresponding to each segmentation result is determined.

[0274] Optionally, the processor 501 is specifically configured to:

[0275] According to a preset formula, the semantic slots of the same type are scored for each intent corresponding to the semantic slot, and the intent corresponding to the semantic slot is sorted according to the intent score result;

[0276] The preset formula includes:

[0277] Score = input [slot] / 2 + input [slot] / intent [slot];

[0278] Wherein, intent [slot] is the total number of required semantic slots of the first intent, input [slot] is the number of times of the required semantic slots of the first intent appearing in the query information, and Score is the intent score result of the first intent.

[0279] Optionally, the processor 501 is specifically configured to:

[0280] According to the query information, a first correspondence matrix of each word slot and at least one corresponding semantic slot is constructed;

[0281] According to each element in the first correspondence matrix and the intent knowledge base, a second relationship matrix of the word slot and the intent is constructed; the intent knowledge base includes the correspondence relationship between the semantic slot and at least one intent;

[0282] According to the second relationship matrix, the intent corresponding to each semantic slot of the segmentation result is determined.

[0283] Wherein, in Figure 5 The bus architecture can include any number of interconnected buses and bridges, which are specifically linked by various circuits of the processor 501 representing one or more processors and the memory 503 representing the memory. The bus architecture can also link various other circuits such as peripheral devices, voltage stabilizers and power management circuits, which are well known in the art, and therefore, will not be further described herein. The bus interface provides an interface. The transceiver 504 can be a plurality of elements, i.e. including a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium. The processor 501 is responsible for managing the bus architecture and general processing, and the memory 503 can store data used by the processor 501 in performing operations.

[0284] Those skilled in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware, or by program instructing the relevant hardware to complete part or all of the steps of the above-mentioned method, and the program can be stored in a readable storage medium, which can be any form of storage medium.

[0285] The embodiment of the present application further provides a readable storage medium, wherein the readable storage medium stores a program, and the program is executed by a processor to implement the information processing method according to any one of the above.

[0286] In several embodiments provided in the present application, it should be understood that the disclosed method and device can be implemented by other ways. For example, the above-mentioned device embodiments are only schematic, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.

[0287] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically included separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be realized in the form of hardware, or in the form of hardware plus software functional unit.

[0288] The above-mentioned integrated unit realized in the form of software functional unit can be stored in a computer readable storage medium. The above-mentioned software functional unit stored in a storage medium includes a plurality of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute part of the steps of the transceiving method described in each embodiment of the present application. The above-mentioned storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0289] The above-mentioned is the preferred embodiment of the present application, and it should be pointed out that, for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.

Claims

1. An information processing method characterized by comprising: include: Based on the query information input by the user, a semantic slot candidate set corresponding to the query information is determined; wherein, the query information corresponds to multiple word slots, and the semantic slot candidate set includes at least one semantic slot corresponding to each word slot; Based on the semantic slot candidate set, the query information is segmented according to N preset rules to obtain the segmentation results corresponding to the N preset rules; wherein, each preset rule corresponds to one segmentation result; Semantic slot filling is performed based on the N segmentation results, the semantic slot filling result corresponding to each segmentation result is determined, and the target semantic slot filling result is determined from the semantic slot filling results corresponding to the N segmentation results. The semantic slot filling is performed based on the N segmentation results, and the semantic slot filling result corresponding to each segmentation result is determined, including: For each segmentation result, the intent corresponding to each semantic slot of the segmentation result is determined according to the intent knowledge base, including: constructing a first correspondence matrix between each word slot and at least one corresponding semantic slot according to the query information; constructing a second relation matrix between the word slot and the intent according to each element in the first correspondence matrix and the intent knowledge base; the intent knowledge base includes the correspondence between semantic slots and at least one intent; and determining the intent corresponding to each semantic slot of the segmentation result according to the second relation matrix. Sort the intents corresponding to the semantic slots according to the same type of semantic slots, including: scoring the semantic slots of the same type according to a preset formula for each type of intent corresponding to the semantic slots, and sorting the intents corresponding to the semantic slots according to the intent scoring results; wherein, the preset formula includes: Score=input[slot] / 2+input[slot] / intent[slot]; wherein, intent[slot] is the total number of semantic slots required for the first intent, input[slot] is the number of times the required semantic slots of the first intent appear in the query information, and Score is the intent scoring result of the first intent; The semantic slots are sorted and output according to different types of semantic slots, and the semantic slot filling results corresponding to each segmentation result are determined.

2. The method of claim 1, wherein, The step of determining the semantic slot candidate set corresponding to the query information based on the user input includes: Based on the query information, a candidate set of semantic slots corresponding to the query information is determined from a preset method; The preset method includes at least one of the following: matching the query information to semantic slots obtained by model training, matching the query information to semantic slots determined by preset rules, and matching the query information to semantic slots determined by user input.

3. The method of claim 2, wherein, The step of determining the semantic slot candidate set corresponding to the query information from a preset method based on the query information includes: Based on the query information, determine the keyword slots for the query information; Based on the slot, determine the corresponding peer slot and / or dependency slot; Based on the peer slots and / or the dependent slots, determine the semantic slot candidate set corresponding to the peer slots and / or the dependent slots.

4. The method of claim 1, wherein, The N preset rules include a first rule of cutting according to a word slot length attribute, the cutting of the query information according to the N preset rules based on the semantic slot candidate set includes: According to the semantic slot candidate set, a plurality of word slots corresponding to the query information are determined; According to the plurality of word slots, a directed acyclic graph is established, and the length of each path connected is determined according to the directed acyclic graph; wherein the elements of the directed acyclic graph are word slots; According to the length of each path connected and the first rule, a first cutting result based on the longest word slot length is determined.

5. The method of claim 1, wherein, The N preset rules include a second rule of cutting according to a word slot number attribute, the cutting of the query information according to the N preset rules based on the semantic slot candidate set includes: According to the semantic slot candidate set, a plurality of word slots corresponding to the query information are determined; According to the plurality of word slots, a directed acyclic graph is established, and the length of each path connected is determined according to the directed acyclic graph; wherein the elements of the directed acyclic graph are word slots; According to the length of each path connected and the second rule, a second cutting result based on the most word slots is determined.

6. An electronic device, comprising a processor and a transceiver, characterized in that, The processor is configured to determine a semantic slot candidate set corresponding to the query information according to the user input query information; wherein the query information corresponds to a plurality of word slots, and the semantic slot candidate set includes at least one semantic slot corresponding to each word slot; The processor is further configured to cut the query information according to N preset rules based on the semantic slot candidate set, to obtain cutting results corresponding to the N preset rules; wherein each preset rule corresponds to a cutting result; The processor is further configured to perform semantic slot filling according to the N cutting results, to determine a semantic slot filling result corresponding to each cutting result, and to determine a target semantic slot filling result from the semantic slot filling results corresponding to the N cutting results; The processor is specifically configured to: for each cutting result, determine an intent corresponding to each semantic slot of the cutting result according to an intent knowledge base; sort the intents corresponding to the semantic slots according to semantic slots of the same type; and combine the intents sorted and output according to semantic slots of different types, to determine a semantic slot filling result corresponding to each cutting result; The processor is specifically configured to: for each intent corresponding to the semantic slot, score the same type of semantic slot according to a preset formula, and sort the intents corresponding to the semantic slot according to the intent score result; wherein the preset formula includes: Score=input[slot] / 2+input[slot] / intent[slot]; wherein intent[slot] is the total number of required semantic slots of a first intent, input[slot] is the number of times of the required semantic slots of the first intent appearing in the query information, and Score is the intent score result of the first intent. The processor is specifically configured to: according to the query information, construct a first correspondence matrix of each word slot and at least one corresponding semantic slot; according to each element in the first correspondence matrix and the intent knowledge base, construct a second relationship matrix of the word slot and the intent; the intent knowledge base includes the correspondence relationship between the semantic slot and at least one intent; and according to the second relationship matrix, determine the intent corresponding to each semantic slot of the segmentation result.

7. An information processing apparatus, characterized by comprising: Comprise: The first processing module is configured to determine a semantic slot candidate set corresponding to the query information input by a user according to the query information; wherein the query information corresponds to a plurality of word slots, and the semantic slot candidate set includes at least one semantic slot corresponding to each word slot; The second processing module is configured to perform segmentation on the query information according to N preset rules according to the semantic slot candidate set, to obtain segmentation results corresponding to the N preset rules; wherein each preset rule corresponds to one segmentation result; The third processing module is configured to perform semantic slot filling according to the N segmentation results, determine a semantic slot filling result corresponding to each segmentation result, and determine a target semantic slot filling result from the semantic slot filling results corresponding to the N segmentation results; The third processing module comprises: a second processing unit configured to determine, for each segmentation result, an intent corresponding to each semantic slot of the segmentation result according to an intent knowledge base; a third processing unit configured to sort the intents corresponding to the semantic slots according to the same type of semantic slot; and a fourth processing unit configured to combine the intents sorted according to different types of semantic slots, to determine a semantic slot filling result corresponding to each segmentation result; The third processing unit comprises: a first processing subunit configured to, for each intent corresponding to the semantic slot, score the same type of semantic slot according to a preset formula, and sort the intents corresponding to the semantic slot according to the intent score result; wherein the preset formula includes: Score=input[slot] / 2+input[slot] / intent[slot]; wherein intent[slot] is the total number of required semantic slots of a first intent, input[slot] is the number of times of the required semantic slots of the first intent appearing in the query information, and Score is the intent score result of the first intent. The second processing unit comprises: a second processing subunit, configured to construct a first corresponding matrix of each word slot and at least one corresponding semantic slot according to the query information; a third processing subunit, configured to construct a second relationship matrix of the word slot and the intent according to each element in the first corresponding matrix and the intent knowledge base; the intent knowledge base comprises a corresponding relationship between a semantic slot and at least one intent; and a fourth processing subunit, configured to determine the intent corresponding to each semantic slot of the segmentation result according to the second relationship matrix.

8. An electronic device comprising: The transceiver, the processor, the memory, and a program or instructions stored on the memory and executable on the processor; and wherein the processor implements the information processing method of any one of claims 1-5 when executing the program or instructions.

9. A readable storage medium, on which a program or instructions are stored, characterized in that, The program or instructions, when executed by the processor, implement the steps in the information processing method of any one of claims 1-5.

Citation Information

Patent Citations

  • Semantic parsing method and device, computer-readable storage medium, and electronic device

    CN109241524A

  • Statement intention recognition method and device

    CN110543633A

  • Chinese environment semantic slot filling enhancement method based on part-of-speech tagging

    CN112699680A