A page processing method and apparatus
By automatically configuring page data mapping across different operating platforms on the server side, the problem of large workload in developing pages on different operating platforms is solved, page data reuse is realized, and development costs are reduced.
Patent Information
- Application Number
- CN202310929348.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-26
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2043-07-26
AI Technical Summary
Developers need to develop page data for different operating platforms, resulting in a large workload and high labor costs. In particular, since the technology stacks and rendering components of different operating platforms are different, rendering instructions need to be written separately.
The server automatically obtains and configures the page data of the target page in the first runtime based on the page data of the developed target page in the second runtime, and uses the API of the second rendering component to map the component path of the first rendering component to achieve page data reuse across runtimes.
It reduces the workload of developers, enables one-time development for use on different operating platforms, and reduces labor costs.
Smart Images

Figure CN119376829B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a page processing method and apparatus. Background Technology
[0002] Currently, many service providers offer services to the outside world (e.g., to a wide range of users) through web pages. In order to provide services in a more user-friendly way, service providers often render content on the page, such as using tables or cards, to provide services to the outside world through rendered content. Summary of the Invention
[0003] This application discloses a page processing method and apparatus.
[0004] In a first aspect, this application discloses a page processing method applied to a server. The method includes: receiving an access request for a target page sent by a first runtime carrier, the access request carrying at least a carrier identifier of the first runtime carrier; obtaining first page data adapted by the target page on the first runtime carrier based on the carrier identifier of the first runtime carrier in the access request; the first page data includes: first content to be displayed adapted for display on the first runtime carrier and rendering instructions for rendering the first content to be displayed by calling a rendering component using the API of a second rendering component; the first content to be displayed is obtained based on second content to be displayed adapted for display on a second runtime carrier, the second rendering component includes a rendering component on the target page carried by the second runtime carrier suitable for rendering the second content to be displayed; the second content to be displayed is located on a developed second page adapted by the target page on the second runtime carrier. The data for the second page also includes rendering instructions that call the rendering component using the API of the second rendering component to render the second content to be displayed; obtaining the component path of the first rendering component applicable to the second rendering component on the first running vehicle according to the carrier identifier of the first running vehicle and the API of the second rendering component, wherein the first rendering component includes rendering components applicable to rendering the first content to be displayed on the target page carried by the first running vehicle; obtaining rendering instructions, wherein the obtained rendering instructions are used to instruct the rendering component to be called using the component path of the first rendering component to render the first content to be displayed; sending at least the first content to be displayed and the obtained rendering instructions to the first running vehicle; so that the first running vehicle receives the first content to be displayed and the obtained rendering instructions; and calling 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 obtained rendering instructions.
[0005] In one optional implementation, obtaining the component path of the first rendering component corresponding to the second rendering component on the first running vehicle based on the carrier identifier of the first running vehicle 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 identifier of the first running vehicle in the correspondence among the API of the rendering component, the carrier identifier of the running vehicle and the component path of the rendering component, to obtain the component path of the first rendering component.
[0006] In an optional implementation, the method further includes: obtaining an add instruction, the add instruction carrying the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the first rendering component; the add instruction being used to instruct the storage of a corresponding table entry in the correspondence relationship including the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the first rendering component; establishing a corresponding table entry including the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the first rendering component; and storing the established corresponding table entry in the correspondence relationship.
[0007] In an optional implementation, the method further includes: obtaining a deletion instruction, the deletion instruction carrying at least deletion parameters, the deletion parameters including at least two of the following: the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the first rendering component; the deletion instruction being used to instruct the deletion of a corresponding entry in the correspondence relationship that includes the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the first rendering component; searching for a corresponding entry in the correspondence relationship that includes the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the first rendering component according to the deletion parameters; and deleting the found corresponding entry in the correspondence relationship.
[0008] In an optional implementation, the method further includes: obtaining a modification instruction, the modification instruction carrying the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the third rendering component, the modification instruction being used to instruct the component path corresponding to the API of the second rendering component and the carrier identifier of the first runtime carrier to be replaced with the component path of the third rendering component in the correspondence relationship; searching for the component path corresponding to the API of the second rendering component and the carrier identifier of the first runtime carrier in the correspondence relationship; and replacing the found component path with the component path of the third rendering component in the correspondence relationship.
[0009] In an optional implementation, the method further includes: when the first runtime carrier has a unique rendering component relative to the second runtime carrier, obtaining pre-configured unique content to be displayed and unique rendering instructions, wherein the unique rendering instructions are used to instruct the unique rendering component of the first runtime carrier relative to the second runtime carrier to render the unique content to be displayed; the unique rendering component does not correspond to a rendering component applicable to the second runtime carrier; sending the unique content to be displayed and unique rendering instructions to the first runtime carrier; so that the first runtime carrier receives the unique content to be displayed and unique rendering instructions sent by the server, and when the first runtime carrier renders the first content to be displayed on the target page, it also calls the unique rendering component to render the unique content to be displayed on the target page according to the component path of the unique rendering component indicated by the unique rendering instructions.
[0010] In an optional implementation, the method further includes: interrupting the sending of the first content to be displayed to the first runtime carrier if the component path of the first rendering component is not obtained based on the carrier identifier of the first runtime carrier and the API of the second rendering component.
[0011] Secondly, this application discloses a page processing method applied to a first runtime carrier. 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 runtime carrier; enabling the server to receive the access request and, based on the carrier identifier of the first runtime carrier in the access request, obtaining first page data adapted for the target page on the first runtime carrier; the first page data includes: first content to be displayed adapted for display on the first runtime carrier and rendering instructions for rendering the first content to be displayed by calling a rendering component using the API of a second rendering component; the first content to be displayed is obtained based on second content to be displayed adapted for display on a second runtime carrier, the second rendering component includes a rendering component suitable for rendering the second content to be displayed on the target page carried on the second runtime carrier; the second content to be displayed is located on an already developed target page on the second runtime carrier. The second page data adapted above also includes rendering instructions that call the rendering component using the API of the second rendering component to render the second content to be displayed; obtaining the component path of the first rendering component applicable to the second rendering component on the first running vehicle according to the carrier identifier of the first running vehicle and the API of the second rendering component, the first rendering component includes rendering components applicable to rendering the first content to be displayed on the target page carried by the first running vehicle; obtaining rendering instructions, the obtained rendering instructions are used to instruct the rendering component to be called using the component path of the first rendering component to render the first content to be displayed; sending at least the first content to be displayed and the obtained rendering instructions to the first running vehicle; receiving at least the first content to be displayed and the obtained rendering instructions; calling 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 obtained rendering instructions.
[0012] In an optional implementation, the method further includes: receiving unique content to be displayed and unique rendering instructions sent by the server, wherein the unique rendering component does not correspond to a rendering component applicable to the second runtime carrier; the unique rendering instructions are used to instruct the unique rendering component of the first runtime carrier relative to the second runtime 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 runtime carrier when the first runtime carrier has a unique rendering component relative to the second runtime carrier; when the first runtime carrier renders the first content to be displayed on the target page, the unique rendering component is called to render the unique content to be displayed on the target page according to the component path of the unique rendering component indicated by the unique rendering instructions.
[0013] Thirdly, this application discloses a page processing apparatus applied to a server. The apparatus includes: a first receiving module, configured to receive an access request for a target page sent by a first runtime carrier, the access request carrying at least a carrier identifier of the first runtime carrier; a first obtaining module, configured to obtain first page data adapted for the target page on the first runtime carrier based on the carrier identifier of the first runtime carrier in the access request; the first page data includes: first content to be displayed adapted for display on the first runtime carrier and rendering instructions for rendering the first content to be displayed by calling a rendering component using the API of a second rendering component; the first content to be displayed is obtained based on second content to be displayed adapted for display on a second runtime carrier, the second rendering component including a rendering component suitable for rendering the second content to be displayed on the target page carried by the second runtime carrier; the second content to be displayed is located in the developed second page data adapted for the target page on the second runtime carrier. The second-page data also includes rendering instructions that use the API of the second rendering component to call the rendering component to render the second content to be displayed; a second acquisition module, used to acquire, based on the carrier identifier of the first running carrier and the API of the second rendering component, the component path of the first rendering component applicable to the second rendering component on the first running carrier, the first rendering component including rendering components applicable to rendering the first content to be displayed on the target page carried by the first running carrier; a third acquisition module, used to acquire rendering instructions, the acquired rendering instructions being used to instruct the rendering component to be called using the component path of the first rendering component to render the first content to be displayed; a first sending module, used to send at least the first content to be displayed and the acquired rendering instructions to the first running carrier; so that the first running carrier receives the first content to be displayed and the acquired rendering instructions; and calls 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 instructions.
[0014] In an optional implementation, the first acquisition module includes a lookup unit, used to look up the component path corresponding to the API of the second rendering component and the carrier identifier of the first running vehicle in the correspondence among the API of the rendering component, the carrier identifier of the running vehicle 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 further includes: a first acquisition unit, configured to acquire an add instruction, the add instruction carrying the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the first rendering component; the add instruction is configured to instruct the storage of a corresponding table entry including the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the first rendering component in the correspondence relationship; an establishment unit, configured to establish a corresponding table entry including the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the first rendering component; and a storage unit, configured to store the established corresponding table entry in the correspondence relationship.
[0016] In an optional implementation, the first acquisition module further includes: a second acquisition unit, configured to acquire a deletion instruction, the deletion instruction carrying at least deletion parameters, the deletion parameters including at least two of the following: the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the first rendering component; the deletion instruction being configured to instruct the deletion of a corresponding entry in the correspondence relationship that includes the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the first rendering component; a first search unit, configured to search for a corresponding entry in the correspondence relationship that includes the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the first rendering component according to the deletion parameters; and a deletion unit, configured to delete the found corresponding entry in the correspondence relationship.
[0017] In an optional implementation, the apparatus further includes: a third acquisition unit, configured to acquire a modification instruction, the modification instruction carrying the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the third rendering component, the modification instruction being configured to instruct the component path corresponding to the API of the second rendering component and the carrier identifier of the first runtime carrier to be replaced with the component path of the third rendering component in the correspondence relationship; a second search unit, configured to search for the component path corresponding to the API of the second rendering component and the carrier identifier of the first runtime carrier in the correspondence relationship; and a replacement unit, configured to replace the found component path with the component path of the third rendering component in the correspondence relationship.
[0018] In an optional implementation, the apparatus further includes: a fourth acquisition module, configured to acquire, when the first running vehicle has a unique rendering component relative to the second running vehicle, pre-configured unique content to be displayed and unique rendering instructions, wherein the unique rendering instructions are used to instruct the use of the unique rendering component of the first running vehicle relative to the second running vehicle to render the unique content to be displayed; the unique rendering component does not correspond to a rendering component applicable to the second running vehicle; and a second sending module, configured to send the unique content to be displayed and unique rendering instructions to the first running vehicle; so that the first running vehicle receives the unique content to be displayed and unique rendering instructions sent by the server, and when the first running vehicle renders the first content to be displayed on the target page, it also calls the unique rendering component to render the unique content to be displayed on the target page according to the component path of the unique rendering component indicated by the unique rendering instructions.
[0019] In an optional implementation, the apparatus further includes a terminal module, configured to interrupt the transmission of the first content to be displayed to the first running carrier if the component path of the first rendering component is not obtained based on the carrier identifier of the first running carrier and the API of the second rendering component.
[0020] Fourthly, this application discloses a page processing apparatus applied to a first runtime carrier. The apparatus includes: a third sending module, configured to send an access request for a target page to a server, the access request carrying at least a carrier identifier of the first runtime carrier; so that the server receives the access request and, based on the carrier identifier of the first runtime carrier in the access request, obtains first page data adapted for the target page on the first runtime carrier; the first page data includes: first content to be displayed adapted for display on the first runtime carrier and rendering instructions for using the API of a second rendering component to call a rendering component to render the first content to be displayed; the first content to be displayed is obtained based on second content to be displayed adapted for display on a second runtime carrier, the second rendering component includes a rendering component on the target page carried by the second runtime carrier suitable for rendering the second content to be displayed; the second content to be displayed is located in a previously developed, first page data adapted for the target page on the second runtime carrier. The second page data also includes rendering instructions that call the rendering component using the API of the second rendering component to render the second content to be displayed; obtaining the component path of the first rendering component applicable to the second rendering component on the first running vehicle according to the carrier identifier of the first running vehicle and the API of the second rendering component, the first rendering component including rendering components applicable to rendering the first content to be displayed on the target page carried by the first running vehicle; obtaining rendering instructions, the obtained rendering instructions are used to instruct the rendering component to be called using the component path of the first rendering component to render the first content to be displayed; sending at least the first content to be displayed and the obtained rendering instructions to the first running vehicle; a second receiving module, used to receive at least the first content to be displayed and the obtained rendering instructions; and a first rendering module, 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 obtained rendering instructions.
[0021] In an optional implementation, the apparatus further includes: a third receiving module, configured to receive unique content to be displayed and unique rendering instructions sent by the server, wherein the unique rendering component does not correspond to a rendering component applicable to the second runtime carrier; the unique rendering instructions are used to instruct the use of a unique rendering component of the first runtime carrier relative to the second runtime 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 runtime carrier when the first runtime carrier has a unique rendering component relative to the second runtime carrier; and a second rendering module, configured to, when the first runtime carrier renders the first content to be displayed on the target page, call the unique rendering component to render the unique content to be displayed on the target page according to the component path of the unique rendering component indicated by the unique rendering instructions.
[0022] Fifthly, this application discloses an electronic device comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to perform the methods shown in any of the foregoing aspects.
[0023] Sixthly, this application discloses a non-transitory computer-readable storage medium that, when the instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform the methods shown in any of the foregoing aspects.
[0024] In a seventh aspect, this application discloses a computer program product in which, when the instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to perform the methods shown in any of the foregoing aspects.
[0025] Compared with the prior art, this application has the following advantages:
[0026] In this application, a first runtime carrier sends an access request for a target page to a server, the access request carrying at least the carrier identifier of the first runtime carrier. The server receives the access request from the first runtime carrier and, based on the carrier identifier in the access request, obtains first page data adapted for the target page on the first runtime carrier. The first page data includes: first content to be displayed adapted for display on the first runtime carrier and rendering instructions for using the API of a second rendering component to call a rendering component to render the first content to be displayed. The first content to be displayed is obtained based on second content to be displayed adapted for display on a second runtime carrier. The second rendering component includes a rendering component suitable for rendering the second content to be displayed on the target page hosted on the second runtime carrier. The second content to be displayed is located in an already developed target page hosted on the second runtime carrier. The second page data adapted to the first runtime carrier also includes rendering instructions that call the rendering component using the API of the second rendering component to render the second content to be displayed; based on the carrier identifier of the first runtime carrier and the API of the second rendering component, the component path of the first rendering component applicable to the second rendering component on the first runtime carrier is obtained, the first rendering component includes rendering components applicable to rendering the first content to be displayed on the target page hosted on the first runtime carrier; rendering instructions are obtained, the obtained rendering instructions are used to instruct the rendering component to be called 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 instructions are sent to the first runtime carrier. The first runtime carrier receives the first content to be displayed and the obtained rendering instructions, and calls 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 obtained rendering instructions.
[0027] This application provides a solution for situations where a target page needs to be developed and deployed on both a first and a second runtime platform, allowing users to access the target page via both platforms. The solution supports developers in creating second-page data adapted for the target page on the second runtime platform. This second-page data includes second content to be displayed on the second runtime platform and rendering instructions that use the API of the second rendering component to call the rendering component to render the second content. Alternatively, developers can choose not to develop first-page data adapted for the target page on the first runtime platform. Instead, the server can automatically obtain the first-page data adapted for the target page on the first runtime platform based on the already developed second-page data. This first-page data includes first content to be displayed on the first runtime platform and rendering instructions that use the API of the second rendering component to call the rendering component to render the second content. The first content to be displayed is derived from the second content to be displayed.
[0028] In other words, developers don't need to care about the API of the first rendering component. For example, they don't need to adjust the "rendering instructions in the first page data that call the rendering component using the API of the second rendering component to render the second content to be displayed".
[0029] The server can automatically configure the mapping between "the component identifier and the component path of the first rendering component, given the API of the second rendering component". When the first runtime needs to request the server to access the target page, the server can index the first page data based on the carrier identifier of the first runtime. Then, based on the carrier identifier of the first runtime and the API of the second rendering component in the first page data, and with the help of the pre-configured mapping between "the component identifier and the component path of the first rendering component, given the API of the second rendering component", the server can index the component path of the first rendering component, and then obtain the rendering instruction. The obtained rendering instruction is used to instruct the rendering component to use the component path of the first rendering component to render the first content to be displayed, and sends the first content to be displayed and the obtained rendering instruction to the first runtime. Afterwards, the first runtime can 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 obtained rendering instruction.
[0030] The following set of logics can be configured: the server-side logic for "automatically obtaining the first page data adapted to the first running platform based on the second page data adapted to the second running platform," the server-side logic for "obtaining the component path of the first rendering component corresponding to the first rendering component on the first running platform based on the carrier identifier of the first running platform and the API of the second rendering component," the server-side logic for "obtaining rendering instructions," and the server-side logic for "sending the first content to be displayed and the obtained rendering instructions to the first running platform." These logics do not need to be set by the developers in real time on the server when developing the target page, but can be set in advance by the server staff. This set of logics is applicable to pages that developers need to develop and deploy on two or more running platforms.
[0031] In this way, a single set of logic can be reused across multiple pages. That is, after configuring the above set of logic on the server side, developers only need to develop the page data adapted for one running platform when they need to develop any page that is deployed on two or more running platforms. They do not need to develop the page data adapted for other running platforms. This allows a single set of page data to be reused on different running platforms, achieving the effect of "develop once, use on multiple platforms". This reduces the workload of developers and lowers labor costs. Attached Figure Description
[0032] Figure 1 This is a structural block diagram of a page processing system according to this application.
[0033] Figure 2 This is a flowchart of one of the page processing methods described in this application.
[0034] Figure 3 This is a flowchart of one of the page processing methods described in this application.
[0035] Figure 4 This is a structural block diagram of a page processing device according to this application.
[0036] Figure 5 This is a structural block diagram of a page processing device according to this application.
[0037] Figure 6 This is a structural block diagram of a device according to this application. Detailed Implementation
[0038] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0039] Many specific details are set forth in the following description to provide 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 extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.
[0040] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as 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 various platforms on the market that can support web pages, such as desktop computers (e.g., desktop computer browsers), applications (e.g., mobile applications), and mini-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 use multiple operating platforms to carry the pages, so that the pages carried by the different operating platforms can provide services to the outside world separately.
[0043] In order to provide services to the outside world through pages hosted on various platforms, developers can develop pages for each platform in advance, such as pages hosted on desktop computers, pages hosted on applications, and pages hosted on mini-programs.
[0044] However, the inventors discovered that developing separate pages for different operating platforms would be labor-intensive and costly.
[0045] This led to the need to reduce the workload of developers and lower labor costs.
[0046] To reduce the workload of developers and lower labor costs, the inventors analyzed the reasons why "developers have a large workload in creating pages that are hosted on various runtime platforms" and found that:
[0047] The technology stacks of different runtime platforms that carry pages are often different. The technology stack at least involves the rendering components supported by the rendering of the content in the page. Thus, the rendering components supported by the rendering of content in pages carried by different runtime platforms are often different.
[0048] During the page development phase, developers often develop pages by writing page data (such as computer program code for the page). In the process of writing page data, developers need to specifically write page data based on the technology stack supported by the runtime environment that carries the page.
[0049] For example, in the process of developing page data for pages carried by different runtime environments, different rendering instructions need to be written for rendering content on the page.
[0050] For example, the rendering component exposes an API (Application Programming Interface). When rendering content, the rendering component needs to be used. Thus, the rendering statements used to render content on the page include rendering instructions that use the rendering component's API to call the rendering component to render the content.
[0051] However, different runtime environments support different rendering components, or, depending on service requirements, different rendering components need to be used in pages hosted on different runtime environments, and different rendering components expose different APIs.
[0052] In one example, the rendering component required for a desktop-hosted page is a table component, meaning that the content needs to be rendered using tables to distribute the content across the table for user viewing. Therefore, during the development of the page data for the desktop-hosted page, rendering instructions can be written that use API calls to the table component to render the content.
[0053] In another example, the rendering component required by the service on the page hosted by the application is a card component. That is, the page needs to use cards to render content, distributing it among the cards for the user to view. Therefore, during the development of the page data for the page hosted by the application, rendering instructions can be written that use API calls to the card component to render content.
[0054] Therefore, page data needs to be developed separately for pages carried by different operating platforms. For example, if a service provider needs to use certain operating platforms to carry pages to provide services to the outside world, then it needs to write page data for each of these operating platforms separately. In other words, it is necessary to write a set of page data for each operating platform separately, which results in a large workload and high labor costs for writing page data.
[0055] For this reason, the inventors realized that if developers could write a set of page data for only one operating platform, and this set of page data could be adapted to be reused on other operating platforms, then the effect of "develop once, use on multiple platforms" could be achieved, thereby reducing the workload of developers and reducing labor costs.
[0056] In order to enable the creation of a set of page data for a single operating platform and the adaptability of this set of page data to be reused on various other operating platforms, the solution proposed in this application is proposed.
[0057] See Figure 1 The diagram shows a structural block diagram of a page processing system according to this application. The page processing system includes a server 01 and multiple runtime environments 02.
[0058] The server can communicate and connect with each running platform.
[0059] In one embodiment, the multiple operating platforms can be of various types, such as fixed-end operating platforms and mobile operating platforms. Fixed-end operating platforms can include desktop computers, etc. Mobile operating platforms can include mobile phones, tablet computers, and PDAs (Personal Digital Assistants).
[0060] Figure 1 The following examples illustrate this point: mobile devices, including smartphones (021), and desktop computers (022), are used as examples of devices that can operate on these devices.
[0061] Different types of runtime environments may have different operating systems, or different types of runtime environments may have different sizes of interfaces used to display pages, etc.
[0062] The following examples illustrate the solution of this application using a first operating medium and a second operating medium, but these are not intended to limit the scope of the application. The first operating medium and the second operating medium are different; for example, the first operating medium is a mobile phone, and the second operating medium is a desktop computer.
[0063] In this application, for a single page, such as a target page, it is necessary to deploy the target page on both a first and a second runtime platform, so that a wide range of users can access the target page using both the first and second runtime platforms. The content displayed on the target page hosted on the first runtime platform can be the same as the content displayed on the target page hosted on the second runtime platform.
[0064] Therefore, developers can develop the target page in advance. In one example, developers can develop the target page that is hosted on the second runtime platform in advance. For example, they can develop the second page data that the target page adapts to the second runtime platform in advance.
[0065] The second page data includes: the second content to be displayed, which is adapted for display on the second runtime carrier, and rendering instructions that use 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 for adaptation and display on the second operating medium may include: data that the developers decide to display on the target page carried on the second operating medium 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 adaptation on the second operating platform can be understood as follows: the second content to be displayed developed by the developers is specifically developed for adaptation on the second operating platform, and some attributes of the second content to be displayed are adapted to the second operating platform, such as the size of the second content to be displayed being adapted to the size of the target page of the second operating platform, the unit of the size of the second content to be displayed being adapted to the unit of the size of the target page of the second operating platform, 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 runtime 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 runtime carrier.
[0069] For example, the second runtime carrier supports the use of the second rendering component when rendering content on the target page carried by the second runtime carrier, but other runtime carriers other than the second runtime carrier do not support the use of the second rendering component when rendering content on the target page carried by the second runtime carrier. That is, the second rendering component can be used by the second runtime carrier, but cannot be used by other runtime carriers other than the second runtime carrier. Thus, the developer needs to specify that the second runtime carrier uses the second rendering component when rendering the second content to be displayed on the target page carried by the second runtime carrier.
[0070] For example, the second runtime carrier and at least one runtime carrier other than the second runtime carrier can both support the use of the second rendering component when rendering data on the target page they carry. In this way, developers can actively specify that the second runtime carrier should use the second rendering component when rendering the second content to be displayed on the target page carried by the second runtime carrier.
[0071] Secondly, since the target page also needs to be deployed on the first operating platform, and since the content of the target page carried by the first operating platform can be the same as the content of the target page carried by the second operating platform, the second content to be displayed needs to be displayed on the target page carried by the second operating platform, 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 operating platform.
[0072] Therefore, in order to reduce the workload and labor costs of developers, instead of developers manually developing the first page data adapted for the target page on the first running platform, the server can automatically obtain the first page data adapted for the target page on the first running platform based on the second page data adapted for the target page on the second running platform.
[0073] The first page data includes: the first content to be displayed, which is adapted for display on the first running vehicle, and rendering instructions that use the API of the second rendering component to call the rendering component to render the second content to be displayed.
[0074] In this application, the first content to be displayed may be obtained based on the second content to be displayed.
[0075] In one embodiment, the first content to be displayed and the second content to be displayed can be the same. In this way, when obtaining the first page data, the second page data can be directly copied and used as the first page data.
[0076] Alternatively, in another embodiment, there is a difference between the first content to be displayed and the second content to be displayed. For example, the attributes of the first data to be displayed are different from the attributes of the second data to be displayed. In this case, the first page data can be obtained by performing attribute conversion on the second page data.
[0077] For example, the size of the interface used by the first runtime carrier to display the target page is different from the size of the interface used by the second runtime carrier to display the target page, and the unit of the size of the interface used by the first runtime carrier to display the target page is different from the unit of the size of the interface used by the second runtime carrier to display the target page. The second content to be rendered in the second page data can be converted by attribute to obtain the first content to be rendered, and then the first page data can be obtained.
[0078] Attribute conversion includes the conversion of the size of the content on the target page and the conversion of the units of the size of the content on the target page.
[0079] However, since the first page data includes the first content to be displayed for adaptation and display on the first running vehicle and the rendering instructions for using the API of the second rendering component to call the rendering component to render the second content to be displayed, if the server returns the first page data of the target page to the first running vehicle when the first running vehicle needs to access the target page, the first running vehicle will generally call the second rendering component according to the API of the second rendering component and render the first content to be displayed according to the called second rendering component.
[0080] While this approach may sometimes achieve the goal of displaying the first content on the target page hosted on the first operating platform, sometimes, depending on actual needs, the style of displaying the first content on the target page hosted on the first operating platform differs from the style of displaying the second content on the target page hosted on the second operating platform. For example, different operating platforms have different screen sizes, resulting in different interface sizes for displaying pages on different operating platforms. For instance, the screen size of a fixed device differs from that of a mobile device, leading to different interface sizes on the fixed device screen and the mobile device screen. Consequently, the rendering styles of the data on each operating platform will also differ. For example, the same content may be displayed differently on the target page hosted on the second operating platform than on the target page hosted on the first operating platform.
[0081] In one example, it is necessary to display the second content to be displayed in a table format on the target page hosted by the second runtime carrier. Thus, the second rendering component may include a table component, etc. Using the table component to render the first content to be displayed on the target page hosted by the second runtime carrier can achieve the goal of displaying the first content to be displayed in a table format on the target page hosted by the second runtime carrier.
[0082] In another example, if the same content needs to be displayed as cards on the target page hosted by the first runtime, the first rendering component adapted to the first runtime can include card components, etc. Using card components to render the same content on the target page hosted by the first runtime can achieve the goal of displaying the same content as cards on the target page hosted by the first runtime.
[0083] The way content is displayed on a page is closely related to the rendering component that renders the content on the page.
[0084] In order to ensure that after the first display content in the first page data returned by the server is obtained by the first running vehicle, the first display content can also be displayed in the required style on the target page carried by the first running vehicle, in this application, relevant configurations can be made in advance on the server.
[0085] For example, the content on the target page hosted on the second runtime platform needs to be rendered using a second rendering component, while this content on the target page hosted on the first runtime platform needs to be rendered using a 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). Both the second and first rendering components have APIs, and these APIs differ. However, after the developers have completed the development of the second page data and the server has obtained the first page data, the developers can disregard the API of the first rendering component. For example, they don't need to adjust the "rendering instruction to call the rendering component using the API of the second rendering component to render the second content to be displayed" in the first page data.
[0086] In addition, the second rendering component has a component path. The second runtime carrier can index the component path of the second rendering component according to the API of the second rendering component. The second rendering component (the specific implementation of the second rendering component) can be called according to the component path of the second rendering component. Then, the content can be rendered on the page carried by the second runtime carrier according to the second rendering component.
[0087] Furthermore, the first rendering component has a component path. The first runtime carrier can index the component path of the first rendering component based on the API of the first rendering component. Based on the component path of the first rendering component, the first rendering component (the specific implementation of the first rendering component) can be called. Then, content can be rendered on the page carried by the first runtime carrier based on the first rendering component.
[0088] Secondly, the data on the second page developed by the developers reflects the API of the second rendering component (e.g., the call instructions for calling the API of the second rendering component), but does not reflect the component path of the second rendering component.
[0089] Thus, it is possible to configure the mapping between the component identifier of the first rendering component and the component path of the first rendering component, given the API of the second rendering component, and to configure the mapping between the component identifier of the second rendering component and the component path of the second rendering component, given the API of the second rendering component.
[0090] Different operating carriers have their own carrier identifiers, and the carrier identifiers of different operating carriers are different. The carrier identifier of the first operating carrier is different from that of the second operating carrier. In this way, different operating carriers can be distinguished through the carrier identifier.
[0091] Thus, when the second runtime requests access to the target page from the server, the server can, based on the API of the second rendering component in the second page data and leveraging the mapping between the component identifier and the component path of the second rendering component (given the API of the second rendering component), index the component path of the second rendering component. Then, it obtains rendering instructions, which instruct the server to use the component path of the second rendering component to call the rendering component to render the second content to be displayed. The server then returns at least the second content to be rendered and the rendering instructions to the second runtime. This allows the second runtime to call the second rendering component based on the component path indicated by the rendering instructions to render the second content to be displayed on the target page.
[0092] Alternatively, if the second runtime requests access to the target page from the server, the server can directly return the second page data to the second runtime, so that the second runtime can call the 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 render the second content to be displayed.
[0093] Alternatively, if the first runtime requests access to the target page from the server, the server can, based on the API of the first rendering component in the first page data and leveraging the mapping between the component identifier and the component path of the first rendering component (assuming the API of the second rendering component), index the component path of the first rendering component. Then, it can obtain rendering instructions, which instruct the server to use the component path of the first rendering component to call the rendering component to render the first content to be displayed. The server then returns at least the first content to be rendered and the rendering instructions to the first runtime. This allows the first runtime to call the first rendering component based on the component path of the first rendering component indicated by the obtained rendering instructions to render the first content to be displayed on the target page.
[0094] Therefore, the correspondence between the rendering component's API, the runtime carrier's carrier identifier, and the rendering component's path can be set in advance on the server side.
[0095] For the second runtime carrier, the API of the second rendering component, the carrier identifier of the second runtime carrier, and the component path of the second rendering component can be stored in the correspondence 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 runtime vehicle, and the component path of the second rendering component. The add instruction instructs the storage of a corresponding table entry in the mapping relationship, including the API of the second rendering component, the carrier identifier of the second runtime vehicle, and the component path of the second rendering component. For example, a developer can submit an add instruction to the server. The server can receive the add instruction submitted by the developer, then create a corresponding table entry including the API of the second rendering component, the carrier identifier of the second runtime vehicle, and the component path of the second rendering component, and store the created corresponding table entry in the mapping relationship.
[0097] This application allows developers to configure, in real time, "the mapping between the component identifier of the second rendering component and the component path of the second rendering component, based on the API of the second rendering component."
[0098] Furthermore, for the first runtime carrier, the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the first rendering component can also be stored in the correspondence 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 runtime carrier, and the component path of the first rendering component. The add instruction instructs the storage of a corresponding table entry in the mapping relationship, including the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the first rendering component. For example, a developer can submit an add instruction to the server. The server can receive the add instruction submitted by the developer, then create a corresponding table entry including the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the first rendering component, and store the created corresponding table entry in the mapping relationship.
[0100] This application allows 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, provided that the API of the second rendering component is available" according to actual needs.
[0101] Specifically, see Figure 1 and 2 This application illustrates a page processing method that is applied to... Figure 1 In the page processing system shown, the method includes:
[0102] In step S101, the first runtime carrier sends an access request for the target page to the server. The access request for the target page carries at least the carrier identifier of the first runtime carrier.
[0103] In this application, a user can use a first runtime carrier to request access to a target page from a server. For example, the user can control the first runtime carrier to send an access request for the target page to the server. The access request carries at least the carrier identifier of the first runtime carrier, so as to inform the server through the carrier identifier of the first runtime carrier that this access to the target page is an access to the target page by the first runtime carrier.
[0104] If there are multiple pages available for access on the server, the access request can further include the page identifier of the target page. The page identifier of the target page may include the URL of the target page (Uniform Resource Locator), etc., so that the server can index the first page data adapted to the target page on the first runtime platform from the page data of multiple pages based on the page identifier of the target page.
[0105] In step S102, the server receives an access request for the target page sent by the first runtime carrier.
[0106] In step S103, the server obtains the first page data adapted by the target page on the first running carrier based on the carrier identifier of the first running carrier in the access request of the target page.
[0107] The server has already obtained the first page data adapted for the target page on the first running platform and stored the first page data adapted for the target page on the server.
[0108] The index information used to index the first page data stored on the server may include: the carrier identifier of the first running carrier; of course, it can be understood that it may also include the page identifier of the target page, etc.
[0109] In this way, the first page data that the target page is adapted to the first running vehicle can be obtained from the server based on the carrier identifier of the first running vehicle in the access request.
[0110] Alternatively, the first page data adapted by the target page on the first running vehicle can be obtained from the carrier identifier of the first running vehicle and the page identifier of the target page in the access request.
[0111] The first page data includes: first content to be displayed, adapted for display on a first runtime platform, and rendering instructions that use the API of a second rendering component to call a rendering component to render the first content to be displayed. The first content to be displayed is obtained based on second content to be displayed, adapted for display on a second runtime platform. The second rendering component includes a rendering component suitable for rendering the second content to be displayed on the target page hosted on the second runtime platform. The second content to be displayed is located in the developed second page data adapted for the target page on the second runtime platform. The second page data also includes rendering instructions that use the API of the second rendering component to call a 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 that is applicable to the second rendering component on the first running vehicle according to the carrier identifier of the first running vehicle and the API of the second rendering component. 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 vehicle.
[0113] In one embodiment of this application, the component path of the first rendering component can be obtained by means of the aforementioned configured mapping between the component identifier of the first rendering component and the component path of the first rendering component, provided that the API of the second rendering component is available. For example, the component path of the first rendering component can be obtained by means of the aforementioned correspondence. For example, in the correspondence between the API of the rendering component, the carrier identifier of the runtime 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 runtime carrier can be found to obtain the component path of the first rendering component.
[0114] For an explanation of the correspondence, please refer to the aforementioned embodiments, which will not be elaborated here.
[0115] In step S105, the server obtains a rendering instruction. The obtained rendering instruction is used to instruct the rendering component to be called using the component path of the first rendering component to render the first content to be displayed.
[0116] The rendering instructions may include the component path of the first rendering component.
[0117] Rendering instructions can be generated in real time by the server based on the component path of the first rendering component, etc.
[0118] For example, the server has pre-configured generation logic, which is used to generate input data and output data. The input data includes the component path of the rendering component, and the output data includes rendering instructions that instruct the rendering component to be called using the component path of the rendering component to render the content.
[0119] In step S106, the server sends at least the first content to be displayed and the obtained rendering instructions to the first running carrier.
[0120] Depending on the actual situation, the server may also send other necessary data to the first operating carrier, which is not limited in this application.
[0121] In step S107, the first running carrier receives at least the first content to be displayed sent by the server and the obtained rendering instructions.
[0122] Depending on the actual situation, if the server sends other necessary data to the first operating carrier, the first operating carrier may also receive other necessary data, and this application does not limit this.
[0123] In step S108, the first runtime carrier calls 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 obtained rendering instruction.
[0124] The component path of the first rendering component indicated by the rendering instruction is located in the rendering instruction.
[0125] Depending on the actual situation, if the first operating vehicle receives other required data, it can also process other required data, etc., and this application does not limit this.
[0126] In this application, a first runtime carrier sends an access request for a target page to a server, the access request carrying at least the carrier identifier of the first runtime carrier. The server receives the access request from the first runtime carrier and, based on the carrier identifier in the access request, obtains first page data adapted for the target page on the first runtime carrier. The first page data includes: first content to be displayed adapted for display on the first runtime carrier and rendering instructions for using the API of a second rendering component to call a rendering component to render the first content to be displayed. The first content to be displayed is obtained based on second content to be displayed adapted for display on a second runtime carrier. The second rendering component includes a rendering component suitable for rendering the second content to be displayed on the target page hosted on the second runtime carrier. The second content to be displayed is located in an already developed target page hosted on the second runtime carrier. The second page data adapted to the first runtime carrier also includes rendering instructions that call the rendering component using the API of the second rendering component to render the second content to be displayed; based on the carrier identifier of the first runtime carrier and the API of the second rendering component, the component path of the first rendering component applicable to the second rendering component on the first runtime carrier is obtained, the first rendering component includes rendering components applicable to rendering the first content to be displayed on the target page hosted on the first runtime carrier; rendering instructions are obtained, the obtained rendering instructions are used to instruct the rendering component to be called 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 instructions are sent to the first runtime carrier. The first runtime carrier receives the first content to be displayed and the obtained rendering instructions, and calls 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 obtained rendering instructions.
[0127] This application provides a solution for situations where a target page needs to be developed and deployed on both a first and a second runtime platform, allowing users to access the target page via both platforms. The solution supports developers in creating second-page data adapted for the target page on the second runtime platform. This second-page data includes second content to be displayed on the second runtime platform and rendering instructions that use the API of the second rendering component to call the rendering component to render the second content. Alternatively, developers can choose not to develop first-page data adapted for the target page on the first runtime platform. Instead, the server can automatically obtain the first-page data adapted for the target page on the first runtime platform based on the already developed second-page data. This first-page data includes first content to be displayed on the first runtime platform and rendering instructions that use the API of the second rendering component to call the rendering component to render the second content. The first content to be displayed is derived from the second content to be displayed.
[0128] In other words, developers don't need to care about the API of the first rendering component. For example, they don't need to adjust the "rendering instructions in the first page data that call the rendering component using the API of the second rendering component to render the second content to be displayed".
[0129] The server can automatically configure the mapping between "the component identifier and the component path of the first rendering component, given the API of the second rendering component". When the first runtime needs to request the server to access the target page, the server can index the first page data based on the carrier identifier of the first runtime. Then, based on the carrier identifier of the first runtime and the API of the second rendering component in the first page data, and with the help of the pre-configured mapping between "the component identifier and the component path of the first rendering component, given the API of the second rendering component", the server can index the component path of the first rendering component, and then obtain the rendering instruction. The obtained rendering instruction is used to instruct the rendering component to use the component path of the first rendering component to render the first content to be displayed, and sends the first content to be displayed and the obtained rendering instruction to the first runtime. Afterwards, the first runtime can 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 obtained rendering instruction.
[0130] The following set of logics can be configured: the server-side logic for "automatically obtaining the first page data adapted to the first running platform based on the second page data adapted to the second running platform," the server-side logic for "obtaining the component path of the first rendering component corresponding to the first rendering component on the first running platform based on the carrier identifier of the first running platform and the API of the second rendering component," the server-side logic for "obtaining rendering instructions," and the server-side logic for "sending the first content to be displayed and the obtained rendering instructions to the first running platform." These logics do not need to be set by the developers in real time on the server when developing the target page, but can be set in advance by the server staff. This set of logics is applicable to pages that developers need to develop and deploy on two or more running platforms.
[0131] In this way, a single set of logic can be reused across multiple pages. That is, after configuring the above set of logic on the server side, developers only need to develop the page data adapted for one running platform when they need to develop any page that is deployed on two or more running platforms. They do not need to develop the page data adapted for other running platforms. This allows a single set of page data to be reused on different running platforms, achieving the effect of "develop once, use on multiple platforms". This reduces the workload of developers and lowers labor costs.
[0132] In the foregoing embodiments, when a certain content is rendered by a second rendering component on a page hosted on a second runtime carrier, the content is rendered by a first rendering component on a page hosted on a first runtime carrier. However, sometimes, according to actual needs, it is no longer necessary to deliver a page containing the content to the first runtime carrier. That is, it is no longer necessary for users to access the page containing the content through the first runtime carrier, or users no longer need to access the page containing the content through the first runtime carrier.
[0133] Therefore, 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, often no longer works. Thus, it is no longer necessary to continuously 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, in order to save storage space.
[0134] For example, the server can obtain a deletion command. The deletion command carries at least two of the following parameters: the API of the second rendering component, the carrier identifier of the first runtime vehicle, and the component path of the first rendering component. The deletion command instructs the deletion of the corresponding entry in the mapping relationship that includes the API of the second rendering component, the carrier identifier of the first runtime vehicle, and the component path of the first rendering component. For example, a developer can submit a deletion command to the server. The server can receive the deletion command submitted by the developer. Then, based on the deletion parameters, it searches the mapping relationship for the corresponding entry that includes the API of the second rendering component, the carrier identifier of the first runtime vehicle, and the component path of the first rendering component. The found corresponding entry is then deleted from the mapping relationship.
[0135] In one example, the parameters to be deleted include: the API of the second rendering component and the carrier identifier of the first runtime carrier. Thus, based on the API of the second rendering component and the carrier identifier of the first runtime carrier, the corresponding entries in the correspondence can be found in the correspondence, including the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the first rendering component, and the found corresponding entries can be deleted in the correspondence.
[0136] Alternatively, in another example, the parameters to be deleted include: the API of the second rendering component and the component path of the first rendering component. In this way, based on the API of the second rendering component and the component path of the first rendering component, the corresponding entries in the correspondence can be found in the correspondence, including the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the first rendering component, and the found corresponding entries can be deleted in the correspondence.
[0137] Alternatively, in another example, the parameters to be deleted include: the carrier identifier of the first runtime carrier and the component path of the first rendering component. In this way, the corresponding entries including the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the first rendering component can be found in the correspondence based on the carrier identifier of the first runtime carrier and the component path of the first rendering component, and the found corresponding entries can be deleted in the correspondence.
[0138] Alternatively, in another example, the parameters to be deleted include: the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the first rendering component. In this way, the corresponding entries including the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the first rendering component can be found in the correspondence, and the found corresponding entries can be deleted in the correspondence.
[0139] This application allows developers to delete the configured mapping between the component identifier of the first rendering component and the component path of the first rendering component in real time, based on actual needs, in order to save storage space.
[0140] In the foregoing embodiments, when a certain content is rendered by a second rendering component on a page hosted on a second runtime carrier, the content is rendered by a first rendering component on a page hosted on a first runtime carrier. However, sometimes, according to actual needs, it is necessary for the content to be rendered by a third rendering component on a page hosted on a first runtime carrier, instead of being rendered by the first rendering component.
[0141] Therefore, 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 modification instructions, which may include the API of the second rendering component, the carrier identifier of the first runtime environment, and the component path of the third rendering component. These modification instructions instruct the server to replace the component path corresponding to the API of the second rendering component and the carrier identifier of the first runtime environment in the mapping relationship with the component path of the third rendering component. For instance, a developer can submit modification instructions to the server. The server can receive these instructions, search for the component path corresponding to the API of the second rendering component and the carrier identifier of the first runtime environment in the mapping relationship, and replace the found component path with the component path of the third rendering component.
[0143] This application allows developers to modify the configured mapping between the component identifier and the component path of the first rendering component in real time, based on actual needs, provided that the API of the second rendering component is available. This application also allows developers to adjust the rendering component used to render content on a page hosted on a specific runtime platform in real time to meet actual rendering requirements.
[0144] In another embodiment of this application, a rendering component is adapted to render content on a page hosted on a second runtime carrier.
[0145] In one case, a certain rendering component has a corresponding other rendering component on the first runtime carrier. That is, the other rendering component is suitable for rendering content on the page carried on the first runtime carrier. For example, if a certain content on the page carried on the second runtime carrier is rendered by the second runtime carrier using a certain rendering component, then the other rendering component can be used to render that content on the page carried on the first runtime carrier.
[0146] Alternatively, in another case, if a certain rendering component does not correspond to another rendering component on the first runtime, then there is no other rendering component suitable for rendering the content on the page hosted on the first runtime. For example, a certain content on the page hosted on the second runtime is rendered by the second runtime using a certain rendering component, but the content cannot be rendered using another rendering component on the page hosted on the first runtime.
[0147] For example, the second running platform is a desktop computer, the first running platform is a mobile phone, and the first rendering component is a file import component. In one scenario, most users often need to import files on a page hosted on a desktop computer, which requires the use of a file import component. However, most users rarely need to import files on a page hosted on a mobile phone.
[0148] Therefore, on pages hosted on desktop computers, it is often necessary to use a file import component to render content (this content may include relevant functional introductions related to the import function and the page) so that the file import component and the rendered file import content are displayed on the page.
[0149] In addition, on mobile-enabled pages, it is often unnecessary to use a file import component to render content (the content may include relevant information about the import function and page-related functions), and it is unnecessary to display the file import component and rendered file import-related content on the page.
[0150] In this alternative scenario, in the example of "target page, first runtime carrier, second runtime carrier, first rendering component, and second rendering component" mentioned in the aforementioned embodiments, the second rendering component is suitable for rendering the second content to be displayed on the target page carried on the second runtime carrier. The second rendering component does not correspond to the first rendering component on the first runtime carrier. Thus, the second content to be displayed on the target page carried on the second runtime carrier is rendered by the second runtime carrier using the second rendering component, while the first content to be displayed on the target page carried on the first runtime 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 runtime 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 runtime carrier, no rendering component can be used to render the first content to be displayed on the target page carried on the first runtime carrier, and thus the first content to be displayed cannot be rendered on the target page carried on the first runtime carrier.
[0152] Since the target page on the first running platform cannot render the first content to be displayed, the server does not need to send the first content to be displayed to the first running platform, otherwise it would consume network resources.
[0153] Additionally, if the target page contains other content, the server can send this other content to the first runtime carrier as needed, so that the first runtime carrier can retrieve the appropriate rendering component to render the other content on the target page (for details, please refer to...). Figure 2 (Example shown).
[0154] To prevent the server from sending the first content to be displayed to the first runtime carrier, if the component path of the first rendering component cannot be obtained based on the carrier identifier of the first runtime carrier and the API of the second rendering component—for example, if no component path corresponding to the API of the second rendering component and the carrier identifier of the first runtime carrier is found in the mapping relationship between the API of the rendering component, the carrier identifier of the runtime carrier, and the component path of the rendering component (for example, if the mapping between the component identifier of the first rendering component and the component path of the first rendering component is not configured in advance,) the sending of the first content to be displayed to the first runtime carrier can be interrupted. For example, the action of "sending the first content to be displayed to the first runtime carrier" can be intercepted. Furthermore, since the component path of the first rendering component is not obtained, it will not be sent to the first runtime carrier.
[0155] In yet another embodiment of this application, a rendering component is adapted to render content on a page carried on a first runtime carrier.
[0156] In one case, a certain rendering component has a corresponding other rendering component on the second runtime carrier. That is, the other rendering component is suitable for rendering content on the page carried on the second runtime carrier. For example, if a certain content on the page carried on the first runtime carrier is rendered by the first runtime carrier using a certain rendering component, then the content can be rendered on the page carried on the second runtime carrier using another rendering component.
[0157] Alternatively, in another case, if a certain rendering component does not correspond to another rendering component on the second runtime, then there is no other rendering component suitable for rendering the content on the page hosted on the second runtime. For example, if a certain content on the page hosted on the first runtime is rendered by the first runtime using a certain rendering component, then the content cannot be rendered using another rendering component on the page hosted on the second runtime.
[0158] For example, the second running platform is a desktop computer, the first running platform is a mobile phone, and a certain rendering component is a QR code scanning component. In one scenario, most users will need to scan a QR code on a page hosted on a mobile phone or computer (for login or payment, etc.), and scanning requires the use of a QR code scanning component. However, most users will rarely need to scan a QR code on a page hosted on a desktop computer.
[0159] Therefore, on mobile phone-based pages, it is often necessary to use a QR code scanning component to render content (this content may include relevant information about the QR code scanning function and related page functions) so that the QR code scanning component and the rendered QR code-related content are displayed on the page.
[0160] In addition, on pages hosted on desktop computers, it is often unnecessary to use a QR code scanning component to render content (the content may include relevant information about the QR code scanning function and related to the page), and it is not necessary to display the QR code scanning component and rendered QR code-related content on the page.
[0161] In response to this alternative scenario, in the example of "target page, first runtime carrier, second runtime carrier, first rendering component, and second rendering component" mentioned in the aforementioned embodiments, the second page data developed by the developer for the second runtime carrier will not include "APIs that are not applicable to rendering content on the page hosted on the second runtime carrier (such as the aforementioned QR code scanning component)". For example, it will not include "rendering instructions that use the API of the other rendering component to call the rendering component to render content". In other words, the second page data developed by the developer for the second runtime carrier will not contain any clues about the other rendering component, and consequently, the first page data obtained from the second page data for the first runtime carrier will also not contain any clues about the other rendering component.
[0162] After the first runtime carrier obtains the first page data, since the first page data does not contain any clues about the other rendering component, the first runtime carrier will not call the other rendering component to render content on the page when displaying the target page.
[0163] Thus, in order to enable the other rendering component to render the corresponding content on the target page when the first carrier is displaying the target page, in this 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] Therefore, when the first running vehicle has a unique rendering component relative to the second running vehicle, the server can obtain the pre-configured unique content to be displayed and the unique rendering instructions. The unique rendering instructions are used to instruct the unique rendering component of the first running vehicle relative to the second running vehicle 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 vehicle.
[0166] Subsequently, the first running vehicle can receive the unique content to be displayed and the unique rendering instructions sent by the server, so that when the first running vehicle 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 instructions 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 a rendering component applicable to the second runtime carrier. For example, the unique rendering component may include the "other rendering component" mentioned above in this embodiment, such as a QR code scanning component, or the component path of the unique rendering component may not be located in the correspondence between the rendering component's API, the runtime carrier's carrier identifier, and the rendering component's component path. The unique rendering component is not used when the second runtime carrier renders content on the page it hosts.
[0168] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, because according to this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions involved are not necessarily required by this application.
[0169] Reference Figure 4This diagram illustrates a structural block diagram of a page processing apparatus according to this application, applied to a server. The apparatus includes: a first receiving module 11, configured to receive an access request for a target page sent by a first runtime carrier, the access request carrying at least a carrier identifier of the first runtime carrier; and a first obtaining module 12, configured to obtain first page data adapted for the target page on the first runtime carrier based on the carrier identifier of the first runtime carrier in the access request. The first page data includes: first content to be displayed adapted for display on the first runtime carrier and rendering instructions for rendering the first content to be displayed by calling a rendering component using the API of a second rendering component; the first content to be displayed is obtained based on second content to be displayed adapted for display on a second runtime carrier, and the second rendering component includes a rendering component on the target page carried by the second runtime carrier suitable for rendering the second content to be displayed; the second content to be displayed is located in the developed second page data adapted for the target page on the second runtime carrier. The second page data also includes rendering instructions that use the API of the second rendering component to call the rendering component to render the second content to be displayed; the second acquisition module 13 is used to acquire the component path of the first rendering component applicable to the second rendering component on the first running vehicle according to the carrier identifier of the first running vehicle and the API of the second rendering component, the first rendering component including the rendering component applicable to rendering the first content to be displayed on the target page carried by the first running vehicle; the third acquisition module 14 is used to acquire rendering instructions, the acquired rendering instructions are used to instruct the rendering component to be called using the component path of the first rendering component to render the first content to be displayed; the first sending module 15 is used to send at least the first content to be displayed and the acquired rendering instructions to the first running vehicle; so that the first running vehicle receives the first content to be displayed and the acquired rendering instructions; and calls 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 instructions.
[0170] In an optional implementation, the first acquisition module includes a lookup unit, used to look up the component path corresponding to the API of the second rendering component and the carrier identifier of the first running vehicle in the correspondence among the API of the rendering component, the carrier identifier of the running vehicle 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 further includes: a first acquisition unit, configured to acquire an add instruction, the add instruction carrying the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the first rendering component; the add instruction is configured to instruct the storage of a corresponding table entry including the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the first rendering component in the correspondence relationship; an establishment unit, configured to establish a corresponding table entry including the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the first rendering component; and a storage unit, configured to store the established corresponding table entry in the correspondence relationship.
[0172] In an optional implementation, the first acquisition module further includes: a second acquisition unit, configured to acquire a deletion instruction, the deletion instruction carrying at least deletion parameters, the deletion parameters including at least two of the following: the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the first rendering component; the deletion instruction being configured to instruct the deletion of a corresponding entry in the correspondence relationship that includes the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the first rendering component; a first search unit, configured to search for a corresponding entry in the correspondence relationship that includes the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the first rendering component according to the deletion parameters; and a deletion unit, configured to delete the found corresponding entry in the correspondence relationship.
[0173] In an optional implementation, the apparatus further includes: a third acquisition unit, configured to acquire a modification instruction, the modification instruction carrying the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the third rendering component, the modification instruction being configured to instruct the component path corresponding to the API of the second rendering component and the carrier identifier of the first runtime carrier to be replaced with the component path of the third rendering component in the correspondence relationship; a second search unit, configured to search for the component path corresponding to the API of the second rendering component and the carrier identifier of the first runtime carrier in the correspondence relationship; and a replacement unit, configured to replace the found component path with the component path of the third rendering component in the correspondence relationship.
[0174] In an optional implementation, the apparatus further includes: a fourth acquisition module, configured to acquire, when the first running vehicle has a unique rendering component relative to the second running vehicle, pre-configured unique content to be displayed and unique rendering instructions, wherein the unique rendering instructions are used to instruct the use of the unique rendering component of the first running vehicle relative to the second running vehicle to render the unique content to be displayed; the unique rendering component does not correspond to a rendering component applicable to the second running vehicle; and a second sending module, configured to send the unique content to be displayed and unique rendering instructions to the first running vehicle; so that the first running vehicle receives the unique content to be displayed and unique rendering instructions sent by the server, and when the first running vehicle renders the first content to be displayed on the target page, it also calls the unique rendering component to render the unique content to be displayed on the target page according to the component path of the unique rendering component indicated by the unique rendering instructions.
[0175] In an optional implementation, the apparatus further includes a terminal module, configured to interrupt the transmission of the first content to be displayed to the first running carrier if the component path of the first rendering component is not obtained based on the carrier identifier of the first running carrier and the API of the second rendering component.
[0176] In this application, a first runtime carrier sends an access request for a target page to a server, the access request carrying at least the carrier identifier of the first runtime carrier. The server receives the access request from the first runtime carrier and, based on the carrier identifier in the access request, obtains first page data adapted for the target page on the first runtime carrier. The first page data includes: first content to be displayed adapted for display on the first runtime carrier and rendering instructions for using the API of a second rendering component to call a rendering component to render the first content to be displayed. The first content to be displayed is obtained based on second content to be displayed adapted for display on a second runtime carrier. The second rendering component includes a rendering component suitable for rendering the second content to be displayed on the target page hosted on the second runtime carrier. The second content to be displayed is located in an already developed target page hosted on the second runtime carrier. The second page data adapted to the first runtime carrier also includes rendering instructions that call the rendering component using the API of the second rendering component to render the second content to be displayed; based on the carrier identifier of the first runtime carrier and the API of the second rendering component, the component path of the first rendering component applicable to the second rendering component on the first runtime carrier is obtained, the first rendering component includes rendering components applicable to rendering the first content to be displayed on the target page hosted on the first runtime carrier; rendering instructions are obtained, the obtained rendering instructions are used to instruct the rendering component to be called 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 instructions are sent to the first runtime carrier. The first runtime carrier receives the first content to be displayed and the obtained rendering instructions, and calls 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 obtained rendering instructions.
[0177] This application provides a solution for situations where a target page needs to be developed and deployed on both a first and a second runtime platform, allowing users to access the target page via both platforms. The solution supports developers in creating second-page data adapted for the target page on the second runtime platform. This second-page data includes second content to be displayed on the second runtime platform and rendering instructions that use the API of the second rendering component to call the rendering component to render the second content. Alternatively, developers can choose not to develop first-page data adapted for the target page on the first runtime platform. Instead, the server can automatically obtain the first-page data adapted for the target page on the first runtime platform based on the already developed second-page data. This first-page data includes first content to be displayed on the first runtime platform and rendering instructions that use the API of the second rendering component to call the rendering component to render the second content. The first content to be displayed is derived from the second content to be displayed.
[0178] In other words, developers don't need to care about the API of the first rendering component. For example, they don't need to adjust the "rendering instructions in the first page data that call the rendering component using the API of the second rendering component to render the second content to be displayed".
[0179] The server can automatically configure the mapping between "the component identifier and the component path of the first rendering component, given the API of the second rendering component". When the first runtime needs to request the server to access the target page, the server can index the first page data based on the carrier identifier of the first runtime. Then, based on the carrier identifier of the first runtime and the API of the second rendering component in the first page data, and with the help of the pre-configured mapping between "the component identifier and the component path of the first rendering component, given the API of the second rendering component", the server can index the component path of the first rendering component, and then obtain the rendering instruction. The obtained rendering instruction is used to instruct the rendering component to use the component path of the first rendering component to render the first content to be displayed, and sends the first content to be displayed and the obtained rendering instruction to the first runtime. Afterwards, the first runtime can 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 obtained rendering instruction.
[0180] The following set of logics can be configured: the server-side logic for "automatically obtaining the first page data adapted to the first running platform based on the second page data adapted to the second running platform," the server-side logic for "obtaining the component path of the first rendering component corresponding to the first rendering component on the first running platform based on the carrier identifier of the first running platform and the API of the second rendering component," the server-side logic for "obtaining rendering instructions," and the server-side logic for "sending the first content to be displayed and the obtained rendering instructions to the first running platform." These logics do not need to be set by the developers in real time on the server when developing the target page, but can be set in advance by the server staff. This set of logics is applicable to pages that developers need to develop and deploy on two or more running platforms.
[0181] In this way, a single set of logic can be reused across multiple pages. That is, after configuring the above set of logic on the server side, developers only need to develop the page data adapted for one running platform when they need to develop any page that is deployed on two or more running platforms. They do not need to develop the page data adapted for other running platforms. This allows a single set of page data to be reused on different running platforms, achieving the effect of "develop once, use on multiple platforms". This reduces the workload of developers and lowers labor costs.
[0182] Reference Figure 5 This diagram illustrates a structural block diagram of a page processing apparatus according to this application, applied to a first running carrier. The apparatus includes: a third sending module 21, configured to send 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, based on the carrier identifier of the first running carrier in the access request, obtains first page data adapted for the target page on the first running carrier; the first page data includes: first content to be displayed adapted for display on the first running carrier and rendering instructions for rendering the first content to be displayed by calling a rendering component using the API of a second rendering component; the first content to be displayed is obtained based on second content to be displayed adapted for display on a second running carrier, the second rendering component includes a rendering component on the target page carried by the second running carrier suitable for rendering the second content to be displayed; the second content to be displayed is located in a previously developed, first page adapted for display on the second running carrier. The second page data also includes rendering instructions that call the rendering component using the API of the second rendering component to render the second content to be displayed; obtaining the component path of the first rendering component applicable to the second rendering component on the first running vehicle according to the carrier identifier of the first running vehicle and the API of the second rendering component, the first rendering component includes rendering components applicable to rendering the first content to be displayed on the target page carried by the first running vehicle; obtaining rendering instructions, the obtained rendering instructions are used to instruct the rendering component to be called using the component path of the first rendering component to render the first content to be displayed; sending at least the first content to be displayed and the obtained rendering instructions to the first running vehicle; a second receiving module 22, used to receive at least the first content to be displayed and the obtained rendering instructions; and a first rendering module 23, 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 obtained rendering instructions.
[0183] In an optional implementation, the apparatus further includes: a third receiving module, configured to receive unique content to be displayed and unique rendering instructions sent by the server, wherein the unique rendering component does not correspond to a rendering component applicable to the second runtime carrier; the unique rendering instructions are used to instruct the use of a unique rendering component of the first runtime carrier relative to the second runtime 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 runtime carrier when the first runtime carrier has a unique rendering component relative to the second runtime carrier; and a second rendering module, configured to, when the first runtime carrier renders the first content to be displayed on the target page, call the unique rendering component to render the unique content to be displayed on the target page according to the component path of the unique rendering component indicated by the unique rendering instructions.
[0184] In this application, a first runtime carrier sends an access request for a target page to a server, the access request carrying at least the carrier identifier of the first runtime carrier. The server receives the access request from the first runtime carrier and, based on the carrier identifier in the access request, obtains first page data adapted for the target page on the first runtime carrier. The first page data includes: first content to be displayed adapted for display on the first runtime carrier and rendering instructions for using the API of a second rendering component to call a rendering component to render the first content to be displayed. The first content to be displayed is obtained based on second content to be displayed adapted for display on a second runtime carrier. The second rendering component includes a rendering component suitable for rendering the second content to be displayed on the target page hosted on the second runtime carrier. The second content to be displayed is located in an already developed target page hosted on the second runtime carrier. The second page data adapted to the first runtime carrier also includes rendering instructions that call the rendering component using the API of the second rendering component to render the second content to be displayed; based on the carrier identifier of the first runtime carrier and the API of the second rendering component, the component path of the first rendering component applicable to the second rendering component on the first runtime carrier is obtained, the first rendering component includes rendering components applicable to rendering the first content to be displayed on the target page hosted on the first runtime carrier; rendering instructions are obtained, the obtained rendering instructions are used to instruct the rendering component to be called 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 instructions are sent to the first runtime carrier. The first runtime carrier receives the first content to be displayed and the obtained rendering instructions, and calls 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 obtained rendering instructions.
[0185] This application provides a solution for situations where a target page needs to be developed and deployed on both a first and a second runtime platform, allowing users to access the target page via both platforms. The solution supports developers in creating second-page data adapted for the target page on the second runtime platform. This second-page data includes second content to be displayed on the second runtime platform and rendering instructions that use the API of the second rendering component to call the rendering component to render the second content. Alternatively, developers can choose not to develop first-page data adapted for the target page on the first runtime platform. Instead, the server can automatically obtain the first-page data adapted for the target page on the first runtime platform based on the already developed second-page data. This first-page data includes first content to be displayed on the first runtime platform and rendering instructions that use the API of the second rendering component to call the rendering component to render the second content. The first content to be displayed is derived from the second content to be displayed.
[0186] In other words, developers don't need to care about the API of the first rendering component. For example, they don't need to adjust the "rendering instructions in the first page data that call the rendering component using the API of the second rendering component to render the second content to be displayed".
[0187] The server can automatically configure the mapping between "the component identifier and the component path of the first rendering component, given the API of the second rendering component". When the first runtime needs to request the server to access the target page, the server can index the first page data based on the carrier identifier of the first runtime. Then, based on the carrier identifier of the first runtime and the API of the second rendering component in the first page data, and with the help of the pre-configured mapping between "the component identifier and the component path of the first rendering component, given the API of the second rendering component", the server can index the component path of the first rendering component, and then obtain the rendering instruction. The obtained rendering instruction is used to instruct the rendering component to use the component path of the first rendering component to render the first content to be displayed, and sends the first content to be displayed and the obtained rendering instruction to the first runtime. Afterwards, the first runtime can 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 obtained rendering instruction.
[0188] The following set of logics can be configured: the server-side logic for "automatically obtaining the first page data adapted to the first running platform based on the second page data adapted to the second running platform," the server-side logic for "obtaining the component path of the first rendering component corresponding to the first rendering component on the first running platform based on the carrier identifier of the first running platform and the API of the second rendering component," the server-side logic for "obtaining rendering instructions," and the server-side logic for "sending the first content to be displayed and the obtained rendering instructions to the first running platform." These logics do not need to be set by the developers in real time on the server when developing the target page, but can be set in advance by the server staff. This set of logics is applicable to pages that developers need to develop and deploy on two or more running platforms.
[0189] In this way, a single set of logic can be reused across multiple pages. That is, after configuring the above set of logic on the server side, developers only need to develop the page data adapted for one running platform when they need to develop any page that is deployed on two or more running platforms. They do not need to develop the page data adapted for other running platforms. This allows a single set of page data to be reused on different running platforms, achieving the effect of "develop once, use on multiple platforms". This reduces the workload of developers and lowers labor costs.
[0190] This application also provides a non-volatile readable storage medium storing one or more modules (programs). When these modules are applied to a device, they enable the device to execute the instructions for the method steps in this application.
[0191] This application provides one or more machine-readable media storing instructions that, when executed by one or more processors, cause an electronic device to perform one or more methods as described in the above embodiments. In this application, the electronic device includes a server, a gateway, sub-devices, etc., and the sub-devices are devices such as Internet of Things (IoT) devices.
[0192] Embodiments of this disclosure can be implemented as an apparatus with any suitable hardware, firmware, software, or any combination thereof, configured as desired. This apparatus may include electronic devices such as servers (clusters) and terminal devices such as IoT devices.
[0193] Figure 6 An exemplary apparatus 1300 is schematically shown that can be used to implement the various embodiments of this application.
[0194] In one embodiment, Figure 6 An exemplary device 1300 is shown, which includes one or more processors 1302, a control module (chipset) 1304 coupled to at least one of the 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] Processor 1302 may include one or more single-core or multi-core processors, and processor 1302 may include any combination of general-purpose processors or special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In some embodiments, device 1300 can function as a server device such as a gateway in the embodiments of this application.
[0196] In some embodiments, apparatus 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 that are combined with the one or more computer-readable media and configured to execute the instructions 1314 to implement the module and thus perform the actions in this disclosure.
[0197] In one embodiment, the control module 1304 may include any suitable interface controller to provide any suitable interface to at least one of the processors 1302 and / or any suitable device or component communicating 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] Memory 1306 may be used, for example, to load and store data and / or instructions 1314 for device 1300. In one embodiment, memory 1306 may include any suitable volatile memory, such as suitable DRAM. In some embodiments, memory 1306 may include double data rate quad synchronous dynamic random access memory (DDR4 SDRAM).
[0200] In one embodiment, the control module 1304 may include one or more input / output controllers to provide interfaces to the NVM / storage device 1308 and (one or more) input / output devices 1310.
[0201] For example, NVM / storage device 1308 may be used to store data and / or instructions 1314. NVM / storage device 1308 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable (one or more) non-volatile storage devices (e.g., one or more hard disk drives (HDDs), one or more optical disc drives (CDs), and / or one or more digital universal optical disc (DVD) drives).
[0202] NVM / storage device 1308 may include storage resources that are physically part of a device on which device 1300 is mounted, or that can be accessed by the device without needing to be part of the device. For example, NVM / storage device 1308 may be accessed via a network via one or more input / output devices 1310.
[0203] One or more input / output devices 1310 may provide an interface for device 1300 to communicate with any other suitable device. Input / output devices 1310 may include communication components, pinyin components, sensor components, etc. Network interface 1312 may provide an interface for device 1300 to communicate via one or more networks. Device 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, such as accessing wireless networks based on communication standards, such as WiFi, 2G, 3G, 4G, 5G, etc., or combinations thereof.
[0204] In one embodiment, at least one of the processors 1302 may be logically packaged with one or more controllers (e.g., memory controller modules) of the control module 1304. In one embodiment, at least one of the processors 1302 may be logically packaged with one or more controllers of the control module 1304 to form a system-in-package (SiP). In one embodiment, at least one of the processors 1302 may be integrated with the logic of one or more controllers of the control module 1304 on the same die. In one embodiment, at least one of the processors 1302 may be integrated with the logic of one or more controllers of the control module 1304 on the same die to form a system-on-a-chip (SoC).
[0205] In various embodiments, device 1300 may be, but is not limited to, a server, desktop computing device, or mobile computing device (e.g., laptop computing device, handheld computing device, tablet computer, netbook, etc.). In various embodiments, device 1300 may have more or fewer components and / or different architectures. For example, in some embodiments, device 1300 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touchscreen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit (ASIC), and a speaker.
[0206] This application provides an electronic device, including: one or more processors; and one or more machine-readable media having instructions stored thereon, which, when executed by the one or more processors, cause the electronic device to perform one or more methods as described in this application.
[0207] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0208] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0209] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable information processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable information processing terminal device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0210] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable information processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable information processing terminal equipment to cause a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1The steps of the functions specified in one or more boxes. Although preferred embodiments of the embodiments of this application have been described, those skilled in the art, once they learn the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the embodiments of this application. Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes the element. The page processing method and apparatus provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A page processing method, characterized in that, Applied to the server side, the method includes: Receive an access request for the target page sent by the first operating vehicle, the access request carrying at least the carrier identifier of the first operating vehicle; Based on the carrier identifier of the first runtime carrier in the access request, first page data adapted for the target page on the first runtime carrier is obtained; the first page data includes: first content to be displayed for adaptation and display on the first runtime carrier and rendering instructions for using the application programming interface (API) of the second rendering component to call the rendering component to render the first content to be displayed; the first content to be displayed is obtained based on second content to be displayed for adaptation and display on the second runtime carrier, and the second rendering component includes a rendering component on the target page carried by the second runtime carrier suitable for rendering the second content to be displayed; the second content to be displayed is located in the developed second page data adapted for the target page on the second runtime carrier, and the second page data also includes rendering instructions for using the API of the second rendering component to call the rendering component to render the second content to be displayed; Based on 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 that is applicable to the second rendering component on the first running carrier. 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. Get the rendering instructions. The obtained rendering instructions are used to instruct the rendering component to be 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 instructions to the first running carrier; so that the first running carrier receives the first content to be displayed and the obtained rendering instructions; and 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 obtained rendering instructions.
2. The method according to claim 1, characterized in that, The step of obtaining the component path of the applicable first rendering component on the first running vehicle based on the carrier identifier of the first running vehicle and the API of the second rendering component includes: In the correspondence between the API of the rendering component, the carrier identifier of the runtime carrier, and the component path of the rendering component, find the component path corresponding to the API of the second rendering component and the carrier identifier of the first runtime carrier to obtain the component path of the first rendering component.
3. The method according to claim 2, characterized in that, The method further includes: Obtain the add instruction, which carries the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the first rendering component; the add instruction is used to instruct the storage of the corresponding table entries in the correspondence relationship, including the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the first rendering component. Establish corresponding entries including the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the first rendering component; Store the corresponding table entries created in the correspondence relationship.
4. The method according to claim 2, characterized in that, The method further includes: Obtain a deletion instruction. The deletion instruction carries at least two of the following: the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the first rendering component. The deletion instruction is used to instruct the deletion of the corresponding table entry in the correspondence, which includes the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the first rendering component. Based on the deletion parameters, search the corresponding table entries in the correspondence, including the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the first rendering component. Delete the corresponding table entry found in the correspondence.
5. The method according to claim 2, characterized in that, The method further includes: Obtain modification instructions. The modification instructions carry the API of the second rendering component, the carrier identifier of the first runtime carrier, and the component path of the third rendering component. The modification instructions are used to instruct that the component paths corresponding to the API of the second rendering component and the carrier identifier of the first runtime carrier be replaced with the component paths of the three rendering components in the correspondence. Find the component path corresponding to the API of the second rendering component and the carrier identifier of the first runtime carrier in the correspondence relationship; Replace the found component path with the component path of the third rendering component in the correspondence.
6. The method according to claim 1, characterized in that, The method further includes: When the first running vehicle has a unique rendering component relative to the second running vehicle, it obtains the pre-configured unique content to be displayed and the unique rendering instructions. The unique rendering instructions are used to instruct the unique rendering component of the first running vehicle relative to the second running vehicle to render the unique content to be displayed. The unique rendering component does not correspond to a rendering component applicable to the second running vehicle. Send unique content to be displayed and unique rendering instructions to the first running vehicle; so that the first running vehicle receives the unique content to be displayed and unique rendering instructions, and when the first running vehicle renders the first content to be displayed on the target page, it also calls the unique rendering component to render the unique content to be displayed on the target page according to the component path of the unique rendering component indicated by the unique rendering instructions.
7. The method according to claim 1, characterized in that, The method further includes: If the component path of the first rendering component cannot be obtained based on the carrier identifier of the first running carrier and the API of the second rendering component, the sending of the first content to be displayed to the first running carrier is interrupted.
8. A page processing method, characterized in that, Applied to a first operating vehicle, the method includes: A request to access the target page is sent to the server, the request carrying at least the carrier identifier of the first runtime carrier; the server receives the request and, based on the carrier identifier of the first runtime carrier in the request, obtains the first page data adapted for the target page on the first runtime carrier; the first page data includes: first content to be displayed adapted for display on the first runtime carrier and rendering instructions that use the application programming interface (API) of the second rendering component to call the rendering component to render the first content to be displayed; the first content to be displayed is obtained based on second content to be displayed adapted for display on the second runtime carrier, and the second rendering component includes a rendering component on the target page carried by the second runtime carrier suitable for rendering the second content to be displayed; the second content to be displayed... The second page data, which is adapted to the target page on the second runtime carrier, is located in the developed second page data. The second page data also includes rendering instructions that call the rendering component using the API of the second rendering component to render the second content to be displayed. Based on the carrier identifier of the first runtime carrier and the API of the second rendering component, the component path of the first rendering component applicable to the second rendering component on the first runtime carrier is obtained. 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 runtime carrier. The rendering instructions are obtained to instruct the rendering component to be called 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 instructions are sent to the first runtime carrier. It must receive at least the first content to be displayed and the obtained rendering instructions; The first rendering component is invoked according to the component path indicated by the obtained rendering instructions 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 includes: The server receives unique content to be displayed and unique rendering instructions. The unique rendering component does not correspond to a rendering component applicable to the second running vehicle. The unique rendering instructions are used to instruct the first running vehicle to render the unique content to be displayed using a unique rendering component relative to the second running vehicle. 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 vehicle when the first running vehicle has a unique rendering component relative to the second running vehicle. When the first runtime 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 apparatus, characterized in that, Applied to the server side, the device includes: The first receiving module is used to receive an access request for a target page sent by the first running carrier. The access request carries at least the carrier identifier of the first running carrier. The first acquisition module is used to acquire first page data adapted for the target page on the first runtime carrier based on the carrier identifier of the first runtime carrier in the access request. The first page data includes: first content to be displayed adapted for display on the first runtime carrier and rendering instructions to call the rendering component using the application programming interface (API) of the second rendering component to render the first content to be displayed. The first content to be displayed is obtained based on second content to be displayed adapted for display on the second runtime carrier. The second rendering component includes a rendering component on the target page carried by the second runtime carrier that is suitable for rendering the second content to be displayed. The second content to be displayed is located in the developed second page data adapted for the target page on the second runtime carrier. The second page data also includes rendering instructions to call the rendering component using the API of the second rendering component to render the second content to be displayed. The second acquisition module is used to acquire the component path of the first rendering component corresponding to the second rendering component on the first running vehicle based on the carrier identifier of the first running vehicle and the API of the second rendering component. 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 vehicle. The third acquisition module is used to acquire rendering instructions. The acquired rendering instructions are used to instruct the rendering component to be called 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 instructions to the first running carrier; so that the first running carrier receives the first content to be displayed and the obtained rendering instructions; and calls 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 obtained rendering instructions.
11. A page processing apparatus, characterized in that, Applied to a first operating carrier, the device includes: The third sending module is used to send an access request for the target page to the server, the access request carrying at least the carrier identifier of the first runtime carrier; so that the server receives the access request and, based on the carrier identifier of the first runtime carrier in the access request, obtains the first page data adapted for the target page on the first runtime carrier; the first page data includes: first content to be displayed adapted for display on the first runtime carrier and rendering instructions for using the application programming interface (API) of the second rendering component to call the rendering component to render the first content to be displayed; the first content to be displayed is obtained based on second content to be displayed adapted for display on the second runtime carrier, and the second rendering component includes a rendering component on the target page carried by the second runtime carrier suitable for rendering the second content to be displayed; The content to be displayed is located in the developed second page data adapted to the target page on the second running carrier. The second page data also includes rendering instructions that call the rendering component using the API of the second rendering component to render the second content to be displayed. Based on the carrier identifier of the first running carrier and the API of the second rendering component, the component path of the first rendering component applicable to the second rendering component on the first running carrier is obtained. 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. The rendering instructions are obtained to instruct the rendering component to be called 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 instructions are sent to the first running carrier. The second receiving module is used to receive at least the first content to be displayed and the obtained rendering instructions; 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 obtained rendering instructions.
12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the steps of the method as claimed in any one of claims 1 to 9 when executing the program.
13. A computer-readable storage medium, characterized in that, A computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method as claimed in any one of claims 1 to 9.
Citation Information
Patent Citations
Control page generation method and device, intelligent equipment and storage medium
CN114327709A
Page display method and device, storage medium and computer equipment
CN115016838A