Disclosure of Invention
In view of this, embodiments of the present invention provide a page configuration method, a system, and a client, so as to solve the problems of high modification cost, low modification efficiency, and the like in the modification of the native page of the client at present.
In order to achieve the above purpose, the embodiments of the present invention provide the following technical solutions:
the first aspect of the embodiment of the invention discloses a page configuration method, which is applied to a client and comprises the following steps:
requesting a remote server to acquire a preset page container;
acquiring a sub-page set corresponding to each page container address based on the page container address of each page container, wherein the corresponding relation between each page container address and the sub-page set is established in advance, and each sub-page set comprises a plurality of sub-pages;
and when any page container is opened, displaying the sub-page set corresponding to the page container.
Preferably, the obtaining a sub-page set corresponding to each page container address based on the page container address of each page container includes:
for each of the page containers, determining whether the remote server configures a first set of sub-pages for the page container;
if so, acquiring and caching the first sub-page set based on the page container address of the page container;
if not, determining whether the second sub-page set cached at the previous time exists in the page container;
if the second sub-page set exists, acquiring the second sub-page set based on the page container address of the page container;
and if the address does not exist, acquiring a default sub-page set preset by the sub-page set based on the page container address of the page container.
Preferably, when any one of the page containers is opened, displaying the sub-page set corresponding to the page container includes:
when any page container is opened, rendering the page of the client by using a sub-page set corresponding to the page container, and displaying a navigation bar and default sub-pages preset by the sub-page set, wherein the navigation bar comprises a navigation name and a navigation picture contained in each sub-page in the sub-page set, and the sub-pages at least comprise the navigation name, the navigation picture and a page address;
and switching the currently selected navigation name into the navigation name corresponding to the default sub-page.
Preferably, before the client requests the remote server to acquire the preset page container, the method further includes:
setting a page container address for each page container, and setting a page address for each sub-page;
a default set of subpages is set for each page container, and a default subpage is set for each set of subpages.
Preferably, the setting of the page container address for each page container and the page address for each sub-page includes:
setting a page container address for each page container in advance and setting a sub-page address for each sub-page using a uniform resource locator URL.
A second aspect of the embodiments of the present invention discloses a page configuration system, including:
the first acquisition unit is used for requesting a remote server to acquire a preset page container;
a second obtaining unit, configured to obtain, based on a page container address of each page container, a sub-page set corresponding to each page container address, where a correspondence between each page container address and the sub-page set is pre-established, and each sub-page set includes multiple sub-pages;
and the display unit is used for displaying the sub-page set corresponding to the page container when any page container is opened.
Preferably, the second acquiring unit includes:
a first determining module, configured to determine, for each page container, whether the remote server configures a first sub-page set for the page container, if yes, execute the first obtaining module, and if not, execute the second determining module;
the first obtaining module is configured to obtain and cache the first sub-page set based on a page container address of the page container;
the second determining module is used for determining whether the second sub-page set cached at the previous time exists in the page container, if so, executing the second obtaining module, and if not, executing the third obtaining module;
the second obtaining module is configured to obtain the second sub-page set based on a page container address of the page container;
the third obtaining module is configured to obtain a default sub-page set preset by the sub-page set based on a page container address of the page container.
Preferably, the display unit comprises:
the display module is used for rendering the page of the client by using the sub-page set corresponding to the page container when any page container is opened, and displaying a navigation bar and a default sub-page preset by the sub-page set, wherein the navigation bar comprises a navigation name and a navigation picture contained in each sub-page in the sub-page set, and the sub-page at least comprises the navigation name, the navigation picture and a page address;
and the switching module is used for switching the currently selected navigation name into the navigation name corresponding to the default sub-page.
Preferably, the system further comprises:
the first setting unit is used for setting a page container address for each page container and setting a page address for each sub-page;
and the second setting unit is used for setting a default sub-page set for each page container and setting a default sub-page for each sub-page set.
The third aspect of the embodiment of the present invention discloses a client, which includes the page configuration system disclosed in the second aspect of the embodiment of the present invention.
Based on the above page configuration method, system and client provided by the embodiments of the present invention, the method is: and requesting a remote server to acquire a preset page container. And acquiring a sub-page set corresponding to each page container address based on the page container address of each page container, wherein the corresponding relation between each page container address and the sub-page set is pre-established, and each sub-page set comprises a plurality of sub-pages. And when any page container is opened, showing the sub-page set corresponding to the page container. In the scheme, the page container and the sub-page set are configured in advance, the page container and the sub-page set corresponding to the page container are obtained from the remote server, and when any page container is opened, the sub-page set corresponding to the page container is displayed. When the page of the client is changed, a plurality of complicated work flows such as development, test and release are not needed, the page changing cost is reduced, and the page changing efficiency is improved.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In this application, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
As known from the background art, for the modification of the native page of the client, a plurality of workflows such as development, testing and release are required, and a lot of time, manpower and material resources are required for the development, testing and release. Therefore, the current modification of the native page of the client has the problems of high modification cost, low modification efficiency and the like.
Therefore, embodiments of the present invention provide a page configuration method, a page configuration system, and a client, where a page container and a sub-page set are configured in advance, and a sub-page set corresponding to the page container and the page container is obtained from a remote server, and when any page container is opened, the sub-page set corresponding to the page container is displayed, so as to reduce the page modification cost and improve the page modification efficiency.
It should be noted that specific contents of the page container and the sub-page related in the embodiment of the present invention are described in detail below.
Page container: allowing the client user to switch page containers of page content through navigation.
And (4) sub-page: and carrying any page of the navigation displayed content in the page container.
Each page is a page container or a sub-page, the page container is a page carrying other pages, and the sub-page is a page in the page container. Similarly, the sub-pages in the page container may also be page containers.
Referring to fig. 1, a flowchart of a page configuration method provided by an embodiment of the present invention is shown, where the page configuration method is applied to a client, and includes the following steps:
step S101: and requesting a remote server to acquire a preset page container.
In the process of implementing step S101 specifically, when the client is started, the client requests the remote server to acquire all preset page containers and acquire the corresponding relationship between the page container address of each page container and the sub-page set. And pre-establishing a corresponding relation between each page container address and a sub-page set, wherein each sub-page set comprises a plurality of sub-pages.
It should be noted that a Uniform Resource Locator (URL) is defined in advance for each page container and sub-page, wherein the URL is composed of a schema/protocol (scheme) and a path (path). And aiming at each page container and each sub-page, taking scheme in the URL as the identification of the client, and taking path in the URL as the address identification of the page container and the sub-page. For example, for a YY live client, the URL of the page container is: yymobile:// YY5 LiveIndex/Home. Wherein, "ymbiobile" is a scheme in the URL, that is, the client identifier of the YY live broadcast client, and "// YY5 LiveIndex/Home" is a path in the URL, and is the address identifier of the page container.
Step S102: and acquiring a sub-page set corresponding to each page container address based on the page container address of each page container.
In the process of specifically implementing step S102, as can be seen from the content shown in step S101, when the client is started, all preset page containers are obtained, and the corresponding relationship between the page container address of each page container and the sub-page set is obtained. Therefore, based on the page container address of each page container, the sub-page set corresponding to each page container address is obtained.
It should be noted that the sub-page set is obtained by combining the paths corresponding to the sub-pages forming the sub-page set, and each sub-page at least includes: the page address of the sub-page, the navigation name of the sub-page and the navigation picture.
Step S103: and when any page container is opened, displaying the sub-page set corresponding to the page container.
In the process of specifically implementing step S103, when any one of the page containers is opened, the page of the client is rendered by using the sub-page set corresponding to the page container, the navigation bar and the default sub-page preset in the sub-page set are displayed, and the currently selected navigation name is switched to the navigation name corresponding to the default sub-page. The navigation bar comprises a navigation name and a navigation picture contained in each sub-page in the sub-page set, and the sub-pages at least comprise the navigation name, the navigation picture and a page address.
Preferably, a page container address is set for each page container and a page address is set for each sub-page before performing steps S101 to S103. And setting a default sub-page set for each page container, and setting a default sub-page for each sub-page set.
To better explain the specific contents of the page container referred to above and the settings of the default sub-pages, the following is illustrated by means of fig. 2a and 2 b.
Referring to the content of fig. 2a, an architectural diagram of a page container is shown, in fig. 2a, the page container shows a navigation bar and default sub-pages preset by a sub-page set. In the navigation bar, the navigation names corresponding to each sub-page in the sub-page set are respectively: "live zoom", "bright spot", "focus", "play with" and "personal hub" four navigation names and navigation pictures. And the displayed navigation name corresponding to the default sub-page is ' live broadcast, so that the currently selected navigation name is switched to ' live broadcast '.
Referring to fig. 2b, a schematic diagram of setting a default sub-page according to an embodiment of the present invention is shown, in fig. 2b, the rank of each sub-page in the sub-page set is preset, and the default sub-page is set.
It should be noted that the contents shown in fig. 2a and fig. 2b are only used for illustration, and the specific contents of the specific page container and the setting of the default sub-page are not specifically limited in the embodiment of the present invention.
In the embodiment of the invention, the page container and the sub-page set are configured in advance, the page container and the sub-page set corresponding to the page container are obtained from the remote server, and when any page container is opened, the sub-page set corresponding to the page container is displayed. When the page of the client is changed, a plurality of complicated work flows such as development, test and release are not needed, the page changing cost is reduced, and the page changing efficiency is improved.
Referring to fig. 3, the process of acquiring a sub-page set corresponding to each page container address in step S102 in fig. 1 shows a flowchart for acquiring a sub-page set according to an embodiment of the present invention, which includes the following steps:
step S301: for each of the page containers, determining whether the remote server configures a first set of sub-pages for the page container. If yes, go to step S302, otherwise go to step S303.
In the process of implementing step S301 specifically, after the client acquires all preset page containers from the remote server at the time of starting, for each page container, it is determined whether the remote server configures a first sub-page set for the page container.
It should be noted that, as can be seen from the above description in fig. 1, a default sub-page set is set in advance for each page container. However, technicians can configure the corresponding sub-page sets for the page container in real time through the remote server according to actual requirements.
Step S302: and acquiring and caching the first sub-page set based on the page container address of the page container.
In the specific implementation step S302, for each page container, if the remote service configures the first sub-page set for the page container, the first sub-page set is obtained based on the page container address of the page container, and the default sub-page set of the page container is replaced with the first sub-page set. And caching the first sub-page set for the next time when the client is started.
It should be noted that, when the remote server configures the first sub-page set for the page container, the remote server simultaneously establishes a corresponding relationship between the page container address of the page container and the first sub-page set.
Step S303: determining whether the page container has a second set of sub-pages cached previously. If yes, step S304 is executed, and if not, step S305 is executed.
In the process of implementing step S303 specifically, as can be seen from the content shown in step S302, after the remote server configures the first sub-page set for the page container, the default sub-page set of the page container is replaced with the first sub-page set, and the first sub-page set is cached. Therefore, at the current time, when the page container does not have the first set of sub-pages configured by the remote server, it needs to be determined whether the page container has the second set of sub-pages cached at the previous time. That is, in step S303, the second set of sub-pages is the first set of sub-pages configured and cached for the page container by the remote server at the previous time.
It should be noted that the default sub-page set, the first sub-page set configured for the page container by the remote server, and the cached second sub-page set have a priority relationship. The priority of the sub-page set of the page container is ordered from high to low as: a first set of subpages, a second set of subpages, and a default set of subpages. That is, when the page container has a first set of sub-pages configured by the remote server, the first set of sub-pages is preferentially acquired. And when the first sub-page set does not exist in the page container, acquiring a second sub-page set cached last time. And when the first sub-page set and the second sub-page set do not exist in the page container, acquiring a default sub-page set preset by the page container.
Step S304: and acquiring the second sub-page set based on the page container address of the page container.
Step S305: and acquiring a default sub-page set preset by the sub-page set based on the page container address of the page container.
In the embodiment of the invention, after the page container is obtained from the remote server, for each page container, whether the remote server configures the first sub-page set for the page container is determined, and if so, the first sub-page set is obtained and displayed. If not, determining whether the second sub-page set cached last time exists in the page container, and if so, acquiring and displaying the second sub-page set. And if not, acquiring and displaying a default sub-page set preset by the page container. When the page of the client is changed, a plurality of complicated work flows such as development, test and release are not needed, the page changing cost is reduced, and the page changing efficiency is improved.
Corresponding to the page configuration method disclosed in the embodiment of the present invention, referring to fig. 4, an embodiment of the present invention further provides a structural block diagram of a page configuration system, where the system includes: a first acquisition unit 401, a second acquisition unit 402 and a presentation unit 403.
A first obtaining unit 401, configured to request a remote server to obtain a preset page container. The setting process of the page container and the sub-page is referred to the corresponding content in step S101 disclosed in fig. 1 of the embodiment of the present invention.
A second obtaining unit 402, configured to obtain, based on a page container address of each page container, a sub-page set corresponding to each page container address, where a corresponding relationship between each page container address and the sub-page set is pre-established, and each sub-page set includes multiple sub-pages. For a specific process of acquiring the sub-page set, reference is made to corresponding contents in step S102 disclosed in fig. 1 in the above embodiment of the present invention.
The displaying unit 403 is configured to display a sub-page set corresponding to the page container when any page container is opened.
In the embodiment of the invention, the page container and the sub-page set are configured in advance, the page container and the sub-page set corresponding to the page container are obtained from the remote server, and when any page container is opened, the sub-page set corresponding to the page container is displayed. When the page of the client is changed, a plurality of complicated work flows such as development, test and release are not needed, the page changing cost is reduced, and the page changing efficiency is improved.
Preferably, referring to fig. 5 in combination with fig. 4, a block diagram of a structure of a page configuration system provided in an embodiment of the present invention is shown, where the second obtaining unit 402 includes: a first determination module 4021, a first acquisition module 4022, a second determination module 4023, a second acquisition module 4024, and a third acquisition module 4025.
A first determining module 4021, configured to determine, for each page container, whether the remote server configures a first sub-page set for the page container, if yes, execute a first obtaining module 4022, and if no, execute a second determining module 4023.
The first obtaining module 4022 is configured to obtain and cache the first sub-page set based on the page container address of the page container. The process of obtaining and caching the first sub-page set refers to the corresponding content in step S302 disclosed in fig. 3 of the above embodiment of the present invention.
The second determining module 4023 is configured to determine whether the page container has a second sub-page set cached in the previous time, if so, execute the second obtaining module 4024, and if not, execute the third obtaining module 4025. The process of determining the second sub-page set is referred to the corresponding content in step S303 disclosed in fig. 3 of the above embodiment of the present invention.
The second obtaining module 4024 is configured to obtain the second sub-page set based on the page container address of the page container.
The third obtaining module 4025 is configured to obtain a default sub-page set preset by the sub-page set based on the page container address of the page container.
In the embodiment of the invention, after the page container is obtained from the remote server, for each page container, whether the remote server configures the first sub-page set for the page container is determined, and if so, the first sub-page set is obtained and displayed. If not, determining whether the second sub-page set cached last time exists in the page container, and if so, acquiring and displaying the second sub-page set. And if not, acquiring and displaying a default sub-page set preset by the page container. When the page of the client is changed, a plurality of complicated work flows such as development, test and release are not needed, the page changing cost is reduced, and the page changing efficiency is improved.
Preferably, referring to fig. 6 in combination with fig. 4, a block diagram of a page configuration system provided in an embodiment of the present invention is shown, where the presentation unit 403 includes:
a displaying module 4031, configured to, when any one of the page containers is opened, render a page of the client by using a sub-page set corresponding to the page container, and display a navigation bar and a default sub-page preset in the sub-page set, where the navigation bar includes a navigation name and a navigation picture included in each sub-page in the sub-page set, and the sub-page at least includes the navigation name, the navigation picture, and a page address.
A switching module 4032, configured to switch the currently selected navigation name to the navigation name corresponding to the default sub-page.
In the embodiment of the invention, when the page container is opened, the sub-page set obtained according to the page container address of the page container is used for rendering the page of the client, the navigation bar and the default sub-page preset by the sub-page set are displayed, the currently selected navigation name is switched to the navigation name corresponding to the default sub-page, and the page change of the client is completed. And a plurality of working flows such as complicated development, test, release and the like are not needed, so that the page changing cost is reduced and the page changing efficiency is improved.
Preferably, referring to fig. 7 in conjunction with fig. 4, a block diagram of a page configuration system provided in an embodiment of the present invention is shown, where the system further includes: a first setting unit 404 and a second setting unit 405.
A first setting unit 404, configured to set a page container address for each page container, and set a page address for each sub-page.
In a specific implementation, the first setting unit 404 is specifically configured to: setting a page container address for each page container in advance and setting a sub-page address for each sub-page using a uniform resource locator URL.
A second setting unit 405, configured to set a default sub-page set for each page container, and set a default sub-page for each sub-page set.
In the embodiment of the invention, the default sub-page is set for each sub-page set by setting corresponding addresses for each page container and sub-page in advance and setting the default sub-page set for each page container. When the page container is opened, the sub-page set obtained according to the page container address of the page container is used for rendering the page of the client, the navigation bar and the default sub-page preset by the sub-page set are displayed, the currently selected navigation name is switched to the navigation name corresponding to the default sub-page, and the page change of the client is completed. And a plurality of working flows such as complicated development, test, release and the like are not needed, so that the page changing cost is reduced and the page changing efficiency is improved.
Preferably, an embodiment of the present invention further provides a client, which includes the page configuration system disclosed in fig. 4 to fig. 7 in the foregoing embodiment of the present invention.
In summary, embodiments of the present invention provide a page configuration method, system and client, where the method includes: and requesting a remote server to acquire a preset page container. And acquiring a sub-page set corresponding to each page container address based on the page container address of each page container, wherein the corresponding relation between each page container address and the sub-page set is pre-established, and each sub-page set comprises a plurality of sub-pages. And when any page container is opened, showing the sub-page set corresponding to the page container. In the scheme, the page container and the sub-page set are configured in advance, the page container and the sub-page set corresponding to the page container are obtained from the remote server, and when any page container is opened, the sub-page set corresponding to the page container is displayed. When the page of the client is changed, a plurality of complicated work flows such as development, test and release are not needed, the page changing cost is reduced, and the page changing efficiency is improved.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the system or system embodiments are substantially similar to the method embodiments and therefore are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for related points. The above-described system and system embodiments are only illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.