Intention recognition method, device, electronic device, storage medium and program product

By obtaining user query data and vector representation of target cities, and using the city graph network and DeepWalk algorithm to calculate the embedded vector of city nodes, the problems of low accuracy and high cost of user intention recognition in the prior art are solved, and efficient and accurate user intention recognition is achieved.

CN113111662BActive Publication Date: 2025-03-21RAJAX NETWORK &TECHNOLOGY (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110429580.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-21
Publication Date
2025-03-21
Estimated Expiration
2041-04-21

AI Technical Summary

Technical Problem

The prior art is low in accuracy when identifying user intentions, especially in user search results in different cities, and the cost of building and maintaining city-specific intent recognition models is high, and small and medium-sized cities may not be able to train due to sparse training samples.

Method used

By obtaining user query data and vector representation of target cities, using a pre-constructed city graph network, the embedded vector representation of city nodes is calculated based on the DeepWalk algorithm, and inputting it into the intent recognition model for comprehensive identification.

Benefits of technology

It realizes accurate identification of user intentions, improves the accuracy of search results, reduces the cost of building and maintaining models, and is suitable for user search scenarios in different cities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113111662B_ABST
    Figure CN113111662B_ABST
Patent Text Reader

Abstract

The disclosed embodiment discloses an intention recognition method, device, electronic device, storage medium and program product, wherein the intention recognition method comprises: obtaining input information, wherein the input information comprises query data and target city identification information; obtaining a first vector representation of the query data, and obtaining a second vector representation of the target city according to the target city identification information; inputting the first vector representation and the second vector representation into a pre-trained intention recognition model to obtain an intention recognition result based on the input information. The technical solution is simple to operate, can accurately recognize user intentions, and improve the accuracy of user search results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of data identification, and in particular to an intent identification method, device, electronic device, storage medium and program product. Background Art

[0002] With the development of Internet technology and data technology, more and more users search for their needs through the Internet, for example, they search for the products they want, the food they want to eat, or the restaurants they want to go to on the Internet application platform, etc. However, in actual applications, due to the different characteristics of different cities, users in different cities have different intentions. That is to say, even for the same search term, the results that users in different cities want to search for are not the same. For example, users searching for "green tea" in Shanghai are likely to want to find a green tea restaurant, while users searching for "green tea" in a certain county are likely to want to find green tea drinks. In order to accurately identify user intentions and improve the accuracy of user search results, it is possible to consider building an intention recognition model for each city to support information search, but this will bring huge construction and maintenance costs. On the other hand, in some small and medium-sized cities, there may be problems that cannot be trained due to sparse training samples. Therefore, in the prior art, traditional information search models are usually used to search for user queries, and the recognition of user intentions is realized by customizing artificial word lists, but this solution is not only cumbersome to operate, but also has a low accuracy rate in intention recognition, which in turn affects the accuracy of user search results. Summary of the invention

[0003] Embodiments of the present disclosure provide an intent recognition method, device, electronic device, storage medium, and program product.

[0004] In a first aspect, an intent recognition method is provided in an embodiment of the present disclosure.

[0005] Specifically, the intention recognition method includes:

[0006] Acquiring input information, wherein the input information includes query data and target city identification information;

[0007] Acquire a first vector representation of the query data, and acquire a second vector representation of the target city according to the target city identification information;

[0008] The first vector representation and the second vector representation are input into a pre-trained intent recognition model to obtain an intent recognition result based on the input information.

[0009] In combination with the first aspect, in a first implementation of the first aspect of the present disclosure, the step of acquiring a second vector representation of the target city according to the target city identification information includes:

[0010] Obtain a city graph network, wherein the city graph network includes one or more nodes representing cities, and edges connecting different city nodes, each city is correspondingly provided with a city identification information, and each edge is correspondingly provided with an edge weight;

[0011] Based on the city graph network, obtaining an embedded vector representation of each city node;

[0012] The embedded vector representation of the corresponding city node is queried according to the target city identification information to obtain a second vector representation of the target city.

[0013] In combination with the first aspect and the first implementation of the first aspect, in a second implementation of the first aspect of the embodiment of the present disclosure, obtaining an embedded vector representation of each city node based on the city graph network is implemented as follows:

[0014] Based on the city graph network, the embedded vector representation of each city node is calculated using the DeepWalk method, wherein the walking probability of an edge in the city graph network according to the DeepWalk method is related to the weight of the edge.

[0015] In combination with the first aspect, the first implementation manner of the first aspect, and the second implementation manner of the first aspect, in a third implementation manner of the first aspect of the embodiment of the present disclosure, acquiring a second vector representation of the target city according to the target city identification information further includes:

[0016] The city graph network is generated.

[0017] In combination with the first aspect, the first implementation manner of the first aspect, the second implementation manner of the first aspect, and the third implementation manner of the first aspect, in a fourth implementation manner of the first aspect of the embodiment of the present disclosure, generating the city map network includes:

[0018] Setting city identification information for a city, determining preset attributes of the city, and obtaining statistical features of the city, wherein the statistical features include preset object statistical features and preset behavior statistical features;

[0019] Taking cities as nodes, the connection relationship between city nodes is determined according to the preset attributes of the cities, and the edges connecting two city nodes in the city graph network are obtained;

[0020] The similarity between connected cities is calculated based on the statistical characteristics of the cities, and the distance between the connected cities is obtained. The weights of the edges of the connected cities are determined based on the similarity between the connected cities and the distance between the connected cities, and a city graph network is obtained.

[0021] In combination with the first aspect, the first implementation manner of the first aspect, the second implementation manner of the first aspect, the third implementation manner of the first aspect, and the fourth implementation manner of the first aspect, in a fifth implementation manner of the first aspect of the embodiment of the present disclosure, the calculating the similarity between the connected cities according to the statistical characteristics of the cities includes:

[0022] Synthesize the statistical characteristics of the city to obtain the synthetic statistical characteristics of the city;

[0023] Normalizing the synthetic statistical features to obtain normalized synthetic statistical features of the city;

[0024] The distances between the normalized synthetic statistical features are calculated to obtain the similarities between the connected cities.

[0025] In combination with the first aspect, the first implementation manner of the first aspect, the second implementation manner of the first aspect, the third implementation manner of the first aspect, the fourth implementation manner of the first aspect, and the fifth implementation manner of the first aspect, in a sixth implementation manner of the first aspect of the embodiment of the present disclosure, determining the weight of the edge of the connected cities according to the similarity between the connected cities and the distance between the connected cities includes:

[0026] Determine the initial weight value of the edge connecting the cities according to the similarity between the connected cities;

[0027] The attenuation ratio is determined based on the preset attenuation rule according to the distance between the connected cities, and the weight of the edge of the connected cities is obtained by multiplying the initial weight value by the attenuation ratio.

[0028] In combination with the first aspect, the first implementation manner of the first aspect, the second implementation manner of the first aspect, the third implementation manner of the first aspect, the fourth implementation manner of the first aspect, the fifth implementation manner of the first aspect, and the sixth implementation manner of the first aspect, in a seventh implementation manner of the first aspect of the embodiment of the present disclosure, inputting the first vector representation and the second vector representation into a pre-trained intent recognition model to obtain an intent recognition result based on the input information includes:

[0029] Combining the first vector representation and the second vector representation to obtain a composite vector representation;

[0030] The synthesized vector representation is input into a pre-trained intent recognition model to obtain an intent recognition result based on the input information.

[0031] In combination with the first aspect, the first implementation of the first aspect, the second implementation of the first aspect, the third implementation of the first aspect, the fourth implementation of the first aspect, the fifth implementation of the first aspect, the sixth implementation of the first aspect, and the seventh implementation of the first aspect, the embodiment of the present disclosure, in an eighth implementation of the first aspect, further includes:

[0032] The intent recognition model is trained.

[0033] In combination with the first aspect, the first implementation manner of the first aspect, the second implementation manner of the first aspect, the third implementation manner of the first aspect, the fourth implementation manner of the first aspect, the fifth implementation manner of the first aspect, the sixth implementation manner of the first aspect, the seventh implementation manner of the first aspect, and the eighth implementation manner of the first aspect, in a ninth implementation manner of the first aspect of the embodiment of the present disclosure, the training of the intent recognition model includes:

[0034] Determine the initial model for intent recognition;

[0035] Acquire a training data set, wherein the training data set includes a first training vector representation of training query data, a second training vector representation of a training city corresponding to training city identification information obtained based on a city graph network, and an intent recognition result;

[0036] The synthetic training vector representation of the first training vector representation and the second training vector representation is used as training input data, and the intention recognition result is used as training output data to train the intention recognition initial model to obtain the intention recognition model.

[0037] In a second aspect, an intention recognition device is provided in an embodiment of the present disclosure.

[0038] Specifically, the intention recognition device includes:

[0039] A first acquisition module is configured to acquire input information, wherein the input information includes query data and target city identification information;

[0040] A second acquisition module is configured to acquire a first vector representation of the query data, and acquire a second vector representation of the target city according to the target city identification information;

[0041] The recognition module is configured to input the first vector representation and the second vector representation into a pre-trained intention recognition model to obtain an intention recognition result based on the input information.

[0042] In combination with the second aspect, in a first implementation of the second aspect of the present disclosure, the part of the second acquisition module that acquires the second vector representation of the target city according to the target city identification information is configured as follows:

[0043] Obtain a city graph network, wherein the city graph network includes one or more nodes representing cities, and edges connecting different city nodes, each city is correspondingly provided with a city identification information, and each edge is correspondingly provided with an edge weight;

[0044] Based on the city graph network, obtaining an embedded vector representation of each city node;

[0045] The embedded vector representation of the corresponding city node is queried according to the target city identification information to obtain a second vector representation of the target city.

[0046] In combination with the second aspect and the first implementation of the second aspect, in the second implementation of the second aspect of the embodiment of the present disclosure, the part of obtaining the embedded vector representation of each city node based on the city graph network is configured as follows:

[0047] Based on the city graph network, the embedded vector representation of each city node is calculated using the DeepWalk device, wherein the walking probability of the edge in the city graph network by the DeepWalk device is related to the weight of the edge.

[0048] In combination with the second aspect, the first implementation manner of the second aspect, and the second implementation manner of the second aspect, in a third implementation manner of the second aspect of the embodiment of the present disclosure, the part of acquiring the second vector representation of the target city according to the target city identification information is further configured as follows:

[0049] The city graph network is generated.

[0050] In combination with the second aspect, the first implementation of the second aspect, the second implementation of the second aspect, and the third implementation of the second aspect, in a fourth implementation of the second aspect of the embodiment of the present disclosure, the part of generating the city map network is configured as follows:

[0051] Setting city identification information for a city, determining preset attributes of the city, and obtaining statistical features of the city, wherein the statistical features include preset object statistical features and preset behavior statistical features;

[0052] Taking cities as nodes, the connection relationship between city nodes is determined according to the preset attributes of the cities, and the edges connecting two city nodes in the city graph network are obtained;

[0053] The similarity between connected cities is calculated based on the statistical characteristics of the cities, and the distance between the connected cities is obtained. The weights of the edges of the connected cities are determined based on the similarity between the connected cities and the distance between the connected cities, and a city graph network is obtained.

[0054] In combination with the second aspect, the first implementation manner of the second aspect, the second implementation manner of the second aspect, the third implementation manner of the second aspect, and the fourth implementation manner of the second aspect, in a fifth implementation manner of the second aspect of the embodiment of the present disclosure, the part of calculating the similarity between the connected cities according to the statistical characteristics of the cities is configured as follows:

[0055] Synthesize the statistical characteristics of the city to obtain the synthetic statistical characteristics of the city;

[0056] Normalizing the synthetic statistical features to obtain normalized synthetic statistical features of the city;

[0057] The distances between the normalized synthetic statistical features are calculated to obtain the similarities between the connected cities.

[0058] In combination with the second aspect, the first implementation manner of the second aspect, the second implementation manner of the second aspect, the third implementation manner of the second aspect, the fourth implementation manner of the second aspect, and the fifth implementation manner of the second aspect, in a sixth implementation manner of the second aspect of the embodiment of the present disclosure, the part of determining the weight of the edge of the connected cities according to the similarity between the connected cities and the distance between the connected cities is configured as follows:

[0059] Determine the initial weight value of the edge connecting the cities according to the similarity between the connected cities;

[0060] The attenuation ratio is determined based on the preset attenuation rule according to the distance between the connected cities, and the weight of the edge of the connected cities is obtained by multiplying the initial weight value by the attenuation ratio.

[0061] In combination with the second aspect, the first implementation manner of the second aspect, the second implementation manner of the second aspect, the third implementation manner of the second aspect, the fourth implementation manner of the second aspect, the fifth implementation manner of the second aspect, and the sixth implementation manner of the second aspect, in a seventh implementation manner of the second aspect of the embodiment of the present disclosure, the identification module is configured as:

[0062] Combining the first vector representation and the second vector representation to obtain a composite vector representation;

[0063] The synthesized vector representation is input into a pre-trained intent recognition model to obtain an intent recognition result based on the input information.

[0064] In combination with the second aspect, the first implementation of the second aspect, the second implementation of the second aspect, the third implementation of the second aspect, the fourth implementation of the second aspect, the fifth implementation of the second aspect, the sixth implementation of the second aspect, and the seventh implementation of the second aspect, the embodiment of the present disclosure, in an eighth implementation of the second aspect, further includes:

[0065] A training module is configured to train the intent recognition model.

[0066] In combination with the second aspect, the first implementation manner of the second aspect, the second implementation manner of the second aspect, the third implementation manner of the second aspect, the fourth implementation manner of the second aspect, the fifth implementation manner of the second aspect, the sixth implementation manner of the second aspect, the seventh implementation manner of the second aspect, and the eighth implementation manner of the second aspect, in a ninth implementation manner of the second aspect of the embodiment of the present disclosure, the training module is configured as follows:

[0067] Determine the initial model for intent recognition;

[0068] Acquire a training data set, wherein the training data set includes a first training vector representation of training query data, a second training vector representation of a training city corresponding to training city identification information obtained based on a city graph network, and an intent recognition result;

[0069] The synthetic training vector representation of the first training vector representation and the second training vector representation is used as training input data, and the intention recognition result is used as training output data to train the intention recognition initial model to obtain the intention recognition model.

[0070] In a third aspect, an embodiment of the present disclosure provides an electronic device comprising a memory and at least one processor, wherein the memory is used to store one or more computer instructions, and wherein the one or more computer instructions are executed by the at least one processor to implement the method steps of the above-mentioned intent recognition method.

[0071] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium for storing computer instructions used by an intent recognition device, which includes computer instructions involved in the intent recognition device for executing the above-mentioned intent recognition method.

[0072] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program / instructions, wherein the computer program / instructions, when executed by a processor, implement the method steps of the above-mentioned intent recognition method.

[0073] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0074] The above technical solution reflects the user intention factor by obtaining the vector representation of the target city related to the user query data, and comprehensively performs intention recognition based on the user query data and the vector representation of the target city. The technical solution is simple to operate, can accurately recognize user intentions, and improve the accuracy of user search results.

