Data processing method and device

文档序号:1544380 发布日期:2020-01-17 浏览:23次 中文

阅读说明:本技术 数据处理方法和装置 (Data processing method and device ) 是由 柳潜 田彧 王说 于 2019-10-16 设计创作,主要内容包括:本申请实施例公开了数据处理方法和装置。该方法的一具体实施方式包括:获取页面内各个导航栏的标识信息,其中,该标识信息包括导航栏的标识,以及该导航栏中导航栏选项的标识;将各个导航栏的标识信息,添加到该页面的统一资源定位符中。本申请实施例能够将页面内各个导航栏的标识信息,添加到统一资源定位符中,从而在统一资源定位符中细化地体现出页面中存在各个导航栏,这样,搜索引擎等网络爬虫在爬取数据时,可以通过导航栏准确地建立出页面内容的索引,系统地爬取到页面中的数据,从而可以更简明清晰地将爬取的内容以及主干内容呈现给搜索引擎的用户。(The embodiment of the application discloses a data processing method and device. One embodiment of the method comprises: acquiring identification information of each navigation bar in a page, wherein the identification information comprises an identification of the navigation bar and an identification of navigation bar options in the navigation bar; and adding the identification information of each navigation bar into the uniform resource locator of the page. The embodiment of the application can add the identification information of each navigation bar in the page into the uniform resource locator, so that each navigation bar in the page can be represented in a refined manner in the uniform resource locator, and thus, when crawling data, a web crawler such as a search engine can accurately establish an index of the content of the page through the navigation bar, and systematically crawl the data in the page, so that the crawled content and backbone content can be more concisely and clearly presented to a user of the search engine.)

1. A method of data processing, the method comprising:

acquiring identification information of each navigation bar in a page, wherein the identification information comprises an identification of the navigation bar and an identification of navigation bar options in the navigation bar;

and adding the identification information of each navigation bar into the uniform resource locator of the page.

2. The method of claim 1, wherein the adding the identification information of the respective navigation bar to a uniform resource locator of the page comprises:

adding the identification information to a query term of the uniform resource locator.

3. The method according to claim 2, wherein in the identification information of each navigation bar, the identification of a navigation bar option is the identification of a specific navigation bar option in the navigation bar; the identification information comprises a key value pair which takes the identification of the navigation bar as a key and takes the identification of the appointed navigation bar option in the navigation bar as a value.

4. The method of claim 2 or 3, wherein the method further comprises:

updating the current display related data of the navigation bar in the page and the identification information in the uniform resource locator in response to detecting a loading instruction for the navigation bar in the page.

5. The method of claim 4, wherein said updating current display-related data of a navigation bar within the page and said identification information in the uniform resource locator in response to detecting a load instruction to the navigation bar in the page comprises:

in response to detecting a first load instruction to a navigation bar in the page, acquiring the query item of the uniform resource locator, wherein the first load instruction is a start load instruction to an applet or an update load instruction to the navigation bar in the page;

the following display steps are performed:

analyzing the identification information of each navigation bar in the query item to obtain an analysis result;

and in response to determining that the display related data corresponding to the identification information in the analysis result exists in the display related data of the page, taking the corresponding display related data as the current display related data of the navigation bar of the page, wherein the corresponding display related data is the display related data of the navigation bar.

6. The method of claim 5, wherein the first load instruction is an update load instruction to a navigation bar in the page; and

the responding to the detection of the first load instruction to the navigation bar in the page comprises the following steps:

detecting the first loading instruction in response to the uniform resource locator designating the identification change of the navigation bar option;

detecting the first load instruction in response to an increase or decrease in an identification of a navigation bar in the uniform resource locator.

7. The method of claim 5, wherein said retrieving the uniform resource locator in response to detecting a first load instruction to a navigation bar in the page comprises:

in response to detecting a first load instruction on a navigation bar in the page, acquiring the query item of the uniform resource locator at a master control module for a target page set, and transmitting the query item to a slave module for the page in the target page set, wherein the target page set is a set of each page of the applet; and

the displaying step includes:

performing the displaying step at the slave module;

the communication between the master control module and the slave module is asynchronous communication.

8. The method of claim 4, wherein said updating current display-related data of a navigation bar within the page and said identification information in the uniform resource locator in response to detecting a load instruction to the navigation bar in the page comprises:

in response to detecting a second loading instruction of a navigation bar in the page, determining navigation bar option switching information carried by the second loading instruction, wherein the navigation bar option switching information is used for indicating the identifier of the selected navigation bar option;

and updating the identifier of the appointed navigation bar option in the current display related data of the navigation bar of the page and the uniform resource locator into the identifier indicated by the navigation bar option switching information.

9. The method of claim 8, wherein updating the identifier of the specified navigation bar option to the identifier indicated by the navigation bar option switching information in the display related data of the navigation bar of the page and the uniform resource locator comprises:

updating the identifier of the specified navigation bar option in the current display related data of the navigation bar of the page to the identifier indicated by the navigation bar option switching information in a slave module aiming at the page, and transmitting the updated identifier of the navigation bar option in the slave module to a main control module aiming at a target page set, wherein the target page set comprises the page and is a set of all pages of the small program to which the page belongs; and

at the master control module, updating the identifier of the appointed navigation bar option in the uniform resource locator into the updated identifier of the navigation bar option in the slave module;

the communication between the master control module and the slave module is asynchronous communication.

10. The method of claim 9, wherein the method further comprises:

and in response to the navigation bar where the selected navigation bar option is located, the navigation bars with the same identification exist in the page, and in the slave module, the identification of the specified navigation bar option is updated to the identification indicated by the navigation bar option switching information in the current display related data of the navigation bar with the same identification and the uniform resource locator.

11. The method of claim 8, wherein the method further comprises:

and sending the current uniform resource locator and the uniform resource locator before updating to the target terminal equipment.

12. The method of claim 4, wherein said updating current display-related data of a navigation bar within the page and said identification information in the uniform resource locator in response to detecting a load instruction to the navigation bar in the page comprises:

in response to detecting a third loading instruction for a navigation bar in the page, acquiring display state information of a target navigation bar carried by the third loading instruction, wherein the display state information is used for representing whether the target navigation bar is displayed in the page;

performing a first status update step as follows: updating the display state information corresponding to the identifier of the target navigation bar in the current display related data of the navigation bar of the page to the display state information carried by the third loading instruction;

performing a second status update step as follows: and in response to the display state of the target navigation bar being not displayed before updating and being displayed after updating, adding the identifier of the target navigation bar in the uniform resource locator.

13. The method of claim 12, wherein the obtaining display state information of a target navigation bar carried by a third load instruction in response to detecting the third load instruction to the navigation bar in the page comprises:

in response to detecting a third loading instruction for a navigation bar in the page, acquiring display state information of the target navigation bar carried by the third loading instruction by using a main control module for a target page set, and transmitting the display state information in the main control module to a slave module for the page in the target page set, wherein the target page set is a set of all pages of an applet to which the page belongs; and

the first state updating step includes:

performing the first state updating step at the slave module; and

the second state updating step includes:

executing the second state updating step at the main control module;

the communication between the master control module and the slave module is asynchronous communication.

14. A data processing apparatus, the apparatus comprising:

the method comprises the steps of obtaining identification information of each navigation bar in a page, wherein the identification information comprises an identification of the navigation bar and an identification of navigation bar options in the navigation bar;

and the adding unit is configured to add the identification information of each navigation bar into the uniform resource locator of the page.

15. The apparatus of claim 14, wherein the adding unit is further configured to perform adding the identification information of the respective navigation bar to the uniform resource locator of the page as follows:

adding the identification information to a query term of the uniform resource locator.

16. The apparatus according to claim 15, wherein, in the identification information of each navigation bar, the identification of a navigation bar option is the identification of a specified navigation bar option in the navigation bar; the identification information comprises a key value pair which takes the identification of the navigation bar as a key and takes the identification of the appointed navigation bar option in the navigation bar as a value.

17. The apparatus of claim 15 or 16, wherein the apparatus further comprises:

an updating unit configured to update the current display related data of the navigation bar within the page and the identification information in the uniform resource locator in response to detecting a load instruction to the navigation bar in the page.

18. The apparatus of claim 17, wherein the updating unit is further configured to perform updating the current display-related data of the intra-page navigation bar and the identification information in the uniform resource locator in response to detecting a load instruction to the navigation bar in the page as follows:

in response to detecting a first load instruction to a navigation bar in the page, acquiring the query item of the uniform resource locator, wherein the first load instruction is a start load instruction to an applet or an update load instruction to the navigation bar in the page;

the following display steps are performed:

analyzing the identification information of each navigation bar in the query item to obtain an analysis result;

and in response to determining that the display related data corresponding to the identification information in the analysis result exists in the display related data of the page, taking the corresponding display related data as the current display related data of the navigation bar of the page, wherein the corresponding display related data is the display related data of the navigation bar.

19. The apparatus of claim 18, wherein the first load instruction is an update load instruction to a navigation bar in the page; and

the updating unit is further configured to execute the following method in response to detecting the first load instruction to the navigation bar in the page:

detecting the first loading instruction in response to the uniform resource locator designating the identification change of the navigation bar option;

detecting the first load instruction in response to an increase or decrease in an identification of a navigation bar in the uniform resource locator.

20. The apparatus of claim 18, wherein the update unit is further configured to execute the retrieving the uniform resource locator in response to detecting the first load instruction to the navigation bar in the page as follows:

in response to detecting a first load instruction on a navigation bar in the page, acquiring the query item of the uniform resource locator at a master control module for a target page set, and transmitting the query item to a slave module for the page in the target page set, wherein the target page set is a set of each page of the applet; and

the displaying step includes:

performing the displaying step at the slave module;

the communication between the master control module and the slave module is asynchronous communication.

21. The apparatus of claim 17, wherein the updating unit is further configured to perform updating the current display-related data of the intra-page navigation bar and the identification information in the uniform resource locator in response to detecting a load instruction to the navigation bar in the page as follows:

in response to detecting a second loading instruction of a navigation bar in the page, determining navigation bar option switching information carried by the second loading instruction, wherein the navigation bar option switching information is used for indicating the identifier of the selected navigation bar option;

and updating the identifier of the appointed navigation bar option in the current display related data of the navigation bar of the page and the uniform resource locator into the identifier indicated by the navigation bar option switching information.

22. The apparatus of claim 21, wherein the updating unit is further configured to perform updating the identifier of the specified navigation bar option to the identifier indicated by the navigation bar option switching information in the display related data of the navigation bar of the page and the uniform resource locator as follows:

updating the identifier of the specified navigation bar option in the current display related data of the navigation bar of the page to the identifier indicated by the navigation bar option switching information in a slave module aiming at the page, and transmitting the updated identifier of the navigation bar option in the slave module to a main control module aiming at a target page set, wherein the target page set comprises the page and is a set of all pages of the small program to which the page belongs; and

at the master control module, updating the identifier of the appointed navigation bar option in the uniform resource locator into the updated identifier of the navigation bar option in the slave module;

the communication between the master control module and the slave module is asynchronous communication.

23. The method of claim 22, wherein the apparatus further comprises:

and the other updating unit is configured to respond to the navigation bar in which the selected navigation bar option is located, that the navigation bar with the same identification exists in the page, and update the identification of the specified navigation bar option to the identification indicated by the navigation bar option switching information in the current display related data of the navigation bar with the same identification in the slave module.

24. The apparatus of claim 21, wherein the apparatus further comprises:

and the sending unit is configured to send the current uniform resource locator and the uniform resource locator before updating to the target terminal equipment.

25. The apparatus of claim 17, wherein the updating unit is further configured to perform updating the current display-related data of the intra-page navigation bar and the identification information in the uniform resource locator in response to detecting a load instruction to the navigation bar in the page as follows:

in response to detecting a third loading instruction for a navigation bar in the page, acquiring display state information of a target navigation bar carried by the third loading instruction, wherein the display state information is used for representing whether the target navigation bar is displayed in the page;

performing a first status update step as follows: updating the display state information corresponding to the identifier of the target navigation bar in the current display related data of the navigation bar of the page to the display state information carried by the third loading instruction;

performing a second status update step as follows: and in response to the display state of the target navigation bar being not displayed before updating and being displayed after updating, adding the identifier of the target navigation bar in the uniform resource locator.

26. The apparatus of claim 25, wherein the updating unit is further configured to execute, in response to detecting a third load instruction to the navigation bar in the page, acquiring display state information of a target navigation bar carried by the third load instruction, as follows:

in response to detecting a third loading instruction for a navigation bar in the page, acquiring display state information of the target navigation bar carried by the third loading instruction by using a main control module for a target page set, and transmitting the display state information in the main control module to a slave module for the page in the target page set, wherein the target page set is a set of all pages of an applet to which the page belongs; and

the first state updating step includes:

performing the first state updating step at the slave module; and

the second state updating step includes:

executing the second state updating step at the main control module;

the communication between the master control module and the slave module is asynchronous communication.

27. An electronic device, comprising:

one or more processors;

a storage device for storing one or more programs,

when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-13.

28. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the method of any one of claims 1-13.

Technical Field

The embodiment of the application relates to the technical field of computers, in particular to the technical field of internet, and particularly relates to a data processing method and device.

Background

The navigation bar (Tabs) is typically located at the edge of a page in an applet or application, such as the top of the page. In one page, there may be multiple navigation bars so that a user can view multiple kinds of views in the same page.

The navigation bar may include a plurality of navigation bar options (tab-items) that the user may select to cause the displayed view to toggle.

Disclosure of Invention

The embodiment of the application provides a data processing method and device.

In a first aspect, an embodiment of the present application provides a data processing method, including: acquiring identification information of each navigation bar in a page, wherein the identification information comprises an identification of the navigation bar and an identification of navigation bar options in the navigation bar; and adding the identification information of each navigation bar into the uniform resource locator of the page.

In some embodiments, adding the identification information of each navigation bar to a uniform resource locator of the page comprises: the identifying information is added to a query term of the uniform resource locator.

