Breadcrumb navigation generation method, device and computer readable storage medium

By automatically generating breadcrumb navigation, using target routing information and historical navigation information, combined with indication labels, the problems of low efficiency and poor accuracy of manual choreography of breadcrumb navigation are solved, and more accurate page-level relationship display is achieved.

CN114969579BActive Publication Date: 2024-11-22WUHAN XINLUO TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210405491.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-18
Publication Date
2024-11-22
Estimated Expiration
2042-04-18

AI Technical Summary

Technical Problem

In the prior art, manual choreography of breadcrumb navigation is large, inefficient and error-prone, and it is difficult to accurately reflect page-level relationships, and the strict routing hierarchy relationship limits the generation of breadcrumb navigation.

Method used

By determining the target routing information and historical navigation information, breadcrumb navigation is automatically generated, and the indication label is used to distinguish the situation where the page level is consistent with the routing level, and more accurate breadcrumb navigation is generated based on this.

Benefits of technology

Reduce the workload of manual orchestration, improve efficiency, and the generated breadcrumb navigation more accurately reflects page hierarchy relationships and adapts to non-strict page directory tree structure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114969579B_ABST
    Figure CN114969579B_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, and computer-readable storage medium for generating breadcrumb navigation, belonging to the field of computer technology. This solution can automatically generate breadcrumb navigation, reducing the drawbacks of manual arrangement. Furthermore, in this solution, indicator labels are used to indicate that the page hierarchy and routing hierarchy of the corresponding page are consistent. If the current page does not have an indicator label, it means that the page hierarchy and routing hierarchy of the current page may not be consistent. In this case, breadcrumb navigation for the current page is generated based on historical navigation information. That is, since the routing hierarchy relationship between pages is strict, while the page hierarchy relationship is not strict, and the routing hierarchy relationship and the page hierarchy relationship may not be completely consistent, this solution is not limited to strictly following the page routing hierarchy relationship to generate breadcrumb navigation. The generated breadcrumb navigation can more accurately reflect the page hierarchy relationship.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method and device for generating breadcrumb navigation and a computer-readable storage medium. Background Art

[0002] At present, for some websites with very complex structures, breadcrumb navigation can be generated for each page in the website. The breadcrumb navigation can make visitors understand the location of the page in the website more clearly, and it is also convenient for visitors to quickly jump between pages of different levels.

[0003] For example, the name of the current page browsed by the visitor is 'Activity Details', and the breadcrumb navigation of the current page is 'Home > Activity Management > Activity List > Activity Details'. It can be seen that the breadcrumb navigation reflects the hierarchical relationship of the four pages in the website and also reflects 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, by clicking 'Home', you can return to the homepage of the website.

[0004] In the related art, technicians are required to manually compile the configuration data of the breadcrumb navigation of each page, and generate the breadcrumb navigation of each page based on the configuration data. However, manual compilation is labor-intensive, inefficient, prone to errors, and inconvenient for later maintenance. Summary of the invention

[0005] The present application provides a method, device and computer-readable storage medium for generating breadcrumb navigation, which can automatically generate breadcrumb navigation, reduce workload, improve efficiency, be less prone to errors, and facilitate later maintenance. The generated breadcrumb navigation can also more accurately reflect the page hierarchy relationship. The technical solution is as follows:

[0006] In one aspect, a method for generating a breadcrumb navigation is provided, the method comprising:

[0007] Determine target routing information, where the target routing information is routing information of the current page;

[0008] If the target routing information does not have an indication tag, acquiring historical navigation information, wherein the indication tag is used to indicate that the page level of the corresponding page is consistent with the routing level, and the historical navigation information is used to indicate the breadcrumb navigation of the previous page visited before the current page;

[0009] Based on the historical navigation information and the target routing information, a breadcrumb navigation of the current page is generated.

[0010] 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 descending order of page levels;

[0011] The step of generating a breadcrumb navigation of the current page based on the historical navigation information and the target routing information includes:

[0012] If the historical navigation information includes the target routing information, a breadcrumb navigation of the current page is generated based on the routing information from the first page in the historical navigation information to the current page.

[0013] Optionally, the method further comprises:

[0014] The historical navigation information is updated to routing information from the first page in the historical navigation information to the current page.

[0015] 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 descending order of page levels;

[0016] The step of generating a breadcrumb navigation of the current page based on the historical navigation information and the target routing information includes:

[0017] If the historical navigation information does not include the target routing information, the target routing information is concatenated to the routing information of the last page in the historical navigation information to obtain the navigation information of the current page;

[0018] Based on the navigation information of the current page, a breadcrumb navigation of the current page is generated.

[0019] Optionally, the method further comprises:

[0020] The historical navigation information is updated to the navigation information of the current page.

[0021] Optionally, after determining the target routing information, the method further includes:

[0022] If the target routing information has the indication tag, then obtain routing information of all nodes from the root node to the target node in the routing tree, the routing tree is used to describe 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;

[0023] Based on the acquired routing information of all nodes, a breadcrumb navigation of the current page is generated.

[0024] Optionally, obtaining routing information of all nodes from a root node to a target node in a routing tree includes:

[0025] Starting from the root node of the routing tree, the routing information of each node is searched downward step by step in a recursive manner until the target routing information is found, thereby obtaining the routing information of all nodes from the root node to the target node.

[0026] Optionally, after obtaining the routing information of all nodes from the root node to the target node in the routing tree, the method further includes:

[0027] The routing information of all nodes from the root node to the target node is stored as historical navigation information.

[0028] On the other hand, a device for generating breadcrumb navigation is provided, the device comprising:

[0029] A determination module, used to determine target routing information, where the target routing information is routing information of the current page;

[0030] A first acquisition module is used to acquire historical navigation information if the target routing information does not have an indication tag, wherein the indication tag is used to indicate that the page level of the corresponding page is consistent with the routing level, and the historical navigation information is used to indicate the breadcrumb navigation of the previous page visited before the current page;

[0031] A generation module is used to generate a breadcrumb navigation of the current page based on the historical navigation information and the target routing information.

[0032] 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 descending order of page levels;

[0033] The generation module comprises:

[0034] The first generating submodule is used to generate a breadcrumb navigation of the current page based on the routing information from the first page to the current page in the historical navigation information if the historical navigation information includes the target routing information.

[0035] Optionally, the device further comprises:

[0036] The first updating module is used to update the historical navigation information to routing information from the first page to the current page in the historical navigation information.

