A script acquisition method, device and equipment
By generating a hierarchical content tree offline, based on text, path information, and location, the problem of poor click location and text effectiveness in user intent analysis in existing technologies is solved, achieving more accurate user intent analysis and improving user experience.
Patent Information
- Application Number
- CN202311449891.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-01
- Publication Date
- 2026-11-06
- Estimated Expiration
- 2043-11-01
AI Technical Summary
Existing technologies for user intent analysis, based on click location and text, are not very effective and are difficult to accurately identify products or services that users are interested in.
By generating a hierarchical content tree offline, and based on the text, path information, and location, the system can search for related content texts related to the user's online actions offline, thereby obtaining more reliable text information.
It enables more accurate inferences about the products or services that users truly care about, improving the reliability and effectiveness of user intent analysis without affecting online business performance.
Smart Images

Figure CN117493715B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of front-end technology, and in particular to a method, apparatus, and device for obtaining text. Background Technology
[0002] With the rapid development of internet technology and the widespread use of smart terminals, many businesses can rely on applications on smart terminals. In many businesses, there is a need to recommend products or services to users. In order to achieve more accurate recommendations, user intent analysis can be performed.
[0003] User intent analysis involves analyzing both page exposure content and user behavior. Page exposure content analysis only examines the static aspects of the page, identifying which products or services are available and which parts of the page the user is actually interested in. However, it's necessary to analyze user behavior in conjunction with this analysis. A key aspect of user behavior is click behavior; what the user actually clicks on determines their interest in the corresponding products or services.
[0004] Currently, the corresponding product or service is often determined based on the user's click location and the text at that location (referred to as the click text). This method is relatively effective when users click on links displaying product or service information. However, it is not effective in many situations. For example, in some cases, a user clicks on an image, but the corresponding click text is a meaningless file name for the image. Also, even if a single meaningful click text is obtained (e.g., if the "OK" button is clicked, the click text becomes "OK"), it may still not be very helpful for actual analysis.
[0005] Therefore, in order to facilitate user intent analysis, a more reliable and effective copywriting acquisition solution is needed based on user behavior. Summary of the Invention
[0006] This specification provides one or more embodiments of a text acquisition method, apparatus, device, and storage medium to solve the following technical problem: In order to assist in user intent analysis, a more reliable and effective text acquisition solution is needed based on user behavior.
[0007] To solve the above-mentioned technical problems, one or more embodiments of this specification are implemented as follows:
[0008] This specification provides a document acquisition method according to one or more embodiments, including:
[0009] Identify data collection targets within one or more pages;
[0010] Collect the text, path information, and location corresponding to each of the data collection targets;
[0011] Based on the text, the path information, and the location, a hierarchical content tree is generated offline, and the nodes in the hierarchical content tree correspond to the data collection target;
[0012] Determine the location of the user's online operation on the page;
[0013] In the hierarchical content tree, a node matching the operation location is searched offline, and the corresponding text is obtained based on the matching node as the surrounding related content text of the operation location of the online operation.
[0014] This specification provides a document acquisition device according to one or more embodiments, comprising:
[0015] The data collection target determination module determines the data collection targets within one or more pages.
[0016] The component-related information determination module collects the text, path information, and location corresponding to each of the data collection targets;
[0017] The offline content tree generation module generates a hierarchical content tree offline based on the text, the path information, and the location, wherein the nodes in the hierarchical content tree correspond to the data collection target;
[0018] The online operation location determination module determines the user's online operation location on the page.
[0019] The offline content acquisition module searches for nodes that match the operation location offline in the hierarchical content tree, and obtains the corresponding text based on the matched nodes as the surrounding related content text of the operation location of the online operation.
[0020] This specification provides a document acquisition device according to one or more embodiments, comprising:
[0021] At least one processor; and,
[0022] A memory communicatively connected to the at least one processor; wherein,
[0023] The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to:
[0024] Identify data collection targets within one or more pages;
[0025] Collect the text, path information, and location corresponding to each of the data collection targets;
[0026] Based on the text, the path information, and the location, a hierarchical content tree is generated offline, and the nodes in the hierarchical content tree correspond to the data collection target;
[0027] Determine the location of the user's online operation on the page;
[0028] In the hierarchical content tree, a node matching the operation location is searched offline, and the corresponding text is obtained based on the matching node as the surrounding related content text of the operation location of the online operation.
[0029] This specification provides one or more embodiments of a non-volatile computer storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured as follows:
[0030] Identify data collection targets within one or more pages;
[0031] Collect the text, path information, and location corresponding to each of the data collection targets;
[0032] Based on the text, the path information, and the location, a hierarchical content tree is generated offline, and the nodes in the hierarchical content tree correspond to the data collection target;
[0033] Determine the location of the user's online operation on the page;
[0034] In the hierarchical content tree, a node matching the operation location is searched offline, and the corresponding text is obtained based on the matching node as the surrounding related content text of the operation location of the online operation.
[0035] The above-mentioned at least one technical solution adopted in one or more embodiments of this specification can achieve the following beneficial effects: It can generate a hierarchical content tree according to the actual content hierarchy based on information reflecting the correlation between different contents, such as text, path information, and location. Then, after a user performs an online operation, such as clicking on an operable component, it can conveniently and accurately match one or more related content nodes in one or more layers of the generated hierarchical content tree. This allows for the acquisition of both the text corresponding to the operable component itself and the surrounding related content text with relatively high reference value for the online operation's location. This helps to more accurately infer the product or service that the user truly cares about in this online operation. This text acquisition method has high reliability and effectiveness. Furthermore, since the generation of the hierarchical content tree and the acquisition of surrounding related content text are both performed offline, it will not affect online business performance, making it highly practical. Attached Figure Description
[0036] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0037] Figure 1 A schematic diagram illustrating the principle of a scheme for obtaining surrounding related content text at a user click location, provided in one or more embodiments of this specification;
[0038] Figure 2 A flowchart illustrating an optimizable document acquisition scheme provided for one or more embodiments of this specification;
[0039] Figure 3 A schematic diagram illustrating the thought process of a document acquisition method provided in one or more embodiments of this specification;
[0040] Figure 4 A flowchart illustrating a document acquisition method provided for one or more embodiments of this specification;
[0041] Figure 5 This is a schematic diagram of data collected from a page for generating a hierarchical content tree, provided for one or more embodiments of this specification.
[0042] Figure 6 A schematic diagram illustrating a calculation scheme for the region range corresponding to a node in a hierarchical content tree, provided for one or more embodiments of this specification;
[0043] Figure 7 A schematic diagram illustrating the effect of a calculation scheme for the region range corresponding to a node of a hierarchical content tree provided in one or more embodiments of this specification;
[0044] Figure 8 A flowchart illustrating a hierarchical content tree generation scheme provided for one or more embodiments of this specification;
[0045] Figure 9 A flowchart illustrating a hierarchical content tree generation scheme provided for one or more embodiments of this specification;
[0046] Figure 10 A schematic diagram of a hierarchical content tree provided for one or more embodiments of this specification;
[0047] Figure 11 This is a flowchart illustrating an offline search in a hierarchical content tree to determine the range of matching regions, provided for one or more embodiments of this specification.
[0048] Figure 12 A schematic diagram illustrating the results of offline searching in a hierarchical content tree, provided for one or more embodiments of this specification;
[0049] Figure 13 A schematic diagram of a document acquisition device provided for one or more embodiments of this specification;
[0050] Figure 14 This is a schematic diagram of a document acquisition device provided for one or more embodiments of this specification. Detailed Implementation
[0051] This specification provides a document acquisition method, apparatus, device, and storage medium through its embodiments.
[0052] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.
[0053] The background section mentions that currently, the identification of corresponding products or services is often based on the user's click location and the text at that location (referred to as click text). However, this approach is often ineffective. The applicant believes that it is crucial not only to obtain the click text but also to strive to obtain the surrounding text related to the click location, which can be termed "surrounding text." Only in this way can the user's actual interest in the products or services be more effectively inferred.
[0054] Based on this idea, the applicant tried to develop some solutions, but found that there were also corresponding problems and the results were not satisfactory.
[0055] One of the solutions developed by the applicant is based on virtual radar search; see [link / reference]. Figure 1 , Figure 1 This is a schematic diagram illustrating the principle of a scheme for obtaining surrounding related content text at a user click location, provided in one or more embodiments of this specification.
[0056] Figure 1 The left side of the image visually illustrates the principle of this solution. It works by acting like a radar at the click location, continuously expanding the search for surrounding text based on its distance from the click location, and then treating the found surrounding text as related content. The problem with this solution is that it is noisy, and text that is close in distance is not necessarily related to the clicked content. For example... Figure 1 The right side of the page shows a page where the "Order Now" text at the top and the "Order Now" text at the bottom are very close to each other, but they actually correspond to different products, namely Mala Tang and Hot Pot. Therefore, these two "Order Now" texts do not belong to the surrounding related content texts. However, this approach is prone to misjudgment. Moreover, it is not easy to determine the true boundary that the radar should search for, or the specific position that constitutes the true surrounding related content texts.
[0057] Another solution devised by the applicant is an online intra-level search solution, see [link / reference]. Figure 2 , Figure 2 This is a flowchart illustrating an optimizable document retrieval scheme provided for one or more embodiments of this specification. Figure 2 In this approach, user click tracking is pre-installed in the application, including click location and click text. During tracking, the parent node of the clicked element is retrieved as the current node, and its child nodes (i.e., sibling nodes of the clicked element) are traversed. If the clicked element is a text node rather than a container node, its text is retrieved as the surrounding related content text. The problem with this approach is that it's an online search, which presents performance issues, affecting page rendering and business logic processing. Furthermore, the specific search hierarchy is uncertain; for example, a simple search of level 1 may not find all surrounding related content text, while searching multiple levels impacts performance and introduces noise.
[0058] In light of this, the applicant has submitted a superior solution, see [link to solution]. Figure 3 , Figure 3 This diagram illustrates the conceptual approach of a text acquisition method provided in one or more embodiments of this specification. The overall approach comprises three stages: page data collection, offline generation of a page hierarchical content tree, and offline content search based on the hierarchical content tree and online click locations. On one hand, by pre-constructing a hierarchical content tree, related content aligned hierarchically is organized more systematically, resulting in better search performance and higher reliability. The entire page content is understood, and businesses can perform multi-level searches based on actual needs, identifying specific surrounding related text boundaries. On the other hand, offline construction and offline search minimize the impact on online business. Based on this overall approach, the solution of this application will be further described in detail below.
[0059] Figure 4This diagram illustrates a document acquisition method provided in one or more embodiments of this specification. The process can be executed by the application side, such as the devices of a large-scale payment platform, instant messaging platform, or e-commerce platform, including operation servers and risk control servers, or by these devices actively controlling other devices to execute the process. Intermediate results involved in this process (e.g., collected page data, content hierarchy definition, generated content tree, location matching nodes, etc.) can also be manually intervened to improve the accuracy of the document acquisition results.
[0060] Figure 4 The process includes the following steps:
[0061] S402: Identify data collection targets within one or more pages.
[0062] In one or more embodiments of this specification, the data collection target can be any target on the page from which corresponding text can be identified, typically, for example, an operable component within the page. Of course, the scope of the data collection target can be even broader, for example, any element or node in the document structure element model corresponding to the page (e.g., represented as text or a tree in a specific format), multiple page areas divided according to specified rules, or images within the page (which may contain text); and so on.
[0063] Since in practical applications, user-specific operations are usually directed at operable components within a page, for ease of description, the following embodiments are mainly illustrated by assuming that the data collection target includes at least all or some of the operable components.
[0064] Operable components refer to specific components on a page that users can interact with (not necessarily all operable components on the page), such as buttons or tabs for clicking, sliders for swiping, sensing areas for users to select by device holding posture (implemented based on modules such as gyroscopes), and so on.
[0065] In one or more embodiments of this specification, in the case of multiple pages, users can jump between pages through operations, and the content of these multiple pages can be aggregated and processed in a unified manner. This helps to discover related content and text in other pages related to the current page.
[0066] S404: Collect the text, path information and location corresponding to each of the data collection targets.
[0067] In one or more embodiments of this specification, the text corresponding to the operable component may be directly displayed to the user on the operable component to inform the user of the purpose of the operable component, such as the text "Confirm" on the button for confirming the order, or the text "Bus" on the tab for switching to bus route calculation, etc.; or, it may be text that is not displayed to the user, but is pre-associated with the operable component in the background for the platform to use itself, such as the tag text "Currently serving as business A, switching to business B after XX days", etc.
[0068] In one or more embodiments of this specification, the path information corresponding to the operable components may include the document structure element tree of the page that can represent the page element structure. In some specific development or business environments, more existing path information of the pages can also be utilized. For example, in a Python environment, XPath information can be obtained as at least part of the path information. In the case of offline collection, if sufficient computing power and time are available, traversal can be simulated within one or more pages to generate the path information corresponding to each operable component in the page. In this way, the text content can be analyzed at the same time, which facilitates the formation of more accurate multiple content levels. It can be assumed that the information granularity level of the content at the same content level is basically the same.
[0069] In one or more embodiments of this specification, the position of the operable component can be represented by the precise area occupied by the operable component on the page, or by a representative coordinate point (e.g., center point, vertex, etc.) in that precise area.
[0070] Intuitively, one or more embodiments of this specification provide a schematic diagram of the data collected for generating a hierarchical content tree from a page, such as... Figure 5 As shown.
[0071] exist Figure 5The example lists the text, path information, and location for seven operable components. Taking the first line as an example, the text is "Transportation," the path information is "BB" (this is a simplified representation; the actual path may be more complex), and the location is "0,0,100,1000," represented by several coordinate points. Taking the third line as another example, the text is "Airplane," the path information is "BB / DD," and the location is "0,50,50,950." From the representation of the path information, it can be seen that the operable component "Airplane" is a child node of "Transportation." Similarly, "Subway" is also a child node of "Transportation." Of course, from the text content, both "Airplane" and "Subway" represent a specific mode of transportation; that is, these two text contents belong to the same content level. Similarly, there can be more levels, such as "Weather" under "Region," and "Region" under "Hangzhou" and "Shanghai," and so on.
[0072] S406: Based on the text, the path information, and the location, generate a hierarchical content tree offline, wherein the nodes in the hierarchical content tree correspond to the data collection target.
[0073] In one or more embodiments of this specification, the hierarchical content tree is constructed according to the substantive hierarchical relationship between the collected content. Here, content mainly refers to text, but path information also needs to be considered.
[0074] In the hierarchical content tree, content (which also represents the corresponding operable components) is distributed as nodes according to its content level. Tree nodes at the same level can represent content belonging to the same content level. (More precisely, when constructing content levels, content belonging to the same branch within the same level of tree nodes can also be considered to belong to the same content level; in this case, content belonging to different branches may not necessarily belong to the same content level.) Path information reflects the direct correlation between parent and child nodes. It should be noted that content belonging to the same content level but belonging to different parent nodes may also have indirect correlations, requiring specific analysis based on the hierarchy depth and specific business scenario.
[0075] Each operational component that has collected information is represented as a node in the hierarchical content tree. This node also has the corresponding text, path information, and location of the operational component. For ease of description, the corresponding node is referred to by its corresponding text.
[0076] In one or more embodiments of this specification, data collection on the page and the generation of the hierarchical content tree can be performed offline. This allows for more time and computing resources, which helps to construct a tree structure that can realistically represent the relationships and hierarchical relationships between the text content on the page. Regarding time and computing resource consumption, taking images as an example, data collection targets require the use of OCR and other methods to identify the images and extract the text contained within them. This operation is relatively time-consuming and computationally resource-intensive. This application avoids performing image data collection actions online, instead performing them offline, thus offering better practicality and effectiveness.
[0077] S408: Determine the location of the user's online operation on the page.
[0078] In one or more embodiments of this specification, a user performs an online operation on an operable component on a page containing collected data. The user's operation location includes at least one coordinate point within the area occupied by the operable component. This at least one coordinate point allows the operable component to be identified. Since a user's online operation can reflect information that the user currently cares about or prefers, this can be used as a basis to prepare to obtain surrounding related content text through a hierarchical content tree.
[0079] S410: Search offline in the hierarchical content tree for a node that matches the operation location, and obtain the corresponding text based on the matched node as the surrounding related content text of the operation location of the online operation.
[0080] Taking the operable component as a clickable component as an example, then online operation is online click operation, and the operation position is the click position.
[0081] In one or more embodiments of this specification, nodes in the hierarchical content tree have corresponding region ranges, and operation positions falling within these region ranges are matched with the corresponding nodes. The region ranges corresponding to each node can be pre-calculated; see [link to documentation]. Figure 6 , Figure 6 This is a schematic diagram illustrating a calculation scheme for the area range corresponding to a node in a hierarchical content tree, provided for one or more embodiments of this specification.
[0082] exist Figure 6 In this scheme, the area corresponding to the parent node in the hierarchical content tree is regarded as the union of the areas corresponding to all the child nodes under the parent node. For example, if A is the parent node and has two child nodes B and C, then the area corresponding to A is the union of the areas corresponding to B and C respectively. Of course, it can also be greater than the union.
[0083] Based on the characteristic that most normal visual regions are rectangular, we can ensure that the region corresponding to each parent node is also a complete rectangle by taking the union of the subsets. This approach is suitable for scenarios where both parent and child nodes are on the same page. Based on this idea, see... Figure 7 , Figure 7 This is a schematic diagram illustrating the effect of a calculation scheme for the area range corresponding to a node of a hierarchical content tree provided in one or more embodiments of this specification.
[0084] exist Figure 7 The image shows the effects of four methods for calculating the region range based on the union. In each case, the left side shows the region range corresponding to the two child nodes respectively, and the right side shows the region range corresponding to their parent node.
[0085] Based on the calculated region range, nodes matching the operation location are searched offline within the hierarchical content tree. This involves searching one or more regions where the operation location is situated, and then identifying the nodes corresponding to those regions as the matching nodes. A binary search can be performed within the hierarchical content tree. In actual testing, for most hierarchical content trees constructed for testing, the number of region matching searches does not exceed 10, demonstrating high efficiency.
[0086] For example, within the hierarchical content tree, an offline search can be performed to find a specific area (e.g., a minimum area) where the operation location is situated. Based on the node hierarchy of the node corresponding to this area within the hierarchical content tree, the model dynamically determines whether to continue searching upwards and / or downwards within the hierarchical content tree for the node hierarchy of that area, and performs the offline search accordingly. The business can then use the model to efficiently and accurately decide how many content levels of related text content to retrieve based on actual needs.
[0087] Furthermore, the text corresponding to at least some of the successfully matched nodes (e.g., selecting all text or text from a certain content level, etc.) can be identified as the surrounding related content text of the online operation location.
[0088] In one or more embodiments of this specification, after obtaining the corresponding text based on the matched node as the surrounding content text associated with the operation location of the online operation, product information or service information can be extracted based on the surrounding content text associated with the operation location of the online operation as user preference information. This may accurately analyze the user's intent, and then recommend corresponding products or services to the user or similar users based on the preference information, which helps to improve user experience and facilitate transactions.
[0089] pass Figure 4This method generates a hierarchical content tree based on information reflecting the relevance between different content levels, such as text, path information, and location. After a user performs an online action, such as clicking on an operable component, the generated hierarchical content tree can conveniently and accurately match one or more relevant content nodes from one or more layers of content. This allows for the acquisition of both the text corresponding to the operable component itself and the surrounding related content text with relatively high reference value for the online action's location. This helps to more accurately infer the product or service that the user truly cares about based on their online action. This text acquisition method has high reliability and effectiveness. Furthermore, since the generation of the hierarchical content tree and the acquisition of surrounding related content text are both performed offline, it does not affect online business performance, making it highly practical.
[0090] based on Figure 4 In addition to the method described herein, this specification also provides some specific implementation schemes and extension schemes of this method, which will be further explained below.
[0091] As mentioned earlier, a hierarchical content tree can be generated based on existing structural information of the page, thereby helping to reduce costs and improve generation efficiency. Based on this idea, one or more embodiments of this specification provide a flowchart illustrating a hierarchical content tree generation scheme, see [link to flowchart]. Figure 8 .
[0092] Figure 8 The process includes the following steps:
[0093] S802: Obtain the document structure element tree of the page that reflects the path information.
[0094] S804: Determine the document structure element tag type to which the operable component belongs.
[0095] You can select operable components and determine document structure element tag types based on the granularity of the components you are interested in. For example, you can select document structure element tag types such as "class", or you can specify the document structure element tag type of a particular operable component.
[0096] S806: Extract local structure from the document structure element tree according to the type of the document structure element tag to which it belongs.
[0097] You can remove document structure elements that are not related to the operable components you are interested in from the document structure element tree, leaving a more concise local structure.
[0098] S808: Generate a hierarchical content tree offline based on the local structure, the text, and the location.
[0099] The nodes in the generated hierarchical content tree contain the corresponding text, and may also contain the corresponding location or area range.
[0100] In one or more embodiments of this specification, a focus is also placed on improving the reliability of each content level in the hierarchical content tree (from a tree structure perspective, this is reflected in node hierarchy, ensuring that text content at the same node level belongs to the same content level as much as possible). This allows for analysis of the text content itself and further attention to the layout of operable components. Both types of information can reflect the degree of correlation between different operable components to some extent. Based on this idea, one or more embodiments of this specification also provide a flowchart illustrating a hierarchical content tree generation scheme, see [link to relevant documentation]. Figure 9 .
[0101] Figure 9 The process includes the following steps:
[0102] S902: Determine whether the domain similarity between the texts corresponding to the two specified operable components is greater than a first set threshold, and whether the style similarity between the two specified operable components is greater than a second set threshold.
[0103] More specifically, content similarity comparisons can be performed on the copy, aiming for a high degree of similarity without being identical, to avoid repetition and help prevent similar content from appearing. Figure 1 The two "Order Now" text prompts shown led to misjudgment.
[0104] S904: If so, then determine that the two specified operable components are at the same node level.
[0105] When the similarity in domain and style is sufficiently high, it can be assumed that the content of two operable components is likely to belong to the same content level, and therefore the corresponding nodes can be classified into the same node level.
[0106] After step S904 is executed, a hierarchical content tree can then be generated offline based on the determined relative relationships between the same node levels, as well as path information and location. For example, the similarity between text content can be further verified to more reliably determine different node levels.
[0107] In addition, the subsequent steps also provide an alternative implementation scheme that combines the layout of operable components, which can be selected when computing power is sufficient.
[0108] S906: If the two specified operable components are on the same page, then for each of the two specified operable components, determine the regional layout information of each operable component on the same page, wherein the regional range corresponding to the regional layout information of each operable component does not overlap.
[0109] On the same page, there may be multiple localized layouts that are the same or nearly the same (e.g., Figure 1 The ordering areas for "Malatang" and "Hot Pot" are laid out the same, which means they are likely to represent different business branches. By referring to the hierarchical content tree, they may be distributed on different tree branches. This can be used as a reference to help determine the relative positional relationship of nodes.
[0110] S908: Determine whether the similarity between the various regional layout information is greater than a third set threshold.
[0111] S910: If so, then determine that the two specified operable components belong to child nodes of different parent nodes.
[0112] If the similarity between the regional layout information is high enough, it can be inferred that the two operable components are on different branches.
[0113] S912: Based on the determined relative relationships of child nodes belonging to different parent nodes, as well as the path information and the position, generate a hierarchical content tree offline.
[0114] In one or more embodiments of this specification, a detailed consideration and analysis of the node hierarchy and the relative relationships of child nodes helps to improve the reliability of the content hierarchy divided in the hierarchical content tree and the parallel branch structure.
[0115] Intuitively, with Figure 5 Taking the data collected in the middle as an example, one or more embodiments of this specification provide a schematic diagram of a hierarchical content tree structure, see [link to documentation]. Figure 10 .
[0116] As can be seen, in Figure 10 In this context, text content at the same node level also belongs to the same content level. For example, transportation and weather are two parallel major sections in the application, while airplanes, subways, and regions are first-level minor sections divided under the major sections. Text content with a sufficient degree of relevance is generally located on the same branch in the content tree at this level.
[0117] In one or more embodiments of this specification, the business significance of the text content is used to more reliably determine how many content levels (especially content within the same branch) should be selected. See also Figure 11 , Figure 11 This document provides a flowchart illustrating an offline search in a hierarchical content tree to determine a matching region range, which can be executed to achieve the aforementioned offline search operation location in the hierarchical content tree for one or more regions ranges.
[0118] Figure 11 The process includes the following steps:
[0119] S1102: In the hierarchical content tree, find the smallest area range where the operation location is located offline;
[0120] Then, starting from the node level corresponding to the smallest region in the hierarchical content tree, the offline search can continue to find more regions where the operation location is located, moving upwards to higher node levels in the hierarchical content tree. Specifically, a specified number of node levels can be searched upwards; more precise searches can also be performed based on the analysis of business significance, see S1104~S1108.
[0121] S1104: Obtain the text contained in the node corresponding to the smallest area range.
[0122] S1106: Calculate the business significance of the text and determine whether the business significance is greater than a set threshold.
[0123] The more fully the copy reflects the relevant business information, the greater its business significance. Sufficiently high business significance makes it easier to determine the product or service the user is actually interested in during their online interaction. A more accurate assessment of business significance can be achieved by combining copy content from multiple levels.
[0124] S1108: If not, continue to search offline for the region where the operation location is located at the next higher node level in the hierarchical content tree, and calculate and judge the corresponding business significance for the region found offline until the business significance is greater than the set threshold.
[0125] Intuitively, one or more embodiments of this specification also provide a schematic diagram of the results found offline in a hierarchical content tree, see [link to documentation]. Figure 12 .
[0126] exist Figure 12In this example, the operation location is represented as (250, 300). By matching the region range corresponding to the node in the hierarchical content tree, the smallest region matched is "Shanghai," and further upwards, "Region" and "Weather" are matched. These texts can be used as surrounding related content texts for the operation location. Of course, in actual applications, the hierarchical content tree may be much more complex. In that case, the specific number of levels of text content to select upwards needs to be analyzed and determined more precisely using the methods provided above, rather than necessarily searching all the way up to the root node.
[0127] Based on the same idea, one or more embodiments of this specification also provide apparatus and devices corresponding to the above methods, such as... Figure 13 , Figure 14 As shown. The apparatus and equipment are capable of performing the above methods and related alternatives accordingly.
[0128] Figure 13 This specification provides a schematic diagram of the structure of a document acquisition device according to one or more embodiments, the device comprising:
[0129] The data acquisition target determination module 1302 determines one or more operable components within a page;
[0130] The component-related information determination module 1304 collects the text, path information and location corresponding to each operable component;
[0131] The offline content tree generation module 1306 generates a hierarchical content tree offline based on the text, the path information, and the location, wherein the nodes in the hierarchical content tree correspond to the operable components;
[0132] The online operation location determination module 1308 determines the operation location of the user's online operation on the page.
[0133] The offline content acquisition module 1310 searches offline in the hierarchical content tree for nodes that match the operation location, and obtains the corresponding text based on the matched nodes as the surrounding related content text of the operation location of the online operation.
[0134] Optionally, the content tree offline generation module 1306 obtains the document structure element tree of the page that reflects the path information;
[0135] Determine the document structure element tag type to which the operable component belongs;
[0136] Based on the document structure element tag type, extract the local structure from the document structure element tree;
[0137] Based on the local structure, the text, and the location, a hierarchical content tree is generated offline.
[0138] Optionally, the content tree offline generation module 1306 determines whether the domain similarity between the texts corresponding to the two specified operable components is greater than a first set threshold, and whether the style similarity between the two specified operable components is greater than a second set threshold.
[0139] If so, then it is determined that the two specified operable components are at the same node level;
[0140] Based on the determined relative relationships of the same node levels, as well as the path information and the location, a hierarchical content tree is generated offline.
[0141] Optionally, the content tree offline generation module 1306, if the two specified operable components are on the same page, determines the regional layout information of each operable component on the same page for each of the two specified operable components, wherein the regional ranges corresponding to the regional layout information of each operable component do not overlap.
[0142] Determine whether the similarity between the various regional layout information is greater than a third preset threshold;
[0143] If so, then it is determined that the two specified operable components belong to child nodes of different parent nodes;
[0144] Based on the determined relative relationships of child nodes belonging to different parent nodes, as well as the path information and the location, a hierarchical content tree is generated offline.
[0145] Optionally, the nodes in the hierarchical content tree have corresponding area ranges, and the area range corresponding to the parent node in the hierarchical content tree includes the union of the area ranges corresponding to all child nodes under the parent node;
[0146] The offline content acquisition module 1310 searches offline in the hierarchical content tree for one or more of the regions where the operation location is located.
[0147] The nodes corresponding to the found area range are identified as nodes that match the operation location.
[0148] Optionally, the offline content acquisition module 1310 searches offline in the hierarchical content tree for one of the regions where the operation location is located;
[0149] Based on the node level of the node corresponding to one of the said regions in the hierarchical content tree, through model reasoning, a dynamic decision is made to continue to search the node level of the said region offline upwards and / or downwards in the hierarchical content tree, and the offline search is performed accordingly.
[0150] Optionally, the offline content acquisition module 1310 searches offline in the hierarchical content tree for the smallest area range where the operation position is located.
[0151] Starting from the node level of the smallest region corresponding to the node in the hierarchical content tree, continue offline searching for more regions where the operation location is located to higher node levels in the hierarchical content tree.
[0152] Optionally, the offline content acquisition module 1310 acquires the content contained in the node corresponding to the smallest area range;
[0153] Calculate the business significance score of the text and determine whether the business significance score is greater than a set threshold;
[0154] If not, continue offline searching for the region where the operation location is located at the next higher node level in the hierarchical content tree, and calculate and judge the corresponding business significance for the region found through the continued offline search, until the business significance is greater than the set threshold.
[0155] Optionally, the device further includes:
[0156] The preferred product and service recommendation module 1312, after obtaining the corresponding text based on the matched node as the surrounding related content text of the online operation location, extracts product information or service information based on the surrounding related content text of the online operation location as the user's preference information.
[0157] Based on the preference information, products or services are recommended to the user.
[0158] Optionally, the operable component is a clickable component, the online operation is an online click operation, and the operation position is a click position.
[0159] Figure 14 This specification provides a schematic diagram of the structure of a document acquisition device according to one or more embodiments, the device comprising:
[0160] At least one processor; and,
[0161] A memory communicatively connected to the at least one processor; wherein,
[0162] The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to:
[0163] Identify one or more operable components within a page;
[0164] Collect the text, path information, and location corresponding to each operable component;
[0165] Based on the text, the path information, and the location, a hierarchical content tree is generated offline, and the nodes in the hierarchical content tree correspond to the operable components;
[0166] Determine the location of the user's online operation on the page;
[0167] In the hierarchical content tree, a node matching the operation location is searched offline, and the corresponding text is obtained based on the matching node as the surrounding related content text of the operation location of the online operation.
[0168] Based on the same idea, one or more embodiments of this specification also provide a non-volatile computer storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured as follows:
[0169] Identify one or more operable components within a page;
[0170] Collect the text, path information, and location corresponding to each operable component;
[0171] Based on the text, the path information, and the location, a hierarchical content tree is generated offline, and the nodes in the hierarchical content tree correspond to the operable components;
[0172] Determine the location of the user's online operation on the page;
[0173] In the hierarchical content tree, a node matching the operation location is searched offline, and the corresponding text is obtained based on the matching node as the surrounding related content text of the operation location of the online operation.
[0174] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.
[0175] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0176] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0177] For ease of description, the above devices are described in terms of function, divided into various units. Of course, in implementing this specification, the functions of each unit can be implemented in one or more software and / or hardware components.
[0178] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, the embodiments of this specification can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the embodiments of this specification can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0179] This specification is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this specification. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0180] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0181] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0182] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, devices, and non-volatile computer storage media are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0183] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0184] The above description is merely one or more embodiments of this specification and is not intended to limit this specification. Various modifications and variations can be made to the one or more embodiments of this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of one or more embodiments of this specification should be included within the scope of the claims of this specification.
Claims
1. A method for obtaining copywriting, comprising: Identify data collection targets within one or more pages; Collect the text, path information, and location corresponding to each of the data collection targets; Based on the text, the path information, and the location, a hierarchical content tree is generated offline, and the nodes in the hierarchical content tree correspond to the data collection target; Determine the location of the user's online operation on the page; In the hierarchical content tree, a node matching the operation location is searched offline, and the corresponding text is obtained based on the matching node as the surrounding related content text of the operation location of the online operation.
2. The method of claim 1, wherein the data acquisition target includes at least an operable component.
3. The method as described in claim 2, wherein generating a hierarchical content tree offline based on the text, the path information, and the location specifically includes: Obtain the document structure element tree of the page that reflects the path information; Determine the document structure element tag type to which the operable component belongs; Based on the document structure element tag type, extract the local structure from the document structure element tree; Based on the local structure, the text, and the location, a hierarchical content tree is generated offline.
4. The method as described in claim 2, wherein generating a hierarchical content tree offline based on the text, the path information, and the location specifically includes: Determine whether the domain similarity between the text corresponding to the two specified operable components is greater than a first set threshold, and whether the style similarity between the two specified operable components is greater than a second set threshold. If so, then it is determined that the two specified operable components are at the same node level; Based on the determined relative relationships of the same node levels, as well as the path information and the location, a hierarchical content tree is generated offline.
5. The method as described in claim 4, wherein generating a hierarchical content tree offline based on the determined relative relationships of the same node levels, the path information, and the location specifically includes: If the two specified operable components are on the same page, then for each of the two specified operable components, the regional layout information of each operable component on the same page is determined, wherein the regional ranges corresponding to the regional layout information of each operable component do not overlap. Determine whether the similarity between the various regional layout information is greater than a third preset threshold; If so, then it is determined that the two specified operable components belong to child nodes of different parent nodes; Based on the determined relative relationships of child nodes belonging to different parent nodes, as well as the path information and the location, a hierarchical content tree is generated offline.
6. The method as described in claim 2, wherein the nodes in the hierarchical content tree have corresponding region ranges, and the region range corresponding to the parent node in the hierarchical content tree includes the union of the region ranges corresponding to all child nodes under the parent node; The offline search for a node matching the operation location in the hierarchical content tree specifically includes: Search offline within the hierarchical content tree for one or more of the regions where the operation location is situated. The nodes corresponding to the found area range are identified as nodes that match the operation location.
7. The method of claim 6, wherein the offline search for one or more regions where the operation location is located in the hierarchical content tree specifically includes: In the hierarchical content tree, conduct an offline search for one of the regions where the operation location is situated; Based on the node level of the node corresponding to one of the said regions in the hierarchical content tree, through model reasoning, a dynamic decision is made to continue to search the node level of the said region offline upwards and / or downwards in the hierarchical content tree, and the offline search is performed accordingly.
8. The method of claim 6, wherein the offline search for one or more regions where the operation location is located in the hierarchical content tree specifically includes: In the hierarchical content tree, find the smallest area range where the operation location is located offline; Starting from the node level of the smallest region corresponding to the node in the hierarchical content tree, continue offline searching for more regions where the operation location is located to higher node levels in the hierarchical content tree.
9. The method of claim 8, wherein the step of continuing the offline search for more regions where the operation location is located, from the node level of the node corresponding to the smallest region range in the hierarchical content tree to the node level of a higher node in the hierarchical content tree, specifically includes: Obtain the text contained in the node corresponding to the smallest range of the region; Calculate the business significance score of the text and determine whether the business significance score is greater than a set threshold; If not, continue offline searching for the region where the operation location is located to the next higher node level in the hierarchical content tree, and calculate and judge the corresponding business significance for the region found through the continued offline search, until the business significance is greater than the set threshold.
10. The method of claim 2, wherein after obtaining the corresponding text based on the matched node as the surrounding related content text of the online operation location, the method further includes: Based on the surrounding related content text of the online operation location, extract product or service information as the user's preference information; Based on the preference information, products or services are recommended to the user.
11. The method of claim 2, wherein the operable component is a clickable component, the online operation is an online click operation, and the operation position is a click position.
12. A document acquisition device, comprising: The data collection target determination module determines the data collection targets within one or more pages. The component-related information determination module collects the text, path information, and location corresponding to each of the data collection targets; The offline content tree generation module generates a hierarchical content tree offline based on the text, the path information, and the location, wherein the nodes in the hierarchical content tree correspond to the data collection target; The online operation location determination module determines the user's online operation location on the page. The offline content acquisition module searches for nodes that match the operation location offline in the hierarchical content tree, and obtains the corresponding text based on the matched nodes as the surrounding related content text of the operation location of the online operation.
13. The apparatus of claim 12, wherein the data acquisition target includes at least an operable component.
14. The apparatus of claim 13, wherein the offline content tree generation module obtains a document structure element tree of the page reflecting the path information; Determine the document structure element tag type to which the operable component belongs; Based on the document structure element tag type, extract the local structure from the document structure element tree; Based on the local structure, the text, and the location, a hierarchical content tree is generated offline.
15. The apparatus of claim 13, wherein the content tree offline generation module determines whether the domain similarity between the texts corresponding to the two specified operable components is greater than a first preset threshold, and whether the style similarity between the two specified operable components is greater than a second preset threshold. If so, then it is determined that the two specified operable components are at the same node level; Based on the determined relative relationships of the same node levels, as well as the path information and the location, a hierarchical content tree is generated offline.
16. The apparatus of claim 15, wherein the offline content tree generation module, if the two specified operable components are on the same page, determines the regional layout information of each operable component on the same page for each of the two specified operable components, wherein... The regional ranges corresponding to the regional layout information of each operable component do not overlap; Determine whether the similarity between the various regional layout information is greater than a third preset threshold; If so, then it is determined that the two specified operable components belong to child nodes of different parent nodes; Based on the determined relative relationships of child nodes belonging to different parent nodes, as well as the path information and the location, a hierarchical content tree is generated offline.
17. The apparatus of claim 13, wherein the nodes in the hierarchical content tree have corresponding region ranges, and the region range corresponding to the parent node in the hierarchical content tree includes the union of the region ranges corresponding to all child nodes under the parent node; The offline content acquisition module searches offline within the hierarchical content tree for one or more of the regions where the operation location is situated. The nodes corresponding to the found area range are identified as nodes that match the operation location.
18. The apparatus of claim 17, wherein the offline content acquisition module searches offline within the hierarchical content tree for one of the regions where the operation location is situated; Based on the node level of the node corresponding to one of the said regions in the hierarchical content tree, through model reasoning, a dynamic decision is made to continue to search the node level of the said region offline upwards and / or downwards in the hierarchical content tree, and the offline search is performed accordingly.
19. The apparatus of claim 17, wherein the offline content acquisition module searches offline in the hierarchical content tree for the smallest area range where the operation position is located; Starting from the node level of the smallest region corresponding to the node in the hierarchical content tree, continue offline searching for more regions where the operation location is located to higher node levels in the hierarchical content tree.
20. The apparatus of claim 19, wherein the offline content acquisition module acquires the content contained in the node corresponding to the smallest area range; Calculate the business significance score of the text and determine whether the business significance score is greater than a set threshold; If not, continue offline searching for the region where the operation location is located to the next higher node level in the hierarchical content tree, and calculate and judge the corresponding business significance for the region found through the continued offline search, until the business significance is greater than the set threshold.
21. The apparatus of claim 13, further comprising: The preferred product and service recommendation module, after obtaining the corresponding text based on the matched node as the surrounding related content text of the online operation location, extracts product information or service information based on the surrounding related content text of the online operation location as the user's preference information; Based on the preference information, products or services are recommended to the user.
22. The apparatus of claim 13, wherein the operable component is a clickable component, the online operation is an online click operation, and the operation position is a click position.
23. A document acquisition device, comprising: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, 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: Identify data collection targets within one or more pages; Collect the text, path information, and location corresponding to each of the data collection targets; Based on the text, the path information, and the location, a hierarchical content tree is generated offline, and the nodes in the hierarchical content tree correspond to the data collection target; Determine the location of the user's online operation on the page; In the hierarchical content tree, a node matching the operation location is searched offline, and the corresponding text is obtained based on the matching node as the surrounding related content text of the operation location of the online operation.
Citation Information
Patent Citations
Data processing method and device and storage medium
CN113568901A
Media content recommendations based on preferences for different types of media content
US20120078937A1
