CN110969025A - Text comment method and electronic equipment - Google Patents

Text comment method and electronic equipment Download PDF

Info

Publication number
CN110969025A
CN110969025A CN201911134059.9A CN201911134059A CN110969025A CN 110969025 A CN110969025 A CN 110969025A CN 201911134059 A CN201911134059 A CN 201911134059A CN 110969025 A CN110969025 A CN 110969025A
Authority
CN
China
Prior art keywords
target
target text
semantic analysis
text segment
comment
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
CN201911134059.9A
Other languages
Chinese (zh)
Other versions
CN110969025B (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201911134059.9A priority Critical patent/CN110969025B/en
Publication of CN110969025A publication Critical patent/CN110969025A/en
Application granted granted Critical
Publication of CN110969025B publication Critical patent/CN110969025B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the invention discloses a text commenting method and electronic equipment. The text comment method comprises the following steps: performing semantic analysis on the target text to obtain a first semantic analysis result; determining a target text segment in the target text according to the first semantic analysis result; and inserting the target comment information into a target position corresponding to the target text segment in the target text. The embodiment of the invention can solve the problem that in the prior art, all comment information is mixed and displayed at the end of the text, so that a user can not read the comment information conveniently.

Description

Text comment method and electronic equipment
Technical Field
The embodiment of the invention relates to the field of text processing, in particular to a text comment method and electronic equipment.
Background
Due to the convenience of electronic devices, more and more users prefer to read electronic books through electronic devices. During reading, a user usually makes comments in a comment area of a read book to express evaluation and feeling of the book.
At present, all comments of a book are usually displayed in a comment area at the end of a text of the electronic book in a mixed manner, so that the displayed comments are very confused, the comments are inconvenient for a user to read, the reading experience of the user is reduced, and the reading interest of the user is reduced.
Disclosure of Invention
The embodiment of the invention provides a text comment method and electronic equipment, and aims to solve the problem that in the prior art, all comment information is displayed at the end of a text in a mixed mode, and a user cannot read the comment information conveniently.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a text comment method, which is applied to an electronic device, and the method includes:
performing semantic analysis on the target text to obtain a first semantic analysis result;
determining a target text segment in the target text according to the first semantic analysis result;
and inserting the target comment information into a target position corresponding to the target text segment in the target text.
In a second aspect, an embodiment of the present invention provides an electronic device, including:
the first semantic analysis module is used for performing semantic analysis on the target text to obtain a first semantic analysis result;
the text segment determining module is used for determining a target text segment in the target text according to the first semantic analysis result;
and the comment information inserting module is used for inserting the target comment information into a target position corresponding to the target text segment in the target text.
In a third aspect, an embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a computer program stored on the memory and executable on the processor, and when executed by the processor, the computer program implements the steps of the text comment method according to the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the text comment method according to the first aspect.
In the embodiment of the invention, the target text can be subjected to semantic analysis to obtain the first semantic analysis result, so that the target text segment corresponding to the target comment information can be determined based on the first semantic analysis result, and the target comment information is inserted into the target position corresponding to the target text segment in the target text, so that the target comment information can be displayed in association with the target text segment, and the comment information is not mixed and displayed at the tail of the target text, so that a user can directly read the target comment information at the target position corresponding to the target text segment, and the user can read interested comment information while reading the target text segment, thereby improving the reading experience of the user and improving the reading interest of the user.
Drawings
The present invention will be better understood from the following description of specific embodiments thereof taken in conjunction with the accompanying drawings, in which like or similar reference characters designate like or similar features.
Fig. 1 is a schematic flowchart of a text comment method according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a text comment method according to another embodiment of the present invention;
FIG. 3 is a flowchart illustrating a text comment method according to another embodiment of the present invention;
FIG. 4 is a flowchart illustrating a text comment method according to yet another embodiment of the present invention;
FIG. 5 is a schematic diagram of a text display interface provided by an embodiment of the invention;
FIG. 6 is a schematic diagram of a text display interface according to another embodiment of the invention;
FIG. 7 is a schematic diagram of a text display interface according to another embodiment of the invention;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 9 is a schematic diagram of a hardware structure of an electronic device implementing various embodiments of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
At present, in the process of reading an electronic book by a user through electronic equipment, all comments of the book are usually displayed in a comment area at the end of the text of the electronic book in a mixed manner, and under the condition that the number of the comments is large, the displayed comments are very disordered, so that the user cannot read the comments conveniently, the reading experience of the user is reduced, and the reading interest of the user is reduced.
Meanwhile, if the comment area is only arranged at the tail of the text of the electronic book, the user cannot express his own idea on an impromptu basis under the condition that the user feels about a certain text segment, so that the comment of the user lacks instantaneity, and the reading experience of the user is further reduced.
In order to solve the problems in the prior art, embodiments of the present invention provide a text comment method, an electronic device, and a computer-readable storage medium. First, the text comment method provided by the embodiment of the present invention will be described in detail.
Fig. 1 shows a flowchart of a text comment method according to an embodiment of the present invention. The text comment method as shown in fig. 1 is performed by an electronic device. The text comment method can comprise the following steps:
s110, performing semantic analysis on the target text to obtain a first semantic analysis result;
s120, determining a target text segment in the target text according to the first semantic analysis result;
and S130, inserting the target comment information into a target position corresponding to the target text segment in the target text.
In the embodiment of the invention, the target text can be subjected to semantic analysis to obtain the first semantic analysis result, so that the target text segment corresponding to the target comment information can be determined based on the first semantic analysis result, and the target comment information is inserted into the target position corresponding to the target text segment in the target text, so that the target comment information can be displayed in association with the target text segment, and the comment information is not mixed and displayed at the tail of the target text, so that a user can directly read the target comment information at the target position corresponding to the target text segment, and the user can read interested comment information while reading the target text segment, thereby improving the reading experience of the user and improving the reading interest of the user.
In some embodiments of the present invention, the electronic device may be a server that provides an electronic book. In other embodiments of the present invention, the electronic device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, and a pedometer, as long as the electronic device can provide the function of reading an electronic book for a user.
In the embodiment of the present invention, the target text may be a text being read by the user through the electronic device, or may be a text stored inside the server. Moreover, the target text may be a complete electronic book, a chapter of content in the electronic book, or a page of content being read by the user.
In some embodiments of the present invention, the specific method of S110 may include:
and performing semantic analysis on the target text by using a preset semantic analysis model to obtain a first semantic analysis result of the target text.
The semantic analysis model can be obtained by training a cyclic neural network or a semantic analysis network, and the training samples can be obtained by extracting and marking artificial features of text samples.
It should be noted that, the method for obtaining the training sample and the training text semantic analysis model in the embodiment of the present invention is not limited, and the method for obtaining the training sample and the training text semantic analysis model may be the same as the existing method in principle, and is not described herein again.
In these embodiments, the text analysis result of the first semantic analysis result may include association and distinction between each word in the target text.
Therefore, in S120 according to some embodiments of the present invention, the target text may be subjected to plot division according to the association and distinction between the front and the back of each word in the target text, so as to determine the target text segment in the target text.
In the embodiment of the present invention, the target text segment may be a chapter, a paragraph in a chapter, or a sentence or several sentences in a paragraph of the electronic book, as long as the target text segment can be used for representing a story line. The story line includes, but is not limited to, a story line, a certain segment of text, author descriptive text, relationships between characters, atmosphere description, and the like.
In some embodiments of the present invention, the target position in the target text corresponding to the target text segment may be an end position of the target text segment in the target text. And the ending position of the target text segment in the target text is the position of the last character of the target text segment in the target text. Therefore, after the target text segment is read, the user can directly read the target comment information corresponding to the target text segment at the end position of the target text segment.
In other embodiments of the present invention, the target position in the target text corresponding to the target text segment may also be a starting position of the target text segment in the target text. And the starting position of the target text segment in the target text is the position of the first character of the target text segment in the target text.
In some embodiments of the present invention, the target position in the target text corresponding to the target text segment may also be a position adjacent to the segment position of the target text segment in the target text. The segment position of the target text segment in the target text may be a region between a first line of characters of the target text segment and a position where a last line of characters of the target text segment is located in the target text. Alternatively, the position adjacent to the segment position may be a position corresponding to the segment position in the independent comment display area on the left or right side of the target text display area.
Fig. 2 is a flowchart illustrating a text comment method according to another embodiment of the present invention. The text comment method as shown in fig. 2 is performed by an electronic device. The text comment method can comprise the following steps:
s210, performing semantic analysis on the target text to obtain a first semantic analysis result;
s220, obtaining target comment information;
s230, performing semantic analysis on the target comment information to obtain a second semantic analysis result;
s240, determining a target text segment matched with the target comment information in the target text according to the first semantic analysis result and the second semantic analysis result;
and S250, inserting the target comment information into a target position corresponding to the target text segment in the target text.
It should be noted that the order between S210 and S230 in the embodiment of the present invention is not limited, and may be the same as the embodiment shown in fig. 2, or different from the embodiment shown in fig. 2, as long as it is ensured that S220 and S230 are executed before S240. S210 in the embodiment shown in fig. 2 is similar to S110 in the embodiment shown in fig. 1, and S250 in the embodiment shown in fig. 2 is similar to S130 in the embodiment shown in fig. 1, and thus the description thereof is omitted.
In some embodiments of the present invention, when the electronic device is a server storing an electronic book, the obtained target comment information may be history comment information already stored in the server, or comment information instantly received by the server from the electronic device for reading the electronic book.
In other embodiments of the present invention, when the electronic device is an electronic device for reading an electronic book, the obtained target comment information may be comment information received immediately or history comment information obtained from a server storing the electronic book.
In some examples, after obtaining the target comment information, the electronic device may first determine whether an input position of the target comment information is a specific first position, where the specific first position refers to any position in the target text. If the position is the first position, inserting the target comment information into a target position corresponding to the target text segment in the target text by using the following method, which is not described herein; and if the position is not the first position, performing semantic analysis on the target comment information to obtain a second semantic analysis result corresponding to the target comment information, and determining a target text segment matched with the target comment information in the target text according to the first semantic analysis result and the second semantic analysis result.
The specific method for obtaining the second semantic analysis result by performing semantic analysis on the target comment information is similar to the method for obtaining the first semantic analysis result by performing semantic analysis on the target text, and is not repeated here.
In other examples, after the electronic device obtains the target comment information, the electronic device may also directly perform semantic analysis on the target comment information without analyzing an input position of the target comment information to obtain a second semantic analysis result corresponding to the target comment information, and determine a target text segment matched with the target comment information in the target text according to the first semantic analysis result and the second semantic analysis result.
In S240 of the embodiment of the present invention, after the second semantic analysis result corresponding to the target comment information is determined, the second semantic analysis result and the first semantic analysis result may be compared, and according to the comparison result, a target text segment with the highest content similarity is matched for the target comment information in the target text.
Therefore, in the embodiment of the invention, the instant comment information of the user and the historical comment information in the server can be subjected to semantic analysis, and the comment information is directly inserted into the target position corresponding to the target text segment in the target text by using the second semantic analysis result, so that the comment is displayed more flexibly and has higher degree of engagement with the target text content.
Fig. 3 is a flowchart illustrating a text comment method according to another embodiment of the present invention. The text comment method shown in fig. 3 is executed by an electronic device. The text comment method can comprise the following steps:
s310, performing semantic analysis on the target text to obtain a first semantic analysis result;
s320, receiving target comment information input by a user at a first position;
s330, splitting the target text into at least two text segments according to the first semantic analysis result, and determining the text segment corresponding to the first position as the target text segment;
and S340, inserting the target comment information into a target position corresponding to the target text segment in the target text.
It should be noted that the order between S310 and S320 in the embodiment of the present invention is not limited, and may be the same as the embodiment shown in fig. 3, or different from the embodiment shown in fig. 3, as long as it is ensured that S320 is executed before S330. Moreover, S310 in the embodiment shown in fig. 3 is similar to S110 in the embodiment shown in fig. 1, and S340 in the embodiment shown in fig. 3 is similar to S130 in the embodiment shown in fig. 1, and thus the description thereof is omitted.
In some embodiments of the present invention, when the electronic device is a server storing an electronic book, the obtained target comment information may be history comment information already stored in the server, or comment information instantly received by the server from the electronic device for reading the electronic book.
In other embodiments of the present invention, when the electronic device is an electronic device for reading an electronic book, the obtained target comment information may be comment information received immediately or history comment information obtained from a server storing the electronic book.
Specifically, an electronic device for reading an electronic book may display a text input area at a first location in a target text, such that the electronic device may receive target comment information input by a user at the first location using the text input area.
If the input position of the target comment information is determined to be the first position, the target text can be subjected to plot division according to the first semantic analysis result, the target text is divided into at least two text segments, the text segment to which the first input belongs is searched, and the searched text segment is determined to be the target text segment.
Thus, the user can perform interactive input operation on the text input area in the target text, and the electronic equipment can display the target comment information at the target position corresponding to the target text segment in the target text. Therefore, the embodiment of the invention can extract a large amount of comment information and disperse the comment information to the corresponding position of each related text segment, thereby reducing the information complexity when a user reads the comment information, leading the topic concentration to be higher and leading the relevance of the comment information and the text segment to be larger.
Fig. 4 is a flowchart illustrating a text comment method according to still another embodiment of the present invention. The text comment method shown in fig. 4 is executed by an electronic device. The text comment method can comprise the following steps:
s410, performing semantic analysis on the target text to obtain a first semantic analysis result;
s420, determining a target text segment in the target text according to the first semantic analysis result;
s430, inserting the target comment information into a target position corresponding to the target text segment in the target text;
s440, determining a contextual characteristic score of the target text segment, wherein the contextual characteristic score comprises at least one of a topicality score and an importance score;
and S450, determining the display state of the comment entrance of the target text segment according to the contextual characteristic score.
It should be noted that S410-S420 in the embodiment shown in fig. 4 are similar to S110-S120 in the embodiment shown in fig. 1, and are not repeated here.
In S430 of some embodiments of the present invention, a specific method for inserting the target comment information into the target position corresponding to the target text segment in the target text is as follows:
and inserting the target comment information into a comment entrance displayed at a target position corresponding to the target text segment in the target text.
FIG. 5 is a diagram illustrating a text display interface provided by an embodiment of the invention. In some examples, as shown in fig. 5, the target location may be an end location of the target text segment, a comment entry is displayed at the target location, and the comment entry may display the amount of comment information currently associated with the target text segment.
In the example shown in fig. 5, the entry address of the comment entry may be associated with the comment address of the comment information associated with the target text segment. The comment address of the comment information and the entry address of the comment entry of the corresponding text segment can be stored in an associated mode, so that a user can view the comment information corresponding to the text segment by clicking the comment entry.
Fig. 6 is a schematic diagram of a text display interface according to another embodiment of the present invention. Continuing with the example shown in FIG. 5, when the user clicks on the comment entry, comment information associated with the target text segment may be displayed in the display area of the next line of the last character of the target text segment.
Fig. 7 is a schematic diagram of a text display interface according to another embodiment of the present invention. In other examples, as shown in fig. 7, the target position is located in a right area of the target text display area, and specifically, the target position is located in a right area of the target text segment corresponding to any position from the first line character to the last line character of the target text segment. The comment entry may only display the number of comment information currently associated with the target text segment, and may further display several most popular comment information, which is not limited herein.
In some embodiments of the present invention, the contextual characteristic score includes a topicality score and an importance score, and may be a manual score, or a score for scoring the target text segment according to a preset topicality score model or an importance score model, which is not limited herein.
In addition, any one of the topicality score and the importance score may be used as the contextual characteristic score, a weighted sum of the topicality score and the importance score may be calculated according to a preset weight and used as the contextual characteristic score, and the topicality score may be determined based on a comment frequency of the user on the target text segment and the importance score may be determined based on a search frequency of the user on the target text segment, which is not limited herein.
In some embodiments of the present invention, if the contextual characteristic score reaches a preset score threshold, determining that the display state of the comment entry of the target text segment is display; and if the contextual characteristic score does not reach the preset score threshold, determining that the display state of the comment entrance of the target text segment is hidden.
In an embodiment of the present invention, the text comment method may further include:
if the display state of the comment entry is display, the electronic equipment displays the comment entry; and if the display state of the comment entrance is hidden, the electronic equipment does not display the comment entrance.
Therefore, the comment entries which can be displayed in the target text can be dynamically adjusted, and interestingness and experience of the user during reading are further improved.
In the embodiment of the invention, the contextual characteristic score of the target text segment can be reevaluated at preset time intervals, so that the display state of the comment entry of the target text segment can be dynamically adjusted, the comment entry capable of being displayed in the target text can be dynamically adjusted according to the value of the target text segment, the interest and experience of a user during reading can be further improved, the communication of the user can be promoted, meanwhile, the quality and pertinence of comment information and the comment entry can be improved, topics are more concentrated, and the high-quality content is favorably generated.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. As shown in fig. 8, the electronic device 500 includes:
the first semantic analysis module 510 is configured to perform semantic analysis on the target text to obtain a first semantic analysis result;
a text segment determining module 520, configured to determine a target text segment in the target text according to the first semantic analysis result;
and a comment information inserting module 530, configured to insert the target comment information into a target position in the target text corresponding to the target text segment.
In the embodiment of the invention, the target text can be subjected to semantic analysis to obtain the first semantic analysis result, so that the target text segment corresponding to the target comment information can be determined based on the first semantic analysis result, and the target comment information is inserted into the target position corresponding to the target text segment in the target text, so that the target comment information can be displayed in association with the target text segment, and the comment information is not mixed and displayed at the tail of the target text, so that a user can directly read the target comment information at the target position corresponding to the target text segment, and the user can read interested comment information while reading the target text segment, thereby improving the reading experience of the user and improving the reading interest of the user.
In some embodiments of the present invention, the electronic device 500 may be a server providing an ebook. In other embodiments of the present invention, the electronic device 500 includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, and a pedometer, as long as the electronic device can provide the function of reading an electronic book for the user.
In the embodiment of the present invention, the target text may be a text being read by the user through the electronic device 500, or may be a text stored inside the server. Moreover, the target text may be a complete electronic book, a chapter of content in the electronic book, or a page of content being read by the user.
In the embodiment of the present invention, the target text segment may be a chapter, a paragraph in a chapter, or a sentence or several sentences in a paragraph of the electronic book, as long as the target text segment can be used for representing a story line. The story line includes, but is not limited to, a story line, a certain segment of text, author descriptive text, relationships between characters, atmosphere description, and the like.
In some embodiments of the present invention, the target position in the target text corresponding to the target text segment may be an end position of the target text segment in the target text. And the ending position of the target text segment in the target text is the position of the last character of the target text segment in the target text. Therefore, after the target text segment is read, the user can directly read the target comment information corresponding to the target text segment at the end position of the target text segment.
In other embodiments of the present invention, the target position in the target text corresponding to the target text segment may also be a starting position of the target text segment in the target text. And the starting position of the target text segment in the target text is the position of the first character of the target text segment in the target text.
In some embodiments of the present invention, the target position in the target text corresponding to the target text segment may also be a position adjacent to the segment position of the target text segment in the target text. The segment position of the target text segment in the target text may be a region between a first line of characters of the target text segment and a position where a last line of characters of the target text segment is located in the target text. Alternatively, the position adjacent to the segment position may be a position corresponding to the segment position in the independent comment display area on the left or right side of the target text display area.
In some embodiments of the present invention, the first semantic analysis module 510 may be specifically configured to perform semantic analysis on the target text by using a preset semantic analysis model to obtain a first semantic analysis result of the target text.
The semantic analysis model can be obtained by training a cyclic neural network or a semantic analysis network, and the training samples can be obtained by extracting and marking artificial features of text samples.
In these embodiments, the text analysis result of the first semantic analysis result may include association and distinction between each word in the target text.
Therefore, in the embodiment of the invention, the target text can be subjected to plot division according to the association and difference of the front and the back of each character in the target text, so that the target text segment in the target text is determined.
In some embodiments of the present invention, the electronic device 500 may further include:
the first comment acquisition module is used for acquiring target comment information;
and the second semantic analysis module is used for performing semantic analysis on the target comment information to obtain a second semantic analysis result.
At this time, optionally, the text segment determining module 520 is specifically configured to determine, according to the first semantic analysis result and the second semantic analysis result, a target text segment that matches the target comment information in the target text.
Therefore, in the embodiment of the invention, the instant comment information of the user and the historical comment information in the server can be subjected to semantic analysis, and the comment information is directly inserted into the target position corresponding to the target text segment in the target text by using the second semantic analysis result, so that the comment is displayed more flexibly and has higher degree of engagement with the target text content.
In some embodiments of the present invention, the electronic device 500 may further include:
the second comment acquisition module is used for receiving target comment information input by a user at the first position;
at this time, optionally, the text segment determining module 520 is specifically configured to split the target text into at least two text segments according to the first semantic analysis result, and determine the text segment corresponding to the first position as the target text segment.
Thus, the user can perform an interactive input operation on the text input region in the target text and cause the electronic device 500 to display the target comment information at the target position in the target text corresponding to the target text segment. Therefore, the embodiment of the invention can extract a large amount of comment information and disperse the comment information to the corresponding position of each related text segment, thereby reducing the information complexity when a user reads the comment information, leading the topic concentration to be higher and leading the relevance of the comment information and the text segment to be larger.
In some embodiments of the present invention, the electronic device 500 may further include:
a contextual characteristic determination module for determining a contextual characteristic score for the target text segment, wherein the contextual characteristic score comprises at least one of a topicality score and an importance score; (ii) a
And the comment entrance display module is used for determining the display state of the comment entrance of the target text segment according to the contextual characteristic score. The electronic device 500 provided in the embodiment of the present invention can implement each process implemented by the electronic device in the text comment method embodiments of fig. 1 to fig. 7, and for avoiding repetition, details are not described here again.
Fig. 9 is a schematic diagram of a hardware structure of an electronic device implementing various embodiments of the present invention. As shown in fig. 9, the electronic device 600 includes, but is not limited to: a radio frequency unit 601, a network module 602, an audio output unit 603, an input unit 604, a sensor 605, a display unit 606, a user input unit 607, an interface unit 608, a memory 609, a processor 610, and a power supply 611. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 9 does not constitute a limitation of the electronic device, and that the electronic device may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the electronic device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
The processor 610 is configured to perform semantic analysis on the target text to obtain a first semantic analysis result; determining a target text segment in the target text according to the first semantic analysis result; and inserting the target comment information into a target position corresponding to the target text segment in the target text.
In the embodiment of the invention, the target text can be subjected to semantic analysis to obtain the first semantic analysis result, so that the target text segment corresponding to the target comment information can be determined based on the first semantic analysis result, and the target comment information is inserted into the target position corresponding to the target text segment in the target text, so that the target comment information can be displayed in association with the target text segment, and the comment information is not mixed and displayed at the tail of the target text, so that a user can directly read the target comment information at the target position corresponding to the target text segment, and the user can read interested comment information while reading the target text segment, thereby improving the reading experience of the user and improving the reading interest of the user.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 601 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 610; in addition, the uplink data is transmitted to the base station. In general, radio frequency unit 601 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 601 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 via the network module 602, such as assisting the user in sending and receiving e-mails, browsing web pages, and accessing streaming media.
The audio output unit 603 may convert audio data received by the radio frequency unit 601 or the network module 602 or stored in the memory 609 into an audio signal and output as sound. Also, the audio output unit 603 may also provide audio output related to a specific function performed by the electronic apparatus 600 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 603 includes a speaker, a buzzer, a receiver, and the like.
The input unit 604 is used to receive audio or video signals. The input Unit 604 may include a Graphics Processing Unit (GPU) 6041 and a microphone 6042, and the Graphics processor 6041 processes image data of a still picture or video obtained by an image capturing apparatus (such as a camera) in a video capture mode or an image capture mode. The processed image frames may be displayed on the display unit 606. The image frames processed by the graphic processor 6041 may be stored in the memory 609 (or other storage medium) or transmitted via the radio frequency unit 601 or the network module 602. The microphone 6042 can receive sound, and can process such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 601 in case of the phone call mode.
The electronic device 600 also includes at least one sensor 605, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 6061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 6061 and/or the backlight when the electronic apparatus 600 is moved to the ear. As one type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of an electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 605 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
The display unit 606 is used to display information input by the user or information provided to the user. The Display unit 606 may include a Display panel 6061, and the Display panel 6061 may be configured by a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 607 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 607 includes a touch panel 6071 and other input devices 6072. Touch panel 6071, also referred to as a touch screen, may collect touch operations by a user on or near it (e.g., operations by a user on or near touch panel 6071 using a finger, stylus, or any suitable object or accessory). The touch panel 6071 may include two parts of 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 610, receives a command from the processor 610, and executes the command. In addition, the touch panel 6071 can be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The user input unit 607 may include other input devices 6072 in addition to the touch panel 6071. Specifically, the other input devices 6072 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 6071 can be overlaid on the display panel 6061, and when the touch panel 6071 detects a touch operation on or near the touch panel 6071, the touch operation is transmitted to the processor 610 to determine the type of the touch event, and then the processor 610 provides a corresponding visual output on the display panel 6061 according to the type of the touch event. Although the touch panel 6071 and the display panel 6061 are shown in fig. 9 as two separate components to implement the input and output functions of the electronic device, in some embodiments, the touch panel 6071 and the display panel 6061 may be integrated to implement the input and output functions of the electronic device, and this is not limited here.
The interface unit 608 is an interface for connecting an external device to the electronic apparatus 600. 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 608 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the electronic device 600 or may be used to transmit data between the electronic device 600 and external devices.
The memory 609 may be used to store software programs as well as various data. The memory 609 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, etc.), 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 609 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 610 is a control center of the electronic device, connects various parts of the whole electronic device by using various interfaces and lines, performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 609, and calling data stored in the memory 609, thereby performing overall monitoring of the electronic device. Processor 610 may include one or more processing units; preferably, the processor 610 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 the processor 610.
The electronic device 600 may further include a power supply 611 (e.g., a battery) for supplying power to the various components, and preferably, the power supply 611 may be logically connected to the processor 610 via a power management system, such that the power management system may be used to manage charging, discharging, and power consumption.
In addition, the electronic device 600 includes some functional modules that are not shown, and are not described in detail herein.
Preferably, an embodiment of the present invention further provides an electronic device, which includes a processor 610, a memory 609, and a computer program stored in the memory 609 and capable of running on the processor 610, where the computer program, when executed by the processor 610, implements each process of the text comment method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not described here again.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the text comment method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
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.
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 invention may be embodied in the form of a 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, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (10)

