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

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

Info

Publication number
CN110717109A
CN110717109A CN201910942833.2A CN201910942833A CN110717109A CN 110717109 A CN110717109 A CN 110717109A CN 201910942833 A CN201910942833 A CN 201910942833A CN 110717109 A CN110717109 A CN 110717109A
Authority
CN
China
Prior art keywords
virtual
semantic scene
expressions
scene information
probability
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.)
Granted
Application number
CN201910942833.2A
Other languages
Chinese (zh)
Other versions
CN110717109B (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

Images

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/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/01Social networking

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Economics (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the disclosure provides a method and a device for recommending data, electronic equipment and a storage medium, and relates to the technical field of computers, wherein the method comprises the following steps: and acquiring the currently input chat content in the input box and a preset number of chat records which are input before the chat content. And performing semantic analysis on the chat content and the chat records, 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 probability higher than the 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. Because the chat content and the chat records can express the current semantic scene more accurately than one character or one word, the electronic equipment can determine the virtual expression which accurately accords with the current semantic scene through the chat content and the chat records and can be used as the expression to be recommended. So that the recommendation of the virtual expression is more accurate.

Description

Method and device for recommending data, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for recommending data, an electronic device, and a storage medium.
Background
Currently, users often use "virtual expressions" to express their own ideas when interacting on most social software platforms. The virtual expression can appear on the social software platform in the form of an image and the like.
When a user inputs an input on the social software platform, if the user prestores a virtual expression on the social software platform and the first word or word input in the input box has a 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 certain word or a word often cannot accurately reflect the semantics that a user needs to express, so that 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 and a device for recommending data, an electronic device and a storage medium, so as to improve the accuracy of recommending virtual expressions by the electronic device. The specific technical scheme is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a method for recommending data, the method being applied to an electronic device, the method including:
obtaining the chat content currently input in an input box and a preset number of chat records input before the chat content;
performing semantic analysis on the chat content and the chat records, 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 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 a preset number of virtual expressions with a probability of use higher than a preset probability are 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 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 a preset probability from each first virtual expression corresponding to the first semantic scene information, and taking the preset number of virtual expressions as the 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 using 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 which are arranged according to the order of the use probability;
and selecting a preset number of virtual expressions with the use probability higher than the preset probability from the virtual expression sequence corresponding to the first semantic scene information, and taking the preset number of virtual expressions as the virtual expressions to be recommended.
Optionally, before the step of acquiring the currently input chat content in the input box and the preset number of chat records that are 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;
performing 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 acquiring the use probability of the target virtual expression output by the probability prediction model under 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 used as virtual expressions to be recommended, the method further includes:
and determining the recommendation priority of the virtual expressions to be recommended in the preset number according to the use probability corresponding to the virtual expressions to be recommended in the preset number.
According to a second aspect of the embodiments of the present disclosure, there is provided an apparatus for recommending data, the apparatus being applied to an electronic device, the apparatus including:
an acquisition unit configured to perform acquisition of a chat content currently input in an input box and a preset number of chat records that have been input before the chat content;
the analysis unit is configured to perform semantic analysis on the chat content and the chat records 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 in a first semantic scene corresponding to the first semantic scene information, and use 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 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 a preset probability from each first virtual expression corresponding to the first semantic scene information, and taking the preset number of virtual expressions as the 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 which are arranged according to the order of the use probability;
and selecting a preset number of virtual expressions with the use probability higher than the preset probability from the virtual expression sequence corresponding to the first semantic scene information, and taking the preset number of virtual expressions as the virtual expressions to be recommended.
Optionally, the apparatus further comprises: a building unit;
the obtaining unit is further configured to obtain 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 one of 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 input 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 of a corresponding relationship among the target virtual expression, the target semantic scene information, and the usage probability.
Optionally, the apparatus further comprises: a sorting unit;
the determining unit is further configured to determine, for a target semantic scene, a usage probability of each virtual expression corresponding to the target semantic scene in each semantic scene;
the sequencing unit is configured to sequence the virtual expressions corresponding to the target semantic scene according to the use probability of 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 first and second parts may,
the determining unit is further configured to determine the recommendation priority of the preset number of virtual expressions to be recommended according to the usage probability corresponding to the preset number of virtual expressions to be recommended.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of 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, performs 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 containing 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 device and the storage medium for recommending data, the electronic device can acquire the currently input chat content in the input box and the input preset number of chat records 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 the preset number of virtual expressions with the 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 the virtual expressions to be recommended. Because the chat content and the chat records can more accurately express the current semantic scene than one character or one word, the electronic equipment can determine the virtual expression which accurately accords with the current semantic scene through the chat content and the chat records and can serve as the expression to be recommended. So that the recommendation of the virtual expression is more accurate.
Of course, not all advantages described above need to be achieved at the same time to practice any one product or method 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 used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative efforts.
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 disclosure;
FIG. 3 is a flow chart of a related art method provided by an embodiment of the present disclosure;
FIG. 4 is a flowchart of a method for recommending data according to an embodiment of the 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 present disclosure.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in 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 above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended 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 socializes with other users through a software platform, and semantic scene information is a semantic expressed by a message sent by the user. The electronic device may be a terminal or a server.
The following describes a method for recommending data according to an embodiment of the present disclosure in detail with reference to a specific implementation manner, as shown in fig. 1, the specific steps are as follows:
step 101, obtaining the currently input chat content in the input box and a preset number of chat records input before the chat content.
The chat content is the content in the input box, the chat content is usually text, and the chat log may include: at least one of text information, picture information, audio information, and video information.
The preset number may be any number, and the embodiment of the disclosure is not limited.
For example, the electronic device may obtain a text segment that has been entered in the input box of the client, and obtain the last 5 chat records.
Optionally, the software platform sends an authorization request before obtaining the chat content input in the input box of the client and the chat records input in the preset number recently, and if the user accepts the authorization request, the electronic device may have a right to obtain the chat content and the chat records.
For example, the electronic device may display the authorization query interface in the display interface of the software platform when the user first opens the software platform or first uses the input function of the software platform. The authorization interface can include prompt information of content information to be authorized, an authorization confirmation option and an authorization rejection option.
If the user selects the option of confirming authorization, the electronic device may obtain the content information to be authorized, which may be chat content and chat records in the embodiment of the present disclosure.
And 102, performing semantic analysis on the chat content and the chat records, and determining first semantic scene information corresponding to the chat content.
The classification of semantic context information may include: the classification method comprises the following steps of happiness, sadness, difficulty, pain, depression, embarrassment, anger, negligence and the like, and aiming at each classification, each classification can also have a plurality of sub-classifications corresponding to each classification. For example, a category of distraction may include: general, great, and extreme distraction, etc., and the difficult classifications may include: qi generation, loss of qi, heart injury and exhaustion of sadness. The embodiment of the present disclosure does not limit the specific classification manner of the semantic scene information.
The semantic scene information is a scene corresponding to semantics obtained by the electronic equipment through semantic analysis. Because the chat content and the chat record can reflect the current first semantic scene, the electronic device can determine the virtual expression to be recommended in the first semantic scene according to the first semantic scene information.
In the embodiment of the present disclosure, the electronic device may input the chat content and the chat record to the semantic scene prediction model, and identify semantic scene information corresponding to the information.
If the semantic scene prediction result output by the scene prediction model is happy, the semantic expressed by the chat content is happy.
Step 103, according to the first semantic scene information, determining a preset number of virtual expressions with the 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, after the electronic device determines the virtual expression to be recommended, the recommendation priority of the virtual expression to be recommended may be determined. The recommending priority is used for sequentially 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 equipment can arrange the recommendation priority according to the use probability of the virtual expression to be recommended, and can also arrange the recommendation priority according to historical use data of the virtual expression to be recommended. The disclosed embodiments are not limiting.
For example, the virtual expressions to be recommended include: the virtual expressions A, B, C, D and E, the display order determined by the electronic device is B, A, E, D, C, and the recommended end can 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 obtain the currently input chat content in the input box and the input preset number of chat records before the chat content, then perform semantic analysis on the chat content and the chat records, determine the first semantic scene information corresponding to the chat content, determine the preset number of virtual expressions with the probability higher than the preset probability in the 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 the virtual expressions to be recommended. Because the chat content and the chat records can more accurately express the current semantic scene than one character or one word, the electronic equipment can determine the virtual expression which accurately accords with the current semantic scene through the chat content and the chat records and can serve as the expression to be recommended. So that the recommendation of the virtual expression is more accurate.
Optionally, in an implementation manner, in order to determine a preset number of virtual expressions with usage probability higher than a preset probability in a first semantic scene, a corresponding relationship among semantic scene information, the virtual expressions, and the usage probability of 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 corresponding relationship among the semantic scene information, the virtual expressions, and the usage probability of the virtual expressions, and specifically includes the following steps:
step 201, obtaining historical use data and context information of the target virtual expression from the expression use records in a preset time period.
And the target virtual expression is any virtual expression in the expression use record.
The emoticon usage record can be a virtual emoticon and a message stored in the software platform and input by the user, for example, for a chat tool, the emoticon usage record can be a chat record of the user. For another example, for video software, the emoticon usage record may be a message record for a video.
The historical usage data for the target virtual expression may include: the usage amount of the target virtual expression and the collection amount of the target virtual expression.
And 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 within a preset time period. The collection amount of the target virtual expression represents the total times of the target virtual expression being collected by all users of the software platform within a preset time period. Therefore, the historical usage data of the target virtual expression can reflect the high quality of the target virtual expression.
For example, the preset time period may be: the last week, month or half of the year, embodiments of the present disclosure are not limiting. In a 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, and the collection amount of the target virtual expression B is 1575 times, it can be seen that the usage amount of the virtual expression B is greater than the usage amount of the virtual expression a, and the collection amount of the virtual expression B is greater than the collection amount of the virtual expression a, so that the quality of the virtual expression B is higher than that of the virtual expression a.
The context information of the target virtual emoticon is a plurality of messages before and a plurality of messages after the target virtual emoticon in an emoticon 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, when the electronic device acquires a target virtual emoticon, 5 chat messages before the target virtual emoticon and 4 chat messages after the target virtual emoticon in the chat log can be acquired. The electronic device obtains the number of the chat messages, which is not limited in the embodiment of the disclosure.
Step 202, performing 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 acquire semantic scene information corresponding to the context information.
Step 203, inputting the historical use data and the target semantic scene information into a probability prediction model, and acquiring the use probability of the target virtual expression output by the probability prediction model under the target semantic scene represented by the target semantic scene information.
The usage probability represents the probability that the user uses the target virtual expression in the semantic scene, i.e. represents the degree to which the target virtual expression conforms to 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 scenes, the same virtual expression may exist. Thus, there may be multiple probabilities corresponding to different semantic scenes for each virtual expression.
For example, as shown in the following table one, table one is a table showing the corresponding relationship of the virtual expressions 1 to 7 in the open semantic scene:
watch 1
Virtual expression Semantic scenes Probability of use
1 Happy 6%
2 Happy 35%
3 Happy 67%
4 Happy 93%
5 Happy 2%
6 Happy 46%
7 Happy 80%
As can be seen from table one, the virtual expression with the highest probability of use in the open semantic scene is virtual expression 4, and therefore the virtual expression that best meets the open semantic scene is virtual expression 4.
Optionally, based on the correspondence relationship established in step 204, in step 103, according to the first semantic scene information, it is determined that a preset number of virtual expressions with the highest probability are used in the first semantic scene corresponding to the first semantic scene information, and the preset number of virtual expressions are used as virtual expressions to be recommended, which may specifically be 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 of the virtual expressions. 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 an open semantic scene, the electronic device may select 3 virtual expressions with a usage probability greater than 60% from the virtual expressions 1 to 7 corresponding to the open 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 relationship among the target virtual expressions, the target semantic scene information, and the usage probabilities, the electronic device may determine the usage probabilities of the virtual expressions corresponding to the target semantic scene in the semantic scenes, and sort the virtual expressions corresponding to the target semantic scene according to the usage probabilities of the virtual expressions in the target semantic scene to obtain a virtual expression sequence corresponding to the target semantic scene.
For example, according to the content described in the above table i, as shown in the following table ii, table ii is a virtual expression sequence a corresponding to an open semantic scene.
Watch two
Figure BDA0002223392070000111
As can be seen from table two, in the happy semantic scene, the virtual expressions 1 to 7 have different use probabilities, so the electronic device can sort the virtual expressions 1 to 7 from a large use probability to a small use probability according to the use probabilities of the virtual expressions 1 to 7, and obtain a virtual expression sequence a corresponding to the happy semantic scene: the probabilities of the virtual expressions 4, 7, 3, 6, 2, 1, 5 and the virtual expressions 4, 7, 3, 6, 2, 1, and 5 correspond to each other.
When the electronic equipment recommends the virtual emotions to the user according to the chat content and the chat records, a preset number of virtual emotions with the use probability higher than the preset probability can be recommended to the user according to the chat content and the chat records so that the user can select the virtual emotions.
Optionally, based on the virtual expression sequence corresponding to each semantic scene information, in step 103, according to the first semantic scene information, it is determined that a preset number of virtual expressions with the highest probability are used in the first semantic scene corresponding to the first semantic scene information, and the preset number of virtual expressions are used as the virtual expressions to be recommended, which may specifically be implemented as follows:
the electronic equipment can determine 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, select the virtual expressions with the preset number from the virtual expression sequence corresponding to the first semantic scene information, and take the virtual expressions with the preset number as the virtual expressions to be recommended.
For example, according to the contents described 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 happy semantic scene information, for the user to select.
As shown in fig. 3 and 4, the embodiment of the present disclosure provides two flow charts in practical application.
The semantic scene corresponding to the virtual expression a is the semantic scene a, fig. 3 is a flow chart of the expression used by the user in the related art, and the specific steps are as follows:
step 301, the user A uploads the virtual expression A.
Step 302, the user A sends the virtual expression A to the user B.
Step 303, the user B receives the 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 illustrating a user using an expression in an embodiment of the present disclosure, which includes the following specific steps:
step 401, the user A uploads the virtual expression 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.
Obviously, since the electronic device performs the process of selecting the virtual emoticon instead of the user B in the embodiment of the present disclosure, the process of using the emoticon by the user in the embodiment of the present disclosure in fig. 4 is significantly shorter than the process of using the emoticon by the user in fig. 3. Therefore, by adopting the embodiment of the disclosure, the user can accurately obtain the virtual expression according with the current semantics and can also quickly obtain the virtual expression according with the current semantics, so that the time spent on searching the virtual expression is greatly saved.
Based on the same technical concept, an embodiment of the present disclosure further provides an apparatus for recommending data, as shown in fig. 5, the apparatus including: an acquisition unit 501, an analysis unit 502 and a determination unit 503.
An obtaining unit 501 configured to perform obtaining of a currently input chat content in an input box and a preset number of chat records that have been input before the chat content;
an analyzing unit 502 configured to perform semantic analysis on the chat content and the chat records, and determine first semantic scene information corresponding to the chat content;
a determining unit 503 configured to perform, according to the first semantic scene information, determining a preset number of virtual expressions with a probability higher than a preset probability in the 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 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 the 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 which are arranged according to the order of the use probability;
and selecting a preset number of virtual expressions with the use probability higher than the preset probability from the virtual expression sequence corresponding to the first semantic scene information, and taking the preset number of virtual expressions as the 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 in a preset time period, 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 input the historical usage data and the target semantic scene information into the probability prediction model, and obtain the 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 execute 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 usage probability of each virtual expression corresponding to the target semantic scene in each semantic scene;
and the sequencing unit is configured to sequence 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.
Alternatively to this, the first and second parts may,
the determining unit 503 is further configured to perform determining recommendation priorities of a preset number of virtual expressions to be recommended according to the usage probabilities corresponding to the preset number of virtual expressions to be recommended.
According to the device for recommending data, the electronic equipment can acquire the currently input chat content in the input box and the input preset number of chat records before the chat content, then perform semantic analysis on the chat content and the chat records, determine the first semantic scene information corresponding to the chat content, determine the preset number of virtual expressions with the probability higher than the preset probability in the 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 the virtual expressions to be recommended. Because the chat content and the chat records can more accurately express the current semantic scene than one character or one word, the electronic equipment can determine the virtual expression which accurately accords with the current semantic scene through the chat content and the chat records and can 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, including a processor 601, a communication interface 602, a memory 603, and a communication bus 604, where the processor 601, the communication interface 602, and the memory 603 complete mutual communication through the communication bus 604,
a memory 603 for storing a computer program;
the processor 601 is configured to implement the following steps when executing the program stored in the memory 603:
obtaining the chat content currently input in an input box and a preset number of chat records input before the chat content;
performing semantic analysis on the chat content and the chat records, 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 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, it is also configured to implement other steps described in the foregoing method embodiment, and reference may be made to the relevant description in the foregoing method embodiment, which is not described herein again.
The communication bus mentioned in the network device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is 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 a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or other Programmable logic devices, discrete Gate or transistor logic devices, or discrete hardware components.
Based on the same technical concept, the embodiment of the present disclosure further provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the above-mentioned method steps of recommending data.
Based on the same technical concept, the embodiments of the present disclosure also provide a computer program product containing instructions, which when run on a computer, causes the computer to perform the above-mentioned recommended data method steps.
In the above embodiments, the implementation may be wholly or partially realized 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. The procedures or functions described in accordance with the embodiments of the disclosure are, in whole or in part, generated when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the 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)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be 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. Also, 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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment 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 principle of the present disclosure are included in the scope of protection of the present disclosure.

Claims (10)

1. A method of recommending data, the method comprising:
obtaining the chat content currently input in an input box and a preset number of chat records input before the chat content;
performing semantic analysis on the chat content and the chat records, 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 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.
2. The method according to claim 1, wherein the 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, 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 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 a preset probability from each first virtual expression corresponding to the first semantic scene information, and taking the preset number of virtual expressions as the virtual expressions to be recommended.
3. The method according to claim 1, wherein the 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, 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 which are arranged according to the order of the use probability;
and selecting a preset number of virtual expressions with the use probability higher than the preset probability from the virtual expression sequence corresponding to the first semantic scene information, and taking the preset number of virtual expressions as the virtual expressions to be recommended.
4. The method as claimed in claim 2, wherein before the step of acquiring the currently inputted chat content in the input box and the preset number of pieces of chat records which have been inputted 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;
performing 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 acquiring the use probability of the target virtual expression output by the probability prediction model under 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.
5. The method of claim 4, wherein after the step of establishing a correspondence between the target virtual expression, the target semantic scene information, and the usage 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.
6. The method of claim 1, wherein after the step of taking the preset number of virtual expressions as virtual expressions to be recommended, the method further comprises:
and determining the recommendation priority of the virtual expressions to be recommended in the preset number according to the use probability corresponding to the virtual expressions to be recommended in the preset number.
7. An apparatus for recommending data, the apparatus comprising:
an acquisition unit configured to perform acquisition of a chat content currently input in an input box and a preset number of chat records that have been input before the chat content;
the analysis unit is configured to perform semantic analysis on the chat content and the chat records 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 in a first semantic scene corresponding to the first semantic scene information, and use the preset number of virtual expressions as virtual expressions to be recommended.
8. The apparatus according to claim 7, 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 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 a preset probability from each first virtual expression corresponding to the first semantic scene information, and taking the preset number of virtual expressions as the virtual expressions to be recommended.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-6 when executing a program stored in the memory.
10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 6.
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 true CN110717109A (en) 2020-01-21
CN110717109B 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)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112462992A (en) * 2020-11-30 2021-03-09 北京搜狗科技发展有限公司 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
US20170185581A1 (en) * 2015-12-29 2017-06-29 Machine Zone, Inc. Systems and methods for suggesting emoji
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

