[go: up one dir, main page]

CN114969579B - Breadcrumb navigation generation method, device and computer readable storage medium - Google Patents

Breadcrumb navigation generation method, device and computer readable storage medium Download PDF

Info

Publication number
CN114969579B
CN114969579B CN202210405491.2A CN202210405491A CN114969579B CN 114969579 B CN114969579 B CN 114969579B CN 202210405491 A CN202210405491 A CN 202210405491A CN 114969579 B CN114969579 B CN 114969579B
Authority
CN
China
Prior art keywords
page
information
navigation
current page
routing
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
CN202210405491.2A
Other languages
Chinese (zh)
Other versions
CN114969579A (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.)
Wuhan Shinall Technology Co ltd
Original Assignee
Wuhan Shinall Technology 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 Wuhan Shinall Technology Co ltd filed Critical Wuhan Shinall Technology Co ltd
Priority to CN202210405491.2A priority Critical patent/CN114969579B/en
Publication of CN114969579A publication Critical patent/CN114969579A/en
Application granted granted Critical
Publication of CN114969579B publication Critical patent/CN114969579B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/954Navigation, e.g. using categorised browsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Navigation (AREA)

Abstract

The application discloses a breadcrumb navigation generation method and device and a computer readable storage medium, and belongs to the technical field of computers. According to the scheme, breadcrumb navigation can be automatically generated, and the defect of manual arrangement is overcome. In addition, in the scheme, the page level of the corresponding page is indicated to be consistent with the route level through the indication tag, and if the current page does not have the indication tag, the page level of the current page is indicated to be possibly inconsistent with the route level, breadcrumb navigation of the current page is generated based on the historical navigation information. That is, since the routing hierarchy between pages is strict, but the routing hierarchy is not strict, the routing hierarchy may not be completely identical to the page hierarchy, and thus the present solution is not limited to generating breadcrumb navigation strictly according to the routing hierarchy of pages, and the generated breadcrumb navigation can more accurately represent the page hierarchy.

Description

