Information search method and device, electronic equipment and medium
By detecting user operations on web pages and performing word segmentation recommendations, the problems of low web search coverage and limited relevance are solved, and more efficient information acquisition is achieved.
Patent Information
- Application Number
- CN202510941742.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-08
- Publication Date
- 2025-10-17
Smart Images

Figure CN120804416A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the field of computers, in particular to the field of artificial intelligence, information search, natural language processing, and specifically to an information search method and device, electronic equipment, computer readable storage medium and computer program product. BACKGROUND
[0002] Artificial intelligence is a discipline that studies enabling computers to simulate some thinking processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.) of humans, which has both hardware and software technologies. Artificial intelligence hardware technology generally includes technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing, etc. Artificial intelligence software technology mainly includes computer vision technology, speech recognition technology, natural language processing technology, and machine learning / deep learning, big data processing technology, knowledge graph technology, etc. several major directions.
[0003] With the development of information technology, the Internet has broken through the time and space limitations and gradually become an important channel for information search, and more and more users rely on the Internet to query and obtain information. For example, users can connect to the Internet through computers, mobile phones and other devices, access different website pages, and view and read the content on the web pages, such as text, pictures, videos, etc. When users browse the content on the web page, they sometimes need to frequently initiate searches to understand the knowledge related to the current browsing content, but frequent page switching makes the user experience poor. SUMMARY
[0004] The present disclosure provides an information search method and device, electronic equipment, computer readable storage medium and computer program product.
[0005] According to an aspect of the present disclosure, a search recommendation method is provided, including: in response to a trigger operation detected on a target page, determining a target text segment corresponding to the trigger operation, wherein the target page includes text content, the text content includes one or more text segments, and the target text segment is a corresponding text segment in the one or more text segments; determining a first position of the trigger operation in the target page; performing a word segmentation operation on the target text segment to obtain a plurality of first segmented words and a second position of each of the plurality of first segmented words in the target page; based on the first position and the second position, determining a first target segmented word closest to the position of the trigger operation in the plurality of first segmented words; based on the first target segmented word, obtaining one or more recommendation information; and in response to receiving a search request for a target recommendation information in the one or more recommendation information, obtaining a search result searched based on the target recommendation information.
[0006] According to another aspect of the present disclosure, a search recommendation apparatus is provided, comprising: a response unit configured to, in response to a trigger operation detected on a target page, determine a target text segment corresponding to the trigger operation, wherein the target page comprises text content, the text content comprises one or more text segments, and the target text segment is a corresponding text segment in the one or more text segments; a determination unit configured to determine a first position of the trigger operation in the target page; a word segmentation unit configured to perform a word segmentation operation on the target text segment to obtain a plurality of first segmented words and a second position in the target page corresponding to each of the plurality of first segmented words; a calculation unit configured to determine, based on the first position and the second position, a first target segmented word closest to the position of the trigger operation in the plurality of first segmented words; an acquisition unit configured to obtain one or more recommendation information based on the first target segmented word; and a search unit configured to, in response to receiving a search request for a target recommendation information in the one or more recommendation information, obtain a search result searched based on the target recommendation information.
[0007] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected with the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of the present disclosure.
[0008] According to another aspect of the present disclosure, a non-transitory computer readable storage medium storing computer instructions is provided, the computer instructions being used to cause a computer to perform the method of the present disclosure.
[0009] According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the method of the present disclosure.
[0010] According to one or more embodiments of the present disclosure, the recommendation information related to the text corresponding to the trigger operation is automatically generated based on the trigger operation of the user, effectively solving the problem of low coverage and limited relevance of related search on the webpage, simplifying the search process of the user, and improving the efficiency of the user in understanding related knowledge when browsing the webpage.
[0011] It should be understood that the content described in this section is not intended to identify key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become apparent through the following description. BRIEF DESCRIPTION OF DRAWINGS
[0012] The accompanying drawings illustrate exemplary embodiments and together with the description, explain the principles of the embodiments. The drawings are intended for use in conjunction with the exposition in the specification and are included in the specification. The illustrated embodiments merely seek to demonstrate example implementations of the embodiments. They are not intended to limit the scope of the claims. Identical reference numerals in the figures designate the same elements.
[0013] Figure 1 A schematic diagram of an exemplary system in which various methods described herein can be implemented according to embodiments of the present disclosure is shown; Figure 2 A flowchart of a search recommendation method according to embodiments of the present disclosure is shown; Figures 3-4 A schematic diagram of a target page according to embodiments of the present disclosure is shown; Figure 5 A schematic diagram of a search result page according to embodiments of the present disclosure is shown; Figure 6 A schematic diagram of a target page according to embodiments of the present disclosure is shown; Figure 7 A block diagram of a structure of a search recommendation apparatus according to embodiments of the present disclosure is shown; and Figure 8 A block diagram of a structure of an exemplary electronic device that can be used to implement embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0014] Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, which illustrate various details of the embodiments of the present disclosure to assist in the understanding of the present disclosure. They should be considered in a demonstrative, rather than a restrictive, sense. Thus, it will be appreciated by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope of the present disclosure. Also, for the sake of brevity and clarity, descriptions of well-known functions and constructions are omitted from the following description.
[0015] In the present disclosure, unless otherwise stated, the use of the terms "first", "second", etc. to describe various elements is not intended to limit the positional relationship, the time sequence relationship, or the importance relationship of the elements. Such terms are only used to distinguish one element from another. In some examples, the first element and the second element can refer to the same instance of the element, and in some cases, based on the context of the description, they can also refer to different instances.
[0016] The terminology used in the description of the various described examples in the present disclosure is for the purpose of describing particular examples only and is not intended to be limiting. As used in this description, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. Furthermore, the use of the terms "a" and "an" and "the" and "at least one" are intended to include the meaning of "one or more." Additionally, the use of the term "including," as well as other forms such as "includes" and "included," is intended to be open-ended, meaning that other items not specifically named are also intended to be included. Except to the extent necessary or inherent in the circumstances, no single feature or combination of features is essential to the disclosure.
[0017] Embodiments of the present disclosure will be described in detail with reference to the drawings, wherein:
[0018] Figure 1 A schematic diagram of an example system 100 in which various methods and apparatus described herein can be implemented in accordance with embodiments of the present disclosure is shown. Referring to Figure 1 , the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 that couple the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105, and 106 can be configured to execute one or more application programs.
[0019] In embodiments of the present disclosure, the server 120 can run one or more services or software applications that enable the performance of information searches.
[0020] In certain embodiments, the server 120 can also provide other services or software applications, which can include non-virtual environments and virtual environments. In certain embodiments, these services can be provided as web-based services or cloud services, such as to users of the client devices 101, 102, 103, 104, 105, and / or 106 under a software as a service (SaaS) model.
[0021] In Figure 1 In the illustrated configuration, the server 120 can include one or more components that implement the functionality performed by the server 120. These components can include software components, hardware components, or a combination thereof, executable by one or more processors. Users operating the client devices 101, 102, 103, 104, 105, and / or 106 can in turn utilize one or more client application programs to interact with the server 120 to utilize the services provided by these components. It should be understood that various different system configurations are possible, which can differ from the system 100. Thus, Figure 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.
[0022] A user can use client devices 101, 102, 103, 104, 105, and / or 106 to browse target pages, generate triggering operations, and so on. A client device can provide an interface that enables a user of the client device to interact with the client device. The client device can also output information to the user via the interface. Although Figure 1 Only six client devices are depicted, but those skilled in the art will appreciate that the present disclosure can support any number of client devices.
[0023] Client devices 101, 102, 103, 104, 105, and / or 106 can include various types of computer devices, such as portable handheld devices, general purpose computers (such as personal computers and laptop computers), workstation computers, wearable devices, smart screen devices, self-service kiosk devices, service robots, gaming systems, thin clients, various messaging devices, sensors or other sensing devices, and so on. These computer devices can run various types and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, Linux or Linux-like operating systems (such as GOOGLE Chrome OS); or include various mobile operating systems, such as MICROSOFT Windows Mobile OS, iOS, Windows Phone, Android. Portable handheld devices can include cellular telephones, smartphones, tablet computers, personal digital assistants (PDAs), and so on. Wearable devices can include head-mounted displays (such as smart glasses) and other devices. Gaming systems can include various handheld gaming devices, Internet-enabled gaming devices, and so on. Client devices are capable of executing various different applications, such as various Internet-related applications, communication applications (such as email applications), short message service (SMS) applications, and can use various communication protocols.
[0024] Networks 110 can be any type of networks familiar to those skilled in the art that can support data communications using any of a variety of available protocols, including without limitation TCP / IP, SNA, IPX, etc. Merely by way of example, one or more of networks 110 can be a local area network (LAN), an Ethernet-based network, a Token Ring, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a blockchain network, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., a Bluetooth, WIFI), and / or any combination of these and / or other networks.
[0025] The server 120 can include one or more general purpose computers, special purpose server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other appropriate arrangement and / or combination. The server 120 can include one or more virtual machines running virtual operating systems, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that can be virtualized to maintain virtual storage devices for the servers). In various embodiments, the server 120 can run one or more services or software applications that provide the functionality described below.
[0026] The computing units in the server 120 can run one or more operating systems including any of the operating systems described above, as well as any commercially available server operating systems. The server 120 can also run any of a variety of additional server applications and / or mid-tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.
[0027] In some embodiments, the server 120 can include one or more applications to analyze and consolidate data feeds and / or event updates from users of the client devices 101, 102, 103, 104, 105, and 106. The server 120 can also include one or more applications to display the data feeds and / or real-time events via one or more display devices of the client devices 101, 102, 103, 104, 105, and 106.
[0028] In some embodiments, the server 120 can be a server of a distributed system, or a server that incorporates blockchain. The server 120 can also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. The cloud server is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and virtual private server (VPS, Virtual Private Server) services.
[0029] The system 100 can also include one or more databases 130. In certain embodiments, these databases can be used to store data and other information. For example, one or more of the databases 130 can be used to store information such as tokenization, recommended text. The databases 130 can reside in various locations. For example, databases used by the servers 120 can be local to the servers 120, or can be remote from the servers 120 and can communicate with the servers 120 via a network-based or dedicated connection. The databases 130 can be of different types. In certain embodiments, databases used by the servers 120 can be, for example, relational databases. One or more of these databases can store, update, and retrieve data to and from the databases in response to commands.
[0030] In certain embodiments, one or more of the databases 130 can also be used by applications to store application data. Databases used by applications can be databases of different types, such as key-value stores, object stores, or regular stores backed by file systems.
[0031] Figure 1 The system 100 can be configured and operated in various ways to enable the application of various methods and apparatuses described in accordance with the present disclosure.
[0032] When a user browses web content, it is sometimes necessary to frequently initiate a search to understand the knowledge related to the current browsing content. In some web pages, embedded search words (e.g., in the form of hyperlinks) or preset relevant search modules are usually used to help or guide users to initiate a search for relevant content. However, this process still has the problems of limited coverage and cumbersome search procedures.
[0033] Therefore, according to embodiments of the present disclosure, a search recommendation method is provided. Figure 2 A flowchart of an information search method according to embodiments of the present disclosure is shown in FIG. 1. As shown in FIG. 1, the method includes the following steps. Figure 2As shown, the method 200 includes: in response to a trigger operation detected on a target page, determining a target text segment corresponding to the trigger operation, wherein the target page includes text content, the text content includes one or more text segments, and the target text segment is a corresponding text segment in the one or more text segments (step 210); determining a first position of the trigger operation in the target page (step 220); performing a word segmentation operation on the target text segment to obtain a plurality of first segmented words and a second position in the target page corresponding to each of the plurality of first segmented words (step 230); determining, based on the first position and the second position, a first target segmented word closest to the position of the trigger operation in the plurality of first segmented words (step 240); obtaining one or more recommended information based on the first target segmented word (step 250); and in response to receiving a search request for a target recommended information in the one or more recommended information, obtaining a search result searched based on the target recommended information (step 260).
[0034] According to an embodiment of the present disclosure, the recommended information related to the text corresponding to the trigger operation is automatically generated based on the trigger operation of the user, effectively solving the problem of low coverage and limited relevance of related search on the webpage, simplifying the search process of the user, and improving the efficiency of the user in understanding related knowledge when browsing the webpage.
[0035] In step 210, in response to a trigger operation detected on a target page, a target text segment corresponding to the trigger operation is determined.
[0036] In the present disclosure, the target page can be any Internet-based page including text content, such as a page from a webpage, a public account, an applet, etc., which is not limited herein.
[0037] In the present disclosure, the target page includes text content, and the text content includes one or more text segments. The one or more text segments can be text segments generated by any suitable manner, such as text segments generated by layout analysis, semantic analysis, etc. on the target page, which is not limited herein.
[0038] In some embodiments, the target text segment can be a text segment in the text content in the target page, a text segment recognized in a picture and / or a video based on character recognition, a text segment recognized in a hyperlink, a text segment recognized in an interactive component in the target page, etc., which is not limited herein.
[0039] In some embodiments, the trigger operation can be any suitable trigger operation on the target page, such as a click operation, a selection operation, or other keyboard operation based on a preset instruction, etc., which is not limited herein.
[0040] In some embodiments, the click operation behavior of the user in the target page can be monitored to respond to the click operation in the target page in real time. For example, a listener can be created to capture and process mouse events, which refer to events related to the mouse, such as mouse movement, mouse wheel, mouse press and release, etc. Through mouse events, drag-and-drop, zoom-in and zoom-out, and other interactive effects can be achieved. In some examples, the click operation on the target page can be detected by monitoring the mouse event.
[0041] In a web application, user interactions and operations will trigger events, such as clicks, scrolls, keyboard inputs, etc. The browser needs to capture, process and distribute these events to achieve the corresponding functions and effects. When the target page is a web page obtained through a browser, for example, the click event in the browser can be monitored. The click event is one of the most common event types, which can be used to implement the interaction of buttons, links, menus, etc.
[0042] According to some embodiments, in response to detecting a trigger operation on the target page, determining the target text segment corresponding to the trigger operation comprises: in response to detecting a trigger operation on the target page, determining a third position of the trigger operation in the target page; based on the third position, determining whether the trigger operation satisfies a preset trigger condition; and in response to determining that the trigger operation satisfies the preset trigger condition, determining the text segment corresponding to the trigger operation.
[0043] In some embodiments, when a click event is captured, a corresponding processing function can be used to obtain the corresponding parameters of the click event, which correspond to the attribute information of the click event, such as position information. For example, the DOM (Document Object Model) node of the click position can be obtained through the event parameter of the browser click event.
[0044] In web development, DOM is a core concept that represents an HTML or XML document as a tree structure, with each node being a DOM element representing a part of the document. These nodes include element nodes (representing HTML tags), text nodes (containing text between tags), and attribute nodes (associated with element attributes). DOM elements represent tags in the HTML page, such as 、 、 DOM, which allows programs and scripts to dynamically access and update the content, structure, and style of documents.
[0045] Therefore, in some embodiments, the obtained DOM node of the click position can be used as the target text segment corresponding to the trigger operation.
[0046] When a trigger operation such as a click operation is detected on the target page, it is determined whether the click behavior of the user meets a preset trigger condition. The preset trigger condition can be based on a series of preset rules or algorithms, and can be set or adjusted according to different target page content or user possible search intent, to ensure the accuracy, relevance and necessity of the recommended content.
[0047] According to some embodiments, the preset trigger condition includes at least one of the following: the target page includes text in a region within a preset range from the third position; and the target page includes text in a region within a preset range from the third position, and the page element corresponding to the text is not a preset page element, wherein the preset page element includes at least one of the following: a hyperlink, a button, an input box, a picture, a video.
[0048] In the present disclosure, a page element can be an element involved in a front-end page layout, including text, pictures, videos, audio, forms, buttons, etc. By reasonably arranging the positions, sizes and mutual relationships of these elements, a clear, beautiful and easy-to-understand page structure can be formed.
[0049] In some embodiments, it can be determined whether the trigger operation is a trigger operation for text in the target page. In some examples, it can be determined that the trigger operation meets the preset trigger condition by determining whether the target page includes text in a region within a preset range from the third position. Specifically, for example, by monitoring the click behavior in the page, the position information of the click trigger operation, i.e. the third position, is determined. When it is determined that there is text at the third position, it is determined that the trigger operation meets the preset trigger condition.
[0050] In some embodiments, it can be determined whether the trigger operation is a trigger operation for text in the target page and the text is not text in a preset page element. For example, the preset page element includes at least one of the following: a hyperlink, a button, an input box, a picture, a video. For example, the page element such as a hyperlink, a button, an input box, etc. can be interacted with the user, when the trigger operation for the page element is detected, the user is likely to trigger the page element. Therefore, even if the above-mentioned page element may have some identifying text, the user usually does not need to search further for the text. Therefore, when it is determined that there is text at the third position and the page element corresponding to the text is not a preset page element, it is determined that the trigger operation meets the preset trigger condition.
[0051] In the above embodiment, the area in the target page within a preset range from the third position can be a point at the third position when the third position is a coordinate point. Alternatively, the area can also include an area within a circular range centered at the point at the third position and with a preset radius, an area within a preset distance range along the text line extension direction centered at the point at the third position, etc., which are not limited herein.
[0052] In step 220, the first position of the trigger operation in the target page is determined; and in step 230, a word segmentation operation is performed on the target text segment to obtain a plurality of first segmented words and a second position in the target page corresponding to each of the plurality of first segmented words.
[0053] In some embodiments, the first position and the second position can be offsets of the trigger operation and the corresponding segmented word in the target text segment, respectively. For example, when the trigger operation is for the first text character in the target text segment, the offset of the trigger operation in the target text segment is 1, and the first position can be represented as 1.
[0054] In some examples, the DOM node (text node) at the click position can be obtained as the target text segment by using the caretRangeFromPoint API of the browser, and the text unit offset of the click position in the target text segment can be obtained as the first position.
[0055] In some embodiments, the first position and the second position can be position information, such as coordinate information, of the trigger operation and the corresponding segmented word in the target page, respectively. At this time, the first position and the third position can be the same.
[0056] In the embodiments of the present disclosure, the text segment can be segmented by any suitable method, including but not limited to a natural language processing-based segmentation method, a language model-based segmentation method, etc.
[0057] In some examples, the text in the target text segment can be segmented by using a pre-set vocabulary. The offset of the segmented word in the target text segment can be calculated when the segmentation is performed. The words in the pre-set vocabulary can be words that meet the further search requirements of the user. Thus, the segmented words obtained based on the vocabulary can better meet the further search requirements of the user.
[0058] In step 240, based on the first position and the second position, a first target word in the plurality of first segmented words that is closest to the position where the trigger operation is located is determined.
[0059] According to some embodiments, determining, based on the first position and the second position, the target word in the plurality of first segmented words that is closest to the position where the trigger operation is located includes: in response to determining that there are at least two first segmented words in the plurality of first segmented words that are closest to the position where the trigger operation is located and have the same distance to the position, selecting one of the at least two first segmented words as the first target word.
[0060] In some examples, the selected one of the at least two first segmented words is the first one by default. By selecting one word, the precise search requirements of the user can be better met.
[0061] According to some embodiments, the determined first target word is used for highlighting in the target page.
[0062] For example, a DOM node can be independently created for the target word by using the createRange API of the browser, and a highlight style can be applied to the new DOM node, so as to realize the highlight display of the target word in the target page.
[0063] It can be understood that the highlighting of the target word in the target page can be realized by any suitable method, and the highlighting is not limited to highlight display, but can also be bold, enlarged, or other display elements (such as adding a bubble, a border), etc., which are not limited herein.
[0064] By highlighting the target word in the target page, the user can more clearly determine the position in the target page corresponding to the trigger operation, and the subsequent recommended text is generated for which text in the page, thereby improving the user experience.
[0065] In step 250, one or more recommended information is obtained based on the first target word.
[0066] According to some embodiments, obtaining the one or more recommendation information based on the first target word comprises: obtaining the one or more recommendation information based on the first target word and the target text segment by a large language model.
[0067] In the present disclosure, the recommendation information can be used to guide the user to ask follow-up questions to expand the user's search needs. In this way, when the user generates a trigger operation for the text information, the recommendation information associated with the text information can be accurately provided, thereby expanding the user's search needs, reducing the complexity of user operations, and optimizing the experience in user page browsing.
[0068] In some embodiments, obtaining the one or more recommendation information based on the target word and the target text segment by a large language model can comprise: obtaining the one or more recommendation information based on the target word and page content in the target page comprising the target text segment by a large language model.
[0069] In some embodiments, the one or more recommendation information can be recommendation text information, recommendation picture information, recommendation audio information, etc., without limitation.
[0070] In the above embodiments, after obtaining the target word, a large language model can be used to generate recommendation information. The large language model can comprehensively analyze the page content in the target page and the target word to generate recommendation information with summarization and high correlation to stimulate the user to expand the search needs for related content.
[0071] Figure 3 and Figure 4 A target page schematic diagram according to an embodiment of the present disclosure is shown. As shown in Figure 3 In response to detecting a trigger operation at a corresponding position 302 in the target page 301, a text segment 303 corresponding to the trigger operation is determined. Then, by performing word segmentation on the text segment 303, a target word 401 closest to the position 302 is obtained, i.e., the text "art". Thus, the target word 401 ("art" two characters) is highlighted in the target page 301, as shown in Figure 4 Based on the target word 401, one or more recommendation texts 402 are obtained.
[0072] Therefore, in some examples, the obtained one or more recommendation texts can be displayed in the form of a pop-up window, a card, a bubble, etc.
[0073] In step 260, in response to receiving a search request for a target recommendation information in the one or more recommendation information, a search result searched based on the target recommendation information is obtained.
[0074] In some embodiments, in response to receiving the search request for the target recommendation information in the one or more recommendation information, search results based on the target recommendation information are obtained. When the system receives the search request for the target recommendation information in the recommendation information, one or more first search results based on the target recommendation information can be obtained through a search engine and sent to the client for display. For example, these results can be used to present in the search result page of the search engine. Thus, the in-depth search demand of the user under the guidance of the recommendation information is met to provide more rich and detailed information.
[0075] Through the above embodiments, the user does not need to manually switch and input the corresponding follow-up information, but can directly jump to the search engine by triggering the search request for the target recommendation information to achieve the follow-up effect of the related information in the target page through the search engine.
[0076] Figure 5 A search result page diagram is shown according to an embodiment of the present disclosure. When the user clicks the recommendation text "non-heritage art charm" shown in Figure 4 , the user can directly jump to the search result page 501 as shown in Figure 5 to obtain one or more search results based on the recommendation text.
[0077] In some examples, the search result page can appear in the form of a pop-up window on the target page, or it can also be directly jumped to the search result page through jumping, which is not limited here.
[0078] According to some embodiments, in response to not receiving the trigger request within a preset time period, a second target word in the visible area of the target page is determined to highlight the second target word in the target page in a first display mode, wherein the first display mode is used to guide the user to generate the trigger request for the second target word.
[0079] In some embodiments, in response to not receiving the trigger request within a preset time period (for example, 1 minute), a second target word in the current visible area of the target page can be determined. For example, the text content in the current visible area of the target page can be obtained at will and the text content is segmented to obtain a plurality of words. At least one second target word is determined in the plurality of words, which can be the word that the user wants to further search. The determined second target word is used to highlight in the target page in the first display mode.
[0080] In some examples, the first display mode is used to guide the user to generate the trigger request for the second target word. Figure 6 A schematic diagram of a target page is shown according to an embodiment of the present disclosure. As shown, when no trigger request is received within a preset time period, a second target word 601 "art" is determined in the visible region of the target page. At this time, the first display mode includes a circular icon identifying the word "art", and a dialog box icon containing a gesture and text. Through the circular icon and the dialog box icon, the user is guided to initiate a trigger request for searching the target word. Figure 6
[0081] It can be understood that the first display mode can be any suitable display mode as long as it can guide the user to generate a trigger request for the corresponding target word, which is not limited herein.
[0082] According to some embodiments, determining the second target word in the visible region of the target page includes: in response to determining that at least one second target word of a predetermined plurality of second target words is included in a preset region of the visible region, taking the at least one second target word as the determined second target word.
[0083] According to some embodiments, the predetermined plurality of second target words is determined by: performing a word segmentation operation on the text content to obtain a plurality of second words, and sorting the plurality of second words according to their relevance to the text content to obtain a preset number of second words with the highest relevance as the plurality of second target words.
[0084] In some examples, the text content in the target page can be pre-segmented to obtain a plurality of second target words therein. In this way, when the corresponding second target word is exposed in a preset region in the current visible region, the second target word can be highlighted in the first display mode.
[0085] In some examples, the preset region in the current visible region can be any position in the visible region, and is usually a region in the visible region where the user can be looking at, such as a central position region in the visible region, such as the region 602 in Figure 6
[0086] In some embodiments, the relevance of the corresponding second word to the text content of the target page can be determined in any suitable manner. For example, the relevance can be calculated based on the classification label corresponding to the second word and the text content.
[0087] According to some embodiments, the sorting, by the large language model, of the plurality of second segmented words according to their relevance to the text content to obtain a preset number of second segmented words with the highest relevance comprises: sorting, by the large language model, the plurality of second segmented words according to their relevance to the text content to obtain a preset number of second segmented words with the highest relevance.
[0088] In some embodiments, when the respective plurality of operations are implemented by the large language model, the large language model implementing the plurality of operations can be the same large language model or different large language models, which is not limited herein.
[0089] According to some embodiments, the respective large language model is obtained based on at least a preset scale of knowledge resources and dialogue data.
[0090] In some embodiments, the large language model can be a knowledge-enhanced large language model for dialogue (such as ERNIEbot, etc.), and the large model is obtained by training on massive knowledge resources and dialogue data (such as including more than trillion web page data, tens of billions of search data, hundreds of millions of picture data, tens of billions of voice request data per day, more than 50 billion text request data, and more than 550 billion factual knowledge).
[0091] In some embodiments, the knowledge resources cover a very wide range, including but not limited to various encyclopedic knowledge, such as basic information in fields of history, geography, science, etc.; professional knowledge, such as professional terms and rules in industries of medicine, law, finance, etc.; literary works, news reports, etc. text materials, which contain rich language expression and semantic information. The preset scale means that the quantity of these knowledge resources should reach a certain standard, which is rich and comprehensive enough to provide sufficient learning materials for the model, so that it has extensive knowledge reserve and understanding ability.
[0092] Therefore, by applying such a model as a large language model, in addition to being able to directly process casual conversation information, it can also generate direct reply information for logical reasoning, common sense, and image generation conversation information, which can generate higher quality reply information while further improving the generation efficiency.
[0093] According to embodiments of the present disclosure, as Figure 7 As shown, the search recommendation apparatus 700 further includes a response unit 710 configured to determine a target text segment corresponding to the trigger operation in response to detecting the trigger operation on a target page, wherein the target page includes text content, the text content includes one or more text segments, and the target text segment is a corresponding text segment in the one or more text segments; a determination unit 720 configured to determine a first position of the trigger operation in the target page; a word segmentation unit 730 configured to perform a word segmentation operation on the target text segment to obtain a plurality of first segmented words and a second position of each of the plurality of first segmented words in the target page; a calculation unit 740 configured to determine, based on the first position and the second position, a first target segmented word closest to a position of the trigger operation in the plurality of first segmented words; an acquisition unit 750 configured to obtain one or more recommendation information based on the first target segmented word; and a search unit 760 configured to obtain a search result obtained based on a target recommendation information in the one or more recommendation information in response to receiving a search request for the target recommendation information.
[0094] Here, the operations of the above-mentioned units 710-760 of the information search apparatus 700 are similar to the operations of the above-mentioned steps 210-260, and will not be described here again.
[0095] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved in the technical solution comply with relevant laws and regulations and do not violate public order and good customs.
[0096] According to embodiments of the present disclosure, an electronic device, a readable storage medium and a computer program product are further provided.
[0097] Reference Figure 8 The structural block diagram of an electronic device 800 that can be a server or a client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent a variety of forms of digital electronic computing devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections, and relationships, and their functions, are meant to be examples only, and are not intended to limit implementations of the present disclosure described and / or claimed in this document.
[0098] As Figure 8 As shown, the electronic device 800 includes a computing unit 801 that can perform various appropriate actions and processes in accordance with a computer program stored in a read only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. Various programs and data required for the operation of the electronic device 800 can also be stored in the RAM 803. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other through a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0099] A plurality of components in the electronic device 800 are connected to the I / O interface 805, including an input unit 806, an output unit 807, the storage unit 808, and a communication unit 809. The input unit 806 can be any type of device that can input information to the electronic device 800, can receive inputted digital or character information, and generate key signal inputs related to user settings and / or function controls of the electronic device, and can include, but is not limited to, a mouse, a keyboard, a touch screen, a track pad, a track ball, a joystick, a microphone, and / or a remote controller. The output unit 807 can be any type of device that can present information, and can include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 808 can include, but is not limited to, a magnetic disk, an optical disk. The communication unit 809 allows the electronic device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and can include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth device, an 802.11 device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0100] The computing unit 801 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs various methods and processes described above, such as the method 200. For example, in some embodiments, the method 200 can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded onto the RAM 803 and executed by the computing unit 801, one or more steps of the method 200 described above can be performed. Alternatively, in other embodiments, the computing unit 801 can be configured to perform the method 200 by any other suitable means, such as by means of firmware.
[0101] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a complex programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0102] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces the functions / operations specified in the flowcharts and / or the block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine and partially on a remote machine or entirely on a remote machine or server.
[0103] In the context of this disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0104] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0105] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.
[0106] The computer system can include clients and servers. This relationship can be remote or on-site. The servers can be cloud servers, servers of a distributed system, or servers combined with a blockchain.
[0107] It should be understood that the various forms of flow shown above can be used to reorder, add, or delete steps. For example, the steps described in the present disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, which are not limited herein.
[0108] Although embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above-described methods, systems, and devices are merely exemplary embodiments or examples, and the scope of the present disclosure is not limited by these embodiments or examples, but only by the granted claims and their equivalent scope. Various elements in the embodiments or examples can be omitted or replaced by equivalent elements. In addition, each step can be performed in an order different from that described in the present disclosure. Further, various elements in the embodiments or examples can be combined in various ways. It is important that many of the elements described herein can be replaced by equivalent elements that appear after the present disclosure as technology evolves.
Claims
1. A search recommendation method, comprising: In response to a trigger operation detected on a target page, determining a target text segment corresponding to the trigger operation, wherein the target page includes text content, the text content includes one or more text segments, and the target text segment is a corresponding text segment among the one or more text segments; Determining a first position of the trigger operation in the target page; Performing a word segmentation operation on the target text segment to obtain a plurality of first word segments and a second position in the target page corresponding to each of the plurality of first word segments; Based on the first position and the second position, determining a first target participle closest to the position where the trigger operation is located among the multiple first participles; Obtain one or more recommendation information based on the first target word; as well as In response to receiving a search request for target recommendation information among the one or more recommendation information, a search result obtained based on the target recommendation information is obtained.
2. The method according to claim 1, wherein In response to detecting a trigger operation on a target page, determining a target text segment corresponding to the trigger operation includes: In response to detecting a triggering operation on a target page, determining a third position of the triggering operation on the target page; Based on the third position, determining whether the trigger operation satisfies a preset trigger condition; and In response to determining that the trigger operation meets a preset trigger condition, a text segment corresponding to the trigger operation is determined.
3. The method of claim 2, wherein: The preset trigger condition includes at least one of the following items: An area in the target page within a preset range from the third position includes text; and The area in the target page within a preset range from the third position includes text, and the page element corresponding to the text is not a preset page element, wherein the preset page element includes at least one of the following items: a hyperlink, a button, an input box, a picture, and a video.
4. The method according to claim 1, wherein Determining, based on the first position and the second position, a target participle closest to the position where the trigger operation is located from among the multiple first participles includes: In response to determining that at least two first participles among the plurality of first participles are at the same and closest distance to the location of the trigger operation, a first participle is selected from the at least two first participles as the first target participle.
5. The method according to claim 1 or 4, wherein The determined first target word is used for highlighting in the target page.
6. The method of claim 1, wherein: Obtaining one or more recommendation information based on the first target word includes: The one or more recommendation information are obtained through a large language model based on the first target word segmentation and the target text segment.
7. The method of claim 1, wherein: In response to not receiving the trigger request within a preset time period, determining a second target word segment within the visible area of the target page, so that the second target word segment is highlighted in the target page in a first display mode, wherein the first display mode is used to guide the user to generate the trigger request for the second target word segment.
8. The method of claim 7, wherein: Determining a second target word segmentation within the visible area of the target page includes: In response to determining that at least one second target participle among the predetermined plurality of second target participles is included in the preset area of the visual area, the at least one second target participle is used as the determined second target participle.
9. The method of claim 8, wherein The predetermined plurality of second target word segmentations are determined by the following operations: Performing a word segmentation operation on the text content to obtain a plurality of second word segmentations; and The plurality of second segmented words are sorted according to their relevance to the text content to obtain a preset number of second segmented words with the highest relevance as the plurality of second target segmented words.
10. The method of claim 9, wherein: Sorting the plurality of second participles according to their relevance to the text content to obtain a preset number of second participles with the highest relevance includes: The plurality of second segmented words are sorted according to their relevance to the text content by using a large language model to obtain a preset number of second segmented words with the highest relevance.
11. A search recommendation device, comprising: a response unit configured to, in response to a trigger operation detected on a target page, determine a target text segment corresponding to the trigger operation, wherein the target page includes text content, the text content includes one or more text segments, and the target text segment is a corresponding text segment among the one or more text segments; a determining unit configured to determine a first position of the triggering operation in the target page; A word segmentation unit is configured to perform a word segmentation operation on the target text segment to obtain a plurality of first word segments and a second position in the target page corresponding to each of the plurality of first word segments; A calculation unit configured to determine, based on the first position and the second position, a first target participle that is closest to the position where the trigger operation is located among the multiple first participles; an acquisition unit configured to obtain one or more recommendation information based on the first target word segmentation; as well as The search unit is configured to, in response to receiving a search request for target recommendation information among the one or more recommendation information, obtain search results obtained by searching the target recommendation information.
12. An electronic device comprising: at least one processor; as well as a memory communicatively coupled to the at least one processor; in The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 10.
13. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-10.
14. A computer program product comprising a computer program, wherein When the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.