Webpage configuration method and device, terminal equipment and readable storage medium

By separating page configuration methods into general and special strategies, the problem of poor reusability of construction logic in mobile page development is solved, achieving flexible page configuration and simplified strategy management.

CN114090060BActive Publication Date: 2025-12-16BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111229052.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-21
Publication Date
2025-12-16
Estimated Expiration
2041-10-21

AI Technical Summary

Technical Problem

In mobile page development, the existing technology has poor reusability of the construction logic of page elements, which leads to the coupling of business code and non-business code, making it difficult to flexibly respond to changes in application scenarios.

Method used

The page configuration method is separated into general strategies and special strategies. The webpage is configured using pre-stored general strategies and/or special strategies, a second webpage is generated, and it is sent to the webpage display terminal, thereby realizing on-demand configuration and decoupling of strategies.

Benefits of technology

It enhances the flexibility of page configuration, reduces the coupling when strategies are used in combination, simplifies the difficulty of strategy maintenance, and improves the clarity and flexibility of page structure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114090060B_ABST
    Figure CN114090060B_ABST
Patent Text Reader

Abstract

The application provides a webpage configuration method and device, terminal equipment and readable storage medium. The method comprises the following steps: obtaining a first webpage to be configured; performing policy configuration on the first webpage by using a pre-stored general policy and / or special policy, obtaining a second webpage, wherein the general policy is a policy with a frequency of use in webpage editing higher than a preset frequency, and the special policy is a policy with a frequency of use in webpage editing not higher than the preset frequency; and sending the second webpage to a webpage display end according to the policy configured in the second webpage. The method separates the webpage to be configured from various policies, obtains the general policy with strong multiplexing and the special policy with poor multiplexing, and pre-stores them in a webpage configuration system, so that a user can select the required general policy and / or special policy according to actual needs, and the flexibility of page configuration is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, in particular to a webpage configuration method and device, a terminal equipment and a readable storage medium. BACKGROUND

[0002] In the current mobile terminal page development, each element (for example, button, paragraph, picture, table, etc.) in the page will have different construction logic according to different business requirements, and these construction logics often correspond to a specific construction class or construction method in the backend service. Since each class or construction method has a clear business attribute, when the business does not change but only the application scenario changes, the non-business code that adapts to the change of the application scenario is often coupled with the business code in the related art to carry out secondary development of the business code, so that the reusability of the original reusable business construction logic gradually deteriorates. Therefore, how to avoid the phenomenon of poor construction logic reusability in the page development in the related art has become a problem to be solved. SUMMARY

[0003] The purpose of the embodiments of the present application is to provide a webpage configuration method and device, a terminal equipment and a readable storage medium, which separate the strategy with high reusability from the strategy with low reusability, so that users can select the required strategy according to the actual demand, and the flexibility of page configuration is enhanced. The specific technical solutions are as follows:

[0004] In the first aspect of the embodiments of the present application, a webpage configuration method is first provided, and the method comprises:

[0005] obtaining a first webpage to be configured;

[0006] configuring the first webpage by using a pre-stored general strategy and / or a special strategy to obtain a second webpage, the general strategy being a strategy with a use frequency higher than a preset frequency in webpage editing, and the special strategy being a strategy with a use frequency not higher than the preset frequency in webpage editing;

[0007] sending the second webpage to a webpage display end according to the strategy configured in the second webpage.

[0008] Optionally, the step of configuring the first webpage by using the pre-stored general strategy and / or the special strategy to obtain the second webpage comprises:

[0009] determining an object to be configured strategy in the first webpage, the object being part of webpage elements in the first webpage or the first webpage;

[0010] determining the object to be configured strategy from the pre-stored general strategy and / or the special strategy according to a selection operation of a user;

[0011] adding the to-be-configured policy to the object.

[0012] Optionally, sending the second web page to a web page display end according to the policy configured in the second web page comprises:

[0013] obtaining a policy instance corresponding to the policy configured in the second web page;

[0014] running the policy instance, and sending the second web page after running to a web page display end.

[0015] Optionally, the to-be-configured policy comprises a policy fully qualified name, a client version number, a client type and an effective condition.

[0016] obtaining a policy instance corresponding to the policy configured in the second web page comprises:

[0017] verifying the client version number and the client type in the configured policy;

[0018] when the verification is passed, obtaining a policy instance matching the policy fully qualified name from a plurality of policy instances pre-cached;

[0019] running the policy instance, and sending the second web page after running to a web page display end comprises:

[0020] when the effective condition is met, running the policy instance, and sending the second web page after running to a web page display end.

[0021] Optionally, obtaining a first web page of a to-be-configured policy comprises:

[0022] creating a blank web page, adding at least one web page element on the blank web page, editing the web page element, and obtaining the first web page; or

[0023] obtaining the first web page of the to-be-configured policy according to a selection operation of a user from a plurality of web page templates pre-cached.

[0024] Optionally, determining a to-be-configured policy of an object according to a selection operation of a user from a plurality of general policies and / or special policies pre-stored comprises:

[0025] obtaining a general policy from a first storage area; and / or

[0026] obtaining a special policy from a second storage area, the second storage area being different from the first storage area.

[0027] In a second aspect of the embodiments of the present application, a web page configuration device is further provided, and the device comprises:

[0028] The first obtaining module is configured to obtain a first web page of a policy to be configured;

[0029] The second obtaining module is configured to perform policy configuration on the first web page by using a pre-stored general policy and / or a special policy, and obtain a second web page, wherein the general policy is a policy with a usage frequency higher than a preset frequency in web page editing, and the special policy is a policy with a usage frequency not higher than the preset frequency in web page editing;