In some embodiments, in the identification information of each navigation bar, the identification of the navigation bar option is the identification of the specified navigation bar option in the navigation bar; the identification information includes key-value pairs that have as a key the identification of the navigation bar and that have as a value the identification of the designated navigation bar option in the navigation bar.

In some embodiments, the method further comprises: in response to detecting a load instruction to the navigation bar in the page, updating current display related data of the navigation bar in the page and identification information in the uniform resource locator.

In some embodiments, in response to detecting a load instruction to a navigation bar in a page, updating current display related data of the navigation bar within the page, and identification information in a uniform resource locator, includes: acquiring a query item of a uniform resource locator in response to detecting a first load instruction to a navigation bar in a page, wherein the first load instruction is a start load instruction to an applet or an update load instruction to the navigation bar in the page; the following display steps are performed: analyzing the identification information of each navigation bar in the query item to obtain an analysis result; and in response to the fact that the display related data corresponding to the identification information in the analysis result exists in the display related data of the page, taking the corresponding display related data as the current display related data of the navigation bar of the page, wherein the corresponding display related data is the display related data of the navigation bar.

In some embodiments, the first load instruction is an update load instruction to a navigation bar in the page; and in response to detecting the first load instruction to the navigation bar in the page, including: responding to the uniform resource locator, and detecting a first loading instruction when the identification of the appointed navigation bar option is changed; a first load instruction is detected in response to an increase or decrease in the identification of the navigation bar in the uniform resource locator.

In some embodiments, in response to detecting a first load instruction to a navigation bar in a page, obtaining a uniform resource locator comprises: in response to detecting a first loading instruction of a navigation bar in a page, acquiring a query item of a uniform resource locator in a main control module aiming at a target page set, and transmitting the query item to a slave module aiming at the page in the target page set, wherein the target page set is a set of each page of the small program; and a display step, comprising: executing the display step at the slave module; the communication between the master control module and the slave module is asynchronous communication.

In some embodiments, in response to detecting a load instruction to a navigation bar in a page, updating current display related data of the navigation bar within the page, and identification information in a uniform resource locator, includes: in response to detecting a second loading instruction for the navigation bar in the page, determining navigation bar option switching information carried by the second loading instruction, wherein the navigation bar option switching information is used for indicating the identifier of the selected navigation bar option; and updating the identifier of the appointed navigation bar option in the current display related data and the uniform resource locator of the navigation bar of the page into the identifier indicated by the navigation bar option switching information.

In some embodiments, updating the identifier of the specified navigation bar option in the display related data and the uniform resource locator of the navigation bar of the page to the identifier indicated by the navigation bar option switching information comprises: in a slave module aiming at a page, updating an identifier of a specified navigation bar option in current display related data of a navigation bar of the page to an identifier indicated by navigation bar option switching information, and transmitting the updated identifier of the navigation bar option in the slave module to a main control module aiming at a target page set, wherein the target page set comprises pages, and the target page set is a set of all pages of an applet to which the pages belong; the main control module updates the identifier of the navigation bar option designated in the uniform resource locator into the identifier of the updated navigation bar option in the slave module; the communication between the master control module and the slave module is asynchronous communication.

In some embodiments, the method further comprises: and in response to the navigation bar where the selected navigation bar option is located, the navigation bars with the same identification exist in the page, and in the slave module, the identification of the appointed navigation bar option is updated to the identification indicated by the navigation bar option switching information in the current display related data and the uniform resource locator of the navigation bar with the same identification.

In some embodiments, the method further comprises: and sending the current uniform resource locator and the uniform resource locator before updating to the target terminal equipment.

In some embodiments, in response to detecting a load instruction to a navigation bar in a page, updating current display related data of the navigation bar within the page, and identification information in a uniform resource locator, includes: responding to the third loading instruction of the navigation bar in the page, and acquiring display state information of the target navigation bar carried by the third loading instruction, wherein the display state information is used for representing whether the target navigation bar is displayed in the page or not; performing a first status update step as follows: updating the display state information corresponding to the identifier of the target navigation bar in the current display related data of the navigation bar of the page into the display state information carried by the third loading instruction; performing a second status update step as follows: and in response to the display state of the target navigation bar being non-display before updating and display after updating, adding the identifier of the target navigation bar in the uniform resource locator.

In some embodiments, in response to detecting a third load instruction to the navigation bar in the page, acquiring display state information of the target navigation bar carried by the third load instruction includes: in response to detecting a third loading instruction for the navigation bar in the page, acquiring display state information of the target navigation bar carried by the third loading instruction by using the main control module aiming at the target page set, and transmitting the display state information in the main control module to a slave module aiming at the page in the target page set, wherein the target page set is a set of each page of the applet to which the page belongs; and a first state updating step including: executing a first state updating step at the slave module; and a second state updating step including: executing a second state updating step on the main control module; the communication between the master control module and the slave module is asynchronous communication.

In a second aspect, an embodiment of the present application provides a data processing apparatus, including: the method comprises the steps of obtaining identification information of each navigation bar in a page, wherein the identification information comprises an identification of the navigation bar and an identification of navigation bar options in the navigation bar; and the adding unit is configured to add the identification information of each navigation bar into the uniform resource locator of the page.

In some embodiments, the adding unit is further configured to add the identification information of each navigation bar to the uniform resource locator of the page as follows: the identifying information is added to a query term of the uniform resource locator.

In some embodiments, in the identification information of each navigation bar, the identification of the navigation bar option is the identification of the specified navigation bar option in the navigation bar; the identification information includes key-value pairs that have as a key the identification of the navigation bar and that have as a value the identification of the designated navigation bar option in the navigation bar.

In some embodiments, the apparatus further comprises: an updating unit configured to update the current display related data of the navigation bar in the page and the identification information in the uniform resource locator in response to detecting a load instruction to the navigation bar in the page.

In some embodiments, the updating unit is further configured to update the current display related data of the navigation bar within the page and the identification information in the uniform resource locator in response to detecting the load instruction to the navigation bar in the page, as follows: acquiring a query item of a uniform resource locator in response to detecting a first load instruction to a navigation bar in a page, wherein the first load instruction is a start load instruction to an applet or an update load instruction to the navigation bar in the page; the following display steps are performed: analyzing the identification information of each navigation bar in the query item to obtain an analysis result; and in response to the fact that the display related data corresponding to the identification information in the analysis result exists in the display related data of the page, taking the corresponding display related data as the current display related data of the navigation bar of the page, wherein the corresponding display related data is the display related data of the navigation bar.

In some embodiments, the first load instruction is an update load instruction to a navigation bar in the page; and an updating unit, further configured to execute the first loading instruction in response to detecting the navigation bar in the page as follows: responding to the uniform resource locator, and detecting a first loading instruction when the identification of the appointed navigation bar option is changed; a first load instruction is detected in response to an increase or decrease in the identification of the navigation bar in the uniform resource locator.

In some embodiments, the update unit is further configured to execute the obtaining of the uniform resource locator in response to detecting the first load instruction to the navigation bar in the page as follows: in response to detecting a first loading instruction of a navigation bar in a page, acquiring a query item of a uniform resource locator in a main control module aiming at a target page set, and transmitting the query item to a slave module aiming at the page in the target page set, wherein the target page set is a set of each page of the small program; and a display step, comprising: executing the display step at the slave module; the communication between the master control module and the slave module is asynchronous communication.