[0075] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] Other features, objectives and advantages of the present disclosure will become more apparent through the following detailed description of non-limiting embodiments in conjunction with the accompanying drawings. In the accompanying drawings:

[0077] Figure 1 A flowchart of an intention recognition method according to an embodiment of the present disclosure is shown;

[0078] Figure 2 A schematic diagram of a city graph network according to an embodiment of the present disclosure is shown;

[0079] Figure 3 A structural block diagram of an intention recognition device according to an embodiment of the present disclosure is shown;

[0080] Figure 4 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown;

[0081] Figure 5 It is a structural diagram of a computer system suitable for implementing an intent recognition method according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0082] Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement them. In addition, for the sake of clarity, parts not related to the description of the exemplary embodiments are omitted in the accompanying drawings.

[0083] In the present disclosure, it should be understood that terms such as "include" or "have" are intended to indicate the presence of features, numbers, steps, behaviors, components, parts, or a combination thereof disclosed in the present specification, and are not intended to exclude the possibility that one or more other features, numbers, steps, behaviors, components, parts, or a combination thereof exist or are added.

[0084] It should also be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0085] The technical solution provided by the embodiment of the present disclosure reflects the user intention factor by obtaining the vector representation of the target city related to the user query data, and comprehensively performs intention recognition based on the user query data and the vector representation of the target city. The technical solution is simple to operate, can accurately recognize the user intention, and improve the accuracy of the user search results.