Breadcrumb navigation generation method and device and computer readable storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a breadcrumb navigation generating method and apparatus, and a computer readable storage medium.
Background
At present, for some websites with complex structures, breadcrumb navigation can be generated for each page in the website, and a visitor can more clearly know the position of the page in the website by using the breadcrumb navigation, so that the visitor can quickly jump among pages at different levels.
For example, the name of the current page browsed by the visitor is 'activity details', and the breadcrumbs of the current page are navigated to 'first page > activity management > activity list > activity details', so that the breadcrumbs navigation represents the hierarchical relationship of four pages in the website and also represents the position of the current page in the website. In addition, the visitor can jump to the corresponding page by clicking the name of any level page in the breadcrumb navigation, for example, the visitor can return to the home page of the website by clicking the 'home page'.
In the related art, a technician is required to manually arrange configuration data of breadcrumb navigation of each page, and breadcrumb navigation of each page is generated based on the configuration data. However, the manual arrangement has the disadvantages of large workload, low efficiency, easy error and inconvenient later maintenance.
Disclosure of Invention
The application provides a generation method, a device and a computer readable storage medium for breadcrumb navigation, which can automatically generate the breadcrumb navigation, reduce the workload, improve the efficiency, are not easy to make mistakes, are convenient for later maintenance, and can more accurately reflect the page hierarchical relationship. The technical scheme is as follows:
in one aspect, a method for generating breadcrumb navigation is provided, the method comprising:
Determining target routing information, wherein the target routing information is the routing information of the current page;
If the target routing information does not have an indication tag, acquiring historical navigation information, wherein the indication tag is used for indicating that the page level of the corresponding page is consistent with the routing level, and the historical navigation information is used for indicating breadcrumb navigation of the last page visited before the current page;
And generating breadcrumb navigation of the current page based on the historical navigation information and the target routing information.
Optionally, the historical navigation information includes routing information of one or more pages, and the routing information of the one or more pages is arranged in order from high to low according to page level;
the generating breadcrumb navigation of the current page based on the historical navigation information and the target routing information comprises the following steps:
And if the historical navigation information comprises the target routing information, generating breadcrumb navigation of the current page based on the routing information from the first page to the current page in the historical navigation information.
Optionally, the method further comprises:
And updating the historical navigation information into the route information from the first page to the current page in the historical navigation information.
Optionally, the historical navigation information includes routing information of one or more pages, and the routing information of the one or more pages is arranged in order from high to low according to page level;
the generating breadcrumb navigation of the current page based on the historical navigation information and the target routing information comprises the following steps:
If the historical navigation information does not include the target routing information, splicing the target routing information to the last page of the historical navigation information so as to obtain the navigation information of the current page;
and generating breadcrumb navigation of the current page based on the navigation information of the current page.
Optionally, the method further comprises:
and updating the historical navigation information into the navigation information of the current page.
Optionally, after determining the target routing information, the method further includes:
If the target routing information has the indication label, acquiring routing information from a root node in a routing tree to all nodes of the target node, wherein the routing tree is used for describing the routing hierarchical relationship of each page in a website to which the current page belongs, the target node is a node corresponding to the current page, and the root node is a node corresponding to the root page of the website;
And generating breadcrumb navigation of the current page based on the acquired routing information of all the nodes.
Optionally, the obtaining the routing information from the root node to all nodes of the target node in the routing tree includes:
And starting from the root node of the routing tree, searching the routing information of each node step by step downwards in a recursion mode until the target routing information is searched, and obtaining the routing information of all nodes from the root node to the target node.
Optionally, after obtaining the route information from the root node to all nodes of the target node in the route tree, the method further includes:
And storing the routing information of all nodes from the root node to the target node as historical navigation information.
In another aspect, there is provided a breadcrumb navigation generating device, the device comprising:
The determining module is used for determining target routing information, wherein the target routing information is the routing information of the current page;
The first acquisition module is used for acquiring historical navigation information if the target routing information does not have an indication tag, wherein the indication tag is used for indicating that the page level of the corresponding page is consistent with the routing level, and the historical navigation information is used for indicating breadcrumb navigation of the last page accessed before the current page;
And the generation module is used for generating breadcrumb navigation of the current page based on the historical navigation information and the target route information.
Optionally, the historical navigation information includes routing information of one or more pages, and the routing information of the one or more pages is arranged in order from high to low according to page level;
the generation module comprises:
And the first generation sub-module is used for generating breadcrumb navigation of the current page based on the route information from the first page to the current page in the history navigation information if the history navigation information comprises the target route information.
Optionally, the apparatus further comprises:
and the first updating module is used for updating the historical navigation information into the route information from the first page to the current page in the historical navigation information.
Optionally, the historical navigation information includes routing information of one or more pages, and the routing information of the one or more pages is arranged in order from high to low according to page level;
the generation module comprises:
The splicing sub-module is used for splicing the target routing information to the routing information of the last page in the historical navigation information to obtain the navigation information of the current page if the historical navigation information does not comprise the target routing information;
and the second generation sub-module is used for generating breadcrumb navigation of the current page based on the navigation information of the current page.
Optionally, the apparatus further comprises:
and the second updating module is used for updating the historical navigation information into the navigation information of the current page.
Optionally, the apparatus further comprises:
the second obtaining module is configured to obtain, if the target routing information has the indication tag, routing information from a root node to all nodes from a target node in a routing tree, where the routing tree is used to describe a routing hierarchy relationship of each page in a website to which the current page belongs, the target node is a node corresponding to the current page, and the root node is a node corresponding to a root page of the website;
and the second generation module is used for generating breadcrumb navigation of the current page based on the acquired routing information of all the nodes.
Optionally, the second obtaining module includes:
and the acquisition sub-module is used for searching the route information of each node step by step from the root node of the route tree in a recursion mode until the target route information is searched, so as to obtain the route information of all nodes from the root node to the target node.
Optionally, the apparatus further comprises:
and the storage module is used for storing the route information from the root node to all the nodes of the target node as history navigation information.
In another aspect, an electronic device is provided, where the electronic device includes a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus, the memory is used to store a computer program, and the processor is used to execute the program stored on the memory, so as to implement the steps of the breadcrumb navigation generating method described above. The electronic device further includes a display screen for displaying the generated breadcrumb navigation.
In another aspect, a computer readable storage medium is provided, in which a computer program is stored, which when executed by a processor, implements the steps of the breadcrumb navigation generation method described above.
In another aspect, there is provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the steps of the breadcrumb navigation generation method described above.
The technical scheme provided by the embodiment of the application at least has the following beneficial effects:
According to the scheme, breadcrumb navigation can be automatically generated, the defect of manual arrangement is reduced, namely, the workload is reduced, the efficiency is improved, errors are not easy to occur, and the later maintenance is convenient. In addition, in the scheme, the page level of the corresponding page is indicated to be consistent with the route level through the indication tag, and if the current page does not have the indication tag, the page level of the current page is indicated to be possibly inconsistent with the route level, breadcrumb navigation of the current page is generated based on the historical navigation information. That is, since the routing hierarchy between pages is strict, but the routing hierarchy is not strict, the routing hierarchy may not be completely identical to the page hierarchy, and thus the present solution is not limited to generating breadcrumb navigation strictly according to the routing hierarchy of pages, and the generated breadcrumb navigation can more accurately represent the page hierarchy.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a breadcrumb navigation generation method provided by an embodiment of the application;
fig. 2 is a schematic structural diagram of a breadcrumb navigation generating device according to an embodiment of the application;
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the following detailed description of the embodiments of the present application will be given with reference to the accompanying drawings.
In one related art for generating breadcrumb navigation, a technician is required to manually arrange configuration data of breadcrumb navigation of each page, and generate breadcrumb navigation of each page based on the configuration data. In another related art for generating breadcrumb navigation, breadcrumb navigation is automatically generated in strict accordance with the routing hierarchy of the individual pages in the web site.
However, the routing hierarchy of each page in the website is embodied by the source code of the website written by the technician, and the routing hierarchy of each page is strict, i.e., any child node in the routing tree can only have one parent node. The routing tree is used for describing the routing hierarchical relationship of each page in the website. Illustratively, a routing tree includes two paths of 'File management > File List > preview' and 'File management > File List > edit'. Then, if breadcrumb navigation is generated strictly in terms of route hierarchy, the 'preview' and 'edit' can only be used as third level navigation in breadcrumb navigation.
The technician may also desire to generate breadcrumb navigation such as 'File management > File List > edit > preview', 'File management > File List > preview > edit', which is not achievable in accordance with the routing hierarchy relationship in the related art. It can be seen that the page directory tree constructed in the related art is completely consistent with the routing tree, that is, the page hierarchical relationship and the routing hierarchical relationship of each page are completely consistent. While the page directory tree that the technician expects to build is not entirely consistent with the routing tree. The page directory tree is used for describing page hierarchical relations of all pages in the website.
In other words, the page hierarchy of each page is not critical in actual demand, and any child node in the page directory tree may have one or more parent nodes. For example, the page directory tree includes several paths of 'File management > File List > preview', 'File management > File List > edit > preview', 'File management > File List > preview > edit'. It can be seen that both 'preview' and 'edit' have two parent nodes, which can be used as both third level navigation and fourth level navigation in breadcrumb navigation. According to the breadcrumb navigation generated by the breadcrumb navigation generation method provided by the embodiment of the application, the page hierarchical relationship can be described more accurately, and the actual requirements are met.
It should be noted that, the system architecture and the service scenario described in the embodiments of the present application are for more clearly describing the technical solution of the embodiments of the present application, and do not constitute a limitation on the technical solution provided by the embodiments of the present application, and those skilled in the art can know that, with the evolution of the system architecture and the appearance of the new service scenario, the technical solution provided by the embodiments of the present application is equally applicable to similar technical problems.
The method for generating breadcrumb navigation provided by the embodiment of the application is explained in detail. Fig. 1 is a flowchart of a breadcrumb navigation generation method according to an embodiment of the application. The method is applied to the electronic equipment for example. Referring to fig. 1, the method includes the following steps.
Step 101: and determining target routing information, wherein the target routing information is the routing information of the current page.
In the embodiment of the application, after receiving a page load instruction, the electronic device determines target routing information, namely, the routing information of the current page, namely, the page requested to be loaded by the page load instruction, based on the page load instruction. The page loading instruction can be generated by clicking a page name in breadcrumb navigation by a user, inputting a website by the user, searching keywords and the like.
Optionally, the electronic device obtains the target routing information from the source code of the current page. The electronic device may, for example, look up a code segment with a reference character, such as a 'path' character, from the source code of the current page to obtain the target routing information, i.e. the code segment includes the target routing information defined by the technician. The electronic device may also determine the target routing information in other manners, which are not limited by the embodiment of the present application.
It should be noted that, the route information of the page represents the path mapping relationship of the page, and the electronic device may obtain the resources required for generating the page based on the route information of the page, so as to generate the page. In the embodiment of the application, the route information of the pages is used for generating the breadcrumb navigation, and the generated breadcrumb navigation comprises page jump addresses of all the pages, namely, a visitor can jump to the corresponding page according to the page jump addresses by clicking the page name of any one page in the breadcrumb navigation.
In an embodiment of the present application, the target routing information includes a page name and a uniform resource locator (uniform resource locator, URL) of the current page. The page name of the current page is used for being displayed in a breadcrumb navigation column, the URL of the current page is used for generating a link of the current page, the link of the current page is used for being displayed in a link column of a browser and is used as an affiliated attribute of the page name of the current page in breadcrumb navigation, so that the electronic equipment can conveniently carry out page jump when detecting clicking operation of the page name in breadcrumb navigation, namely refreshing the current page.
Optionally, the target routing information further includes one or more of a routing name, a routing parameter, a path parameter, and a redirect address of the current page. Wherein, in case the target routing information does not include a redirect address, the routing parameter and the path parameter of the current page are used to splice to the rear of the URL of the current page to obtain the link of the current page. In case the target routing information comprises a redirect address, the redirect address is a link to the current page. The electronic device is used for generating a corresponding page according to the links of the current page.
In other words, if the routing information of a page includes both the URL of the page and the redirection address of the page, then the link of the page is actually the redirection address, and after each time the electronic device receives the page loading instruction about the page, the electronic device displays the page corresponding to the redirection address, and the current page is essentially the page corresponding to the redirection address. For example, when the electronic device receives a page load instruction about the page for the first time, the generated page is the page corresponding to the redirection address. And the electronic equipment also jumps to the page corresponding to the redirection address under the condition of detecting the clicking operation of the page name of the page in the breadcrumbs navigation.
Briefly, if the routing information for a page includes a URL, and does not include a redirect address, the electronic device generates the page based on the URL, and the page-hop address is based on the URL. If the routing information of a page includes both the URL of the page and the redirection address of the page, the electronic device displays the page based on the redirection address, and the page jump address is based on the redirection address.
Optionally, the target routing information further includes a return parameter, and the return parameter includes display indication information of a return button. The display indication information is used for indicating whether a return button is displayed in breadcrumbs navigation of the current page. Wherein the back button may be displayed on the right side of the breadcrumb navigation bar and the page name of each page in the breadcrumb navigation may be displayed on the left side of the breadcrumb navigation bar.
Optionally, in a case where the display indication information indicates that the return button is displayed in the breadcrumb navigation of the current page, the return parameter further includes a return address for jumping to a page corresponding to the return address in a case where a click operation of the return button in the breadcrumb navigation of the current page is detected. When the display instruction information indicates that the return button is displayed in the breadcrumb navigation of the current page and the return parameter does not include the return address, if a click operation of the return button in the breadcrumb navigation of the current page is detected, the previous page accessed before the current page is returned.
Illustratively, the routing information for the current page includes label, URL, params, queryParams, redirect and data, which includes breadcrumb, showBack and backPath. Wherein label, URL, params, queryParams, redirect and data represent the route name, uniform resource locator, path parameter, route parameter, redirection address and custom parameter of the current page, respectively. breadcrumb, showBack and backPath represent the page name of the current page, display indication information of the return button, and return address, respectively. Wherein the values params, queryParams, redirect, showBack and backPath may be null.
In the embodiment of the application, the routing information of one page may have an indication tag in addition to the content described above, where the indication tag is used to indicate that the page level of the corresponding page is consistent with the routing level. It should be noted that, in this solution, the relationship between the page level and the route level of the page is divided into two cases, in one case, the page level and the route level of one page are completely consistent, and in the other case, the page level and the route level of one page may not be consistent, so in this solution, the two cases are distinguished by using the indication tag, so that the generated breadcrumb navigation can more accurately reflect the relationship between the page levels.
Optionally, the fact that the routing information of one page has an indication tag means that the routing information of the page includes the indication tag. For example, the routing information for a page includes custom parameters, including an indication tag. Or that the routing information of one page has an indication tag means that the routing information of the page corresponds to the indication tag. For example, the source code of a page includes routing information and an indication tag for the page. Wherein, the indication label can be' node: true ',' root: true 'or' node:1', etc.
Step 102: if the target route information does not have an indication tag, historical navigation information is obtained, wherein the indication tag is used for indicating that the page level of the corresponding page is consistent with the route level, and the historical navigation information is used for indicating breadcrumb navigation of the last page visited before the current page.
In the embodiment of the application, if the target routing information does not have an indication label, which indicates that the page level of the current page is possibly inconsistent with the routing level, the electronic device acquires the historical navigation information so as to generate breadcrumb navigation of the current page based on the historical navigation information. The history navigation information is used for indicating breadcrumb navigation of the last page visited before the current page.
Optionally, the historical navigation information is stored in an electronic device, and the electronic device obtains the historical navigation information from the local storage space. Or the historical navigation information is stored in a server of a website to which the current page belongs, and the electronic equipment acquires the historical navigation information from the server.
In the embodiment of the application, the historical navigation information comprises routing information of one or more pages, and the routing information of the one or more pages is arranged in the order from high to low according to the page level. Illustratively, the breadcrumbs of the last page visited before the current page are navigated to 'home > campaign management > campaign list', and then the history navigation information includes routing information of three pages, which are sequentially arranged in an order consistent with 'home, campaign management, campaign list'.
In other embodiments, the routing information for one or more pages in the historical navigation information is arranged in a page level order from low to high. The routing information of the three pages is illustratively arranged in order consistent with 'activity list, activity management, top page'.
In still other embodiments, the routing information of each page in the historical navigation information corresponds to a sequence number, the sequence number corresponding to the routing information of each page is consistent with the page level of the corresponding page, and the routing information of the one or more pages may not be arranged in the order from high to low of the page level, may not be arranged in the order from low to high of the page level, and may be arranged at will. For example, the ' home page ', ' activity management ', and ' activity list ' correspond to the sequence numbers '1', '2', and '3', respectively, and then the routing information of the three pages may be sequentially arranged in the order consistent with the ' home page ', the activity list, and the activity management ', may be sequentially arranged in the order consistent with the ' activity list, the home page, and the activity management ', or may be sequentially arranged in other orders.
Optionally, the electronic device stores the historical navigation information through the first array, and the routing information of each page in the historical navigation information is an element in the first array. Assuming that the routing information of the one or more pages is sequentially arranged in the order of the page hierarchy from high to low, taking the example that the breadcrumbs of the last page visited before the current page are navigated to be 'first page > active management > active list', the first element in the first array is the routing information of the page with the page name of 'first page', the second element is the routing information of the page with the page name of 'active management', and the third element is the routing information of the page with the page name of 'active list'.
Step 103: and generating breadcrumb navigation of the current page based on the historical navigation information and the target routing information.
In the embodiment of the application, under the condition that the route information of the current page does not have an indication label, the electronic equipment generates breadcrumb navigation of the current page based on the historical navigation information and the target route information.
In this scheme, the history navigation information acquired by the electronic device may or may not include the target route information. Based on the above, the electronic device can first determine whether the historical navigation information includes the target routing information, so as to facilitate the situation-based processing.
Next, first, description will be given of a process of implementing breadcrumb navigation generated by the electronic device in the case where the target route information is included in the history navigation information.
If the historical navigation information comprises the target route information, the electronic equipment determines the navigation information of the current page from the historical navigation information, and generates breadcrumb navigation of the current page based on the navigation information of the current page. In other words, the historical navigation information includes navigation information of the current page, and the electronic device generates breadcrumb navigation of the current page according to the navigation information of the current page in the historical navigation information.
As can be seen from the foregoing, the arrangement modes of the routing information in the history navigation information are various, and based on this, in the case that the history navigation information includes the target routing information, the implementation modes of generating breadcrumb navigation of the current page by the electronic device are also various, and three implementation modes will be described.
In a first implementation, the historical navigation information includes routing information for one or more pages, and the routing information for the one or more pages is arranged in a page level order from high to low. If the historical navigation information comprises the target route information, the electronic equipment generates breadcrumb navigation of the current page based on the route information from the first page to the current page in the historical navigation information. The route information from the first page to the current page in the historical navigation information is the navigation information of the current page determined by the electronic equipment from the historical navigation information.
In this implementation, the electronic device generates the respective page names in the breadcrumb navigation in the same order as the route information of the first page to the current page in the history navigation information, such that the respective page names in the generated breadcrumb navigation are arranged in order of page level from high to low.
The electronic device generates breadcrumb navigation of the current page in various ways based on the route information from the first page to the current page in the history navigation information. Three of these ways are described next.
Mode 1.1: the electronic equipment intercepts route information from a first page to a current page in the historical navigation information, and generates breadcrumb navigation of the current page based on the intercepted route information.
For example, assuming that the historical navigation information is stored in the first array, the electronic device cuts out the route information from the first page to the current page in the first array to obtain the second array. And the electronic equipment generates breadcrumb navigation of the current page based on the routing information of each page in the second array. The route information stored in the second group is the navigation information of the current page.
Mode 1.2: the electronic device deletes the route information arranged behind the route information of the current page in the history navigation information to update the history navigation information. And the electronic equipment generates breadcrumb navigation of the current page based on the updated historical navigation information. The updated historical navigation information is the navigation information of the current page.
Mode 1.3: the electronic equipment directly generates breadcrumb navigation of the current page according to the route information from the first page to the current page in the historical navigation information. It should be appreciated that in mode 1.3, the electronic device does not generate breadcrumb navigation for the current page by intercepting or deleting routing information.
Optionally, in order to facilitate the subsequent quick and accurate generation of breadcrumb navigation using the historical navigation information, the electronic device updates the historical navigation information once every time breadcrumb navigation is generated. Based on the above, the electronic device updates the historical navigation information to the route information from the first page to the current page in the historical navigation information under the condition that the historical navigation information is determined to include the target route information.
Illustratively, in the case of breadcrumb navigation of the current page being generated in the above manner 1.1, the electronic device updates the historical navigation information to the truncated routing information. For example, the electronic device assigns the value of the second array to the first array. In case of generating breadcrumb navigation of the current page in the above-described way 1.2, the electronic device has updated the historical navigation information in the process of generating breadcrumbs of the current page. In the case of generating breadcrumb navigation of the current page in the above-described manner 1.3, the electronic device deletes route information arranged after route information of the current page in the history navigation information to update the history navigation information. Or the electronic equipment can intercept the route information from the first page to the current page in the historical navigation information and update the historical navigation information into the intercepted route information.
Next, a second implementation of breadcrumb navigation of the current page is described, in which case the historical navigation information includes target routing information, based on the historical navigation information and the target routing information.
In a second implementation, the historical navigation information includes routing information for one or more pages, and the routing information for the one or more pages is arranged in a page level order from low to high. If the historical navigation information comprises the target route information, the electronic equipment generates breadcrumb navigation of the current page based on the route information from the current page to the last page in the historical navigation information. The route information from the current page to the last page in the historical navigation information is the navigation information of the current page determined by the electronic equipment from the historical navigation information.
In this implementation, the electronic device generates the respective page names in the breadcrumb navigation in an order opposite to the routing information of the current page to the last page in the historical navigation information, such that the respective page names in the generated breadcrumb navigation are arranged in the order of the page level from high to low.
The electronic device generates breadcrumb navigation of the current page based on the route information from the current page to the last page in the historical navigation information. Three of these ways are described next.
Mode 2.1: the electronic equipment intercepts route information from a current page to a last page in the historical navigation information, and generates breadcrumb navigation of the current page based on the intercepted route information.
For example, assuming that the historical navigation information is stored in the first array, the electronic device cuts out the routing information from the i-th page to the last page in the first array to obtain the second array. And the electronic equipment generates breadcrumb navigation of the current page based on the routing information of each page in the second array. The ith page is the current page, and the routing information stored in the second group is the navigation information of the current page.
Mode 2.2: the electronic device deletes the route information arranged before the route information of the current page in the history navigation information to update the history navigation information. And the electronic equipment generates breadcrumb navigation of the current page based on the updated historical navigation information. The updated historical navigation information is the navigation information of the current page.
Mode 2.3: the electronic equipment directly generates breadcrumb navigation of the current page according to the route information from the current page to the last page in the historical navigation information. It should be appreciated that in mode 2.3, the electronic device does not generate breadcrumb navigation for the current page by intercepting or deleting the routing information.
Alternatively, in a second implementation, similar to the first implementation described above, the historical navigation information is updated once every time the electronic device generates breadcrumb navigation. Based on the above, the electronic device updates the historical navigation information to the route information from the current page to the last page in the historical navigation information under the condition that the historical navigation information is determined to include the target route information.
Illustratively, in the case of breadcrumb navigation of the current page being generated in the above-described manner 2.1, the electronic device updates the historical navigation information to the truncated routing information. For example, the electronic device assigns the value of the second array to the first array. In case of generating breadcrumb navigation of the current page in the above-described way 2.2, the electronic device has updated the historical navigation information in the process of generating breadcrumb of the current page. In the case of generating breadcrumb navigation of the current page in the above manner 2.3, the electronic device deletes the route information arranged before the route information of the current page in the history navigation information to update the history navigation information. Or the electronic equipment can intercept the route information from the first page to the current page to the last page in the history navigation information and update the history navigation information into the intercepted route information.
Next, a third implementation of breadcrumb navigation of the current page is described, in which the electronic device generates breadcrumb navigation of the current page based on the historical navigation information and the target routing information, in the case where the historical navigation information includes the target routing information.
In a third implementation manner, the historical navigation information includes routing information of one or more pages, the routing information of each page in the historical navigation information corresponds to a serial number, the serial number corresponding to the routing information of each page is consistent with the page level of the corresponding page, and the routing information of the one or more pages can be arranged at will. If the historical navigation information comprises the target route information, the electronic equipment determines the target sequence number, wherein the target sequence number is the sequence number corresponding to the route information of the current page, the electronic equipment acquires the route information of the page, the corresponding sequence number of which is smaller than or equal to the target sequence number, in the historical navigation information, and breadcrumb navigation of the current page is generated based on the acquired route information. The obtained route information is the navigation information of the current page determined by the electronic equipment from the historical navigation information.
In this implementation, the electronic device generates the page names in the breadcrumb navigation in the order of the corresponding sequence numbers from small to large, so that the page names in the generated breadcrumb navigation are arranged in the order of the page level from high to low.
Alternatively, in a third implementation, similar to the first implementation described above, the historical navigation information is updated once every time the electronic device generates breadcrumb navigation. Based on the above, the electronic device updates the history navigation information to the route information of the page with the corresponding sequence number smaller than and equal to the target sequence number in the history navigation information under the condition that the history navigation information includes the target route information. The electronic device, for example, updates the historical navigation information to the acquired routing information after acquiring the routing information of the page with the corresponding sequence number smaller than and equal to the target sequence number in the historical navigation information.
The three implementations of breadcrumb navigation for the current page are presented above in which the electronic device generates breadcrumb navigation for the current page based on the historical navigation information and the target routing information in the case where the historical navigation information includes the target routing information. Three implementations of breadcrumb navigation for the current page based on the historical navigation information and the target routing information by the electronic device are described below in the case where the historical navigation information does not include the target routing information.
In a first implementation, the routing information for one or more pages in the historical navigation information is arranged in a page level order from high to low. If the historical navigation information does not include the target routing information, the electronic equipment splices the target routing information to the routing information of the last page in the historical navigation information so as to obtain the navigation information of the current page. And the electronic equipment generates breadcrumb navigation of the current page based on the navigation information of the current page.
In this implementation, the electronic device generates the names of the respective pages in the breadcrumb navigation in the same order as the route information from the first page to the current page in the navigation information of the current page, so that the generated names of the respective pages in the breadcrumb navigation are arranged in the order of the page level from high to low.
In a second implementation, the routing information for one or more pages in the historical navigation information is arranged in a page level order from low to high. If the historical navigation information does not include the target routing information, the electronic equipment splices the target routing information before the routing information of the first page in the historical navigation information so as to obtain the navigation information of the current page. And the electronic equipment generates breadcrumb navigation of the current page based on the navigation information of the current page.
In this implementation, the electronic device generates the names of the respective pages in the breadcrumb navigation in an order opposite to the route information of the current page to the last page in the navigation information of the current page, so that the generated names of the respective pages in the breadcrumb navigation are arranged in the order from the high page level to the low page level.
In a third implementation manner, the routing information of each page in the historical navigation information corresponds to a serial number, the serial number corresponding to the routing information of each page is consistent with the page level of the corresponding page, and the routing information of one or more pages can be arranged at will. If the historical navigation information does not comprise the target routing information, the electronic equipment determines a reference sequence number, wherein the reference sequence number is the maximum sequence number corresponding to the routing information in the historical navigation information, the target routing information is added into the historical navigation information to update the historical navigation information, and the reference sequence number is added with 1 and then is used as the sequence number corresponding to the target routing information in the historical navigation information. And the electronic equipment generates breadcrumb navigation of the current page based on the updated historical navigation information. The updated historical navigation information is the navigation information of the current page.
In this implementation, the electronic device generates the page names in the breadcrumb navigation in the order of the corresponding sequence numbers from small to large, so that the page names in the generated breadcrumb navigation are arranged in the order of the page level from high to low.
Optionally, the historical navigation information is updated once every time the electronic device generates breadcrumb navigation. Based on the above, the electronic device updates the history navigation information to the navigation information of the current page in the case that it is determined that the target routing information is not included in the history navigation information.
The above embodiment describes the implementation process of breadcrumb navigation of the current page generated by the electronic device in the case that the target routing information does not have the indication tag through step 102 and step 103. Next, description will be made of an implementation procedure of breadcrumb navigation in which the electronic device generates the current page in the case that the target route information has the indication tag.
In the embodiment of the application, after determining the target routing information, if the target routing information has an indication label, the electronic equipment acquires the routing information from the root node to all nodes of the target node in the routing tree, and generates breadcrumb navigation of the current page based on the acquired routing information of all nodes. The routing tree is used for describing the routing hierarchical relationship of each page in the website to which the current page belongs, the target node is the node corresponding to the current page, and the root node is the node corresponding to the root page of the website. Briefly, if the target routing information has an indication tag, the electronic device generates breadcrumb navigation in accordance with the routing hierarchy.
The electronic device obtains the route information from the root node to all nodes of the target node in the route tree, and one implementation mode is as follows: and starting from the root node of the routing tree, searching the routing information of each node step by step in a recursion mode until the target routing information is searched, and obtaining the routing information of all nodes from the root node to the target node.
Optionally, the electronic device obtains a target link, where the target link is a link of the current page. The electronic equipment determines path labels of all nodes from the root node to the target node from the target link, and sequentially acquires the route information of all nodes from the root node to the target node from the source code of the website according to the path labels of all nodes from the root node to the target node.
Illustratively, assuming that the target link is 'http:// a/b/c.com', the electronic device determines from the target link that the path labels from the root node to the target node are '/a', '/b', and '/c' in order, and the electronic device first looks up the code segment with the path label '/a' from the source code of the root page to obtain the routing information of the root node. The electronic equipment searches path labels of all sub-nodes of the root node from source codes of the root page, searches sub-nodes with path labels of '/b' from all the sub-nodes, and obtains positions of source codes of pages corresponding to the sub-nodes with path labels of '/b' from the source codes of the root node. The electronic equipment obtains the source code of the page corresponding to the child node with the path label of '/b' based on the position, and searches the code segment with the path label of '/b' from the source code of the page so as to obtain the routing information of the node with the path label of '/b'. And so on until the electronic device obtains the routing information of the node with the path label '/c'.
It should be noted that, in addition to the method for obtaining the routing information of each node in the routing tree, the electronic device may also obtain the routing information of each node according to other methods, which is not limited in the embodiment of the present application.
Optionally, the electronic device stores the obtained routing information in the third array every time the routing information of one node is obtained in the process of searching the routing information of each node from the root node of the routing tree step by step downwards in a recursive manner. And after the electronic equipment acquires the routing information of one node, inserting the acquired routing information into the last element in the third array, namely sequentially storing the routing information of each node according to the same sequence as the acquisition sequence of the routing information. Or the electronic device sequentially stores the routing information of each node before inserting the acquired routing information into the first element in the third array, that is, in an order opposite to the acquisition order of the routing information, every time the electronic device acquires the routing information of one node. Or the electronic equipment randomly inserts the acquired routing information into the third array every time the electronic equipment acquires the routing information of one node.
In the embodiment of the application, after the electronic equipment acquires the routing information from the root node to all nodes of the target node in the routing tree, the routing information from the root node to all nodes of the target node is stored as the historical navigation information, so that breadcrumb navigation can be generated based on the historical navigation information. In the case of storing the history navigation information in the first array and storing the route information of each node to be acquired in the third array, the electronic device assigns a value of the third array to the first array after storing the target route information in the third array.
It should be noted that, in the embodiment of the present application, the present solution may be implemented by a breadcrumb assembly. For example, during a visitor's browsing a page in a website, the electronic device renders breadcrumb navigation of the page by invoking a breadcrumb component. The logic for implementing the breadcrumb components will be described next.
First, in order to implement the function of the breadcrumb assembly based on the indication tag, routing information of each page is defined in the source code of the website, a page name of the corresponding page, that is, a name of the corresponding page in breadcrumb navigation is defined in the routing information, and whether the routing information of the corresponding page has the indication tag is also defined in the routing information. For example, if a 'root' is defined in the routing information of a certain page: true', the routing information representing the page has an indication tag. If the 'root' is not defined in the routing information of a certain page: true', the routing information representing the page does not have an indication tag.
For example, the route information of a certain page defined in the source code of the page is as follows, and the route information indicating the page has an indication tag.
Second, breadcrumb components for generating breadcrumb navigation are defined and packaged in the source code of the website. And, in order for the electronic device to be able to invoke the breadcrumb component if breadcrumb navigation is desired, the breadcrumb component is referenced in the source code of the page for which breadcrumb navigation is desired. For example, assuming that a reference to a breadcrumb component is represented in the source code of a page, '< breadcrumb > </breadcrumb >' then the electronic device invokes the breadcrumb component to generate breadcrumb navigation for the page if the code segment, '< breadcrumb > </breadcrumb >' in the source code of the page is detected.
The breadcrumb component is defined with variables required for generating breadcrumb navigation, such as a numeral group breadcrumbs, for storing navigation information of the current page so as to render the breadcrumb navigation. A constructor (e.g., constructor function) is also defined in the breadcrumb assembly for generating a breadcrumb navigation for the current page according to the scheme, i.e., rendering the breadcrumb navigation in the current page. Next, an implementation procedure of generating breadcrumb navigation by the construction function will be described.
And monitoring a route navigation event in the construction function, wherein the route navigation event can be an event triggered by a page loading instruction, when the route navigation event is monitored to be completed, transmitting a link of a current page into a breadcrumb acquiring function (such as getBreadcrumbs function) so as to acquire route information from a root node to all nodes of a target node in a route tree step by step in a recursion mode through the breadcrumb acquiring function, and sequentially putting the acquired route information of each node into a third array according to the acquisition sequence.
After the construction function obtains the third array, the last element in the third array is taken out, and the element is the route information of the current page, and whether the route information of the current page comprises a root is judged: true'. If the route information of the current page includes' root: and true', deleting the first array stored locally, wherein the first array is used for storing the history navigation information, and assigning the value of the third array to the array breadcrumbs in the breadcrumb component. If the route information of the current page does not include a' root: true', judging whether the first array stored locally comprises the route information of the current page. If the first array includes the route information of the current page, the route information of the 1 st to i th pages in the first array is directly cut out to obtain a second array, and the value of the second array is given to the array breadcrumbs in the breadcrumb assembly, wherein the i th page is the current page. If the first array does not include the routing information of the current page, the value of the first array after splicing is assigned to the array breadcrumbs in the breadcrumb assembly after the routing information of the current page is spliced to the last element in the first array.
After assigning the value to the array breadcrumbs in the breadcrumb component, the breadcrumb component may generate breadcrumb navigation for the current page based on the routing information in the array breadcrumbs. In addition, the breadcrumb component also stores array breadcrumbs locally as the most current historical navigation information for the next rendering breadcrumb navigation.
The breadcrumb navigation generated using the present approach is illustrated next. In this example, taking four pages whose page names are 'file management', 'file list', 'preview', and 'edit' respectively as examples, the route information of the page corresponding to the 'file management' and 'file list' has an indication tag, and the route information corresponding to the 'preview' and 'edit' does not have an indication tag. Assuming that breadcrumbs displayed in a page being browsed by a visitor are navigated to a 'file management > file list', if a jump is made from a page corresponding to the 'file list' to a page corresponding to the 'preview' at a first moment, the generated breadcrumbs navigation is the 'file management > file list > preview'. If the page corresponding to the 'file list' is jumped to the page corresponding to the 'edit' at the first moment, the generated breadcrumb navigation is 'file management > file list > edit'. If the page corresponding to 'editing' is jumped to the page corresponding to 'previewing' at the second moment, the generated breadcrumbs are navigated to be 'file management > file list > editing > previewing'.
In summary, the breadcrumb navigation can be automatically generated by the scheme, the defect of manual arrangement is reduced, namely, the workload is reduced, the efficiency is improved, errors are not easy to occur, and the later maintenance is convenient. In addition, in the scheme, the page level of the corresponding page is indicated to be consistent with the route level through the indication tag, and if the current page does not have the indication tag, the page level of the current page is indicated to be possibly inconsistent with the route level, breadcrumb navigation of the current page is generated based on the historical navigation information. That is, since the routing hierarchy between pages is strict, but the routing hierarchy is not strict, the routing hierarchy may not be completely identical to the page hierarchy, and thus the present solution is not limited to generating breadcrumb navigation strictly according to the routing hierarchy of pages, and the generated breadcrumb navigation can more accurately represent the page hierarchy.
All the above optional technical solutions may be combined according to any choice to form an optional embodiment of the present application, and the embodiments of the present application will not be described in detail.
Fig. 2 is a schematic structural diagram of a breadcrumb navigation generating device 200 according to an embodiment of the application, where the breadcrumb navigation generating device may be implemented as part or all of an electronic device by software, hardware or a combination of both. The electronic device is any one of the above embodiments. Referring to fig. 2, the apparatus 200 includes: a determining module 201, a first obtaining module 202 and a generating module 203.
A determining module 201, configured to determine target routing information, where the target routing information is the routing information of the current page;
A first obtaining module 202, configured to obtain, if the target routing information does not have an indication tag, historical navigation information, where the indication tag is used to indicate that a page level of a corresponding page is consistent with a routing level, and the historical navigation information is used to indicate breadcrumb navigation of a previous page visited before a current page;
and the generating module 203 is used for generating breadcrumb navigation of the current page based on the historical navigation information and the target routing information.
Optionally, the historical navigation information includes routing information of one or more pages, and the routing information of the one or more pages is arranged in order from high to low according to page level;
The generating module 203 includes:
and the first generation sub-module is used for generating breadcrumb navigation of the current page based on the route information from the first page to the current page in the history navigation information if the history navigation information comprises the target route information.
Optionally, the apparatus 200 further comprises:
And the first updating module is used for updating the historical navigation information into the route information from the first page to the current page in the historical navigation information.
Optionally, the historical navigation information includes routing information of one or more pages, and the routing information of the one or more pages is arranged in order from high to low according to page level;
The generating module 203 includes:
the splicing sub-module is used for splicing the target routing information to the routing information of the last page in the historical navigation information to obtain the navigation information of the current page if the historical navigation information does not include the target routing information;
and the second generation sub-module is used for generating breadcrumb navigation of the current page based on the navigation information of the current page.
Optionally, the apparatus 200 further comprises:
and the second updating module is used for updating the historical navigation information into the navigation information of the current page.
Optionally, the apparatus 200 further comprises:
The second obtaining module is used for obtaining the route information from the root node to all nodes of the target node in the route tree if the target route information has the indication label, wherein the route tree is used for describing the route hierarchical relationship of each page in the website to which the current page belongs, the target node is the node corresponding to the current page, and the root node is the node corresponding to the root page of the website;
And the second generation module is used for generating breadcrumb navigation of the current page based on the acquired routing information of all the nodes.
Optionally, the second acquisition module includes:
And the acquisition sub-module is used for searching the route information of each node from the root node of the route tree step by step in a recursion mode until the target route information is searched, and obtaining the route information of all nodes from the root node to the target node.
Optionally, the apparatus 200 further comprises:
and the storage module is used for storing the route information from the root node to all nodes of the target node in the route tree as the history navigation information.
In summary, the breadcrumb navigation can be automatically generated by the scheme, the defect of manual arrangement is reduced, namely, the workload is reduced, the efficiency is improved, errors are not easy to occur, and the later maintenance is convenient. In addition, in the scheme, the page level of the corresponding page is indicated to be consistent with the route level through the indication tag, and if the current page does not have the indication tag, the page level of the current page is indicated to be possibly inconsistent with the route level, breadcrumb navigation of the current page is generated based on the historical navigation information. That is, since the routing hierarchy between pages is strict, but the routing hierarchy is not strict, the routing hierarchy may not be completely identical to the page hierarchy, and thus the present solution is not limited to generating breadcrumb navigation strictly according to the routing hierarchy of pages, and the generated breadcrumb navigation can more accurately represent the page hierarchy.
It should be noted that: in the breadcrumb navigation generating device provided in the above embodiment, only the division of the functional modules is used for illustration, and in practical application, the functional allocation can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the generating device for breadcrumb navigation provided in the above embodiment and the generating method embodiment for breadcrumb navigation belong to the same concept, and detailed implementation processes of the generating device for breadcrumb navigation are detailed in the method embodiment and are not described herein.
Fig. 3 shows a block diagram of an electronic device 300 according to an exemplary embodiment of the application. The electronic device 300 may be: smart phones, tablet computers, notebook computers or desktop computers, etc. Electronic device 300 may also be referred to by other names of computer devices, terminal devices, user devices, portable electronic devices, laptop electronic devices, desktop electronic devices, and the like.
Generally, the electronic device 300 includes: a processor 301 and a memory 302.
Processor 301 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 301 may be implemented in at least one hardware form of DSP (DIGITAL SIGNAL Processing), FPGA (Field-Programmable gate array), PLA (Programmable Logic Array ). Processor 301 may also include a main processor, which is a processor for processing data in an awake state, also referred to as a CPU (Central Processing Unit ), and a coprocessor; a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 301 may be integrated with a GPU (Graphics Processing Unit, image processor) for rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 301 may also include an AI (ARTIFICIAL INTELLIGENCE ) processor for processing computing operations related to machine learning.
Memory 302 may include one or more computer-readable storage media, which may be non-transitory. Memory 302 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 302 is used to store at least one instruction for execution by processor 301 to implement the breadcrumb navigation generation method provided by the method embodiments of the application.
In some embodiments, the electronic device 300 may further optionally include: a peripheral interface 303, and at least one peripheral. The processor 301, memory 302, and peripheral interface 303 may be connected by a bus or signal line. The individual peripheral devices may be connected to the peripheral device interface 303 by buses, signal lines, or circuit boards. Specifically, the peripheral device includes: at least one of radio frequency circuitry 304, display 305, camera assembly 306, audio circuitry 307, positioning assembly 308, and power supply 309.
The peripheral interface 303 may be used to connect at least one Input/Output (I/O) related peripheral to the processor 301 and the memory 302. In some embodiments, processor 301, memory 302, and peripheral interface 303 are integrated on the same chip or circuit board; in some other embodiments, either or both of the processor 301, the memory 302, and the peripheral interface 303 may be implemented on separate chips or circuit boards, which is not limited in this embodiment.
The Radio Frequency circuit 304 is configured to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuitry 304 communicates with a communication network and other communication devices via electromagnetic signals. The radio frequency circuit 304 converts an electrical signal into an electromagnetic signal for transmission, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 304 includes: antenna systems, RF transceivers, one or more amplifiers, tuners, oscillators, digital signal processors, codec chipsets, subscriber identity module cards, and so forth. The radio frequency circuitry 304 may communicate with other electronic devices via at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: metropolitan area networks, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (WIRELESS FIDELITY ) networks. In some embodiments, the radio frequency circuit 304 may further include NFC (NEAR FIELD Communication) related circuits, which is not limited by the present application.
The display screen 305 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display 305 is a touch screen, the display 305 also has the ability to collect touch signals at or above the surface of the display 305. The touch signal may be input as a control signal to the processor 301 for processing. At this point, the display 305 may also be used to provide virtual buttons and/or virtual keyboards, also referred to as soft buttons and/or soft keyboards. In some embodiments, the display screen 305 may be one and disposed on the front panel of the electronic device 300; in other embodiments, the display screen 305 may be at least two, respectively disposed on different surfaces of the electronic device 300 or in a folded design; in other embodiments, the display 305 may be a flexible display disposed on a curved surface or a folded surface of the electronic device 300. Even more, the display screen 305 may be arranged in an irregular pattern other than rectangular, i.e., a shaped screen. The display 305 may be made of LCD (Liquid CRYSTAL DISPLAY), OLED (Organic Light-Emitting Diode) or other materials.
The camera assembly 306 is used to capture images or video. Optionally, the camera assembly 306 includes a front camera and a rear camera. In general, a front camera is disposed on a front panel of an electronic device, and a rear camera is disposed on a rear surface of the electronic device. In some embodiments, the at least two rear cameras are any one of a main camera, a depth camera, a wide-angle camera and a tele camera, so as to realize that the main camera and the depth camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize a panoramic shooting and Virtual Reality (VR) shooting function or other fusion shooting functions. In some embodiments, camera assembly 306 may also include a flash. The flash lamp can be a single-color temperature flash lamp or a double-color temperature flash lamp. The dual-color temperature flash lamp refers to a combination of a warm light flash lamp and a cold light flash lamp, and can be used for light compensation under different color temperatures.
The audio circuit 307 may include a microphone and a speaker. The microphone is used for collecting sound waves of users and environments, converting the sound waves into electric signals, and inputting the electric signals to the processor 301 for processing, or inputting the electric signals to the radio frequency circuit 304 for voice communication. For purposes of stereo acquisition or noise reduction, the microphone may be multiple and separately disposed at different locations of the electronic device 300. The microphone may also be an array microphone or an omni-directional pickup microphone. The speaker is used to convert electrical signals from the processor 301 or the radio frequency circuit 304 into sound waves. The speaker may be a conventional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only the electric signal can be converted into a sound wave audible to humans, but also the electric signal can be converted into a sound wave inaudible to humans for ranging and other purposes. In some embodiments, the audio circuit 307 may also include a headphone jack.
The location component 308 is operative to locate a current geographic location of the electronic device 300 for navigation or LBS (Location Based Service, location-based services). The positioning component 308 may be a positioning component based on the United states GPS (Global Positioning System ), the Beidou system of China, the Granati system of Russia, or the Galileo system of the European Union.
The power supply 309 is used to power the various components in the electronic device 300. The power source 309 may be alternating current, direct current, disposable or rechargeable. When the power source 309 comprises a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, the electronic device 300 further includes one or more sensors 310. The one or more sensors 310 include, but are not limited to: acceleration sensor 311, gyroscope sensor 312, pressure sensor 313, fingerprint sensor 314, optical sensor 315, and proximity sensor 316.
The acceleration sensor 311 can detect the magnitudes of accelerations on three coordinate axes of the coordinate system established with the electronic device 300. For example, the acceleration sensor 311 may be used to detect components of gravitational acceleration on three coordinate axes. The processor 301 may control the display screen 305 to display a user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 311. The acceleration sensor 311 may also be used for the acquisition of motion data of a game or a user.
The gyro sensor 312 may detect the body direction and the rotation angle of the electronic device 300, and the gyro sensor 312 may cooperate with the acceleration sensor 311 to collect the 3D motion of the user on the electronic device 300. The processor 301 may implement the following functions according to the data collected by the gyro sensor 312: motion sensing (e.g., changing UI according to a tilting operation by a user), image stabilization at shooting, game control, and inertial navigation.
The pressure sensor 313 may be disposed on a side frame of the electronic device 300 and/or on an underlying layer of the display screen 305. When the pressure sensor 313 is disposed on the side frame of the electronic device 300, a grip signal of the user on the electronic device 300 may be detected, and the processor 301 performs a left-right hand recognition or a shortcut operation according to the grip signal collected by the pressure sensor 313. When the pressure sensor 313 is disposed at the lower layer of the display screen 305, the processor 301 controls the operability control on the UI interface according to the pressure operation of the user on the display screen 305. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
The fingerprint sensor 314 is used to collect a fingerprint of a user, and the processor 301 identifies the identity of the user based on the fingerprint collected by the fingerprint sensor 314, or the fingerprint sensor 314 identifies the identity of the user based on the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, the user is authorized by the processor 301 to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying for and changing settings, etc. The fingerprint sensor 314 may be disposed on the front, back, or side of the electronic device 300. When a physical key or vendor Logo is provided on the electronic device 300, the fingerprint sensor 314 may be integrated with the physical key or vendor Logo.
The optical sensor 315 is used to collect the ambient light intensity. In one embodiment, processor 301 may control the display brightness of display screen 305 based on the intensity of ambient light collected by optical sensor 315. Specifically, when the intensity of the ambient light is high, the display brightness of the display screen 305 is turned up; when the ambient light intensity is low, the display brightness of the display screen 305 is turned down. In another embodiment, the processor 301 may also dynamically adjust the shooting parameters of the camera assembly 306 according to the ambient light intensity collected by the optical sensor 315.
The proximity sensor 316, also referred to as a distance sensor, is typically disposed on the front panel of the electronic device 300. The proximity sensor 316 is used to capture the distance between the user and the front of the electronic device 300. In one embodiment, when the proximity sensor 316 detects a gradual decrease in the distance between the user and the front of the electronic device 300, the processor 301 controls the display 305 to switch from the bright screen state to the off screen state; when the proximity sensor 316 detects that the distance between the user and the front of the electronic device 300 gradually increases, the processor 301 controls the display screen 305 to switch from the off-screen state to the on-screen state.
Those skilled in the art will appreciate that the structure shown in fig. 3 is not limiting of the electronic device 300 and may include more or fewer components than shown, or may combine certain components, or may employ a different arrangement of components.
In some embodiments, there is also provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the breading navigation generating method of the above embodiments. For example, the computer readable storage medium may be ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
It is noted that the computer readable storage medium mentioned in the embodiments of the present application may be a non-volatile storage medium, in other words, may be a non-transitory storage medium.
It should be understood that all or part of the steps to implement the above-described embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The computer instructions may be stored in the computer-readable storage medium described above.
That is, in some embodiments, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform the steps of the breadcrumb navigation generation method described above.
It should be understood that references herein to "at least one" mean one or more, and "a plurality" means two or more. In the description of the embodiments of the present application, unless otherwise indicated, "/" means or, for example, a/B may represent a or B; "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. In addition, in order to facilitate the clear description of the technical solution of the embodiments of the present application, in the embodiments of the present application, the words "first", "second", etc. are used to distinguish the same item or similar items having substantially the same function and effect. It will be appreciated by those of skill in the art that the words "first," "second," and the like do not limit the amount and order of execution, and that the words "first," "second," and the like do not necessarily differ.
It should be noted that, the information (including but not limited to user equipment information, user personal information, etc.), data (including but not limited to data for analysis, stored data, presented data, etc.), and signals related to the embodiments of the present application are all authorized by the user or are fully authorized by the parties, and the collection, use, and processing of the related data is required to comply with the relevant laws and regulations and standards of the relevant countries and regions. For example, the route information, source code, etc. of the page involved in the embodiment of the present application are all acquired under the condition of sufficient authorization.
The above embodiments are not intended to limit the present application, and any modifications, equivalent substitutions, improvements, etc. within the spirit and principle of the present application should be included in the scope of the present application.