In some embodiments, the updating unit is further configured to update the current display related data of the navigation bar within the page and the identification information in the uniform resource locator in response to detecting the load instruction to the navigation bar in the page, as follows: in response to detecting a second loading instruction for the navigation bar in the page, determining navigation bar option switching information carried by the second loading instruction, wherein the navigation bar option switching information is used for indicating the identifier of the selected navigation bar option; and updating the identifier of the appointed navigation bar option in the current display related data and the uniform resource locator of the navigation bar of the page into the identifier indicated by the navigation bar option switching information.

In some embodiments, the updating unit is further configured to perform updating the identifier of the specified navigation bar option to the identifier indicated by the navigation bar option switching information, in the display related data and the uniform resource locator of the navigation bar of the page, as follows: in a slave module aiming at a page, updating an identifier of a specified navigation bar option in current display related data of a navigation bar of the page to an identifier indicated by navigation bar option switching information, and transmitting the updated identifier of the navigation bar option in the slave module to a main control module aiming at a target page set, wherein the target page set comprises pages, and the target page set is a set of all pages of an applet to which the pages belong; the main control module updates the identifier of the navigation bar option designated in the uniform resource locator into the identifier of the updated navigation bar option in the slave module; the communication between the master control module and the slave module is asynchronous communication.

In some embodiments, the apparatus further comprises: and the other updating unit is configured to respond to the navigation bar in which the selected navigation bar option is positioned, the navigation bar with the same identification exists in the page, and the identification of the specified navigation bar option is updated to the identification indicated by the navigation bar option switching information in the current display related data of the navigation bar with the same identification in the slave module.

In some embodiments, the apparatus further comprises: and the sending unit is configured to send the current uniform resource locator and the uniform resource locator before updating to the target terminal equipment.

In some embodiments, the updating unit is further configured to update the current display related data of the navigation bar within the page and the identification information in the uniform resource locator in response to detecting the load instruction to the navigation bar in the page, as follows: responding to the third loading instruction of the navigation bar in the page, and acquiring display state information of the target navigation bar carried by the third loading instruction, wherein the display state information is used for representing whether the target navigation bar is displayed in the page or not; performing a first status update step as follows: updating the display state information corresponding to the identifier of the target navigation bar in the current display related data of the navigation bar of the page into the display state information carried by the third loading instruction; performing a second status update step as follows: and in response to the display state of the target navigation bar being non-display before updating and display after updating, adding the identifier of the target navigation bar in the uniform resource locator.

In some embodiments, the updating unit is further configured to execute, in response to detecting a third load instruction to the navigation bar in the page, acquiring display state information of the target navigation bar carried by the third load instruction, as follows: in response to detecting a third loading instruction for the navigation bar in the page, acquiring display state information of the target navigation bar carried by the third loading instruction by using the main control module aiming at the target page set, and transmitting the display state information in the main control module to a slave module aiming at the page in the target page set, wherein the target page set is a set of each page of the applet to which the page belongs; and a first state updating step including: executing a first state updating step at the slave module; and a second state updating step including: executing a second state updating step on the main control module; the communication between the master control module and the slave module is asynchronous communication.

In a third aspect, an embodiment of the present application provides an electronic device, including: one or more processors; a storage device for storing one or more programs which, when executed by one or more processors, cause the one or more processors to implement a method as in any embodiment of the data processing method.

In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements a method as in any embodiment of the data processing method.

According to the data processing scheme provided by the embodiment of the application, firstly, the identification information of each navigation bar in the page is obtained, wherein the identification information comprises the identification of the navigation bar and the identification of the navigation bar options in the navigation bar. And then, adding the identification information of each navigation bar into the uniform resource locator of the page. The embodiment of the application can add the identification information of each navigation bar in the page into the uniform resource locator, so that each navigation bar in the page can be represented in a refined manner in the uniform resource locator, and thus, when crawling data, a web crawler such as a search engine can accurately establish an index of the content of the page through the navigation bar, and systematically crawl the data in the page, so that the crawled content and backbone content can be more concisely and clearly presented to a user of the search engine.

Drawings

Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:

FIG. 1 is an exemplary system architecture diagram to which some embodiments of the present application may be applied;

FIG. 2 is a flow diagram of one embodiment of a data processing method according to the present application;

FIG. 3 is a schematic diagram of an application scenario of a data processing method according to the present application;

FIG. 4a is a flow diagram of yet another embodiment of a data processing method according to the present application;

FIG. 4b is a schematic diagram illustrating the communication flow between the master module and the slave module in the embodiment of FIG. 4 a;

FIG. 5 is a schematic block diagram of one embodiment of a data processing apparatus according to the present application;

FIG. 6 is a schematic block diagram of a computer system suitable for use in implementing an electronic device according to some embodiments of the present application.

Detailed Description

The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.

It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.

Fig. 1 shows an exemplary system architecture 100 to which embodiments of the data processing method or data processing apparatus of the present application may be applied.

As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.

The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. Various communication client applications, such as an applet application, a video application, a live application, an instant messaging tool, a mailbox client, social platform software, etc., may be installed on the terminal devices 101, 102, 103.