[0037] 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 descending order of page levels;

[0038] The generation module comprises:

[0039] a splicing submodule, 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;

[0040] The second generating submodule is used to generate a breadcrumb navigation of the current page based on the navigation information of the current page.

[0041] Optionally, the device further comprises:

[0042] The second updating module is used to update the historical navigation information to the navigation information of the current page.

[0043] Optionally, the device further comprises:

[0044] A second acquisition module is used to acquire the routing information of all nodes from the root node to the target node in a routing tree if the target routing information has the indication tag, wherein the routing tree is used to describe 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;

[0045] The second generating module is used to generate the breadcrumb navigation of the current page based on the acquired routing information of all nodes.

[0046] Optionally, the second acquisition module includes:

[0047] The acquisition submodule is used to start from the root node of the routing tree and recursively search for the routing information of each node step by step downward until the target routing information is found, thereby obtaining the routing information of all nodes from the root node to the target node.

[0048] Optionally, the device further comprises:

[0049] The storage module is used to store the routing information of all nodes from the root node to the target node as historical navigation information.

[0050] On the other hand, an electronic device is provided, the electronic device comprising a processor, a communication interface, a memory and a communication bus, the processor, the communication interface and the memory communicate with each other via the communication bus, the memory is used to store a computer program, the processor is used to execute the program stored in the memory to implement the steps of the breadcrumb navigation generation method described above. The electronic device also includes a display screen for displaying the generated breadcrumb navigation.

[0051] On the other hand, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method for generating breadcrumb navigation described above are implemented.

[0052] On the other hand, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the steps of the method for generating breadcrumb navigation as described above.

[0053] The technical solution provided by the embodiments of the present application can at least bring the following beneficial effects:

[0054] This solution can automatically generate breadcrumb navigation and reduce the disadvantages of manual editing, that is, reduce workload, improve efficiency, and be less prone to errors, which is convenient for later maintenance. In addition, in this solution, an indication tag is used to indicate that the page hierarchy of the corresponding page is consistent with the routing hierarchy. If the current page does not have an indication tag, it means that the page hierarchy of the current page may not be consistent with the routing hierarchy, so the breadcrumb navigation of the current page is generated based on the historical navigation information. That is, because the routing hierarchy relationship between pages is strict, but the page hierarchy relationship is not strict, the routing hierarchy relationship and the page hierarchy relationship may not be completely consistent. Therefore, this solution is not limited to generating breadcrumb navigation strictly according to the routing hierarchy relationship of the page, and the generated breadcrumb navigation can more accurately reflect the page hierarchy relationship. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0056] Figure 1 is a flow chart of a method for generating breadcrumb navigation provided by an embodiment of the present application;

[0057] Figure 2 It is a structural schematic diagram of a breadcrumb navigation generation device provided in an embodiment of the present application;

[0058] Figure 3 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0059] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.

[0060] In one related technique for generating breadcrumb navigation, a technician is required to manually compile configuration data of breadcrumb navigation for each page, and generate breadcrumb navigation for each page based on the configuration data. In another related technique for generating breadcrumb navigation, breadcrumb navigation is automatically generated strictly according to the routing hierarchy relationship of each page in the website.

[0061] However, the routing hierarchy of each page in the website is reflected by the source code of the website written by the technicians, and the routing hierarchy of each page is strict, that is, any child node in the routing tree can only have one parent node. Among them, the routing tree is used to describe the routing hierarchy of each page in the website. Exemplarily, a routing tree includes two paths: 'File Management> File List> Preview' and 'File Management> File List> Edit'. Then, if the breadcrumb navigation is generated strictly according to the routing hierarchy, 'Preview' and 'Edit' can only be used as the third-level navigation in the breadcrumb navigation.

[0062] However, technicians may also expect to generate breadcrumb navigation such as 'File Management > File List > Edit > Preview', 'File Management > File List > Preview > Edit', which cannot be achieved according to the routing hierarchy in the related technology. It can be seen that the page directory tree constructed in the related technology is completely consistent with the routing tree, that is, the page hierarchy relationship of each page is completely consistent with the routing hierarchy relationship. However, the page directory tree that the technicians expect to construct is not completely consistent with the routing tree. Among them, the page directory tree is used to describe the page hierarchy relationship of each page in the website.

[0063] In other words, in actual needs, the page hierarchy relationship of each page is not strict, and any child node in the page directory tree can have one or more parent nodes. For example, the page directory tree includes the paths 'File Management> File List> Preview', 'File Management> File List> Edit> Preview', and 'File Management> File List> Preview> Edit'. It can be seen that 'Preview' and 'Edit' each have two parent nodes, and 'Preview' and 'Edit' can be used as the third-level navigation in the breadcrumb navigation, or as the fourth-level navigation. The breadcrumb navigation generated by the breadcrumb navigation generation method provided in the embodiment of the present application can more accurately describe the page hierarchy relationship and meet actual needs.

[0064] It should be noted that the system architecture and business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the evolution of the system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0065] Next, the method for generating breadcrumb navigation provided in the embodiment of the present application is explained in detail. Figure 1 This is a flow chart of a method for generating breadcrumb navigation provided by an embodiment of the present application. This method is described by taking the application of the method to an electronic device as an example. Please refer to Figure 1 , the method comprises the following steps.

[0066] Step 101: Determine target routing information, where the target routing information is routing information of the current page.

[0067] In the embodiment of the present application, after receiving the page loading instruction, the electronic device determines the target routing information, that is, the routing information of the current page based on the page loading instruction, and the current page is the page requested to be loaded by the page loading instruction. The page loading instruction can be generated by the user clicking on the page name in the breadcrumb navigation, the user inputting the URL, keyword search, etc.

[0068] Optionally, the electronic device obtains the target routing information from the source code of the current page. Exemplarily, the electronic device searches for a code segment with a reference character from the source code of the current page to obtain the target routing information, that is, the code segment includes the target routing information defined by the technician, and the reference character is pre-defined, such as the 'path' character. The electronic device may also determine the target routing information in other ways, which is not limited in the embodiments of the present application.

[0069] It should be noted that the routing information of the page reflects the path mapping relationship of the page, and the electronic device can obtain the resources required to generate the page based on the routing information of the page, thereby generating the page. In the embodiment of the present application, the routing information of the page is used to generate a breadcrumb navigation, and the generated breadcrumb navigation includes the page jump address of each page, that is, the visitor can click on the page name of any page in the breadcrumb navigation to jump to the corresponding page according to the page jump address.

[0070] In the embodiment of the present application, the target routing information includes the page name and uniform resource locator (URL) of the current page. The page name of the current page is used to be displayed in the breadcrumb navigation bar, the URL of the current page is used to generate a link to the current page, the link to the current page is used to be displayed in the link bar of the browser, and is used as an attached attribute of the page name of the current page in the breadcrumb navigation, so that the electronic device can jump to the page when detecting a click operation on the page name in the breadcrumb navigation, that is, refresh the current page.

[0071] Optionally, the target routing information also includes one or more of the routing name, routing parameters, path parameters and redirection address of the current page. Where the target routing information does not include the redirection address, the routing parameters and path parameters of the current page are used to be spliced ​​to the back of the URL of the current page to obtain a link to the current page. Where the target routing information includes the redirection address, the redirection address is used as the link to the current page. The electronic device is used to generate a corresponding page according to the link of the current page.

[0072] To put it another way, 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. Each time the electronic device receives a page loading instruction for the page, it displays the page corresponding to the redirection address. The current page is actually the page corresponding to the redirection address. For example, when the electronic device receives a page loading instruction for the page for the first time, the page generated is the page corresponding to the redirection address. When the electronic device detects a click operation on the page name of the page in the breadcrumb navigation, it also jumps to the page corresponding to the redirection address.

[0073] Simply put, if the routing information of a page includes the URL but not the redirection address, the electronic device will generate the page based on the URL, and the page jump address will also be 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 will display the page based on the redirection address, and the page jump address will also be based on the redirection address.

[0074] 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 to indicate whether to display a return button in the breadcrumb navigation of the current page. The return button can be displayed on the right side of the breadcrumb navigation bar, and the page names of each page in the breadcrumb navigation can be displayed on the left side of the breadcrumb navigation bar.

[0075] Optionally, when the display indication information indicates that a return button is displayed in the breadcrumb navigation of the current page, the return parameter also includes a return address, and the return address is used to jump to the page corresponding to the return address when a click operation on the return button in the breadcrumb navigation of the current page is detected. It should be noted that when the display indication information indicates that a return button is displayed in the breadcrumb navigation of the current page, and the return parameter does not include a return address, if a click operation on the return button in the breadcrumb navigation of the current page is detected, the page returns to the previous page visited before the current page.

[0076] Exemplarily, the routing information of the current page includes label, URL, params, queryParams, redirect and data, and data includes breadcrumb, showBack and backPath. Among them, label, URL, params, queryParams, redirect and data respectively represent the routing name, uniform resource locator, path parameter, routing parameter, redirect address and custom parameter of the current page. Breadcrumb, showBack and backPath respectively represent the page name of the current page, the display indication information of the return button and the return address. Among them, the values ​​of params, queryParams, redirect, showBack and backPath can be empty.

[0077] In an embodiment of the present application, in addition to the content described above, the routing information of a page may also have an indication tag, which is used to indicate that the page level of the corresponding page is consistent with the routing level. It should be noted that the relationship between the page level and the routing level of a page in this solution is divided into two cases. In one case, the page level of a page is completely consistent with the routing level, and in another case, the page level of a page may be inconsistent with the routing level. Therefore, in this solution, an indication tag is used to distinguish between these two cases, so that the generated breadcrumb navigation can more accurately reflect the page level relationship.

[0078] Optionally, the routing information of a page has an indication tag, which means that the routing information of the page includes the indication tag. For example, the routing information of a page includes custom parameters, and the custom parameters include the indication tag. Alternatively, the routing information of a page has an indication tag, which means that the routing information of the page corresponds to the indication tag. For example, the source code of a page includes the routing information and the indication tag of the page. The indication tag may be 'node: true', 'root: true' or 'node: 1', etc.

[0079] Step 102: If the target routing information does not have an indication tag, then obtain historical navigation information, where the indication tag is used to indicate that the page level of the corresponding page is consistent with the routing level, and the historical navigation information is used to indicate the breadcrumb navigation of the previous page visited before the current page.

[0080] In the embodiment of the present application, if the target routing information does not have an indication tag, indicating that the page level of the current page may be inconsistent with the routing level, the electronic device obtains historical navigation information to generate a breadcrumb navigation of the current page based on the historical navigation information. The historical navigation information is used to indicate the breadcrumb navigation of the previous page visited before the current page.

[0081] Optionally, the historical navigation information is stored in the electronic device, and the electronic device obtains the historical navigation information from a local storage space. Alternatively, the historical navigation information is stored in a server of a website to which the current page belongs, and the electronic device obtains the historical navigation information from the server.

[0082] In the embodiment of the present application, the historical navigation information includes the routing information of one or more pages, and the routing information of the one or more pages is arranged in descending order according to the page hierarchy. For example, the breadcrumb navigation of the previous page visited before the current page is 'Homepage > Activity Management > Activity List', then the historical navigation information includes the routing information of three pages, and the routing information of these three pages is arranged in the same order as 'Homepage, Activity Management, Activity List'.

[0083] In other embodiments, the routing information of one or more pages in the historical navigation information is arranged in order from low to high page levels. For example, the routing information of the above three pages is arranged in the order consistent with 'activity list, activity management, home page'.

[0084] In some other embodiments, the routing information of each page in the historical navigation information corresponds to a serial number, and the serial number corresponding to the routing information of each page is consistent with the page level of the corresponding page. The routing information of the one or more pages may not be arranged in the order of page level from high to low, nor may it be arranged in the order of page level from low to high, but may be arranged at will. For example, 'Homepage', 'Activity Management' and 'Activity List' correspond to serial numbers '1', '2' and '3' respectively, then the routing information of these three pages may be arranged in the order consistent with 'Homepage, Activity List, Activity Management', or in the order consistent with 'Activity List, Homepage, Activity Management', or in other orders.

[0085] Optionally, the electronic device stores historical navigation information through a 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 arranged in order from high to low according to the page hierarchy, then, taking the breadcrumb navigation of the previous page visited before the current page as 'Home>Activity Management>Activity List' as an example, the first element in the first array is the routing information of the page named 'Home', the second element is the routing information of the page named 'Activity Management', and the third element is the routing information of the page named 'Activity List'.

[0086] Step 103: Generate a breadcrumb navigation of the current page based on the historical navigation information and the target routing information.

[0087] In an embodiment of the present application, when the routing information of the current page does not have an indication tag, the electronic device generates a breadcrumb navigation of the current page based on the historical navigation information and the target routing information.

[0088] It should be noted that in this solution, the historical navigation information obtained by the electronic device may include the target route information or may not include the target route information. Based on this, the electronic device can first determine whether the historical navigation information includes the target route information, so as to process it according to the situation.

[0089] Next, the implementation process of generating breadcrumb navigation by the electronic device when the historical navigation information includes the target route information is introduced.

[0090] If the historical navigation information includes the target route information, the electronic device determines the navigation information of the current page from the historical navigation information, and generates the breadcrumb navigation of the current page based on the navigation information of the current page. In other words, the historical navigation information includes the navigation information of the current page, and the electronic device generates the breadcrumb navigation of the current page according to the navigation information of the current page in the historical navigation information.

[0091] As can be seen from the foregoing, the arrangement of each routing information in the historical navigation information is varied. Based on this, when the historical navigation information includes the target routing information, there are also multiple ways for the electronic device to generate breadcrumb navigation for the current page. Three of these ways will be introduced below.

[0092] In a first implementation, 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 descending order according to the page hierarchy. If the historical navigation information includes target routing information, the electronic device generates a breadcrumb navigation of the current page based on the routing information from the first page to the current page in the historical navigation information. The routing 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 device from the historical navigation information.

[0093] In this implementation, the electronic device generates the page names in the breadcrumb navigation in the same order as the routing information from the first page to the current page in the historical navigation information, so that the page names in the generated breadcrumb navigation are arranged in order from high to low page levels.

[0094] There are multiple ways for the electronic device to generate breadcrumb navigation of the current page based on the routing information from the first page to the current page in the historical navigation information. Three of the ways are described below.

[0095] Method 1.1: The electronic device intercepts the routing information from the first page to the current page in the historical navigation information, and generates a breadcrumb navigation of the current page based on the intercepted routing information.

[0096] For example, assuming that the historical navigation information is stored in the first array, the electronic device intercepts the routing information from the first page in the first array to the current page to obtain the second array. The electronic device generates a breadcrumb navigation of the current page based on the routing information of each page in the second array. The routing information stored in the second array is the navigation information of the current page.

[0097] Mode 1.2: The electronic device deletes the routing information arranged after the routing information of the current page in the historical navigation information to update the historical navigation information. The electronic device generates a 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.

[0098] Mode 1.3: The electronic device directly generates the breadcrumb navigation of the current page according to the routing information from the first page to the current page in the historical navigation information. It should be understood that in Mode 1.3, the electronic device does not generate the breadcrumb navigation of the current page by intercepting or deleting the routing information.

[0099] Optionally, in order to facilitate the subsequent use of historical navigation information to quickly and accurately generate breadcrumb navigation, the electronic device updates the historical navigation information each time it generates a breadcrumb navigation. Based on this, when the electronic device determines that the historical navigation information includes the target routing information, it updates the historical navigation information to the routing information from the first page in the historical navigation information to the current page.

[0100] Exemplarily, when the breadcrumb navigation of the current page is generated according to the above method 1.1, the electronic device updates the historical navigation information to the intercepted routing information. For example, the electronic device assigns the value of the second array to the first array. When the breadcrumb navigation of the current page is generated according to the above method 1.2, the electronic device has updated the historical navigation information in the process of generating the breadcrumbs of the current page. When the breadcrumb navigation of the current page is generated according to the above method 1.3, the electronic device deletes the routing information arranged after the routing information of the current page in the historical navigation information to update the historical navigation information. Alternatively, the electronic device may also intercept the routing information from the first page to the current page in the historical navigation information, and update the historical navigation information to the intercepted routing information.

[0101] Next, a second implementation manner of generating breadcrumb navigation of the current page by the electronic device based on the historical navigation information and the target routing information when the historical navigation information includes the target routing information is introduced.

[0102] In a second implementation, 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 low to high page levels. If the historical navigation information includes target routing information, the electronic device generates a breadcrumb navigation of the current page based on the routing information from the current page to the last page in the historical navigation information. The routing 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 device from the historical navigation information.

[0103] In this implementation, the electronic device generates the page names in the breadcrumb navigation in the reverse order of the routing information from the current page to the last page in the historical navigation information, so that the page names in the generated breadcrumb navigation are arranged in order from high to low page levels.

[0104] There are multiple ways for the electronic device to generate breadcrumb navigation of the current page based on the routing information from the current page to the last page in the historical navigation information. Three of the ways are described below.

[0105] Method 2.1: The electronic device intercepts the routing information from the current page to the last page in the historical navigation information, and generates a breadcrumb navigation of the current page based on the intercepted routing information.

[0106] Exemplarily, assuming that the historical navigation information is stored in the first array, the electronic device intercepts the routing information from the i-th to the last page in the first array to obtain the second array. The electronic device generates a breadcrumb navigation of the current page based on the routing information of each page in the second array. Among them, the i-th page is the current page, and the routing information stored in the second array is the navigation information of the current page.

[0107] Mode 2.2: The electronic device deletes the routing information arranged before the routing information of the current page in the historical navigation information to update the historical navigation information. The electronic device generates a 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.

[0108] Mode 2.3: The electronic device directly generates the breadcrumb navigation of the current page according to the routing information from the current page to the last page in the historical navigation information. It should be understood that in Mode 2.3, the electronic device does not generate the breadcrumb navigation of the current page by intercepting or deleting the routing information.

[0109] Optionally, similar to the first implementation, in the second implementation, the electronic device updates the historical navigation information each time it generates a breadcrumb navigation. Based on this, when the electronic device determines that the historical navigation information includes the target routing information, it updates the historical navigation information to the routing information from the current page to the last page in the historical navigation information.

[0110] Exemplarily, when the breadcrumb navigation of the current page is generated according to the above method 2.1, the electronic device updates the historical navigation information to the intercepted routing information. For example, the electronic device assigns the value of the second array to the first array. When the breadcrumb navigation of the current page is generated according to the above method 2.2, the electronic device has updated the historical navigation information in the process of generating the breadcrumbs of the current page. When the breadcrumb navigation of the current page is generated according to the above method 2.3, the electronic device deletes the routing information in the historical navigation information that is arranged before the routing information of the current page to update the historical navigation information. Alternatively, the electronic device may also intercept the routing information from the first page to the current page to the last page in the historical navigation information, and update the historical navigation information to the intercepted routing information.