1. A text comment method is applied to an electronic device, and is characterized by comprising the following steps:
performing semantic analysis on the target text to obtain a first semantic analysis result;
determining a target text segment in the target text according to the first semantic analysis result;
and inserting target comment information into a target position corresponding to the target text segment in the target text.
2. The method according to claim 1, wherein before determining the target text segment in the target text according to the first semantic analysis result, the method further comprises:
acquiring the target comment information;
performing semantic analysis on the target comment information to obtain a second semantic analysis result;
determining a target text segment in the target text according to the first semantic analysis result, specifically including:
and determining a target text segment matched with the target comment information in the target text according to the first semantic analysis result and the second semantic analysis result.
3. The method according to claim 1, wherein before determining the target text segment in the target text according to the first semantic analysis result, the method further comprises:
receiving the target comment information input by a user at a first position;
determining a target text segment in the target text according to the first semantic analysis result, specifically including:
according to the first semantic analysis result, the target text is split into at least two text segments, and the text segment corresponding to the first position is determined as the target text segment.
4. The method of claim 1, wherein the target position in the target text corresponding to the target text segment is an end position of the target text segment in the target text.
5. The method of claim 1, further comprising:
determining a contextual characteristic score for the target text segment, wherein the contextual characteristic score comprises at least one of a topicality score and an importance score;
and determining the display state of the comment entrance of the target text segment according to the contextual characteristic score.
6. An electronic device, comprising:
the first semantic analysis module is used for performing semantic analysis on the target text to obtain a first semantic analysis result;
the text segment determining module is used for determining a target text segment in the target text according to the first semantic analysis result;
and the comment information inserting module is used for inserting the target comment information into a target position corresponding to the target text segment in the target text.
7. The apparatus of claim 6, further comprising:
the first comment acquisition module is used for acquiring the target comment information;
the second semantic analysis module is used for performing semantic analysis on the target comment information to obtain a second semantic analysis result;
the text segment determining module is specifically configured to determine, according to the first semantic analysis result and the second semantic analysis result, a target text segment that is matched with the target comment information in the target text.
8. The apparatus of claim 6, further comprising:
the second comment acquisition module is used for receiving the target comment information input by the user at the first position;
the text segment determining module is specifically configured to split the target text into at least two text segments according to the first semantic analysis result, and determine a text segment corresponding to the first position as a target text segment.
9. The apparatus of claim 6, wherein a target position in the target text corresponding to the target text segment is an end position of the target text segment in the target text.
10. The apparatus of claim 6, further comprising:
a contextual characteristic determination module to determine a contextual characteristic score for the target text segment, wherein the contextual characteristic score comprises at least one of a topicality score and an importance score; (ii) a
And the comment entrance display module is used for determining the display state of the comment entrance of the target text segment according to the contextual characteristic score.
CN201911134059.9A 2019-11-19 2019-11-19 Text comment method and electronic equipment Active CN110969025B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911134059.9A CN110969025B (en) 2019-11-19 2019-11-19 Text comment method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911134059.9A CN110969025B (en) 2019-11-19 2019-11-19 Text comment method and electronic equipment

