CN108509544B - Method and device for acquiring mind map, equipment and readable storage medium - Google Patents

Method and device for acquiring mind map, equipment and readable storage medium Download PDF

Info

Publication number
CN108509544B
CN108509544B CN201810227794.3A CN201810227794A CN108509544B CN 108509544 B CN108509544 B CN 108509544B CN 201810227794 A CN201810227794 A CN 201810227794A CN 108509544 B CN108509544 B CN 108509544B
Authority
CN
China
Prior art keywords
webpage
content
node
red
mind map
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810227794.3A
Other languages
Chinese (zh)
Other versions
CN108509544A (en
Inventor
梁宇轩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201810227794.3A priority Critical patent/CN108509544B/en
Publication of CN108509544A publication Critical patent/CN108509544A/en
Application granted granted Critical
Publication of CN108509544B publication Critical patent/CN108509544B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method, a device, equipment and a readable storage medium for acquiring a mind map, wherein the method comprises the following steps: the method comprises the steps of receiving an acquisition request of a thought map sent by a webpage client, wherein the acquisition request comprises a URL address of a webpage displayed by the webpage client, generating the thought map of webpage content of the webpage according to the URL address, and feeding back an acquisition response carrying the thought map to the webpage client, so that the webpage client can display the thought map. Compared with the prior art, the method for generating the mind map of the webpage can display the outline of the content in the webpage by using the mind map, the display mode of the webpage content is more flexible, and the user can know the content in the webpage by looking up the mind map, so that the user can be effectively helped to realize the quick browsing of the webpage content.

Description

Method and device for acquiring mind map, equipment and readable storage medium
Technical Field
The invention relates to the technical field of computers, in particular to a method, a device, equipment and a readable storage medium for acquiring a mind map.
Background
At present, when a user browses a webpage, the user needs to browse the contents displayed in the webpage one by one to know the contents in the webpage, and especially when the contents are more, the user needs to spend more time, so that the display mode of the content of the webpage is not flexible enough at present, and the user cannot be helped to quickly know the contents of the webpage.
Disclosure of Invention
The invention mainly aims to provide a method, a device, equipment and a readable storage medium for acquiring a thinking guide graph, and aims to solve the technical problems that in the prior art, the display mode of webpage content is not flexible enough and a user cannot be helped to quickly know the content of a webpage.
To achieve the above object, a first aspect of the present invention provides a method for obtaining a mind map, including:
receiving an acquisition request of a mind map sent by a webpage client, wherein the acquisition request comprises a Uniform Resource Locator (URL) address of a webpage displayed by the webpage client;
generating a thinking map of the webpage content of the webpage according to the URL address;
and feeding back the acquired response carrying the thinking map to the webpage client.
In order to achieve the above object, a second aspect of the present invention provides a method for obtaining a mind map, including:
the method comprises the steps that a webpage client sends an acquisition request of a thinking guide picture to a webpage server, wherein the acquisition request comprises a Uniform Resource Locator (URL) address of a webpage displayed by the webpage client;
receiving an acquisition response carrying a mind map fed back by the web server, wherein the mind map is generated by the web server according to the URL address and carries the web content of the web page;
and displaying the mind map.
To achieve the above object, a third aspect of the present invention provides a thought map acquiring apparatus, including:
the system comprises a first receiving module, a second receiving module and a third receiving module, wherein the first receiving module is used for receiving an acquisition request of a mind map sent by a webpage client, and the acquisition request comprises a Uniform Resource Locator (URL) address of a webpage displayed by the webpage client;
the generating module is used for generating a thinking map of the webpage content of the webpage according to the URL address;
and the feedback module is used for feeding back the acquired response carrying the thinking map to the webpage client.
To achieve the above object, a fourth aspect of the present invention provides a device for obtaining a mind map, including:
the system comprises a first sending module, a second sending module and a third sending module, wherein the first sending module is used for sending a request for acquiring a thinking map to a webpage server, and the request for acquiring comprises a Uniform Resource Locator (URL) address of a webpage displayed by a webpage client;
the first response receiving module is used for receiving an acquisition response which is fed back by the webpage server and carries a mind map, wherein the mind map is the mind map of the webpage content of the webpage generated by the webpage server according to the URL address;
and the display module is used for displaying the thinking guide picture.
To achieve the above object, a fifth aspect of the present invention provides an apparatus comprising a memory, a processor and a computer program stored on the memory and running on the processor, wherein the processor implements the steps of the method for acquiring a mind map according to the first aspect or implements the steps of the method for acquiring a mind map according to the second aspect when executing the computer program.
To achieve the above object, a sixth aspect of the present invention provides a readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps in the method for acquiring a mind map according to the first aspect, or implements the steps in the method for acquiring a mind map according to the second aspect.
The invention provides a method for acquiring a mind map, which comprises the following steps: receiving an acquisition request of a thought map sent by a webpage client, wherein the acquisition request comprises a Uniform Resource Locator (URL) address of a webpage displayed by the webpage client, generating the thought map of webpage content of the webpage according to the URL address, and feeding back an acquisition response carrying the thought map to the webpage client so that the webpage client can display the thought map. Compared with the prior art, the method for generating the mind map of the webpage can display the outline of the content in the webpage by using the mind map, the display mode of the webpage content is more flexible, and the user can know the content in the webpage by looking up the mind map, so that the user can be effectively helped to realize the quick browsing of the webpage content.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart illustrating a method for obtaining a mind map according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating a method for obtaining a mind map according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a web page in an embodiment of the invention;
FIG. 4 is a schematic diagram of an insertion node according to an embodiment of the present invention;
FIG. 5 is a structural diagram of a tree structure of a red-black tree according to an embodiment of the present invention;
FIG. 6 is a diagram illustrating a mind map in an embodiment of the present invention;
FIG. 7 is a schematic flow chart illustrating a method for obtaining a mind map according to an embodiment of the present invention;
FIG. 8 is a schematic interface diagram of a web client according to an embodiment of the present invention;
FIG. 9 is a diagram illustrating a depth first search algorithm in accordance with an embodiment of the present invention;
FIG. 10 is a schematic diagram of a design framework for distributed storage in an embodiment of the invention;
FIG. 11 is a schematic diagram of a distributed storage system in an embodiment of the invention;
FIG. 12 is an interaction diagram illustrating a method for obtaining a mind map according to an embodiment of the present invention;
FIG. 13 is a schematic structural diagram of an apparatus for obtaining a mental map according to an embodiment of the present invention;
FIG. 14 is a schematic diagram of another structure of an apparatus for obtaining mental diagrams in an embodiment of the present invention;
FIG. 15 is a schematic diagram of another structure of an apparatus for obtaining a mental map according to an embodiment of the present invention;
fig. 16 is a block diagram of a device.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The technical problem that a user cannot be helped to quickly know the content of the webpage due to the fact that the display mode of the webpage content in the prior art is not flexible enough.
In order to solve the above problems, the present invention provides a method for obtaining a mind map, which can display a summary of content in a web page by using the mind map in a manner of generating the mind map of the web page, the display manner of the web page content is more flexible, and a user can know the content in the web page by looking up the mind map, thereby effectively helping the user to realize quick browsing of the web page content.
Please refer to fig. 1, which is a flowchart illustrating a method for obtaining a mind map according to an embodiment of the present invention, the method includes:
step 101, receiving an acquisition request of a mind map sent by a webpage client, wherein the acquisition request comprises a URL (uniform resource locator) address of a webpage displayed by the webpage client;
102, generating a thinking map of the webpage content of the webpage according to the URL address;
and 103, feeding back the acquired response carrying the thinking map to the webpage client.
In the embodiment of the present invention, the method for obtaining the mind map is implemented by a device for obtaining the mind map (hereinafter, simply referred to as "obtaining device"), the obtaining device is composed of program modules and is stored in a readable storage medium of a web server, and a processor in the web server runs the obtaining device in the readable storage medium, so that the method for obtaining the mind map can be implemented.
The thinking guide graph uses the skill of graphics and text repetition, the relationship of all levels of themes is expressed by the mutual membership and related level graphs, and the memory link is established between the theme key words and the images, colors and the like. The embodiment of the invention generates the thinking map from the webpage content of the webpage based on the characteristics of the thinking map, so that the user can read, memorize and think quickly.
In the embodiment of the invention, after the webpage client loads and displays the webpage, the user can generate the acquisition request of the mind map by appointed operation touch control, so that the webpage client sends the acquisition request of the mind map to the webpage server. The method includes the steps that a trigger button is arranged in an operation bar of a webpage client, and if the trigger button is clicked, an acquisition request is generated, or for equipment with a touch screen, a user can also inform execution of a specified gesture to trigger generation of the acquisition request.
The generated acquisition request includes a URL address of a web page displayed by the web page client, for example, if the web page currently displayed by the web page client is web page a, the acquisition request includes the URL address of web page a. The URL address is a compact representation of the location and access method of resources available on the internet, and is the address of a standard resource on the internet, where each file in the network has a unique URL.
The obtaining device in the webpage server receives the obtaining request of the thinking map sent by the webpage client and generates the thinking map of the webpage content of the webpage according to the URL address, so that the webpage content of the webpage can be displayed in the thinking map mode, the display mode is flexible, and a user can conveniently and quickly know the webpage content of the webpage.
It is to be understood that the web page in the embodiment of the present invention is preferably a web page within an application program that can perform document editing online.
In the embodiment of the invention, an acquisition request of the mind map sent by the webpage client is received, the acquisition request comprises the URL address of the webpage displayed by the webpage client, the mind map of the webpage content of the webpage is generated according to the URL address, and the acquisition response carrying the mind map is fed back to the webpage client, so that the webpage client can display the mind map. Compared with the prior art, the method for generating the mind map of the webpage can display the outline of the content in the webpage by using the mind map, the display mode of the webpage content is more flexible, and the user can know the content in the webpage by looking up the mind map, so that the user can be effectively helped to realize the quick browsing of the webpage content.
Please refer to fig. 2, which is another flow chart illustrating a method for obtaining a mind map according to an embodiment of the present invention, the method includes:
step 201, receiving an acquisition request of a mind map sent by a webpage client, wherein the acquisition request comprises a URL (uniform resource locator) address of a webpage displayed by the webpage client;
step 202, generating a red-black tree of the webpage according to the URL address;
and step 203, generating a thinking map of the webpage content of the webpage by using the red and black trees.
In the embodiment of the present invention, after receiving the acquisition request, the acquisition device needs to generate a red and black tree of the content style of the web page according to the URL address included in the acquisition request, and generate a mind map of the web page content of the web page by using the red and black tree.
The content style of the web page mainly refers to a style with a hierarchical relationship, such as a headline, a primary title, a secondary title and the like, in the content of the web page.
The red and black tree is a self-balancing binary search tree, is a data structure used in computer science, and can quickly find a data item of a given node.
In an embodiment of the present invention, the step 202 specifically includes the following steps:
step A1, acquiring the webpage content of the webpage by using the URL address, and extracting a content style with a hierarchical relationship from the webpage content;
and A2, based on a preset red and black tree generating rule, generating the red and black tree of the webpage by using the content style, wherein the node content of the node of the red and black tree is the content of the corresponding content style.
The acquisition device acquires the webpage content of the webpage corresponding to the URL address by using the URL address and extracts the content style with the hierarchical relationship from the webpage content. It can be understood that the web page content of the web page is set according to the content style during the design, and the content style can effectively represent the hierarchical relationship of the web page memory, please refer to fig. 3, which is a schematic diagram of the web page in the embodiment of the present invention.
In the embodiment of the invention, the webpage server is internally provided with a red-black tree generating rule, the obtained content style with hierarchical relationship can be used for generating the red-black tree of the content style of the webpage, and the node content of the node of the red-black tree is the content of the corresponding content style.
The red and black tree rule has the following points:
1. each node is either black or red;
2. the root node is black;
3. if a node is red, then her children must be black, and vice versa;
4. each path from the root node to a leaf node must contain the same number of black nodes.
The leaf node may be an entity leaf node or an empty leaf node, where the entity leaf node means that the leaf node has a real content style in the web page content, and the empty leaf node is a virtual node set to satisfy the red and black tree rule and does not have a content style.
In a red-black tree, the number of black nodes on the path from the root node to the leaf node is referred to as the black height. The rules make the path in the red-black tree not have two adjacent red nodes, and the shortest path is all black nodes, and the longest path is alternate red and black nodes. And since each path has the same number of black nodes, none of the paths is twice as long as the others. Therefore, the above-mentioned several rules form the key features of the red-black tree: the longest path from the root node to the leaf node is not more than twice of the shortest path, so that the red and black trees are approximately balanced, and the longest time required for node insertion, deletion and searching of the red and black trees is proportional to the black height of the trees.
In the content styles with hierarchical relationships, the content style of the first layer corresponds to the root node, the root node is a black node, and when the root node is determined and new nodes are added based on the content styles, the new nodes are usually red by default, because the possibility of inserting one red node to violate the rule is smaller than that of inserting one black node, and the black height of the red-black tree is not changed by inserting one red node. For example, please refer to fig. 4, which is a schematic diagram illustrating nodes inserted in an embodiment of the present invention, in fig. 4, the node 50 is a parent node and is a black node, and the nodes 25 and 75 are children nodes and are red nodes, wherein the red nodes and the black nodes are distinguished by shading.
To better understand the red-black tree in the embodiment of the present invention, please refer to fig. 5, which is a schematic structural diagram of the red-black tree in the embodiment of the present invention, wherein the black nodes include nodes a1, a4, a5, a6, a7, a9, a10, a11, a13, a16, a17, a18, a19, a20, a21, a22, and a23, the other nodes are red nodes, and the black nodes are distinguished from the red nodes by shading, it can be seen that the red-black tree in fig. 5 satisfies the rule of the red-black tree, and each path includes 3 black nodes.
In the embodiment of the present invention, after obtaining the red and black tree of the content style of the web page, the method for generating the thinking guide graph of the web page content of the web page by using the red and black tree specifically includes the following steps:
b1, traversing the nodes in the red and black tree, acquiring the node contents of the traversed nodes, and mapping the node contents into the nodes in the thought graph;
and step B2, if the traversed node is a leaf node, acquiring the sub-content of the leaf node in the webpage content, extracting key information of the sub-content, and taking the extracted key information as the sub-node of the corresponding node of the leaf node in the thinking guide graph.
In the embodiment of the present invention, since the node content of the node in the red and black tree is the content of the content style, for example, if the content style is a headline and the headline is "interpretation of URL address", the content of the content style is "interpretation of URL address". In order to generate the mind map by using the red and black tree, the acquiring device traverses the nodes in the red and black tree, acquires the node contents of the traversed nodes, and maps the node contents to the nodes in the mind map, for example, for the root node in the red and black tree, the root node in the mind map. And the hierarchical relationship of each node in the red and black tree is the same as that of each node in the thinking map. In this way, the node content of each node in the red-black tree may be mapped to a part of the mind map, and further, if the traversed node is a leaf node, it is further required to obtain the sub-content of the leaf node in the web page content, where the sub-content generally refers to the detailed content of the node content of the leaf node, for example, if the leaf node is a three-layer title, and the node content is: the "URL address interpretation" indicates that the sub-content of the leaf node in the web page content is the interpretation of the URL address, and may be: a uniform resource locator is a compact representation of the location and access method of a resource available from the internet, and is the address of a standard resource on the internet. The acquiring device extracts key information of the sub-content, wherein the extracting mode may be a keyword extracting mode or other modes, the extracted key information may be a keyword or a phrase with specific meaning, for example, the key information of the sub-content may be "internet, position, access method, address" (keyword extracting mode), or "position and access method of resource, address of standard resource on internet" (phrase with meaning). After the key information is extracted, the key information is taken as a child node of the corresponding node of the leaf node in the thinking graph. It will be appreciated that for the hollow leaf nodes of the red and black trees, hollow nodes may be used instead in the mind map.
It can be understood that the mind map is generated by using the red and black tree, so that the generated mind map also has the performance of the red and black tree, for example, a target node can be quickly found, and therefore, the mind map in the embodiment of the present invention not only can simply display the web page content, but also can be convenient for quickly finding the corresponding content.
Please refer to fig. 6, which is a diagram illustrating a mind map according to an embodiment of the present invention, wherein each line represents a node. It is to be understood that each node of the mind map generated in the embodiment of the present invention may or may not be distinguished by color, and usually, a plurality of nodes under the root node are different colors, that is, if the root node has two child nodes, node a and node B, respectively, node a is red and all nodes behind node a are red, node B is blue and all nodes behind node B are blue, so as to distinguish two large branches from the root node. In fig. 6, no color is used for distinction.
In the embodiment of the invention, an acquisition request of a thinking graph sent by a webpage client is received, webpage content of a webpage is acquired by using a URL address in the acquisition request, a content style with a hierarchical relationship is extracted from the webpage content, a red-black tree of the webpage is generated by using the content style based on a preset red-black tree generation rule, the node content of the node of the red-black tree is the content of the corresponding content style, the node in the red-black tree is traversed, the node content of the traversed node is acquired, the node content is mapped into the node in the thinking graph, if the traversed node is a leaf node, the sub-content of the leaf node in the webpage content is acquired, key information extraction is carried out on the sub-content, and the extracted key information is used as the sub-node of the corresponding node of the leaf node in the thinking graph. Compared with the prior art, the method has the advantages that the main content in the webpage content can be effectively extracted by generating the thinking guide graph from the webpage content of the webpage, the display mode of the webpage content is more flexible, and the node content in the thinking guide graph can be conveniently and quickly searched by firstly obtaining the red and black trees of the content style and utilizing the red and black trees to generate the thinking guide graph.
Please refer to fig. 7, which is a flowchart illustrating a method for obtaining a mind map according to an embodiment of the present invention, the method including:
step 701, receiving an acquisition request of a mind map sent by a webpage client, wherein the acquisition request comprises a URL (uniform resource locator) address of a webpage displayed by the webpage client;
step 702, generating a thinking map of the webpage content of the webpage according to the URL address;
step 703, feeding back the obtaining response carrying the thinking map to the webpage client;
step 704, receiving a query request sent by the web page client, wherein the query request includes a target node to be queried in the thought map;
705, searching the thought-guiding graph by using a preset depth-first search algorithm to obtain child node data of the target node;
step 706, feeding back the query response carrying the child node data to the web page client.
It is understood that the above steps 701 to 703 are similar to those in steps 101 to 103 in the embodiment shown in fig. 1, and are not repeated herein.
In the embodiment of the present invention, after receiving the mind map, the web client displays the mind map, and it is understood that the mind map may be displayed in a form of a small window, i.e. overlaid on the displayed web page, or the mind map may be displayed in parallel with the web page content, as shown in fig. 8, which is an interface diagram of the web client in the embodiment of the present invention, in which the web page content of the web page is displayed in parallel with the mind map.
Wherein, it can set some or all nodes in the thought-guiding graph to be responded, if some nodes are responded, it is usually leaf nodes that can respond, the user can generate the query request by clicking the leaf nodes, the query request includes the target node to be queried. After receiving the query request of the web page client, the web page server searches the thinking graph by using a preset depth-first search algorithm, obtains child node data of the target node, and feeds back a query response carrying the child node data to the web page client, wherein the child node data can be position information, namely the position information of the child content of the target node in the web page of the web page client.
The Depth-First Search algorithm belongs to one of graph algorithms, is abbreviated as DFS in English, namely Depth First Search, and is performed in such a way that each possible path is deep until the path can not be deep any more, and each node can only be accessed once. For better understanding, please refer to fig. 9, which is a schematic diagram of a depth-first search algorithm according to an embodiment of the present invention. In fig. 9, node a is a root node, after accessing root node a, starting from a, any adjacent node of access node a, such as node B, starting from node B, accessing node E adjacent to node B but not yet accessed, then performing similar access from node E, sucking until node G where all adjacent nodes have been accessed is reached, then going back one step, going back to the previous accessed node to see if there are other adjacent nodes that have not been accessed, if yes, accessing this node, then starting from this node again, performing the similar access, if not, going back one step to search again, and repeating the above process until all nodes in the thought graph have been accessed. In fig. 9, 1 to 9 represent the order of node accesses, solid arrows represent the direction of accesses, and dashed arrows represent the rollback procedure.
It can be understood that, in the embodiment of the present invention, if the child content of the target node includes a link, the content in the link is further obtained, and therefore, the child node data may also include the content of the link, and generally, the content of the link is stored in the server in a distributed storage manner, please refer to fig. 10, which is a schematic diagram of a design framework of distributed storage in the embodiment of the present invention; fig. 11 is a schematic diagram of a distributed storage system according to an embodiment of the present invention. In order to solve the bottlenecks of capacity, performance and the like, and the problems of availability, expansibility and the like existing in single-click storage, a distributed storage system is used for providing storage services with high capacity, high performance, high availability and good expansibility for large-scale storage application by dispersedly storing data on a plurality of storage devices, and the design and implementation of a typical distributed storage system are described in fig. 10 and 11, and the system can serve a large number of services, reaches the storage capacity of hundreds of T, and is tested by mass services.
After receiving the child node data, the webpage client jumps according to the position information in the child node data, so that the webpage client can automatically jump to a place which a user wants to see, and if the child node data contains the content of the link, the jumping position displays an identifier, and the user can click the identifier to display the content of the link.
In the embodiment of the invention, if the query request sent by the webpage client is received, the thinking graph is searched by using the preset depth-first search algorithm, the child node data of the target child node is obtained, and the query response carrying the child node data is fed back to the webpage client, so that the webpage client can jump to the child node data immediately, and the user can conveniently check the child node data.
The above embodiment is a technical solution described from the perspective of a web server, and a schematic flow chart of a method for acquiring a mind map will be described below from the perspective of interaction between a web client and a web server, please refer to fig. 12, which includes:
step 1201, the webpage client sends a request for acquiring the thought map containing the URL address to the webpage server;
and the acquisition request comprises a URL address of a webpage displayed by the webpage client.
Step 1202, the web server generates a thinking map of the web content of the web page according to the URL address;
step 1203, the web server feeds back an acquisition response carrying the thinking map to the web client;
step 1204, the webpage client displays the thinking guide picture;
step 1205, the web page client sends a query request containing a target node to the web page server;
step 1206, the webpage server obtains child node data of the target node by using a depth-first search algorithm;
step 1207, the webpage server feeds back the query response carrying the child node data to the webpage client;
and step 1208, the webpage client skips by using the child node data.
It can be understood that the process of generating the mind map by the web server may specifically refer to the foregoing embodiments, and details are not described herein.
In the embodiment of the invention, a user can select the nodes in the mind map, the webpage client responds to the selection operation of the nodes in the mind map and generates a query request containing a target node to the webpage server, the webpage server determines the child node data of the target node according to the embodiment and feeds the child node data back to the webpage client, and the webpage client receives the fed query response containing the child node data and skips according to the child node data.
In the embodiment of the invention, through the interaction between the webpage client and the webpage server, the acquisition of the thinking guide picture, the jump of the webpage and the like can be effectively realized, the display mode of the webpage content is flexible, and the user can conveniently acquire information.
Please refer to fig. 13, which is a schematic structural diagram of an apparatus for obtaining a mind map according to an embodiment of the present invention, the apparatus belongs to a web server, and the apparatus includes:
a first receiving module 1301, configured to receive an obtaining request of a mind map sent by a web client, where the obtaining request includes a Uniform Resource Locator (URL) address of a web page displayed by the web client;
a generating module 1302, configured to generate a mind map of the web page content of the web page according to the URL address;
and the first feedback module 1303 is configured to feed back the obtained response carrying the mind map to the web page client.
It can be understood that the contents of each module in the embodiment shown in fig. 13 are similar to the contents of each step in the embodiment shown in fig. 1, and reference may be specifically made to the embodiment shown in fig. 1, which is not described herein again.
Further, the generating module 1302 includes:
a tree generating module 1304, configured to generate a red-black tree of the webpage according to the URL address;
a map generation module 1305, configured to generate a thinking map of the web page content of the web page by using the red and black trees;
the tree generating module 1304 is specifically configured to:
acquiring webpage content of the webpage by using the URL address, and extracting a content style with a hierarchical relationship from the webpage content;
based on a preset red and black tree generation rule, the content style is utilized to generate the red and black tree of the webpage, and the node content of the node of the red and black tree is the content of the corresponding content style;
the map generation module 1305 is specifically configured to:
traversing nodes in the red and black tree, acquiring node contents of the traversed nodes, and mapping the node contents into nodes in a thought graph;
and if the traversed node is a leaf node, acquiring the sub-content of the leaf node in the webpage content, extracting key information of the sub-content, and taking the extracted key information as the sub-node of the corresponding node of the leaf node in the thinking graph.
In the embodiment of the present invention, the specific contents of the tree generating module 1304 and the guide map generating module 1305 are similar to the contents of the steps described in the embodiment shown in fig. 2, and may specifically refer to the embodiment shown in fig. 2, which is not described herein again.
In the embodiment of the invention, an acquisition request of the mind map sent by the webpage client is received, the acquisition request comprises the URL address of the webpage displayed by the webpage client, the mind map of the webpage content of the webpage is generated according to the URL address, and the acquisition response carrying the mind map is fed back to the webpage client, so that the webpage client can display the mind map. Compared with the prior art, the method for generating the mind map of the webpage can display the outline of the content in the webpage by using the mind map, the display mode of the webpage content is more flexible, and the user can know the content in the webpage by looking up the mind map, so that the user can be effectively helped to realize the quick browsing of the webpage content.
Please refer to fig. 14, which is a schematic structural diagram of an apparatus for obtaining a mind map according to an embodiment of the present invention, the apparatus belongs to a web server, and the apparatus includes a first receiving module 1301, a generating module 1302, and a feedback module 1303 in the embodiment shown in fig. 13, where the generating module 1302 includes a tree generating module 1304 and a map generating module 1305, and the contents are similar to those described in the embodiment shown in fig. 13, and are not repeated here.
In an embodiment of the present invention, the apparatus further comprises:
a second receiving module 1401, configured to receive a query request sent by the web client, where the query request includes a target node to be queried in the thought graph;
a searching module 1402, configured to search the mind map by using a preset depth-first search algorithm, and obtain child node data of the target node;
a second feedback module 1403, configured to feed back the query response carrying the child node data to the web page client.
In the embodiment of the invention, an acquisition request of a thinking graph sent by a webpage client is received, webpage content of a webpage is acquired by using a URL address in the acquisition request, a content style with a hierarchical relationship is extracted from the webpage content, a red-black tree of the webpage is generated by using the content style based on a preset red-black tree generation rule, the node content of the node of the red-black tree is the content of the corresponding content style, the node in the red-black tree is traversed, the node content of the traversed node is acquired, the node content is mapped into the node in the thinking graph, if the traversed node is a leaf node, the sub-content of the leaf node in the webpage content is acquired, key information extraction is carried out on the sub-content, and the extracted key information is used as the sub-node of the corresponding node of the leaf node in the thinking graph. Compared with the prior art, the method has the advantages that the main content in the webpage content can be effectively extracted by generating the thinking guide graph from the webpage content of the webpage, the display mode of the webpage content is more flexible, and the node content in the thinking guide graph can be conveniently and quickly searched by firstly obtaining the red and black trees of the content style and utilizing the red and black trees to generate the thinking guide graph.
Please refer to fig. 15, which is a schematic structural diagram of an apparatus for obtaining a mind map according to an embodiment of the present invention, the apparatus belongs to a web client, and the apparatus includes:
a first sending module 1501, configured to send an obtaining request of a mind map to a web server, where the obtaining request includes a uniform resource locator URL address of a web page displayed by the web client;
a first response receiving module 1502, configured to receive an obtaining response with a mind map fed back by the web server, where the mind map is a mind map of web page content of the web page generated by the web server according to the URL address;
a display module 1503, configured to display the mind map.
In an embodiment of the present invention, the apparatus further comprises:
a response module 1504, configured to generate and send a query request containing a selected target node to the web server in response to a selection operation of a node in the thought graph;
a second response receiving module 1505, configured to receive a query response fed back by the web server, where the query response includes child node data of the target node;
and the skipping module 1506 is used for skipping according to the child node data.
In the embodiment of the invention, through the interaction between the webpage client and the webpage server, the acquisition of the thinking guide picture, the jump of the webpage and the like can be effectively realized, the display mode of the webpage content is flexible, and the user can conveniently acquire information.
An embodiment of the present invention further provides an apparatus, which includes a memory, a processor, and a computer program stored in the memory and running on the processor, and when the processor executes the computer program, the processor implements each step in the method for acquiring the mind map in the embodiment shown in fig. 1, fig. 2, or fig. 7.
Embodiments of the present invention further provide a readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the method for acquiring the mind map in the embodiments shown in fig. 1, fig. 2 or fig. 7.
It can be understood that, in the embodiment of the present invention, the apparatus for obtaining a mind map is a device, and the device may be a web client or a web server, where if the apparatus is a web server, the method in the embodiment shown in fig. 1, fig. 2, or fig. 7 may be implemented, and if the apparatus is a web client, the method in the embodiment shown in fig. 1, fig. 2, or fig. 7 may be implemented by interacting with the web server, and in order to better understand the technical solution in the embodiment of the present invention, please refer to fig. 16, which is a schematic structural diagram of the device 160 in the embodiment of the present invention. The device 160 includes a processor 1601, a memory 1602, and a transceiver 1603, the memory 1602 may include a read-only memory and a random access memory and provide operational instructions and data to the processor 1601. A portion of the memory 1602 may also include non-volatile random access memory (NVRAM).
In some embodiments, the memory 1602 stores the following elements: an executable module or a data structure, or a subset thereof, or an expanded set thereof.
Where processor 1601 controls the operation of device 160, processor 1601 may also be referred to as a Central Processing Unit (CPU). Memory 1602 may include both read-only memory and random access memory, and provides instructions and data to processor 1601. A portion of the memory 1602 may also include non-volatile random access memory (NVRAM). The various components of the device 160 in a particular application are coupled together by a bus system 1604, wherein the bus system 1604 may include a power bus, a control bus, a status signal bus, and the like, in addition to a data bus. For clarity of illustration, however, the various buses are designated in the figure as the bus system 1604.
The method disclosed by the above-mentioned embodiments of the present invention may be applied to the processor 1601 or implemented by the processor 1601. The processor 1601 may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the method may be performed by hardware integrated logic circuits or instructions in software form in the processor 1601. The processor 910 may be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 1602, and the processor 1601 reads information in the memory 1602, and performs the steps of the method in combination with hardware thereof.
The above device 160 can be understood by referring to the description of the embodiment shown in fig. 1, fig. 2 or fig. 7, and will not be described in detail herein.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and in actual implementation, there may be other divisions, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present invention is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no acts or modules are necessarily required of the invention.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In view of the above description of the method, apparatus, device and readable storage medium for obtaining a mind map provided by the present invention, those skilled in the art will recognize that the concepts of the embodiments of the present invention can be modified in the specific implementation manners and application ranges.

Claims (12)

1. A method for obtaining a mind map, the method comprising:
receiving an acquisition request of a mind map sent by a webpage client, wherein the acquisition request comprises a Uniform Resource Locator (URL) address of a webpage displayed by the webpage client, and the uniform resource of the webpage is webpage content with a hierarchical content style;
generating a thinking graph of the webpage content of the webpage according to the URL address, specifically comprising the steps of obtaining the webpage content of the webpage according to the URL address and extracting a content style with a hierarchical relationship from the webpage content; based on a preset red and black tree generation rule, generating a red and black tree of the webpage by using the content style, generating a thinking guide graph of the webpage content of the webpage by using the red and black tree, wherein the red and black tree is provided with nodes corresponding to the webpage content, the node content of the nodes of the red and black tree is the content of the corresponding content style, the thinking guide graph embodies the relationship of the themes of each level by using mutual membership and related hierarchical graphs according to pictures and texts, and the memory link is established between the theme keywords and the images and colors;
and feeding back the acquired response carrying the thinking map to the webpage client.
2. The method of claim 1, wherein the generating the mind map of the web page content of the web page using the red and black trees comprises:
traversing nodes in the red and black tree, acquiring node contents of the traversed nodes, and mapping the node contents into nodes in a thought graph;
and if the traversed node is a leaf node, acquiring the sub-content of the leaf node in the webpage content, extracting key information of the sub-content, and taking the extracted key information as the sub-node of the corresponding node of the leaf node in the thinking graph.
3. The method as claimed in any one of claims 1 to 2, wherein the feeding back the obtained response carrying the mind map to the web client further comprises:
receiving a query request sent by the webpage client, wherein the query request comprises a target node to be queried in the thinking graph;
searching the thought-guiding graph by using a preset depth-first search algorithm to obtain child node data of the target node;
and feeding back the query response carrying the child node data to the webpage client.
4. A method for obtaining a mind map, the method comprising:
the method comprises the steps that a webpage client sends an acquisition request of a thinking guide picture to a webpage server, wherein the acquisition request comprises a Uniform Resource Locator (URL) address of a webpage displayed by the webpage client, and the uniform resource of the webpage is webpage content with a hierarchical content style;
receiving an acquisition response carrying a mind map fed back by the webpage server, wherein the mind map is a content style with a hierarchical relationship extracted from the webpage content, and the webpage server acquires the webpage content of the webpage according to the URL address; based on a preset red and black tree generation rule, the content style is utilized to generate the red and black tree of the webpage, the node content of the node of the red and black tree is the content of the corresponding content style, the red and black tree is utilized to generate a thinking guide graph of the webpage content of the webpage, the thinking guide graph reflects the relationship of various levels of themes by using mutual membership and related hierarchical graphs according to pictures and texts, and the thinking guide graph establishes a memory link between the theme keywords and the images and colors;
and displaying the mind map.
5. The method of claim 4, wherein after displaying the mind map, further comprising:
responding to the selection operation of the nodes in the thinking graph, and generating and sending a query request containing the selected target nodes to the webpage server;
receiving a query response fed back by the webpage server, wherein the query response comprises child node data of the target node;
and skipping according to the child node data.
6. An apparatus for obtaining a mind map, the apparatus comprising:
the system comprises a first receiving module, a second receiving module and a third receiving module, wherein the first receiving module is used for receiving an acquisition request of a mind map sent by a webpage client, the acquisition request comprises a Uniform Resource Locator (URL) address of a webpage displayed by the webpage client, and the uniform resource of the webpage is webpage content with a hierarchical content style;
the generation module is used for generating a thinking map of the webpage content of the webpage according to the URL address, and specifically comprises a tree generation module used for acquiring the webpage content of the webpage according to the URL address and extracting a content style with a hierarchical relationship from the webpage content; generating the red-black tree of the webpage by utilizing the content style to generate the red-black tree of the webpage based on a preset red-black tree generation rule; the map guide generation module is used for generating a thinking map of the webpage content of the webpage by using the red and black tree, the red and black tree is provided with nodes corresponding to the webpage content, the node content of the nodes of the red and black tree is the content of a corresponding content style, and the thinking map is a memory link established by embodying the relationship of each level of themes by using mutual membership and related hierarchical maps according to pictures and texts and establishing theme keywords, images and colors;
and the first feedback module is used for feeding back the acquired response carrying the thinking map to the webpage client.
7. The apparatus of claim 6, wherein the map generation module is specifically configured to:
traversing nodes in the red and black tree, acquiring node contents of the traversed nodes, and mapping the node contents into nodes in a thought graph;
and if the traversed node is a leaf node, acquiring the sub-content of the leaf node in the webpage content, extracting key information of the sub-content, and taking the extracted key information as the sub-node of the corresponding node of the leaf node in the thinking graph.
8. The apparatus of claim 6 or 7, further comprising:
the second receiving module is used for receiving a query request sent by the webpage client, wherein the query request comprises a target node to be queried in the thinking graph;
the searching module is used for searching the mind map by using a preset depth-first searching algorithm to obtain child node data of the target node;
and the second feedback module is used for feeding back the query response carrying the child node data to the webpage client.
9. An apparatus for obtaining a mind map, the apparatus comprising:
the system comprises a first sending module, a second sending module and a third sending module, wherein the first sending module is used for sending an acquisition request of a thinking map to a webpage server, the acquisition request comprises a Uniform Resource Locator (URL) address of a webpage displayed by a webpage client, and the uniform resource of the webpage is webpage content with a hierarchical content style;
the first response receiving module is used for receiving an acquisition response which is fed back by the webpage server and carries a mind map, wherein the mind map is a webpage content of the webpage acquired by the webpage server according to the URL address and a content style with a hierarchical relationship is extracted from the webpage content; based on a preset red and black tree generation rule, the content style is utilized to generate the red and black tree of the webpage, the node content of the node of the red and black tree is the content of the corresponding content style, the red and black tree is utilized to generate a thinking guide graph of the webpage content of the webpage, the thinking guide graph reflects the relationship of various levels of themes by using mutual membership and related hierarchical graphs according to pictures and texts, and the thinking guide graph establishes a memory link between the theme keywords and the images and colors;
and the display module is used for displaying the thinking guide picture.
10. The apparatus of claim 9, further comprising:
the response module is used for responding to the selection operation of the nodes in the thinking map, generating and sending a query request containing the selected target nodes to the webpage server;
a second response receiving module, configured to receive a query response fed back by the web server, where the query response includes child node data of the target node;
and the skipping module is used for skipping according to the child node data.
11. An apparatus comprising a memory, a processor and a computer program stored on the memory and running on the processor, characterized in that the processor implements the computer program to implement the steps of the method for obtaining the mind map according to any one of claims 1 to 3 or to implement the steps of the method for obtaining the mind map according to claim 4 or 5.
12. A readable storage medium on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of acquiring a mind map according to any one of claims 1 to 3, or carries out the steps of the method of acquiring a mind map according to claim 4 or 5.
CN201810227794.3A 2018-03-20 2018-03-20 Method and device for acquiring mind map, equipment and readable storage medium Active CN108509544B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810227794.3A CN108509544B (en) 2018-03-20 2018-03-20 Method and device for acquiring mind map, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810227794.3A CN108509544B (en) 2018-03-20 2018-03-20 Method and device for acquiring mind map, equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN108509544A CN108509544A (en) 2018-09-07
CN108509544B true CN108509544B (en) 2021-05-18

Family

ID=63376737

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810227794.3A Active CN108509544B (en) 2018-03-20 2018-03-20 Method and device for acquiring mind map, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN108509544B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110110305A (en) * 2019-04-02 2019-08-09 北京大麦地信息技术有限公司 A kind of online method and device for drawing mind map
CN111859868A (en) * 2019-12-20 2020-10-30 北京嘀嘀无限科技发展有限公司 Operation authority control method and device, electronic equipment and storage medium
CN111274777B (en) * 2020-01-21 2024-04-02 维沃移动通信有限公司 Thinking guide display method and electronic equipment
CN112181346B (en) * 2020-10-23 2022-04-12 网易(杭州)网络有限公司 Method, device, server, client and medium for processing thinking guide graph
CN117035067B (en) * 2023-10-07 2024-01-23 腾讯科技(深圳)有限公司 Thinking guide drawing rendering method and device and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101944094A (en) * 2009-07-06 2011-01-12 富士通株式会社 Webpage information extraction method and device thereof
CN104111918A (en) * 2013-04-16 2014-10-22 腾讯科技(北京)有限公司 Barrier-free processing method and barrier-free web page device for web page content
CN106503026A (en) * 2015-09-08 2017-03-15 华为技术有限公司 A kind of method and apparatus of video data
CN107037997A (en) * 2015-10-30 2017-08-11 海德堡印刷机械股份公司 Method for generating the user interface in mind map form

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5206631B2 (en) * 2009-08-27 2013-06-12 富士通株式会社 NAVIGATION SYSTEM, SERVER DEVICE, COMMUNICATION DEVICE, NAVIGATION INFORMATION GENERATION METHOD, AND COMPUTER PROGRAM

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101944094A (en) * 2009-07-06 2011-01-12 富士通株式会社 Webpage information extraction method and device thereof
CN104111918A (en) * 2013-04-16 2014-10-22 腾讯科技(北京)有限公司 Barrier-free processing method and barrier-free web page device for web page content
CN106503026A (en) * 2015-09-08 2017-03-15 华为技术有限公司 A kind of method and apparatus of video data
CN107037997A (en) * 2015-10-30 2017-08-11 海德堡印刷机械股份公司 Method for generating the user interface in mind map form

Also Published As

Publication number Publication date
CN108509544A (en) 2018-09-07

Similar Documents

Publication Publication Date Title
CN108509544B (en) Method and device for acquiring mind map, equipment and readable storage medium
Russell Mining the social web: data mining Facebook, Twitter, LinkedIn, Google+, GitHub, and more
US20150347420A1 (en) Performing Application Searches
JP6611458B2 (en) Apparatus and method for web page access
US20130268554A1 (en) Structured document management apparatus and structured document search method
US20150052020A1 (en) Systems for generating a global product taxonomy
RU2609079C2 (en) Search offer method and processing server
US11061651B2 (en) Systems and methods for organizing, classifying, and discovering automatically generated computer software
CN109657121A (en) A kind of Web page information acquisition method and device based on web crawlers
CN103984740A (en) Combination label based search page display method and system
US20120110448A1 (en) Seamlessly Share And Reuse Administration-Console User-Interaction Knowledge
CN110546633A (en) Named entity based category tag addition for documents
CN112219200A (en) Facet-based query improvement based on multiple query interpretations
JP2008176782A (en) Method and system for providing information extracted by reflecting concern
CN109522473B (en) Method for recommending associated information, terminal and server thereof
CN112559913B (en) Data processing method, device, computing equipment and readable storage medium
CN112905847A (en) Tree structure construction method and device
US11163830B2 (en) Augmenting the display of data in a tree format
US11354358B1 (en) Organization and retrieval of conditioned data
US20170193119A1 (en) Add-On Module Search System
JP2011100208A (en) Action estimation device, action estimation method, and action estimation program
JP2002007461A (en) Server/method for collecting information for individual and recording medium
JP6339736B2 (en) Manga search method and apparatus
CN110908647B (en) Building block type programmed object variable presenting method, device, terminal and storage medium
CN113987106A (en) Electronic book bookmark adding method, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant