Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the drawings of the embodiments of the present invention. It is to be understood that the embodiments described are only a few embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the described embodiments of the invention without any inventive step, are within the scope of protection of the invention.
Unless defined otherwise, technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention belongs. The use of "first," "second," and similar terms in the present application do not denote any order, quantity, or importance, but rather the terms are used to distinguish one element from another. The word "comprising" or "comprises", and the like, means that the element or item listed before the word covers the element or item listed after the word and its equivalents, but does not exclude other elements or items. The terms "connected" or "coupled" and the like are not restricted to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", and the like are used merely to indicate relative positional relationships, and when the absolute position of the object being described is changed, the relative positional relationships may also be changed accordingly.
To maintain the following description of the embodiments of the present invention clear and concise, a detailed description of known functions and known components of the invention have been omitted.
A first embodiment of the present invention provides a keyword recommendation method, a flow of the method is shown in fig. 1, and the method includes steps S101 to S103:
s101, dividing a predetermined article into a plurality of parts.
For an article, in general, besides text content, picture content or video content may also be included, and thus, when a predetermined article is divided into a plurality of parts, the embodiment of the present invention may have a plurality of dividing manners. For example, the division may be performed according to paragraphs of the article, or may be performed according to positions of videos or pictures.
When the division is performed according to paragraphs of the article, for example, the first to third paragraphs of the article may be divided into one part, the fourth to eighth paragraphs of the article may be classified into one part, and the ninth to tenth paragraphs of the article may be classified into one part.
When dividing according to the position of the video or the picture, each picture or video can be taken as a dividing point, for example, each picture or video is divided into one part with the text content thereon.
S102, keywords are set for each part.
In the selection of the keyword, manual labeling may be performed manually according to the content of each divided part, or certainly, the keyword may be determined after machine learning is performed on each divided part, and the selection is not limited herein.
Under the condition that the keywords are determined, the keywords only need to be associated with each divided part, so that the keywords can be displayed later.
S103, when the display state of the preset part accords with the preset display condition, displaying the keywords of the preset part at the preset position of the first preset page of the preset article.
The predetermined portion may be any one of the divided portions, and the display state of the predetermined portion may be a display scale, a display position, or the like. In the implementation, as long as the display state meets the preset display condition, the keywords of the preset part can be displayed at the preset position of the first preset page.
The embodiment of the invention divides the predetermined article into a plurality of parts, and sets the keywords for each part, when the user reads the predetermined part, the keywords can be displayed on the first predetermined page displaying the predetermined article. The keywords displayed by the embodiment of the invention are the keywords which are most easily imagined by the user after the user reads the preset part, so that the user can perform searching operation based on the keywords, further view more related contents, and have better user experience.
A second embodiment of the present invention provides a keyword recommendation method, a flow of the method is shown in fig. 2, and the method includes steps S201 to S206:
s201, dividing a predetermined article into a plurality of parts.
For an article, in general, besides text content, picture content or video content may also be included, and thus, when a predetermined article is divided into a plurality of parts, the embodiment of the present invention may have a plurality of dividing manners. For example, the division may be performed according to paragraphs of the article, or may be performed according to positions of videos or pictures.
When the division is performed according to paragraphs of the article, for example, the first to third paragraphs of the article may be divided into one part, the fourth to eighth paragraphs of the article may be classified into one part, and the ninth to tenth paragraphs of the article may be classified into one part.
When dividing according to the position of the video or the picture, each picture or video can be taken as a dividing point, for example, each picture or video is divided into one part with the text content thereon.
S202, recording the starting position and the ending position of each part.
Marking the start position and the end position of each divided part, and then recording the start position and the end position, so that the current display position can be determined by the recorded start position, end position or a combination thereof. Further, the display scale of the predetermined part on the first predetermined page can be determined by the starting position and the ending position.
Of course, when the start position and the end position of each part are not recorded, the division node of each part can also be judged by the first word and the end word, but generally the accuracy is not high in this way.
S203, a keyword is set for each part.
In the selection of the keyword, manual labeling may be performed manually according to the content of each divided part, or certainly, the keyword may be determined after machine learning is performed on each divided part, and the selection is not limited herein.
In the process of setting the keyword, for example, the following processes may be included: acquiring all contents of a predetermined article; determining the keywords of each part according to a preset keyword extraction strategy and the content corresponding to each part; each keyword is associated with a respective predetermined portion of the keyword.
Specifically, for more convenient subsequent use of the keyword, the keyword may also be set as a search word associated with the search box.
And S204, when the display state of the predetermined part accords with the predetermined display condition, displaying the keywords of the predetermined part at the predetermined position of the first predetermined page of the predetermined article.
The predetermined portion may be any one of the divided portions, and the display state of the predetermined portion may be a display scale, a display position, or the like. Correspondingly, the predetermined display condition may be that the display scale reaches the predetermined display scale, the start position reaches the first predetermined position, and the end position reaches the second predetermined position. And displaying the keywords of the preset part at the preset position of the first preset page as long as the display state meets the preset display condition.
Of course, a person skilled in the art may also set according to actual requirements, for example, the display state may also be a display duration, and the keywords of the predetermined portion may also be displayed at the predetermined position of the first predetermined page of the predetermined article when the display duration of the predetermined portion reaches the predetermined display duration.
S205, detecting whether the keyword receives a search triggering operation. Since the displayed keyword has been previously associated with the search box, a search trigger operation may be received.
S206, under the condition that the keyword is detected to receive the search triggering operation, all links matched with the keyword are obtained, and the summary pages of all links are displayed in a second preset page.
The above process is described below with reference to a specific example.
Fig. 3, 4, 5, 6, and 7 are all contents of a piece of article, which includes three pictures, so that the pictures can be used as division nodes to divide the text content in the article into four parts.
After the embodiment of the present invention is adopted, when the user reads the contents of fig. 3 to fig. 7, the user can correspondingly see the pages of fig. 8, fig. 9, fig. 10, fig. 11, and fig. 12, respectively. In fig. 8 to 12, a search box is displayed above each page, a keyword corresponding to each portion in the search box is displayed in the search box, and a user only clicks the search box and searches for a corresponding link by using the keyword as a search word, for example, when the user clicks the search box in fig. 9, a link related to easy link establishment is searched, and a second predetermined page after the search may be as shown in fig. 13.
In fig. 8 to 12, since the positions where the articles are displayed in each graph are different, the keywords displayed in the search box in each graph may also be different.
In fig. 8, since the user just starts reading, only the first part of the text content is displayed in the entire article page, and therefore, the first part of the keywords is displayed in fig. 8.
Since the user is reading an article and slides the page, the content of the article displayed on the page in fig. 9 is already the second part of the text content, and therefore, the second part of the keywords are displayed in fig. 9.
The user continues to read downward and in fig. 10, the display scale of the second portion of text exceeds the display scale of the third portion of text, so that the keywords of the second portion are still displayed in fig. 10. Of course, the display ratio of the second part of the text content may be compared with the display ratio of the whole page, and the process is similar, which is not described herein again.
When the user reads the content shown in fig. 11, since the text content is the third part of text, the third part of keywords are shown in fig. 11.
When the user reads the content shown in fig. 12, since the text content is all the fourth part of text, the fourth part of keywords are shown in fig. 12.
The embodiment of the invention divides the predetermined article into a plurality of parts, and sets the keywords for each part, when the user reads the predetermined part, the keywords can be displayed on the first predetermined page displaying the predetermined article; when the keywords are displayed, the user can directly click on the keywords, and then related links are searched based on the keywords, so that the operation is simple and convenient. The keywords displayed by the embodiment of the invention are the keywords which are most easily imagined by the user after the user reads the preset part, so that the user can quickly search based on the keywords to further view more related contents, and the user experience is better.
A third embodiment of the present invention provides a keyword recommendation apparatus, a structural schematic of which is shown in fig. 14, including:
a dividing module 10 for dividing a predetermined article into a plurality of parts; a setting module 20 coupled to the dividing module 10 for setting keywords for each portion; and the display module 30 is coupled to the setting module 20 and configured to display the keyword of the predetermined portion at a predetermined position of a first predetermined page of the predetermined article when the display state of the predetermined portion meets a predetermined display condition.
For an article, in general, besides text content, picture content or video content may also be included, and therefore, when the predetermined article is divided into a plurality of parts, the dividing module 10 according to the embodiment of the present invention may have a plurality of dividing manners. For example, the division may be performed according to paragraphs of the article, or may be performed according to positions of videos or pictures.
When the division is performed according to paragraphs of the article, for example, the first to third paragraphs of the article may be divided into one part, the fourth to eighth paragraphs of the article may be classified into one part, and the ninth to tenth paragraphs of the article may be classified into one part.
When dividing according to the position of the video or the picture, each picture or video can be taken as a dividing point, for example, each picture or video is divided into one part with the text content thereon.
In the selection of the keyword, manual labeling may be performed manually according to the content of each divided part, or certainly, the keyword may be determined after machine learning is performed on each divided part, and the selection is not limited herein.
In the case of determining the keyword, the setting module 20 only needs to associate the keyword with each of the divided parts, so that the keyword can be displayed later.
The predetermined portion may be any one of the divided portions, and the display state of the predetermined portion may be a display scale, a display position, or the like. In implementation, the display module 30 may display the predetermined portion of the keywords at the predetermined position of the first predetermined page as long as the display status meets the predetermined display condition.
The embodiment of the invention divides the predetermined article into a plurality of parts, and sets the keywords for each part, when the user reads the predetermined part, the keywords can be displayed on the first predetermined page displaying the predetermined article. The keywords displayed by the embodiment of the invention are the keywords which are most easily imagined by the user after the user reads the preset part, so that the user can perform searching operation based on the keywords, further view more related contents, and have better user experience.
A fourth embodiment of the present invention provides a keyword recommendation apparatus, a structural schematic of which is shown in fig. 15, including:
a dividing module 10 for dividing a predetermined article into a plurality of parts; a recording module 40 coupled to the dividing module 10 for recording a start position and an end position of each portion; a setting module 20 coupled to the dividing module 10 for setting keywords for each portion; and the display module 30 is coupled to the setting module 20, and is configured to display the keyword of the predetermined portion at a predetermined position of a first predetermined page on which the predetermined article is displayed when the display state of the predetermined portion meets a predetermined display condition, and further, in a case that it is detected that the keyword receives a search trigger operation, acquire all links matching the keyword, and display a summary page of all links in a second predetermined page.
For an article, in general, besides text content, picture content or video content may also be included, and therefore, when the predetermined article is divided into a plurality of parts, the dividing module 10 according to the embodiment of the present invention may have a plurality of dividing manners. For example, the division may be performed according to paragraphs of the article, or may be performed according to positions of videos or pictures.
When the division is performed according to paragraphs of the article, for example, the first to third paragraphs of the article may be divided into one part, the fourth to eighth paragraphs of the article may be classified into one part, and the ninth to tenth paragraphs of the article may be classified into one part.
When dividing according to the position of the video or the picture, each picture or video can be taken as a dividing point, for example, each picture or video is divided into one part with the text content thereon.
The recording module 40 marks a start position and an end position of each divided portion and then records the start position and the end position, so that the current display position can be determined by the recorded start position, end position, or a combination thereof. Further, the display scale of the predetermined part on the first predetermined page can be determined by the starting position and the ending position.
Of course, when the start position and the end position of each part are not recorded, the division node of each part can also be judged by the first word and the end word, but generally the accuracy is not high in this way.
In the selection of the keyword, manual labeling may be performed manually according to the content of each divided part, or certainly, the keyword may be determined after machine learning is performed on each divided part, and the selection is not limited herein.
In the process of setting the keyword, the setting module 20 may be further configured to: acquiring all contents of a predetermined article; determining the keywords of each part according to a preset keyword extraction strategy and the content corresponding to each part; each keyword is associated with a respective predetermined portion of the keyword.
Specifically, for more convenient subsequent use of the keyword, the keyword may also be set as a search word associated with the search box.
The predetermined portion may be any one of the divided portions, and the display state of the predetermined portion may be a display scale, a display position, or the like. Correspondingly, the predetermined display condition may be that the display scale reaches the predetermined display scale, the start position reaches the first predetermined position, and the end position reaches the second predetermined position. The display module 30 may display the keywords of the predetermined portion at a predetermined position of the first predetermined page as long as the display state meets the predetermined display condition.
Of course, a person skilled in the art may also set according to actual requirements, for example, the display state may also be a display duration, and the keywords of the predetermined portion may also be displayed at the predetermined position of the first predetermined page of the predetermined article when the display duration of the predetermined portion reaches the predetermined display duration.
The embodiment of the invention divides the predetermined article into a plurality of parts, and sets the keywords for each part, when the user reads the predetermined part, the keywords can be displayed on the first predetermined page displaying the predetermined article; when the keywords are displayed, the user can directly click on the keywords, and then related links are searched based on the keywords, so that the operation is simple and convenient. The keywords displayed by the embodiment of the invention are the keywords which are most easily imagined by the user after the user reads the preset part, so that the user can quickly search based on the keywords to further view more related contents, and the user experience is better.
A fifth embodiment of the present invention provides a storage medium storing a computer program that, when executed by a processor, implements the method provided in any of the embodiments of the present invention, as follows steps S1 to S3:
s1, dividing the predetermined article into a plurality of parts;
s2, setting keywords for each part;
s3, when the display state of the predetermined portion meets a predetermined display condition, displaying the keyword of the predetermined portion at a predetermined position of a first predetermined page on which a predetermined article is displayed.
The predetermined display condition includes at least one of: the display proportion reaches a preset display proportion, the starting position reaches a first preset position, and the ending position reaches a second preset position.
When the computer program is executed by the processor to set the keyword for each part, the following steps are specifically executed by the processor: acquiring all contents of a predetermined article; determining the keywords of each part according to a preset keyword extraction strategy and the content corresponding to each part; each keyword is associated with a respective predetermined portion of the keyword.
After the step of dividing the predetermined article into a plurality of parts is executed by the processor, the computer program may further execute the following steps by the processor: the start and end positions of each part are recorded.
The computer program may be further executable by the processor after the step of displaying the keyword of the predetermined portion at the predetermined position of the first predetermined page displaying the predetermined article is executed by the processor, the step of: and under the condition that the keyword is detected to receive the search triggering operation, acquiring all links matched with the keyword, and displaying the summary pages of all the links in a second preset page.
The embodiment of the invention divides the predetermined article into a plurality of parts, and sets the keywords for each part, when the user reads the predetermined part, the keywords can be displayed on the first predetermined page displaying the predetermined article; when the keywords are displayed, the user can directly click on the keywords, and then related links are searched based on the keywords, so that the operation is simple and convenient. The keywords displayed by the embodiment of the invention are the keywords which are most easily imagined by the user after the user reads the preset part, so that the user can quickly search based on the keywords to further view more related contents, and the user experience is better.
The storage medium may be disposed in an electronic device that at least includes a memory and a processor, and may exist in the form of a memory, and specific implementation manners are not described herein again.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes. Optionally, in this embodiment, the processor executes the method steps described in the above embodiments according to the program code stored in the storage medium. Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again. It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
A sixth embodiment of the present invention provides an electronic device, as shown in fig. 16, the electronic device at least includes a memory 901 and a processor 902, the memory 901 stores a computer program, the processor 902 realizes the method provided by any embodiment of the present invention when executing the computer program on the memory 901, the steps of the computer program are as follows S11 to S13:
s11, dividing the predetermined article into a plurality of parts;
s12, setting keywords for each part;
s13, when the display state of the predetermined portion meets a predetermined display condition, displaying the keyword of the predetermined portion at a predetermined position of a first predetermined page on which a predetermined article is displayed.
The predetermined display condition includes at least one of: the display proportion reaches a preset display proportion, the starting position reaches a first preset position, and the ending position reaches a second preset position.
The processor 902, when executing the computer program stored on the memory 901 for setting a keyword for each part, specifically executes the following computer program: acquiring all contents of a predetermined article; determining the keywords of each part according to a preset keyword extraction strategy and the content corresponding to each part; each keyword is associated with a respective predetermined portion of the keyword.
The processor 902, after executing the computer program that divides the predetermined article into a plurality of parts stored on the memory 901, may also execute the computer program: the start and end positions of each part are recorded.
The processor 902, after executing the computer program stored on the memory 901 to display the keywords of the predetermined portion at the predetermined position of the first predetermined page displaying the predetermined article, may further execute the computer program of: and under the condition that the keyword is detected to receive the search triggering operation, acquiring all links matched with the keyword, and displaying the summary pages of all the links in a second preset page.
The embodiment of the invention divides the predetermined article into a plurality of parts, and sets the keywords for each part, when the user reads the predetermined part, the keywords can be displayed on the first predetermined page displaying the predetermined article; when the keywords are displayed, the user can directly click on the keywords, and then related links are searched based on the keywords, so that the operation is simple and convenient. The keywords displayed by the embodiment of the invention are the keywords which are most easily imagined by the user after the user reads the preset part, so that the user can quickly search based on the keywords to further view more related contents, and the user experience is better.
Moreover, although exemplary embodiments have been described herein, the scope thereof includes any and all embodiments based on the present invention with equivalent elements, modifications, omissions, combinations (e.g., of various embodiments across), adaptations or alterations. The elements of the claims are to be interpreted broadly based on the language employed in the claims and not limited to examples described in the present specification or during the prosecution of the application, which examples are to be construed as non-exclusive. It is intended, therefore, that the specification and examples be considered as exemplary only, with a true scope and spirit being indicated by the following claims and their full scope of equivalents.
The above description is intended to be illustrative and not restrictive. For example, the above-described examples (or one or more versions thereof) may be used in combination with each other. For example, other embodiments may be used by those of ordinary skill in the art upon reading the above description. In addition, in the above-described embodiments, various features may be grouped together to streamline the disclosure. This should not be interpreted as an intention that a disclosed feature not claimed is essential to any claim. Rather, inventive subject matter may lie in less than all features of a particular disclosed embodiment. Thus, the following claims are hereby incorporated into the detailed description as examples or embodiments, with each claim standing on its own as a separate embodiment, and it is contemplated that these embodiments may be combined with each other in various combinations or permutations. The scope of the invention should be determined with reference to the appended claims, along with the full scope of equivalents to which such claims are entitled.
While the embodiments of the present invention have been described in detail, the present invention is not limited to these specific embodiments, and those skilled in the art can make various modifications and modifications of the embodiments based on the concept of the present invention, which fall within the scope of the present invention as claimed.