Information display method and device, electronic equipment and readable storage medium

文档序号:7712 发布日期:2021-09-17 浏览:34次 中文

1. An information display method, characterized in that the method comprises:

determining target reference texts referenced by a user in a dialog interface;

calculating first score values of at least two sentences in the target reference text;

selecting a target sentence with the first score value higher than a score threshold value from the at least two sentences as an abstract;

displaying the summary in the dialog interface.

2. The information display method according to claim 1, wherein the calculating the first score values of at least two sentences in the target reference text comprises:

performing semantic representation on at least two sentences in the target reference text;

carrying out averaging processing on at least two sentences subjected to semantic representation to obtain processed sentences;

a first score value of the processed sentence is calculated.

3. The information display method according to claim 1, wherein the selecting, as the abstract, a target sentence of the at least two sentences for which the first score value is higher than a score threshold value comprises:

combining the sentences to obtain combined sentences;

calculating a second score value of the combined sentence according to the first score value;

selecting at least one target combined sentence with the second score value higher than a score threshold value from a plurality of combined sentences as the target sentence, wherein the length of the target sentence does not exceed a display length threshold value.

4. The information display method according to claim 1, wherein after the summary is displayed in the dialogue interface, the method further comprises:

selecting a plurality of to-be-selected associated texts associated with the target reference texts within a preset time;

performing relevance analysis on the target reference text and the to-be-selected relevance text to obtain relevance;

ranking each degree of association, and selecting the associated text to be selected with the ranking meeting the requirement as the target associated text;

responding to the triggering operation of the abstract, and jumping to the position of the target associated text from the position of the abstract displayed by the dialogue interface.

5. The information display method according to claim 1, wherein after the summary is displayed in the dialogue interface, the method further comprises:

responding to the triggering operation of the abstract, and jumping to the position of the target reference text from the position of the abstract displayed by the dialogue interface.

6. An information display apparatus, characterized in that the apparatus comprises:

the determining module is used for determining a target reference text referenced in the dialog interface by the user;

the first calculation module is used for calculating first score values of at least two sentences in the target reference text;

the first selecting module is used for selecting a target sentence of the at least two sentences, wherein the first score value of the target sentence is higher than a score threshold value, and the target sentence is used as an abstract;

and the display module is used for displaying the abstract in the conversation interface.

7. The information display device according to claim 6, wherein the first calculation module includes:

a semantic representation unit, configured to perform semantic representation on at least two sentences in the target reference text;

the processing unit is used for carrying out averaging processing on at least two sentences subjected to semantic representation to obtain processed sentences;

a first calculating unit for calculating a first score value of the processed sentence.

8. The information display device according to claim 6, wherein the first selection module comprises:

the combination unit is used for combining the sentences to obtain combined sentences;

a second calculation unit configured to calculate a second score value of the combined sentence according to the first score value;

a selecting unit, configured to select, as the target sentence, at least one target combined sentence in which the second score value is higher than a score threshold from the plurality of combined sentences, wherein the length of the target sentence does not exceed the display length threshold.

9. The information display device according to claim 6, characterized in that the device further comprises:

the second selection module is used for selecting a plurality of to-be-selected associated texts associated with the target reference text within preset time;

the analysis module is used for carrying out relevance analysis on the target reference text and the to-be-selected relevance text to obtain relevance;

the ranking module is used for ranking each association degree and selecting the associated text to be selected with the ranking meeting the requirement as the target associated text;

and the first skipping module is used for responding to the triggering operation of the abstract, and skipping from the position of the abstract displayed by the dialogue interface to the position of the target associated text.

10. The information display device according to claim 6, characterized in that the device further comprises:

and the second jumping module is used for responding to the triggering operation of the abstract, and jumping the position of the abstract displayed by the dialogue interface to the position of the target reference text.

11. An electronic device comprising a processor, a memory, and a program or instructions stored on the memory and executable on the processor, the program or instructions when executed by the processor implementing the steps of the information display method according to any one of claims 1 to 5.

12. A readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the information display method according to any one of claims 1 to 5.

Background

Currently, Applications (APPs) of terminals support mostly a reference function. For example, in social APP, a user may select target reference text in historical conversation stream data, reference it and reply, and the content of the reply and the target reference text may be displayed in a certain position of the conversation stream in a certain structure.

In the above process, there is a case that the APP can automatically omit the content exceeding the length, and the entire content can be displayed after clicking, and the user may not be able to intuitively understand the content of the reference text, which affects the user experience.

Disclosure of Invention

The embodiment of the application aims to provide an information display method, an information display device, electronic equipment and a readable storage medium, and can solve the problems that a user cannot intuitively understand the content of a reference text and the user experience is low.

In a first aspect, an embodiment of the present application provides an information display method, including:

determining target reference texts referenced by a user in a dialog interface;

calculating first score values of at least two sentences in the target reference text;

selecting a target sentence with the first score value higher than a score threshold value from the at least two sentences as an abstract;

displaying the summary in the dialog interface.

In a second aspect, an embodiment of the present application provides an information display apparatus, including:

the determining module is used for determining a target reference text referenced in the dialog interface by the user;

the first calculation module is used for calculating first score values of at least two sentences in the target reference text;

the first selecting module is used for selecting a target sentence of the at least two sentences, wherein the first score value of the target sentence is higher than a score threshold value, and the target sentence is used as an abstract;

and the display module is used for displaying the abstract in the conversation interface.

In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or an instruction stored on the memory and executable on the processor, and when the program or the instruction is executed by the processor, the steps of the information display method according to the first aspect are implemented.

In a fourth aspect, the present application provides a readable storage medium, on which a program or instructions are stored, and when the program or instructions are executed by a processor, the program or instructions implement the steps of the information display method according to the first aspect.

In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the steps of the information display method according to the first aspect.

In the embodiment of the application, a target citation text quoted in a dialog interface by a user is determined, first score values of at least two sentences in the target citation text are calculated, a target sentence with the first score value higher than a score threshold value in the at least two sentences is selected as a summary, and the summary is displayed in the dialog interface. Therefore, the abstract is extracted from the target citation text and displayed in the conversation interface, the user can intuitively know the main content of the target citation text, and the user experience is improved. In addition, by calculating the first score value of the sentence in the target citation text and only taking the target sentence with the first score value higher than the score threshold value as the abstract, the abstract extraction method provided by the embodiment of the application is adopted, so that the extracted abstract is more accurate and is more suitable for the subject matter of the target citation text.

Drawings

Fig. 1 is a schematic flow chart illustrating an information display method according to an embodiment of the present application;

fig. 2A is a schematic flow chart illustrating an information display method according to an embodiment of the present application;

fig. 2B is a schematic flow chart of an information display method according to an embodiment of the present application;

fig. 3A and fig. 3B are schematic diagrams illustrating an operation of abstract extraction provided by an embodiment of the present application;

fig. 4 is a schematic flow chart of an information display method according to an embodiment of the present application;

FIGS. 5A and 5B are schematic diagrams illustrating an operation of a digest extraction provided by an embodiment of the present application;

fig. 6 is a schematic flow chart illustrating an information display method according to an embodiment of the present application;

fig. 7A to 7C are schematic diagrams illustrating an operation of abstract extraction according to an embodiment of the present application;

fig. 8 is a schematic flow chart of an information display method according to an embodiment of the present application;

fig. 9 is a schematic structural diagram of an information display device according to an embodiment of the present application;

fig. 10 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;

fig. 11 shows a hardware structure diagram of an electronic device according to an embodiment of the present application.

Detailed Description

The technical solutions in the embodiments of the present application will be described clearly below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of the present disclosure.

The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.

The information display method provided by the embodiment of the present application is described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.

Fig. 1 is a flowchart illustrating an information display method according to an embodiment of the present application, which may be executed by an electronic device, for example, a terminal device. That is, the above-described information display method may be executed by software or hardware installed in the terminal device. As shown in fig. 1, the method may include the following steps.

S110: and determining target reference text referenced in the dialog interface by the user.

When a user uses a dialog interface of the electronic equipment for text interaction, at least part of text in the dialog interface can be referred as target reference text. For example, the user clicks or long-presses the target reference text in the dialog interface through the screen of the electronic device, and the target reference text serves as the reference text.

S111: a first score value is calculated for at least two sentences in the target reference text.

Specifically, the target reference text includes a plurality of sentences, each of which may be a digest, the first score may represent a probability of the sentence being the digest, and the higher the first score is, the higher the probability of the sentence being the digest is, the more appropriate the target reference text is. At least two sentences in the target reference text can be any sentences in the target reference text, when the first score values of the at least two sentences are calculated, the at least two sentences can be firstly subjected to semantic representation, then the sentences subjected to semantic representation are subjected to averaging processing, and finally the first score values of the sentences subjected to averaging processing are calculated by utilizing a forward neural network.

S112: and selecting a target sentence with the first score value higher than the score threshold value from at least two sentences as the abstract.

Specifically, when the first score values of at least two sentences are higher than the score threshold value, the probability that the target sentence is taken as the abstract is higher, the main meaning of the target reference text can be reflected better, a user can know the content of the target reference text intuitively, and the user experience is improved.

S113: the summary is displayed in the dialog interface.

Specifically, the content of the summary is displayed in its entirety in the dialog interface.

Therefore, according to the information display method, the target citation text quoted in the dialogue interface by the user is determined, the first score values of at least two sentences in the target citation text are calculated, the target sentence with the first score value higher than the score threshold value in the at least two sentences is selected as the abstract, and the abstract is displayed in the dialogue interface. Therefore, the abstract is extracted from the target citation text and displayed in the conversation interface, the user can intuitively know the main content of the target citation text, and the user experience is improved. In addition, by calculating the first score value of the sentence in the target citation text and only taking the target sentence with the first score value higher than the score threshold value as the abstract, the abstract extraction method provided by the embodiment of the application is adopted, so that the extracted abstract is more accurate and is more suitable for the subject matter of the target citation text.

In one possible implementation, before calculating the first score values of at least two sentences in the target reference text, the information display method further includes: and calculating the probability of an extraction mode for abstracting the target reference text, and calculating the first score values of at least two sentences in the target reference text under the condition that the probability of abstracting the abstract by adopting the first extraction mode is greater than the probability of abstracting the abstract by adopting the second extraction mode. Specifically, when the target citation text is a news-like reporter text, a product explanatory text, or the like, the abstract may be extracted in a manner of extracting a sentence (a first extraction manner), and when the target citation text is a text of a specific scene, such as a meeting scene, a life payment scene, a travel scene (an airline ticket, a train ticket, a hotel, a bank, or the like), a verification code scene, an express delivery scene, a movie scene, an operation market scene, or the like, the abstract may be extracted in a manner of extracting a key field (a second extraction manner).

The extraction of the abstract from the target reference text may be based on an abstract extraction model. The first layer of the model segments the target reference text according to characters, the second layer to the sixth layer of the model semantic representation of the target reference text, and the seventh layer to the eighth layer of the model extract the abstract of the target reference text after semantic representation. Specifically, the Task1 is used for judging the type of the target reference text and determining the extraction mode for extracting the abstract, the Task2 is used for extracting key sentences from the target reference text as the abstract in a first extraction mode, and the Task3 is used for extracting key fields from the target reference text as the abstract in a second extraction mode. For the optimization of the model, after the three tasks of Task1, Task2 and Task3 are executed, the generated Task loss can be used as the input of the model to optimize the model.

Specifically, Token1, Token2, and the like in the first layer are input vectors of the target reference text (the input vectors are character-divided word vectors), and CLS indicates the start of the target reference text. The Embedding of the second layer encodes the input vector of the first layer, thereby converting the natural language of the high-dimensional semantic space into the low-dimensional vector space.

The Multi-Head-Self-orientation of the third layer is used for analyzing the literal meaning of word vectors, the word vectors coded by Embedding are input into the Multi-Head-Self-orientation of the third layer to obtain a plurality of vector representations of the current word vectors, and then the word vectors are spliced and output to the fourth layer to the sixth layer, wherein Add & BN and FFN are depth residual error networks which are used for summing the outputs of the third layer and the third layer to obtain decoding vectors, the decoding vectors are subjected to linear mapping and are mapped to the whole dictionary space, and then the decoding vectors are regulated into probability distribution of words through a softmax function, namely the fraction of each word, and then the word with the highest fraction is selected as the semantic representation of each word and is used as the input of the seventh layer and the eighth layer. The seventh layer inputs the semantically represented target reference text into Task1, Task2 and Task3, executes the respective tasks, and extracts the abstract in the target reference text.

In particular, for a meeting scene in a particular scene text type, its key fields may be meeting time, meeting subject, etc. For a life payment scene, the key fields can be a house name, a house number and the like. For a travel scenario, the key fields may be flight time, flight number, train number, departure time, hotel address, check-in time, loan account, account appointment, etc. For a captcha scenario, the key field may be a captcha number, etc. For an express scene, the key fields can be goods taking codes, goods taking time and the like. For a movie scene, the key fields may be the movie name, theater address, etc.

More specifically, the specific way for judging the type of the target reference text and determining the abstract by the Task1 is as follows: and processing the semantically represented target reference text by adopting a forward neural network to obtain a two-dimensional vector of the target reference text. The two-dimensional vector can be denoted as class, class [0] represents the probability that the text type of the target reference text is suitable for extracting the abstract in a way of extracting sentences (first extraction way), class [1] represents the probability that the text type of the target reference text is suitable for extracting the abstract in a way of extracting key fields (second extraction way), and the extraction way with the higher probability is selected as the extraction way of the target reference text.

For example, when meeting notification content in a meeting scene is taken as a target reference text, the probability that the text type of the meeting notification content is suitable for extracting the abstract by extracting a sentence is 0.2, the probability that the text type of the meeting notification content is suitable for extracting the abstract by extracting a key field is 0.8, and then the meeting notification content extracts the abstract by extracting the key field.

Therefore, by the information display method provided by the embodiment of the application, the abstract is extracted in the extraction mode suitable for the type of the target citation text according to different text types, the extracted abstract can reflect the main content of the target citation text more subjectively, a user can know the main content of the target citation text conveniently, and the experience of the user is further improved. In addition, in the first extraction mode, by calculating the first score value of the sentence in the target reference text and only taking the target sentence with the first score value higher than the score threshold value as the abstract, the extracted abstract is more accurate and is more appropriate with the subject matter of the target reference text.

Fig. 2A is a schematic flowchart illustrating an information display method according to an embodiment of the present application, where the method may be executed by an electronic device, such as a terminal device. That is, the above-described information display method may be executed by software or hardware installed in the terminal device. As shown in fig. 2A, the method may include the following steps.

S210: and determining target reference text referenced in the dialog interface by the user.

When the target reference text is a reporter text of news and a descriptive text of a product, the abstract can be extracted in a sentence extraction mode.