[0086] Figure 1 A flowchart of a method for identifying intent according to an embodiment of the present disclosure is shown. Figure 1 As shown, the intention recognition method includes the following steps S101-S103:

[0087] In step S101, input information is obtained, wherein the input information includes query data and target city identification information;

[0088] In step S102, a first vector representation of the query data is obtained, and a second vector representation of the target city is obtained according to the target city identification information;

[0089] In step S103, the first vector representation and the second vector representation are input into a pre-trained intention recognition model to obtain an intention recognition result based on the input information.

[0090] As mentioned above, with the development of Internet technology and data technology, more and more users search for their needs through the Internet, for example, they search for the products they want, the food they want to eat, or the restaurants they want to go to on the Internet application platform, etc. However, in actual applications, due to the different characteristics of different cities, users in different cities have different intentions. That is to say, even for the same search term, the results that users want to search for in different cities are not the same. For example, users searching for "green tea" in Shanghai are likely to want to find a green tea restaurant, while users searching for "green tea" in a certain county are likely to want to find green tea drinks. In order to accurately identify user intentions and improve the accuracy of user search results, it is possible to consider building an intention recognition model for each city to support information search, but this will bring huge construction and maintenance costs. On the other hand, in some small and medium-sized cities, there may be problems that cannot be trained due to sparse training samples. Therefore, the prior art usually uses a traditional information search model to search for user queries, and realizes the recognition of user intentions by customizing a manually prepared vocabulary, but this solution is not only cumbersome to operate, but also has a low accuracy in intention recognition, which in turn affects the accuracy of user search results.

[0091] In view of the above defects, in this embodiment, a method for identifying intent is proposed, which reflects the user intent factor by obtaining a vector representation of the target city related to the user query data, and comprehensively identifies the intent based on the user query data and the vector representation of the target city. The technical solution is simple to operate, can accurately identify the user intent, and improve the accuracy of the user search results.

[0092] In one embodiment of the present disclosure, the intent recognition method may be applicable to computers, computing devices, terminals, electronic devices, servers, etc. that perform intent recognition on input information.

[0093] In one embodiment of the present disclosure, the input information refers to information based on which intent recognition and subsequent information search can be performed. The input information may include query data and target city identification information. The target city is a city related to the query data. The target city may be the city where the user is currently located or the city where the user wants to search for information. If the target city is the city where the user is currently located, the user's real-time location can be obtained through positioning tools such as positioning applications, and the city where the user is currently located can be determined based on the user's real-time location. If the target city is the city where the user wants to search for information, the user can enter the city information while entering the query data, so that the target city can be obtained based on the information entered by the user. The query data refers to the data entered by the user to obtain the information search results with the query data as the key information. The target city identification information refers to information that can be set in advance and used to distinguish the target city, such as a city ID, etc. In actual applications, a correspondence table between the city name and the city ID can be set in advance. After obtaining the city name, the corresponding city ID can be obtained by querying the correspondence table. For example, if the query data input by the user is "green tea" and the user's current city is Shanghai, the input information may include "green tea" and the Shanghai ID found through the corresponding table.

[0094] In one embodiment of the present disclosure, the first vector representation refers to a vector used to characterize the query data, which can be obtained by means of a convolutional neural network, a Transformer, an LSTM (Long Short-Term Memory Network) or other networks. Among them, the acquisition of a vector representation of a certain data belongs to a technology that should be mastered by those skilled in the art, and this disclosure does not describe it in detail.

[0095] In one embodiment of the present disclosure, a second vector representation of the target city corresponding to the target city identification information may be obtained with the help of a pre-constructed city graph network, and the specific details will be described in detail below.