[0111] Next, a third implementation manner is introduced in which, when the historical navigation information includes the target routing information, the electronic device generates a breadcrumb navigation of the current page based on the historical navigation information and the target routing information.

[0112] In a third implementation, the historical navigation information includes routing information of one or more pages, and the routing information of each page in the historical navigation information corresponds to a serial number, and 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 includes target routing information, the electronic device determines the target serial number, which is the serial number corresponding to the routing information of the current page, and the electronic device obtains the routing information of the page whose corresponding serial number in the historical navigation information is less than or equal to the target serial number, and generates the breadcrumb navigation of the current page based on the obtained routing information. Among them, the obtained routing information is the navigation information of the current page determined by the electronic device from the historical navigation information.

[0113] In this implementation, the electronic device generates the page names in the breadcrumb navigation in ascending order according to the corresponding serial numbers, so that the page names in the generated breadcrumb navigation are arranged in descending order according to the page level.

[0114] Optionally, similar to the first implementation, in the third implementation, the electronic device updates the historical navigation information each time it generates a breadcrumb navigation. Based on this, when the electronic device determines that the historical navigation information includes the target routing information, it updates the historical navigation information to the routing information of the page whose corresponding sequence number in the historical navigation information is less than or equal to the target sequence number. Exemplarily, after obtaining the routing information of the page whose corresponding sequence number in the historical navigation information is less than or equal to the target sequence number, the electronic device updates the historical navigation information to the obtained routing information.

[0115] The above describes three implementations of generating breadcrumb navigation of the current page based on the historical navigation information and the target routing information when the historical navigation information includes the target routing information. Next, three implementations of generating breadcrumb navigation of the current page based on the historical navigation information and the target routing information when the historical navigation information does not include the target routing information are described.

[0116] In a first implementation, the routing information of one or more pages in the historical navigation information is arranged in descending order of page hierarchy. If the historical navigation information does not include the target routing information, the electronic device splices 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. The electronic device generates a breadcrumb navigation of the current page based on the navigation information of the current page.

[0117] In this implementation, the electronic device generates the page names in the breadcrumb navigation in the same order as the routing information from the first page to the current page in the navigation information of the current page, so that the page names in the generated breadcrumb navigation are arranged in order from high to low according to the page hierarchy.

[0118] In a second implementation, the routing information of one or more pages in the historical navigation information is arranged in order from low to high page levels. If the historical navigation information does not include the target routing information, the electronic device splices the target routing information before the routing information of the first page in the historical navigation information to obtain the navigation information of the current page. The electronic device generates a breadcrumb navigation of the current page based on the navigation information of the current page.

[0119] In this implementation, the electronic device generates the page names in the breadcrumb navigation in the reverse order of the routing information from the current page to the last page in the navigation information of the current page, so that the page names in the generated breadcrumb navigation are arranged in order from high to low according to the page hierarchy.

[0120] In the third implementation, the routing information of each page in the historical navigation information corresponds to a serial number, and 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 does not include the target routing information, the electronic device determines a reference serial number, which is the maximum serial number corresponding to the routing information in the historical navigation information, adds the target routing information to the historical navigation information to update the historical navigation information, and adds 1 to the reference serial number as the serial number corresponding to the target routing information in the historical navigation information. The electronic device generates a breadcrumb navigation of the current page based on the updated historical navigation information. Among them, the updated historical navigation information is the navigation information of the current page.

[0121] In this implementation, the electronic device generates the page names in the breadcrumb navigation in ascending order according to the corresponding serial numbers, so that the page names in the generated breadcrumb navigation are arranged in descending order according to the page level.

[0122] Optionally, the electronic device updates the historical navigation information once each time it generates a breadcrumb navigation. Based on this, when the electronic device determines that the historical navigation information does not include the target route information, it updates the historical navigation information to the navigation information of the current page.

[0123] The above embodiment introduces the implementation process of the electronic device generating breadcrumb navigation of the current page when the target route information does not have an indication tag through steps 102 and 103. Next, the implementation process of the electronic device generating breadcrumb navigation of the current page when the target route information has an indication tag will be introduced.

[0124] In an embodiment of the present application, after determining the target routing information, if the target routing information has an indication tag, the electronic device obtains the routing information of all nodes from the root node to the target node in the routing tree, and generates a breadcrumb navigation of the current page based on the obtained routing information of all nodes. The routing tree is used to describe 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. In short, if the target routing information has an indication tag, the electronic device generates a breadcrumb navigation according to the routing hierarchical relationship.

[0125] Among them, the electronic device obtains the routing information of all nodes from the root node to the target node in the routing tree. One implementation method is: starting from the root node of the routing tree, searching for the routing information of each node step by step downward in a recursive manner until the target routing information is found, and obtaining the routing information of all nodes from the root node to the target node.

[0126] Optionally, the electronic device obtains a target link, which is a link of the current page. The electronic device determines the path labels of all nodes from the root node to the target node from the target link, and obtains the routing information of all nodes from the root node to the target node from the source code of the website in sequence according to the path labels of all nodes from the root node to the target node.

[0127] Exemplarily, 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' respectively. The electronic device first searches for 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 device then searches for the path labels of each child node of the root node from the source code of the root page, searches for the child node with the path label ' / b' from each child node, and obtains the location of the source code of the page corresponding to the child node with the path label ' / b' from the source code of the root node. Based on the location, the electronic device obtains the source code of the page corresponding to the child node with the path label ' / b', searches for the code segment with the path label ' / b' from the source code of the page, and obtains the routing information of the node with the path label ' / b'. And so on, until the electronic device obtains the routing information of the node with the path label ' / c'.

[0128] It should be noted that, in addition to obtaining the routing information of each node in the routing tree by the above method, the electronic device may also obtain the routing information of each node by other methods, which is not limited in the embodiments of the present application.

[0129] Optionally, the electronic device starts from the root node of the routing tree and searches for the routing information of each node step by step in a recursive manner. Each time the electronic device obtains the routing information of a node, it stores the obtained routing information in the third array. Wherein, each time the electronic device obtains the routing information of a node, it inserts the obtained routing information after the last element in the third array, that is, the routing information of each node is stored in sequence in the same order as the order in which the routing information is obtained. Alternatively, each time the electronic device obtains the routing information of a node, it inserts the obtained routing information before the first element in the third array, that is, the routing information of each node is stored in sequence in the opposite order to the order in which the routing information is obtained. Alternatively, each time the electronic device obtains the routing information of a node, it inserts the obtained routing information into the third array randomly.