And in the case that the text length of the target reference text exceeds the corresponding display length threshold value of the dialog interface, the operation goes to S211-S215.

S211: at least two sentences in the target reference text are semantically represented.

And segmenting the target reference text according to characters, and performing semantic representation on the target reference text through a Bert language model.

S212: and averaging at least two sentences subjected to semantic representation to obtain processed sentences.

Specifically, each semantically represented sentence is averaged to obtain a sentence representation, specifically, S is represented as [ S1.

S213: a first score value of the processed sentence is calculated.

The sentence expression S after the equalization is calculated by a forward neural network as a first Score value of each sentence, which is Score [ Score 1.,. Scorek ], wherein Score represents the k-th sentence after the equalization as a Score value of the abstract, and the probability of the sentence as the abstract is higher as the first Score value is higher.

S214: and selecting a target sentence with the first score value higher than the score threshold value from at least two sentences as the abstract.

S215: the summary is displayed in the dialog interface.

Specifically, the content of the summary is displayed in its entirety in the dialog interface.

In the embodiment of the application, a target citation text quoted in a dialog interface by a user is determined, first score values of at least two sentences in the target citation text are calculated, a target sentence with the first score value higher than a score threshold value in the at least two sentences is selected as a summary, and the summary is displayed in the dialog interface. Therefore, the abstract is extracted from the target citation text and displayed in the conversation interface, the user can intuitively know the main content of the target citation text, and the user experience is improved. In addition, by calculating the first score value of the sentence in the target citation text and only taking the target sentence with the first score value higher than the score threshold value as the abstract, the abstract extraction method provided by the embodiment of the application is adopted, so that the extracted abstract is more accurate and is more suitable for the subject matter of the target citation text.

Fig. 2B is a flowchart illustrating an information display method according to an embodiment of the present application, where the method may be executed by an electronic device, such as a terminal device. That is, the above-described information display method may be executed by software or hardware installed in the terminal device. As shown in fig. 2B, the method may include the following steps.

S220: and determining target reference text referenced in the dialog interface by the user.

When the target reference text is a reporter text of news and a descriptive text of a product, the abstract can be extracted in a sentence extraction mode.

S221: a first score value is calculated for at least two sentences in the target reference text.

S222: and combining the sentences to obtain a combined sentence.

And exhaustively exhausting all possible combined sentences according to the sequence of the sentences for the sentences after the semantic processing, wherein if the sentences after the semantic processing have 3 sentences, the 1 st sentence and the 2 nd sentence are taken as one combined sentence, the 2 nd sentence and the 3 rd sentence are taken as one combined sentence, and the 1 st sentence and the 3 rd sentence are taken as one combined sentence.

S223: a second score value of the combined sentence is calculated based on the first score value.

For the second score value, the first score value of each sentence in each combined sentence may be superimposed to obtain the second score value of each combined sentence, or the forward neural network may be used to calculate the second score value of each combined sentence as a summary.

S224: selecting at least one target combined sentence with the second score value higher than the score threshold value from the plurality of combined sentences as a target sentence, wherein the length of the target sentence does not exceed the display length threshold value.

And performing descending order arrangement on the second scores, firstly selecting the combined sentence corresponding to the highest second score, then judging whether the length of the combined sentence does not exceed a display length threshold, if not, taking the sentence corresponding to the highest second score as a target combined sentence, if so, selecting the combined sentence ranked second and judging whether the length of the combined sentence does not exceed the display length threshold, and repeating the steps until the target combined sentence with the highest second score and the length of the combined sentence not exceeding the display length threshold is found out as the target combined sentence. In addition, a plurality of target combined sentences can be selected as the abstract, specifically, the sentence length of a single sentence of the target combined sentences and the accumulated sentence length do not exceed the text length threshold, and the second score value of each target combined sentence is higher than the second score values of the rest other combined sentences.

Further, for the target reference text, the number of words corresponds to the text length of the target reference text, and the larger the number of words, the longer the text length, the smaller the number of words, and the shorter the text length. For a dialog interface, there is a maximum limit on the number of words of text displayed, which may be determined by a display length threshold, which may be the maximum number of words displayed by the dialog interface. If the number of words of the target reference text is 50 words and the display length threshold is 30, the target reference text can display the 1 st word to the 30 th word of the text from the beginning in the dialog interface at most. In this way, by extracting the key information from the target reference text as the abstract, the abstract summarizes the main content of the target reference text, and the text length of the abstract does not exceed the display length threshold, so that the abstract can be completely displayed in the dialog interface, and the user can conveniently understand the abstract extraction content of the target reference text.

S225: the summary is displayed in the dialog interface.

As shown in fig. 3A, a dialog interface of the electronic device displays text 30, the type of the text 30 is a news-like reporter text, and when the user clicks or long presses the text 30, the text is a target reference text 30 that the user refers to in the dialog interface.

As shown in fig. 3B, as the target cited text 30, when the Task1 determines the type of the target cited text 30, the probability of class [0] is greater than the probability of class [1], indicating that the text type of the target cited text 30 is suitable for abstract extraction in a manner of extracting sentences (first extraction manner), and therefore, a key sentence is extracted as an abstract for the target cited text 30 through the Task2 in accordance with steps S211 to S217, and the abstract 31 is displayed in the dialog interface of the electronic device. The user may also reply based on the displayed abstract 31, and the content of the reply may be displayed at the upper side 32 of the abstract 31 to represent the correspondence between the abstract 31 and the content of the reply.

Therefore, according to the information display method, the target citation text quoted in the dialogue interface by the user is determined, the first score values of at least two sentences in the target citation text are calculated, the target sentence with the first score value higher than the score threshold value in the at least two sentences is selected as the abstract, and the abstract is displayed in the dialogue interface. Therefore, the abstract is extracted from the target citation text and displayed in the conversation interface, the user can intuitively know the main content of the target citation text, and the user experience is improved. In addition, by calculating the first score value of the sentence in the target citation text and only taking the target sentence with the first score value higher than the score threshold value as the abstract, the abstract extraction method provided by the embodiment of the application is adopted, so that the extracted abstract is more accurate and is more suitable for the subject matter of the target citation text.

Fig. 4 is a flowchart illustrating an information display method according to an embodiment of the present application, which may be executed by an electronic device, for example, a terminal device. That is, the above-described information display method may be executed by software or hardware installed in the terminal device. As shown in fig. 4, the method may include the following steps.

S410: and determining target reference text referenced in the dialog interface by the user.

When the target reference text is the text of a typical scene, the abstract can be extracted by adopting a key field extraction mode. When the user clicks or long presses the position of the reference text 50, the reference text 50 indicates that the reference text 50 is the target reference text referenced by the user in the dialog interface, as shown in the reference text 50 of the conference scene displayed in the dialog interface in fig. 5A.

S411: and performing semantic representation on the target reference text.

And segmenting the target reference text according to characters, and performing semantic representation on the target reference text through a Bert language model.

S412: the tag in the target reference text is determined.

The label corresponding to each word in the target reference text is determined through a forward neural network, and is specifically marked as logit [ -logit 1., logit ], wherein logit represents the label corresponding to the nth word.

The target reference text of the conference scene displayed in the dialog interface shown in fig. 5A determines the tags contained in the reference text as the conference time, the conference place and the conference subject through the forward neural network.

S413: key fields are extracted based on the tags.

Extracting the field belonging to each tag as a key field, or taking the reference text shown in fig. 5A as an example, the corresponding relationship between the conference time tag and the corresponding key field is as follows: meeting time-today afternoon, meeting time-14: 30. Extracting all key fields corresponding to the meeting time, wherein the key fields under the meeting time labels are 14:30 in the afternoon of today. Similarly, the key field of the meeting place label is a certain century city, and the key field of the meeting subject label is a new training meeting.

S414: and determining the label and the key field as the abstract, wherein the length of the abstract does not exceed the display length threshold.

For the target reference text, the number of words corresponds to the text length of the target reference text, and the larger the number of words, the longer the text length, the smaller the number of words, and the shorter the text length. For a dialog interface, there is a maximum limit on the number of words of text displayed, which may be determined by a display length threshold, which may be the maximum number of words displayed by the dialog interface. If the number of words of the target reference text is 50 words and the display length threshold is 30, the target reference text can display the 1 st word to the 30 th word of the text from the beginning in the dialog interface at most. In this way, by extracting the key information from the target reference text as the abstract, the abstract summarizes the main content of the target reference text, and the text length of the abstract does not exceed the display length threshold, so that the abstract can be completely displayed in the dialog interface, and the user can conveniently understand the abstract extraction content of the target reference text.

S415: the summary is displayed in the dialog interface.

As shown in fig. 5B, in the target reference text 50 shown in fig. 5A, when the Task1 judges the type of the target reference text 30, the probability of class [0] is smaller than the probability of class [1], indicating that the text type of the target reference text 30 is suitable for abstract extraction by extracting key fields (second extraction method), and therefore, after extracting the tags and key fields by steps S411 to S414 through the Task3, the conference subject and the newman training conference are displayed as the first line of the abstract 51, the conference time and 14:30 afternoon of today are displayed as the second line of the abstract 51, and the conference place and a certain century city are displayed in the dialog interface as the third line of the abstract 51. The user may also reply based on the displayed summary 51, and the content of the reply may be displayed at the upper side 52 of the summary 51 to represent the correspondence between the summary 51 and the content of the reply.

Therefore, according to the information display method, the target citation text quoted in the dialogue interface by the user is determined, the first score values of at least two sentences in the target citation text are calculated, the target sentence with the first score value higher than the score threshold value in the at least two sentences is selected as the abstract, and the abstract is displayed in the dialogue interface. Therefore, the abstract is extracted from the target citation text and displayed in the conversation interface, the user can intuitively know the main content of the target citation text, and the user experience is improved. In addition, by calculating the first score value of the sentence in the target citation text and only taking the target sentence with the first score value higher than the score threshold value as the abstract, the abstract extraction method provided by the embodiment of the application is adopted, so that the extracted abstract is more accurate and is more suitable for the subject matter of the target citation text.

Fig. 6 is a flowchart illustrating an information display method according to an embodiment of the present application, where the method may be executed by an electronic device, such as a terminal device. That is, the above-described information display method may be executed by software or hardware installed in the terminal device. As shown in fig. 6, the method may include the following steps.

S610: and determining target reference text referenced in the dialog interface by the user.

S611: a first score value is calculated for at least two sentences in the target reference text.

S612: and selecting a target sentence with the first score value higher than the score threshold value from the at least two sentences as the abstract.

S613: the summary is displayed in the dialog interface.

S610-S613 have the same or similar implementation as S110-S113 in the embodiment of fig. 1, which may be referred to each other, and are not described herein again in this embodiment of the application.

S614: and selecting a plurality of to-be-selected associated texts associated with the target reference text within a preset time.

S615: and performing relevance analysis on the target reference text and the to-be-selected relevance text to obtain the relevance.

S616: ranking the relevance degrees, and selecting the to-be-selected relevant texts with the ranking meeting the requirements as target relevant texts. Specifically, the predetermined time may be any period of time, such as 6 hours.

Specifically, when performing relevance analysis on the target reference text and the to-be-selected associated text, the target reference text and the associated text may be combined in a one-to-one manner, then, a Bert language model is adopted to perform semantic representation on the target reference text and the associated text, the semantic representation of the target reference text is denoted as H1, the semantic representation of the associated text is denoted as H2, H1 and H2 are represented by vectors after being processed by the Bert language model, and then, the following fusion strategies are adopted to fuse the H1 and the H2, specifically:

wherein the content of the first and second substances,the term "x" denotes concatenation, "-" denotes subtraction, "-" denotes multiplication, H1 x H2 denotes each vector multiplication, i.e. character exchange between H1 and H2, H1-H2 denotes elimination of the same characters in H1 and H2, and Fusion denotes semantic representation after Fusion.

Inputting the fused Fusion into a forward neural network to calculate a score value of the relevance of the fused Fusion, ranking the score values, and taking a candidate relevant text with the score value exceeding a threshold as a target relevant text, wherein the threshold can be determined according to actual conditions, and the embodiment of the application is not limited herein.

S617: and responding to the triggering operation of the abstract, and jumping the position of the abstract displayed on the dialog interface to the position of the target associated text.

Based on the scenario illustrated in fig. 5B, in step S613, the target associated texts related to the meeting notification (the target reference text 50) are selected as the associated text 1, the associated text 2, and the associated text 3, as shown in fig. 7A, when the user clicks or presses the position of the summary 51, a floating list 70 is displayed, in the floating list 70, the associated labels of the target associated texts are displayed, the associated labels may be ranked according to the value of the degree of association, the associated text with the highest degree of association is labeled as relevance 1, and the relevance 2 and the relevance 3 are analogized.

As shown in fig. 7B, when the user clicks or long-presses the position of the association mark, and when the user clicks the association mark of the correlation 1, the position of the dialog interface display summary 51 shown in fig. 7A directly jumps to the position of the association text 71 corresponding to the correlation 1, and the position of the association text 71 is as shown in fig. 7C.

Further, as shown in fig. 8, after S610 to S613, the method further includes:

s618: and responding to the triggering operation of the abstract, and jumping to the position of the target reference text from the position of the abstract displayed by the dialogue interface.

Fig. 7A provides a scenario in which when the user clicks or long-presses the position of the abstract 51, a floating list 70 is displayed, and the home position mark (e.g., home position) of the target reference text 50 is displayed in the floating list 70.

When the user clicks or long-clicks on the location of the location marker (home location), the location of the summary 51 displayed by the dialog interface jumps directly to the home location of the target reference text 50.

The information display method comprises the steps of determining a target citation text cited in a conversation interface by a user, calculating first score values of at least two sentences in the target citation text, selecting the target sentences of the at least two sentences, of which the first score values are higher than a score threshold value, as abstracts, and displaying the abstracts in the conversation interface. Therefore, the abstract is extracted from the target citation text and displayed in the conversation interface, the user can intuitively know the main content of the target citation text, and the user experience is improved. In addition, by calculating the first score value of the sentence in the target citation text and only taking the target sentence with the first score value higher than the score threshold value as the abstract, the abstract extraction method provided by the embodiment of the application is adopted, so that the extracted abstract is more accurate and is more suitable for the subject matter of the target citation text.

In addition, by selecting the target associated information associated with the target reference text, the position of the abstract displayed by the dialog interface can be directly jumped to the position of the target associated information in response to the triggering operation of the abstract, and the associated information of the target reference text and the context is provided for the user, so that the purpose of association between the target reference text and the context is achieved, the understanding of the user on the target reference text is enhanced, and the user experience is further improved.

Furthermore, by responding to the triggering operation of the abstract, the position of the abstract displayed by the dialogue interface can be directly jumped to the original position of the target reference text, so that the user can read the content of the complete target reference text conveniently, the understanding of the user to the target reference text is enhanced, and the user experience is further improved.

It should be noted that, in the information display method provided in the embodiment of the present application, the execution main body may be an information display device, or a control module for executing the information display method in the information display device. In the embodiment of the present application, an information display device executing an information display method is taken as an example, and the information display device provided in the embodiment of the present application is described.

Fig. 9 is a schematic structural diagram of an information display device provided in an embodiment of the present application, where the device 900 includes: a determination module 910, a first calculation module 920, a first selection module 930, and a display module 940.

The determining module 910 is configured to determine a target reference text that is referenced in the dialog interface by the user. The first calculating module 920 is used for calculating first score values of at least two sentences in the target reference text. The first selecting module 930 is configured to select a target sentence of the at least two sentences, of which the first score value is higher than a score threshold, as the abstract. The display module 940 is configured to display the summary in the dialog interface.

The information display device determines a target citation text cited in a conversation interface by a user, calculates first score values of at least two sentences in the target citation text, selects a target sentence with the first score value higher than a score threshold value from the at least two sentences as a summary, and displays the summary in the conversation interface. Therefore, the abstract is extracted from the target citation text and displayed in the conversation interface, the user can intuitively know the main content of the target citation text, and the user experience is improved.

In one possible implementation, the first calculation module 920 includes:

and the semantic representation unit is used for performing semantic representation on at least two sentences in the target reference text. And the processing unit is used for carrying out averaging processing on at least two sentences subjected to semantic representation to obtain processed sentences. A first calculating unit for calculating a first score value of the processed sentence.

In one possible implementation, the first selecting module 930 includes: and the combining unit is used for combining the sentences to obtain combined sentences. A second calculating unit for calculating a second score value of the combined sentence according to the first score value. A selecting unit, configured to select, as the target sentence, at least one target combined sentence in which the second score value is higher than a score threshold from the plurality of combined sentences, wherein the length of the target sentence does not exceed the display length threshold. In addition, by calculating the first score value of the sentence in the target citation text and only taking the target sentence with the first score value higher than the score threshold value as the abstract, the abstract extraction method provided by the embodiment of the application is adopted, so that the extracted abstract is more accurate and is more suitable for the subject matter of the target citation text.

In one possible implementation, the apparatus 900 further includes: and the second selecting module is used for selecting a plurality of to-be-selected associated texts associated with the target reference text within a preset time. And the analysis module is used for carrying out relevance analysis on the target reference text and the to-be-selected relevant text to obtain the relevance. And the ranking module is used for ranking each association degree and selecting the associated text to be selected with the ranking meeting the requirement as the target associated text. And the first skipping module is used for responding to the triggering operation of the abstract, and skipping from the position of the abstract displayed by the dialogue interface to the position of the target associated text.

In one possible implementation, the apparatus 900 further includes: a second skip module (not shown).

And the second jumping module is used for responding to the triggering operation of the abstract and jumping the position of the abstract displayed on the dialog interface to the position of the target reference text.

The apparatus 900 provided in this embodiment of the application can execute the methods in the foregoing method embodiments, and implement the functions and beneficial effects of the methods in the foregoing method embodiments, which are not described herein again.

The information display device in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine or a self-service machine, and the like, and the embodiments of the present application are not particularly limited.

The information display device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.

The information display device provided in the embodiment of the present application can implement each process implemented by the method embodiments of fig. 1 to 8, and is not described here again to avoid repetition.

Optionally, as shown in fig. 10, an electronic device 100 is further provided in this embodiment of the present application, and includes a processor 101, a memory 102, and a program or an instruction stored in the memory 102 and executable on the processor 101, where the program or the instruction is executed by the processor 101 to implement each process of the above-mentioned embodiment of the information display method, and can achieve the same technical effect, and no further description is provided here to avoid repetition.

Fig. 11 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.

The electronic device 1000 includes, but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, and a processor 1010.

Those skilled in the art will appreciate that the electronic device 1000 may further comprise a power source (e.g., a battery) for supplying power to various components, and the power source may be logically connected to the processor 1010 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system. The electronic device structure shown in fig. 11 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is not repeated here.

The system comprises a user input unit 1007 used for determining a target reference text referenced in a dialog interface by a user, a processor 1010 used for calculating first score values of at least two sentences in the target reference text, selecting a target sentence with the first score value higher than a score threshold value from the at least two sentences as a summary, and a display unit 1006 used for displaying the summary in the dialog interface.

The processor 1010 is further configured to semantically represent at least two sentences in the target reference text. And averaging at least two sentences subjected to semantic representation to obtain processed sentences. A first score value of the processed sentence is calculated.

The processor 1010 is further configured to combine the sentences to obtain a combined sentence. And calculating a second score value of the combined sentence according to the first score value. Selecting at least one target combined sentence with the second score value higher than a score threshold value from a plurality of combined sentences as the target sentence, wherein the length of the target sentence does not exceed the display length threshold value.

The processor 1010 is further configured to select a plurality of candidate associated texts associated with the target reference text within a predetermined time. And performing relevance analysis on the target reference text and the to-be-selected relevance text to obtain the relevance. Ranking each degree of association, and selecting the associated text to be selected with the ranking meeting the requirement as the target associated text. Responding to the triggering operation of the abstract, and jumping to the position of the target associated text from the position of the abstract displayed by the dialogue interface.

The processor 1010 is further configured to jump the position of the dialog interface where the abstract is displayed to the position where the target reference text is located in response to a trigger operation on the abstract.

The radio frequency unit 1001 may be configured to receive and transmit signals during information transmission and reception or during a call, and specifically, receive downlink data from a base station and then process the received downlink data to the processor 1010; in addition, the uplink data is transmitted to the base station. In general, radio frequency unit 1001 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. Further, the radio frequency unit 1001 may also communicate with a network and other devices through a wireless communication system.

The electronic device provides wireless broadband internet access to the user through the network module 1002, such as assisting the user in sending and receiving e-mails, browsing web pages, and accessing streaming media.

The audio output unit 1003 may convert audio data received by the radio frequency unit 1001 or the network module 1002 or stored in the memory 1009 into an audio signal and output as sound. The audio output unit 1003 includes a speaker, a buzzer, a receiver, and the like.

It should be understood that in the embodiment of the present application, the input Unit 1004 may include a Graphics Processing Unit (GPU) 10041 and a microphone 10042, and the Graphics Processing Unit 10041 processes image data of still pictures or videos obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode.

The display unit 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 1007 includes a touch panel 10071 and other input devices 10072. The touch panel 10071 is also referred to as a touch screen. The touch panel 10071 may include two parts, a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein. The memory 1009 may be used to store software programs as well as various data, including but not limited to application programs and operating systems. Processor 1010 may integrate an application processor that handles primarily operating systems, user interfaces, applications, etc. and a modem processor that handles primarily wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 1010.

The electronic device 1000 also includes at least one sensor 1005, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 10061 according to the brightness of ambient light and a proximity sensor that can turn off the display panel 10061 and/or the backlight when the electronic device 1000 moves to the ear.

The display unit 1006 is used to display information input by the user or information provided to the user (e.g., display a summary). The Display unit 1006 may include a Display panel 10061, and the Display panel 10061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.

The user input unit 1007 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device. Specifically, the user input unit 1007 includes a touch panel 10071 and other input devices 10072. The touch panel 10071, also referred to as a touch screen, may collect touch operations by a user on or near the touch panel 10071 (e.g., operations by a user on or near the touch panel 10071 using a finger, a stylus, or any other suitable object or attachment).

The touch panel 10071 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 1010, and receives and executes commands sent by the processor 1010. In addition, the touch panel 10071 may be implemented by various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 10071, the user input unit 1007 can include other input devices 10072. Specifically, the other input devices 10072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a track ball, a mouse, and a joystick, which are not described herein again.

Further, the touch panel 10071 can be overlaid on the display panel 10061, and when the touch panel 10071 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 1010 to determine the type of the touch event, and then the processor 1010 provides a corresponding visual output on the display panel 10061 according to the type of the touch event. Although in fig. 11, the touch panel 10071 and the display panel 10061 are two independent components for implementing the input and output functions of the electronic device, in some embodiments, the touch panel 10071 and the display panel 10061 may be integrated to implement the input and output functions of the electronic device, and the implementation is not limited herein.

The interface unit 1008 is an interface for connecting an external device to the electronic apparatus 1000. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 1008 may be used to receive input from external devices (e.g., data information, power, etc.) and transmit the received input to one or more elements within the electronic device 1000 or may be used to transmit data between the electronic device 1000 and the external devices.

The memory 1009 may be used to store software programs as well as various data. The memory 1009 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, and the like), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 1009 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.

The processor 1010 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by operating or executing software programs and/or modules stored in the memory 1009 and calling data stored in the memory 1009, thereby integrally monitoring the electronic device. Processor 1010 may include one or more processing units; preferably, the processor 1010 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 1010.

The electronic device determines a target citation text quoted in a conversation interface by a user, calculates first score values of at least two sentences in the target citation text, selects a target sentence with the first score value higher than a score threshold value in the at least two sentences as a summary, and displays the summary in the conversation interface. Therefore, the abstract is extracted from the target citation text and displayed in the conversation interface, the user can intuitively know the main content of the target citation text, and the user experience is improved. In addition, by calculating the first score value of the sentence in the target citation text and only taking the target sentence with the first score value higher than the score threshold value as the abstract, the abstract extraction method provided by the embodiment of the application is adopted, so that the extracted abstract is more accurate and is more suitable for the subject matter of the target citation text.

The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the above-mentioned information display method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.

The processor is the processor in the electronic device in the above embodiment. Readable storage media, including computer-readable storage media, such as Read-Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, etc.

The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to execute a program or an instruction to implement each process of the above information display method embodiment, and can achieve the same technical effect, and in order to avoid repetition, the description is omitted here.

It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.

It should be noted that, in this document, 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 like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.

Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, or a network device) to execute the method of the embodiments of the present application.

While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:一种利用预训练模型的吉布斯受限文本摘要生成方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!