Here, the terminal apparatuses 101, 102, and 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices having a display screen, including but not limited to smart phones, tablet computers, e-book readers, laptop portable computers, desktop computers, and the like. When the terminal apparatuses 101, 102, 103 are software, they can be installed in the electronic apparatuses listed above. It may be implemented as multiple pieces of software or software modules (e.g., multiple pieces of software or software modules to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.

The server 105 may be a server providing various services, such as a background server providing support for the terminal devices 101, 102, 103. The background server may analyze and perform other processing on the received data such as the identification information of the at least one navigation bar, and feed back a processing result (e.g., the uniform resource locator added with the identification information) to the terminal device.

It should be noted that the data processing method provided in the embodiment of the present application may be executed by the server 105 or the terminal devices 101, 102, and 103, and accordingly, the data processing apparatus may be disposed in the server 105 or the terminal devices 101, 102, and 103.

It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.

With continued reference to FIG. 2, a flow 200 of one embodiment of a data processing method according to the present application is shown. The data processing method comprises the following steps:

step 201, obtaining the identification information of each navigation bar in the page, wherein the identification information includes the identification of the navigation bar and the identification of the navigation bar option in the navigation bar.

In this embodiment, an execution subject of the data processing method (for example, the terminal device shown in fig. 1) may obtain identification information of each navigation bar in at least one navigation bar in the page. The page may be a page presented in an applet, or may be another page such as a web page. In the page, there may be one navigation bar, or there may be more than two navigation bars. The identifier of the navigation bar option in the navigation bar may be an identifier of one or several navigation bar options in the navigation bar, such as an identifier of a specific navigation bar option in the navigation bar, or an identifier of all navigation bar options in the navigation bar.

In practice, each navigation bar in a page has corresponding identification information. In the same page, the identifiers of different navigation bars are usually different, and in the same navigation bar, the identifiers of different navigation bar options may be the same or different.

Step 202, adding the identification information of each navigation bar into the uniform resource locator of the page.

In this embodiment, the execution body may add the identification information of each navigation bar to a Uniform Resource Locator (URL) of the page. The uniform resource locator is generally composed of a transport protocol, a port number, a path, a query term (query), a fragment (fragment), and the like. For each navigation bar presented within a page, the identity of the navigation bar and the identity of the navigation bar options in the navigation bar may be stored in a uniform resource locator, e.g., in a query term, or in a snippet.

In some optional implementation manners of this embodiment, the adding, in step 202 of this embodiment, the identification information of each navigation bar to the uniform resource locator of the page may further include: and adding the identification information of each navigation bar into the query item of the uniform resource locator.

In these alternative implementations, the number of identification information stored here may be the same as or greater than the number of navigation bars presented in the page. In practice, a certain navigation bar is displayed in a page, and if the navigation bar is not displayed in the page after the current display related data of the navigation bar is updated, the identification information corresponding to the navigation bar can still be retained in the uniform resource locator, so that the number of the identification information in the uniform resource locator is greater than the number of the navigation bars presented in the page.

The implementation modes utilize the query item in the uniform resource locator to store the identification information, so that the subsequent use of the identification information is facilitated, and the use of other constituent information of the uniform resource locator is not influenced.

In some optional implementation manners of this embodiment, in the identification information, an identifier of a navigation bar option in each navigation bar is an identifier of a specified navigation bar option in the navigation bar; the identification information includes key-value pairs that have as keys the identifications of the various navigation bars and have as values the identifications of the designated navigation bar options in that navigation bar.

In these alternative implementations, the identifier of the navigation bar option in each navigation bar added to the uniform resource locator may be an identifier of a navigation bar option specified in the navigation bar. The specified navigation bar option may be a default navigation bar option in the uniform resource locator. It is understood that the default content in the uniform resource locator may be set by a developer, or may be obtained from other electronic devices or through other local applets. Generally, when a page of an applet is loaded for the first time or when the applet is turned on again after being turned off, the navigation bar of the page may present the designated navigation bar option. Once the user has switched the navigation bar options in the navigation bar, the specified navigation bar options added to the uniform resource locator as identification information may be updated, thereby adding the navigation bar options currently selected by the user to the identification information.

The execution body may store an identification of a navigation bar in a uniform resource locator (such as a query term) in the form of a key-value pair with an identification of a designated navigation bar option in the navigation bar. A key (key) in a key-value pair is an identification of a navigation bar and a value (value) in a key-value pair is a value in the navigation bar that specifies a navigation bar option. Specifically, the key-value pairs corresponding to the navigation bars in the page may be stored in the query terms of the uniform resource locator of the page.

The navigation bar options in these implementations are specified, so that only the required identifier of the navigation bar option can be saved in the uniform resource locator, and excessive data stored in the uniform resource locator is avoided. Moreover, the implementation modes can adopt key value pairs to store the identification information in the uniform resource locator, thereby ensuring the simplicity, the clarity and the convenience of inquiring the identification information.

With continued reference to fig. 3, fig. 3 is a schematic diagram of an application scenario of the data processing method according to the present embodiment. In the application scenario of fig. 3, a certain page may be presented with three navigation bars: the execution main body 301 can obtain identification information 302 of each navigation bar in the page, namely identification information a-a of the navigation bar 1, identification information B-B of the navigation bar 2, and identification information C-C of the navigation bar 3, and one identification information 302 includes an identification of the navigation bar, such as a, and an identification of a navigation bar option in the navigation bar, such as a. The identification information 302 of each navigation bar is added to the uniform resource locator 303 of the page.

The method provided by the embodiment of the application can add the identification information of each navigation bar in the page into the uniform resource locator, so that each navigation bar in the page is represented in a refined manner in the uniform resource locator, and thus, when crawling data, a web crawler such as a search engine and the like can accurately establish an index of the content of the page through the navigation bar, and systematically crawl the data in the page, so that the crawled content and the backbone content can be more concisely and clearly presented to a user of the search engine.

With further reference to FIG. 4a, a flow 400 of yet another embodiment of a data processing method is shown. The flow 400 of the data processing method includes the following steps:

step 401, obtaining identification information of each navigation bar in a page of the applet, where the identification information includes an identification of the navigation bar and an identification of a navigation bar option in the navigation bar.

In this embodiment, an execution subject of the data processing method (for example, the terminal device shown in fig. 1) may obtain identification information of each navigation bar in at least one navigation bar in the page. The page here may be a page presented in an applet. In the page, there may be one navigation bar, or there may be more than two navigation bars. The identifier of the navigation bar option in each navigation bar may be an identifier of one or several navigation bar options in the navigation bar, or an identifier of all navigation bar options in the navigation bar.

Step 402, adding the identification information of each navigation bar into the uniform resource locator of the page.

In this embodiment, the execution body may add the identification information of each navigation bar to the uniform resource locator of the page. The uniform resource locator is typically composed of transport protocols, port numbers, paths, query terms, fragments, and the like. For each navigation bar presented within a page, the identity of the navigation bar and the identity of the navigation bar options in the navigation bar may be stored in a uniform resource locator, e.g., in a query term, or in a snippet.

Step 403, in response to detecting the loading instruction to the navigation bar in the page, updating the current display related data of the navigation bar in the page and the identification information in the uniform resource locator.

In this embodiment, in response to detecting a load instruction to the navigation bar in the page, the execution main body updates the current display related data of the navigation bar of the page and updates the identification information in the uniform resource locator, thereby implementing information unification between the display related data and the identification information corresponding to the page in the uniform resource locator. The load instruction may instruct the execution subject to load a navigation bar in the page. The loading instruction can be triggered by the user to switch the navigation bar option and generated locally, can be generated locally at regular time, and can be received from other electronic equipment. Specifically, the data related to the current display of the navigation bar of the page refers to, for the navigation bar in the page currently displayed to the user at the front end of the device, various data related to the display of the navigation bar, which may include, for example, identification information of the navigation bar, a code corresponding to the navigation bar, and the like. The execution main body can display the navigation bar in the page in real time to the user by using the current display related data.

Different from the prior art, when the navigation bar in the page is loaded, the path in the uniform resource locator is not required to be called, and the navigation bar in the page is accurately recorded by using the query item. Meanwhile, the timeliness of the navigation bar information in the uniform resource locator can be ensured by unifying the currently displayed related data and the data in the uniform resource locator.

In some optional implementations of this embodiment, step 403 may include:

acquiring a query item of a uniform resource locator in response to detecting a first load instruction to a navigation bar in a page, wherein the first load instruction is a start load instruction to an applet or an update load instruction to the navigation bar in the page; the following display steps are performed: analyzing the identification information of each navigation bar in the query item to obtain an analysis result; and in response to the fact that the display related data corresponding to the identification information in the analysis result exists in the display related data of the page, taking the corresponding display related data as the current display related data of the navigation bar of the page displayed on the electronic equipment, wherein the corresponding display related data is the display related data of the navigation bar.

In these alternative implementations, the execution subject may retrieve the query term for the uniform resource locator in response to detecting a first load instruction to a navigation bar in a page. The first load instruction may be a start load instruction instructing the execution main body to start an applet, or may be an update load instruction instructing the execution main body to update a navigation bar in a page. The launch load instruction may instruct the page including the navigation bar to be locally and firstly loaded, or instruct the navigation bar in the page to be loaded when the applet is launched any time after the initial loading. The update load instruction may indicate that only the navigation bar option of the navigation bar in the page is updated, or may indicate that the navigation bar option of the page is added or reduced, and the navigation bar option of the navigation bar is added or the navigation bar option of the reduced navigation bar is deleted.

After obtaining the query item of the uniform resource locator of the page, the execution main body may analyze the identification information in the query item, thereby obtaining an analysis result. The execution main body may determine whether display-related data corresponding to the identification information in the analysis result exists in the display-related data of the page, and in response to the presence, the execution main body may use the corresponding display-related data as current display-related data of the navigation bar of the page.

The implementation modes can realize accurate control of the display of the navigation bar in the page through the identification information in the uniform resource locator when the applet is started or the navigation bar needs to be updated.

In some optional application scenarios of these implementations, the first load instruction is an update load instruction to a navigation bar in a page; and the above responding to the detection of the first load instruction to the navigation bar in the page may include: responding to the uniform resource locator, and detecting a first loading instruction when the identification of the appointed navigation bar option is changed; a first load instruction is detected in response to an increase or decrease in the identification of the navigation bar in the uniform resource locator.

In these alternative application scenarios, the execution subject may detect the update load instruction when there are various updates to the identification information in the uniform resource locator of the page. For example, in the case where the identification of the uniform resource locator of the page specifying the navigation bar option is changed, or in the case where the identification of the navigation bar of the uniform resource locator of the page is increased or decreased. Accordingly, in the case where the id of the specified navigation bar option in the uniform resource locator is changed, the execution subject performs the displaying step to switch the currently displayed navigation bar option, and in the case where the id of a certain navigation bar is added or subtracted from the uniform resource locator, the execution subject performs the displaying step to add or subtract the currently displayed navigation bar to the page, where the navigation bar added or subtracted from the page is the navigation bar indicated by the added or subtracted id.

The application scenes can determine the number of the currently displayed navigation bars and the navigation bars and navigation bar options displayed by changing the identification information in the uniform resource locator of the page, so that the navigation bars and the navigation bar options are accurately controlled.

In some optional application scenarios of these implementations, in response to detecting a first load instruction to a navigation bar in a page, obtaining a uniform resource locator includes: in response to detecting a first loading instruction of a navigation bar in a page, acquiring a query item of a uniform resource locator in a main control module aiming at a target page set, and transmitting the query item to a slave module aiming at the page in the target page set, wherein the target page set is a set of each page of the small program; and a display step, comprising: executing the display step at the slave module; the communication between the master control module and the slave module is asynchronous communication.

In these alternative application scenarios, there may be two types of modules locally for displaying the above-described applets, namely a Master module (Master) and at least one Slave module (Slave). The execution main body can acquire and process the relevant data of each page of the applet at the main control module, for example, the relevant data here may include display relevant data, audio relevant data, and the like. Each page of the applet herein may refer to each page of all pages of the applet, and the target page set may be a set of the pages of the applet. The slave module can acquire and process the related data of the page in the applet, and different slave modules can correspond to different pages of the applet. In practice, the execution subject may obtain the query term of the uniform resource locator of the page at the master module and transmit the query term to the slave module, so that the slave module executes the displaying step.

In practice, in the case of an increase, decrease or applet initiation of the identification of the navigation bar, the execution agent may trigger an update event in the slave module after the transmission of the query item to the slave module. And receiving the update event at the display module, and executing the update display indicated by the update event. In addition, the execution subject may subscribe to the update event corresponding to the increased navigation bar identifier in the display module, or unsubscribe to the update event corresponding to the decreased navigation bar identifier.

The application scenes can utilize the main control module and the slave module to accurately control the display of the navigation bar in each page in the applet, and the asynchronous communication is carried out between the main control module and the slave module to reduce the resource consumption caused by the frequent message receiving and sending of the synchronous communication.

In some optional implementations of this embodiment, step 403 may include: in response to detecting a second loading instruction for the navigation bar in the page, determining navigation bar option switching information carried by the second loading instruction, wherein the navigation bar option switching information is used for indicating the identifier of the selected navigation bar option; and updating the identifier of the appointed navigation bar option in the current display related data and the uniform resource locator of the navigation bar of the page into the identifier indicated by the navigation bar option switching information.

In these alternative implementations, in response to detecting the second load instruction, the execution main body determines the navigation bar option switching information indicated by the second load instruction, and updates the current display related data and the uniform resource locator of the page based on the information. The second load instruction may be generated by the user switching the navigation bar option at the front end of the device, thereby triggering the execution subject. The second load instruction may carry navigation bar option switching information. And when the user selects a certain navigation bar option, switching the navigation bar option displayed in the page to the selected navigation bar option. Specifically, the navigation bar option switching information also indicates the identifier of the navigation bar where the selected navigation bar option is located, and accordingly, the updated specified navigation bar option is the specified navigation bar option in the navigation bar.

According to the implementation modes, the identification of the navigation bar option designated in the uniform resource locator can be updated under the condition that the user switches the navigation bar option, the identification of the navigation bar option designated in the uniform resource locator is ensured to be the identification of the navigation bar option which is being displayed, the timeliness of data in the uniform resource locator is realized, and therefore the crawler can crawl the data with timeliness. Meanwhile, the behavior of the user on the page can be determined through the uniform resource locator, and the collection and analysis of user behavior data are facilitated.

In some optional application scenarios of these implementations, the updating, in the display-related data of the navigation bar of the page and the uniform resource locator, the identifier that specifies the navigation bar option to the identifier that is indicated by the navigation bar option switching information may include: in a slave module aiming at a page, updating the identifier of a target navigation bar option in the current display related data of a navigation bar of the page into the identifier indicated by the navigation bar option switching information, and transmitting the updated identifier of the navigation bar option in the slave module to a main control module aiming at a target page set, wherein the target page set comprises pages, and the target page set is a set of all pages of an applet to which the pages belong; the main control module updates the identifier of the navigation bar option designated in the uniform resource locator into the identifier of the updated navigation bar option in the slave module; the communication between the master control module and the slave module is asynchronous communication.

In these optional application scenarios, the execution subject may update, in the slave module, the identifier of the specified navigation bar option in the display related data to the identifier indicated by the navigation bar option switching information. Then, the execution subject may update the identifier of the specified navigation bar option in the uniform resource locator to the updated identifier of the navigation bar option in the slave module in the master module.

In practice, after the execution subject updates the current display related data of the navigation bar data center in the slave module, the slave module may trigger an update event, so that the master module subscribed to the update event may receive the update event, thereby updating the identifier of the specified navigation bar option in the uniform resource locator.

As shown in fig. 4b, in the case that three navigation bars are presented on the page corresponding to the slave module, the slave module may include three navigation bar components supporting the navigation bar display. Any one of the three navigation bar components can receive the switching operation of the navigation bar options by the user, thereby generating navigation bar option switching information and synchronizing the navigation bar option switching information to the navigation bar data center of the module. Then, the execution main body can transmit the navigation bar option switching information stored in the navigation bar data center of the slave module to the navigation bar data center of the master module, so that the master module can update the query item of the uniform resource locator.

And after the main control module acquires the query item of the uniform resource locator, the execution main body can store the query item into a navigation bar data center of the main control module and transmit the query item to a navigation bar data center of the slave module from the navigation bar data center. And then the execution main body triggers an update event in a navigation bar data center of the slave module and distributes the update event to a navigation bar component of a navigation bar to be updated by the update event, thereby realizing the updating of the navigation bar in the page.

In the application scenes, under the condition that a user switches navigation bar options, the main control module and the slave module are utilized, user operation data of each page of the applet can be accurately updated into the uniform resource locator, and asynchronous communication is carried out between the main control module and the slave module, so that resource consumption caused by frequent message receiving and sending of synchronous communication is reduced.

In some optional cases of these application scenarios, the method may further include: and in response to the navigation bar where the selected navigation bar option is located, the navigation bars with the same identification exist in the page, and in the slave module, the identification of the appointed navigation bar option is updated to the identification indicated by the navigation bar option switching information in the current display related data and the uniform resource locator of the navigation bar with the same identification.

In these alternative cases, there may be navigation bars identifying the same within the same page of the applet. If the navigation bar option displayed in one navigation bar is switched by the user, the execution main body can determine the navigation bar with the same identifier as the navigation bar where the navigation bar option is located, and update the navigation bar with the same identifier in the page, that is, update the identifier of the specified navigation bar option of the navigation bar with the same identifier in the current display related data and the uniform resource locator.

The updating of the identifiers of the navigation bar options under the conditions can automatically trigger the updating of other navigation bars in the page, so that the navigation bar options displayed by the navigation bars are more in line with the wishes of the user.

In some optional application scenarios of these implementations, the method may further include: and sending the current uniform resource locator and the uniform resource locator before updating to the target terminal equipment.

In these optional application scenarios, the execution subject may send the updated uniform resource locator and the uniform resource locator before updating to the target terminal device. Specifically, the execution main body may be sent at the main control module. In practice, the target terminal device here may be a terminal device used by a developer.

Developers in the application scenes can receive behavior data of the navigation bar option selected by the user, analyze the behavior data, and then adjust the navigation bar displayed in the page in a preset mode according to the analysis result. The preset mode can be to adjust the key value pair in the uniform resource locator, or send information to the main control module to adjust the display state of the navigation bar, and so on.

In some optional implementations of this embodiment, step 403 may include: responding to the third loading instruction of the navigation bar in the page, and acquiring display state information of the target navigation bar carried by the third loading instruction, wherein the display state information is used for representing whether the target navigation bar is displayed in the page or not; performing a first status update step as follows: updating the display state information of the identifier of the target navigation bar in the current display related data of the navigation bar of the page into the display state information carried by the third loading instruction; performing a second status update step as follows: and in response to the display state of the target navigation bar being non-display before updating and display after updating, adding the identifier of the target navigation bar in the uniform resource locator.

In these optional implementation manners, in response to detecting the third load instruction, the execution main body may acquire display state information of the target navigation bar carried by the instruction. The target navigation bar may be one or more of the navigation bars of the page. Then, the execution main body may update the display state information in the current display related data to the display state information carried by the instruction. If the display state of the target navigation bar is changed from non-display to display after updating, the execution subject may add the identifier of the target navigation bar in the uniform resource locator, for example, add a key value pair with the identifier of the target navigation bar as a key and the identifier of the specified navigation bar option as a value, so as to unify the currently displayed related data and the data of the target navigation bar in the uniform resource locator. In addition, if the display state of the target navigation bar is changed from display to non-display after updating, the execution subject may not change the navigation bar identifier in the uniform resource locator, so as to retain the relevant data of the target navigation bar in the uniform resource locator.

Specifically, the display state information may be "true" or "1" indicating that the display state is display, or may be "false" or "0" indicating that the display state is not display. The display state information corresponding to the identifier of the target navigation bar is the display state information labeled to the identifier, and can represent the display state of the target navigation bar.

For example, when the display status information indicates that the display status of the target navigation bar changes, the navigation bar displayed to the user at the front end of the page may change. For example, if the indicated display state is changed from non-display to display, the target navigation bar is added to the page. If the indicated display state is changed from display to non-display, the target navigation bar is reduced in the page.

The realization modes can update the display state in the uniform resource locator under the condition that the display state of the navigation bar is changed, so that the navigation bar information in the uniform resource locator is unified with the current display related data, and the timeliness of the navigation bar information in the uniform resource locator is ensured.

In some optional application scenarios of these implementation manners, the obtaining, in response to detecting a third load instruction to the navigation bar in the page, display state information of the target navigation bar carried by the third load instruction includes: in response to detecting a third loading instruction for the navigation bar in the page, acquiring display state information of the target navigation bar carried by the third loading instruction by using the main control module aiming at the target page set, and transmitting the display state information in the main control module to a slave module aiming at the page in the target page set, wherein the target page set is a set of each page of the applet to which the page belongs; and a first state updating step including: executing a first state updating step at the slave module; and a second state updating step including: executing a second state updating step on the main control module; the communication between the master control module and the slave module is asynchronous communication.

In these optional application scenarios, in response to detecting the third load instruction, the main control module may acquire the display state information carried by the third load instruction. The third load instruction may be obtained by the execution subject at the main control module, for example, may be obtained by the main control module from another electronic device or through another local applet. The master control module may transmit the acquired display state information to the slave module, so that the slave module updates the current display related data. Specifically, after receiving the display state information, the slave module may generate an instruction including the display state information, so that the slave module may update the display state information corresponding to the identifier of the target navigation bar in the current display related data after detecting the instruction.

In the application scenarios, under the condition that the user switches the navigation bar options, the main control device and the slave device are utilized, the acquired information can be accurately updated into the uniform resource locator, and asynchronous communication is performed between the main control module and the slave module, so that resource consumption caused by frequent message receiving and sending of synchronous communication is reduced.

With further reference to fig. 5, as an implementation of the method shown in the above figures, the present application provides an embodiment of a data processing apparatus, which corresponds to the embodiment of the method shown in fig. 2, and which may include the same or corresponding features or effects as the embodiment of the method shown in fig. 2, in addition to the features described below. The device can be applied to various electronic equipment.

As shown in fig. 5, the data processing apparatus 500 of the present embodiment includes: an acquisition unit 501 and an addition unit 502. The acquiring unit 501 is configured to acquire identification information of each navigation bar in a page, where the identification information includes an identification of the navigation bar and an identification of a navigation bar option in the navigation bar; an adding unit 502 configured to add the identification information of each navigation bar to the uniform resource locator of the page.

In some embodiments, the obtaining unit 501 of the data processing apparatus 500 may obtain the identification information of each navigation bar in at least one navigation bar in the page. The page here may be a page presented in an applet. In the page, there may be one navigation bar, or there may be more than two navigation bars. The identifier of the navigation bar option in each navigation bar may be an identifier of one or several navigation bar options in the navigation bar, or an identifier of all navigation bar options in the navigation bar.

In some embodiments, the adding unit 502 may add the identification information of each navigation bar to the uniform resource locator of the page. The uniform resource locator is typically composed of transport protocols, port numbers, paths, query terms, fragments, and the like. For each navigation bar presented within a page, the identity of the navigation bar and the identity of the navigation bar options in the navigation bar may be stored in a uniform resource locator, e.g., in a query term, or in a snippet.

In some optional implementations of the embodiment, the adding unit is further configured to add the identification information of each navigation bar to the uniform resource locator of the page as follows: the identifying information is added to a query term of the uniform resource locator.

In some optional implementation manners of this embodiment, in the identification information of each navigation bar, the identifier of the navigation bar option is an identifier of a specified navigation bar option in the navigation bar; the identification information includes key-value pairs that have as a key the identification of the navigation bar and that have as a value the identification of the designated navigation bar option in the navigation bar.

In some optional implementations of this embodiment, the apparatus further includes: an updating unit configured to update the current display related data of the navigation bar in the page and the identification information in the uniform resource locator in response to detecting a load instruction to the navigation bar in the page.

In some optional implementations of the embodiment, the updating unit is further configured to update the current display-related data of the navigation bar within the page and the identification information in the uniform resource locator in response to detecting the load instruction to the navigation bar in the page, in the following manner: acquiring a query item of a uniform resource locator in response to detecting a first load instruction to a navigation bar in a page, wherein the first load instruction is a start load instruction to an applet or an update load instruction to the navigation bar in the page; the following display steps are performed: analyzing the identification information of each navigation bar in the query item to obtain an analysis result; and in response to the fact that the display related data corresponding to the identification information in the analysis result exists in the display related data of the page, taking the corresponding display related data as the current display related data of the navigation bar of the page, wherein the corresponding display related data is the display related data of the navigation bar.

In some optional implementations of this embodiment, the first load instruction is an update load instruction for a navigation bar in a page; and an updating unit, further configured to execute the first loading instruction in response to detecting the navigation bar in the page as follows: responding to the uniform resource locator, and detecting a first loading instruction when the identification of the appointed navigation bar option is changed; a first load instruction is detected in response to an increase or decrease in the identification of the navigation bar in the uniform resource locator.

In some optional implementations of the embodiment, the updating unit is further configured to execute the obtaining of the uniform resource locator in response to detecting the first load instruction to the navigation bar in the page as follows: in response to detecting a first loading instruction of a navigation bar in a page, acquiring a query item of a uniform resource locator in a main control module aiming at a target page set, and transmitting the query item to a slave module aiming at the page in the target page set, wherein the target page set is a set of each page of the small program; and a display step, comprising: executing the display step at the slave module; the communication between the master control module and the slave module is asynchronous communication.

In some optional implementations of the embodiment, the updating unit is further configured to update the current display-related data of the navigation bar within the page and the identification information in the uniform resource locator in response to detecting the load instruction to the navigation bar in the page, in the following manner: in response to detecting a second loading instruction for the navigation bar in the page, determining navigation bar option switching information carried by the second loading instruction, wherein the navigation bar option switching information is used for indicating the identifier of the selected navigation bar option; and updating the identifier of the appointed navigation bar option in the current display related data and the uniform resource locator of the navigation bar of the page into the identifier indicated by the navigation bar option switching information.

In some optional implementations of this embodiment, the updating unit is further configured to perform updating, in the display-related data and the uniform resource locator of the navigation bar of the page, the identifier specifying the navigation bar option to the identifier indicated by the navigation bar option switching information as follows: in a slave module aiming at a page, updating an identifier of a specified navigation bar option in current display related data of a navigation bar of the page to an identifier indicated by navigation bar option switching information, and transmitting the updated identifier of the navigation bar option in the slave module to a main control module aiming at a target page set, wherein the target page set comprises pages, and the target page set is a set of all pages of an applet to which the pages belong; the main control module updates the identifier of the navigation bar option designated in the uniform resource locator into the identifier of the updated navigation bar option in the slave module; the communication between the master control module and the slave module is asynchronous communication.

In some optional implementations of this embodiment, the apparatus further includes: and the other updating unit is configured to respond to the navigation bar in which the selected navigation bar option is positioned, the navigation bar with the same identification exists in the page, and the identification of the specified navigation bar option is updated to the identification indicated by the navigation bar option switching information in the current display related data of the navigation bar with the same identification in the slave module.

In some optional implementations of this embodiment, the apparatus further includes: and the sending unit is configured to send the current uniform resource locator and the uniform resource locator before updating to the target terminal equipment.

In some optional implementations of the embodiment, the updating unit is further configured to update the current display-related data of the navigation bar within the page and the identification information in the uniform resource locator in response to detecting the load instruction to the navigation bar in the page, in the following manner: responding to the third loading instruction of the navigation bar in the page, and acquiring display state information of the target navigation bar carried by the third loading instruction, wherein the display state information is used for representing whether the target navigation bar is displayed in the page or not; performing a first status update step as follows: updating the display state information corresponding to the identifier of the target navigation bar in the current display related data of the navigation bar of the page into the display state information carried by the third loading instruction; performing a second status update step as follows: and in response to the display state of the target navigation bar being non-display before updating and display after updating, adding the identifier of the target navigation bar in the uniform resource locator.

In some optional implementations of the embodiment, the updating unit is further configured to execute, in response to detecting a third load instruction to the navigation bar in the page, acquiring display state information of the target navigation bar carried by the third load instruction, as follows: in response to detecting a third loading instruction for the navigation bar in the page, acquiring display state information of the target navigation bar carried by the third loading instruction by using the main control module aiming at the target page set, and transmitting the display state information in the main control module to a slave module aiming at the page in the target page set, wherein the target page set is a set of each page of the applet to which the page belongs; and a first state updating step including: executing a first state updating step at the slave module; and a second state updating step including: executing a second state updating step on the main control module; the communication between the master control module and the slave module is asynchronous communication.

As shown in fig. 6, electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.

Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; a storage device 608; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate wirelessly or by wire with other electronic devices to exchange data. While fig. 6 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 6 may represent one device or may represent multiple devices as desired.

In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of embodiments of the present disclosure. It should be noted that the computer readable medium of the embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In embodiments of the present disclosure, however, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.

The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.

The units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes an acquisition unit and an addition unit. Where the names of these elements do not in some cases constitute a limitation on the elements themselves, for example, adding an element may also be described as "adding the identification information of the respective navigation bar to an element in the uniform resource locator of the page".

As another aspect, the present application also provides a computer-readable medium, which may be contained in the apparatus described in the above embodiments; or may be present separately and not assembled into the device. The computer readable medium carries one or more programs which, when executed by the apparatus, cause the apparatus to: acquiring identification information of each navigation bar in a page, wherein the identification information comprises an identification of the navigation bar and an identification of navigation bar options in the navigation bar; and adding the identification information of each navigation bar into the uniform resource locator of the page.

The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

25页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:网页信息的获取方法和计算机存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!