[0030] The sending module is configured to send the second web page to a web page display end according to the policy configured in the second web page.

[0031] Optionally, the second obtaining module comprises:

[0032] The first determining submodule is configured to determine an object of the policy to be configured in the first web page, wherein the object is a part of a web page element in the first web page or the first web page;

[0033] The second determining submodule is configured to determine the policy to be configured for the object from the pre-stored general policy and / or the special policy according to a selection operation of a user;

[0034] The adding submodule is configured to add the policy to be configured for the object.

[0035] Optionally, the sending module comprises:

[0036] The first obtaining submodule is configured to obtain a policy instance corresponding to the policy configured in the second web page;

[0037] The first sending submodule is configured to run the policy instance and send the second web page after running to a web page display end.

[0038] Optionally, the policy to be configured comprises a policy fully qualified name, a client version number, a client type and an effective condition; and the first obtaining submodule comprises:

[0039] The verifying submodule is configured to verify the client version number and the client type in the configured policy;

[0040] The second obtaining submodule is configured to obtain a policy instance matching the policy fully qualified name from a plurality of pre-cached policy instances when the verification is passed;

[0041] The first sending submodule comprises:

[0042] The second sending submodule is configured to run the policy instance and send the second web page after running to a web page display end when the effective condition is met.

[0043] Optionally, the first obtaining module comprises:

[0044] a third obtaining sub-module, configured to create a blank webpage, add at least one webpage element on the blank webpage, edit the webpage element, and obtain the first webpage; or

[0045] a fourth obtaining sub-module, configured to obtain the first webpage to be configured with the policy according to a selection operation of the user from a webpage template pre-cached.

[0046] Optionally, the second obtaining module comprises:

[0047] a fifth obtaining sub-module, configured to obtain a general policy from a first storage area; and / or

[0048] a sixth obtaining sub-module, configured to obtain a special policy from a second storage area, which is different from the first storage area.

[0049] In a third aspect of the embodiments of the present application, a terminal device is further provided, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus;

[0050] the memory is configured to store a computer program;

[0051] the processor is configured to execute the program stored on the memory, and implement the steps in the webpage configuration method of the first aspect of the embodiments of the present application.

[0052] In yet another aspect of the embodiments of the present application, a computer readable storage medium is further provided, which stores instructions, and when the instructions are run on a computer, the computer executes the steps in any of the webpage configuration methods.

[0053] In yet another aspect of the embodiments of the present application, a computer program product comprising instructions is further provided, and when the instructions are run on a computer, the computer executes any of the webpage configuration methods.

[0054] The webpage configuration method provided by the embodiments of the present application first obtains a first webpage to be configured with a policy, then configures the first webpage with a general policy and / or a special policy pre-stored, obtains a second webpage, the general policy is a policy used in webpage editing with a frequency higher than a preset frequency, the special policy is a policy used in webpage editing with a frequency not higher than the preset frequency, and finally sends the second webpage to a webpage display end according to the policy configured in the second webpage. The method has the following effects:

[0055] In the application, the general strategy and the special strategy are stored in the webpage configuration system in advance, so that the user can select various strategies according to actual needs and configure them into the first webpage, thereby enhancing the flexibility of page configuration.

[0056] In the application, the page is generated in a configuration manner, so that some unnecessary strategies can be avoided in the page configuration, the page structure is more clear, and compared with the mixed use of various strategies in the related art, the coupling when the various strategies are mixed is reduced.

[0057] In the application, the general strategy and the special strategy are separately stored in the webpage configuration system, thereby reducing the maintenance difficulty of various strategies. DETAILED DESCRIPTION

[0058] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description.

[0059] Figure 1 is a structural schematic diagram of a webpage configuration system according to an embodiment of the present application;

[0060] Figure 2 is a page structure schematic diagram according to an embodiment of the present application;

[0061] Figure 3 is another page structure schematic diagram according to an embodiment of the present application;

[0062] Figure 4 is a flowchart of a webpage configuration method according to an embodiment of the present application;

[0063] Figure 5 is a code schematic diagram of a strategy according to an embodiment of the present application;

[0064] Figure 6 is a webpage configuration process schematic diagram according to an embodiment of the present application;

[0065] Figure 7 is a structural block diagram of a webpage configuration device according to an embodiment of the present application;

[0066] Figure 8 is a structural schematic diagram of a terminal device according to an embodiment of the present application. DETAILED DESCRIPTION

[0067] The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.

[0068] To solve the problems in the related art, the present application provides a webpage configuration method, applied to a webpage configuration system, which is deployed in a backend server. Before the webpage configuration method of the present application is described in detail, the webpage configuration system is first introduced as follows.

[0069] Figure 1 is a structural schematic diagram of a webpage configuration system according to an embodiment of the present application. In Figure 1 the webpage configuration system includes a general policy storage module, a special policy storage module, a policy analysis module, and a template configuration module.

[0070] In the embodiment, the general policy storage module is used to store general policies, and the general policies are isolated from each other and do not affect each other when stored. The special policy storage module is used to store special policies, and the special policies are isolated from each other when stored.

[0071] In webpage development, each element (such as a button, text, or picture) in a page will have different construction logics according to different business requirements, and these construction logics often correspond to a specific construction class or construction method of a backend service. For example, in business A, picture X needs to be located at a coordinate (x1, y1) in the page with a transparency of 100%, while in business B, picture X needs to be located at a coordinate (x2, y2) in the page with a transparency of 70%. The coordinates and transparency of picture X belong to the construction logic of picture X. The construction logic of picture X in business A is different from the construction logic of picture X in business B. Business code refers to the code corresponding to each business, and since a business can involve one or more elements, the business code contains the construction logic of one or more elements.