Claims (8)

1. A method for generating breadcrumb navigation, the method comprising:
determining target routing information, wherein the target routing information is the routing information of a current page, and the target routing information comprises the page name of the current page;
If the target routing information does not have an indication tag, acquiring historical navigation information, wherein the indication tag is used for indicating that the page level of the corresponding page is consistent with the routing level, the historical navigation information is used for indicating breadcrumb navigation of the last page visited before the current page, the historical navigation information comprises the routing information of one or more pages, and the routing information of the one or more pages is arranged according to the order from the page level to the low;
If the historical navigation information comprises the target routing information, generating breadcrumb navigation of the current page based on the routing information from the first page to the current page in the historical navigation information;
And if the historical navigation information does not comprise the target routing information, splicing the target routing information to the last page of the historical navigation information to obtain the navigation information of the current page, and generating breadcrumb navigation of the current page based on the navigation information of the current page.
2. The method of claim 1, wherein in the case of generating breadcrumb navigation for the current page based on routing information for a first page to the current page in the historical navigation information, the method further comprises:
And updating the historical navigation information into the route information from the first page to the current page in the historical navigation information.
3. The method according to claim 1, wherein in case of generating breadcrumb navigation of the current page based on the navigation information of the current page, the method further comprises:
and updating the historical navigation information into the navigation information of the current page.
4. A method according to any one of claims 1-3, wherein after said determining the destination routing information, the method further comprises:
If the target routing information has the indication label, acquiring routing information from a root node in a routing tree to all nodes of the target node, wherein the routing tree is used for describing the routing hierarchical relationship of each page in a website to which the current page belongs, the target node is a node corresponding to the current page, and the root node is a node corresponding to the root page of the website;
And generating breadcrumb navigation of the current page based on the acquired routing information of all the nodes.
5. The method of claim 4, wherein the obtaining routing information for all nodes from the root node to the target node in the routing tree comprises:
And starting from the root node of the routing tree, searching the routing information of each node step by step downwards in a recursion mode until the target routing information is searched, and obtaining the routing information of all nodes from the root node to the target node.
6. The method according to claim 4 or 5, wherein after obtaining the routing information of all nodes from the root node to the target node in the routing tree, the method further comprises:
And storing the routing information of all nodes from the root node to the target node as historical navigation information.
7. A breadcrumb navigation generating device, said device comprising:
the determining module is used for determining target routing information, wherein the target routing information is the routing information of the current page, and the target routing information comprises the page name of the current page;
The first acquisition module is used for acquiring historical navigation information if the target routing information does not have an indication tag, wherein the indication tag is used for indicating that the page level of a corresponding page is consistent with the routing level, the historical navigation information is used for indicating breadcrumb navigation of a last page accessed before the current page, the historical navigation information comprises the routing information of one or more pages, and the routing information of the one or more pages is arranged according to the order from the page level to the low;
The generation module is used for generating breadcrumb navigation of the current page based on the historical navigation information and the target route information;
the generation module comprises:
The first generation sub-module is used for generating breadcrumb navigation of the current page based on the route information from the first page to the current page in the history navigation information if the history navigation information comprises the target route information;
The splicing sub-module is used for splicing the target routing information to the routing information of the last page in the historical navigation information to obtain the navigation information of the current page if the historical navigation information does not comprise the target routing information;
and the second generation sub-module is used for generating breadcrumb navigation of the current page based on the navigation information of the current page.
8. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program which, when executed by a processor, implements the steps of the method of any of claims 1-6.
CN202210405491.2A 2022-04-18 2022-04-18 Breadcrumb navigation generation method, device and computer readable storage medium Active CN114969579B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210405491.2A CN114969579B (en) 2022-04-18 2022-04-18 Breadcrumb navigation generation method, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210405491.2A CN114969579B (en) 2022-04-18 2022-04-18 Breadcrumb navigation generation method, device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN114969579A CN114969579A (en) 2022-08-30
CN114969579B true CN114969579B (en) 2024-11-22