Publications (2)

Publication Number Publication Date
CN110969025A true CN110969025A (en) 2020-04-07
CN110969025B CN110969025B (en) 2024-01-23

Family

ID=70030817

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911134059.9A Active CN110969025B (en) 2019-11-19 2019-11-19 Text comment method and electronic equipment

Country Status (1)

Country Link
CN (1) CN110969025B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102317932A (en) * 2010-05-07 2012-01-11 株式会社富塞特网 Electronic book system and content server
CN104571818A (en) * 2014-12-26 2015-04-29 网易(杭州)网络有限公司 Method and device for displaying article comments
US20170034107A1 (en) * 2015-07-29 2017-02-02 International Business Machines Corporation Annotating content with contextually relevant comments
US20170286416A1 (en) * 2016-03-31 2017-10-05 Microsoft Technology Licensing, Llc User interface for navigating comments associated with collaboratively edited electronic documents
CN108376134A (en) * 2018-04-19 2018-08-07 安徽商贸职业技术学院 A kind of electric business online comment text word analysis method based on position-order statistics
CN109992342A (en) * 2019-03-25 2019-07-09 上海连尚网络科技有限公司 A kind of information display method and equipment based on novel

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102317932A (en) * 2010-05-07 2012-01-11 株式会社富塞特网 Electronic book system and content server
CN104571818A (en) * 2014-12-26 2015-04-29 网易(杭州)网络有限公司 Method and device for displaying article comments
US20170034107A1 (en) * 2015-07-29 2017-02-02 International Business Machines Corporation Annotating content with contextually relevant comments
US20170286416A1 (en) * 2016-03-31 2017-10-05 Microsoft Technology Licensing, Llc User interface for navigating comments associated with collaboratively edited electronic documents
CN108376134A (en) * 2018-04-19 2018-08-07 安徽商贸职业技术学院 A kind of electric business online comment text word analysis method based on position-order statistics
CN109992342A (en) * 2019-03-25 2019-07-09 上海连尚网络科技有限公司 A kind of information display method and equipment based on novel