[0130] In an embodiment of the present application, after obtaining the routing information of all nodes from the root node to the target node in the routing tree, the electronic device stores the routing information of all nodes from the root node to the target node as historical navigation information, so that breadcrumb navigation can be generated based on the historical navigation information later. Exemplarily, when the historical navigation information is stored in the first array and the routing information of each node to be obtained is stored in the third array, the electronic device assigns the value of the third array to the first array after storing the target routing information in the third array.

[0131] It should be noted that in the embodiment of the present application, the present solution can be implemented by a breadcrumb component. For example, when a visitor browses a page in a website, the electronic device renders the breadcrumb navigation of the page by calling the breadcrumb component. Next, the implementation logic of the breadcrumb component will be introduced.

[0132] First, in order to implement the function of the breadcrumb component based on the indication tag, the routing information of each page is defined in the source code of the website, the page name of the corresponding page is defined in the routing information, that is, the name of the corresponding page in the breadcrumb navigation, and whether the routing information of the corresponding page has an indication tag is also defined in the routing information. For example, if 'root: true' is defined in the routing information of a page, it means that the routing information of the page has an indication tag. If 'root: true' is not defined in the routing information of a page, it means that the routing information of the page does not have an indication tag.

[0133] For example, the routing information of a certain page defined in the source code of the page is as follows, indicating that the routing information of the page has an indication tag.

[0134]

[0135] Secondly, a breadcrumb component for generating breadcrumb navigation is defined and encapsulated in the source code of the website. In addition, in order for the electronic device to call the breadcrumb component when a breadcrumb navigation needs to be generated, the breadcrumb component is referenced in the source code of the page where the breadcrumb navigation needs to be generated. For example, assuming that the ' <breadcrumb>< / breadcrumb> ' to represent a reference to a breadcrumb component, the electronic device detects that in the source code of a page' <breadcrumb>< / breadcrumb> 'In this code snippet, the above breadcrumb component is called to generate the breadcrumb navigation for the page.

[0136] The breadcrumb component defines variables required for generating breadcrumb navigation, such as an array breadcrumbs, which is used to store navigation information of the current page to render the breadcrumb navigation. The breadcrumb component also defines a constructor (such as a constructor function) for generating the breadcrumb navigation of the current page according to this solution, that is, rendering the breadcrumb navigation in the current page. Next, the implementation process of generating breadcrumb navigation through the constructor is introduced.

[0137] In the constructor, the route navigation event is listened to. The route navigation event can be an event triggered by a page loading instruction. When the route navigation event is listened to, the link of the current page is passed to a breadcrumb acquisition function (such as a getBreadcrumbs function), so that the routing information of all nodes from the root node to the target node in the routing tree is obtained step by step in a recursive manner through the breadcrumb acquisition function, and the routing information of each node is put into the third array in the order of acquisition.

[0138] After the constructor obtains the third array, the last element in the third array is taken out, which is the routing information of the current page, and it is determined whether the routing information of the current page includes 'root: true'. If the routing information of the current page includes 'root: true', the first array stored locally is deleted, and the first array is used to store historical navigation information. The value of the third array is assigned to the array breadcrumbs in the breadcrumb component. If the routing information of the current page does not include 'root: true', it is determined whether the first array stored locally includes the routing information of the current page. If the first array includes the routing information of the current page, the routing information of the 1st to the i-th pages in the first array is directly intercepted to obtain the second array, and the value of the second array is assigned to the array breadcrumbs in the breadcrumb component, and the i-th page is the current page. If the first array does not include the routing information of the current page, the routing information of the current page is spliced ​​to the last element in the first array, and the value of the spliced ​​first array is assigned to the array breadcrumbs in the breadcrumb component.

[0139] After assigning values ​​to the breadcrumbs array in the breadcrumb component, the breadcrumb component can generate the breadcrumb navigation of the current page based on the routing information in the breadcrumbs array. In addition, the breadcrumb component also stores the breadcrumbs array as the latest historical navigation information locally for the next rendering of the breadcrumb navigation.

[0140] Next, the breadcrumb navigation generated by the present solution is exemplified. In this example, a website includes four pages named "File Management", "File List", "Preview" and "Edit". The routing information of the pages corresponding to "File Management" and "File List" has an indication tag, and the routing information corresponding to "Preview" and "Edit" does not have an indication tag. Assuming that the breadcrumb navigation displayed on the page that the visitor is browsing is "File Management>File List", if at the first moment you jump from the page corresponding to "File List" to the page corresponding to "Preview", the generated breadcrumb navigation is "File Management>File List>Preview". If at the first moment you jump from the page corresponding to "File List" to the page corresponding to "Edit", the generated breadcrumb navigation is "File Management>File List>Edit". If at the second moment you jump from the page corresponding to "Edit" to the page corresponding to "Preview", the generated breadcrumb navigation is "File Management>File List>Edit>Preview".

[0141] In summary, this solution can automatically generate breadcrumb navigation and reduce the disadvantages of manual arrangement, that is, reduce workload, improve efficiency, and be less prone to errors, which is convenient for later maintenance. In addition, in this solution, an indication tag is used to indicate that the page hierarchy of the corresponding page is consistent with the routing hierarchy. If the current page does not have an indication tag, it means that the page hierarchy of the current page may not be consistent with the routing hierarchy, so the breadcrumb navigation of the current page is generated based on the historical navigation information. That is, since the routing hierarchy relationship between pages is strict, but the page hierarchy relationship is not strict, the routing hierarchy relationship and the page hierarchy relationship may not be completely consistent. Therefore, this solution is not limited to generating breadcrumb navigation strictly according to the routing hierarchy relationship of the page, and the generated breadcrumb navigation can more accurately reflect the page hierarchy relationship.

[0142] All the above optional technical solutions can be combined in any way to form optional embodiments of the present application, and the embodiments of the present application will not be described in detail one by one.

[0143] Figure 2 2 is a schematic diagram of a breadcrumb navigation generating device 200 provided in an embodiment of the present application. The breadcrumb navigation generating device can be implemented by software, hardware or a combination of both to form part or all of an electronic device. The electronic device is any electronic device in the above embodiments. Figure 2 The device 200 includes: a determination module 201, a first acquisition module 202 and a generation module 203.

[0144] Determining module 201, used to determine target routing information, where the target routing information is routing information of the current page;