[0096] In the above implementation, the query data input by the user and the identification information of the target city where the query operation is performed are first obtained, and then the first vector representation of the query data is calculated, and the second vector representation of the target city is obtained based on the identification information of the target city. Finally, the first vector representation and the second vector representation are input into the pre-trained intent recognition model to obtain the user intent recognition result.

[0097] In one embodiment of the present disclosure, the step of acquiring the second vector representation of the target city according to the target city identification information in step S102 may include the following steps:

[0098] Obtain a city graph network, wherein the city graph network includes one or more nodes representing cities, and edges connecting different city nodes, each city is correspondingly provided with a city identification information, and each edge is correspondingly provided with an edge weight;

[0099] Based on the city graph network, obtaining an embedded vector representation of each city node;

[0100] The embedded vector representation of the corresponding city node is queried according to the target city identification information to obtain a second vector representation of the target city.

[0101] In this embodiment, a second vector representation of a target city corresponding to the target city identification information is obtained with the help of a pre-constructed city graph network. Specifically: first, a city graph network is obtained, wherein the city graph network includes one or more nodes representing cities, and edges connecting different city nodes, wherein each city is correspondingly provided with a city identification information, and each edge is correspondingly provided with an edge weight; then, based on the city graph network, an embedded vector representation of each city node is obtained; finally, the embedded vector representation of the corresponding city node is queried according to the target city identification information to obtain the second vector representation of the target city.

[0102] Among them, the embedded vector table representation calculation of each city node can be performed based on the city graph network through the DeepWalk algorithm. The DeepWalk algorithm is also a technology that those skilled in the art should master. This disclosure does not describe it in detail. The only difference between this disclosure and the traditional DeepWalk algorithm is that the probability of walking is determined according to the weight of the edge of the city graph network during random walking in the DeepWalk algorithm of this disclosure. The greater the weight of the edge, the greater the probability of walking this edge. That is, in one embodiment of the present disclosure, the step of obtaining the embedded vector representation of each city node based on the city graph network can be implemented as follows:

[0103] Based on the city graph network, the embedded vector representation of each city node is calculated using the DeepWalk method, wherein the walking probability of an edge in the city graph network according to the DeepWalk method is related to the weight of the edge.

[0104] In one embodiment of the present disclosure, the step of acquiring the second vector representation of the target city according to the target city identification information in step S102 may further include the following steps:

[0105] The city graph network is generated.

[0106] The step of generating the city map network may include the following steps:

[0107] Setting city identification information for a city, determining preset attributes of the city, and obtaining statistical features of the city, wherein the statistical features include preset object statistical features and preset behavior statistical features;

[0108] Taking cities as nodes, the connection relationship between city nodes is determined according to the preset attributes of the cities, and the edges connecting two city nodes in the city graph network are obtained;

[0109] The similarity between connected cities is calculated based on the statistical characteristics of the cities, and the distance between the connected cities is obtained. The weights of the edges of the connected cities are determined based on the similarity between the connected cities and the distance between the connected cities, and a city graph network is obtained.

[0110] As mentioned above, the vector representation of the target city is used to reflect the user intention factor. Therefore, when generating the city graph network as the basis for obtaining the vector representation of the target city, the user intention factor must also be considered. Specifically:

[0111] When generating the city map network, firstly, city identification information is set for the city, such as the city ID mentioned above, the preset attributes of the city are determined, and the statistical features of the city that can reflect the user intention factors are obtained, wherein the preset attributes of the city refer to the importance of the city, and the importance of the city can be preset according to the needs of the actual application. For example, municipalities, provincial capitals, first-tier cities or certain designated cities can be regarded as important cities, and other cities as unimportant cities; the statistical features include preset object statistical features and preset behavior statistical features, wherein the preset objects and preset behaviors can also be set according to the needs of the actual application, for example, the preset objects can be set to merchants, stores, etc. in the city, and the preset behaviors can be set to consumption behaviors in the city, etc. When the object is a city merchant, the preset object statistical features may include one or more of the following features: merchant brand distribution features, merchant category distribution features, commodity category distribution features, etc. The preset object statistical features can reflect the merchant characteristics of the city and can be obtained based on the merchant information data registered by the merchant on the Internet platform; when the preset behavior is a city consumption behavior, the preset behavior statistical features may include one or more of the following features: search / click / purchase merchant brand distribution features, search / click / purchase merchant category distribution features, search / click / purchase commodity category distribution features, etc. The preset behavior statistical features can reflect the behavior characteristics of the user group in the city and can be obtained based on the user search and click log data of the Internet platform. The statistical features of the city can be shown in the following table:

[0112]

[0113] Then, taking the city as a node, the connection relationship between the city nodes is determined according to the preset attributes of the city, and the edge connecting two city nodes in the city graph network is obtained. When determining the connection relationship between the city nodes, it can also be determined according to the preset node connection rules. For example, the node connection rules can be set to connect important cities to each other, connect non-important cities to up to 3 important cities within a preset geographical range, and so on.

[0114] Finally, the similarity between connected cities is calculated based on the statistical characteristics of the cities, and the distance between connected cities is obtained. The weights of the edges of connected cities are determined based on the similarity between connected cities and the distance between connected cities, and a city graph network is obtained. Figure 2 A schematic diagram of a city graph network according to an embodiment of the present disclosure is shown as follows: Figure 2 As shown in the figure, different circles represent different city nodes, 1, 2, 3, and 4 are the identification information of different cities, and w 12 、w 13 、w 14 、w 23、w 24 、w 34 They represent the weights of the edges connecting the cities.

[0115] In one embodiment of the present disclosure, the step of calculating the similarity between connected cities based on the statistical characteristics of the cities may include the following steps:

[0116] Synthesize the statistical characteristics of the city to obtain the synthetic statistical characteristics of the city;

[0117] Normalizing the synthetic statistical features to obtain normalized synthetic statistical features of the city;

[0118] The distances between the normalized synthetic statistical features are calculated to obtain the similarities between the connected cities.

[0119] When calculating the similarity between connected cities, the statistical features of the cities are first synthesized to obtain the synthetic statistical features of the cities. For example, the preset object statistical features and preset behavior statistical features mentioned above can be spliced ​​to obtain the synthetic statistical features of the cities. Then the synthetic statistical features are normalized to obtain the normalized synthetic statistical features of the cities. Finally, the distance between the normalized synthetic statistical features of the connected cities is calculated to obtain the similarity between the connected cities, wherein the distance can be either a cosine distance or a Euclidean distance.

[0120] In one embodiment of the present disclosure, the step of determining the weight of the edge of the connected cities according to the similarity between the connected cities and the distance between the connected cities may include the following steps:

[0121] Determine the initial weight value of the edge connecting the cities according to the similarity between the connected cities;