Also Published As

Publication number Publication date
CN110969025B (en) 2024-01-23

Similar Documents

Publication Publication Date Title
CN108632658B (en) Bullet screen display method and terminal
CN108415652B (en) Text processing method and mobile terminal
CN108494665B (en) Group message display method and mobile terminal
CN112689201B (en) Barrage information identification method, barrage information display method, server and electronic equipment
CN108668024B (en) Voice processing method and terminal
CN107783747B (en) Interface display processing method and mobile terminal
CN108376096B (en) Message display method and mobile terminal
CN111556371A (en) Note recording method and electronic equipment
CN109753202B (en) Screen capturing method and mobile terminal
CN109040444B (en) Call recording method, terminal and computer readable storage medium
CN110971510A (en) Message processing method and electronic equipment
CN108429855B (en) Message sending control method, terminal and computer readable storage medium
CN107992615B (en) Website recommendation method, server and terminal
CN110062281B (en) Play progress adjusting method and terminal equipment thereof
CN110308769B (en) Information display method and terminal
CN111143614A (en) Video display method and electronic equipment
CN109992753B (en) Translation processing method and terminal equipment
CN109063076B (en) Picture generation method and mobile terminal
CN111061446A (en) Display method and electronic equipment
CN109032380B (en) Character input method and terminal
CN108595107B (en) Interface content processing method and mobile terminal
CN110750198A (en) Expression sending method and mobile terminal
CN111273827B (en) Text processing method and electronic equipment
CN110032320B (en) Page rolling control method and device and terminal
CN107957789B (en) Text input method and mobile terminal

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