[0072] In the embodiment, a policy can be understood as the construction logic of an element in a page. Under different business requirements, the construction logic of an element is generally different. For example, in business A, pictures in the page need to be set to pictures related to product X, while in business B, pictures in the page need to be set to pictures related to product Y. The construction logic corresponding to setting pictures to pictures related to product X is obviously different from the construction logic corresponding to setting pictures to pictures related to product Y.

[0073] The construction logic can be divided into two categories, one of which is used more frequently and can be used in many business scenarios, that is, has better reusability, and is referred to as a general construction logic (general strategy), for example, what kind of content should be placed on a paragraph, what kind of click function should be set on a button, and the like, and is a code with strong reusability in design. The other category is used less frequently and is used only in a small number of scenarios, that is, has poor reusability, and is referred to as a special construction logic (special strategy). The special strategy is a variety of personalized strategies, and the special strategy needs to implement a unified interface, and a developer needs to implement different methods of the interface according to a specific scenario.

[0074] The embodiment does not specifically limit the business scenario, for example, can be that a button text dynamically changes, a style adapts to different screen resolutions and changes, and an element at the same page position is replaced by another element.

[0075] In a specific implementation, whether a strategy is a general strategy or a special strategy can be distinguished according to a frequency of use. If a frequency of use of a strategy is higher than a preset frequency, the strategy is a general strategy, and otherwise, if the frequency of use of the strategy is not higher than the preset frequency, the strategy is a special strategy.

[0076] The template configuration module is configured to configure a template. The template refers to a template used for mobile device page construction and not filled with real data, which is used to define a structure and a style of page data, and some settings of element construction in the style, for example, a number of pictures, a number of paragraphs, and a number of buttons that need to be constructed when a piece of data is displayed in a page, and the like, are all defined in the template in advance, and then each element is constructed according to the template definition by a back end, and the constructed template can be issued to a front end for rendering and display.

[0077] In the present application, a page is composed of a plurality of elements (webpage elements), and an element refers to a smallest unit in a page configuration process, for example, a button, a paragraph, a table, an input box, a picture, an audio, a video, and the like, and the type of the element is not specifically limited in the embodiment, and can be referred to the description of the webpage element in the prior art.

[0078] The template configuration module includes a page editing module and a strategy configuration module, the page editing module is configured to edit each webpage element in the page, for example, set text in a paragraph, set a size of a picture, set a shape of a button, and the like. The page editing module is mainly configured to edit a style of each webpage element in the page, for example, a final page obtained by editing can be as shown in Figure 2 . Figure 2 is a page structure diagram according to an embodiment of the present application. In Figure 2 , the page includes a paragraph, an input box, a button, a picture, a table, and the like, and the title is a paragraph attribute.

[0079] The page obtained through the page editing module is static and cannot realize the expected functions, for example, when a button representing search is clicked, the data in the input box will not be searched, or when a button representing loading more is clicked, more information will not be actually loaded. After the page editing module completes the editing of the page, the edited page can be delivered to the strategy configuration module, and the page is configured with strategies by the strategy configuration module. The purpose of the strategy configuration is to make the page have the function of data processing under actual business requirements, for example, when a button representing search is clicked, the input data will be sent to the XXX website, or when a button representing loading more is clicked, new content can be refreshed. The final page obtained through editing can be as shown in Figure 3 . Figure 3 is another page structure diagram shown in an embodiment of the present application. In Figure 3 , the input box is configured with a general strategy 1, the table is configured with a general strategy 2, the paragraph is configured with a general strategy 3, the table is configured with a special strategy 1, the button representing search is configured with a special strategy 2, and the button representing loading more is configured with a special strategy 3.

[0080] In the embodiment, in order to improve the reusability of various types of construction logic, the static page obtained through the page editing module can be saved in the template library as a template, or the page in which some commonly used strategies are configured in the strategy configuration module can be saved in the template library as a template. In this way, in subsequent use, the user can select a suitable template according to actual business requirements, then obtain strategies from the general strategy storage module and / or the special strategy storage module, and configure the obtained strategies on the selected template to obtain a final page meeting the business requirements.

[0081] For example, when the template selected by the user is the template shown in Figure 2 , the general strategies obtained from the general strategy storage module and / or the special strategies obtained from the special strategy storage module can be used to configure the strategies of the page. For another example, when the template selected by the user is the template shown in Figure 3 (previously configured with some strategies), the strategies previously configured in the page can be adjusted, and / or new strategies in the strategy storage module can be added to the template. When the new strategies in the strategy storage module are added to the template, the general strategies obtained from the general strategy storage module can be added to the page, or the special strategies obtained from the special strategy storage module can be added to the page.

[0082] When the template configuration module completes the editing of the page, the edited page can be sent to the strategy analysis module. The strategy analysis module is used to send the page to the front end for display according to the strategies configured in the page.

[0083] The policy analysis module is implemented by using a mechanism similar to SPI (Serial Peripheral Interface). The policy analysis module is configured to receive a completed page sent by the template configuration module, and then check whether a policy needs to be loaded (loading a policy refers to loading an implementation method corresponding to the policy, the template configuration module is configured to configure a policy name, and the policy analysis module is configured to load an implementation method corresponding to the policy name). If it is detected that a corresponding policy needs to be loaded, the corresponding policy is loaded according to the configured policy name, and after the loading is completed, the implementation method corresponding to the policy is added to a policy pool for reuse. The policy analysis module supports loading and calling multiple policies simultaneously.