[0122] The attenuation ratio is determined based on the preset attenuation rule according to the distance between the connected cities, and the weight of the edge of the connected cities is obtained by multiplying the initial weight value by the attenuation ratio.

[0123] In this embodiment, considering that the greater the similarity between two cities, the stronger the association between the two cities, and the easier it is to move when using DeepWalk for random walk, the weight of the edge of the connected city should be greater. Therefore, when determining the weight of the edge of the connected city, the initial value of the weight of the edge of the connected city is first determined based on the similarity between the connected cities calculated previously, for example, the similarity can be directly used as the initial value of the weight of the edge of the corresponding connected city. Considering that the farther the distance between two cities, the weaker the association between the two cities, the attenuation ratio can be determined based on the preset attenuation rule according to the distance between the connected cities, and then the initial weight value can be multiplied by the attenuation ratio to obtain the weight of the edge of the connected city, so that the weight of the edge of the two cities is attenuated according to the distance between the two cities, wherein the preset attenuation rule can be attenuated according to a preset ratio, or can be attenuated logarithmically or in other ways.

[0124] In one embodiment of the present disclosure, the step S103, that is, the step of inputting the first vector representation and the second vector representation into a pre-trained intent recognition model to obtain an intent recognition result based on the input information, may include the following steps:

[0125] Combining the first vector representation and the second vector representation to obtain a composite vector representation;

[0126] The synthesized vector representation is input into a pre-trained intent recognition model to obtain an intent recognition result based on the input information.

[0127] In this implementation, the first vector representation and the second vector representation are first synthesized to obtain a synthesized vector representation. For example, the first vector representation and the second vector representation may be concatenated to obtain the synthesized vector representation. The synthesized vector representation is then input into a pre-trained intent recognition model to obtain an intent recognition result based on the input information.

[0128] In one embodiment of the present disclosure, the method may further include the following steps:

[0129] The intent recognition model is trained.

[0130] The step of training the intention recognition model may include the following steps:

[0131] Determine the initial model for intent recognition;

[0132] Acquire a training data set, wherein the training data set includes a first training vector representation of training query data, a second training vector representation of a training city corresponding to training city identification information obtained based on a city graph network, and an intent recognition result;

[0133] The synthetic training vector representation of the first training vector representation and the second training vector representation is used as training input data, and the intention recognition result is used as training output data to train the intention recognition initial model to obtain the intention recognition model.

[0134] In this embodiment, when training the intention recognition model, the initial intention recognition model is first determined, wherein the initial intention recognition model can be selected as a model with classification capabilities, such as a classification neural network model, etc. Then a training data set is obtained, wherein the training data set includes a first training vector representation of the training query data, a second training vector representation of the training city corresponding to the training city identification information obtained based on the city map network, and an intention recognition result, wherein the first training vector representation can be obtained based on the same acquisition method as the first vector representation, and the second training vector representation can also be obtained based on the same acquisition method as the second vector representation, and the intention recognition result is the intention recognition result corresponding to the training query data and the training city identification information, for example, the intention recognition result can be a merchant brand intention, a merchant address intention, and a commodity category intention, etc. Finally, the synthetic training vector representation of the first training vector representation and the second training vector representation is used as the training input data, and the intention recognition result is used as the training output data to train the initial intention recognition model, so as to obtain the intention recognition model. During the training process, the data elements of the second training vector representation can be adjusted and updated in real time according to the training results.

[0135] In an embodiment of the present disclosure, after obtaining the intention recognition result of the input information, a preset operation may be performed according to the intention recognition result of the input information, for example, the display order of the information search results obtained according to the input information may be adjusted according to the intention recognition result of the input information, that is, in this embodiment, the method may further include the following steps:

[0136] Searching according to the input information to obtain search results, wherein the search results include target information related to the input information, for example, if the input information is "green tea", the search results may include "green tea restaurant" and "green tea beverage";

[0137] Then, the display order of the search results is adjusted according to the intention recognition result of the input information. If there is no step for adjusting the display order, the search results can be displayed in a random manner. For example, in the search result list, "Green Tea Restaurant" can be displayed first and then "Green Tea Beverage", or "Green Tea Beverage" can be displayed first and then "Green Tea Restaurant". However, if the display order of the search results is adjusted according to the intention recognition result of the input information, the search results can be displayed with full consideration of the user's intention. For example, when the user is in Shanghai, "Green Tea Restaurant" will be displayed first and then "Green Tea Beverage" in the search result list. When the user is in a county town, "Green Tea Beverage" will be displayed first and then "Green Tea Restaurant" in the search result list. This allows the user's intention to be accurately identified to obtain more accurate information search results that are more in line with user needs and intentions, thereby improving the service quality of the Internet platform.

[0138] The following are embodiments of the apparatus of the present disclosure, which can be used to execute embodiments of the method of the present disclosure.

[0139] Figure 3 FIG. 1 is a block diagram of a device for identifying intentions according to an embodiment of the present disclosure. The device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. Figure 3 As shown, the intention recognition device includes:

[0140] The first acquisition module 301 is configured to acquire input information, wherein the input information includes query data and target city identification information;

[0141] A second acquisition module 302 is configured to acquire a first vector representation of the query data, and acquire a second vector representation of the target city according to the target city identification information;

[0142] The recognition module 303 is configured to input the first vector representation and the second vector representation into a pre-trained intent recognition model to obtain an intent recognition result based on the input information.

[0143] As mentioned above, with the development of Internet technology and data technology, more and more users search for their needs through the Internet, for example, they search for the products they want, the food they want to eat, or the restaurants they want to go to on the Internet application platform, etc. However, in actual applications, due to the different characteristics of different cities, users in different cities have different intentions. That is to say, even for the same search term, the results that users want to search for in different cities are not the same. For example, users searching for "green tea" in Shanghai are likely to want to find a green tea restaurant, while users searching for "green tea" in a certain county are likely to want to find green tea drinks. In order to accurately identify user intentions and improve the accuracy of user search results, it is possible to consider building an intention recognition model for each city to support information search, but this will bring huge construction and maintenance costs. On the other hand, in some small and medium-sized cities, there may be problems that cannot be trained due to sparse training samples. Therefore, the prior art usually uses a traditional information search model to search for user queries, and realizes the recognition of user intentions by customizing a manually prepared vocabulary, but this solution is not only cumbersome to operate, but also has a low accuracy in intention recognition, which in turn affects the accuracy of user search results.

[0144] In view of the above defects, in this embodiment, an intention recognition device is proposed, which reflects the user intention factor by obtaining the vector representation of the target city related to the user query data, and comprehensively performs intention recognition based on the user query data and the vector representation of the target city. The technical solution is simple to operate, can accurately recognize the user's intention, and improve the accuracy of the user's search results.