Family

ID=82978301

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210405491.2A Active CN114969579B (en) 2022-04-18 2022-04-18 Breadcrumb navigation generation method, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN114969579B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113626747A (en) * 2021-08-16 2021-11-09 北京沃东天骏信息技术有限公司 Method and device for generating breadcrumb navigation

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7210094B2 (en) * 2001-07-11 2007-04-24 International Business Machines Corporation Method and system for dynamic web page breadcrumbing using javascript
US8010910B2 (en) * 2007-09-04 2011-08-30 Microsoft Corporation Breadcrumb list supplementing for hierarchical data sets
CN101887444B (en) * 2009-05-15 2012-12-19 国际商业机器公司 Navigation method and system for webpage
US9411899B2 (en) * 2012-12-21 2016-08-09 Paypal, Inc. Contextual breadcrumbs during navigation
US10481765B2 (en) * 2015-10-09 2019-11-19 Walmart Apollo, Llc Graphical user interface and method and apparatus of navigating using same
CN108710630A (en) * 2018-04-02 2018-10-26 阿里巴巴集团控股有限公司 A kind of page navigation method, device and equipment
US11431824B2 (en) * 2019-05-03 2022-08-30 Servicenow, Inc. Server-side control over navigation mode in web application
CN113127776A (en) * 2019-12-31 2021-07-16 深圳云天励飞技术有限公司 Breadcrumb path generation method and device and terminal equipment
US11520459B1 (en) * 2022-03-30 2022-12-06 Salesforce.Com, Inc. Managing circular navigation of a multipage user interface

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113626747A (en) * 2021-08-16 2021-11-09 北京沃东天骏信息技术有限公司 Method and device for generating breadcrumb navigation