[0084] The policy analysis module is configured with a policy pool. The policy pool is configured to save an implementation method corresponding to a loaded policy. When it is detected that a policy needs to be loaded, the policy pool is first searched for a matching implementation method. If the matching implementation method exists, the implementation method is directly loaded. If the matching implementation method does not exist, the implementation method corresponding to the policy name is loaded from another channel, and after the loading is completed, the implementation method is added to the policy pool. The policy pool is implemented by using a ConcurrentHashMap structure (using a segmented lock technology, data is stored in segments, and each segment of data is provided with a lock. When a thread occupies the lock to access a segment of data, other segments of data can be accessed by other threads, and true concurrent access can be achieved). The policy pool can support safe and high-concurrency multi-thread read-write operations.

[0085] The web page configuration method of the present application will be described in detail below. Figure 4 is a flowchart of a web page configuration method according to an embodiment of the present application. Referring to Figure 4 , the web page configuration method of the present application can include the following steps:

[0086] Step S41: Obtain a first web page to be configured with a policy.

[0087] In the embodiment, the first web page includes at least one web page element. The first web page can be a page that is not configured with any policy in advance, such as the page shown in Figure 2 , or a page that is configured with part of common policies in advance, such as the page shown in Figure 3 .

[0088] In a specific implementation, the web page configuration system can obtain the first web page from a template library, or obtain the first web page according to a page edited temporarily by a user. The embodiment does not specifically limit the manner of obtaining the first web page.

[0089] Step S42: Configure the first webpage using pre-stored general and / or special strategies to obtain the second webpage. The general strategy is a strategy used more frequently than a preset frequency in webpage editing, and the special strategy is a strategy used less frequently than the preset frequency in webpage editing.

[0090] Step S42 can be executed by the template configuration module of the webpage configuration system. When configuring a strategy for the first webpage in the template configuration module, the user can select the currently needed general strategy from various pre-stored general strategies and configure it into the first webpage, and / or select the currently needed special strategy from various pre-stored special strategies and configure it into the first webpage. The general strategies can be pre-stored in the general strategy storage module, and the special strategies can be pre-stored in the special strategy storage module.

[0091] For example, the general policies stored in the general policy storage module can be shown in Table 1 below, and the special policies stored in the special policy storage module can be shown in Table 2 below.

[0092] Assume the first webpage is Figure 2 The template shown is commonly used in business scenarios A, B, and C. To configure a second webpage suitable for business scenario A by adding strategies to the first webpage, the required general strategies include: General Strategy 1 and General Strategy 3; the required special strategy includes: Special Strategy 3. To configure a second webpage suitable for business scenario B by adding strategies to the first webpage, the required general strategies include: General Strategy 3-6; the required special strategy includes: Special Strategy 5.

[0093]

[0094] Table 1

[0095]

[0096] Table 2

[0097] When the user needs to obtain the second web page applicable to the business scenario A, the general strategy 1 and the general strategy 3 can be found in the general strategy storage module shown in Table 1, and then these strategies are configured on the first web page in sequence, then the special strategy 3 is found in the special strategy storage module shown in Table 2, and the strategy is continuously configured on the first web page, and finally the second web page applicable to the business scenario A can be obtained. When the user needs to obtain the second web page applicable to the business scenario B, the general strategy 3-6 can be found in the special strategy storage module shown in Table 1, and then these strategies are configured on the first web page in sequence, then the special strategy 5 is found in the special strategy storage module shown in Table 2, and the strategy is continuously configured on the first web page, and finally the second web page applicable to the business scenario A can be obtained.

[0098] The contents of the general strategy and the special strategy are not specifically limited in this embodiment, for example, the transparency of a certain picture can be set to Y, the style of a certain paragraph can be set to Z1, the data can be sent to the website Y after clicking the submission, other areas can be hidden when a certain animation is clicked, and the like. The general strategy information in Table 1 and the special strategy information in Table 2 are only examples and do not represent the contents in actual implementation.

[0099] Step S43: according to the strategy configured in the second web page, the second web page is sent to the web page display end.

[0100] Step S43 can be performed by the strategy analysis module of the web page configuration system.

[0101] In this embodiment, after the user configures the second web page in the template configuration module, the user can select the web page display end to which the second web page is applied, and then click the sending button to send the second web page to the web page display end for display.

[0102] After the strategy analysis module of the web page configuration system detects that the user triggers the sending button, it is detected whether a strategy is configured in the second web page, if yes, the implementation method corresponding to each strategy is loaded, and then these methods are executed to process the second web page. For example, a certain strategy is to set the transparency of all pictures in the second web page to 50%, and the implementation method corresponding to the strategy includes specific operation steps of setting the transparency of all pictures in the second web page to 50%, after the implementation method is executed, the transparency of all pictures in the second web page will be changed to 50%.

[0103] The policy analysis module sends the second web page to the web page display end for display after the implementation method corresponding to each policy is executed. In the present application, the first web page to be configured and various policies are processed separately, and the various policies are stored in the web page configuration system in advance, so that the user can directly select various policies according to actual needs and configure them into the first web page, without the need to re-edit each policy based on the first web page (for example, checking whether each policy is necessary, deleting unnecessary policies, etc.). In related technologies, the web page to be configured and various policies are not processed separately in advance, but can only be adjusted based on the web page to be configured, and cannot obtain various pre-stored policies and directly configure them into the first web page. The web page to be configured usually contains business codes corresponding to various businesses, and the coupling between the business codes is high, so the adjustment operation is quite cumbersome and difficult (for example, deleting unnecessary policies will affect necessary policies). Therefore, the present application pre-stores various policies in the web page configuration system in a configuration manner, realizes on-demand configuration of the user, and enhances the flexibility of web page configuration. Among them, the necessary policy refers to a policy that needs to be used in the target business, and the unnecessary policy refers to a policy that does not need to be used in the target business. In the embodiment, the first web page to be configured is obtained first, and then the first web page is configured by using the pre-stored general policy and / or special policy to obtain the second web page. The general policy is a policy with a use frequency higher than a preset frequency in web page editing, and the special policy is a policy with a use frequency not higher than the preset frequency in web page editing. Finally, the second web page is sent to the web page display end according to the policy configured in the second web page. The method has the following effects:

[0104] First, the general policy and the special policy are pre-stored in the web page configuration system in the present application, so that the user can select various policies according to actual needs and configure them into the first web page, thereby enhancing the flexibility of page configuration.

[0105] Second, the present application generates a page in a configuration manner, which can avoid configuring some unnecessary policies in the page, so that the page structure is more clear, and compared with the mixed use of various policies in related technologies, the coupling when various policies are mixed is reduced.

[0106] Third, the general policy and the special policy are separately stored in the web page configuration system in the present application, which reduces the maintenance difficulty of various policies.

[0107] In combination with the above embodiments, in an implementation manner, the policy configuration of the first web page by using the pre-stored general policy and / or special policy to obtain the second web page can include:

[0108] Determining an object to be configured in the first web page, the object being part of a web page element in the first web page or the first web page;

[0109] determining a to-be-configured policy of the object from the pre-stored general policy and / or special policy according to a selection operation of a user;

[0110] adding the to-be-configured policy to the object.

[0111] In the embodiment, when the first web page is configured with the policy, it is necessary to first determine the object in the first web page which needs to be configured with the policy. The minimum dimension of the object configured with the policy in the embodiment is a web page element, the maximum dimension is the entire page, and the remaining dimensions are partial web page elements in the page, such as a text area, a picture area, and the like in the page.

[0112] When the object is a partial web page element in the first web page, the object can be a single web page element in the first web page. For example, when the object is a table Y in the first web page, the table Y can be selected and a special policy A is added thereto.

[0113] When the object is a partial web page element in the first web page, the object can also be multiple web page elements (not all web page elements) in the first web page. For example, when the object is all pictures in the first web page, the pictures can be selected and a general policy B is added thereto.

[0114] When the object is the first web page, the object can be all web page elements in the first web page. For example, when the object is the first web page, the first web page can be selected and a special policy C is added thereto.

[0115] In the embodiment, the first web page can be configured with the policy from multiple dimensions, which improves the flexibility of the policy configuration.

[0116] In combination with the above embodiments, in an implementation, according to the policy configured in the second web page, sending the second web page to a web page display end can include:

[0117] obtaining a policy instance corresponding to the policy configured in the second web page;

[0118] running the policy instance, and sending the second web page after the running to the web page display end.

[0119] In the embodiment, the policy instance is an implementation method corresponding to the policy. The policy instance can be understood as a code representation of a construction logic, which is a method executable by a computer.

[0120] In the embodiment, each policy includes at least one policy instance. For example, a certain policy is to set the transparency of a picture X to 50%, and then the policy analysis module runs the policy instance corresponding to the policy, and after the running is successful, the transparency of the picture X in the second page is changed to 50%.

[0121] Generally, the second page contains multiple policies, and thus multiple policy instances. When the policy instances are run, some of the policy instances run successfully, and some of the policy instances run unsuccessfully. If there is a policy instance that runs unsuccessfully, the page configuration system can output a prompt message indicating that the policy instance runs unsuccessfully, so as to prompt the user to troubleshoot the problem.

[0122] In some cases, the user cannot see the prompt message indicating that the policy instance runs unsuccessfully. In this case, the embodiment provides a default solution: ignoring those policy instances that run unsuccessfully, and sending the second page after the policy instances that run successfully to the web display end. In other words, for the case where a policy instance runs unsuccessfully, it is assumed that the second page initially contains only the policy instances that run successfully, and then the second page after the policy instances that run successfully is sent to the web display end. For example, the second page contains policy instance A (for adjusting the font style of all paragraphs to style A) and policy instance B (for adjusting the style of all buttons to style B). After running, policy instance A runs successfully, and policy instance B runs unsuccessfully. If the user does not see the prompt message indicating that the policy instance runs unsuccessfully, the second page after policy instance A is directly sent to the web display end. In the second page seen in the web display end, the font style of all paragraphs is style A, and the style of all buttons is still the style before adjustment, which is not style B.

[0123] In combination with the above embodiment, in an implementation, the policy to be configured in the present application can include: a policy fully qualified name, a client version number, a client type, and an effective condition.

[0124] On this basis, obtaining the policy instance corresponding to the policy configured in the second web page can include:

[0125] Verifying the client version number and the client type in the configured policy;

[0126] When the verification is passed, obtaining the policy instance matching the policy fully qualified name from the pre-cached multiple policy instances.

[0127] In the present embodiment, when the user adds a policy for an object on the template configuration module, the policy name, the policy fully qualified name, the client version number, the client type, and the effective condition can be written.

[0128] The policy name is only used as a viewing identifier and does not have a logical purpose, and the role is to facilitate the developer to understand the intention of the policy configuration.

[0129] Policy full qualified name: is the full qualified name of the policy implementation class, used for dynamically loading the policy class and making method call, that is, the policy full qualified name is the name of the corresponding policy instance, used for dynamically loading the policy instance. The policy version number is the version used by the current policy.

[0130] Client version number: divided into start version number and end version number, used to limit the version interval of the client on which the policy takes effect.

