CN112417115B - Network-based dialogue state optimization method, device, server and storage medium - Google Patents
Network-based dialogue state optimization method, device, server and storage medium Download PDFInfo
- Publication number
- CN112417115B CN112417115B CN202011284154.XA CN202011284154A CN112417115B CN 112417115 B CN112417115 B CN 112417115B CN 202011284154 A CN202011284154 A CN 202011284154A CN 112417115 B CN112417115 B CN 112417115B
- Authority
- CN
- China
- Prior art keywords
- word
- word slot
- slot value
- value
- preset
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 37
- 238000005457 optimization Methods 0.000 title claims abstract description 18
- 239000013598 vector Substances 0.000 claims description 82
- 238000004590 computer program Methods 0.000 claims description 5
- 238000013473 artificial intelligence Methods 0.000 abstract description 2
- 230000002452 interceptive effect Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000010606 normalization Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000630 rising effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/332—Query formulation
- G06F16/3329—Natural language query formulation or dialogue systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/332—Query formulation
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Mathematical Physics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- Human Computer Interaction (AREA)
- Machine Translation (AREA)
Abstract
The embodiment of the invention relates to the field of artificial intelligence and discloses a dialogue state optimization method, a device, a server and a storage medium based on a network. In the invention, a word slot value is extracted from information input by a user, and a word slot in which the word slot value is positioned is determined; searching a plurality of preset word slot values corresponding to the word slots; selecting a target word slot value with highest matching degree with the word slot value from a plurality of preset word slot values; the word slot value in the current dialogue state is updated to be the target word slot value, so that the word slot value in the dialogue state can be converted to a certain preset word slot value, namely, the word slot value in the dialogue state is standardized, the preset word slot value is the pre-marked word slot value, and the possibility of normal proceeding of the follow-up procedure is improved.
Description
Technical Field
The embodiment of the invention relates to the field of artificial intelligence, in particular to a dialogue state optimization method, device, server and storage medium based on a network.
Background
The task type dialogue system is also called as a target driving type dialogue system, and helps a user to complete a designated task by carrying out multiple rounds of dialogue with the user, so that the task of booking hotels, booking air tickets, inquiring scenic spots, inquiring paths and the like is reduced. In a task-type dialog process, the dialog process may be divided into natural language understanding, dialog management, and natural language generation based on a flow, where intent recognition and word slot value filling in natural language understanding belong to dialog state tracking, which is an important step in the task-type dialog process. Currently, it is common to extract corresponding information directly from information input by a user as a word slot value. However, the word slot values that have been marked in advance are required for subsequent dialog management, and since the user's expressions have diversity, it is impossible to mark all possible word slot values corresponding to the word slot in advance, so the word slot values that are directly extracted may belong to word slot values that have not been marked in advance, and at this time, the word slot values cannot be used in subsequent dialog management.
Disclosure of Invention
The embodiment of the invention aims to provide a dialogue state optimization method, a dialogue state optimization device, a dialogue state optimization server and a dialogue state storage medium, which can standardize word slot values in a dialogue state and improve the possibility of normal proceeding of subsequent procedures.
To solve the above technical problems, an embodiment of the present invention provides a method for optimizing a session state based on a network, including: extracting a word slot value from information input by a user, and determining a word slot in which the word slot value is located; searching a plurality of preset word slot values corresponding to the word slots; selecting a target word slot value with highest matching degree with the word slot value from the plurality of preset word slot values; and updating the word slot value in the current dialogue state into the target word slot value.
The embodiment of the invention also provides a dialogue state optimizing device based on the network, which comprises the following steps: the state tracking module is used for extracting word slot values from information input by a user, and representing the current dialogue state through word slots corresponding to the word slot values and the word slot values; the searching module is used for searching a plurality of preset word slot values corresponding to the word slots; the selection module is used for selecting a target word slot value with highest matching degree with the word slot value from the plurality of preset word slot values; and the value specification module is used for updating the word slot value in the current dialogue state into the target word slot value.
The embodiment of the invention also provides a server, which comprises: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the network-based dialog state optimization method described above.
Embodiments of the present invention also provide a computer readable storage medium storing a computer program which, when executed by a processor, implements the above-described network-based dialog state optimization method.
Compared with the prior art, the embodiment of the invention extracts the word slot value from the information input by the user and determines the word slot in which the word slot value is positioned; searching a plurality of preset word slot values corresponding to the word slots; selecting a target word slot value with highest matching degree with the word slot value from a plurality of preset word slot values; the word slot value in the current dialogue state is updated to be the target word slot value, so that the word slot value in the dialogue state can be converted to a certain preset word slot value, namely, the word slot value in the dialogue state is standardized, the preset word slot value is the pre-marked word slot value, and the possibility of normal proceeding of the follow-up procedure is improved.
In addition, the selecting the target word slot value with the highest matching degree with the word slot value from the plurality of preset word slot values includes: respectively obtaining word vectors of each preset word slot value and obtaining the word vectors of the word slot values; obtaining the inner products of the word vectors of the preset word slot values and the word vectors of the word slot values respectively; and selecting a maximum inner product from the acquired multiple inner products, and taking a preset word slot value corresponding to the maximum inner product as a target word slot value with highest matching degree with the word slot value. By the method, the target word slot value can be accurately determined.
In addition, the updating the word slot value in the current dialogue state to the target word slot value includes: acquiring cosine similarity of a word vector of a target word slot value and a word vector of the word slot value; and if the cosine similarity is larger than a preset threshold value, updating the word slot value in the current dialogue state to the target word slot value. By the method, the word slot value can be updated to be the target word slot value only when the cosine similarity meets the requirement, so that the normalization of the word slot value in the dialogue state can be further improved.
In addition, the obtaining the word vector of each preset word slot value includes: according to the word vector of each word in each preset word slot value, obtaining the word vector of each preset word slot value; the obtaining the word vector of the word slot value comprises the following steps: and obtaining the word vector of the word slot value according to the word vector of each word in the word slot value. By the method, the word vector of each preset word slot value and the word vector of the word slot value can be accurately obtained.
In addition, the extracting the word slot value from the information input by the user and determining the word slot where the word slot value is located includes: determining the dialogue field according to the information input by the user; and extracting a word slot value belonging to the dialogue field from the information, and determining a word slot in which the word slot value is located. By such a method, since the domain of the dialogue is determined, only the word slot values belonging to the domain of the dialogue are extracted, so that the workload can be reduced and the current dialogue state can be made more accurate.
In addition, the searching for a plurality of preset word slot values corresponding to the word slot includes: searching a plurality of preset word slot values corresponding to the word slots in the dialogue field. By limiting the word slot to a word slot in the dialogue field, the search range can be narrowed, and thus the target word slot value can be obtained faster.
In addition, the current dialog state is represented in the form of triples by the dialog field, the word slot and the target word slot value. By way of triples, the current dialog state can be clearly represented.
Drawings
One or more embodiments are illustrated by way of example and not limitation in the figures of the accompanying drawings, in which like references indicate similar elements, and in which the figures of the drawings are not to be taken in a limiting sense, unless otherwise indicated.
FIG. 1 is a flow chart of a method of optimizing a network-based dialog state in accordance with a first embodiment of the present invention;
FIG. 2 is a flow chart of one specific implementation of step 103 in a first embodiment of the present invention;
FIG. 3 is a flow chart of one specific implementation of step 104 in a first embodiment of the present invention;
FIG. 4 is a flow chart of a method of optimizing dialog states based on a network in a second embodiment of the present invention;
FIG. 5 is a schematic diagram of a configuration of a network-based dialog state optimization device in accordance with a third embodiment of the present invention;
fig. 6 is a schematic diagram of a structure of a server according to a third embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, those of ordinary skill in the art will understand that in various embodiments of the present invention, numerous technical details have been set forth in order to provide a better understanding of the present application. However, the technical solutions claimed in the present application can be implemented without these technical details and with various changes and modifications based on the following embodiments. The following embodiments are divided for convenience of description, and should not be construed as limiting the specific implementation of the present invention, and the embodiments can be mutually combined and referred to without contradiction.
A first embodiment of the present invention relates to a network-based dialog state optimization method, which is applied to a dialog system. The specific flow is shown in fig. 1, and includes:
step 101, extracting word slot values from information input by a user, and determining word slots in which the word slot values are located.
Specifically, upon detecting information entered by a user, the dialog system performs intent recognition and word slot filling using natural language understanding (Natural Language Understanding, NLU), the intent recognition being to determine what the user wants to do based on the information entered by the user, for example: the information input by the user is what the weather of the current martial arts is, and the intention of the user is to acquire the weather of the current martial arts; the word slot filling is to extract word slot values from information input by a user according to preset structured fields, determine word slots where the word slot values are located, and determine the word slots where the word slot values are located through a dictionary tree or other modes, for example: the information input by the user is what the weather of the Chinese character is, the Chinese character is a word slot value, the word slot of the Chinese character is time, the word slot of the Chinese character is place, the word slot of the Chinese character is filled in the time, and the word slot is filled in the place. After determining the word slot in which the word slot value is located, the current dialog state may be represented by the word slot and the word slot value, and in one example, the current dialog state may be represented in the form of a binary group by the word slot and the word slot value, for example: (time, today), (place, martial arts) represent the current dialog state.
Step 102, searching a plurality of preset word slot values corresponding to the word slots.
Specifically, the corresponding relation between the word slot and the preset word slot value is stored locally in the dialogue system, and after the word slot is obtained, the preset word slot value corresponding to the word slot can be determined according to the corresponding relation. For example: the information input by the user is that the word slot where the word slot value "high-end" is located is "price", the corresponding relation formed by the word slot "price" and the preset word slot values "cheap", "expensive", "medium", etc., and then the plurality of preset word slot values corresponding to the word slot "price" are "cheap", "expensive" and "medium".
Step 103, selecting a target word slot value with highest matching degree with the word slot value from a plurality of preset word slot values.
In one example, a specific flowchart of selecting a target word slot value with the highest matching degree with the word slot value from a plurality of preset word slot values is shown in fig. 2, and includes:
step 1031, obtaining word vectors of each preset word slot value and obtaining word vectors of the word slot values respectively.
In one example, obtaining word vectors for each of the preset word slot values, respectively, includes: according to the word vector of each word in each preset word slot value, obtaining the word vector of each preset word slot value; obtaining a word vector of word slot values, comprising: and obtaining the word vector of the word slot value according to the word vector of each word in the word slot value.
Specifically, for each preset word slot value, the dialogue system performs word embedding operation on the preset word slot value to obtain a word vector of each word in the preset word slot value, and then performs interactive coding on the word vector of each word to obtain word vectors of the preset word slot value, and traverses all the preset word slot values to obtain word vectors of each preset word slot value, for example: and if one preset word slot value is 'expensive', carrying out word embedding operation on the 'expensive', obtaining a word vector corresponding to 'expensive', and carrying out interactive coding on each word vector to obtain a word vector corresponding to 'expensive'. For the word slot value, the dialogue system performs word embedding operation on the word slot value to obtain a word vector of each word in the word slot value, and then performs interactive coding on the word vector of each word to obtain a word vector of the word slot value, for example: and if the word slot value is 'high-end', carrying out word embedding operation on the 'high-end', obtaining a word vector corresponding to 'high', a word vector corresponding to 'end', and carrying out interactive coding on each word vector entry to obtain a word vector corresponding to 'high-end'.
Step 1032, obtaining inner products of the word vectors of the preset word slot values and the word vectors of the word slot values respectively.
Specifically, for each preset word slot value, the inner product of the word vector of the preset word slot value and the word vector of the word slot value is obtained, all the preset word slot values are traversed, and the inner product of the word vector of each preset word slot value and the word vector of the word slot value is obtained, for example: the preset word slot values include "cheap", "expensive", "medium", and "high-end", and the inner product of the "cheap" word vector and the "high-end" word vector, the inner product of the "expensive" word vector and the "high-end" word vector, and the inner product of the "medium" word vector and the "high-end" word vector are obtained.
Step 1033, selecting the maximum inner product from the obtained plurality of inner products, and taking the preset word slot value corresponding to the maximum inner product as the target word slot value with the highest matching degree with the word slot value.
Specifically, the dialogue system compares the obtained magnitudes of the inner products, selects the largest inner product, and takes a preset word slot value corresponding to the largest inner product as a target word slot value with the highest matching degree with the word slot value. For example: the inner product of the "cheap" word vector and the "high-end" word vector is 10, the inner product of the "expensive" word vector and the "high-end" word vector is 95, the inner product of the "medium" word vector and the "high-end" word vector is 55, the maximum inner product is 95, the preset word slot value corresponding to the maximum inner product is "expensive", and the "expensive" is taken as the target word slot value. By the method, the target word slot value can be accurately determined.
Step 104, the word slot value in the current dialogue state is updated to the target word slot value.
Specifically, after the target word slot value is obtained, the word slot value in the current dialogue state is directly updated to the target word slot value. In one example, if the current dialog state is represented in the form of a tuple by a word slot and a word slot value, the word slot value in the tuple is updated to the target word slot value.
In one example, a specific flow for updating the word slot value in the current dialogue state to the target word slot value is shown in fig. 3, including:
step 1041, obtaining cosine similarity between the word vector of the target word slot value and the word vector of the word slot value.
Step 1042, if the cosine similarity is greater than the preset threshold, updating the word slot value in the current dialogue state to the target word slot value.
Specifically, the dialogue system acquires a word vector of a target word slot value and a word vector of the word slot value, acquires cosine similarity of the word vector of the target word slot value and the word vector of the word slot value, and if the cosine similarity is larger than a preset threshold value, the meaning of the target word slot value is indicated to be similar to that of the word slot value, and then the word slot value in the current dialogue state is updated to be the target word slot value; the preset threshold may be set according to actual needs, and this embodiment is not specifically limited. If the cosine similarity is not greater than the preset threshold, the meaning of the target word slot value is far different from the meaning of the word slot value, and the word slot value is directly output. By the method, the word slot value can be updated to be the target word slot value only when the cosine similarity meets the requirement, so that the normalization of the word slot value in the dialogue state can be further improved.
In this embodiment, a word slot value is extracted from information input by a user, and a word slot in which the word slot value is located is determined; searching a plurality of preset word slot values corresponding to the word slots; selecting a target word slot value with highest matching degree with the word slot value from a plurality of preset word slot values; the word slot value in the current dialogue state is updated to be the target word slot value, so that the word slot value in the dialogue state can be converted to a certain preset word slot value, namely, the word slot value in the dialogue state is standardized, the preset word slot value is the pre-marked word slot value, and the possibility of normal proceeding of the follow-up procedure is improved.
A second embodiment of the present invention is directed to a method for optimizing a session state based on a network, which is substantially the same as the first embodiment, and is mainly different in that: the dialogue domain is determined according to the information input by the user, and the current dialogue state also comprises the dialogue domain. The specific flow chart is shown in fig. 4, and includes:
step 201, determining the dialogue domain according to the information input by the user.
Step 202, extracting word slot values belonging to the dialogue field from the information, and determining the word slot in which the word slot value is located.
Specifically, the dialogue system may determine a dialogue area from the intention of a user after determining the intention of the user from information input by the user using natural language understanding, and the dialogue area may include areas of music, video, knowledge, weather, stocks, restaurants, etc., for example: the intention of the user is to acquire the weather of the martial arts today, and the dialogue field belongs to the weather. If the word slot values required by different dialogue fields are different, only the word slot values belonging to the dialogue fields can be extracted from the information after the dialogue fields are determined, and the word slot in which the word slot values are located can be determined. For example: the input information of the user is 'bad weather today, i want to listen to classical music', the intention of the user is to play happy music, the dialogue field is music, only the word slot value 'classical' related to the music is needed to be extracted, the word slot value 'today' related to weather is not needed to be extracted, and then the word slot where the 'classical' is located is determined to be 'type'. In one example, the current dialog state may be represented in the form of triples by dialog fields, word slots, and word slot values, such as: (music, genre, classical) represents the current dialog state.
Step 203, searching a plurality of preset word slot values corresponding to the word slots.
Step 203 is similar to step 102 in the first embodiment, and will not be described again.
In one example, searching a plurality of preset word slot values corresponding to the word slot includes: searching a plurality of preset word slot values corresponding to the word slots in the dialogue field. Specifically, the same word slots may exist in different dialog fields, but the preset word slot values corresponding to the word slots are not the same, for example: the stock field also has word slot "price", but the preset word slot value corresponding to the "price" is "rising", "falling", etc., the restaurant field also has word slot "price", but the preset word slot value corresponding to the "price" is "cheap", "expensive", "medium", if the dialogue field is a restaurant, only the preset word slot value corresponding to the "price" needs to be searched in the restaurant field. By limiting the word slot to a word slot in the dialogue field, the search range can be narrowed, and thus the target word slot value can be obtained faster.
Step 204, selecting a target word slot value with highest matching degree with the word slot value from a plurality of preset word slot values.
Step 205, the word slot value in the current dialogue state is updated to the target word slot value.
Steps 204-205 are similar to steps 103-104 of the first embodiment and are not described in detail herein.
In one example, the current dialog state is represented in the form of triples by dialog fields, word slots, and target word slot values. Specifically, if the current dialogue state is represented in the form of a triplet by the dialogue field, the word slot, and the word slot value, the word slot value in the triplet is updated to the target word slot value.
In this embodiment, since the domain of the dialogue is determined, only the word slot values belonging to the domain of the dialogue are extracted, so that the workload can be reduced and the current dialogue state can be more accurate.
The above steps of the methods are divided, for clarity of description, and may be combined into one step or split into multiple steps when implemented, so long as they include the same logic relationship, and they are all within the protection scope of this patent; it is within the scope of this patent to add insignificant modifications to the algorithm or flow or introduce insignificant designs, but not to alter the core design of its algorithm and flow.
A third embodiment of the present invention relates to a session state optimization device based on a network, as shown in fig. 5, including:
the state tracking module 301 is configured to extract a word slot value from information input by a user, and represent a current dialogue state through a word slot corresponding to the word slot value and the word slot value.
The searching module 302 is configured to search a plurality of preset word slot values corresponding to the word slots.
The selecting module 303 is configured to select a target word slot value with the highest matching degree with the word slot value from a plurality of preset word slot values.
The value specification module 304 is configured to update the word slot value in the current dialogue state to the target word slot value.
It is to be noted that this embodiment is an embodiment of the apparatus corresponding to the first embodiment, and this embodiment can be implemented in cooperation with the first embodiment. The related technical details mentioned in the first embodiment are still valid in this embodiment, and in order to reduce repetition, they are not described here again. Accordingly, the related-art details mentioned in the present embodiment can also be applied to the first embodiment.
It should be noted that, each module involved in this embodiment is a logic module, and in practical application, one logic unit may be one physical unit, or may be a part of one physical unit, or may be implemented by a combination of multiple physical units. In addition, in order to highlight the innovative part of the present invention, units less closely related to solving the technical problem presented by the present invention are not introduced in the present embodiment, but it does not indicate that other units are not present in the present embodiment.
A fourth embodiment of the invention is directed to a server, as shown in fig. 6, comprising at least one processor 402; and a memory 401 communicatively coupled to the at least one processor; the memory 401 stores instructions executable by the at least one processor 402, which are executed by the at least one processor 402, to enable the at least one processor 402 to perform the above-described embodiments of a network-based dialog state optimization method.
Where the memory and the processor are connected by a bus, the bus may comprise any number of interconnected buses and bridges, the buses connecting the various circuits of the one or more processors and the memory together. The bus may also connect various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art, and therefore, will not be described any further herein. The bus interface provides an interface between the bus and the transceiver. The transceiver may be one element or may be a plurality of elements, such as a plurality of receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. The data processed by the processor is transmitted over the wireless medium via the antenna, which further receives the data and transmits the data to the processor.
The processor is responsible for managing the bus and general processing and may also provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. And memory may be used to store data used by the processor in performing operations.
A fifth embodiment of the present invention relates to a computer-readable storage medium storing a computer program. The computer program implements the above-described method embodiments when executed by a processor.
That is, it will be understood by those skilled in the art that all or part of the steps in implementing the methods of the embodiments described above may be implemented by a program stored in a storage medium, where the program includes several instructions for causing a device (which may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps in the methods of the embodiments described herein. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples of carrying out the invention and that various changes in form and details may be made therein without departing from the spirit and scope of the invention.
Claims (7)
1. A method for optimizing dialog states based on a network, comprising:
extracting a word slot value from information input by a user, and determining a word slot in which the word slot value is located;
searching a plurality of preset word slot values corresponding to the word slots;
selecting a target word slot value with highest matching degree with the word slot value from the plurality of preset word slot values;
updating the word slot value in the current dialogue state to the target word slot value;
the selecting the target word slot value with the highest matching degree with the word slot value from the plurality of preset word slot values comprises the following steps:
respectively obtaining word vectors of each preset word slot value and obtaining the word vectors of the word slot values;
obtaining the inner products of the word vectors of the preset word slot values and the word vectors of the word slot values respectively;
selecting a maximum inner product from the acquired plurality of inner products, and taking a preset word slot value corresponding to the maximum inner product as a target word slot value with highest matching degree with the word slot value;
the updating the word slot value in the current dialogue state to the target word slot value comprises the following steps:
acquiring cosine similarity of a word vector of a target word slot value and a word vector of the word slot value;
if the cosine similarity is larger than a preset threshold value, updating the word slot value in the current dialogue state to be the target word slot value;
the word vector for respectively obtaining each preset word slot value comprises the following steps:
according to the word vector of each word in each preset word slot value, obtaining the word vector of each preset word slot value;
the obtaining the word vector of the word slot value comprises the following steps:
and obtaining the word vector of the word slot value according to the word vector of each word in the word slot value.
2. The network-based dialog state optimization method of claim 1, wherein the extracting a word slot value from information input by a user and determining a word slot in which the word slot value is located comprises:
determining the dialogue field according to the information input by the user;
and extracting a word slot value belonging to the dialogue field from the information, and determining a word slot in which the word slot value is located.
3. The method for optimizing dialogue state based on network according to claim 2, wherein said searching for a plurality of preset word slot values corresponding to the word slot comprises:
searching a plurality of preset word slot values corresponding to the word slots in the dialogue field.
4. The network-based dialog state optimization method of claim 2, wherein the current dialog state is represented in the form of triples by the dialog field, the word slot, and the target word slot value.
5. A network-based dialog state optimization device comprising:
the state tracking module is used for extracting word slot values from information input by a user, and representing the current dialogue state through word slots corresponding to the word slot values and the word slot values;
the searching module is used for searching a plurality of preset word slot values corresponding to the word slots;
the selection module is used for selecting a target word slot value with highest matching degree with the word slot value from the plurality of preset word slot values;
a value specification module, configured to update the word slot value in the current dialog state to the target word slot value;
the selection module is further used for respectively obtaining word vectors of each preset word slot value and obtaining the word vectors of the word slot values; obtaining the inner products of the word vectors of the preset word slot values and the word vectors of the word slot values respectively; selecting a maximum inner product from the acquired plurality of inner products, and taking a preset word slot value corresponding to the maximum inner product as a target word slot value with highest matching degree with the word slot value;
the value specification module is further used for obtaining the cosine similarity of the word vector of the target word slot value and the word vector of the word slot value; if the cosine similarity is larger than a preset threshold value, updating the word slot value in the current dialogue state to be the target word slot value;
the selection module is further used for obtaining word vectors of each preset word slot value according to the word vector of each word in each preset word slot value; and obtaining the word vector of the word slot value according to the word vector of each word in the word slot value.
6. A server, comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the network-based dialog state optimization method of any of claims 1-4.
7. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the network-based dialog state optimization method of any of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011284154.XA CN112417115B (en) | 2020-11-17 | 2020-11-17 | Network-based dialogue state optimization method, device, server and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011284154.XA CN112417115B (en) | 2020-11-17 | 2020-11-17 | Network-based dialogue state optimization method, device, server and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112417115A CN112417115A (en) | 2021-02-26 |
CN112417115B true CN112417115B (en) | 2024-04-05 |
Family
ID=74831829
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011284154.XA Active CN112417115B (en) | 2020-11-17 | 2020-11-17 | Network-based dialogue state optimization method, device, server and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112417115B (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111597808A (en) * | 2020-04-24 | 2020-08-28 | 北京百度网讯科技有限公司 | Instrument panel drawing processing method and device, electronic equipment and storage medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017210613A1 (en) * | 2016-06-03 | 2017-12-07 | Maluuba Inc. | Natural language generation in a spoken dialogue system |
-
2020
- 2020-11-17 CN CN202011284154.XA patent/CN112417115B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111597808A (en) * | 2020-04-24 | 2020-08-28 | 北京百度网讯科技有限公司 | Instrument panel drawing processing method and device, electronic equipment and storage medium |
Non-Patent Citations (1)
Title |
---|
陶晓峰 ; 吕朋朋 ; 缪平 ; 娄保东 ; .基于深度神经网络的工单采集模型研究.自动化与仪器仪表.2020,(02),全文. * |
Also Published As
Publication number | Publication date |
---|---|
CN112417115A (en) | 2021-02-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108170859B (en) | Voice query method, device, storage medium and terminal equipment | |
US20200301954A1 (en) | Reply information obtaining method and apparatus | |
US20090132515A1 (en) | Method and Apparatus for Performing Multi-Phase Ranking of Web Search Results by Re-Ranking Results Using Feature and Label Calibration | |
CN110633407B (en) | Information retrieval method, device, equipment and computer readable medium | |
US20100191758A1 (en) | System and method for improved search relevance using proximity boosting | |
CN112328891A (en) | Method for training search model, method for searching target object and device thereof | |
CN112102840B (en) | Semantic recognition method, semantic recognition device, terminal and storage medium | |
WO2021129515A1 (en) | Knowledge graph query method, electronic device, and storage medium | |
WO2019159986A1 (en) | Information provision device, information provision method, and program | |
CN117743526A (en) | Table question-answering method based on large language model and natural language processing | |
CN114005015B (en) | Training method of image recognition model, electronic device and storage medium | |
CN112487813B (en) | Named entity recognition method and system, electronic equipment and storage medium | |
US20220083879A1 (en) | Inferring a comparative advantage of multi-knowledge representations | |
CN112417115B (en) | Network-based dialogue state optimization method, device, server and storage medium | |
CN111639160A (en) | Domain identification method, interaction method, electronic device and storage medium | |
CN112836057A (en) | Knowledge graph generation method, device, terminal and storage medium | |
CN113886520B (en) | Code retrieval method, system and computer readable storage medium based on graph neural network | |
CN116049370A (en) | Information query method and training method and device of information generation model | |
CN111159999B (en) | Method and device for filling word slot, electronic equipment and storage medium | |
CN113836950A (en) | Commodity title text translation method and device, equipment and medium thereof | |
CN111930884A (en) | Method and equipment for determining reply sentence and man-machine conversation system | |
CN112417094B (en) | Answer selection method, device, server and storage medium based on web text | |
CN116310648B (en) | Model training method, face recognition method, electronic device and storage medium | |
CN111241275A (en) | Short text similarity evaluation method, device and equipment | |
CN116992111B (en) | Data processing method, device, electronic equipment and computer storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |