A multi-terminal page adaptation method, device and medium based on a PaaS framework
By adopting a design that separates page logic from the view in the PaaS framework and pre-built compilation plugins, the inconsistency problem of multi-terminal page development in traditional PaaS systems is solved, achieving unified management and adaptation across platforms, and improving development efficiency and user experience.
Patent Information
- Application Number
- CN202410350760.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-26
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2044-03-26
AI Technical Summary
In traditional PaaS systems, the development of multi-platform pages is inconsistent and complex, making it difficult to achieve unified management and adaptation across platforms, resulting in high development costs, low efficiency, and inconsistent user experience.
By adopting a multi-platform page adaptation method based on the PaaS framework, and using a design that separates page logic from view, the system utilizes a preset compilation plugin to compile based on the platform identifier, and combines page debugging tools and an automated testing framework to achieve unified management and adaptation of multi-platform pages.
It reduces development complexity and cost, improves development efficiency and compatibility accuracy, ensures a consistent user experience across different devices, enhances user satisfaction and flexibility, and supports rapid problem identification and iterative optimization.
Smart Images

Figure CN118259906B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer software technology, and in particular to a multi-terminal page adaptation method, device and medium based on a PaaS framework. Background Technology
[0002] Multi-device support is a significant challenge in software development today. From a user's perspective, multi-device support means being able to install and run the same application on different devices, providing a seamless user experience. However, in traditional software development models, developers need to write multiple sets of code to meet the needs of different devices. This increases development costs and can lead to inconsistencies in functionality and a decline in user experience.
[0003] For software developers, multi-platform support means writing software code that is compatible with various devices. However, due to differences in screen size, resolution, operating system, and other factors among different devices, achieving cross-platform compatibility and consistency has become a significant challenge. Traditional development methods typically involve developing independently for each device platform, which not only extends the development cycle but also makes maintenance and updates complex and difficult.
[0004] PaaS (Platform-as-a-Service), as a service model in cloud computing, aims to provide users with a stable and highly scalable software development platform. On a PaaS platform, the runtime environment required by various applications is well-supported, allowing developers to focus on implementing business logic without worrying about the details of the underlying technology. However, in traditional PaaS systems, the problem of independent development across multiple platforms persists. Due to the differences between various device platforms, developers still need to write separate code for different devices, leading to inconsistencies in system functionality and complexity in user-defined configurations.
[0005] Furthermore, with the rapid development of mobile internet, users' demand for cross-platform applications is also increasing. Users expect a consistent user experience across different devices without worrying about device compatibility issues. Therefore, how to achieve unified management and adaptation of multi-platform pages has become an urgent problem to be solved in the software development field. Summary of the Invention
[0006] This application provides a method, device, and medium for multi-terminal page adaptation based on a PaaS framework to solve the following technical problem: how to achieve unified management and adaptation of multi-terminal pages.
[0007] In a first aspect, embodiments of this application provide a multi-terminal page adaptation method based on a PaaS framework. The method includes: developing a page application based on preset development specifications; wherein the page logic and views within the page application are separated; receiving an end identifier of the adaptable end corresponding to the page application, and, based on the end identifier, passing the page application into a preset compilation plugin for the corresponding adaptable end for compilation to obtain the corresponding end page resource file; when multi-terminal adaptation of the page application is required, obtaining a page adaptation request for the end to be adapted, and, based on the page adaptation request, rendering the corresponding end page resource file for the end to be adapted to display the corresponding end page.
[0008] In one implementation of this application, a page application is developed based on a preset development specification, specifically including: writing page logic corresponding to user interaction and data processing using JavaScript, and describing the view using HTML and CSS; defining the association between the page logic and the view of each part of the page, so as to realize the development of the page application.
[0009] In one implementation of this application, before compiling the page application into the corresponding pre-compiled plugin for the adaptable client based on the client identifier, the method further includes: developing a pre-compiled plugin for each client to be adapted, specifically including: analyzing the interaction method of each client to be adapted to determine the corresponding adaptation strategy; constructing the page application parsing logic and conversion logic of the corresponding pre-compiled plugin based on the adaptation strategy; and integrating the pre-compiled plugin into the PaaS framework.
[0010] In one implementation of this application, the page application is passed to the corresponding pre-defined compilation plugin for the compatible client for compilation based on the client identifier. Specifically, this includes: identifying the corresponding compatible client type based on the received client identifier; selecting a pre-defined compilation plugin that matches the compatible client type in the PaaS framework based on the compatible client type; passing the page application as an input parameter to the matching pre-defined compilation plugin; compiling the page application through the pre-defined compilation plugin to generate a client page resource file suitable for the corresponding compatible client; and saving the generated client page resource file to a preset file storage location.
[0011] In one implementation of this application, rendering the corresponding client-side page resource file based on the client-side page adaptation request includes: parsing the client-side page adaptation request to obtain the client-side identifier and preset theme configuration; reading the corresponding client-side page resource file from the file storage location based on the client-side identifier, and processing the client-side page resource file based on the preset theme configuration to obtain the client-side page resource file to be applied; parsing the client-side page resource file to obtain content information to be rendered; wherein, the content information to be rendered includes: theme configuration information, page logic, view description, and the relationship between page logic and view; adapting the content information to be rendered based on the attribute information of the client-side to achieve rendering of the client-side page resource file to be applied; wherein, the attribute information includes: screen size and resolution.
[0012] In one implementation of this application, the method further includes: receiving debugging instructions based on a pre-defined page debugging tool in the PaaS framework; and performing debugging processing on the corresponding end page resource file based on the debugging instructions.
[0013] In one implementation of this application, after displaying the corresponding page to be adapted, the method further includes: monitoring the running status of the page application on the page to be adapted; when an abnormal running status of the page application is detected, generating corresponding abnormal alarm information and sending it to a preset alarm receiving terminal.
[0014] In one implementation of this application, the method further includes: constructing an automated testing framework to perform functional and performance tests on multi-terminal pages; setting monitoring points to monitor the running status and user behavior of multi-terminal pages in real time; and iteratively optimizing the page application based on test results and monitoring data.
[0015] Secondly, embodiments of this application also provide a multi-terminal page adaptation device based on a PaaS framework. The device includes: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores instructions executable by the at least one processor, which, when executed, enable the at least one processor to: develop a page application based on a preset development specification; wherein the page logic and view within the page application are separated; receive an end identifier corresponding to an adaptable end of the page application, and, based on the end identifier, pass the page application to a preset compilation plugin for the corresponding adaptable end for compilation to obtain a corresponding end page resource file; when multi-terminal adaptation of the page application is required, obtain a page adaptation request for the end to be adapted, and, based on the page adaptation request, render the corresponding end page resource file for the end to be adapted to display the corresponding end page.
[0016] Thirdly, embodiments of this application also provide a non-volatile computer storage medium for multi-terminal page adaptation based on a PaaS framework, storing computer-executable instructions. The computer-executable instructions are characterized by: developing a page application based on a preset development specification; wherein the page logic and view within the page application are separated; receiving the endpoint identifier of the adaptable endpoint corresponding to the page application, and, based on the endpoint identifier, passing the page application into a preset compilation plugin of the corresponding adaptable endpoint for compilation to obtain the corresponding endpoint page resource file; and, when multi-terminal adaptation of the page application is required, obtaining the page adaptation request of the endpoint to be adapted, and, based on the page adaptation request of the endpoint to be adapted, rendering the corresponding endpoint page resource file of the endpoint to be adapted to display the corresponding endpoint page.
[0017] This application provides a multi-platform page adaptation method, device, and medium based on a PaaS framework. By developing page applications based on preset development specifications and separating page logic from views, it reduces development complexity and improves development efficiency. Simultaneously, this separated design allows page logic to be reused across different device platforms, reducing repetitive development workload. It allows page applications to be passed to corresponding preset compilation plugins for compilation based on the terminal identifier, thereby automatically generating page resource files suitable for different terminals. This process greatly simplifies the complexity of multi-platform adaptation, reduces adaptation costs, and improves adaptation accuracy and efficiency. By adapting the attribute information of the terminal to be adapted, the solution ensures that the page displays good visual effects and interactive experience on different devices, helping to improve user satisfaction and loyalty to the application. It allows the development of preset compilation plugins corresponding to each terminal to be adapted, which can be integrated into the PaaS framework as needed, making the solution highly flexible and scalable, adaptable to changes in the needs of different devices and platforms. By providing page debugging tools based on the PaaS framework, the solution enables developers to easily debug and process terminal page resource files, thereby quickly locating and resolving problems. In addition, the solution also enables functional testing, performance testing, and real-time monitoring of the running status and user behavior of multi-terminal pages by building an automated testing framework and setting monitoring points, providing strong support for iterative optimization of the pages. Attached Figure Description
[0018] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0019] Figure 1 A flowchart illustrating a multi-terminal page adaptation method based on a PaaS framework, provided in this application embodiment;
[0020] Figure 2 This is a schematic diagram of the internal structure of a multi-terminal page adaptation device based on a PaaS framework, provided as an embodiment of this application. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0022] This application provides a method, device, and medium for multi-terminal page adaptation based on a PaaS framework to solve the following technical problem: how to achieve unified management and adaptation of multi-terminal pages.
[0023] The technical solutions proposed in the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0024] Figure 1 This document provides a flowchart of a multi-terminal page adaptation method based on a PaaS framework, as illustrated in an embodiment of this application. Figure 1 As shown in the figure, the multi-terminal page adaptation method based on the PaaS framework provided in this application embodiment specifically includes the following steps:
[0025] Step 101: Develop the web application based on the preset development specifications.
[0026] In one embodiment of this application, in order to achieve multi-terminal page adaptation based on the PaaS framework, the page logic and view in the developed page application need to be separated from each other.
[0027] In one embodiment of this application, a page application is developed based on a preset development specification, specifically including: writing page logic corresponding to user interaction and data processing using JavaScript, and describing the view using HTML and CSS; defining the association between the page logic and the view of each part of the page, so as to realize the development of the page application.
[0028] In one embodiment, suppose an e-commerce platform needs to develop a product details page application that supports multi-platform display. According to pre-defined development specifications, we will use JavaScript, HTML, and CSS to implement a separation design between page logic and view.
[0029] First, we use JavaScript to write the page logic. This part of the logic mainly focuses on user interaction and data processing. For example, when a user clicks the "Add to Cart" button on the product details page, the JavaScript code will capture this event and trigger the corresponding processing logic, such as verifying the user's login status and updating the cart quantity. Simultaneously, JavaScript is also responsible for retrieving product data from the backend API and displaying it on the frontend.
[0030] Next, we'll use HTML and CSS to describe the page view. HTML defines the page structure, including elements such as product titles, prices, descriptions, and images. CSS controls the styles of these elements, such as colors, fonts, and layout. In this way, we can create an attractive and consistent product detail page.
[0031] After completing the page logic and view writing, we need to define the relationships between them. This is usually done by adding specific identifiers (such as IDs or class names) to HTML elements, and then using these identifiers in JavaScript to manipulate the corresponding elements and events. For example, we can add a unique ID to the "Add to Cart" button and bind a click event handler function to that ID in JavaScript.
[0032] Through the steps above, we successfully implemented a design that separates page logic from the view, and completed the development of the product details page application. This design approach not only improves code readability and maintainability, but also allows page logic to be reused across different device platforms, reducing development costs.
[0033] Step 102: Receive the endpoint identifier of the compatible client corresponding to the page application, and according to the endpoint identifier, pass the page application to the preset compilation plugin of the corresponding compatible client for compilation to obtain the corresponding client page resource file.
[0034] In one embodiment of this application, after developing the page application, the endpoint identifier of the adaptable endpoint corresponding to the page application is received. It is understood that the endpoint identifier of the adaptable endpoint is determined based on the pre-defined adaptable endpoints in the PaaS framework.
[0035] Furthermore, based on the terminal identifier, the page application is passed to the corresponding preset compilation plugin for the compatible terminal for compilation.
[0036] Specifically, based on the received endpoint identifier, the corresponding adaptable endpoint type is identified; based on the adaptable endpoint type, a preset compilation plugin matching the adaptable endpoint type is selected in the PaaS framework; the page application is passed as an input parameter to the matching preset compilation plugin; the page application is compiled through the preset compilation plugin to generate an endpoint page resource file suitable for the corresponding adaptable endpoint; and the generated endpoint page resource file is saved to a preset file storage location.
[0037] In one embodiment, suppose there is a cross-platform application based on a PaaS framework that needs to support three different platforms: Android, iOS, and Web. Each platform has its specific interaction methods and display requirements, thus requiring corresponding pre-compiled plugins for adaptation.
[0038] First, when our PaaS framework receives a compilation request for a web application, the request will contain an identifier for the target platform, such as "Android," "iOS," or "Web." Based on this platform identifier, our framework will identify the corresponding compatible platform type.
[0039] Next, based on the identified compatible platform type, our PaaS framework will search its internal pre-built compiler plugin library for a pre-defined compiler plugin that matches that platform type. For example, if the platform identifier is "Android", the framework will select a compiler plugin specifically designed for Android.
[0040] We then pass the page application as input to this matching preset build plugin. This plugin will then compile the page application according to its internal build logic and rules. This process may include adapting the page logic and views to ensure they function and display correctly on the target device.
[0041] After processing by the compilation plugin, a client-side page resource file suitable for the corresponding compatible client will be generated. This file contains all the resources required to run on the target client, such as HTML, CSS, JavaScript code, and possibly other media resources.
[0042] Finally, our PaaS framework saves the generated client page resource file to a preset file storage location. This location is typically based on a cloud service, ensuring file security and accessibility. Furthermore, for ease of subsequent management and deployment, these files are usually organized according to client identifiers and version information.
[0043] In one embodiment of this application, before compiling the page application into the corresponding pre-compiled plugin for the adaptable terminal according to the terminal identifier, the method further includes: developing a pre-compiled plugin for each terminal to be adapted, specifically including: analyzing the interaction mode of each terminal to be adapted to determine the corresponding adaptation strategy; constructing the page application parsing logic and conversion logic of the corresponding pre-compiled plugin based on the adaptation strategy; and integrating the pre-compiled plugin into the PaaS framework.
[0044] In one embodiment, assuming the PaaS-based mobile application development platform supports pre-built plugins for iOS, Android, and WeChat Mini Programs, we first need to analyze the interaction methods of these three platforms. For iOS, we need to understand its touch interaction, animation effects, and unique API interfaces; for Android, we need to study its Java or Kotlin-based development environment, Material Design guidelines, and multi-resolution adaptation mechanisms; and for WeChat Mini Programs, we need to consider its unique WXML template syntax, WXSS style rules, and the API interfaces provided by WeChat.
[0045] Based on the analysis of these interaction methods, we can determine the adaptation strategy for each platform. For example, for iOS, we may need to implement specific gesture recognition and animation transition effects; for Android, we may need to optimize the display effect of the page on screens with different resolutions; and for WeChat Mini Programs, we need to ensure that the page logic can seamlessly connect with the WeChat platform's API interface.
[0046] Next, based on these adaptation strategies, we build corresponding pre-built compilation plugins. Each compilation plugin needs to have page application parsing logic and conversion logic. The parsing logic is responsible for reading the page application code and understanding its structure and function; the conversion logic, according to the target platform's adaptation strategy, converts the page application code into a format that can run on that platform.
[0047] Taking iOS as an example, our default compilation plugin may include conversion logic to convert JavaScript code into Objective-C or Swift code so that it can be executed on the iOS platform; at the same time, it will also handle the conversion of HTML and CSS to ensure that page elements are displayed correctly on iOS devices.
[0048] After developing the compilation plugins, we need to integrate them into the PaaS framework. This typically involves adding the plugin code to the corresponding modules of the framework and ensuring that the framework can correctly call these plugins to perform compilation tasks. Furthermore, we need to set appropriate configuration options within the framework so that users can select the endpoints they want to support and trigger the corresponding compilation process.
[0049] In one embodiment of this application, the PaaS framework also includes a pre-built page debugging tool. After obtaining the corresponding client page resource file, the tool receives debugging instructions based on the pre-built page debugging tool in the PaaS framework and performs debugging processing on the corresponding client page resource file based on the debugging instructions.
[0050] In one embodiment, the PaaS framework of this application not only supports the compilation of page applications, but also comes pre-installed with a powerful set of page debugging tools. These tools are designed to help developers efficiently debug and optimize the generated client-side page resource files.
[0051] First, once the PaaS framework completes the compilation of the web application and generates the corresponding client-side page resource files, these files are stored in a pre-defined storage location, such as a cloud server or a local development environment. At this point, developers can trigger page debugging tools through the PaaS framework's user interface or command-line interface.
[0052] Once the page debugging tool is triggered, it begins listening for debugging commands. These commands can be entered by developers through the user interface or sent via other integration tools or automation scripts. The content of these commands can be quite varied, including viewing page elements, modifying style properties, executing JavaScript code, and checking network requests.
[0053] When a PaaS framework receives a debugging instruction, it uses pre-defined page debugging tools to debug the corresponding client-side page resource files. For example, if a developer wants to view the layout information of a page element, the debugging tool will load the page resource file and render the corresponding page in the browser. Then, it will highlight the target element and display its size, position, and other layout information.
[0054] If a developer wants to modify the style properties of an element, the debugging tool will load the page resource files and render the page in the browser. Then, it will provide an interactive style editor, allowing the developer to modify the element's style in real time and immediately see the effect of the changes.
[0055] In addition, the page debugging tool supports executing JavaScript code and inspecting network requests. Developers can enter JavaScript code snippets into the debugging tool and execute them immediately on the target page. Simultaneously, the tool can record and display all network requests made by the page, helping developers analyze performance bottlenecks and potential security issues.
[0056] Step 103: When it is necessary to adapt the page application to multiple platforms, obtain the adaptation request of the page to be adapted, and render the corresponding page resource file of the page to be adapted based on the adaptation request of the page to be adapted, so as to display the corresponding page to be adapted.
[0057] In one embodiment of this application, after compiling in the preset compilation plugin of the corresponding adaptable end to obtain the corresponding end page resource file, when it is necessary to adapt the page application to multiple ends, the page adaptation request of the end to be adapted is obtained.
[0058] Furthermore, after obtaining the adaptation request for the page to be adapted, the corresponding page resource file for the page to be adapted is rendered based on the adaptation request to display the corresponding page to be adapted.
[0059] Specifically, the adaptation request for the target page is parsed to obtain the target page identifier and preset theme configuration; based on the target page identifier, the corresponding target page resource file is read from the file storage location, and processed according to the preset theme configuration to obtain the target page resource file; the target page resource file is parsed to obtain the content information to be rendered; the content information to be rendered includes: theme configuration information, page logic, view description, and the relationship between page logic and view; based on the attribute information of the target page, the content information to be rendered is adapted to achieve the rendering of the target page resource file; the attribute information includes: screen size and resolution.
[0060] In one embodiment, when a page adaptation request is received from the client to be adapted, it needs to be parsed. The purpose of this step is to extract key information from the request for accurate resource file reading and processing later. During parsing, we can obtain the client identifier and preset theme configuration. The client identifier identifies the type of the requested terminal, such as Android, iOS, or Web; while the preset theme configuration includes the theme style set by the user or developer for that terminal, such as colors, fonts, and layout.
[0061] Next, based on the obtained client identifier, we will locate and read the corresponding client page resource file from the pre-defined file storage location. These resource files were generated during the previous compilation process and contain all the elements and logic required by the client page. After reading the resource file, we will process it according to the preset theme configuration. The processing may include replacing style definitions in the resource file, adjusting layout parameters, etc., to ensure that the page can be displayed according to the user's theme configuration.
[0062] After processing the resource files, we obtain the resource files for the application's final page. At this point, we need to parse these files to obtain the content information to be rendered. This information includes theme configuration information, page logic, view descriptions, and the relationships between page logic and views. During the parsing process, we can use appropriate parsing tools or algorithms to parse and extract the file content, providing the necessary data support for subsequent rendering operations.
[0063] Finally, based on the attribute information of the target device, we perform adaptation processing on the extracted content information to be rendered. Attribute information typically includes screen size, resolution, etc., which are crucial for achieving accurate page rendering. During the adaptation process, we adjust the layout and size of page elements according to the screen size to ensure a good visual effect on screens of different sizes; at the same time, we also adjust the image display quality according to the resolution to avoid problems such as blurring or distortion.
[0064] By following the steps above, accurate rendering of application-side page resource files can be achieved, ensuring a consistent and high-quality user experience across different types of devices. This approach not only improves the flexibility and maintainability of page development but also reduces the difficulty and cost of cross-platform development.
[0065] In one embodiment of this application, after displaying the corresponding page to be adapted, the method further includes: monitoring the running status of the page application on the page to be adapted; when an abnormal running status of the page application is detected, generating corresponding abnormal alarm information and sending it to a preset alarm receiving terminal.
[0066] In one implementation of this application, the method further includes: constructing an automated testing framework to perform functional and performance tests on multi-terminal pages; setting monitoring points to monitor the running status and user behavior of multi-terminal pages in real time; and iteratively optimizing the page application based on test results and monitoring data.
[0067] The above are embodiments of the method proposed in this application. Based on the same inventive concept, embodiments of this application also provide a multi-terminal page adaptation device based on a PaaS framework, the structure of which is as follows: Figure 2 As shown.
[0068] Figure 2 This is a schematic diagram of the internal structure of a multi-terminal page adaptation device based on a PaaS framework, provided as an embodiment of this application. Figure 2 As shown, the device includes:
[0069] At least one processor 201;
[0070] And a memory 202 that is communicatively connected to at least one processor;
[0071] The memory 202 stores instructions executable by at least one processor, which are executed by at least one processor 201 to enable at least one processor 201 to:
[0072] Develop a web application based on pre-defined development specifications; in this web application, the page logic and the view are separated from each other.
[0073] Receive the endpoint identifier of the compatible client corresponding to the page application, and according to the endpoint identifier, pass the page application into the preset compilation plugin of the corresponding compatible client for compilation to obtain the corresponding client page resource file.
[0074] When a page application needs to be adapted to multiple platforms, the adaptation request of the page to be adapted is obtained, and the corresponding page resource file of the page to be adapted is rendered based on the adaptation request to display the corresponding page.
[0075] Some embodiments of this application provide corresponding to Figure 1 A non-volatile computer storage medium based on a PaaS framework and multi-terminal page adaptation, storing computer-executable instructions, wherein the computer-executable instructions are configured as follows:
[0076] Develop a web application based on pre-defined development specifications; in this web application, the page logic and the view are separated from each other.
[0077] Receive the endpoint identifier of the compatible client corresponding to the page application, and according to the endpoint identifier, pass the page application into the preset compilation plugin of the corresponding compatible client for compilation to obtain the corresponding client page resource file.
[0078] When a page application needs to be adapted to multiple platforms, the adaptation request of the page to be adapted is obtained, and the corresponding page resource file of the page to be adapted is rendered based on the adaptation request to display the corresponding page.
[0079] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments for IoT devices and media are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0080] The systems, media, and methods provided in this application are one-to-one correspondences. Therefore, the systems and media also have similar beneficial technical effects as their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the systems and media will not be repeated here.
[0081] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0082] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will 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 data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0083] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function 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 function specified in one or more boxes.
[0084] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0085] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0086] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0087] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0088] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0089] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A multi-terminal page adaptation method based on a PaaS framework, characterized in that, The method includes: A page application is developed based on a pre-defined development specification; wherein the page logic and view in the page application are separated from each other. Receive the terminal identifier of the adaptable terminal corresponding to the page application, and according to the terminal identifier, pass the page application into the preset compilation plugin of the corresponding adaptable terminal for compilation to obtain the corresponding terminal page resource file; When it is necessary to adapt the page application to multiple platforms, obtain the adaptation request of the page to be adapted, and render the corresponding page resource file of the page to be adapted based on the adaptation request of the page to be adapted, so as to display the corresponding page to be adapted. Before compiling the page application into the corresponding compatible client's preset compilation plugin according to the client identifier, the method further includes: Develop pre-compiled plugins for each client to be adapted, specifically including: Analyze the interaction methods of each client to be adapted in order to determine the corresponding adaptation strategy; Based on the adaptation strategy, construct the corresponding preset compilation plugin's page application parsing logic and conversion logic; Integrate the preset compilation plugin into the PaaS framework; Based on the terminal identifier, the page application is passed to the corresponding preset compilation plugin for the compatible terminal for compilation, specifically including: Based on the received terminal identifier, identify the corresponding compatible terminal type; Based on the adaptable terminal type, a preset compilation plugin that matches the adaptable terminal type is selected in the PaaS framework; The page application is passed as an input parameter to the matching preset compilation plugin; The preset compilation plugin is used to compile the page application and generate terminal page resource files suitable for the corresponding compatible terminal. Save the generated client page resource files to the preset file storage location; Based on the adaptation request of the client page to be adapted, render the corresponding client page resource file to be adapted, specifically including: Parse the adaptation request of the page to be adapted to obtain the terminal identifier and preset theme configuration of the terminal to be adapted; Based on the terminal identifier of the terminal to be adapted, the corresponding terminal page resource file is read from the file storage location, and the terminal page resource file is processed based on the preset theme configuration to obtain the terminal page resource file to be applied. The resource files of the page to be applied are parsed to obtain the content information to be rendered; wherein, the content information to be rendered includes: theme configuration information, page logic, view description, and the relationship between page logic and view; Based on the attribute information of the client to be adapted, the content information to be rendered is adapted to achieve the rendering of the page resource file of the client to be applied; wherein, the attribute information includes: screen size and resolution.
2. The multi-terminal page adaptation method based on a PaaS framework according to claim 1, characterized in that, Based on pre-defined development specifications, develop a web application, specifically including: Write the page logic for user interaction and data processing using JavaScript, and describe the view using HTML and CSS; Define the page logic and view relationships for each part of the page to enable the development of the page application.
3. The multi-terminal page adaptation method based on a PaaS framework according to claim 1, characterized in that, The method further includes: Based on the pre-set page debugging tools in the PaaS framework, receive debugging commands; The corresponding client page resource files are debugged based on the debugging instructions.
4. The multi-terminal page adaptation method based on a PaaS framework according to claim 1, characterized in that, After displaying the corresponding page to be adapted, the method further includes: Monitor the running status of the page application on the client to be adapted; When an abnormal running status of the page application is detected, a corresponding abnormal alarm message is generated and sent to a preset alarm receiver.
5. A multi-terminal page adaptation method based on a PaaS framework according to claim 1, characterized in that, The method further includes: Build an automated testing framework to perform functional and performance testing on multi-platform pages; Set up monitoring points to monitor the running status and user behavior of multiple pages in real time; Based on the test results and monitoring data, the page application was iteratively optimized.
6. A multi-terminal page adaptation device based on a PaaS framework, characterized in that, The device includes: At least one processor; And, a memory communicatively connected to the at least one processor; The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to: A page application is developed based on a pre-defined development specification; wherein the page logic and view in the page application are separated from each other. Receive the terminal identifier of the adaptable terminal corresponding to the page application, and according to the terminal identifier, pass the page application into the preset compilation plugin of the corresponding adaptable terminal for compilation to obtain the corresponding terminal page resource file; When it is necessary to adapt the page application to multiple platforms, obtain the adaptation request of the page to be adapted, and render the corresponding page resource file of the page to be adapted based on the adaptation request of the page to be adapted, so as to display the corresponding page to be adapted. Before compiling the page application into the corresponding compatible client's preset compilation plugin based on the client identifier, the method further includes: Develop pre-compiled plugins for each client to be adapted, specifically including: Analyze the interaction methods of each client to be adapted in order to determine the corresponding adaptation strategy; Based on the adaptation strategy, construct the corresponding preset compilation plugin's page application parsing logic and conversion logic; Integrate the preset compilation plugin into the PaaS framework; Based on the terminal identifier, the page application is passed to the corresponding preset compilation plugin for the compatible terminal for compilation, specifically including: Based on the received terminal identifier, identify the corresponding compatible terminal type; Based on the adaptable terminal type, a preset compilation plugin that matches the adaptable terminal type is selected in the PaaS framework; The page application is passed as an input parameter to the matching preset compilation plugin; The preset compilation plugin is used to compile the page application and generate terminal page resource files suitable for the corresponding compatible terminal. Save the generated client page resource files to the preset file storage location; Based on the adaptation request of the client page to be adapted, render the corresponding client page resource file to be adapted, specifically including: Parse the adaptation request of the page to be adapted to obtain the terminal identifier and preset theme configuration of the terminal to be adapted; Based on the terminal identifier of the terminal to be adapted, the corresponding terminal page resource file is read from the file storage location, and the terminal page resource file is processed based on the preset theme configuration to obtain the terminal page resource file to be applied. The resource files of the page to be applied are parsed to obtain the content information to be rendered; wherein, the content information to be rendered includes: theme configuration information, page logic, view description, and the relationship between page logic and view; Based on the attribute information of the client to be adapted, the content information to be rendered is adapted to achieve the rendering of the page resource file of the client to be applied; wherein, the attribute information includes: screen size and resolution.
7. A non-volatile computer storage medium based on a PaaS framework and multi-terminal page adaptation, storing computer-executable instructions, characterized in that, The computer-executable instructions are set as follows: A page application is developed based on a pre-defined development specification; wherein the page logic and view in the page application are separated from each other. Receive the terminal identifier of the adaptable terminal corresponding to the page application, and according to the terminal identifier, pass the page application into the preset compilation plugin of the corresponding adaptable terminal for compilation to obtain the corresponding terminal page resource file; When it is necessary to adapt the page application to multiple platforms, obtain the adaptation request of the page to be adapted, and render the corresponding page resource file of the page to be adapted based on the adaptation request of the page to be adapted, so as to display the corresponding page to be adapted. Before compiling the page application into the corresponding compatible client's preset compilation plugin based on the client identifier, the method further includes: Develop pre-compiled plugins for each client to be adapted, specifically including: Analyze the interaction methods of each client to be adapted in order to determine the corresponding adaptation strategy; Based on the adaptation strategy, construct the corresponding preset compilation plugin's page application parsing logic and conversion logic; Integrate the preset compilation plugin into the PaaS framework; Based on the terminal identifier, the page application is passed to the corresponding preset compilation plugin for the compatible terminal for compilation, specifically including: Based on the received terminal identifier, identify the corresponding compatible terminal type; Based on the adaptable terminal type, a preset compilation plugin that matches the adaptable terminal type is selected in the PaaS framework; The page application is passed as an input parameter to the matching preset compilation plugin; The preset compilation plugin is used to compile the page application and generate terminal page resource files suitable for the corresponding compatible terminal. Save the generated client page resource files to the preset file storage location; Based on the adaptation request of the client page to be adapted, render the corresponding client page resource file to be adapted, specifically including: Parse the adaptation request of the page to be adapted to obtain the terminal identifier and preset theme configuration of the terminal to be adapted; Based on the terminal identifier of the terminal to be adapted, the corresponding terminal page resource file is read from the file storage location, and the terminal page resource file is processed based on the preset theme configuration to obtain the terminal page resource file to be applied. The resource files of the page to be applied are parsed to obtain the content information to be rendered; wherein, the content information to be rendered includes: theme configuration information, page logic, view description, and the relationship between page logic and view; Based on the attribute information of the client to be adapted, the content information to be rendered is adapted to achieve the rendering of the page resource file of the client to be applied; wherein, the attribute information includes: screen size and resolution.
Citation Information
Patent Citations
Small program development, compilation and operation system based on uniapp
CN117707531A