Page processing method and device
By implementing the page processing method on the server, using the carrier identification and the API of the rendering component to automatically adapt to the page data on different operating vectors, solve the problem of large workload when developing different operators. Decrease and cost.
Patent Information
- Application Number
- CN202310929348.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-26
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2043-07-26
AI Technical Summary
In the prior art, when developing pages carried by different operating carriers, page data needs to be written separately, resulting in large workloads and high labor costs.
By implementing a page processing method on the server, using the carrier identification and the API of the rendering component to automatically obtain and adapt the page data on different operating vectors to reduce the workload of developers.
Reuse the page data, support "one development, multi -terminal use", and reduce the workload and labor cost of developers.
Smart Images

Figure CN119376829A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a page processing method and device. Background Art
[0002] Currently, many service providers provide services to the outside world (e.g., to a large number of users) through pages. In order to provide services to the outside world in a more friendly way, service providers often render content in the page, for example, using tables to render content, or using cards to render content, etc., to provide services to the outside world through rendered content. Summary of the invention
[0003] The present application shows a page processing method and device.
[0004] In a first aspect, the present application shows a page processing method, which is applied to a server, and the method includes: receiving an access request for a target page sent by a first running carrier, the access request carrying at least a carrier identifier of the first running carrier; according to the carrier identifier of the first running carrier in the access request, obtaining first page data adapted for the target page on the first running carrier; the first page data includes: a first content to be displayed adapted for display on the first running carrier and a rendering instruction for calling a rendering component using an API of a second rendering component to render the first content to be displayed; the first content to be displayed is obtained based on a second content to be displayed adapted for display on a second running carrier, and the second rendering component includes a rendering component suitable for rendering the second content to be displayed on a target page carried by the second running carrier; the second content to be displayed is located on a developed second page to which the target page is adapted on the second running carrier In the data, the second page data also includes a rendering instruction for using the API of the second rendering component to call the rendering component to render the second content to be displayed; according to the carrier identifier of the first running carrier and the API of the second rendering component, obtain the component path of the first rendering component corresponding to the second rendering component on the first running carrier, and the first rendering component includes a rendering component suitable for rendering the first content to be displayed on the target page carried by the first running carrier; obtain the rendering instruction, and the obtained rendering instruction is used to instruct to call the rendering component using the component path of the first rendering component to render the first content to be displayed; send at least the first content to be displayed and the obtained rendering instruction to the first running carrier; so that the first running carrier receives the first content to be displayed and the obtained rendering instruction; call the first rendering component according to the component path of the first rendering component indicated by the obtained rendering instruction to render the first content to be displayed on the target page.
[0005] In an optional implementation, the method of obtaining the component path of the first rendering component corresponding to the second rendering component on the first running carrier according to the carrier identification of the first running carrier and the API of the second rendering component includes: searching for the component path corresponding to the API of the second rendering component and the carrier identification of the first running carrier in the correspondence between the API of the rendering component, the carrier identification of the running carrier and the component path of the rendering component, and obtaining the component path of the first rendering component.
[0006] In an optional implementation, the method also includes: obtaining an add instruction, the add instruction carrying the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the first rendering component; the add instruction is used to indicate that a corresponding table item including the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the first rendering component is stored in a corresponding relationship; establishing a corresponding table item including the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the first rendering component; and storing the established corresponding table item in the corresponding relationship.
[0007] In an optional implementation, the method also includes: obtaining a deletion instruction, the deletion instruction carries at least a deletion parameter, the deletion parameter includes at least two of the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the first rendering component, the deletion instruction is used to indicate the deletion of a corresponding table item including the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the first rendering component in the corresponding relationship; searching for a corresponding table item including the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the first rendering component in the corresponding relationship according to the deletion parameter; and deleting the corresponding table item found in the corresponding relationship.
[0008] In an optional implementation, the method also includes: obtaining a modification instruction, the modification instruction carrying the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the third rendering component, the modification instruction being used to indicate that the component path corresponding to the API of the second rendering component and the carrier identifier of the first running carrier in the corresponding relationship is replaced with the component path of the third rendering component; searching for the component path corresponding to the API of the second rendering component and the carrier identifier of the first running carrier in the corresponding relationship; and replacing the found component path with the component path of the third rendering component in the corresponding relationship.
[0009] In an optional implementation, the method also includes: when the first running carrier has a unique rendering component relative to the second running carrier, obtaining pre-configured unique content to be displayed and unique rendering instructions, the unique rendering instructions are used to instruct the use of the unique rendering component of the first running carrier relative to the second running carrier to render the unique content to be displayed; the unique rendering component does not correspond to the rendering component applicable to the second running carrier; sending the unique content to be displayed and the unique rendering instructions to the first running carrier; so that the first running carrier receives the unique content to be displayed and the unique rendering instructions sent by the server, and when the first running carrier renders the first content to be displayed on the target page, the unique rendering component is called according to the component path of the unique rendering component indicated by the unique rendering instruction to render the unique content to be displayed on the target page.
[0010] In an optional implementation, the method further includes: if the component path of the first rendering component is not obtained according to the carrier identifier of the first running carrier and the API of the second rendering component, interrupting the sending of the first content to be displayed to the first running carrier.
[0011] In a second aspect, the present application shows a page processing method, which is applied to a first running carrier, and the method includes: sending an access request for a target page to a server, the access request carrying at least a carrier identifier of the first running carrier; so that the server receives the access request, and obtains first page data adapted for the target page on the first running carrier according to the carrier identifier of the first running carrier in the access request; the first page data includes: a first content to be displayed adapted for display on the first running carrier and a rendering instruction to call a rendering component using an API of a second rendering component to render the first content to be displayed; the first content to be displayed is obtained based on a second content to be displayed adapted for display on a second running carrier, and the second rendering component includes a rendering component suitable for rendering the second content to be displayed on a target page carried by the second running carrier; the second content to be displayed is located in a developed location and the target page on the second running carrier In the second page data adapted above, the second page data also includes a rendering instruction for using the API of the second rendering component to call the rendering component to render the second content to be displayed; according to the carrier identifier of the first running carrier and the API of the second rendering component, obtain the component path of the first rendering component corresponding to the second rendering component on the first running carrier, and the first rendering component includes a rendering component suitable for rendering the first content to be displayed on the target page carried by the first running carrier; obtain the rendering instruction, and the obtained rendering instruction is used to instruct to call the rendering component using the component path of the first rendering component to render the first content to be displayed; send at least the first content to be displayed and the obtained rendering instruction to the first running carrier; at least receive the first content to be displayed and the obtained rendering instruction; call the first rendering component according to the component path of the first rendering component indicated by the obtained rendering instruction to render the first content to be displayed on the target page.
[0012] In an optional implementation, the method also includes: receiving unique content to be displayed and unique rendering instructions sent by the server, the unique rendering component does not correspond to the rendering component applicable to the second running carrier; the unique rendering instruction is used to instruct the use of the unique rendering component of the first running carrier relative to the second running carrier to render the unique content to be displayed; the unique content to be displayed and the unique rendering instructions are pre-configured in the server, and are obtained by the server and sent to the first running carrier when the first running carrier has a unique rendering component relative to the second running carrier; when the first running carrier renders the first content to be displayed on the target page, the unique rendering component is called according to the component path of the unique rendering component indicated by the unique rendering instruction to render the unique content to be displayed on the target page.
[0013] In the third aspect, the present application shows a page processing device, which is applied to a server, and the device includes: a first receiving module, which is used to receive an access request for a target page sent by a first running carrier, and the access request carries at least a carrier identifier of the first running carrier; a first acquisition module, which is used to acquire first page data adapted for the target page on the first running carrier according to the carrier identifier of the first running carrier in the access request; the first page data includes: a first content to be displayed adapted for display on the first running carrier and a rendering instruction for calling a rendering component using an API of a second rendering component to render the first content to be displayed; the first content to be displayed is obtained based on a second content to be displayed adapted for display on a second running carrier, and the second rendering component includes a rendering component suitable for rendering the second content to be displayed on a target page carried by the second running carrier; the second content to be displayed is located in the developed second page data adapted for the target page on the second running carrier, and the first The second page data also includes a rendering instruction for using the API of the second rendering component to call the rendering component to render the second content to be displayed; a second acquisition module is used to obtain the component path of the first rendering component corresponding to the second rendering component on the first running carrier according to the carrier identifier of the first running carrier and the API of the second rendering component, and the first rendering component includes a rendering component suitable for rendering the first content to be displayed on the target page carried by the first running carrier; a third acquisition module is used to obtain the rendering instruction, and the obtained rendering instruction is used to instruct to call the rendering component using the component path of the first rendering component to render the first content to be displayed; a first sending module is used to send at least the first content to be displayed and the obtained rendering instruction to the first running carrier; so that the first running carrier receives the first content to be displayed and the obtained rendering instruction; call the first rendering component according to the component path of the first rendering component indicated by the obtained rendering instruction to render the first content to be displayed on the target page.
[0014] In an optional implementation, the first acquisition module includes: a search unit, used to search for a component path corresponding to the API of the second rendering component and the carrier identifier of the first running carrier in the correspondence between the API of the rendering component, the carrier identifier of the running carrier and the component path of the rendering component, so as to obtain the component path of the first rendering component.
[0015] In an optional implementation, the first acquisition module also includes: a first acquisition unit, used to acquire an add instruction, the add instruction carries the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the first rendering component; the add instruction is used to indicate that a corresponding table item including the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the first rendering component is stored in the corresponding relationship; an establishment unit, used to establish a corresponding table item including the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the first rendering component; a storage unit, used to store the established corresponding table item in the corresponding relationship.
[0016] In an optional implementation, the first acquisition module also includes: a second acquisition unit, used to obtain a deletion instruction, the deletion instruction carries at least a deletion parameter, the deletion parameter includes at least two of the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the first rendering component, the deletion instruction is used to indicate to delete the corresponding table item including the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the first rendering component in the corresponding relationship; a first search unit, used to search for the corresponding table item including the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the first rendering component in the corresponding relationship according to the deletion parameter; a deletion unit, used to delete the corresponding table item found in the corresponding relationship.
[0017] In an optional implementation, the device also includes: a third acquisition unit, used to acquire a modification instruction, the modification instruction carries the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the third rendering component, the modification instruction is used to indicate that the component path corresponding to the API of the second rendering component and the carrier identifier of the first running carrier is replaced with the component path of the third rendering component in the corresponding relationship; a second search unit, used to search for the component path corresponding to the API of the second rendering component and the carrier identifier of the first running carrier in the corresponding relationship; a replacement unit, used to replace the found component path with the component path of the third rendering component in the corresponding relationship.
[0018] In an optional implementation, the device also includes: a fourth acquisition module, which is used to acquire pre-configured unique content to be displayed and unique rendering instructions when the first running carrier has a unique rendering component relative to the second running carrier, and the unique rendering instructions are used to instruct the use of the unique rendering component of the first running carrier relative to the second running carrier to render the unique content to be displayed; the unique rendering component does not correspond to the rendering component applicable to the second running carrier; a second sending module, which is used to send the unique content to be displayed and the unique rendering instructions to the first running carrier; so that the first running carrier receives the unique content to be displayed and the unique rendering instructions sent by the server, and when the first running carrier renders the first content to be displayed on the target page, the unique rendering component is called according to the component path of the unique rendering component indicated by the unique rendering instruction to render the unique content to be displayed on the target page.
[0019] In an optional implementation, the device further includes: a terminal module, configured to interrupt sending the first content to be displayed to the first running carrier when the component path of the first rendering component is not obtained according to the carrier identifier of the first running carrier and the API of the second rendering component.
[0020] In a fourth aspect, the present application shows a page processing device, which is applied to a first running carrier, and the device includes: a third sending module, which is used to send an access request for a target page to a server, and the access request carries at least a carrier identifier of the first running carrier; so that the server receives the access request and obtains first page data adapted for the target page on the first running carrier according to the carrier identifier of the first running carrier in the access request; the first page data includes: a first content to be displayed adapted for display on the first running carrier and a rendering instruction to call a rendering component using an API of a second rendering component to render the first content to be displayed; the first content to be displayed is obtained based on a second content to be displayed adapted for display on a second running carrier, and the second rendering component includes a rendering component suitable for rendering the second content to be displayed on a target page carried by the second running carrier; the second content to be displayed is located in a developed first running carrier adapted for displaying the target page on the second running carrier In the second page data, the second page data also includes a rendering instruction for using the API of the second rendering component to call the rendering component to render the second content to be displayed; according to the carrier identifier of the first running carrier and the API of the second rendering component, obtain the component path of the first rendering component corresponding to the second rendering component on the first running carrier, and the first rendering component includes a rendering component suitable for rendering the first content to be displayed on the target page carried by the first running carrier; obtain the rendering instruction, and the obtained rendering instruction is used to instruct to call the rendering component using the component path of the first rendering component to render the first content to be displayed; send at least the first content to be displayed and the obtained rendering instruction to the first running carrier; a second receiving module is used to receive at least the first content to be displayed and the obtained rendering instruction; a first rendering module is used to call the first rendering component according to the component path of the first rendering component indicated by the obtained rendering instruction to render the first content to be displayed on the target page.
[0021] In an optional implementation, the device also includes: a third receiving module, used to receive unique content to be displayed and a unique rendering instruction sent by the server, the unique rendering component does not correspond to the rendering component applicable to the second running carrier; the unique rendering instruction is used to instruct the use of the unique rendering component of the first running carrier relative to the second running carrier to render the unique content to be displayed; the unique content to be displayed and the unique rendering instruction are pre-configured in the server, and are obtained by the server and sent to the first running carrier when there is a unique rendering component in the first running carrier relative to the second running carrier; the second rendering module is used to call the unique rendering component according to the component path of the unique rendering component indicated by the unique rendering instruction to render the unique content to be displayed on the target page when the first running carrier renders the first content to be displayed on the target page.
[0022] In a fifth aspect, the present application shows an electronic device, which includes: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the method shown in any of the aforementioned aspects.
[0023] In a sixth aspect, the present application illustrates a non-temporary computer-readable storage medium, which, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute a method as shown in any of the aforementioned aspects.
[0024] In a seventh aspect, the present application illustrates a computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to perform a method as shown in any of the aforementioned aspects.
[0025] Compared with the prior art, this application has the following advantages:
[0026] In the present application, the first running carrier sends an access request for the target page to the server, and the access request carries at least the carrier identifier of the first running carrier. The server receives the access request sent by the first running carrier, and obtains the first page data adapted for the target page on the first running carrier according to the carrier identifier of the first running carrier in the access request; the first page data includes: a first content to be displayed adapted for display on the first running carrier and a rendering instruction to call a rendering component using the API of a second rendering component to render the first content to be displayed; the first content to be displayed is obtained based on the second content to be displayed adapted for display on the second running carrier, and the second rendering component includes a rendering component suitable for rendering the second content to be displayed on the target page carried by the second running carrier; the second content to be displayed is located in a developed target page on the second running carrier, and the target page is located in a developed target page on the second running carrier. In the second page data adapted on the first running carrier, the second page data also includes a rendering instruction for using the API of the second rendering component to call the rendering component to render the second content to be displayed; according to the carrier identifier of the first running carrier and the API of the second rendering component, the component path of the first rendering component corresponding to the second rendering component on the first running carrier is obtained, and the first rendering component includes a rendering component suitable for rendering the first content to be displayed on the target page carried by the first running carrier; the rendering instruction is obtained, and the obtained rendering instruction is used to instruct to call the rendering component using the component path of the first rendering component to render the first content to be displayed; at least the first content to be displayed and the obtained rendering instruction are sent to the first running carrier. The first running carrier receives the first content to be displayed and the obtained rendering instruction, and calls the first rendering component according to the component path of the first rendering component indicated by the obtained rendering instruction to render the first content to be displayed on the target page.
[0027] Through the present application, when it is necessary to develop a target page and to place the target page on the first running carrier and the second running carrier respectively, so that the majority of users can access the target page using the first running carrier and can also access the target page using the second running carrier, it is supported that the developer can develop the second page data adapted for the target page on the second running carrier. The second page data includes: a second content to be displayed adapted for display on the second running carrier and a rendering instruction for calling a rendering component using the API of a second rendering component to render the second content to be displayed, etc. In addition, it is supported that the developer may not develop the first page data adapted for the target page on the first running carrier, and the server may automatically obtain the first page data adapted for the target page on the first running carrier according to the second page data adapted for the developed target page on the second running carrier, and the first page data includes: a first content to be displayed adapted for display on the first running carrier and a rendering instruction for calling a rendering component using the API of a second rendering component to render the second content to be displayed, etc. The first content to be displayed is obtained based on the second content to be displayed.
[0028] That is, the developer may not care about the API of the first rendering component. For example, the developer may not adjust the rendering instruction of "using the API of the second rendering component to call the rendering component to render the second content to be displayed" in the first page data.
[0029] The server can automatically configure the mapping between "the component identifier of the first rendering component and the component path of the first rendering component under the premise of the API of the second rendering component". When the first running carrier needs to request the server to access the target page, the server can index the first page data according to the carrier identifier of the first running carrier, and then, according to the carrier identifier of the first running carrier and the API of the second rendering component in the first page data, with the help of the pre-configured mapping between "the component identifier of the first rendering component and the component path of the first rendering component under the premise of the API of the second rendering component", index the component path of the first rendering component, and then obtain the rendering instruction. The obtained rendering instruction is used to instruct the use of the component path of the first rendering component to call the rendering component to render the first content to be displayed, and send the first content to be displayed and the obtained rendering instruction to the first running carrier. After that, the first running carrier can call the first rendering component according to the component path of the first rendering component indicated by the obtained rendering instruction to render the first content to be displayed on the target page.
[0030] Among them, the server's acquisition logic of "automatically obtaining the first page data adapted for the target page on the first running carrier according to the second page data adapted for the target page on the second running carrier", the server's acquisition logic of "obtaining the component path of the first rendering component corresponding to the second rendering component on the first running carrier according to the carrier identifier of the first running carrier and the API of the second rendering component", the server's acquisition logic of "obtaining rendering instructions" and the server's sending logic of "sending the first content to be displayed and the obtained rendering instructions to the first running carrier" and other sets of logic may not be set in real time by the developer on the server when developing the target page, but may be set in advance by the server staff. The above set of logic is applicable to pages that developers need to develop and place on more than two running carriers.
[0031] In this way, a set of logic can be used to reuse multiple pages. That is, after the above set of logic is configured in the server, when the developer needs to develop any page to be placed on more than two running carriers, he can only develop the page data that is adapted to the page on one running carrier, and does not need to develop the page data that is adapted to the page on other running carriers. This allows the page data of a page to be reused on different running carriers, for example, achieving the effect of "develop once, use on multiple terminals", thereby reducing the workload of developers and reducing labor costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 It is a structural block diagram of a page processing system of the present application.
[0033] Figure 2 It is a step flow chart of a page processing method of the present application.
[0034] Figure 3 It is a step flow chart of a page processing method of the present application.
[0035] Figure 4 It is a structural block diagram of a page processing device of the present application.
[0036] Figure 5 It is a structural block diagram of a page processing device of the present application.
[0037] Figure 6 It is a structural block diagram of a device of the present application. DETAILED DESCRIPTION
[0038] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0039] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.
[0040] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0041] Currently, there are many types of operating carriers on the market that can host web pages, such as desktop computers (such as browsers on desktop computers, etc.), applications (such as applications on mobile phones, etc.), and small programs hosted on applications.
[0042] In addition, in order to increase the number of service channels for providing services to the outside world, service providers often carry pages through multiple operating carriers, and provide services to the outside world through pages carried by multiple operating carriers.
[0043] In order to provide services to the outside world through pages carried by various running carriers, developers can develop pages carried by various running carriers in advance, for example, develop pages carried by desktop computers, develop pages carried by applications, and develop pages carried by mini-programs.
[0044] However, the inventors have found that the workload for developers to develop pages carried by various operating carriers is large and the labor cost is high.
[0045] This raises the need to reduce the workload of developers and reduce labor costs.
[0046] In order to reduce the workload of developers and reduce labor costs, the inventors analyzed the reasons why "developers have a heavy workload in developing pages carried by various operating carriers" and found that:
[0047] Different operating carriers that carry pages often have different technology stacks, which at least involve rendering components supported by the content in the page. Thus, the rendering components supported by the content in the pages carried by different operating carriers are often different.
[0048] During the page development phase, developers often develop pages by writing page data of the page (e.g., including computer program code of the page, etc.). In the process of developers writing page data of the page, they need to write the page data of the page specifically according to the technology stack supported by the running carrier that carries the page.
[0049] For example, in the process of developing page data of pages respectively carried by different running carriers, different rendering instructions for rendering content on the pages need to be written respectively.
[0050] For example, the rendering component has an open API (Application Program Interface), and the rendering component is needed to render content. Thus, the rendering statement for rendering content on the page includes: using the rendering component's API to call the rendering component to render content.
[0051] However, different running carriers support different rendering components, or different rendering components need to be used in pages carried by different running carriers according to service requirements, and different rendering components open different APIs to the outside.
[0052] In one example, according to service requirements, the rendering component used in the page hosted by the desktop computer is a table component, that is, in the page hosted by the desktop computer, a table needs to be used to render the content so that the content is distributed in the table for the user to view. In this way, in the process of developing and running the page data of the page hosted by the carrier desktop computer, a rendering instruction that uses the API of the table component to call the table component to render the content can be written.
[0053] In another example, according to service requirements, the rendering component used in the page hosted by the application is a card component, that is, in the page hosted by the application, it is necessary to use a card to render the content so that the content is distributed in the card for users to view. In this way, in the process of developing and running the page data of the page hosted by the carrier application, you can write a rendering instruction that uses the API of the card component to call the card component to render the content.
[0054] To this end, page data for pages carried by different operating carriers need to be developed separately. For example, if a service provider needs to use certain operating carriers to carry pages to provide services externally, then page data for pages carried by each of these operating carriers needs to be written separately. In other words, a set of page data for pages needs to be written separately for each operating carrier, resulting in a large workload for writing page data and high labor costs.
[0055] For this reason, the inventor thought that for each running carrier, if the developer can write a set of page data for only one running carrier, and the page data of this set of pages can be adaptively reused on other running carriers, then the effect of "one-time development, multi-terminal use" can be achieved, thereby reducing the workload of developers and reducing labor costs.
[0056] In order to enable the page data of a set of pages to be written for one running carrier and the page data of the written set of pages to be adaptively reused on other running carriers, the solution of the present application is proposed.
[0057] See also Figure 1 , shows a structural block diagram of a page processing system of the present application. The page processing system includes a server 01 and multiple operation carriers 02.
[0058] The server can communicate with each operating carrier separately.
[0059] In one embodiment, the multiple operation carriers may be various types of operation carriers, for example, a fixed-end operation carrier and a mobile-end operation carrier, etc. The fixed-end operation carrier may include a desktop computer, etc. The mobile-end operation carrier may include a mobile phone, a tablet computer, and a PDA (Personal Digital Assistant, handheld computer), etc.
[0060] Figure 1 The example of the operating carriers includes a mobile phone 021 and a fixed desktop computer 022.
[0061] Different types of operating carriers may have different operating systems, or different types of operating carriers may have different sizes of interfaces for displaying pages.
[0062] The following uses the first operating carrier and the second operating carrier as examples to illustrate the solution of the present application, but does not limit the idea of the present application. The first operating carrier is different from the second operating carrier, for example, the first operating carrier is a mobile phone, and the second operating carrier is a fixed desktop computer.
[0063] In the present application, for a page, for example, a target page, it is necessary to place the target page on a first running carrier and a second running carrier respectively, so that a large number of users can access the target page using the first running carrier and can also access the target page using the second running carrier. The content displayed in the target page carried by the first running carrier and the content displayed in the target page carried by the second running carrier can be the same.
[0064] To this end, the developer may develop the target page in advance. In one example, the developer may develop the target page carried on the second running carrier in advance, for example, develop the second page data adapted to the target page on the second running carrier in advance.
[0065] The second page data includes: second content to be displayed for adaptive display on the second running carrier and rendering instructions for using the API of the second rendering component to call the rendering component to render the second content to be displayed.
[0066] The second content to be displayed adapted for display on the second running carrier may include: data that needs to be displayed on the target page carried by the second running carrier as determined by the developer according to actual needs. This application does not limit the specific content of the second content to be displayed.
[0067] For example, in one embodiment, the second content to be displayed for adaptive display on the second running carrier can be understood as: the second content to be displayed developed by the developer is specially developed for adaptation on the second running carrier, and some attributes of the second content to be displayed are adapted to the second running carrier, for example, the size of the second content to be displayed is adapted to the size of the second running carrier for displaying the target page, the unit of the size of the second content to be displayed is adapted to the unit of the size of the second running carrier for displaying the target page, etc.
[0068] In addition, the second rendering component includes: a rendering component suitable for rendering the second content to be displayed on the target page carried by the second running carrier, that is, the second rendering component is used to render the second content to be displayed on the target page carried by the second running carrier.
[0069] For example, the second running carrier supports the use of the second rendering component when rendering content on the target page carried by the second running carrier, while other running carriers other than the second running carrier do not support the use of the second rendering component when rendering content on the target page carried by them. That is, the second rendering component can be used by the second running carrier but cannot be used by other running carriers other than the second running carrier. In this way, the developer needs to specify that the second running carrier use the second rendering component when rendering the second content to be displayed on the target page carried by the second running carrier.
[0070] For another example, the second running carrier and at least one running carrier other than the second running carrier both support the use of the second rendering component when rendering data on the target page they carry. In this way, the developer can actively specify that the second running carrier use the second rendering component when rendering the second content to be displayed on the target page carried by the second running carrier.
[0071] Secondly, since the target page also needs to be placed on the first running carrier, and since the content in the target page carried by the first running carrier can be the same as the content in the target page carried by the second running carrier, the second content to be displayed needs to be displayed on the target page carried by the second running carrier, and the content that is the same as the second content to be displayed (the content that is the same as the second content to be displayed includes the first content to be displayed mentioned later) also needs to be displayed on the target page carried by the first running carrier.
[0072] In view of this, in order to reduce the workload and labor costs of developers, instead of developers manually developing the first page data for adapting the target page on the first running carrier, the server can automatically obtain the first page data for adapting the target page on the first running carrier based on the second page data for adapting the developed target page on the second running carrier.
[0073] The first page data includes: first content to be displayed adapted for display on the first running carrier and rendering instructions for using an API of the second rendering component to call a rendering component to render second content to be displayed, etc.
[0074] In the present application, the first content to be displayed may be obtained according to the second content to be displayed.
[0075] In one embodiment, the first content to be displayed and the second content to be displayed may be the same. Thus, when acquiring the first page data, the second page data may be directly copied and the copy obtained is used as the first page data.
[0076] Alternatively, in another embodiment, there are differences between the first content to be displayed and the second content to be displayed, for example, there are differences between the attributes of the first data to be displayed and the attributes of the second data to be displayed, so the first page data can be obtained by converting the attributes of the second page data.
[0077] For example, the size of the interface of the target page displayed by the first running carrier is different from the size of the interface of the target page displayed by the second running carrier, and the unit of the size of the interface of the target page displayed by the first running carrier is different from the unit of the size of the interface of the target page displayed by the second running carrier. The second content to be rendered in the second page data can be attribute converted to obtain the first content to be rendered, and then the first page data can be obtained.
[0078] The attribute conversion includes conversion of the size of the content in the target page and conversion of the unit of the size of the content in the target page.
[0079] However, since the first page data includes the first content to be displayed for adapting the display on the first running carrier and the rendering instructions for calling the rendering component using the API of the second rendering component to render the second content to be displayed, in this way, when the first running carrier needs to access the target page, if the server returns the first page data of the target page to the first running carrier, the first running carrier generally calls the second rendering component according to the API of the second rendering component, and renders the first data to be displayed according to the called second rendering component.
[0080] Although it may be possible to display the first content to be displayed on the target page carried by the first operation carrier in this way, sometimes, according to actual needs, it is necessary to make the style of displaying the first content to be displayed on the target page carried by the first operation carrier different from that of displaying the second content to be displayed on the target page carried by the second operation carrier. For example, the screen sizes of different operation carriers are different, so that the sizes of the interfaces used by different operation carriers to display pages are different. For example, the size of the screen of the fixed end is different from the size of the screen of the mobile end, then the size of the interface used to display the page on the screen of the fixed end is different from the size of the interface used to display the page on the screen of the mobile end, which will cause the rendering styles of each operation carrier to be different when rendering data. For example, the same content is displayed in a different style on the target page carried by the second operation carrier than on the target page carried by the first operation carrier.
[0081] In one example, it is necessary to display the second content to be displayed in a tabular form on the target page carried by the second running carrier. In this way, the second rendering component may include a table component, etc., and the table component is used to render the first content to be displayed on the target page carried by the second running carrier, so that the first content to be displayed can be displayed in a tabular form on the target page carried by the second running carrier.
[0082] In another example, the same content needs to be displayed in the form of a card on the target page carried by the first running carrier. In this way, the first rendering component adapted to the first running carrier may include a card component, etc., and the card component is used to render the same content on the target page carried by the first running carrier, so that the same content can be displayed in the form of a card on the target page carried by the first running carrier.
[0083] The style of how content is displayed on the page is closely related to the rendering component that renders the content on the page.
[0084] In order to enable the first content to be displayed in the first page data returned by the server to be displayed in the first running carrier in the required style after the first running carrier obtains the first content to be displayed, in the present application, relevant configurations can be made in the server in advance.
[0085] For example, the content on the target page carried by the second running carrier needs to be rendered using the second rendering component, while the content on the target page carried by the first running carrier needs to be rendered using the first rendering component (the style of the content rendered by the first rendering component is different from the style of the content rendered by the second rendering component), the second rendering component has an API, the first rendering component has an API, and the API of the first rendering component is different from the API of the first rendering component. However, after the developer has developed the second page data and the server obtains the first page data, the developer may not care about the API of the first rendering component. For example, the "rendering instruction of using the API of the second rendering component to call the rendering component to render the second content to be displayed" in the first page data is not adjusted.
[0086] In addition, the second rendering component has a component path. The second running carrier can index the component path of the second rendering component according to the API of the second rendering component, and can call the second rendering component (the specific implementation of the second rendering component) according to the component path of the second rendering component. Then, the content can be rendered on the page carried by the second running carrier according to the second rendering component.
[0087] In addition, the first rendering component has a component path. The first running carrier can index the component path of the first rendering component according to the API of the first rendering component, and can call the first rendering component (the specific implementation of the first rendering component) according to the component path of the first rendering component. Then, the content can be rendered on the page carried by the first running carrier according to the first rendering component.
[0088] Secondly, the second page data developed by the developer reflects the API of the second rendering component (eg, a calling instruction for calling the API of the second rendering component), but does not reflect the component path of the second rendering component.
[0089] In this way, it is possible to configure: a mapping between a component identifier of a first rendering component and a component path of the first rendering component under the premise of an API of the second rendering component, and to configure: a mapping between a component identifier of a second rendering component and a component path of the second rendering component under the premise of an API of the second rendering component.
[0090] Different operation carriers have their own carrier identifications, and the carrier identifications of different operation carriers are different. The carrier identification of the first operation carrier is different from the carrier identification of the second operation carrier. In this way, different operation carriers can be distinguished through the carrier identifications.
[0091] In this way, when the second running carrier requests the server to access the target page, the server can index the component path of the second rendering component based on the API of the second rendering component in the second page data, with the help of "the mapping between the component identifier of the second rendering component and the component path of the second rendering component under the premise of the API of the second rendering component", and then obtain the rendering instruction, which is used to instruct the use of the component path of the second rendering component to call the rendering component to render the second content to be displayed, and then return at least the second content to be rendered and the rendering instruction to the second running carrier. So that the second running carrier can call the second rendering component according to the component path of the second rendering component indicated by the rendering instruction to render the second content to be displayed on the target page.
[0092] Alternatively, when the second running carrier requests access to the target page from the server, the server can directly return the second page data to the second running carrier, so that the second running carrier can call the second rendering component to render the second content to be displayed on the target page according to the rendering instructions in the second page data that use the API of the second rendering component to call the rendering component to render the second content to be displayed.
[0093] Alternatively, when the first running carrier requests the server to access the target page, the server can index the component path of the first rendering component based on the API of the first rendering component in the first page data, with the help of "the mapping between the component identifier of the first rendering component and the component path of the first rendering component under the premise of the API of the second rendering component", and then obtain the rendering instruction, the obtained rendering instruction is used to instruct the use of the component path of the first rendering component to call the rendering component to render the first content to be displayed, and then return at least the first content to be rendered and the rendering instruction to the first running carrier. So that the first running carrier can call the first rendering component according to the component path of the first rendering component indicated by the obtained rendering instruction to render the first content to be displayed on the target page.
[0094] In view of this, the correspondence between the API of the rendering component, the carrier identifier of the running carrier and the component path of the rendering component can be set in advance on the server side.
[0095] For the second running carrier, the API of the second rendering component, the carrier identifier of the second running carrier, and the component path of the second rendering component may be stored in the corresponding relationship in advance.
[0096] For example, the server can obtain an add instruction, which carries the API of the second rendering component, the carrier identifier of the second running carrier, and the component path of the second rendering component. The add instruction is used to indicate that a corresponding table item including the API of the second rendering component, the carrier identifier of the second running carrier, and the component path of the second rendering component is stored in the corresponding relationship. For example, a developer can submit an add instruction to the server. The server can receive the add instruction submitted by the developer, and then establish a corresponding table item including the API of the second rendering component, the carrier identifier of the second running carrier, and the component path of the second rendering component, and store the established corresponding table item in the corresponding relationship.
[0097] This application supports developers to configure "the mapping between the component identifier of the second rendering component and the component path of the second rendering component on the premise of the API of the second rendering component" in real time according to actual needs.
[0098] Furthermore, for the first running carrier, the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the first rendering component may also be stored in the corresponding relationship in advance.
[0099] For example, the server can obtain an add instruction, which carries the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the first rendering component. The add instruction is used to indicate that a corresponding table item including the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the first rendering component is stored in the corresponding relationship. For example, a developer can submit an add instruction to the server. The server can receive the add instruction submitted by the developer, and then establish a corresponding table item including the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the first rendering component, and store the established corresponding table item in the corresponding relationship.
[0100] This application supports developers to configure in real time "the mapping between the component identifier of the first rendering component and the component path of the first rendering component under the premise of the API of the second rendering component" according to actual needs.
[0101] Specifically, see Figure 1 and 2 , shows a page processing method of the present application, which is applied to Figure 1 In the page processing system shown, the method includes:
[0102] In step S101, the first operating carrier sends an access request for a target page to a server, and the access request for the target page carries at least a carrier identifier of the first operating carrier.
[0103] In the present application, the user can use the first running carrier to request the server to access the target page. For example, the user can control the first running carrier to send an access request for the target page to the server, and the access request at least carries the carrier identification of the first running carrier, so as to inform the server through the carrier identification of the first running carrier that the access to the target page this time is the access of the first running carrier to the target page.
[0104] When there are multiple pages available for access on the server, the access request may further carry a page identifier of the target page. The page identifier of the target page may include the URL (Uniform Resource Locator) of the target page, etc., so that the server can index the first page data adapted for the target page on the first running carrier from the page data of multiple pages according to the page identifier of the target page.
[0105] In step S102, the server receives an access request for a target page sent by the first operating carrier.
[0106] In step S103, the server obtains first page data adapted for the target page on the first running carrier according to the carrier identifier of the first running carrier in the access request of the target page.
[0107] The server has obtained the first page data adapted for the target page on the first running carrier in advance, and stores the first page data adapted for the target page on the first running carrier in the server.
[0108] The index information for indexing the first page data stored in the server may include: a carrier identifier of the first running carrier. Of course, it is understandable that it may also include a page identifier of the target page, etc.
[0109] In this way, the first page data pre-stored in the server and adapted for the target page on the first running carrier can be obtained according to the carrier identifier of the first running carrier in the access request.
[0110] Alternatively, the first page data pre-stored in the server and adapted for the target page on the first running carrier may be obtained according to the carrier identifier of the first running carrier and the page identifier of the target page in the access request.
[0111] The first page data includes: a first content to be displayed for being adapted for display on the first running carrier and a rendering instruction for calling a rendering component using an API of a second rendering component to render the first content to be displayed. The first content to be displayed is obtained based on a second content to be displayed for being adapted for display on the second running carrier, and the second rendering component includes a rendering component suitable for rendering the second content to be displayed on a target page carried by the second running carrier. The second content to be displayed is located in the developed second page data, the target page of which is adapted on the second running carrier, and the second page data also includes a rendering instruction for calling a rendering component using an API of the second rendering component to render the second content to be displayed.
[0112] In step S104, the server obtains the component path of the first rendering component corresponding to the applicable first rendering component of the second rendering component on the first running carrier according to the carrier identifier of the first running carrier and the API of the second rendering component, and the first rendering component includes a rendering component applicable to rendering the first content to be displayed on the target page carried by the first running carrier.
[0113] In one embodiment of the present application, the component path of the first rendering component can be obtained with the help of the aforementioned configured "mapping between the component identifier of the first rendering component and the component path of the first rendering component under the premise of the API of the second rendering component". For example, the component path of the first rendering component can be obtained with the help of the aforementioned corresponding relationship. For example, in the corresponding relationship between the API of the rendering component, the carrier identifier of the running carrier and the component path of the rendering component, the component path corresponding to the API of the second rendering component and the carrier identifier of the first running carrier is searched to obtain the component path of the first rendering component.
[0114] For an explanation of the corresponding relationship, please refer to the aforementioned embodiments, which will not be described in detail here.
[0115] In step S105, the server obtains a rendering instruction, where the obtained rendering instruction is used to instruct to call the rendering component using the component path of the first rendering component to render the first content to be displayed.
[0116] The rendering instruction may include a component path of the first rendering component.
[0117] The rendering instruction may be generated in real time by the server according to the component path of the first rendering component.
[0118] For example, the server is pre-configured with generation logic, which is used to generate input data and output data. The input data includes a component path of a rendering component, and the output data includes a rendering instruction for instructing to call the rendering component using the component path of the rendering component to render content.
[0119] In step S106, the server sends at least the first content to be displayed and the obtained rendering instruction to the first running carrier.
[0120] According to actual conditions, the server may also send other required data to the first operating carrier, which is not limited in this application.
[0121] In step S107, the first execution carrier at least receives the first content to be displayed sent by the server and the acquired rendering instruction.
[0122] According to actual conditions, if the server also sends other required data to the first operation carrier, the first operation carrier may also receive other required data, which is not limited in this application.
[0123] In step S108, the first execution carrier calls the first rendering component to render the first to-be-displayed content on the target page according to the component path of the first rendering component indicated by the acquired rendering instruction.
[0124] The component path of the first rendering component indicated by the rendering instruction is located in the rendering instruction.
[0125] According to actual conditions, if the first operation carrier also receives other required data, the first operation carrier can also process other required data, etc. This application does not limit this.
[0126] In the present application, the first running carrier sends an access request for the target page to the server, and the access request carries at least the carrier identifier of the first running carrier. The server receives the access request sent by the first running carrier, and obtains the first page data adapted for the target page on the first running carrier according to the carrier identifier of the first running carrier in the access request; the first page data includes: a first content to be displayed adapted for display on the first running carrier and a rendering instruction to call a rendering component using the API of a second rendering component to render the first content to be displayed; the first content to be displayed is obtained based on the second content to be displayed adapted for display on the second running carrier, and the second rendering component includes a rendering component suitable for rendering the second content to be displayed on the target page carried by the second running carrier; the second content to be displayed is located in a developed target page on the second running carrier, and the target page is located in a developed target page on the second running carrier. In the second page data adapted on the first running carrier, the second page data also includes a rendering instruction for using the API of the second rendering component to call the rendering component to render the second content to be displayed; according to the carrier identifier of the first running carrier and the API of the second rendering component, the component path of the first rendering component corresponding to the second rendering component on the first running carrier is obtained, and the first rendering component includes a rendering component suitable for rendering the first content to be displayed on the target page carried by the first running carrier; the rendering instruction is obtained, and the obtained rendering instruction is used to instruct to call the rendering component using the component path of the first rendering component to render the first content to be displayed; at least the first content to be displayed and the obtained rendering instruction are sent to the first running carrier. The first running carrier receives the first content to be displayed and the obtained rendering instruction, and calls the first rendering component according to the component path of the first rendering component indicated by the obtained rendering instruction to render the first content to be displayed on the target page.
[0127] Through the present application, when it is necessary to develop a target page and to place the target page on the first running carrier and the second running carrier respectively, so that the majority of users can access the target page using the first running carrier and can also access the target page using the second running carrier, it is supported that the developer can develop the second page data adapted for the target page on the second running carrier. The second page data includes: a second content to be displayed adapted for display on the second running carrier and a rendering instruction for calling a rendering component using the API of a second rendering component to render the second content to be displayed, etc. In addition, it is supported that the developer may not develop the first page data adapted for the target page on the first running carrier, and the server may automatically obtain the first page data adapted for the target page on the first running carrier according to the second page data adapted for the developed target page on the second running carrier, and the first page data includes: a first content to be displayed adapted for display on the first running carrier and a rendering instruction for calling a rendering component using the API of a second rendering component to render the second content to be displayed, etc. The first content to be displayed is obtained based on the second content to be displayed.
[0128] That is, the developer may not care about the API of the first rendering component. For example, the developer may not adjust the rendering instruction of "using the API of the second rendering component to call the rendering component to render the second content to be displayed" in the first page data.
[0129] The server can automatically configure the mapping between "the component identifier of the first rendering component and the component path of the first rendering component under the premise of the API of the second rendering component". When the first running carrier needs to request the server to access the target page, the server can index the first page data according to the carrier identifier of the first running carrier, and then, according to the carrier identifier of the first running carrier and the API of the second rendering component in the first page data, with the help of the pre-configured mapping between "the component identifier of the first rendering component and the component path of the first rendering component under the premise of the API of the second rendering component", index the component path of the first rendering component, and then obtain the rendering instruction. The obtained rendering instruction is used to instruct the use of the component path of the first rendering component to call the rendering component to render the first content to be displayed, and send the first content to be displayed and the obtained rendering instruction to the first running carrier. After that, the first running carrier can call the first rendering component according to the component path of the first rendering component indicated by the obtained rendering instruction to render the first content to be displayed on the target page.
[0130] Among them, the server's acquisition logic of "automatically obtaining the first page data adapted for the target page on the first running carrier according to the second page data adapted for the target page on the second running carrier", the server's acquisition logic of "obtaining the component path of the first rendering component corresponding to the second rendering component on the first running carrier according to the carrier identifier of the first running carrier and the API of the second rendering component", the server's acquisition logic of "obtaining rendering instructions" and the server's sending logic of "sending the first content to be displayed and the obtained rendering instructions to the first running carrier" and other sets of logic may not be set in real time by the developer on the server when developing the target page, but may be set in advance by the server staff. The above set of logic is applicable to pages that developers need to develop and place on more than two running carriers.
[0131] In this way, a set of logic can be used to reuse multiple pages. That is, after the above set of logic is configured in the server, when the developer needs to develop any page to be placed on more than two running carriers, he can only develop the page data that is adapted to the page on one running carrier, and does not need to develop the page data that is adapted to the page on other running carriers. This allows the page data of a page to be reused on different running carriers, for example, achieving the effect of "develop once, use on multiple terminals", thereby reducing the workload of developers and reducing labor costs.
[0132] In the aforementioned embodiment, when a certain content is rendered by the second rendering component on a page carried by the second running carrier, the content is rendered by the first rendering component on a page carried by the first running carrier. However, sometimes, according to actual needs, it is no longer necessary to deliver the page including the content to the first running carrier, that is, it is no longer necessary to allow the majority of users to access the page including the content through the first running carrier, or the majority of users no longer need to access the page including the content through the first running carrier.
[0133] In view of this, the pre-configured "mapping between the component identifier of the first rendering component and the component path of the first rendering component under the API of the second rendering component" often no longer works. In this way, there is no need to continuously configure "mapping between the component identifier of the first rendering component and the component path of the first rendering component under the API of the second rendering component" to save storage space.
[0134] For example, the server can obtain a deletion instruction. The deletion instruction carries at least a deletion parameter, and the deletion parameter includes at least two of the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the first rendering component. The deletion instruction is used to indicate that the corresponding table item including the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the first rendering component is deleted in the corresponding relationship. For example, a developer can submit a deletion instruction to the server. The server can receive the deletion instruction submitted by the developer. Then, according to the deletion parameter, the corresponding table item including the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the first rendering component is searched in the corresponding relationship. The corresponding table item found is deleted in the corresponding relationship.
[0135] In one example, the deletion parameters include: the API of the second rendering component and the carrier identifier of the first running carrier. In this way, according to the API of the second rendering component and the carrier identifier of the first running carrier, the corresponding table item including the API of the second rendering component, the carrier identifier of the first running carrier and the component path of the first rendering component can be searched in the corresponding relationship, and the corresponding table item found can be deleted in the corresponding relationship.
[0136] Alternatively, in another example, the deletion parameters include: the API of the second rendering component and the component path of the first rendering component. In this way, according to the API of the second rendering component and the component path of the first rendering component, a corresponding table item including the API of the second rendering component, the carrier identifier of the first running carrier and the component path of the first rendering component can be searched in the correspondence relationship, and the corresponding table item found can be deleted in the correspondence relationship.
[0137] Alternatively, in another example, the deletion parameters include: the carrier identifier of the first running carrier and the component path of the first rendering component. In this way, according to the carrier identifier of the first running carrier and the component path of the first rendering component, a corresponding table item including the API of the second rendering component, the carrier identifier of the first running carrier and the component path of the first rendering component can be searched in the corresponding relationship, and the corresponding table item found can be deleted in the corresponding relationship.
[0138] Alternatively, in another example, the deletion parameters include: the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the first rendering component. In this way, a corresponding table item including the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the first rendering component can be searched in the correspondence relationship, and the corresponding table item found can be deleted in the correspondence relationship.
[0139] This application supports developers to delete the configured "mapping between the component identifier of the first rendering component and the component path of the first rendering component based on the API of the second rendering component" in real time according to actual needs to save storage space.
[0140] In the aforementioned embodiment, when a certain content is rendered by the second rendering component on a page carried on the second running carrier, the content is rendered by the first rendering component on a page carried on the first running carrier. However, sometimes, according to actual needs, it is necessary to make the content subsequently rendered by the third rendering component on the page carried on the first running carrier, and no longer rendered by the first rendering component.
[0141] In view of this, it is necessary to modify the pre-configured "mapping between the component identifier of the first rendering component and the component path of the first rendering component under the premise of the API of the second rendering component".
[0142] For example, the server can obtain a modification instruction, for example, the modification instruction carries the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the third rendering component. The modification instruction is used to indicate that the component path corresponding to the API of the second rendering component and the carrier identifier of the first running carrier is replaced with the component path of the third rendering component in the corresponding relationship. For example, a developer can submit a modification instruction to the server. The server can receive the modification instruction submitted by the developer, and then search for the component path corresponding to the API of the second rendering component and the carrier identifier of the first running carrier in the corresponding relationship, and replace the found component path with the component path of the third rendering component in the corresponding relationship.
[0143] This application supports developers to modify the configured "mapping between the component identifier of the first rendering component and the component path of the first rendering component based on the API of the second rendering component" in real time according to actual needs. This application supports developers to adjust the rendering component used to render the content on the page hosted on a specific running carrier in real time to meet actual rendering needs.
[0144] In another embodiment of the present application, a certain rendering component is suitable for rendering the content on the page carried on the second running carrier.
[0145] In one case, the certain rendering component corresponds to another rendering component on the first running carrier, that is, the other rendering component is suitable for rendering the content on the page carried on the first running carrier. For example, if a certain content on the page carried on the second running carrier is rendered by the second running carrier using the certain rendering component, then the other rendering component can be used to render the certain content on the page carried on the first running carrier.
[0146] Alternatively, in another case, if the certain rendering component does not correspond to another rendering component on the first running carrier, there is no other rendering component suitable for rendering the content on the page carried on the first running carrier. For example, a certain content on the page carried on the second running carrier is rendered by the second running carrier using the certain rendering component, but the certain content cannot be rendered using another rendering component on the page carried on the first running carrier.
[0147] For example, the second running carrier is a desktop computer, the first running carrier is a mobile phone, and the first rendering component is a file import component. In one scenario, the majority of users often need to import files on the page hosted on the desktop computer, and the file import component is required to import files, but the majority of users rarely need to import files on the page hosted on the mobile phone.
[0148] In this way, it is often necessary to use a file import component to render content on a page hosted on a desktop computer (the content at this time may include an introduction to related functions related to the import function and the page, etc.) so that the file import component and the rendered file import content can be presented on the page.
[0149] In addition, on the pages hosted by mobile phones, it is often not necessary to use the file import component to render content (the content at this time may include an introduction to related functions related to the import function and the page, etc.), and there is no need to present the file import component and rendered file import related content on the page.
[0150] For this other situation, in the example of "target page, first running carrier, second running carrier, first rendering component and second rendering component" mentioned in the aforementioned embodiment, the second rendering component is suitable for rendering the second content to be displayed on the target page carried on the second running carrier, and the second rendering component does not correspond to the first rendering component on the first running carrier. In this way, the second content to be displayed on the target page carried on the second running carrier is rendered by the second running carrier using the second rendering component, while the first content to be displayed on the target page carried on the first running carrier cannot be rendered using the first rendering component.
[0151] Since the first rendering component cannot be used to render the first content to be displayed on the target page carried on the first running carrier, and since the second rendering component or other components cannot be used to render the first content to be displayed on the target page carried on the first running carrier, no rendering component can be used to render the first content to be displayed on the target page carried on the first running carrier, and thus the first content to be displayed cannot be rendered on the target page carried on the first running carrier.
[0152] Since the first content to be displayed cannot be rendered on the target page carried by the first running carrier, it is unnecessary for the server to send the first content to be displayed to the first running carrier, otherwise network resources will be consumed.
[0153] In addition, if there is other content in the target page, the server can send the other content included in the target page to the first running carrier according to the actual situation, so that the first running carrier can call the appropriate rendering component to render and render the other content on the target page (the specific process can be referred to Figure 2 embodiment shown).
[0154] In order to prevent the server from sending the first content to be displayed to the first running carrier, if the component path of the first rendering component is not obtained according to the carrier identification of the first running carrier and the API of the second rendering component, for example, in the correspondence between the API of the rendering component, the carrier identification of the running carrier and the component path of the rendering component, if the component path corresponding to the API of the second rendering component and the carrier identification of the first running carrier is not found (for example, "the mapping between the component identification of the first rendering component and the component path of the first rendering component under the premise of the API of the second rendering component" is not configured in advance), the sending of the first content to be displayed to the first running carrier can be interrupted, for example, the action of "sending the first content to be displayed to the first running carrier" is intercepted. In addition, since the component path of the first rendering component is not obtained, the component path of the first rendering component will not be sent to the first running carrier.
[0155] In yet another embodiment of the present application, a certain rendering component is adapted to render content on a page carried on the first running carrier.
[0156] In one case, the certain rendering component corresponds to another rendering component on the second running carrier, that is, the other rendering component is suitable for rendering the content on the page carried on the second running carrier. For example, if a certain content on the page carried on the first running carrier is rendered by the first running carrier using the certain rendering component, then the other rendering component can be used to render the certain content on the page carried on the second running carrier.
[0157] Alternatively, in another case, if the certain rendering component does not correspond to another rendering component on the second running carrier, there is no other rendering component suitable for rendering the content on the page carried on the second running carrier. For example, a certain content on the page carried on the first running carrier is rendered by the first running carrier using the certain rendering component, but the certain content cannot be rendered using another rendering component on the page carried on the second running carrier.
[0158] For example, the second running carrier is a desktop computer, the first running carrier is a mobile phone, and the certain rendering component is a code scanning component. In one scenario, the majority of users often need to scan codes on the pages hosted on mobile phones or computers (scanning codes for login or payment, etc.), and scanning codes requires the use of a code scanning component, but the majority of users rarely need to scan codes on the pages hosted on desktop computers.
[0159] In this way, it is often necessary to use a code scanning component to render content on the page hosted by the mobile phone (the content at this time may include an introduction to related functions related to the code scanning function and the page, etc.) so that the code scanning component and the rendered code scanning related content can be presented on the page.
[0160] In addition, on pages hosted on desktop computers, there is often no need to use a scanning component to render content (the content at this time may include an introduction to related functions related to the scanning function and the page, etc.), and there is no need to present a scanning component and rendered scanning-related content on the page.
[0161] For this other situation, in the example of "target page, first running carrier, second running carrier, first rendering component and second rendering component" mentioned in the aforementioned embodiment, the second page data for the second running carrier developed by the developer will not include "the API of the other rendering component (such as the aforementioned code scanning component, etc.) that is not suitable for rendering the content on the page carried on the second running carrier". For example, it will not include "rendering instructions for calling the rendering component to render the content using the API of the other rendering component". That is, the second page data for the second running carrier developed by the developer will not have any clues of the other rendering component, and thus the first page data for the first running carrier obtained based on the second page data will not have any clues of the other rendering component.
[0162] After the first execution carrier obtains the first page data, since the first page data does not contain any clues of the other rendering component, when the first execution carrier displays the target page, the first execution carrier will not call the other rendering component to render content on the page.
[0163] In this way, in order to enable the first carrier to use the other rendering component to render the corresponding content on the target page when displaying the target page, in the present application, unique content to be displayed and unique rendering instructions can be configured in advance. The unique rendering instructions are used to instruct the use of the unique rendering component of the first running carrier relative to the second running carrier to render the unique content to be displayed, so that the server can obtain it later.
[0164] Secondly, it supports subsequent adjustments to the "pre-configured unique content to be displayed and unique rendering instructions" according to actual needs.
[0165] To this end, when the first running carrier has a unique rendering component relative to the second running carrier, the server can obtain the pre-configured unique content to be displayed and the unique rendering instructions, and the unique rendering instructions are used to instruct the use of the unique rendering component of the first running carrier relative to the second running carrier to render the unique content to be displayed, and send the unique content to be displayed and the unique rendering instructions to the first running carrier.
[0166] Afterwards, the first running carrier can receive the unique content to be displayed and the unique rendering instruction sent by the server, so that when the first running carrier renders the first content to be displayed on the target page, the unique rendering component is called according to the component path of the unique rendering component indicated by the unique rendering instruction to render the unique content to be displayed on the target page.
[0167] It should be noted that the unique rendering component does not correspond to the rendering component applicable to the second running carrier. For example, the unique rendering component may include the "another rendering component" mentioned above in this embodiment, such as a code scanning component, etc., or the component path of the unique rendering component is not located in the correspondence between the API of the rendering component, the carrier identifier of the running carrier, and the component path of the rendering component. The second running carrier does not apply the unique rendering component when rendering content on the page it carries.
[0168] It should be noted that, for the method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions involved are not necessarily required by the present application.
[0169] Reference Figure 4, showing a structural block diagram of a page processing device of the present application, which is applied to a server, and the device includes: a first receiving module 11, which is used to receive an access request for a target page sent by a first running carrier, and the access request carries at least a carrier identifier of the first running carrier; a first obtaining module 12, which is used to obtain first page data adapted for the target page on the first running carrier according to the carrier identifier of the first running carrier in the access request; the first page data includes: a first content to be displayed adapted for display on the first running carrier and a rendering instruction to call a rendering component using an API of a second rendering component to render the first content to be displayed; the first content to be displayed is obtained according to a second content to be displayed adapted for display on a second running carrier, and the second rendering component includes a rendering component suitable for rendering the second content to be displayed on a target page carried by the second running carrier; the second content to be displayed is located in the developed second page data adapted for the target page on the second running carrier, and the first rendering component includes a rendering component suitable for rendering the second content to be displayed on the ... The second page data also includes a rendering instruction for using the API of the second rendering component to call the rendering component to render the second content to be displayed; a second acquisition module 13 is used to obtain the component path of the first rendering component corresponding to the second rendering component on the first running carrier according to the carrier identifier of the first running carrier and the API of the second rendering component, and the first rendering component includes a rendering component suitable for rendering the first content to be displayed on the target page carried by the first running carrier; a third acquisition module 14 is used to obtain a rendering instruction, and the obtained rendering instruction is used to instruct to call the rendering component using the component path of the first rendering component to render the first content to be displayed; a first sending module 15 is used to send at least the first content to be displayed and the obtained rendering instruction to the first running carrier; so that the first running carrier receives the first content to be displayed and the obtained rendering instruction; and call the first rendering component according to the component path of the first rendering component indicated by the obtained rendering instruction to render the first content to be displayed on the target page.
[0170] In an optional implementation, the first acquisition module includes: a search unit, used to search for a component path corresponding to the API of the second rendering component and the carrier identifier of the first running carrier in the correspondence between the API of the rendering component, the carrier identifier of the running carrier and the component path of the rendering component, so as to obtain the component path of the first rendering component.
[0171] In an optional implementation, the first acquisition module also includes: a first acquisition unit, used to acquire an add instruction, the add instruction carries the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the first rendering component; the add instruction is used to indicate that a corresponding table item including the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the first rendering component is stored in the corresponding relationship; an establishment unit, used to establish a corresponding table item including the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the first rendering component; a storage unit, used to store the established corresponding table item in the corresponding relationship.
[0172] In an optional implementation, the first acquisition module also includes: a second acquisition unit, used to obtain a deletion instruction, the deletion instruction carries at least a deletion parameter, the deletion parameter includes at least two of the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the first rendering component, the deletion instruction is used to indicate to delete the corresponding table item including the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the first rendering component in the corresponding relationship; a first search unit, used to search for the corresponding table item including the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the first rendering component in the corresponding relationship according to the deletion parameter; a deletion unit, used to delete the corresponding table item found in the corresponding relationship.
[0173] In an optional implementation, the device also includes: a third acquisition unit, used to acquire a modification instruction, the modification instruction carries the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the third rendering component, the modification instruction is used to indicate that the component path corresponding to the API of the second rendering component and the carrier identifier of the first running carrier is replaced with the component path of the third rendering component in the corresponding relationship; a second search unit, used to search for the component path corresponding to the API of the second rendering component and the carrier identifier of the first running carrier in the corresponding relationship; a replacement unit, used to replace the found component path with the component path of the third rendering component in the corresponding relationship.
[0174] In an optional implementation, the device also includes: a fourth acquisition module, which is used to acquire pre-configured unique content to be displayed and unique rendering instructions when the first running carrier has a unique rendering component relative to the second running carrier, and the unique rendering instructions are used to instruct the use of the unique rendering component of the first running carrier relative to the second running carrier to render the unique content to be displayed; the unique rendering component does not correspond to the rendering component applicable to the second running carrier; a second sending module, which is used to send the unique content to be displayed and the unique rendering instructions to the first running carrier; so that the first running carrier receives the unique content to be displayed and the unique rendering instructions sent by the server, and when the first running carrier renders the first content to be displayed on the target page, the unique rendering component is called according to the component path of the unique rendering component indicated by the unique rendering instruction to render the unique content to be displayed on the target page.
[0175] In an optional implementation, the device further includes: a terminal module, configured to interrupt sending the first content to be displayed to the first running carrier when the component path of the first rendering component is not obtained according to the carrier identifier of the first running carrier and the API of the second rendering component.
[0176] In the present application, the first running carrier sends an access request for the target page to the server, and the access request carries at least the carrier identifier of the first running carrier. The server receives the access request sent by the first running carrier, and obtains the first page data adapted for the target page on the first running carrier according to the carrier identifier of the first running carrier in the access request; the first page data includes: a first content to be displayed adapted for display on the first running carrier and a rendering instruction to call a rendering component using the API of a second rendering component to render the first content to be displayed; the first content to be displayed is obtained based on the second content to be displayed adapted for display on the second running carrier, and the second rendering component includes a rendering component suitable for rendering the second content to be displayed on the target page carried by the second running carrier; the second content to be displayed is located in a developed target page on the second running carrier, and the target page is located in a developed target page on the second running carrier. In the second page data adapted on the first running carrier, the second page data also includes a rendering instruction for using the API of the second rendering component to call the rendering component to render the second content to be displayed; according to the carrier identifier of the first running carrier and the API of the second rendering component, the component path of the first rendering component corresponding to the second rendering component on the first running carrier is obtained, and the first rendering component includes a rendering component suitable for rendering the first content to be displayed on the target page carried by the first running carrier; the rendering instruction is obtained, and the obtained rendering instruction is used to instruct to call the rendering component using the component path of the first rendering component to render the first content to be displayed; at least the first content to be displayed and the obtained rendering instruction are sent to the first running carrier. The first running carrier receives the first content to be displayed and the obtained rendering instruction, and calls the first rendering component according to the component path of the first rendering component indicated by the obtained rendering instruction to render the first content to be displayed on the target page.
[0177] Through the present application, when it is necessary to develop a target page and to place the target page on the first running carrier and the second running carrier respectively, so that the majority of users can access the target page using the first running carrier and can also access the target page using the second running carrier, it is supported that the developer can develop the second page data adapted for the target page on the second running carrier. The second page data includes: a second content to be displayed adapted for display on the second running carrier and a rendering instruction for calling a rendering component using the API of a second rendering component to render the second content to be displayed, etc. In addition, it is supported that the developer may not develop the first page data adapted for the target page on the first running carrier, and the server may automatically obtain the first page data adapted for the target page on the first running carrier according to the second page data adapted for the developed target page on the second running carrier, and the first page data includes: a first content to be displayed adapted for display on the first running carrier and a rendering instruction for calling a rendering component using the API of a second rendering component to render the second content to be displayed, etc. The first content to be displayed is obtained based on the second content to be displayed.
[0178] That is, the developer may not care about the API of the first rendering component. For example, the developer may not adjust the rendering instruction of "using the API of the second rendering component to call the rendering component to render the second content to be displayed" in the first page data.
[0179] The server can automatically configure the mapping between "the component identifier of the first rendering component and the component path of the first rendering component under the premise of the API of the second rendering component". When the first running carrier needs to request the server to access the target page, the server can index the first page data according to the carrier identifier of the first running carrier, and then, according to the carrier identifier of the first running carrier and the API of the second rendering component in the first page data, with the help of the pre-configured mapping between "the component identifier of the first rendering component and the component path of the first rendering component under the premise of the API of the second rendering component", index the component path of the first rendering component, and then obtain the rendering instruction. The obtained rendering instruction is used to instruct the use of the component path of the first rendering component to call the rendering component to render the first content to be displayed, and send the first content to be displayed and the obtained rendering instruction to the first running carrier. After that, the first running carrier can call the first rendering component according to the component path of the first rendering component indicated by the obtained rendering instruction to render the first content to be displayed on the target page.
[0180] Among them, the server's acquisition logic of "automatically obtaining the first page data adapted for the target page on the first running carrier according to the second page data adapted for the target page on the second running carrier", the server's acquisition logic of "obtaining the component path of the first rendering component corresponding to the second rendering component on the first running carrier according to the carrier identifier of the first running carrier and the API of the second rendering component", the server's acquisition logic of "obtaining rendering instructions" and the server's sending logic of "sending the first content to be displayed and the obtained rendering instructions to the first running carrier" and other sets of logic may not be set in real time by the developer on the server when developing the target page, but may be set in advance by the server staff. The above set of logic is applicable to pages that developers need to develop and place on more than two running carriers.
[0181] In this way, a set of logic can be used to reuse multiple pages. That is, after the above set of logic is configured in the server, when the developer needs to develop any page to be placed on more than two running carriers, he can only develop the page data that is adapted to the page on one running carrier, and does not need to develop the page data that is adapted to the page on other running carriers. This allows the page data of a page to be reused on different running carriers, for example, achieving the effect of "develop once, use on multiple terminals", thereby reducing the workload of developers and reducing labor costs.
[0182] Reference Figure 5 , showing a structural block diagram of a page processing device of the present application, which is applied to a first running carrier, and the device includes: a third sending module 21, which is used to send an access request for a target page to a server, and the access request carries at least a carrier identifier of the first running carrier; so that the server receives the access request and obtains first page data adapted for the target page on the first running carrier according to the carrier identifier of the first running carrier in the access request; the first page data includes: a first content to be displayed adapted for display on the first running carrier and a rendering instruction to call a rendering component using an API of a second rendering component to render the first content to be displayed; the first content to be displayed is obtained according to a second content to be displayed adapted for display on a second running carrier, and the second rendering component includes a rendering component suitable for rendering the second content to be displayed on a target page carried by the second running carrier; the second content to be displayed is located in a developed first running carrier adapted for display by the target page on the second running carrier In the second page data, the second page data also includes a rendering instruction for using the API of the second rendering component to call the rendering component to render the second content to be displayed; according to the carrier identifier of the first running carrier and the API of the second rendering component, obtain the component path of the first rendering component corresponding to the second rendering component on the first running carrier, and the first rendering component includes a rendering component suitable for rendering the first content to be displayed on the target page carried by the first running carrier; obtain the rendering instruction, and the obtained rendering instruction is used to indicate that the rendering component is called using the component path of the first rendering component to render the first content to be displayed; send at least the first content to be displayed and the obtained rendering instruction to the first running carrier; a second receiving module 22 is used to receive at least the first content to be displayed and the obtained rendering instruction; a first rendering module 23 is used to call the first rendering component according to the component path of the first rendering component indicated by the obtained rendering instruction to render the first content to be displayed on the target page.
[0183] In an optional implementation, the device also includes: a third receiving module, used to receive unique content to be displayed and a unique rendering instruction sent by the server, the unique rendering component does not correspond to the rendering component applicable to the second running carrier; the unique rendering instruction is used to instruct the use of the unique rendering component of the first running carrier relative to the second running carrier to render the unique content to be displayed; the unique content to be displayed and the unique rendering instruction are pre-configured in the server, and are obtained by the server and sent to the first running carrier when there is a unique rendering component in the first running carrier relative to the second running carrier; the second rendering module is used to call the unique rendering component according to the component path of the unique rendering component indicated by the unique rendering instruction to render the unique content to be displayed on the target page when the first running carrier renders the first content to be displayed on the target page.
[0184] In the present application, the first running carrier sends an access request for the target page to the server, and the access request carries at least the carrier identifier of the first running carrier. The server receives the access request sent by the first running carrier, and obtains the first page data adapted for the target page on the first running carrier according to the carrier identifier of the first running carrier in the access request; the first page data includes: a first content to be displayed adapted for display on the first running carrier and a rendering instruction to call a rendering component using the API of a second rendering component to render the first content to be displayed; the first content to be displayed is obtained based on the second content to be displayed adapted for display on the second running carrier, and the second rendering component includes a rendering component suitable for rendering the second content to be displayed on the target page carried by the second running carrier; the second content to be displayed is located in a developed target page on the second running carrier, and the target page is located in a developed target page on the second running carrier. In the second page data adapted on the first running carrier, the second page data also includes a rendering instruction for using the API of the second rendering component to call the rendering component to render the second content to be displayed; according to the carrier identifier of the first running carrier and the API of the second rendering component, the component path of the first rendering component corresponding to the second rendering component on the first running carrier is obtained, and the first rendering component includes a rendering component suitable for rendering the first content to be displayed on the target page carried by the first running carrier; the rendering instruction is obtained, and the obtained rendering instruction is used to instruct to call the rendering component using the component path of the first rendering component to render the first content to be displayed; at least the first content to be displayed and the obtained rendering instruction are sent to the first running carrier. The first running carrier receives the first content to be displayed and the obtained rendering instruction, and calls the first rendering component according to the component path of the first rendering component indicated by the obtained rendering instruction to render the first content to be displayed on the target page.
[0185] Through the present application, when it is necessary to develop a target page and to place the target page on the first running carrier and the second running carrier respectively, so that the majority of users can access the target page using the first running carrier and can also access the target page using the second running carrier, it is supported that the developer can develop the second page data adapted for the target page on the second running carrier. The second page data includes: a second content to be displayed adapted for display on the second running carrier and a rendering instruction for calling a rendering component using the API of a second rendering component to render the second content to be displayed, etc. In addition, it is supported that the developer may not develop the first page data adapted for the target page on the first running carrier, and the server may automatically obtain the first page data adapted for the target page on the first running carrier according to the second page data adapted for the developed target page on the second running carrier, and the first page data includes: a first content to be displayed adapted for display on the first running carrier and a rendering instruction for calling a rendering component using the API of a second rendering component to render the second content to be displayed, etc. The first content to be displayed is obtained based on the second content to be displayed.
[0186] That is, the developer may not care about the API of the first rendering component. For example, the developer may not adjust the rendering instruction of "using the API of the second rendering component to call the rendering component to render the second content to be displayed" in the first page data.
[0187] The server can automatically configure the mapping between "the component identifier of the first rendering component and the component path of the first rendering component under the premise of the API of the second rendering component". When the first running carrier needs to request the server to access the target page, the server can index the first page data according to the carrier identifier of the first running carrier, and then, according to the carrier identifier of the first running carrier and the API of the second rendering component in the first page data, with the help of the pre-configured mapping between "the component identifier of the first rendering component and the component path of the first rendering component under the premise of the API of the second rendering component", index the component path of the first rendering component, and then obtain the rendering instruction. The obtained rendering instruction is used to instruct the use of the component path of the first rendering component to call the rendering component to render the first content to be displayed, and send the first content to be displayed and the obtained rendering instruction to the first running carrier. After that, the first running carrier can call the first rendering component according to the component path of the first rendering component indicated by the obtained rendering instruction to render the first content to be displayed on the target page.
[0188] Among them, the server's acquisition logic of "automatically obtaining the first page data adapted for the target page on the first running carrier according to the second page data adapted for the target page on the second running carrier", the server's acquisition logic of "obtaining the component path of the first rendering component corresponding to the second rendering component on the first running carrier according to the carrier identifier of the first running carrier and the API of the second rendering component", the server's acquisition logic of "obtaining rendering instructions" and the server's sending logic of "sending the first content to be displayed and the obtained rendering instructions to the first running carrier" and other sets of logic may not be set in real time by the developer on the server when developing the target page, but may be set in advance by the server staff. The above set of logic is applicable to pages that developers need to develop and place on more than two running carriers.
[0189] In this way, a set of logic can be used to reuse multiple pages. That is, after the above set of logic is configured in the server, when the developer needs to develop any page to be placed on more than two running carriers, he can only develop the page data that is adapted to the page on one running carrier, and does not need to develop the page data that is adapted to the page on other running carriers. This allows the page data of a page to be reused on different running carriers, for example, achieving the effect of "develop once, use on multiple terminals", thereby reducing the workload of developers and reducing labor costs.
[0190] The embodiment of the present application also provides a non-volatile readable storage medium, which stores one or more modules (programs). When the one or more modules are applied to a device, the device can execute instructions (instructions) of each method step in the embodiment of the present application.
[0191] The present application embodiment provides one or more machine-readable media on which instructions are stored, and when executed by one or more processors, the electronic device executes one or more methods in the above embodiments. In the present application embodiment, the electronic device includes a server, a gateway, a sub-device, etc., and the sub-device is an Internet of Things device or other device.
[0192] The embodiments of the present disclosure may be implemented as an apparatus configured as desired using any appropriate hardware, firmware, software, or any combination thereof, and the apparatus may include electronic devices such as servers (clusters), terminal devices such as IoT devices, and the like.
[0193] Figure 6 An exemplary device 1300 that can be used to implement various embodiments of the present application is schematically shown.
[0194] For one embodiment, Figure 6 An exemplary apparatus 1300 is shown having one or more processors 1302, a control module (chip set) 1304 coupled to at least one of the (one or more) processors 1302, a memory 1306 coupled to the control module 1304, a non-volatile memory (NVM) / storage device 1308 coupled to the control module 1304, one or more input / output devices 1310 coupled to the control module 1304, and a network interface 1312 coupled to the control module 1304.
[0195] The processor 1302 may include one or more single-core or multi-core processors, and the processor 1302 may include any combination of general-purpose processors or special-purpose processors (such as graphics processors, application processors, baseband processors, etc.). In some embodiments, the device 1300 can be used as a server device such as a gateway in the embodiments of the present application.
[0196] In some embodiments, the device 1300 may include one or more computer-readable media (e.g., memory 1306 or NVM / storage device 1308) having instructions 1314 and one or more processors 1302 configured to execute the instructions 1314 in combination with the one or more computer-readable media to implement a module to perform the actions of the present disclosure.
[0197] For one embodiment, the control module 1304 may include any suitable interface controller to provide any suitable interface to at least one of the processor(s) 1302 and / or any suitable device or component in communication with the control module 1304 .
[0198] The control module 1304 may include a memory controller module to provide an interface to the memory 1306. The memory controller module may be a hardware module, a software module, and / or a firmware module.
[0199] The memory 1306 may be used, for example, to load and store data and / or instructions 1314 for the device 1300. For one embodiment, the memory 1306 may include any suitable volatile memory, such as a suitable DRAM. In some embodiments, the memory 1306 may include a double data rate quad synchronous dynamic random access memory (DDR4 SDRAM).
[0200] For one embodiment, control module 1304 may include one or more input / output controllers to provide an interface to NVM / storage device 1308 and input / output device(s) 1310 .
[0201] For example, NVM / storage 1308 may be used to store data and / or instructions 1314. NVM / storage 1308 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable non-volatile storage device(s) (e.g., one or more hard disk drives (HDDs), one or more compact disk (CD) drives, and / or one or more digital versatile disk (DVD) drives).
[0202] NVM / storage device 1308 may include storage resources that are physically part of the device on which apparatus 1300 is installed, or it may be accessible to the device without being part of the device. For example, NVM / storage device 1308 may be accessed via input / output device(s) 1310 over a network.
[0203] (One or more) input / output devices 1310 may provide an interface for the apparatus 1300 to communicate with any other appropriate device, and the input / output device 1310 may include a communication component, a phonetic component, a sensor component, etc. The network interface 1312 may provide an interface for the apparatus 1300 to communicate through one or more networks, and the apparatus 1300 may wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and / or protocols, for example, accessing a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, 5G, etc., or a combination thereof for wireless communication.
[0204] For one embodiment, at least one of the processor(s) 1302 may be packaged together with the logic of one or more controllers (e.g., a memory controller module) of the control module 1304. For one embodiment, at least one of the processor(s) 1302 may be packaged together with the logic of one or more controllers of the control module 1304 to form a system-in-package (SiP). For one embodiment, at least one of the processor(s) 1302 may be integrated on the same die with the logic of one or more controllers of the control module 1304. For one embodiment, at least one of the processor(s) 1302 may be integrated on the same die with the logic of one or more controllers of the control module 1304 to form a system-on-chip (SoC).
[0205] In various embodiments, the device 1300 may be, but is not limited to, a terminal device such as a server, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet computer, a netbook, etc.). In various embodiments, the device 1300 may have more or fewer components and / or a different architecture. For example, in some embodiments, the device 1300 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touch screen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit (ASIC), and a speaker.
[0206] An embodiment of the present application provides an electronic device, comprising: one or more processors; and one or more machine-readable media having instructions stored thereon, which, when executed by the one or more processors, enable the electronic device to perform one or more methods in the present application.
[0207] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0208] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0209] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of the processes and / or blocks in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable information processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable information processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0210] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable information processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable information processing terminal device, so that a series of operation steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable terminal device provide for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1The steps of the functions specified in a box or multiple boxes. Although the preferred embodiments of the present application have been described, once the technical personnel in the field know the basic creative concept, they can make additional changes and modifications to these embodiments. Therefore, the attached claims are intended to be interpreted as including the preferred embodiment and all changes and modifications falling within the scope of the embodiments of the present application. Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or terminal device including a series of elements includes not only those elements, but also includes other elements that are not clearly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of more restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements. The page processing method and device provided by the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A page processing method, characterized in that: Applied to the server, the method includes: receiving an access request for a target page sent by a first running carrier, wherein the access request carries at least a carrier identifier of the first running carrier; According to the carrier identifier of the first running carrier in the access request, first page data adapted for the target page on the first running carrier is obtained; the first page data includes: first content to be displayed adapted for display on the first running carrier and a rendering instruction for calling a rendering component using an application programming interface API of a second rendering component to render the first content to be displayed; the first content to be displayed is obtained according to second content to be displayed adapted for display on the second running carrier, and the second rendering component includes a rendering component suitable for rendering the second content to be displayed on the target page carried by the second running carrier; the second content to be displayed is located in the developed second page data adapted for the target page on the second running carrier, and the second page data also includes a rendering instruction for calling a rendering component using an API of the second rendering component to render the second content to be displayed; According to the carrier identifier of the first running carrier and the API of the second rendering component, a component path of the first rendering component corresponding to the second rendering component on the first running carrier is obtained, wherein the first rendering component includes a rendering component applicable to rendering the first content to be displayed on the target page carried by the first running carrier; Obtaining a rendering instruction, where the obtained rendering instruction is used to instruct to call a rendering component using a component path of a first rendering component to render a first content to be displayed; At least the first content to be displayed and the obtained rendering instruction are sent to the first running carrier; so that the first running carrier receives the first content to be displayed and the obtained rendering instruction; and the first rendering component is called according to the component path of the first rendering component indicated by the obtained rendering instruction to render the first content to be displayed on the target page.
2. The method according to claim 1, characterized in that The acquiring, according to the carrier identifier of the first running carrier and the API of the second rendering component, a component path of the first rendering component corresponding to the second rendering component on the first running carrier includes: In the correspondence between the API of the rendering component, the carrier identifier of the running carrier and the component path of the rendering component, the component path corresponding to the API of the second rendering component and the carrier identifier of the first running carrier is searched to obtain the component path of the first rendering component.
3. The method according to claim 2, characterized in that The method further comprises: Obtain an add instruction, the add instruction carrying the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the first rendering component; the add instruction is used to indicate that a corresponding table item including the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the first rendering component is stored in the corresponding relationship; Establishing a corresponding table entry including the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the first rendering component; The established corresponding table entries are stored in the corresponding relationship.
4. The method according to claim 2, characterized in that: The method further comprises: Get a deletion instruction, the deletion instruction carries at least a deletion parameter, the deletion parameter includes at least two of the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the first rendering component, and the deletion instruction is used to instruct to delete the corresponding table item including the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the first rendering component in the corresponding relationship; Searching, in the corresponding relationship according to the deletion parameter, for a corresponding table entry including the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the first rendering component; Delete the corresponding table entry found in the corresponding relationship.
5. The method according to claim 2, characterized in that: The method further comprises: Obtain a modification instruction, the modification instruction carrying the API of the second rendering component, the carrier identifier of the first running carrier, and the component path of the third rendering component, the modification instruction is used to indicate that the component path corresponding to the API of the second rendering component and the carrier identifier of the first running carrier is replaced with the component path of the third rendering component in the corresponding relationship; Searching the corresponding relationship for the component path corresponding to the API of the second rendering component and the carrier identifier of the first running carrier; In the corresponding relationship, the component path found is replaced with the component path of the third rendering component.
6. The method according to claim 1, characterized in that The method further comprises: In the case where the first running carrier has a unique rendering component relative to the second running carrier, obtaining pre-configured unique content to be displayed and a unique rendering instruction, wherein the unique rendering instruction is used to instruct the unique content to be displayed to be rendered using the unique rendering component of the first running carrier relative to the second running carrier; the unique rendering component does not correspond to a rendering component applicable to the second running carrier; Send unique content to be displayed and unique rendering instructions to the first running carrier; so that the first running carrier receives the unique content to be displayed and the unique rendering instructions, and when the first running carrier renders the first content to be displayed on the target page, the unique rendering component is called according to the component path of the unique rendering component indicated by the unique rendering instruction to render the unique content to be displayed on the target page.
7. The method according to claim 1, characterized in that The method further comprises: When the component path of the first rendering component is not obtained according to the carrier identifier of the first running carrier and the API of the second rendering component, sending the first content to be displayed to the first running carrier is interrupted.
8. A page processing method, characterized in that: Applied to the first operation carrier, the method comprises: An access request for a target page is sent to a server, the access request carrying at least a carrier identifier of a first running carrier; so that the server receives the access request and obtains first page data adapted for the target page on the first running carrier according to the carrier identifier of the first running carrier in the access request; the first page data includes: first content to be displayed adapted for display on the first running carrier and a rendering instruction to call a rendering component using an application programming interface API of a second rendering component to render the first content to be displayed; the first content to be displayed is obtained according to second content to be displayed adapted for display on the second running carrier, the second rendering component includes a rendering component suitable for rendering the second content to be displayed on a target page carried by the second running carrier; the second content to be displayed The content is located in the developed second page data adapted to the target page on the second running carrier, and the second page data also includes a rendering instruction for using the API of the second rendering component to call the rendering component to render the second content to be displayed; according to the carrier identifier of the first running carrier and the API of the second rendering component, the component path of the first rendering component corresponding to the second rendering component on the first running carrier is obtained, and the first rendering component includes a rendering component suitable for rendering the first content to be displayed on the target page carried by the first running carrier; the rendering instruction is obtained, and the obtained rendering instruction is used to instruct to call the rendering component using the component path of the first rendering component to render the first content to be displayed; at least the first content to be displayed and the obtained rendering instruction are sent to the first running carrier; receiving at least first content to be displayed and an acquired rendering instruction; The first rendering component is called according to the component path of the first rendering component indicated by the acquired rendering instruction to render the first content to be displayed on the target page.
9. The method according to claim 8, characterized in that The method further comprises: Receive unique content to be displayed and unique rendering instructions sent by the server, where the unique rendering component does not correspond to a rendering component applicable to the second running carrier; the unique rendering instruction is used to instruct the use of the unique rendering component of the first running carrier relative to the second running carrier to render the unique content to be displayed; the unique content to be displayed and the unique rendering instructions are pre-configured in the server, and are obtained by the server and sent to the first running carrier when the first running carrier has a unique rendering component relative to the second running carrier; When the first running carrier renders the first content to be displayed on the target page, the unique rendering component is called according to the component path of the unique rendering component indicated by the unique rendering instruction to render the unique content to be displayed on the target page.
10. A page processing device, characterized in that: Applied to the server, the device comprises: A first receiving module, configured to receive an access request for a target page sent by a first running carrier, wherein the access request carries at least a carrier identifier of the first running carrier; A first acquisition module is used to acquire first page data adapted for a target page on a first running carrier according to a carrier identifier of a first running carrier in an access request; the first page data includes: first content to be displayed adapted for display on the first running carrier and a rendering instruction for calling a rendering component using an application programming interface API of a second rendering component to render the first content to be displayed; the first content to be displayed is obtained according to second content to be displayed adapted for display on a second running carrier, the second rendering component includes a rendering component suitable for rendering the second content to be displayed on a target page carried by the second running carrier; the second content to be displayed is located in a developed second page data adapted for the target page on the second running carrier, the second page data also includes a rendering instruction for calling a rendering component using an API of the second rendering component to render the second content to be displayed; A second acquisition module is used to acquire, according to the carrier identifier of the first running carrier and the API of the second rendering component, a component path of the first rendering component corresponding to the second rendering component on the first running carrier, wherein the first rendering component includes a rendering component applicable to rendering the first content to be displayed on a target page carried by the first running carrier; A third acquisition module is used to acquire a rendering instruction, where the acquired rendering instruction is used to instruct to call the rendering component using the component path of the first rendering component to render the first content to be displayed; The first sending module is used to send at least the first content to be displayed and the obtained rendering instruction to the first running carrier; so that the first running carrier receives the first content to be displayed and the obtained rendering instruction; and call the first rendering component according to the component path of the first rendering component indicated by the obtained rendering instruction to render the first content to be displayed on the target page.
11. A page processing device, characterized in that: Applied to a first operation carrier, the device comprises: The third sending module is used to send an access request for the target page to the server, and the access request carries at least the carrier identification of the first running carrier; so that the server receives the access request and obtains the first page data adapted for the target page on the first running carrier according to the carrier identification of the first running carrier in the access request; the first page data includes: a first content to be displayed adapted for display on the first running carrier and a rendering instruction to call a rendering component using an application programming interface API of a second rendering component to render the first content to be displayed; the first content to be displayed is obtained according to a second content to be displayed adapted for display on the second running carrier, and the second rendering component includes a rendering component suitable for rendering the second content to be displayed on the target page carried by the second running carrier; the third sending module is used to send an access request for the target page to be displayed, and the access request carries at least the carrier identification of the first running carrier ... third sending module is used to send an access request for the target page to be displayed, and the access request carries at least the carrier identification of the first running carrier; the third sending module is used to send an access request for the target page to be displayed, and the access request carries at least the carrier identification of the first running carrier; the third sending module is used to send an access request for the target page to be displayed, and the access request carries at least the carrier identification of the first running carrier; the third sending module is used to send an access request for the target page to be displayed, and the access request carries at least the carrier identification of the first running carrier; the third sending module is used to send The second content to be displayed is located in the developed second page data adapted to the target page on the second running carrier, and the second page data also includes a rendering instruction for using the API of the second rendering component to call the rendering component to render the second content to be displayed; according to the carrier identifier of the first running carrier and the API of the second rendering component, the component path of the first rendering component corresponding to the second rendering component on the first running carrier is obtained, and the first rendering component includes a rendering component suitable for rendering the first content to be displayed on the target page carried by the first running carrier; the rendering instruction is obtained, and the obtained rendering instruction is used to instruct to call the rendering component using the component path of the first rendering component to render the first content to be displayed; at least the first content to be displayed and the obtained rendering instruction are sent to the first running carrier; A second receiving module, configured to receive at least the first content to be displayed and the acquired rendering instruction; The first rendering module is used to call the first rendering component to render the first content to be displayed on the target page according to the component path of the first rendering component indicated by the acquired rendering instruction.
12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the method according to any one of claims 1 to 9 are implemented.
13. A computer-readable storage medium, characterized in that: A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Page rendering method and device, rendering server and storage medium
CN111045655A
Control page generation method and device, intelligent equipment and storage medium
CN114327709A
Data processing method and device, electronic equipment and storage medium
CN114416084A
Page display method and device, storage medium and computer equipment
CN115016838A
Virtualized rendering
US10095669B1