[0145] In one embodiment of the present disclosure, the intention recognition device can be implemented as a computer, a computing device, a terminal, an electronic device, a server, etc. that performs intention recognition on input information.

[0146] In one embodiment of the present disclosure, the input information refers to information based on which intent recognition and subsequent information search can be performed. The input information may include query data and target city identification information. The target city is a city related to the query data. The target city may be the city where the user is currently located or the city where the user wants to search for information. If the target city is the city where the user is currently located, the user's real-time location can be obtained through positioning tools such as positioning applications, and the city where the user is currently located can be determined based on the user's real-time location. If the target city is the city where the user wants to search for information, the user can enter the city information while entering the query data, so that the target city can be obtained based on the information entered by the user. The query data refers to the data entered by the user to obtain the information search results with the query data as the key information. The target city identification information refers to information that can be set in advance and used to distinguish the target city, such as a city ID, etc. In actual applications, a correspondence table between the city name and the city ID can be set in advance. After obtaining the city name, the corresponding city ID can be obtained by querying the correspondence table. For example, if the query data input by the user is "green tea" and the user's current city is Shanghai, the input information may include "green tea" and the Shanghai ID found through the corresponding table.

[0147] In one embodiment of the present disclosure, the first vector representation refers to a vector used to characterize the query data, which can be obtained by means of a convolutional neural network, a Transformer, an LSTM (Long Short-Term Memory Network) or other networks. Among them, the acquisition of a vector representation of a certain data belongs to a technology that should be mastered by those skilled in the art, and this disclosure does not describe it in detail.

[0148] In one embodiment of the present disclosure, a second vector representation of the target city corresponding to the target city identification information may be obtained with the help of a pre-constructed city graph network, and the specific details will be described in detail below.

[0149] In the above implementation, the query data input by the user and the identification information of the target city where the query operation is performed are first obtained, and then the first vector representation of the query data is calculated, and the second vector representation of the target city is obtained based on the identification information of the target city. Finally, the first vector representation and the second vector representation are input into the pre-trained intent recognition model to obtain the user intent recognition result.

[0150] In an embodiment of the present disclosure, the part of the second acquisition module 302 that acquires the second vector representation of the target city according to the target city identification information may be configured as follows:

[0151] Obtain a city graph network, wherein the city graph network includes one or more nodes representing cities, and edges connecting different city nodes, each city is correspondingly provided with a city identification information, and each edge is correspondingly provided with an edge weight;

[0152] Based on the city graph network, obtaining an embedded vector representation of each city node;

[0153] The embedded vector representation of the corresponding city node is queried according to the target city identification information to obtain a second vector representation of the target city.

[0154] In this embodiment, a second vector representation of a target city corresponding to the target city identification information is obtained with the help of a pre-constructed city graph network. Specifically: first, a city graph network is obtained, wherein the city graph network includes one or more nodes representing cities, and edges connecting different city nodes, wherein each city is correspondingly provided with a city identification information, and each edge is correspondingly provided with an edge weight; then, based on the city graph network, an embedded vector representation of each city node is obtained; finally, the embedded vector representation of the corresponding city node is queried according to the target city identification information to obtain the second vector representation of the target city.

[0155] Among them, the embedded vector table representation calculation of each city node can be performed based on the city graph network through the DeepWalk algorithm. The DeepWalk algorithm is also a technology that those skilled in the art should master. This disclosure does not describe it in detail. The only difference between this disclosure and the traditional DeepWalk algorithm is that the probability of walking is determined according to the weight of the edge of the city graph network during random walking in the DeepWalk algorithm of this disclosure. The greater the weight of the edge, the greater the probability of walking this edge. That is, in one embodiment of the present disclosure, the part of obtaining the embedded vector representation of each city node based on the city graph network can be configured as:

[0156] Based on the city graph network, the embedded vector representation of each city node is calculated using the DeepWalk method, wherein the walking probability of an edge in the city graph network according to the DeepWalk method is related to the weight of the edge.

[0157] In an embodiment of the present disclosure, the part of the second acquisition module 302 that acquires the second vector representation of the target city according to the target city identification information may also be configured as follows:

[0158] The city graph network is generated.

[0159] Wherein, the part of generating the city map network may be configured as follows:

[0160] Setting city identification information for a city, determining preset attributes of the city, and obtaining statistical features of the city, wherein the statistical features include preset object statistical features and preset behavior statistical features;

[0161] Taking cities as nodes, the connection relationship between city nodes is determined according to the preset attributes of the cities, and the edges connecting two city nodes in the city graph network are obtained;

[0162] The similarity between connected cities is calculated based on the statistical characteristics of the cities, and the distance between the connected cities is obtained. The weights of the edges of the connected cities are determined based on the similarity between the connected cities and the distance between the connected cities, and a city graph network is obtained.

[0163] As mentioned above, the vector representation of the target city is used to reflect the user intention factor. Therefore, when generating the city graph network as the basis for obtaining the vector representation of the target city, the user intention factor must also be considered. Specifically:

[0164] When generating the city map network, firstly, city identification information is set for the city, such as the city ID mentioned above, the preset attributes of the city are determined, and the statistical features of the city that can reflect the user intention factors are obtained, wherein the preset attributes of the city refer to the importance of the city, and the importance of the city can be preset according to the needs of the actual application. For example, municipalities, provincial capitals, first-tier cities or certain designated cities can be regarded as important cities, and other cities as unimportant cities; the statistical features include preset object statistical features and preset behavior statistical features, wherein the preset objects and preset behaviors can also be set according to the needs of the actual application, for example, the preset objects can be set to merchants, stores, etc. in the city, and the preset behaviors can be set to consumption behaviors in the city, etc. When the object is a city merchant, the preset object statistical features may include one or more of the following features: merchant brand distribution features, merchant category distribution features, commodity category distribution features, etc. The preset object statistical features can reflect the merchant characteristics of the city and can be obtained based on the merchant information data registered by the merchant on the Internet platform; when the preset behavior is a city consumption behavior, the preset behavior statistical features may include one or more of the following features: search / click / purchase merchant brand distribution features, search / click / purchase merchant category distribution features, search / click / purchase commodity category distribution features, etc. The preset behavior statistical features can reflect the behavior characteristics of the user group in the city and can be obtained based on the user search and click log data of the Internet platform. The statistical features of the city can be shown in the following table:

[0165]

[0166] Then, taking the city as a node, the connection relationship between the city nodes is determined according to the preset attributes of the city, and the edge connecting two city nodes in the city graph network is obtained. When determining the connection relationship between the city nodes, it can also be determined according to the preset node connection rules. For example, the node connection rules can be set to connect important cities to each other, connect non-important cities to up to 3 important cities within a preset geographical range, and so on.