[0145] A first acquisition module 202 is used to acquire historical navigation information if the target routing information does not have an indication tag, the indication tag is used to indicate that the page level of the corresponding page is consistent with the routing level, and the historical navigation information is used to indicate the breadcrumb navigation of the previous page visited before the current page;

[0146] The generation module 203 is used to generate a breadcrumb navigation of the current page based on the historical navigation information and the target routing information.

[0147] 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 descending order of page levels;

[0148] The generation module 203 includes:

[0149] The first generating submodule is used to generate a breadcrumb navigation of the current page based on the routing information from the first page to the current page in the historical navigation information if the historical navigation information includes the target routing information.

[0150] Optionally, the device 200 further includes:

[0151] The first updating module is used to update the historical navigation information to the routing information from the first page in the historical navigation information to the current page.

[0152] 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 descending order of page levels;

[0153] The generation module 203 includes:

[0154] A splicing submodule, 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;

[0155] The second generation submodule is used to generate a breadcrumb navigation of the current page based on the navigation information of the current page.

[0156] Optionally, the device 200 further includes:

[0157] The second updating module is used to update the historical navigation information to the navigation information of the current page.

[0158] Optionally, the device 200 further includes:

[0159] A second acquisition module is used to acquire the routing information of all nodes from the root node to the target node in the routing tree if the target routing information has an indication tag, the routing tree is used to describe 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;

[0160] The second generation module is used to generate a breadcrumb navigation of the current page based on the acquired routing information of all nodes.

[0161] Optionally, the second acquisition module includes:

[0162] The acquisition submodule is used to start from the root node of the routing tree and recursively search for the routing information of each node step by step downward until the target routing information is found, thereby obtaining the routing information of all nodes from the root node to the target node.

[0163] Optionally, the device 200 further includes:

[0164] The storage module is used to store the routing information of all nodes from the root node to the target node in the routing tree as historical navigation information.

[0165] In summary, this solution can automatically generate breadcrumb navigation and reduce the disadvantages of manual arrangement, that is, reduce workload, improve efficiency, and be less prone to errors, which is convenient for later maintenance. In addition, in this solution, an indication tag is used to indicate that the page hierarchy of the corresponding page is consistent with the routing hierarchy. If the current page does not have an indication tag, it means that the page hierarchy of the current page may not be consistent with the routing hierarchy, so the breadcrumb navigation of the current page is generated based on the historical navigation information. That is, since the routing hierarchy relationship between pages is strict, but the page hierarchy relationship is not strict, the routing hierarchy relationship and the page hierarchy relationship may not be completely consistent. Therefore, this solution is not limited to generating breadcrumb navigation strictly according to the routing hierarchy relationship of the page, and the generated breadcrumb navigation can more accurately reflect the page hierarchy relationship.

[0166] It should be noted that: the breadcrumb navigation generation device provided in the above embodiment only uses the division of the above functional modules as an example when generating breadcrumb navigation. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the breadcrumb navigation generation device provided in the above embodiment and the breadcrumb navigation generation method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0167] Figure 3 The block diagram of the structure of an electronic device 300 provided by an exemplary embodiment of the present application is shown. The electronic device 300 may be: a smart phone, a tablet computer, a laptop computer or a desktop computer, etc. The electronic device 300 may also be called a computer device, a terminal device, a user device, a portable electronic device, a laptop electronic device, a desktop electronic device, etc.

[0168] Typically, the electronic device 300 includes a processor 301 and a memory 302 .

[0169] The processor 301 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 301 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 301 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 301 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 301 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0170] The memory 302 may include one or more computer-readable storage media, which may be non-transitory. The memory 302 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 302 is used to store at least one instruction, which is used to be executed by the processor 301 to implement the breadcrumb navigation generation method provided in the method embodiment of the present application.

[0171] In some embodiments, the electronic device 300 may further optionally include: a peripheral device interface 303 and at least one peripheral device. The processor 301, the memory 302 and the peripheral device interface 303 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 303 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 304, a display screen 305, a camera assembly 306, an audio circuit 307, a positioning assembly 308 and a power supply 309.

[0172] The peripheral device interface 303 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 301 and the memory 302. In some embodiments, the processor 301, the memory 302, and the peripheral device interface 303 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 301, the memory 302, and the peripheral device interface 303 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.

[0173] The radio frequency circuit 304 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 304 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 304 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 304 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency circuit 304 can communicate with other electronic devices through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: a metropolitan area network, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 304 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.

[0174] The display screen 305 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 305 is a touch display screen, the display screen 305 also has the ability to collect touch signals on the surface or above the surface of the display screen 305. The touch signal can be input to the processor 301 as a control signal for processing. At this time, the display screen 305 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 305 can be one, set on the front panel of the electronic device 300; in other embodiments, the display screen 305 can be at least two, respectively set on different surfaces of the electronic device 300 or in a folding design; in other embodiments, the display screen 305 can be a flexible display screen, set on the curved surface or folding surface of the electronic device 300. Even, the display screen 305 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 305 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode, organic light-emitting diode).

[0175] The camera assembly 306 is used to capture images or videos. Optionally, the camera assembly 306 includes a front camera and a rear camera. Typically, the front camera is arranged on the front panel of the electronic device, and the rear camera is arranged on the back of the electronic device. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize the panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 306 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.

[0176] The audio circuit 307 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 301 for processing, or input them into the radio frequency circuit 304 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the electronic device 300. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 301 or the radio frequency circuit 304 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 307 may also include a headphone jack.

[0177] The positioning component 308 is used to locate the current geographic location of the electronic device 300 to implement navigation or LBS (Location Based Service). The positioning component 308 can be a positioning component based on the US GPS (Global Positioning System), China's Beidou system, Russia's Grenas system or the European Union's Galileo system.

[0178] The power supply 309 is used to power various components in the electronic device 300. The power supply 309 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 309 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.

[0179] In some embodiments, the electronic device 300 further includes one or more sensors 310 , including but not limited to: an acceleration sensor 311 , a gyroscope sensor 312 , a pressure sensor 313 , a fingerprint sensor 314 , an optical sensor 315 , and a proximity sensor 316 .

[0180] The acceleration sensor 311 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the electronic device 300. For example, the acceleration sensor 311 can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 301 can control the display screen 305 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 311. The acceleration sensor 311 can also be used to collect motion data of games or users.