Patent Citations (8)

* 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
US20170185581A1 (en) * 2015-12-29 2017-06-29 Machine Zone, Inc. Systems and methods for suggesting emoji
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

Cited By (2)

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

Also Published As

Publication number Publication date
CN110717109B (en) 2024-03-15

Similar Documents

Publication Publication Date Title
CN108810642B (en) Bullet screen display method and device and electronic equipment
CN111552880B (en) Knowledge graph-based data processing method and device, medium and electronic equipment
CN113407677B (en) Method, apparatus, device and storage medium for evaluating consultation dialogue quality
CN107102744B (en) Input vocabulary recommendation method and electronic equipment
CN110956016A (en) Document content format adjusting method and device and electronic equipment
CN110598109A (en) Information recommendation method, device, equipment and storage medium
CN108470057B (en) Generating and pushing method, device, terminal, server and medium of integrated information
CN108021713B (en) Document clustering method and device
KR101780237B1 (en) Method and device for answering user question based on q&a data provided on online
CN110717109B (en) Method, device, electronic equipment and storage medium for recommending data
EP2613275A1 (en) Search device, search method, search program, and computer-readable memory medium for recording search program
CN110674330B (en) Expression management method and device, electronic equipment and storage medium
CN110929014B (en) Information processing method, information processing device, electronic equipment and storage medium
CN112883275A (en) Live broadcast room recommendation method, device, server and medium
CN112163415A (en) User intention identification method and device for feedback content and electronic equipment
CN109062900B (en) Friend circle generation method and device
CN113656575B (en) Training data generation method and device, electronic equipment and readable medium
CN110874639A (en) Method and device for acquiring operation information
JP2015149085A (en) Data analysis system, data analysis method, and data analysis program
CN110580317B (en) Social information analysis method and device, terminal equipment and storage medium
CN112115300A (en) Text processing method and device, electronic equipment and readable storage medium
TWI676110B (en) Semantic feature analysis system for article analysis based on readers
CN113343984A (en) Bullet screen prompting method and device, electronic equipment and storage medium
CN111737554A (en) Scoring model training method, electronic book scoring method and device
CN105893552B (en) Data processing 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