[0167] Finally, the similarity between connected cities is calculated based on the statistical characteristics of the cities, and the distance between connected cities is obtained. The weights of the edges of connected cities are determined based on the similarity between connected cities and the distance between connected cities, and a city graph network is obtained. Figure 2 A schematic diagram of a city graph network according to an embodiment of the present disclosure is shown as follows: Figure 2 As shown in the figure, different circles represent different city nodes, 1, 2, 3, and 4 are the identification information of different cities, and w 12 、w 13 、w 14 、w 23 、w 24 、w 34 They represent the weights of the edges connecting the cities.

[0168] In one embodiment of the present disclosure, the part of calculating the similarity between connected cities based on the statistical characteristics of the cities may be configured as follows:

[0169] Synthesize the statistical characteristics of the city to obtain the synthetic statistical characteristics of the city;

[0170] Normalizing the synthetic statistical features to obtain normalized synthetic statistical features of the city;

[0171] The distances between the normalized synthetic statistical features are calculated to obtain the similarities between the connected cities.

[0172] When calculating the similarity between connected cities, the statistical features of the cities are first synthesized to obtain the synthetic statistical features of the cities. For example, the preset object statistical features and preset behavior statistical features mentioned above can be spliced ​​to obtain the synthetic statistical features of the cities. Then the synthetic statistical features are normalized to obtain the normalized synthetic statistical features of the cities. Finally, the distance between the normalized synthetic statistical features of the connected cities is calculated to obtain the similarity between the connected cities, wherein the distance can be either a cosine distance or a Euclidean distance.

[0173] In one embodiment of the present disclosure, the part of determining the weight of the edge of the connected cities according to the similarity between the connected cities and the distance between the connected cities can be configured as follows:

[0174] Determine the initial weight value of the edge connecting the cities according to the similarity between the connected cities;

[0175] The attenuation ratio is determined based on the preset attenuation rule according to the distance between the connected cities, and the weight of the edge of the connected cities is obtained by multiplying the initial weight value by the attenuation ratio.

[0176] In this embodiment, considering that the greater the similarity between two cities, the stronger the association between the two cities, and the easier it is to move when using DeepWalk for random walk, the weight of the edge of the connected city should be greater. Therefore, when determining the weight of the edge of the connected city, the initial value of the weight of the edge of the connected city is first determined based on the similarity between the connected cities calculated previously, for example, the similarity can be directly used as the initial value of the weight of the edge of the corresponding connected city. Considering that the farther the distance between two cities, the weaker the association between the two cities, the attenuation ratio can be determined based on the preset attenuation rule according to the distance between the connected cities, and then the initial weight value can be multiplied by the attenuation ratio to obtain the weight of the edge of the connected city, so that the weight of the edge of the two cities is attenuated according to the distance between the two cities, wherein the preset attenuation rule can be attenuated according to a preset ratio, or can be attenuated logarithmically or in other ways.

[0177] In one embodiment of the present disclosure, the identification module 303 may be configured as follows:

[0178] Combining the first vector representation and the second vector representation to obtain a composite vector representation;

[0179] The synthesized vector representation is input into a pre-trained intent recognition model to obtain an intent recognition result based on the input information.

[0180] In this implementation, the first vector representation and the second vector representation are first synthesized to obtain a synthesized vector representation. For example, the first vector representation and the second vector representation may be concatenated to obtain the synthesized vector representation. The synthesized vector representation is then input into a pre-trained intent recognition model to obtain an intent recognition result based on the input information.

[0181] In one embodiment of the present disclosure, the device may further include:

[0182] A training module is configured to train the intent recognition model.

[0183] Wherein, the training module can be configured as:

[0184] Determine the initial model for intent recognition;

[0185] Acquire a training data set, wherein the training data set includes a first training vector representation of training query data, a second training vector representation of a training city corresponding to training city identification information obtained based on a city graph network, and an intent recognition result;

[0186] The synthetic training vector representation of the first training vector representation and the second training vector representation is used as training input data, and the intention recognition result is used as training output data to train the intention recognition initial model to obtain the intention recognition model.

[0187] In this embodiment, when training the intention recognition model, the initial intention recognition model is first determined, wherein the initial intention recognition model can be selected as a model with classification capabilities, such as a classification neural network model, etc. Then a training data set is obtained, wherein the training data set includes a first training vector representation of the training query data, a second training vector representation of the training city corresponding to the training city identification information obtained based on the city map network, and an intention recognition result, wherein the first training vector representation can be obtained based on the same acquisition method as the first vector representation, and the second training vector representation can also be obtained based on the same acquisition method as the second vector representation, and the intention recognition result is the intention recognition result corresponding to the training query data and the training city identification information, for example, the intention recognition result can be a merchant brand intention, a merchant address intention, and a commodity category intention, etc. Finally, the synthetic training vector representation of the first training vector representation and the second training vector representation is used as the training input data, and the intention recognition result is used as the training output data to train the initial intention recognition model, so as to obtain the intention recognition model. During the training process, the data elements of the second training vector representation can be adjusted and updated in real time according to the training results.

[0188] In an embodiment of the present disclosure, after obtaining the intention recognition result of the input information, a preset operation may be performed according to the intention recognition result of the input information, for example, the display order of the information search results obtained according to the input information may be adjusted according to the intention recognition result of the input information, that is, in this embodiment, the device may further include:

[0189] A search module is configured to search according to the input information to obtain search results, wherein the search results include target information related to the input information, for example, if the input information is "green tea", the search results may include "green tea restaurant" and "green tea beverage";

[0190] The adjustment module is configured to adjust the display order of the search results according to the intention recognition result of the input information. If there is no step to adjust the display order, the search results can be displayed in a random manner. For example, in the search result list, "Green Tea Restaurant" can be displayed first and then "Green Tea Beverage", or "Green Tea Beverage" can be displayed first and then "Green Tea Restaurant". However, if the display order of the search results is adjusted according to the intention recognition result of the input information, the search results can be displayed with full consideration of the user's intention. For example, when the user is in Shanghai, "Green Tea Restaurant" will be displayed first and then "Green Tea Beverage" in the search result list. When the user is in a county town, "Green Tea Beverage" will be displayed first and then "Green Tea Restaurant" in the search result list. This allows the user's intention to be accurately identified to obtain more accurate information search results that are more in line with user needs and intentions, thereby improving the service quality of the Internet platform.

[0191] The present disclosure also discloses an electronic device, Figure 4 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown. Figure 4 As shown, the electronic device 400 includes a memory 401 and a processor 402; wherein,

[0192] The memory 401 is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor 402 to implement the above method steps.

[0193] Figure 5 It is a structural diagram of a computer system suitable for implementing an intent recognition method according to an embodiment of the present disclosure.