[0131] Client type: used to distinguish different client types such as iPhone, Android, iPad, etc.

[0132] Effective condition: the condition for running the policy instance. When the condition is met, the policy instance will be run.

[0133] Therefore, the client version number is verified, including:

[0134] Verify whether the version number of the client of the web display end is between the start version number and the end version number in the policy. If it is, the verification is passed. The client type is verified, including: verifying whether the client type of the web display end meets the specified client type in the policy.

[0135] When the client version number and the client type are both verified, first detect whether there is a policy instance matching the policy full qualified name in the policy pool. If there is, directly load the policy instance. If not, load the policy instance from other channels and cache it in the policy pool for reuse.

[0136] Correspondingly, running the policy instance, sending the second web page after running to the web display end, including:

[0137] When the effective condition is met, the policy instance is run, and the second web page after running is sent to the web display end.

[0138] After loading the policy instance, it is judged whether the policy instance meets the effective condition. If the effective condition is met, the policy instance is run, and the second page after running is sent to the web display end.

[0139] For example, a policy can be as shown in Figure 5 . Figure 5 is a code diagram of a policy according to an embodiment of the present application. In Figure 5 , extra_strategy represents the policy configured on the object, wherein:

[0140] strategy_name represents the policy name, specifically the replacement style css.

[0141] strategy_fully_name represents the strategy fully qualified name, specifically com.xxx.xxx.CssReplaceStrategy.

[0142] version_start represents the client start version number, specifically 11.12.0.

[0143] version_end represents the client end version number, 999.999. The client start version number and the client end version number define the client version interval in which the strategy takes effect.

[0144] platform_id represents the client type. platform_id is the unique identifier of the client type, which can be represented by different symbols, for example, the number 1 can represent iPhone, the number 2 can represent Android, and the number 3 can represent iPad. Therefore, when platform_id = 1, it represents the client type as iPhone, and when platform_id = 2, it represents the client type as Android. The type of symbol is not specifically limited in this embodiment.

[0145] Condition represents the effective condition, which supports simple cloud control condition configuration, such as configuring "abtest=testmode:1". The key "abtest" will develop adaptive logic for ab experiment judgment. Multiple control conditions can be separated by semicolons.

[0146] Figure 5 The strategy shown represents: when the client version number is greater than 11.12.0, and the client type is 10 or 12 and hits the ab experiment testplan, the com.xxx.xxx.CssReplaceStrategy strategy instance is called to perform function enhancement to dynamically replace the css style.

[0147] In combination with the above embodiments, in an implementation, obtaining a first web page to be configured with a strategy can include:

[0148] creating a blank web page;

[0149] adding at least one web page element to the blank web page;

[0150] editing the web page element to obtain the first web page; or

[0151] obtaining the first web page to be configured with a strategy from a pre-cached web page template according to a selection operation of a user.

[0152] In the embodiment, the user can edit a first web page in the template configuration module. Specifically, the user can create a blank page, add one or more web page elements to the blank page, edit the elements, such as setting the size, color, shape, etc., or add a general policy or a special policy, and the edited page can be used as the first web page.

[0153] In the embodiment, the user can also select any template in the template library as the first web page.

[0154] Of course, the first web page can also be obtained from other channels, such as imported from an external system or downloaded from the Internet, and the embodiment does not make specific limitations.

[0155] The embodiment can obtain the first web page in multiple ways, which provides convenience for web page configuration.

[0156] In combination with the above embodiments, in an implementation, the to-be-configured policy of the object is determined from the pre-stored general policy and / or special policy according to the selection operation of the user, including:

[0157] The general policy is obtained from a first storage area; and / or

[0158] The special policy is obtained from a second storage area, which is different from the first storage area.

[0159] In the embodiment, the general policy and the special policy are stored in different areas, and the policies in each storage area are isolated from each other. The first storage area can be a general policy storage module, and the second storage area can be a special policy storage module.

[0160] The embodiment separates the original various policies, obtains the general policy with strong reusability and the special policy with poor reusability, and pre-stores them in the web page configuration system, so that the user can select the required general policy and / or special policy according to actual needs, and the flexibility of page configuration is enhanced.

[0161] Figure 6 is a web page configuration process diagram shown by an embodiment of the present application. The web page configuration method of the present application will be described in detail below. Figure 6 The web page configuration method of the present application will be described in detail below.

[0162] In Figure 6In the method, first, template configuration is performed in the template configuration module to obtain a first web page, then policy configuration is performed on the first web page to obtain a second web page, and then the second web page is sent to the policy analysis module. The policy analysis module first detects whether a policy is configured in the second web page, if yes, verifies the client version number and the client type, checks whether there is a policy instance matching the policy full-qualified name in the policy pool after the client version number and the client type are verified, if yes, directly loads the policy instance from the policy pool, if not, loads the policy instance from other channels and caches it to the policy pool for reuse. After the policy instance is loaded, it is judged whether the policy instance meets the effective condition, if yes, the policy instance is run (the construction logic in the policy is executed to adjust the page) to obtain a second page after running. Finally, the policy analysis module sends the page data corresponding to the second page to the web display end, and the web display end renders the displayed page according to the page data.

[0163] In the above process, the verification order of the client version number and the client type can be set arbitrarily, if the previous verification fails, the next verification can be omitted, and the user is directly prompted that the verification fails. If the user does not respond to the prompt information indicating that the verification fails, the first page can be directly sent to the web display end, so as to avoid the situation that the user cannot load the page for a long time.

