CN110717109B - Method, device, electronic equipment and storage medium for recommending data - Google Patents

Method, device, electronic equipment and storage medium for recommending data Download PDF

Info

Publication number
CN110717109B
CN110717109B CN201910942833.2A CN201910942833A CN110717109B CN 110717109 B CN110717109 B CN 110717109B CN 201910942833 A CN201910942833 A CN 201910942833A CN 110717109 B CN110717109 B CN 110717109B
Authority
CN
China
Prior art keywords
virtual
semantic scene
expressions
expression
scene information
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
Application number
CN201910942833.2A
Other languages
Chinese (zh)
Other versions
CN110717109A (en
Inventor
郭劭泽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN201910942833.2A priority Critical patent/CN110717109B/en
Publication of CN110717109A publication Critical patent/CN110717109A/en
Application granted granted Critical
Publication of CN110717109B publication Critical patent/CN110717109B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9536Search customisation based on social or collaborative filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/01Social networking

Abstract

The embodiment of the disclosure provides a method, a device, electronic equipment and a storage medium for recommending data, and relates to the technical field of computers, wherein the method comprises the following steps: the chat content currently input in the input box and the chat records of the preset number of the input strips before the chat content are acquired. And carrying out semantic analysis on the chat content and the chat record, and determining first semantic scene information corresponding to the chat content. According to the first semantic scene information, determining a preset number of virtual expressions with the use probability higher than a preset probability in a first semantic scene corresponding to the first semantic scene information, and taking the preset number of virtual expressions as virtual expressions to be recommended. Because the chat content and the chat record can more accurately express the current semantic scene than one word or one word, the electronic equipment can determine the virtual expression accurately conforming to the current semantic scene through the chat content and the chat record and serve as the expression to be recommended. So that the recommendation of the virtual expression is more accurate.

Description

Method, device, electronic equipment and storage medium for recommending data
Technical Field
The disclosure relates to the field of computer technology, and in particular relates to a method, a device, electronic equipment and a storage medium for recommending data.
Background
Currently, users often use "virtual expressions" to express their own ideas when interacting with most social software platforms. Wherein, the virtual expression can appear on the social software platform in the form of an image and the like.
When a user inputs the social software platform, if the user prestores a virtual expression in the social software platform and the first word or word input in the input box has the prestored virtual expression matched with the first word or word, the user can see the virtual expression recommended by the social software platform above the input box.
A word or a word often cannot accurately reflect the semantics that the user needs to express, and therefore, the virtual expression recommended by a word or a word is not accurate enough.
Disclosure of Invention
The embodiment of the disclosure aims to provide a method, a device, electronic equipment and a storage medium for recommending data, so as to improve accuracy of recommending virtual expressions by the electronic equipment. The specific technical scheme is as follows:
according to a first aspect of embodiments of the present disclosure, there is provided a method of recommending data, the method being applied to an electronic device, the method comprising:
acquiring chat content currently input in an input box and chat records of a preset number of input strips before the chat content;
Carrying out semantic analysis on the chat content and the chat record, and determining first semantic scene information corresponding to the chat content;
according to the first semantic scene information, determining a preset number of virtual expressions with the use probability higher than a preset probability in a first semantic scene corresponding to the first semantic scene information, and taking the preset number of virtual expressions as virtual expressions to be recommended.
Optionally, the determining, according to the first semantic scene information, that the probability of use in the first semantic scene corresponding to the first semantic scene information is higher than a preset probability by a preset number of virtual expressions, and taking the preset number of virtual expressions as the virtual expressions to be recommended includes:
determining each first virtual expression corresponding to the first semantic scene information and the use probability corresponding to each first virtual expression corresponding to the first semantic scene information according to the corresponding relation among the semantic scene information, the virtual expressions and the use probabilities corresponding to the virtual expressions;
and selecting a preset number of virtual expressions with the use probability higher than a preset probability from the first virtual expressions corresponding to the first semantic scene information according to the use probability corresponding to the first virtual expressions corresponding to the first semantic scene information, and taking the preset number of virtual expressions as virtual expressions to be recommended.
Optionally, the determining, according to the first semantic scene information, a preset number of virtual expressions with a probability higher than a preset probability in a first semantic scene corresponding to the first semantic scene information, and taking the preset number of virtual expressions as the virtual expressions to be recommended includes:
determining a virtual expression sequence corresponding to the first semantic scene information according to the corresponding relation between the semantic scene information and the virtual expression sequence, wherein the virtual expression sequence comprises a plurality of virtual expressions arranged according to the order of the using probability;
and selecting a preset number of virtual expressions with the use probability higher than a preset probability from the virtual expression sequences corresponding to the first semantic scene information, and taking the preset number of virtual expressions as virtual expressions to be recommended.
Optionally, before the step of obtaining the chat content currently input in the input box and the chat record of the preset number of pieces input before the chat content, the method further includes:
acquiring historical use data and context information of a target virtual expression from expression use records in a preset time period, wherein the target virtual expression is any virtual expression in the expression use records;
Carrying out semantic analysis on the context information, and determining target semantic scene information corresponding to the target virtual expression;
inputting the historical use data and the target semantic scene information into a probability prediction model, and obtaining the use probability of the target virtual expression output by the probability prediction model in a target semantic scene represented by the target semantic scene information;
and establishing a corresponding relation among the target virtual expression, the target semantic scene information and the use probability.
Optionally, after the step of establishing the correspondence between the target virtual expression, the target semantic scene information, and the usage probability, the method further includes:
aiming at a target semantic scene, determining the use probability of each virtual expression corresponding to the target semantic scene in each semantic scene;
and sequencing the virtual expressions corresponding to the target semantic scene according to the use probability of the virtual expressions in the target semantic scene to obtain a virtual expression sequence corresponding to the target semantic scene.
Optionally, after the preset number of virtual expressions are taken as the virtual expressions to be recommended, the method further includes:
And determining the recommendation priority of the preset number of virtual expressions to be recommended according to the use probabilities corresponding to the preset number of virtual expressions to be recommended.
According to a second aspect of embodiments of the present disclosure, there is provided an apparatus for recommending data, the apparatus being applied to an electronic device, the apparatus comprising:
an acquisition unit configured to perform acquisition of chat content currently input in an input box and chat records of a preset number of pieces that have been input before the chat content;
an analysis unit configured to perform semantic analysis on the chat content and the chat record, and determine first semantic scene information corresponding to the chat content;
the determining unit is configured to determine, according to the first semantic scene information, a preset number of virtual expressions with a probability higher than a preset probability to be used in a first semantic scene corresponding to the first semantic scene information, and take the preset number of virtual expressions as virtual expressions to be recommended.
Optionally, the determining unit is specifically configured to:
determining each first virtual expression corresponding to the first semantic scene information and the use probability corresponding to each first virtual expression corresponding to the first semantic scene information according to the corresponding relation among the semantic scene information, the virtual expressions and the use probabilities corresponding to the virtual expressions;
And selecting a preset number of virtual expressions with the use probability higher than a preset probability from the first virtual expressions corresponding to the first semantic scene information according to the use probability corresponding to the first virtual expressions corresponding to the first semantic scene information, and taking the preset number of virtual expressions as virtual expressions to be recommended.
Optionally, the determining unit is specifically configured to:
determining a virtual expression sequence corresponding to the first semantic scene information according to the corresponding relation between the semantic scene information and the virtual expression sequence, wherein the virtual expression sequence comprises a plurality of virtual expressions arranged according to the order of the using probability;
and selecting a preset number of virtual expressions with the use probability higher than a preset probability from the virtual expression sequences corresponding to the first semantic scene information, and taking the preset number of virtual expressions as virtual expressions to be recommended.
Optionally, the apparatus further includes: a building unit;
the acquiring unit is further configured to acquire historical use data and context information of a target virtual expression from expression use records within a preset time period, wherein the target virtual expression is any virtual expression in the expression use records;
The analysis unit is further configured to perform semantic analysis on the context information and determine target semantic scene information corresponding to the target virtual expression;
the obtaining unit is further configured to perform inputting the historical usage data and the target semantic scene information into a probability prediction model, and obtain a usage probability of the target virtual expression output by the probability prediction model in a target semantic scene represented by the target semantic scene information;
the establishing unit is configured to perform establishing a correspondence relationship among the target virtual expression, the target semantic scene information, and the use probability.
Optionally, the apparatus further includes: a sorting unit;
the determining unit is further configured to determine, for a target semantic scene, a use probability of each virtual expression corresponding to the target semantic scene in each semantic scene;
the sorting unit is configured to sort the virtual expressions corresponding to the target semantic scene according to the probability of using the virtual expressions in the target semantic scene, so as to obtain a virtual expression sequence corresponding to the target semantic scene.
Alternatively to this, the method may comprise,
the determining unit is further configured to determine recommendation priorities of the preset number of virtual expressions to be recommended according to the use probabilities corresponding to the preset number of virtual expressions to be recommended.
According to a third aspect of embodiments of the present disclosure, there is provided an electronic device including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and a processor, configured to implement the method steps described in the first aspect when executing the program stored in the memory.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer readable storage medium having stored therein a computer program which, when executed by a processor, implements the method steps of the first aspect.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of the first aspect described above.
According to the method, the device, the electronic equipment and the storage medium for recommending the data, the electronic equipment can acquire chat content currently input in an input box and a preset number of chat records input before the chat content, then conduct semantic analysis on the chat content and the chat records, determine first semantic scene information corresponding to the chat content, and determine a preset number of virtual expressions with probability higher than preset probability to be used in a first semantic scene corresponding to the first semantic scene information according to the first semantic scene information, wherein the preset number of virtual expressions are used as virtual expressions to be recommended. Because the chat content and the chat record can more accurately express the current semantic scene than one word or one word, the electronic equipment can determine the virtual expression accurately conforming to the current semantic scene through the chat content and the chat record and serve as the expression to be recommended. So that the recommendation of the virtual expression is more accurate.
Of course, not all of the above-described advantages need be achieved simultaneously in practicing any one of the products or methods of the present disclosure.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and other drawings may be obtained according to these drawings without inventive effort to a person of ordinary skill in the art.
FIG. 1 is a flowchart of a method for recommending data according to an embodiment of the present disclosure;
FIG. 2 is a flowchart of a method for recommending data according to an embodiment of the present disclosure;
FIG. 3 is a flow chart of a related art method provided in an embodiment of the present disclosure;
FIG. 4 is a flowchart of a method for recommending data according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an apparatus for recommending data according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
The embodiment of the disclosure provides a method for recommending data, which is applied to electronic equipment, wherein a virtual expression is a message form used for expressing ideas when a user performs social interaction with other users through a software platform, and semantic scene information is semantics expressed by messages sent by the user. The electronic device may be a terminal or a server.
The method for recommending data provided in the embodiment of the present disclosure will be described in detail with reference to the specific implementation, as shown in fig. 1, and the specific steps are as follows:
Step 101, obtaining chat content currently input in an input box and chat records of a preset number of input strips before the chat content.
Chat content is content in an input box, the chat content is usually text, and a chat record can include: at least one of text information, picture information, audio information, and video information.
The preset number may be any number, and the embodiments of the present disclosure are not limited thereto.
For example, the electronic device may obtain a text entered in the input box of the client and obtain the most recent 5 chat logs.
Optionally, before acquiring the chat content input by the input box and the last preset number of the input chat records in the client, the software platform may send an authorization request, and if the user accepts the authorization request, the electronic device may have permission to acquire the chat content and the chat records.
For example, the electronic device may display an authorization query interface in a display interface of the software platform when the user first opens the software platform, or first uses an input function of the software platform. The authorization interface may include prompt information of the content information to be authorized, an option of confirming authorization, and an option of rejecting authorization.
If the user selects the confirm authorization option, the electronic device may obtain the content information to be authorized, which in the embodiment of the present disclosure may be chat content and chat records.
Step 102, carrying out semantic analysis on the chat content and the chat record, and determining first semantic scene information corresponding to the chat content.
The classification of semantic context information may include: for each category, there may be several sub-categories corresponding to each category, such as happy, sad, hard, painful, depressed, embarrassing, anger, and overwhelming. For example, the open-heart classification may include: general, very and extremely open, and the like, the difficult classifications may include: qi, loss of the original, heart injury and pain and the like. The embodiment of the disclosure does not limit the classification mode of the specific semantic scene information.
The semantic scene information is a scene corresponding to the semantics obtained by the electronic equipment through semantic analysis. Because the chat content and the chat record may reflect the current first semantic scene, the electronic device may determine, according to the first semantic scene information, a virtual expression to be recommended in the first semantic scene.
In the embodiment of the disclosure, the electronic device may input the chat content and the chat record into the semantic scene prediction model, and identify semantic scene information corresponding to the above information.
If the semantic scene prediction result output by the scene prediction model is happy, the semantics expressed by the chat content are happy.
Step 103, determining a preset number of virtual expressions with the use probability higher than a preset probability in a first semantic scene corresponding to the first semantic scene information according to the first semantic scene information, and taking the preset number of virtual expressions as virtual expressions to be recommended.
Optionally, after determining the virtual expression to be recommended, the electronic device may determine a recommendation priority of the virtual expression to be recommended. The recommending priority is used for displaying the virtual expressions to be recommended according to the recommending priority after the recommended end receives the virtual expressions to be recommended.
The electronic device may rank the recommendation priority according to the use probability of the virtual expression to be recommended, or rank the recommendation priority according to historical use data of the virtual expression to be recommended. The embodiments of the present disclosure are not limited.
For example, the virtual expressions to be recommended include: the display order determined by the electronic device is B, A, E, D, C for the virtual expressions A, B, C, D and E, and the recommended end may recommend the virtual expressions A, B, C, D and E to be recommended according to the order of B, A, E, D, C.
According to the method for recommending data, the electronic device can acquire chat content currently input in the input box and the chat records of the preset number of pieces input before the chat content, then conduct semantic analysis on the chat content and the chat records, determine first semantic scene information corresponding to the chat content, and according to the first semantic scene information, determine the preset number of virtual expressions with the use probability higher than the preset probability in the first semantic scene corresponding to the first semantic scene information, and take the preset number of virtual expressions as virtual expressions to be recommended. Because the chat content and the chat record can more accurately express the current semantic scene than one word or one word, the electronic equipment can determine the virtual expression accurately conforming to the current semantic scene through the chat content and the chat record and serve as the expression to be recommended. So that the recommendation of the virtual expression is more accurate.
Optionally, in an embodiment, in order to determine a preset number of virtual expressions with a use probability higher than a preset probability in the first semantic scene, a correspondence relationship between the use probabilities of the semantic scene information, the virtual expressions and the virtual expressions may be established in advance, so before the method flow shown in fig. 1, as shown in fig. 2, the electronic device may establish a correspondence relationship between the use probabilities of the semantic scene information, the virtual expressions and the virtual expressions, and specifically includes the following steps:
Step 201, obtaining historical usage data and context information of a target virtual expression from expression usage records within a preset time period.
The target virtual expression is any virtual expression in the expression use record.
The expression usage record may be a virtual expression and message that is stored in the software platform and that has been entered by the user, such as for chat tools, the expression usage record may be a chat record for the user. For another example, for video software, the expression usage record may be a message record for video.
The historical usage data of the target virtual expression may include: the usage amount of the target virtual expression and the collection amount of the target virtual expression.
The usage amount of the target virtual expression represents the total number of times that the target virtual expression is used by all users of the software platform in a preset time period. The collection amount of the target virtual expression represents the total collection times of the target virtual expression by all users of the software platform in a preset time period. Therefore, the historical use data of the target virtual expression can reflect the quality of the target virtual expression.
For example, the preset time period may be: the last week, last month, or last half year, embodiments of the present disclosure are not limited. In the preset time period, the usage amount of the target virtual expression A is 28495 times, the collection amount of the target virtual expression A is 472 times, the usage amount of the target virtual expression B is 43873 times, the collection amount of the target virtual expression B is 1575 times, it is seen that the usage amount of the virtual expression B is larger than the usage amount of the virtual expression A, the collection amount of the virtual expression B is larger than the collection amount of the virtual expression A, and then the quality of the virtual expression B is higher than that of the virtual expression A.
The context information of the target virtual expression is a plurality of messages before and a plurality of messages after the target virtual expression in the expression use record (chat record or message record). The context information may include: at least one of text information, picture information, audio information and video information.
For example, after the electronic device acquires a target virtual expression, 5 chat messages before the target virtual expression and 4 chat messages after the target virtual expression in the chat record may be acquired. The number of chat messages is obtained by the electronic device, and embodiments of the present disclosure are not limited.
And 202, carrying out semantic analysis on the context information, and determining target semantic scene information corresponding to the target virtual expression.
In the embodiment of the disclosure, the electronic device may perform semantic analysis on the context information and obtain semantic scene information corresponding to the context information.
And 203, inputting the historical use data and the target semantic scene information into a probability prediction model, and obtaining the use probability of the target virtual expression output by the probability prediction model in the target semantic scene represented by the target semantic scene information.
The use probability represents the probability that the user uses the target virtual expression in the semantic scene, namely represents the degree to which the target virtual expression accords with the semantic scene.
And 204, establishing a corresponding relation among the target virtual expression, the target semantic scene information and the use probability.
Wherein in different semantic scenarios, the same virtual expression may exist. Thus, there may be multiple probabilities for each virtual expression to correspond to different semantic scenes.
For example, as shown in the following table one, which is a table showing the correspondence of virtual expressions 1 to 7 in a happy semantic scene:
list one
Virtual expression Semantic scene Probability of use
1 Open heart 6%
2 Open heart 35%
3 Open heart 67%
4 Open heart 93%
5 Open heart 2%
6 Open heart 46%
7 Open heart 80%
As can be seen from table one, the virtual expression with the highest probability is used as the virtual expression 4 in the happy semantic scene, so that the virtual expression most conforming to the happy semantic scene is the virtual expression 4.
Optionally, based on the correspondence established in step 204, step 103 determines, according to the first semantic scene information, a preset number of virtual expressions with highest probability of use in the first semantic scene corresponding to the first semantic scene information, and uses the preset number of virtual expressions as the virtual expressions to be recommended, which may be specifically implemented as:
the electronic equipment determines each first virtual expression corresponding to the first semantic scene information and the use probability corresponding to each first virtual expression corresponding to the first semantic scene information according to the corresponding relation among the semantic scene information, the virtual expressions and the use probabilities corresponding to the virtual expressions. And then, according to the use probabilities corresponding to the first virtual expressions corresponding to the first semantic scene information, selecting a preset number of virtual expressions with the use probabilities higher than the preset probability from the first virtual expressions corresponding to the first semantic scene information, and taking the preset number of virtual expressions as the virtual expressions to be recommended.
For example, as shown in table one, if the electronic device determines that the current semantic scene is a happy semantic scene, the electronic device may select 3 virtual expressions with a use probability greater than 60% from the virtual expressions 1-7 corresponding to the happy semantic scene, as virtual expressions to be recommended, that is, the virtual expressions to be recommended are virtual expressions 4, 7 and 3.
In another embodiment, after the electronic device establishes the corresponding relation among the target virtual expression, the target semantic scene information and the use probability, the use probability of each virtual expression corresponding to the target semantic scene in each semantic scene can be determined according to the target semantic scene, and each virtual expression corresponding to the target semantic scene is ordered according to the use probability of each virtual expression in the target semantic scene, so as to obtain a virtual expression sequence corresponding to the target semantic scene.
For example, according to the above description of the first table, the second table is a virtual expression sequence a corresponding to a happy semantic scene as shown in the following table.
Watch II
As can be seen from the second table, under the happy semantic scene, the virtual expressions 1-7 have different use probabilities, so the electronic device can sort the virtual expressions 1-7 from the large use probability to the small use probability according to the use probabilities of the virtual expressions 1-7, and obtain a virtual expression sequence a corresponding to the happy semantic scene: virtual expressions 4, 7, 3, 6, 2, 1, 5 and probabilities corresponding to virtual expressions 4, 7, 3, 6, 2, 1, and 5, respectively.
When the electronic device recommends virtual expressions to the user according to the chat content and the chat record, the electronic device can recommends a preset number of virtual expressions with the probability higher than the preset probability to the user according to the chat content and the chat record so as to be selected by the user.
Optionally, based on the virtual expression sequence corresponding to each semantic scene information, step 103 determines, according to the first semantic scene information, a preset number of virtual expressions with highest probability of use in the first semantic scene corresponding to the first semantic scene information, and uses the preset number of virtual expressions as the virtual expressions to be recommended, where the specific implementation may be:
the electronic device may determine a virtual expression sequence corresponding to the first semantic scene information according to a corresponding relationship between the semantic scene information and the virtual expression sequence, select a preset number of virtual expressions from the virtual expression sequence corresponding to the first semantic scene information, and use the preset number of virtual expressions as virtual expressions to be recommended.
For example, according to the contents in table two, the electronic device may recommend 3 virtual expressions with a probability greater than 60%, that is, virtual expressions 4, 7 and 3, in the virtual expression sequence a, to the user according to the open semantic scene information, so as to be selected by the user.
As shown in fig. 3 and 4, the disclosed embodiments provide two flowcharts in practical applications.
The semantic scene corresponding to the virtual expression a is the semantic scene a, and fig. 3 is a flowchart of the expression used by the user in the related art, and the specific steps are as follows:
step 301, uploading a virtual expression a by a user a.
Step 302, the user a sends the virtual expression a to the user B.
Step 303, user B receives virtual expression a.
Step 304, the user B collects the virtual expression A.
Step 305, when the user B encounters the semantic scene a, the user B searches for a suitable virtual expression (virtual expression a) from the virtual expression collection of the user B.
Step 306, the user B sends the virtual expression a.
Fig. 4 is a flowchart of a user using expressions in an embodiment of the disclosure, and specific steps are as follows:
step 401, uploading a virtual expression a by a user a.
Step 402, when the user B encounters the semantic scene a, the electronic device recommends a virtual expression (virtual expression a) corresponding to the semantic scene a according to the semantic scene a.
Step 403, the user B sends the virtual expression a.
It is obvious that, since the electronic device in the embodiment of the present disclosure performs the process of selecting the virtual expression instead of the user B, the process of using the expression by the user in the embodiment of the present disclosure in fig. 4 is significantly shorter than the process of using the expression by the user in fig. 3. Therefore, by adopting the embodiment of the disclosure, the user can accurately obtain the virtual expression conforming to the current semantic, and can also quickly obtain the virtual expression conforming to the current semantic, so that the time spent for searching the virtual expression is greatly saved.
Based on the same technical concept, the embodiment of the disclosure further provides an apparatus for recommending data, as shown in fig. 5, where the apparatus includes: an acquisition unit 501, an analysis unit 502, and a determination unit 503.
An acquisition unit 501 configured to perform acquisition of chat content currently input in an input box and chat records of a preset number of pieces that have been input before the chat content;
an analysis unit 502 configured to perform semantic analysis on the chat content and the chat record, and determine first semantic scene information corresponding to the chat content;
the determining unit 503 is configured to determine, according to the first semantic scene information, a preset number of virtual expressions with a probability higher than a preset probability to be used in a first semantic scene corresponding to the first semantic scene information, and take the preset number of virtual expressions as virtual expressions to be recommended.
Optionally, the determining unit 503 is specifically configured to:
determining each first virtual expression corresponding to the first semantic scene information and the use probability corresponding to each first virtual expression corresponding to the first semantic scene information according to the corresponding relation among the semantic scene information, the virtual expressions and the use probabilities of the virtual expressions;
according to the use probability corresponding to each first virtual expression corresponding to the first semantic scene information, selecting a preset number of virtual expressions with the use probability higher than the preset probability from each first virtual expression corresponding to the first semantic scene information, and taking the preset number of virtual expressions as virtual expressions to be recommended.
Optionally, the determining unit 503 is specifically configured to:
determining a virtual expression sequence corresponding to the first semantic scene information according to the corresponding relation between the semantic scene information and the virtual expression sequence, wherein the virtual expression sequence comprises a plurality of virtual expressions arranged according to the order of the using probability;
and selecting a preset number of virtual expressions with the use probability higher than the preset probability from the virtual expression sequences corresponding to the first semantic scene information, and taking the preset number of virtual expressions as virtual expressions to be recommended.
Optionally, the apparatus further comprises: a building unit;
the obtaining unit 501 is further configured to perform obtaining historical usage data and context information of a target virtual expression from expression usage records within a preset period of time, where the target virtual expression is any virtual expression in the expression usage records;
the analysis unit 502 is further configured to perform semantic analysis on the context information, and determine target semantic scene information corresponding to the target virtual expression;
the obtaining unit 501 is further configured to perform inputting the historical usage data and the target semantic scene information into the probability prediction model, and obtain a usage probability of the target virtual expression output by the probability prediction model in the target semantic scene represented by the target semantic scene information;
And the establishing unit is configured to perform the establishment of the corresponding relation among the target virtual expression, the target semantic scene information and the use probability.
Optionally, the apparatus further comprises: a sorting unit;
the determining unit 503 is further configured to determine, for the target semantic scene, a use probability of each virtual expression corresponding to the target semantic scene in each semantic scene;
the ordering unit is configured to perform ordering on the virtual expressions corresponding to the target semantic scene according to the probability of using the virtual expressions in the target semantic scene, so as to obtain a virtual expression sequence corresponding to the target semantic scene.
Alternatively to this, the method may comprise,
the determining unit 503 is further configured to determine a recommendation priority of the preset number of virtual expressions to be recommended according to the use probabilities corresponding to the preset number of virtual expressions to be recommended.
According to the data recommending device provided by the embodiment of the disclosure, the electronic device can acquire chat content currently input in the input box and chat records of a preset number of pieces input before the chat content, then perform semantic analysis on the chat content and the chat records, determine first semantic scene information corresponding to the chat content, determine a preset number of virtual expressions with use probability higher than the preset probability in a first semantic scene corresponding to the first semantic scene information according to the first semantic scene information, and take the preset number of virtual expressions as virtual expressions to be recommended. Because the chat content and the chat record can more accurately express the current semantic scene than one word or one word, the electronic equipment can determine the virtual expression accurately conforming to the current semantic scene through the chat content and the chat record and serve as the expression to be recommended. So that the recommendation of the virtual expression is more accurate.
The disclosed embodiment also provides an electronic device, as shown in fig. 6, comprising a processor 601, a communication interface 602, a memory 603 and a communication bus 604, wherein the processor 601, the communication interface 602, the memory 603 complete communication with each other through the communication bus 604,
a memory 603 for storing a computer program;
the processor 601 is configured to execute the program stored in the memory 603, and implement the following steps:
acquiring chat content currently input in an input box and chat records of a preset number of input strips before the chat content;
carrying out semantic analysis on the chat content and the chat record, and determining first semantic scene information corresponding to the chat content;
according to the first semantic scene information, determining a preset number of virtual expressions with the use probability higher than a preset probability in a first semantic scene corresponding to the first semantic scene information, and taking the preset number of virtual expressions as virtual expressions to be recommended.
It should be noted that, when the processor 601 is configured to execute the program stored in the memory 603, the processor is further configured to implement other steps described in the above method embodiment, and reference may be made to the related description in the above method embodiment, which is not repeated herein.
The communication bus mentioned by the network device may be a peripheral component interconnect standard (english: peripheral Component Interconnect, abbreviated: PCI) bus or an extended industry standard architecture (english: extended Industry Standard Architecture, abbreviated: EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the network device and other devices.
The Memory may include random access Memory (Random Access Memory, abbreviated as RAM) or nonvolatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; it may also be a digital signal processor (English: digital Signal Processing; DSP; for short), an application specific integrated circuit (English: application Specific Integrated Circuit; ASIC; for short), a Field programmable gate array (English: field-Programmable Gate Array; FPGA; for short), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components.
Based on the same technical idea, the embodiments of the present disclosure further provide a computer-readable storage medium, in which a computer program is stored, which when executed by a processor, implements the above-mentioned recommended data method steps.
Based on the same technical idea, the disclosed embodiments also provide a computer program product comprising instructions, which when run on a computer, cause the computer to perform the above-mentioned recommended data method steps.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present disclosure, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments in part.
The foregoing description is only of the preferred embodiments of the present disclosure, and is not intended to limit the scope of the present disclosure. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present disclosure are included in the protection scope of the present disclosure.

Claims (12)

1. A method of recommending data, the method comprising:
acquiring chat content currently input in an input box and chat records of a preset number of input strips before the chat content;
carrying out semantic analysis on the chat content and the chat record, and determining first semantic scene information corresponding to the chat content;
according to the first semantic scene information, determining a preset number of virtual expressions with the use probability higher than a preset probability in a first semantic scene corresponding to the first semantic scene information, and taking the preset number of virtual expressions as virtual expressions to be recommended;
before the step of obtaining the chat content currently input in the input box and the chat record of the preset number of pieces input before the chat content, the method further comprises:
acquiring historical use data and context information of a target virtual expression from expression use records in a preset time period, wherein the target virtual expression is any virtual expression in the expression use records;
Carrying out semantic analysis on the context information, and determining target semantic scene information corresponding to the target virtual expression;
inputting the historical use data and the target semantic scene information into a probability prediction model, and obtaining the use probability of the target virtual expression output by the probability prediction model in a target semantic scene represented by the target semantic scene information;
and establishing a corresponding relation among the target virtual expression, the target semantic scene information and the use probability.
2. The method of claim 1, wherein the determining, according to the first semantic scene information, a preset number of virtual expressions having a probability higher than a preset probability to be used in a first semantic scene corresponding to the first semantic scene information, and taking the preset number of virtual expressions as virtual expressions to be recommended includes:
determining each first virtual expression corresponding to the first semantic scene information and the use probability corresponding to each first virtual expression corresponding to the first semantic scene information according to the corresponding relation among the semantic scene information, the virtual expressions and the use probabilities corresponding to the virtual expressions;
and selecting a preset number of virtual expressions with the use probability higher than a preset probability from the first virtual expressions corresponding to the first semantic scene information according to the use probability corresponding to the first virtual expressions corresponding to the first semantic scene information, and taking the preset number of virtual expressions as virtual expressions to be recommended.
3. The method of claim 1, wherein the determining, according to the first semantic scene information, a preset number of virtual expressions having a probability higher than a preset probability to be used in a first semantic scene corresponding to the first semantic scene information, and taking the preset number of virtual expressions as virtual expressions to be recommended includes:
determining a virtual expression sequence corresponding to the first semantic scene information according to the corresponding relation between the semantic scene information and the virtual expression sequence, wherein the virtual expression sequence comprises a plurality of virtual expressions arranged according to the order of the using probability;
and selecting a preset number of virtual expressions with the use probability higher than a preset probability from the virtual expression sequences corresponding to the first semantic scene information, and taking the preset number of virtual expressions as virtual expressions to be recommended.
4. The method according to claim 1, wherein after the step of establishing a correspondence between the target virtual expression, the target semantic scene information, and the use probability, the method further comprises:
aiming at a target semantic scene, determining the use probability of each virtual expression corresponding to the target semantic scene in each semantic scene;
And sequencing the virtual expressions corresponding to the target semantic scene according to the use probability of the virtual expressions in the target semantic scene to obtain a virtual expression sequence corresponding to the target semantic scene.
5. The method of claim 1, wherein after the predetermined number of virtual expressions are treated as virtual expressions to be recommended, the method further comprises:
and determining the recommendation priority of the preset number of virtual expressions to be recommended according to the use probabilities corresponding to the preset number of virtual expressions to be recommended.
6. An apparatus for recommending data, the apparatus comprising:
an acquisition unit configured to perform acquisition of chat content currently input in an input box and chat records of a preset number of pieces that have been input before the chat content;
an analysis unit configured to perform semantic analysis on the chat content and the chat record, and determine first semantic scene information corresponding to the chat content;
a determining unit configured to perform determining, according to the first semantic scene information, a preset number of virtual expressions with a probability higher than a preset probability to be used in a first semantic scene corresponding to the first semantic scene information, and taking the preset number of virtual expressions as virtual expressions to be recommended;
Wherein the apparatus further comprises: a building unit;
the acquiring unit is further configured to acquire historical use data and context information of a target virtual expression from expression use records within a preset time period, wherein the target virtual expression is any virtual expression in the expression use records;
the analysis unit is further configured to perform semantic analysis on the context information and determine target semantic scene information corresponding to the target virtual expression;
the obtaining unit is further configured to perform inputting the historical usage data and the target semantic scene information into a probability prediction model, and obtain a usage probability of the target virtual expression output by the probability prediction model in a target semantic scene represented by the target semantic scene information;
the establishing unit is configured to perform establishing a correspondence relationship among the target virtual expression, the target semantic scene information, and the use probability.
7. The apparatus according to claim 6, wherein the determining unit is specifically configured to:
determining each first virtual expression corresponding to the first semantic scene information and the use probability corresponding to each first virtual expression corresponding to the first semantic scene information according to the corresponding relation among the semantic scene information, the virtual expressions and the use probabilities corresponding to the virtual expressions;
And selecting a preset number of virtual expressions with the use probability higher than a preset probability from the first virtual expressions corresponding to the first semantic scene information according to the use probability corresponding to the first virtual expressions corresponding to the first semantic scene information, and taking the preset number of virtual expressions as virtual expressions to be recommended.
8. The apparatus according to claim 6, wherein the determining unit is specifically configured to:
determining a virtual expression sequence corresponding to the first semantic scene information according to the corresponding relation between the semantic scene information and the virtual expression sequence, wherein the virtual expression sequence comprises a plurality of virtual expressions arranged according to the order of the using probability;
and selecting a preset number of virtual expressions with the use probability higher than a preset probability from the virtual expression sequences corresponding to the first semantic scene information, and taking the preset number of virtual expressions as virtual expressions to be recommended.
9. The apparatus of claim 6, wherein the apparatus further comprises: a sorting unit;
the determining unit is further configured to determine, for a target semantic scene, a use probability of each virtual expression corresponding to the target semantic scene in each semantic scene;
The sorting unit is configured to sort the virtual expressions corresponding to the target semantic scene according to the probability of using the virtual expressions in the target semantic scene, so as to obtain a virtual expression sequence corresponding to the target semantic scene.
10. The apparatus of claim 6, wherein the device comprises a plurality of sensors,
the determining unit is further configured to determine recommendation priorities of the preset number of virtual expressions to be recommended according to the use probabilities corresponding to the preset number of virtual expressions to be recommended.
11. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for carrying out the method steps of any one of claims 1-5 when executing a program stored on a memory.
12. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 1-5.
CN201910942833.2A 2019-09-30 2019-09-30 Method, device, electronic equipment and storage medium for recommending data Active CN110717109B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910942833.2A CN110717109B (en) 2019-09-30 2019-09-30 Method, device, electronic equipment and storage medium for recommending data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910942833.2A CN110717109B (en) 2019-09-30 2019-09-30 Method, device, electronic equipment and storage medium for recommending data

Publications (2)

Publication Number Publication Date
CN110717109A CN110717109A (en) 2020-01-21
CN110717109B true CN110717109B (en) 2024-03-15

Family

ID=69211285

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910942833.2A Active CN110717109B (en) 2019-09-30 2019-09-30 Method, device, electronic equipment and storage medium for recommending data

Country Status (1)

Country Link
CN (1) CN110717109B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112462992B (en) * 2020-11-30 2022-07-19 北京搜狗科技发展有限公司 Information processing method and device, electronic equipment and medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015185019A1 (en) * 2014-06-06 2015-12-10 北京搜狗科技发展有限公司 Semantic comprehension-based expression input method and apparatus
CN107423277A (en) * 2016-02-16 2017-12-01 中兴通讯股份有限公司 A kind of expression input method, device and terminal
CN107729320A (en) * 2017-10-19 2018-02-23 西北大学 A kind of emoticon based on Time-Series analysis user conversation emotion trend recommends method
CN108255316A (en) * 2018-01-23 2018-07-06 广东欧珀移动通信有限公司 Dynamic adjusts method, electronic device and the computer readable storage medium of emoticon
CN108701125A (en) * 2015-12-29 2018-10-23 Mz知识产权控股有限责任公司 System and method for suggesting emoticon
CN108733651A (en) * 2018-05-17 2018-11-02 新华网股份有限公司 Emoticon prediction technique and model building method, device, terminal
CN109977409A (en) * 2019-03-28 2019-07-05 北京科技大学 A kind of intelligent expression recommended method and system based on user's chat habit

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015185019A1 (en) * 2014-06-06 2015-12-10 北京搜狗科技发展有限公司 Semantic comprehension-based expression input method and apparatus
CN108701125A (en) * 2015-12-29 2018-10-23 Mz知识产权控股有限责任公司 System and method for suggesting emoticon
CN107423277A (en) * 2016-02-16 2017-12-01 中兴通讯股份有限公司 A kind of expression input method, device and terminal
CN107729320A (en) * 2017-10-19 2018-02-23 西北大学 A kind of emoticon based on Time-Series analysis user conversation emotion trend recommends method
CN108255316A (en) * 2018-01-23 2018-07-06 广东欧珀移动通信有限公司 Dynamic adjusts method, electronic device and the computer readable storage medium of emoticon
CN108733651A (en) * 2018-05-17 2018-11-02 新华网股份有限公司 Emoticon prediction technique and model building method, device, terminal
CN109977409A (en) * 2019-03-28 2019-07-05 北京科技大学 A kind of intelligent expression recommended method and system based on user's chat habit

Also Published As

Publication number Publication date
CN110717109A (en) 2020-01-21

Similar Documents

Publication Publication Date Title
CN108108821B (en) Model training method and device
CN110149540B (en) Recommendation processing method and device for multimedia resources, terminal and readable medium
CN108810642B (en) Bullet screen display method and device and electronic equipment
CN106649681B (en) Data processing method, device and equipment
CN109189990B (en) Search word generation method and device and electronic equipment
CN109040329B (en) Method for determining contact person label, terminal device and medium
CN109523237A (en) Crowdsourcing task method for pushing and relevant apparatus based on user preference
CN107240029B (en) Data processing method and device
CN109597874B (en) Information recommendation method, device and server
CN110597965B (en) Emotion polarity analysis method and device for article, electronic equipment and storage medium
CN113505272B (en) Control method and device based on behavior habit, electronic equipment and storage medium
CN110598109A (en) Information recommendation method, device, equipment and storage medium
US11470032B2 (en) Method for recommending groups and related electronic device
CN111767713A (en) Keyword extraction method and device, electronic equipment and storage medium
CN112669078A (en) Behavior prediction model training method, device, equipment and storage medium
CN107885875B (en) Synonymy transformation method and device for search words and server
CN111488434B (en) Recommendation method and device for input associative words, storage medium and electronic equipment
CN110717109B (en) Method, device, electronic equipment and storage medium for recommending data
CN112995765B (en) Network resource display method and device
CN112883275B (en) Live broadcast room recommendation method, device, server and medium
CN110674330B (en) Expression management method and device, electronic equipment and storage medium
JP5622880B2 (en) Item recommendation system, item recommendation method, and item recommendation program
CN113656575B (en) Training data generation method and device, electronic equipment and readable medium
CN110580317B (en) Social information analysis method and device, terminal equipment and storage medium
CN116415063A (en) Cloud service recommendation method and device

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