[0181] The gyro sensor 312 can detect the body direction and rotation angle of the electronic device 300, and the gyro sensor 312 can cooperate with the acceleration sensor 311 to collect the user's 3D actions on the electronic device 300. The processor 301 can implement the following functions based on the data collected by the gyro sensor 312: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.

[0182] The pressure sensor 313 can be set on the side frame of the electronic device 300 and / or the lower layer of the display screen 305. When the pressure sensor 313 is set on the side frame of the electronic device 300, it can detect the user's holding signal of the electronic device 300, and the processor 301 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 313. When the pressure sensor 313 is set on the lower layer of the display screen 305, the processor 301 controls the operability controls on the UI interface according to the user's pressure operation 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.

[0183] The fingerprint sensor 314 is used to collect the user's fingerprint, and the processor 301 identifies the user's identity based on the fingerprint collected by the fingerprint sensor 314, or the fingerprint sensor 314 identifies the user's identity based on the collected fingerprint. When the user's identity is identified as a trusted identity, the processor 301 authorizes the user to perform relevant sensitive operations, which include unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings. The fingerprint sensor 314 can be set on the front, back, or side of the electronic device 300. When a physical button or a manufacturer logo is set on the electronic device 300, the fingerprint sensor 314 can be integrated with the physical button or the manufacturer logo.

[0184] The optical sensor 315 is used to collect the ambient light intensity. In one embodiment, the processor 301 can control the display brightness of the display screen 305 according to the ambient light intensity collected by the optical sensor 315. Specifically, when the ambient light intensity is high, the display brightness of the display screen 305 is increased; when the ambient light intensity is low, the display brightness of the display screen 305 is reduced. In another embodiment, the processor 301 can also dynamically adjust the shooting parameters of the camera assembly 306 according to the ambient light intensity collected by the optical sensor 315.

[0185] The proximity sensor 316, also called a distance sensor, is usually arranged on the front panel of the electronic device 300. The proximity sensor 316 is used to collect the distance between the user and the front of the electronic device 300. In one embodiment, when the proximity sensor 316 detects that the distance between the user and the front of the electronic device 300 is gradually decreasing, the processor 301 controls the display screen 305 to switch from the screen-on state to the screen-off state; when the proximity sensor 316 detects that the distance between the user and the front of the electronic device 300 is gradually increasing, the processor 301 controls the display screen 305 to switch from the screen-off state to the screen-on state.

[0186] Those skilled in the art will understand that Figure 3 The structure shown in the figure does not constitute a limitation on the electronic device 300, and may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.

[0187] In some embodiments, a computer-readable storage medium is further provided, in which a computer program is stored, and when the computer program is executed by a processor, the steps of the method for generating breadcrumb navigation in the above embodiment are implemented. For example, the computer-readable storage medium may be a ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.

[0188] It is worth noting that the computer-readable storage medium mentioned in the embodiments of the present application may be a non-volatile storage medium, in other words, a non-transitory storage medium.

[0189] It should be understood that all or part of the steps to implement the above embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented using software, it can 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 can be stored in the above-mentioned computer readable storage medium.

[0190] That is, in some embodiments, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the steps of the breadcrumb navigation generation method described above.

[0191] It should be understood that the "at least one" mentioned herein refers to one or more, and "multiple" refers to two or more. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second" and the like are used to distinguish the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not limit them to be necessarily different.

[0192] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in the embodiments of this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions. For example, the routing information and source code of the pages involved in the embodiments of this application are all obtained with full authorization.

[0193] The above-mentioned embodiments are provided for the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for generating breadcrumb navigation, characterized in that: The method comprises: Determine target routing information, where the target routing information is routing information of the current page, and the target routing information includes the page name of the current page; If the target routing information does not have an indication tag, then obtaining historical navigation information, the indication tag is used to indicate that the page level of the corresponding page is consistent with the routing level, the historical navigation information is used to indicate the breadcrumb navigation of the previous page visited before the current page, 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 descending order according to the page level; If the historical navigation information includes the target routing information, then based on the routing information from the first page in the historical navigation information to the current page, generate a breadcrumb navigation of the current page; If the historical navigation information does not include the target routing information, the target routing information is spliced ​​to the routing information of the last page in the historical navigation information to obtain the navigation information of the current page, and the breadcrumb navigation of the current page is generated based on the navigation information of the current page.

2. The method according to claim 1, characterized in that In the case where a breadcrumb navigation of the current page is generated based on the routing information from the first page to the current page in the historical navigation information, the method further includes: The historical navigation information is updated to routing information from the first page in the historical navigation information to the current page.

3. The method according to claim 1, characterized in that In the case of generating a breadcrumb navigation of the current page based on the navigation information of the current page, the method further includes: The historical navigation information is updated to the navigation information of the current page.

4. The method according to any one of claims 1 to 3, characterized in that: After determining the target routing information, the method further includes: If the target routing information has the indication tag, then obtain routing information of all nodes from the root node to the target node in the routing tree, the routing tree is used to describe 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; Based on the acquired routing information of all nodes, a breadcrumb navigation of the current page is generated.

5. The method according to claim 4, characterized in that The step of obtaining routing information of all nodes from the root node to the target node in the routing tree includes: Starting from the root node of the routing tree, the routing information of each node is searched downward step by step in a recursive manner until the target routing information is found, thereby obtaining the routing information of all nodes from the root node to the target node.

6. The method according to claim 4 or 5, characterized in that: After obtaining the routing information of all nodes from the root node to the target node in the routing tree, the method further includes: The routing information of all nodes from the root node to the target node is stored as historical navigation information.

7. A breadcrumb navigation generating device, characterized in that: The device comprises: A determination module, used to determine target routing information, wherein the target routing information is routing information of a current page, and the target routing information includes a page name of the current page; A first acquisition module is used to acquire historical navigation information if the target routing information does not have an indication tag, wherein the indication tag is used to indicate that the page level of the corresponding page is consistent with the routing level, and the historical navigation information is used to indicate the breadcrumb navigation of the previous page visited before the current page, and 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 descending order according to the page level; A generation module, used to generate a breadcrumb navigation of the current page based on the historical navigation information and the target routing information; The generation module comprises: A first generating submodule, configured to generate a breadcrumb navigation of the current page based on the routing information from the first page to the current page in the historical navigation information if the historical navigation information includes the target routing information; a splicing submodule, 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; The second generating submodule is used to generate a 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 stores a computer program, and when the computer program is executed by a processor, the steps of any one of the methods of claims 1-6 are implemented.