[0164] When the client version and the client type are both verified, if there are the following three situations and the user does not respond to the corresponding prompt information, the second page after the successful running of the part of the policy instance can be directly sent to the web display end, the three situations include that the individual policy instance cannot be loaded, the policy instance does not meet the effective condition after being loaded, and the policy instance fails to run. In other words, at this time, the policy instance that cannot be loaded, does not meet the effective condition or fails to run can be directly ignored, and only the second page after the successful running of the part of the policy instance is sent to the web display end.

[0165] The application provides a webpage construction function enhancement method with configuration (users can select various strategies according to actual needs and configure the strategies into a first webpage), low coupling (unnecessary strategies are no longer included in the webpage, the influence of unnecessary strategies on necessary strategies is reduced, and the coupling between the strategies is reduced), good isolation (the to-be-configured webpage and various strategies are separated, and the to-be-configured webpage and the various strategies are convenient to maintain and manage), dynamic pluggability (users can add new strategies to the webpage configuration system or delete the strategies from the webpage configuration system, and the convenience of strategy management is enhanced), the special strategy corresponding business code is separated from the general strategy corresponding functional code, and dynamic loading and calling of the functional code are implemented. In the early development stage, the decoupling design of the code structure is very suitable for maximizing the use of reusable codes, in the later iteration change, the special strategy required can be changed more flexibly, and each strategy is isolated from each other and can be executed in series.

[0166] The application realizes decoupling of the general strategy and the special strategy, and realizes pluggability and dynamic replacement of the special strategy through configuration. One general strategy can use multiple different special strategies, the webpage element construction process is changed from one method to a combination of the general strategy and the special strategy, and the combination is realized through configuration, so that the function is changed in thousands of ways, but the code structure is very clear and maintainable, and the application scenario of using a template to construct a mobile terminal page is especially suitable. The strategy is changed through the change of the template configuration, and the strategy change can be realized without restarting the service. The code structure design at the beginning of design or the convenience and speed in secondary development and maintenance have very obvious advantages.

[0167] It should be noted that, for the method embodiments, in order to simply describe, they are all described as a series of action combinations, but those skilled in the art should know that the embodiments of the application are not limited to the action sequence described, because according to the embodiments of the application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions involved are not necessarily necessary for the embodiments of the application.

[0168] Based on the same inventive concept, an embodiment of the application provides a webpage configuration device 700 applied to a webpage configuration system. Referring to Figure 7 , Figure 7 is a structural block diagram of a webpage configuration device according to an embodiment of the application. As Figure 7 shown, the device 700 includes:

[0169] A first obtaining module 701 is configured to obtain a first webpage of a to-be-configured strategy.

[0170] The second obtaining module 702 is configured to perform policy configuration on the first web page by using a pre-stored general policy and / or a special policy, and obtain a second web page, where the general policy is a policy used more frequently than a preset frequency in web page editing, and the special policy is a policy used less frequently than the preset frequency in web page editing.

[0171] The sending module 703 is configured to send the second web page to a web page display end according to the policy configured in the second web page.

[0172] Optionally, the second obtaining module 702 includes:

[0173] The first determining sub-module is configured to determine an object to be configured with a policy in the first web page, where the object is a part of a web page element in the first web page or the first web page.

[0174] The second determining sub-module is configured to determine, according to a selection operation of a user, a policy to be configured for the object from the pre-stored general policy and / or the special policy.

[0175] The adding sub-module is configured to add the policy to be configured for the object.

[0176] Optionally, the sending module 703 includes:

[0177] The first obtaining sub-module is configured to obtain a policy instance corresponding to the policy configured in the second web page.

[0178] The first sending sub-module is configured to run the policy instance and send the second web page after running to a web page display end.

[0179] Optionally, the policy to be configured includes a policy fully qualified name, a client version number, a client type and an effective condition; and the first obtaining sub-module includes:

[0180] The verifying sub-module is configured to verify the client version number and the client type in the configured policy.

[0181] The second obtaining sub-module is configured to, when the verification is passed, obtain a policy instance matching the policy fully qualified name from a plurality of pre-cached policy instances.

[0182] The first sending sub-module includes:

[0183] The second sending sub-module is configured to, when the effective condition is met, run the policy instance and send the second web page after running to a web page display end.

[0184] Optionally, the first obtaining module 701 includes:

[0185] The third obtaining sub-module is configured to newly create a blank webpage, add at least one webpage element to the blank webpage, edit the webpage element, and obtain the first webpage.

[0186] The fourth obtaining sub-module is configured to obtain the first webpage to be configured with the policy from a webpage template pre-cached according to a selection operation of the user.

[0187] Optionally, the second obtaining module 702 comprises:

[0188] The fifth obtaining sub-module is configured to obtain a general policy from the first storage area; and / or

[0189] The sixth obtaining sub-module is configured to obtain a special policy from the second storage area, which is different from the first storage area.

[0190] The embodiment of the present application further provides a terminal device, as shown in the accompanying drawings. Figure 8 Figure 8 is a structural schematic diagram of a terminal device according to an embodiment of the present application. As shown in Figure 8 , the terminal device comprises a processor 81, a communication interface 82, a memory 83 and a communication bus 84, wherein the processor 81, the communication interface 82 and the memory 83 complete mutual communication through the communication bus 84;

[0191] The memory 83 is configured to store a computer program.

[0192] The processor 81 is configured to execute the program stored in the memory 83, and implement the following steps:

[0193] obtain a first webpage to be configured with a policy;

[0194] configure the first webpage with a general policy and / or a special policy pre-stored to obtain a second webpage, the general policy being a policy with a frequency of use higher than a preset frequency in webpage editing, and the special policy being a policy with a frequency of use not higher than the preset frequency in webpage editing;

[0195] According to the policy configured in the second webpage, the second webpage is sent to a webpage display end.