[0194] like Figure 5 As shown, the computer system 500 includes a processing unit 501, which can perform various processes in the above-mentioned embodiments according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The processing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0195] The following components are connected to the I / O interface 505: an input part 506 including a keyboard, a mouse, etc.; an output part 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage part 508 including a hard disk, etc.; and a communication part 509 including a network interface card such as a LAN card, a modem, etc. The communication part 509 performs communication processing via a network such as the Internet. The drive 510 is also connected to the I / O interface 505 as needed. Removable media 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., are installed on the drive 510 as needed, so that the computer program read therefrom is installed into the storage part 508 as needed. Among them, the processing unit 501 can be implemented as a processing unit such as a CPU, a GPU, a TPU, an FPGA, an NPU, etc.

[0196] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the road map or block diagram can represent a part of a module, program segment or code, and the part of the module, program segment or code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a different order from the order marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0197] The units or modules involved in the embodiments described in the present disclosure may be implemented by software or hardware. The units or modules described may also be set in a processor, and the names of these units or modules do not constitute limitations on the units or modules themselves in some cases.

[0198] As another aspect, the present disclosure further provides a computer-readable storage medium, which may be a computer-readable storage medium included in the device described in the above embodiment; or a computer-readable storage medium that exists independently and is not assembled into the device. The computer-readable storage medium stores one or more programs, and the programs are used by one or more processors to execute the method described in the present disclosure.

[0199] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present disclosure is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other.

Claims

1. An intention recognition method, comprising: Acquiring input information, wherein the input information includes query data and target city identification information; Obtaining a first vector representation of the query data, and obtaining a second vector representation of the target city according to the target city identification information, including: taking the city as a node, determining the connection relationship between the city nodes according to the preset attributes of the city, and obtaining the edge connecting two city nodes in the city graph network; calculating the similarity between the connected cities according to the statistical characteristics of the city, and obtaining the distance between the connected cities, determining the weight of the edge of the connected cities according to the similarity between the connected cities and the distance between the connected cities, and obtaining the city graph network, wherein the statistical characteristics of the city include characteristics that can reflect the characteristics of the merchants in the city or characteristics that can reflect the behavioral characteristics of the user group in the city; based on the city graph network, obtaining the embedded vector representation of each city node; querying the embedded vector representation of the corresponding city node according to the target city identification information, and obtaining the second vector representation of the target city; The first vector representation and the second vector representation are input into a pre-trained intent recognition model to obtain an intent recognition result based on the input information, wherein the intent recognition result is at least one of merchant brand intent, merchant address intent and product category intent.

2. According to the method of claim 1, the step of obtaining a second vector representation of the target city according to the target city identification information comprises: Obtain a city graph network, wherein the city graph network includes one or more nodes representing cities, and edges connecting different city nodes, each city is correspondingly provided with a city identification information, and each edge is correspondingly provided with an edge weight; Based on the city graph network, obtaining an embedded vector representation of each city node; The embedded vector representation of the corresponding city node is queried according to the target city identification information to obtain a second vector representation of the target city.

3. According to the method of claim 2, the step of obtaining an embedded vector representation of each city node based on the city graph network is implemented as follows: Based on the city graph network, the embedded vector representation of each city node is calculated using the DeepWalk method, where: The DeepWalk method determines the walking probability of an edge in a city graph network based on the weight of the edge.

4. The method according to claim 1, wherein the step of obtaining a second vector representation of the target city according to the target city identification information further comprises: City identification information is set for the city, preset attributes of the city are determined, and statistical features of the city are obtained, wherein the statistical features include preset object statistical features and preset behavior statistical features.

5. According to the method of claim 1, the step of calculating the similarity between connected cities based on the statistical characteristics of the cities comprises: Synthesize the statistical characteristics of the city to obtain the synthetic statistical characteristics of the city; Normalizing the synthetic statistical features to obtain normalized synthetic statistical features of the city; The distances between the normalized synthetic statistical features are calculated to obtain the similarities between the connected cities.

6. The method according to claim 5, wherein the step of determining the weight of the edge of the connected cities according to the similarity between the connected cities and the distance between the connected cities comprises: Determine the initial weight value of the edge connecting the cities according to the similarity between the connected cities; The attenuation ratio is determined based on the preset attenuation rule according to the distance between the connected cities, and the weight of the edge of the connected cities is obtained by multiplying the initial weight value by the attenuation ratio.

7. According to any one of the methods of claim 1-6, inputting the first vector representation and the second vector representation into a pre-trained intent recognition model to obtain an intent recognition result based on the input information comprises: Combining the first vector representation and the second vector representation to obtain a composite vector representation; The synthesized vector representation is input into a pre-trained intent recognition model to obtain an intent recognition result based on the input information.

8. The method according to any one of claims 1 to 6, further comprising: The intent recognition model is trained.

9. The method according to claim 8, wherein the training of the intent recognition model comprises: Determine the initial model for intent recognition; Acquire a training data set, wherein the training data set includes a first training vector representation of training query data, a second training vector representation of a training city corresponding to training city identification information obtained based on a city graph network, and an intent recognition result; The synthetic training vector representation of the first training vector representation and the second training vector representation is used as training input data, and the intention recognition result is used as training output data to train the intention recognition initial model to obtain the intention recognition model.

10. An intention recognition device, comprising: A first acquisition module is configured to acquire input information, wherein the input information includes query data and target city identification information; The second acquisition module is configured to acquire the first vector representation of the query data, and acquire the second vector representation of the target city according to the target city identification information, including: taking the city as a node, determining the connection relationship between the city nodes according to the preset attributes of the city, and obtaining the edge connecting two city nodes in the city graph network; calculating the similarity between the connected cities according to the statistical characteristics of the city, and acquiring the distance between the connected cities, determining the weight of the edge of the connected cities according to the similarity between the connected cities and the distance between the connected cities, and obtaining the city graph network, wherein the statistical characteristics of the city include characteristics that can reflect the characteristics of the merchants in the city or characteristics that can reflect the behavioral characteristics of the user groups in the city; based on the city graph network, acquiring the embedded vector representation of each city node; querying the embedded vector representation of the corresponding city node according to the target city identification information to obtain the second vector representation of the target city; The recognition module is configured to input the first vector representation and the second vector representation into a pre-trained intent recognition model to obtain an intent recognition result based on the input information, and the intent recognition result is at least one of merchant brand intent, merchant address intent and product category intent.

11. An electronic device comprising a memory and at least one processor; wherein: The memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the at least one processor to implement the method steps described in any one of claims 1-9.

12. A computer-readable storage medium having computer instructions stored thereon, wherein the computer instructions, when executed by a processor, implement the method steps described in any one of claims 1 to 9.

13. A computer program product comprising a computer program / instructions, wherein: When the computer program / instructions are executed by a processor, the method steps described in any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Commodity information display method, device and equipment and storage medium

    CN112069404A

  • Geographic position point searching method and device, equipment and storage medium

    CN112328890A