Also Published As

Publication number Publication date
CN114969579A (en) 2022-08-30

Similar Documents

Publication Publication Date Title
CN107885533B (en) Method and device for managing component codes
CN112256425B (en) Load balancing method and system, computer cluster, information editing method and terminal
CN112527287B (en) Item detail information display method, device, terminal and storage medium
CN109828802B (en) List view display method, device and readable medium
CN113127130B (en) Page jump method, device and storage medium
CN108959361B (en) Form management method and device
CN112905328B (en) Task processing method, device and computer readable storage medium
CN112420217B (en) Message pushing method, device, equipment and storage medium
CN111459466B (en) Code generation method, device, equipment and storage medium
CN111897525A (en) Big data processing method and system
CN111737100A (en) Data acquisition method, device, equipment and storage medium
CN112052354A (en) Video recommendation method, video display method and device and computer equipment
CN111159604A (en) Picture resource loading method and device
CN111125602B (en) Page construction method, device, equipment and storage medium
CN114329292B (en) Resource information configuration method, device, electronic device and storage medium
CN111813322B (en) Storage pool creation method, device, equipment and storage medium
CN111275607A (en) Interface display method and device, computer equipment and storage medium
CN113051485B (en) Group searching method, device, terminal and storage medium
CN111580892A (en) Method, device, terminal and storage medium for calling service component
CN111666214B (en) Client fault tolerance test method, device, terminal, server and storage medium
CN112416356A (en) JSON character string processing method, device, equipment and storage medium
CN114969579B (en) Breadcrumb navigation generation method, device and computer readable storage medium
CN114168120B (en) Data acquisition method, device, computer equipment and storage medium
CN115134316B (en) Topic display method, device, terminal and storage medium
CN112596810B (en) Loading prompt information display method and device, 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
CB03 Change of inventor or designer information

Inventor after: Chen Min

Inventor after: Wu Xiang

Inventor before: Wu Xiang

CB03 Change of inventor or designer information
GR01 Patent grant
GR01 Patent grant