[0196] Or the processor 81 executes the program stored in the memory 83, and implements the steps in the other method embodiments.

[0197] ​The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or only one type of bus.

[0198] The communication interface is used for communication between the terminal and other devices.

[0199] The memory can include a Random Access Memory (RAM) and can also include a non-volatile memory, such as at least one disk memory. Optionally, the memory can also be at least one storage device located away from the processor.

[0200] The processor mentioned above can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc. It can also be a Digital Signal Processing (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.

[0201] In another embodiment provided by the application, a computer readable storage medium is also provided, and the computer readable storage medium stores instructions, when the instructions are run on a computer, the computer executes the webpage display method in any of the above embodiments.

[0202] In another embodiment provided by the application, a computer program product containing instructions is also provided, when the instructions are run on a computer, the computer executes the webpage display method in any of the above embodiments.

[0203] In the embodiments described above, all or some of the steps can be implemented by software, hardware, firmware or any combination thereof. When implemented in software, all or some of the steps can be implemented in the form of one or more computer programs which are stored in a computer readable storage medium. The computer readable storage medium can be located in a computing device which is in operation. These computer programs (which may

[0204] It should be noted that, in the present document, the terms such as first and second are used only to differentiate one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Also, the terms "comprising", "containing" or any other similar term are intended to encompass non-exclusive inclusion such that a process, method, article or apparatus that comprises a list of elements does not necessarily include only those elements in the list, but can include other elements not expressly listed or inherent to such process, method, article or apparatus.

[0205] Each of the embodiments in the present document is described in a related manner, and the same or similar parts among the embodiments can be referred to each other. Each of the embodiments focuses on the difference from other embodiments. In particular, for the system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiments.

[0206] The above merely provides the preferred embodiments of the application, and not intended to limit the protection scope of the application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the application shall fall within the protection scope of the application.

Claims

1. A method of configuring a web page, characterized by, The method comprises the following steps: obtaining a first web page to be configured with a strategy; configuring the first web page with a pre-stored general strategy and / or a special strategy to obtain a second web page, the general strategy being a strategy used more frequently than a preset frequency in web page editing, and the special strategy being a strategy used not more frequently than the preset frequency in web page editing; the strategy configuration is used to enable the web page to have a data processing function, the general strategy is stored in a first storage area, and the special strategy is stored in a second storage area different from the first storage area; sending the second web page to a web page display end according to the strategy configured in the second web page; the step of configuring the first web page with a pre-stored general strategy and / or a special strategy to obtain a second web page comprises the following steps: determining an object to be configured with a strategy in the first web page, the object being part of a web page element in the first web page or the first web page; determining a strategy to be configured for the object from a pre-stored general strategy and / or a special strategy according to a selection operation of a user; adding the strategy to be configured for the object.

2. The method of claim 1, wherein, the step of sending the second web page to a web page display end according to the strategy configured in the second web page comprises the following steps: obtaining a strategy instance corresponding to the strategy configured in the second web page; running the strategy instance and sending the second web page after running to a web page display end.

3. The method of claim 2, wherein, the strategy to be configured comprises a strategy fully qualified name, a client version number, a client type and an effective condition; the step of obtaining a strategy instance corresponding to the strategy configured in the second web page comprises the following steps: verifying the client version number and the client type in the configured strategy; when the verification is passed, obtaining a strategy instance matching the strategy fully qualified name from a plurality of pre-cached strategy instances; the step of running the strategy instance and sending the second web page after running to a web page display end comprises the following steps: when the effective condition is met, running the strategy instance and sending the second web page after running to a web page display end.

4. The method of claim 1, wherein, the step of obtaining a first web page to be configured with a strategy comprises the following steps: newly creating a blank web page, adding at least one web page element to the blank web page, editing the web page element and obtaining the first web page; or obtaining a first web page to be configured with a strategy from a pre-cached web page template according to a selection operation of a user.

5. The method of claim 1, wherein, the step of determining a strategy to be configured for the object from a pre-stored general strategy and / or a special strategy according to a selection operation of a user comprises the following steps: obtaining a general strategy from a first storage area; and / or obtaining a special strategy from a second storage area different from the first storage area.

6. A web page configuration apparatus characterized by comprising: The method comprises the following steps: a first obtaining module is configured to obtain a first web page to be configured with a strategy; The second obtaining module is configured to perform policy configuration on the first web page by using pre-stored general policies and / or special policies to obtain a second web page, wherein the general policies are policies with a usage frequency higher than a preset frequency in web page editing, and the special policies are policies with a usage frequency not higher than the preset frequency in web page editing; the policy configuration is configured to enable the web page to have a data processing function; the general policies are stored in a first storage area, and the special policies are stored in a second storage area, which is different from the first storage area; The sending module is configured to send the second web page to a web page display end according to the policy configured in the second web page. The second obtaining module includes: The first determining submodule is configured to determine an object to which a policy is to be configured in the first web page, wherein the object is a part of web page elements in the first web page or the first web page; The second determining submodule is configured to determine, according to a selection operation of a user, a policy to be configured for the object from pre-stored general policies and / or special policies; The first adding submodule is configured to add the policy to be configured to the object.

7. A terminal device, characterized by comprising: The apparatus includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus. The memory is configured to store a computer program. The processor is configured to execute the program stored in the memory to implement the steps in the web page configuration method of any one of claims 1 to 5.

8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the steps in the web page configuration method of any one of claims 1 to 5.

Citation Information

Patent Citations

  • Web browser policy for http-based application

    US20170163690A1

  • Combining Aspects of a Template into Multiple Web Pages

    US20180060294A1