Page processing method and device of application program, equipment, medium and product
Through the loading and morphological configuration of multi-dimensional skin package files, the problem of single skin replacing strategies of existing application is solved, and the fine-grained skin replacing of application page elements is achieved, which improves the diversity and flexibility of skin patterns.
Patent Information
- Application Number
- CN202411234688.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2024-12-27
AI Technical Summary
The skinning strategy of existing applications is relatively single and not flexible enough to meet users' diverse needs for display modes.
Provides an application's page processing method, which can achieve fine-grained skinning of application page elements by obtaining and loading multi-dimensional skin package files, supports morphological configuration and switching of global and local page elements, and adapt to different page types. How to organize skin resources.
It realizes multi-dimensional form switching of application page elements, improves the diversity and flexibility of skin patterns, and meets users' skin replacement needs.
Smart Images

Figure CN119200923A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, equipment, medium and product for page processing of an application, and specifically to a method for page processing of an application, a page processing device for an application, a computer device, a computer-readable storage medium and a computer program product. Background Art
[0002] At present, most applications have the ability to change skins (i.e., the ability to switch forms) so that they can provide users with different display modes or display themes during use. For example, the display mode of a mobile phone can switch skins between daytime (light color) mode and nighttime (dark color) mode. At present, the skinning strategy for applications is often a coarse-grained skinning mode, for example: switching the background color of all program pages in the entire application (such as switching from white to black, or switching from black to white). This skinning mode is relatively simple and not flexible enough. Summary of the invention
[0003] The embodiments of the present application provide a method, apparatus, device, medium and product for page processing of an application, which can provide a multi-dimensional and fine-grained skinning mode for the application to improve the diversity of skin modes, thereby meeting the flexibility requirements of skinning.
[0004] On the one hand, an embodiment of the present application provides a page processing method of an application program, the method comprising:
[0005] Acquire at least one skin package file of the application; any skin package file contains skin resources corresponding to a program page in the application, and the skin resources are used to indicate the form rendering of page elements in at least one dimension of the program page; a skin package file is used to provide a display mode for the application;
[0006] In the process of displaying the application program in the first display mode, obtaining a skin switching instruction for the application program, the skin switching instruction being used to instruct to switch the application program from the first display mode to the second display mode;
[0007] Acquire a target skin package file associated with the second display mode from at least one skin package file corresponding to the application;
[0008] The target skin package file is subjected to resource loading processing to switch the form of page elements in at least one dimension in the program page of the application program, and the program page in the application program is displayed in the second display mode.
[0009] On the one hand, an embodiment of the present application provides a page processing device for an application, the device comprising:
[0010] An acquisition unit is used to acquire at least one skin package file of an application; any skin package file contains skin resources corresponding to a program page in the application, and the skin resources are used to indicate the form rendering of page elements in at least one dimension of the program page; a skin package file is used to provide a display mode for the application;
[0011] A processing unit, configured to obtain a skin switching instruction for the application program during display of the application program in the first display mode, wherein the skin switching instruction is used to instruct to switch the application program from the first display mode to the second display mode;
[0012] The acquiring unit is further used to acquire a target skin package file associated with the second display mode from at least one skin package file corresponding to the application program;
[0013] The processing unit is further used to perform resource loading processing on the target skin package file to switch the form of page elements in at least one dimension of the program page of the application program, and display the program page in the application program according to the second display mode.
[0014] In a possible implementation, the processing unit is further configured to perform the following operations:
[0015] Obtaining a morphology configuration file, the morphology configuration file includes at least one element configuration field, and any element configuration field is used to indicate that a morphology configuration is performed for a program page in an application program;
[0016] Obtaining a global page element under at least one global dimension to be configured in the application, where the global page element includes: any one or more of application theme, page background, font color, pop-up window style, and dividing line color;
[0017] In the form configuration file, corresponding form parameters are configured for each global page element to generate a first configuration file of the application;
[0018] Based on the first configuration file, a skin package file of the application is generated.
[0019] In a possible implementation, the application supports displaying N program pages, any one of the N program pages is represented as program page i, i and N are both positive integers and 1≤i≤N; the processing unit is further configured to perform the following operations:
[0020] Obtaining a local page element in at least one local dimension to be configured in a program page i of the application, where the local page element includes: any one or more of a control, a card, an icon, and text;
[0021] Based on the first configuration file and the morphology configuration file, respectively configure corresponding morphology parameters for each local page element in the program page i to generate a second configuration file of the application program;
[0022] Based on the second configuration file, a skin package file of the application is generated.
[0023] In a possible implementation, the processing unit is further configured to perform the following operations:
[0024] Build a page pre-embedded file for the application. The page pre-embedded file is used to provide configuration permissions for the global page elements and local page elements to be configured in the application.
[0025] Based on the page pre-embedded file and the form configuration file, the form configuration is performed for each global page element and local page element in the application, and the skin package file of the application is generated.
[0026] In a possible implementation, the processing unit generates a skin package file of the application based on the second configuration file, and is used to perform the following operations:
[0027] Obtain an image file corresponding to the application, where the image file contains at least one image to be displayed in the application;
[0028] Obtain K page types corresponding to program pages in the application, and use K organization methods to perform K times of structural organization processing on the image file and the second configuration file to generate K skin resources; and package the K skin resources to generate a skin package file of the application; wherein one organization method corresponds to generating one skin resource under one page type, and K is a positive integer; or,
[0029] The image file and the second configuration file are organized in a general structure in a general organization manner to generate a general skin resource; and a skin package file of the application is generated based on the general skin resource.
[0030] In a possible implementation, the target skin package file includes K skin resources, one skin resource is used to indicate the form rendering of a page element in a program page under a page type, and K is a positive integer;
[0031] The processing unit performs resource loading processing on the target skin package file to perform the following operations:
[0032] During the running of the application, determining the target page type corresponding to the program page displayed by the application, the target page type including: any one of a native page, a cross-end page, and a front-end page;
[0033] According to the target page type, obtaining the target skin resource associated with the target page type from the target skin package file;
[0034] Perform resource loading process on the target skin resource.
[0035] In a possible implementation, the target skin package file includes a universal skin resource, and the universal skin resource is used to indicate the morphological rendering of page elements in program pages under K types of page types, where K is a positive integer;
[0036] The processing unit performs resource loading processing on the target skin package file to perform the following operations:
[0037] During the running of the application, determining the target page type corresponding to the program page displayed by the application, the target page type including: any one of a native page, a cross-end page, and a front-end page;
[0038] According to the target page type, determine the target program interface in the form switching tool to be called;
[0039] Calling the target program interface to perform resource conversion processing on the general skin resource to obtain the converted skin resource;
[0040] Perform resource loading processing on the converted skin resources.
[0041] In a possible implementation, a form switching tool is deployed in the application, and the form switching tool provides one or more program interfaces, one of which is used to trigger the acquisition of skin resources under a page type; the processing unit acquires the target skin resource associated with the target page type from the target skin package file according to the target page type, and performs the following operations:
[0042] According to the target page type, determine the target program interface to be called in the form switching tool;
[0043] The target program interface of the form switching tool is called to perform resource parsing processing on the target skin package file to obtain the target skin resource associated with the target page type.
[0044] In a possible implementation, the application supports displaying N program pages, any one of the N program pages is represented as program page i, i and N are both positive integers and 1≤i≤N; the processing unit performs resource loading processing on the target skin resource to perform the following operations:
[0045] Call the target program interface to perform resource parsing on the target skin resource, and obtain resource objects associated with each of the N program pages in the application program, wherein any resource object is used to indicate the form rendering of the page element under at least one dimension in the corresponding program page;
[0046] According to the resource objects associated with the program page i, a multi-dimensional page element morphology rendering process is performed on the program page i.
[0047] In a possible implementation, the target skin package file also includes a page package file of a specified page type, and the page package file includes a page layout and a display form of a program page displayed according to the specified page type; the processing unit is further configured to perform the following operations:
[0048] If the target page type is a specified page type, then the page package file of the specified page type is obtained from the target skin package file; the specified page type is a cross-end page or a front-end page;
[0049] Resources are loaded based on the page package file, and the page is displayed in the application according to the page layout and display form indicated by the page package file.
[0050] In a possible implementation, the processing unit is further configured to perform the following operations:
[0051] During the running of the application, detecting a first running time of the application;
[0052] If the first running time is within the preset time period, a preset skin package file matching the preset time period is obtained from the cloud resource configuration management platform; the preset skin package file is used to provide a specified display mode for the application program within the preset time period;
[0053] Resources are loaded according to a preset skin package file to switch the application from the second display mode to the designated display mode within a preset time period.
[0054] In a possible implementation, after the application is switched from the second display mode to the specified display mode within a preset time period, the processing unit is further configured to perform the following operations:
[0055] Detecting a second run time of the application;
[0056] If the second running time is not within the preset time period, switching the application from the specified display mode to the second display mode or the first display mode;
[0057] The first display mode refers to: a preset display mode of the application or any display mode.
[0058] On the one hand, an embodiment of the present application provides a computer device, which includes a processor and a memory; a computer program is stored in the memory; when the computer program is executed by the processor, the page processing method of the above-mentioned application is executed.
[0059] On the one hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the page processing method of the above-mentioned application is executed.
[0060] On the one hand, an embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the page processing method of the above-mentioned application is executed.
[0061] In an embodiment of the present application, at least one skin package file of an application is obtained, and any skin package file contains skin resources corresponding to a program page in the application, and the skin resources are used to indicate the form rendering of page elements in at least one dimension in the program page; a skin package file is used to provide a display mode for the application; in the process of displaying the application in a first display mode, a skin switching instruction for the application is obtained, and the skin switching instruction is used to indicate switching the application from the first display mode to a second display mode; from at least one skin package file corresponding to the application, a target skin package file associated with the second display mode is obtained; and resource loading processing is performed on the target skin package file to perform form switching of page elements in at least one dimension in the program page of the application, and display the program page in the application in the second display mode. It can be seen that the skin package file provided for the application in the present application is a file used for morphological rendering of multi-dimensional page elements in the program page. Therefore, the morphological switching of page elements (i.e., skinning) can be realized during the operation of the application, thereby meeting the fine-grained skinning requirements; further, since the morphological switching of page elements of the program page can also be performed in multi-dimensional manner, the present application can also provide a multi-dimensional skinning mode to improve the diversity of skin modes, thereby meeting the flexibility requirements of skinning. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0063] Figure 1 It is a schematic diagram of the principle of a page processing solution of an application provided in an embodiment of the present application;
[0064] Figure 2 is a schematic diagram of an application in different display modes provided by an embodiment of the present application;
[0065] Figure 3 It is a schematic diagram of the architecture of a page processing system of an application provided in an embodiment of the present application;
[0066] Figure 4 It is a flowchart of a page processing method of an application provided in an embodiment of the present application;
[0067] Figure 5a It is a structural diagram of a program page provided in an embodiment of the present application;
[0068] Figure 5b It is a structural schematic diagram of a page pre-embedded file provided in an embodiment of the present application;
[0069] Figure 6 It is a schematic diagram of a process of issuing a skin package file provided in an embodiment of the present application;
[0070] Figure 7a It is a flowchart of generating a skin switching instruction provided by an embodiment of the present application;
[0071] Figure 7b is another flowchart of generating a skin switching instruction provided by an embodiment of the present application;
[0072] Figure 8 It is a flowchart of another method for processing a page of an application program provided in an embodiment of the present application;
[0073] Figure 9a It is a schematic diagram of a unified skin-changing pathway provided in an embodiment of the present application;
[0074] Figure 9b This is a schematic diagram of a process of dynamically loading a page provided in an embodiment of the present application;
[0075] Fig.10 It is a schematic diagram of a process of loading skin resources provided in an embodiment of the present application;
[0076] Fig.11 It is a structural diagram of a page processing device of an application provided in an embodiment of the present application;
[0077] Fig.12 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0078] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0079] This application provides a page processing solution for an application program, and provides a diverse skinning solution, which can realize multi-dimensional and fine-grained skinning processing for any application program (i.e., switching the display form of the program page in the application program, for example: switching the background color of the program page, or switching the shape of the control of the program page, etc.); specifically, a diverse skin package file can be provided for the application program, so as to realize fine-grained skinning processing of page elements in the program page, that is, to provide a multi-dimensional and fine-grained skinning mode for the application program, so as to improve the diversity of skin modes, thereby meeting the flexibility requirements of skinning. Please refer to Figure 1 , Figure 1 This is a schematic diagram of the principle of a page processing solution for an application provided in an embodiment of the present application. Figure 1 The principle of the page processing solution of the application provided by this application is roughly explained:
[0080] (1) Obtain at least one skin package file of the application (such as Figure 1 As shown, skin package file 1 and skin package file 2, this solution does not specifically limit the number of skin package files, and the corresponding skin package files can be flexibly configured according to specific needs), any skin package file contains skin resources corresponding to the program page in the application, and the skin resources are used to indicate the morphological rendering of page elements (such as controls, cards, fonts and other page elements) in at least one dimension of the program page; a skin package file is used to provide a display mode for the application, for example, skin package file 1 is used to provide a first display mode for the application, and skin package file 2 is used to provide a second display mode for the application.
[0081] (2) While displaying an application in a first display mode (eg, a default display mode or a specified display mode), obtaining a skin switching instruction for the application, wherein the skin switching instruction is used to instruct switching the application from the first display mode to the second display mode.
[0082] (3) Obtaining a target skin package file associated with the second display mode from at least one skin package file corresponding to the application; wherein a skin package file may correspond to a display mode through a file identifier (such as a name, ID, etc.), for example, the first display mode corresponds to skin package file 1, and the second display mode corresponds to skin package file 2, then skin package file 2 may be used as the target skin package file according to the second display mode.
[0083] (4) Perform resource loading processing on the target skin package file to switch the form of page elements in at least one dimension of the program page of the application (for example, switch the form of multi-dimensional page elements such as control shape, font size, and background color in the program page), so that the program page in the application can be displayed according to the second display mode.
[0084] As can be seen from the above, the present application provides a variety of skin-changing modes for an application, supporting fine-grained skin-changing processing of page elements in the program page of the application, such as morphological switching of fine-grained page elements such as control shape, font size, and background color in the program page; further, the present application can also realize morphological switching of multi-dimensional page elements in the program page, so the present application can also provide a multi-dimensional skin-changing mode to improve the diversity of skin modes, thereby meeting the flexibility requirements of skin-changing.
[0085] The key technical terms involved in this application are introduced below.
[0086] 1. Skin package files and skin resources.
[0087] Skin: This application refers to the skin of an application, specifically the display mode of the application. The display mode here is used to indicate the display form of each program page in the application, specifically involving the display form of page elements in the program page (such as page background color, font size, font color, control shape, pop-up window style, etc.).
[0088] A skin package file refers to a file package to be rendered for providing a skin mode or display mode of an application; wherein the skin mode (or display mode) here refers to the UI (User Interface) page form presented to the user during the display process of the application, so the skin package file involved in this application can be considered as a skin resource (such as file / code) for rendering the form of the application. For example, the page form includes but is not limited to: the background color of the page, the shape and size of the controls in the page, and the size and format of the font to be displayed in the page, etc. Among them, a skin package file is used to provide a display mode for the application, and the form of the program page displayed by the application in different display modes is different. For example, skin package file 1 is used to provide a first display mode (such as day mode) for the application, and skin package file 2 is used to provide a second display mode (such as night mode) for the application; then the application displayed in the day mode usually displays the page in a brighter color (such as a white background color and dark text); the application displayed in the night mode usually displays the page in a darker color (such as a black background color and light text). Furthermore, different skin package files can provide different display modes for the application, thereby allowing the user to change the visual style of the application according to personal preferences or specific environments to meet the user's visual needs for flexibility as much as possible.
[0089] Skin resources refer to a resource file used to render the page elements in at least one dimension of each program page of an application. The dimensions here include: global dimension and local dimension. The so-called page elements in the global dimension (referred to as global page elements) refer to coarse-grained page elements applied to all program pages in the entire application, such as global page elements including but not limited to: any one or more of application theme, page background, font color, pop-up window style, and dividing line color; the so-called page elements in the local dimension (referred to as local page elements) refer to fine-grained page elements applied to some specified program pages in the application, such as local page elements including but not limited to: any one or more of controls, cards, icons, and fonts. Based on this, the skin resource can be used to render the page elements of the application in the global dimension to facilitate the coarse-grained general skinning of the application; the skin resource can also be used to render the page elements of the application in the local dimension, so as to achieve fine-grained skinning requirements for a certain program page on the basis of general skinning. This combination of coarse-grained + fine-grained skinning strategy can meet the flexibility and diversity of skinning.
[0090] 2. Program page and page type.
[0091] As the name implies, a program page refers to the display page of an application (Application, APP), or a page displayed in an application terminal (such as an application, a web browser, or a mini-program (i.e., an application that does not require installation)). The program page displays page elements in at least one dimension, and then provides users with application functions for data interaction based on multi-dimensional page elements; for example, the page elements provided in the program page include but are not limited to: controls (such as buttons), cards, icons, pop-ups, text, and dividing lines. The types, quantities, and display forms of page elements displayed in different program pages are the same or different. In actual application, users can interact with data based on the page elements displayed in the program page. For example, users can click (such as single-click, double-click, or long-press) a control to achieve a page interaction; for example, users can also achieve a page interaction while browsing text on a program page.
[0092] Page type refers to the different display types presented to users after the program page in the application is developed using different technology stacks. For example, the technology stack here includes but is not limited to: program native technology stack, cross-end technology stack (such as Hippy technology stack, Flutter technology stack, Xamarin technology stack, React Native technology stack, etc.), and front-end technology stack (such as H5 (fifth generation Hypertext Markup Language, Hyper Text Mark Language 5 / HTML5) technology stack, mini program technology stack). Based on the page development mode of different protocol stacks, the same program page can be displayed according to different page types. For example, the program pages in the application include: native pages, cross-end pages, front-end pages (such as H5 pages, mini program pages, etc.); further, due to the different page development modes of different page types, the skin resources corresponding to the program pages displayed according to different page types may be different. For example, the skin resource used by the program page under page type 1 (such as the native page) during form rendering is skin resource 1; the skin resource used by the program page under page type 2 (such as the cross-end page) during form rendering is skin resource 2; the skin resource used by the program page under page type 3 (such as the front-end page) during form rendering is skin resource 3.
[0093] 3. Display mode and form switching.
[0094] Display mode refers to a skin mode that provides different visual effects to users when displaying an application. A display mode is rendered based on a skin package file, that is, a display mode is associated with a skin package file. See Figure 2 , Figure 2 Schematic diagram of an application in different display modes provided by an embodiment of the present application. Figure 2 As shown, it is assumed that the application (such as a social application) provides two skin package files: skin package file 1 and skin package file 2. On the one hand, skin package file 1 is used to provide a first display mode (such as day mode) for the application, and then the application displayed in the first display mode is as follows: Figure 2 As shown in 2(a) in the figure, the application displayed in the day mode is usually displayed in a page with a brighter color (such as a white background color and dark text); on the other hand, the skin package file 2 is used to provide a second display mode (such as a night mode) for the application, and the application displayed in the second display mode is as follows: Figure 2 2(b) in the figure, then the application displayed in the dark night mode is usually displayed in a darker color (such as a black background color and light text). It should be understood that the skin package file corresponding to any application can be customized or flexibly configured according to the properties or requirements of the application, thereby providing a variety of skin modes (i.e., display modes) for the application based on the diverse skin package files.
[0095] Morphological switching refers to the process of switching the display mode of an application. Specifically, in the process of morphological switching, the present application can switch the morphology of page elements (page background, font color, pop-up window style, control shape, font color, font size and other page elements) in at least one dimension of each program page in the application. For example, the first program page (such as the main page) of the application is displayed in a first display mode, and the first display mode is used to indicate that the page elements in at least one dimension of the first program page are rendered in a morphological manner (such as the font color is displayed as the first color); the second display mode is used to indicate that the font color in the first program page is rendered as a second color (the second color is different from the first color); for example, the first display mode is used to indicate that the page elements in at least one dimension of the first program page are rendered in a morphological manner (such as the pop-up window style color is displayed as a first shape (such as a rectangle)); the second display mode is used to indicate that the font color in the first program page is rendered as a second shape (such as a triangle), and so on; in the process of morphological switching of any program page (such as the first program page), the present application can switch the morphology of the page elements under the first program page in a fine-grained manner, thereby meeting the fine-grained flexible skinning requirements for APP.
[0096] It should be noted that the relevant data (such as skin package files, skin resources, etc.) involved in the page processing of the application program is involved in this application. When the above embodiments of this application are applied to specific products or technologies, the permission or consent of the object must be obtained, and the relevant data collection, use and processing process must comply with the relevant laws, regulations and standards of the region, comply with the principles of legality, legitimacy and necessity, and do not involve the acquisition of data types prohibited or restricted by laws and regulations. In some optional embodiments, the relevant data involved in the embodiments of this application are obtained after the object has been authorized separately. In addition, when obtaining the separate authorization of the object, the purpose of the relevant data involved is indicated to the object.
[0097] The following is a detailed introduction to the page processing system of the application provided by this application.
[0098] See also Figure 3 , Figure 3 Schematic diagram of the architecture of a page processing system of an application provided in an embodiment of the present application. Figure 3 As shown, the architecture diagram of the page processing system of the application may at least include: a server 304 and a terminal device cluster; wherein the terminal device cluster includes: a first terminal device 301, a second terminal device 302, a third terminal device 303 and other multiple terminal devices, and one or more applications are running in any terminal device, supporting page display of each program page of the application according to different page types (for example, supporting: native page, cross-end page, front-end page (such as H5 page or mini program page and other different page types of page display); it should be understood that the number of terminal devices included in the terminal device cluster is only for example, and the embodiment of the present application does not limit the number and type of terminal devices. Among them, any terminal device in the terminal device cluster can be directly or indirectly connected to the server 304 through the network; the above-mentioned network may include but is not limited to: a wired network, a wireless network, wherein the wired network includes: a local area network, a metropolitan area network and a wide area network, and the wireless network includes: Bluetooth, WIFI (Wireless Fidelity, a standard wireless local area network), and other networks that realize wireless communication.
[0099] Each terminal device in the terminal device cluster may be: a mobile phone, a tablet computer, a laptop computer, a desktop computer, a gaming device, a vehicle-mounted device, an aircraft, a wearable device (such as a smart watch, a smart bracelet, a pedometer, etc.), a virtual reality device (such as a VR (Virtual Reality) device, an AR (Augmented Reality) device), etc. It is understandable that the types of each terminal device in the terminal device cluster may be the same or different, for example: the first terminal device 301 may be a laptop computer, the second terminal device 302 may be a desktop computer, and the third terminal device 303 may be a tablet computer. This application does not limit the number and type of terminal devices in the terminal device cluster.
[0100] Server 304 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.
[0101] Taking any terminal device (such as the first terminal device 301) in the page processing system of the application as an example, the data interaction process between the first terminal device 301 and the server 304 during the application display process is described accordingly:
[0102] ① Start and run any application (such as any type of APP such as social APP, content interaction APP, game APP, etc.) among the multiple applications run by the first terminal device 301. The application can display the page in the first display mode (such as the default display mode or the specified display mode). The first display mode here can be determined based on the startup time of the current application. If the startup time is in the daytime or daytime (such as 7:00 am-19:00 pm), then the first display mode here can be the daytime mode, and the page of the current application is displayed in the daytime mode; if the startup time is in the evening or night (such as 19:00 pm-7:00 am the next day), then the first display mode here can be the night mode, and the page of the current application is displayed in the night mode.
[0103] ② A cloud resource management configuration platform is deployed in server 304, and one or more skin package files are configured for any of the above-mentioned applications on the cloud resource management configuration platform according to the skin configuration requirements. Any skin package file contains skin resources corresponding to the program page in the application. The skin resources are used to indicate the morphological rendering of page elements in at least one dimension of the program page, and a skin package file is used to provide a display mode for the application.
[0104] ③ The server 304 sends at least one skin package file configured in the cloud resource management configuration platform to the first terminal device 301.
[0105] ④ The first terminal device 301 can obtain a skin switching instruction for the application (for example, a skin switching interface is displayed in the application, and the user can click on the control of the second display mode (such as a button or option) in the skin switching interface) during the process of displaying the application according to the first display mode (for example, the display mode displayed by the program after the first skin package file is morphologically rendered). The skin switching instruction is used to instruct to switch the application from the first display mode to the second display mode.
[0106] ⑤ The first terminal device 301 obtains a target skin package file associated with the second display mode from at least one skin package file corresponding to the application; and performs resource loading processing on the target skin package file to switch the form of page elements in at least one dimension of the program page of the application (such as font size, page background, font color, control shape, etc.), and display the program page in the application according to the second display mode.
[0107] It should be noted that the above page processing process is only used for example and does not limit the specific execution process of any terminal device and server. Optionally, one or more skin package files corresponding to the application can be directly configured in the first terminal device 301, and the configured skin package files can be sent to the cloud resource management platform deployed in the server 304 for data storage; or, after determining to switch to the second display mode, the server 304 directly sends the target skin package file associated with the second display mode to the first terminal device 301 for rendering processing; or, the complete process of the page processing of the above application can be executed separately by the first terminal device 301 or the server 304 in the page processing system of the application.
[0108] In a possible implementation, the page processing system of the application provided in the embodiment of the present application can be deployed in the node of the blockchain. For example, the first terminal device 301, the second terminal device 302, the third terminal device 303, and the server 304 in the above system can all be regarded as the node devices of the blockchain to jointly constitute the blockchain network. Therefore, the page processing flow of the application executed in the present application can be executed on the blockchain, which can not only ensure the fairness and justice of the page processing flow of the application, but also make the above flow traceable, and at the same time ensure the data security during the page processing process of the application, thereby improving the security and reliability of the page processing flow of the entire application.
[0109] Based on the page processing system of the application provided by the present application, on the one hand, a diverse skinning mode of an application is provided, which supports fine-grained skinning processing of page elements in the program page of the application, such as morphological switching of fine-grained page elements such as control shape, font size, and background color in the program page; on the other hand, the present application can also realize morphological switching of multi-dimensional page elements in the program page, so the present application can also provide a multi-dimensional skinning mode to improve the diversity of skin modes, thereby meeting the flexibility requirements of skinning.
[0110] It can be understood that the page processing system of the application described in the embodiment of the present application is for more clearly illustrating the technical solution of the embodiment of the present application, and does not constitute a limitation on the technical solution provided in the embodiment of the present application. It is known to those skilled in the art that with the evolution of the system architecture and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.
[0111] The specific embodiments of the page processing scheme of the present application are described in detail below with reference to the accompanying drawings.
[0112] See also Figure 4 , Figure 4 1 is a flow chart of a page processing method of an application provided in an embodiment of the present application. The page processing method of the application can be performed by a computer device (such as Figure 3 Any terminal device or server shown in the figure) is executed. Figure 4 As shown, the page processing method of the application includes but is not limited to the following steps S401-S404:
[0113] S401: Acquire at least one skin package file of an application.
[0114] In one possible implementation, multiple applications (such as any type of APP, such as social APP, game APP, content interaction APP, etc.) are running in the computer device. The application involved here can be any one of the above multiple applications running in the computer device; or, the application involved here refers to an application that the current user needs to start.
[0115] Specifically, any skin package file contains a skin resource corresponding to a program page in an application, and the skin resource is used to indicate the morphological rendering of page elements under at least one dimension in the program page; a skin package file is used to provide a display mode for the application. Among them, the number of skin package files included in different applications can be the same or different, and can be flexibly configured based on the specific development requirements of the application during the development process (such as APP type: game type, social type, or content interaction type). For example, the following are running in a computer device: applications 1, 2, and 3; among them, application 1 is a game type APP, then the number of skin package files included in application 1 can be 2; if application 1 is a social type APP, then the number of skin package files included in application 2 can be 3; if application 3 is a content interaction type APP, then the number of skin package files included in application 3 can be 4, that is, this application can customize the corresponding number of skin package files according to the APP type corresponding to different applications, and this application does not specifically limit the number and file content of the skin package files included in the application.
[0116] The following is a detailed description of the configuration process of the skin package file for any application.
[0117] See also Figure 5a , Figure 5a Schematic diagram of the structure of a program page provided by an embodiment of the present application. Figure 5a As shown, taking the program page as the native page of the application as an example, the page elements in the program page include: page elements under the global dimension (global page elements) and page elements under the local dimension (local page elements). For example, the global page elements here include: theme color, page background color, font color, dividing line color, corner radius size, pop-up window style, etc.; the local page elements here mainly include: basic controls (such as radio buttons, switch buttons, edit buttons, etc.) and pop-ups (such as confirmation pop-ups, loading pop-ups, strong reminder pop-ups, etc.). Furthermore, for the native page of the application, it can include: settings page, about page, feedback page, home page, personal center page, and other pages with different functions. It should be understood that the front-end page or cross-end page of the application also includes Figure 5aThe global page elements and local page elements shown in the figure. Based on the page structure of each program page in the application, the configuration process of the skin package file of the application is described in detail below.
[0118] In specific implementation, the configuration methods of the skin package files of any application in this application mainly include the following two configuration methods: Method 1, custom configuration of skin package files according to user needs, supporting skin configuration in global dimension and skin configuration in local dimension; Method 2, directly collecting customized skin package files of different application markets from the cloud resource configuration management platform. The detailed execution process of the above two configuration methods is explained below:
[0119] Method 1: Customize the configuration (global + local) skin package file according to user needs.
[0120] In a possible implementation, the skin package file is generated by globally configuring the application; then, the process of configuring the skin package file of the application includes the following steps (1)-(4):
[0121] (1) Obtain a morphology configuration file, which contains at least one element configuration field, and any element configuration field is used to indicate the morphology configuration for the program page in the application. Each element configuration field is used to define the identifier (such as name, ID) of the page element to be configured in the application. The element configuration field can store data in the format of key-value pairs: K (key)-V (Value), where Key refers to the identifier of the element configuration field, and Value refers to the morphology parameters of the page element to be configured indicated by the current element configuration field. For example, the specific structure of the morphology configuration file is shown in Table 1 below:
[0122] Table 1. Morphology configuration files
[0123]
[0124] As shown in Table 1 above, the morphology configuration file defines element configuration fields for multiple page elements, and the element configuration fields contain the identifier (such as ID, name) of each page element to be configured and the morphology parameters to be configured for the corresponding page element. It should be understood that the element configuration fields in the morphology configuration file can be customized and edited (such as adding, deleting, modifying, etc.) according to user needs. For example, according to different needs, element configuration fields can be customized to be added or deleted or certain element configuration fields can be modified, etc., so as to meet different configuration requirements and improve the flexibility of the configuration process.
[0125] (2) Obtaining a global page element under at least one global dimension to be configured in the application, the global page element including: any one or more of the application theme, page background, font color, pop-up window style, and dividing line color. The global page element refers to a universal page element applicable to all program pages in the application, that is, the global page element is applied to the form rendering of all program pages, and is a universal page element, thereby quickly realizing the form rendering of the application.
[0126] (3) In the morphology configuration file, the corresponding morphology parameters are configured for each global page element to generate the first configuration file of the application. As shown in Table 1 above, the corresponding morphology parameters are set for the global configuration elements in each element configuration field, such as setting the morphology parameter for the title font size: 26, and setting the morphology parameter for the rounded corner size: 24. After the morphology configuration is performed for each global page element to be configured in the application, the first configuration file shown in Table 2 below can be obtained:
[0127] Table 2. First configuration file
[0128]
[0129]
[0130] (4) Generate a skin package file of the application based on the first configuration file. Optionally, at least one picture to be displayed in the application can be obtained and packaged into a picture file; then the picture file and the first configuration file are combined into a skin package file of the application.
[0131] In the process shown in the above steps (1)-(4), the present application can customize the global page elements to be configured according to the needs, and configure the morphology of these global page elements, thereby realizing the global universal skinning processing of the application. Through the abstraction and standard constraints of the universal skin style, one-click global skinning can be realized, for example: all program pages in the application have a unified theme color, page background, rounded corner size, font size, font color, etc., and thus the ability to achieve global skinning by modifying only a small number of universal styles can be realized, which greatly reduces the workload and improves maintainability, scalability and product operation capabilities.
[0132] In another possible implementation, the skin package file is generated by partially configuring the application. If the application supports displaying N program pages, any one of the N program pages is represented as program page i, where i and N are both positive integers and 1≤i≤N. Further, the process of configuring the skin package file of the computer device includes the following steps (1)-(3):
[0133] (1) Obtain a local page element under at least one local dimension to be configured in the program page i of the application, and the local page element includes: any one or more of a control, a card, an icon, and a text. The local page element here refers to a more fine-grained page element compared to a global page element, and usually refers to a local page element in a certain program page. That is, the local page element is applied to the form rendering of certain specified program pages in the application, and is a non-universal page element, which can realize the local rendering of some program pages in the application.
[0134] (2) Based on the first configuration file and the morphology configuration file, the corresponding morphology parameters are configured for each local page element in the program page i, and a second configuration file of the application is generated. As mentioned above, since a plurality of element configuration fields are defined in the morphology configuration file, the page element to be configured indicated in the element configuration field here can be: a global page element or a local page element; therefore, on the basis of configuring the global page element, the morphology parameters of the local page elements in any program page can be further configured, for example, the background color, text size, etc. of the personal center page can be specially configured.
[0135] (3) Generate a skin package file for the application based on the second configuration file. Optionally, at least one picture to be displayed in the application can be obtained and these pictures can be packaged into a picture file; then the picture file and the second configuration file can be combined into a skin package file for the application. In specific implementation, the specific process of packaging the picture file and the second configuration file into a skin package file includes the following two methods ① and ②:
[0136] ① Obtain K page types corresponding to the program page, and use K organizational methods to perform K times of structural organizational processing on the image file and the second configuration file to generate K skin resources; and package the K skin resources to generate a skin package file for the application; wherein one organizational method corresponds to the generation of a skin resource under one page type, and K is a positive integer. Specifically, the page type here refers to the different display types corresponding to the program page in the application. For example, the page type may include: native page, cross-end page (such as Hippy page), and front-end page (such as H5 page, mini program page, etc.). Since the skin resources of program pages under different page types differ in organizational structure or organizational form, different organizational methods are required for different page types to perform different structural organizational processing operations on the image file and the second configuration file, so as to generate skin resources under each page type. For example, the native page adopts the first organization mode for file organization, and the first organization mode here can be the "res" organization mode, and the "res" organization mode is used to indicate that the image file and the second configuration file are organized into structures such as "drawable", "color", "values", and "styles". For another example, the cross-end page adopts the second organization mode for file organization, and the second organization mode here can be the "assets" organization mode, and the "assets" organization mode is used to indicate that the image file and the second configuration file are organized into structures such as "hippyMainPageStyle.json" and "hippyPersonalPageStyle.json". For another example, the front-end page adopts the third organization mode for file organization, and the third organization mode is used to indicate that the image file and the second configuration file are organized into structures such as "mossMainPageStyles.json" and "mossRoutePlanStyles.json". In this implementation mode, different page types can be secretly organized in different organization modes for skin resources, so that the morphological rendering of program pages of various page types can be adapted.
[0137] ② Use a general organization method to perform general structure organization processing on the image file and the second configuration file to generate a general skin resource; and generate a skin package file for the application based on the general skin resource. Specifically, the process of resource organization using the general organization method here is as follows: assign a file path to each image included in the image file to form an image directory file; then the image directory file and the second configuration file can be directly packaged and combined into a general skin resource. In this implementation method, the different page types of the program page are not distinguished, and the image files and the second configuration file are packaged into a general skin resource suitable for various page types according to a unified packaging method, which can improve the packaging efficiency of skin resources.
[0138] In the process shown in the above steps (1)-(3), on the basis of the global general form configuration of the application, the present application can further support the special customization of local page elements, for example: certain program pages (for example, the background color of the main page and the personal center page can be configured separately, or the shape of the control of the personal center page can be configured separately, etc.). Based on this, during the configuration of the skin package file, the present application can realize both the global general configuration of the application and the local customization of certain program pages. This configuration method combining global and local dimensions can meet the configuration requirements as much as possible.
[0139] In one possible implementation, before configuring the skin package file, it is necessary to perform page pre-embedding operations on the application. Specifically, the page pre-embedding process is as follows: construct a page pre-embedding file for the application, and the page pre-embedding file is used to provide configuration permissions for the global page elements and local page elements to be configured in the application. For example, the page pre-embedding file defines the page elements to be configured in the application (such as global page elements or local page elements); based on the page pre-embedding file and the morphology configuration file, perform morphology configuration for each global page element and local page element in the application, and generate a skin package file for the application. In the file configuration process, if the first page element to be configured in the application exists in the page pre-embedding file (that is, the first page element to be configured currently has configuration permissions), then the corresponding morphology parameters for the first page element can be configured in the morphology configuration file; if the second page element to be configured in the application does not exist in the page pre-embedding file (that is, the second page element to be configured currently does not have configuration permissions), then the corresponding morphology parameters for the second page element cannot be configured. Please refer to . Figure 5b , Figure 5b: is a schematic diagram of the structure of a page pre-embedded file provided in an embodiment of the present application. The page pre-embedded file can be a code file, and the code types here include but are not limited to: JavaScript, Json, C / C++, Python and other types of codes. In the process of page pre-embedded, the corresponding type of code can be selected according to specific needs to generate a page pre-embedded file. Figure 5b As shown, the page pre-embedded file can be a JavaScript type code file, which defines page elements (global page elements or local page elements) such as "RoundedCornerSizeStyle" (rounded corner size) and "buttonBgColor" (background color). These page elements defined in the page pre-embedded file have configuration permissions; subsequently, in the form configuration file, it is only necessary to configure the corresponding form parameters for each page element with configuration permissions as required. Therefore, the above-mentioned page pre-embedding is a technical implementation applied to program pages (such as front-end pages). The so-called page pre-embedding refers to providing configuration permissions for page elements that need to be customized. Therefore, the customization ability of page elements can be guaranteed through page pre-embedding, so that the specific display form of each page element can change dynamically according to the changes in the form configuration file, thereby achieving the effect of skinning.
[0140] Method 2: directly collect skin package files customized for different application markets from the cloud resource configuration management platform.
[0141] In one possible implementation, the computer device is associated with a cloud resource configuration management platform, so the skin package files of each application program can be combined with the cloud resource configuration management platform (issued by the cloud backend). Specifically, the cloud resource configuration management platform stores at least one configured skin package file, which can be customized from application markets of different channels. Then, the application can pre-process the skin package files from different channels, that is, package the customized skin package files of each application market and embed them into the APP package file of the application program (that is, the installation package of the APP: the program package used to install the APP). Please refer to Figure 6 , Figure 6 1 is a schematic diagram of a process for sending a skin package file provided in an embodiment of the present application. Figure 6 As shown in the figure, the cloud resource configuration management platform can realize the channel package distribution capability and dynamic pulling capability:
[0142] (1) Channel package distribution capability: The cloud resource configuration management platform stores one or more skin package files customized from multiple application markets (such as application market 1, application market 2, and application market 3): skin package file 1, skin package file 2, and skin package file 3 (wherein the process of customizing skin package files for each application market can be as shown in the above method 1, and will not be repeated here); in addition, an application market can customize one or more skin package files, and each skin package file is associated with one or more applications. Then, the skin package files (such as skin package file 1 and skin package file 2) associated with the application to be started in this application (such as application 1) can be obtained from the skin package files customized by different application markets. Similarly, for other applications (such as application 2, application 3, etc.), one or more skin package files can be directly obtained based on the skin package files distributed by the cloud configuration management platform; further, the obtained skin package files can be packaged and embedded into the basic package of the corresponding application; so that after the application is started, multiple skin package files can be directly provided for the application.
[0143] (2) Dynamic pulling capability: The cloud resource configuration management platform also stores one or more preset skin package files customized from multiple application markets. The preset skin package files here can be skin package files specially customized for special holidays (such as National Day, Dragon Boat Festival, Mid-Autumn Festival, Spring Festival, etc.). These preset skin package files are used to provide specified display modes for applications during special holidays (such as providing theme elements related to National Day, etc.). Therefore, during holidays (such as National Day), computer devices can dynamically pull preset skin package files that match the current holiday (National Day) from the cloud resource configuration management platform, thereby triggering the presentation of diverse and themed applications to users.
[0144] Based on this, in the configuration process of the skin package files shown in the above-mentioned method 1 and method 2, the present application supports customized configuration of the corresponding skin package files for any application, and supports global unified configuration and local fine-grained configuration of the application according to specific needs, so as to meet the diversity of skin configuration. This method can provide multi-dimensional and diversified skin package files for the application to meet the flexibility requirements; in addition, it supports combining with the cloud configuration management platform to conveniently and efficiently obtain skin package files from different application markets, and package and embed them into the application. This method can improve the efficiency of obtaining skin package files.
[0145] S402: In the process of displaying the application program in the first display mode, a skin switching instruction for the application program is obtained, where the skin switching instruction is used to instruct to switch the application program from the first display mode to the second display mode.
[0146] Specifically, the first display mode here can be a default display mode or a specified display mode pre-set for the application; and the first display mode can be a display mode after morphological rendering based on the first skin package file of the application. In addition, the skin switching instruction is an instruction for simply switching the application from the first display mode to the second display mode. The following is an example of how to generate the skin switching instruction:
[0147] In a possible implementation, the application includes a service page, and the service page can be provided with a skin switching control. The object can click (such as single-click, double-click, or long-press) the skin switching control to trigger the generation of a skin switching instruction. Figure 7a , Figure 7a FIG. 1 is a flow chart of generating a skin switching instruction provided by an embodiment of the present application. Figure 7a A skin switching control (701) is provided in the service page of the application. If the object clicks the skin switching control 701, it can trigger the display of at least one display mode in the service page (any display mode is provided based on the corresponding skin package file), and each display mode is associated with a mode selection item, for example, display mode 1 is associated with mode selection item 1, display mode 2 is associated with mode selection item 2, and display mode 3 is associated with mode selection item 3. The object is supported to select any display mode in the service page. For example, the object can click mode selection item 2 to trigger the generation of a skin switching instruction, and the skin switching instruction is used to instruct the application to switch from the first display mode to the second display mode.
[0148] In another possible implementation, the application includes a service page, and the service page may be provided with an operation area. The object may perform a specified gesture (such as drawing a symbol "S" or "V") in the operation area, thereby generating a skin switching instruction. Figure 7b , Figure 7b FIG. 1 is another flow chart of generating a skin switching instruction provided by an embodiment of the present application. Figure 7b The service page may only have an operation area, where the operation area may be at any position in the service page (such as the middle, top, bottom, etc. of the page). For example, the operation area 702 is set in the middle area of the service page. The object can perform a preset designated gesture (such as drawing an "S" symbol) in the operation area 702, thereby triggering the provision of a variety of different display modes for the object to choose from. Then, the object can trigger the generation of a skin switching instruction after selecting any display mode (such as the second display mode). The skin switching instruction here is used to instruct the application to switch from the first display mode to the second display mode.
[0149] S403: Acquire a target skin package file associated with the second display mode from at least one skin package file corresponding to the application.
[0150] Specifically, each skin package file in the application can be directly stored in the local storage of the computer device, or stored in the cloud resource configuration management platform associated with the computer device. Among them, since a skin package file of the application is used to provide a display mode, the file identifier (such as name, ID) of the skin package file stored in the computer device or the cloud resource configuration management platform can be stored in association with a display mode, for example, skin package file 1 is stored in association with display mode 1, skin package file 2 is stored in association with display mode 2, and skin package file 3 is stored in association with display mode 3; then, after determining the display mode to be switched (i.e., the second display mode), the skin package file 2 associated with the second display mode can be obtained from the above skin package files, and the skin package file 2 is used as the target skin package file.
[0151] S404: Perform resource loading processing on the target skin package file to switch the form of page elements in at least one dimension of the program page of the application program, and display the program page in the application program according to the second display mode.
[0152] Specifically, form switching refers to the process of switching the display form of a program page in an application, or a page element in a program page, that is, the process of switching the application from a first display mode to a second display mode. For example, the first display mode may be "day mode", then the application displayed in the day mode is usually displayed in a brighter color (such as a white background color and dark text), that is, the background color of the program page is white, and the text in the program page is displayed in a dark color (such as black); for another example, the second display mode may be "night mode", then the application displayed in the night mode is usually displayed in a darker color (such as a black background color and light text), that is, the background color of the program page is black, and the text in the program page is displayed in a light color (such as white).
[0153] Specifically, based on the configuration process of the skin package file shown in the above step S401 (including two configuration methods), the resource loading process of the target skin package file is described below accordingly.
[0154] (1) The target skin package file contains K skin resources.
[0155] In a possible implementation, the target skin package file contains K skin resources, one skin resource is used to indicate the form rendering of page elements in a program page under a page type, and K is a positive integer. Specifically, the computer device performs resource loading processing on the target skin package file, including the following steps ①-③:
[0156] ① During the running of the application, determine the target page type corresponding to the program page displayed by the application, and the target page type includes any one of: native page, cross-end page, and front-end page. Among them, different page types refer to different display types presented to users after the program page in the application is developed using different technology stacks. For example, the native page can be an Android native page developed by the Android (Android, an operating system) technology stack, the cross-end page can be a Hippy page developed by the Hippy technology stack, and the front-end page can be a mini program page or an H5 page.
[0157] ②According to the target page type, the target skin resource associated with the target page type is obtained from the target skin package file. Among them, the K skin resources in the target skin package file are associated with K page types, for example, the K skin resources include: skin resource 1, skin resource 2, skin resource 3; and skin resource 1 is associated with the native page, skin resource 2 is associated with the cross-end page, and skin resource 3 is associated with the front-end page. Then, based on the target page type (such as the native page), skin resource 1 can be used as the target skin resource.
[0158] ③ Load the target skin resources.
[0159] In the implementation method of the above steps ①-③, the target skin package file contains skin resources under multiple page types, and the skin resources under the corresponding page type can be obtained from the target skin package file according to the page type of the currently displayed program page, and then the skin resources are loaded and processed. Since the organization form of skin resources under different page types is different, the method of resource loading and processing may also be different. Here, obtaining matching skin resources according to the page type can improve the efficiency of resource loading.
[0160] (2) The target skin package file contains common skin resources.
[0161] In a possible implementation, the target skin package file includes a universal skin resource, which is used to indicate the morphological rendering of page elements in program pages under K types of page types, where K is a positive integer. Specifically, the computer device performs resource loading processing on the target skin package file, including the following steps ①-④:
[0162] ① During the running of the application, determine the target page type corresponding to the program page displayed by the application, and the target page type includes: any one of: a native page, a cross-end page, and a front-end page.
[0163] ② According to the target page type, determine the target program interface in the morphology switching tool to be called. Among them, a morphology switching tool is deployed in the computer device, and the morphology switching tool is a tool for switching display modules for applications, such as a skinning SDK (Software Development Kit); and the skinning SDK is configured with one or more rich program interfaces, one program interface is used to assemble general skin resources into skin resources required for morphological rendering of a program page under a page type, so based on the target page type, the target program interface to be called in the skinning SDK can be determined.
[0164] ③ Call the target program interface to perform resource conversion processing on the universal skin resources to obtain the converted skin resources. Among them, through the target program interface determined above, the universal skin resources can be converted into resources that can be recognized and loaded by the program page under the current page type (i.e., the target page type). Therefore, the so-called resource conversion processing means: converting the organizational form of the universal skin resources into skin resources that can be recognized and loaded by the program page under the target page type, so as to facilitate the subsequent morphological rendering of the program page.
[0165] ④ Load the converted skin resources.
[0166] In the implementation method of the above steps ①-③, the target skin package file contains a universal skin resource suitable for program pages under K types of page types, that is, the target skin package file has only one organizational form. In this case, the present application can call the corresponding interface in the skin changing SDK according to the page type of the currently displayed program page to convert the universal skin resource, thereby assembling it into a skin resource that can be read and recognized under the current page type.
[0167] Based on this, in the resource loading process shown in (1) and (2) above, on the one hand, the present application can read matching skin resources from the skin package file according to the page type for resource loading, thereby completing the skin switching of the application (that is, switching of the display mode); on the other hand, the present application can also perform further resource conversion from a general skin resource through the SDK interface, thereby also realizing the skin switching of the application; therefore, the present application can improve the diversity and flexibility of resource loading methods.
[0168] Furthermore, since the skin package file contains skin resources for morphological rendering of page elements in at least one dimension of the program page, as shown in the above step S401, the dimension here may include a global dimension and a local dimension, then in the actual morphological switching process, the present application can perform coarse-grained morphological switching of the global page elements of the application (such as application theme, page background, font color, pop-up window style, dividing line color, etc.) in the global dimension; and can perform fine-grained morphological switching of the local page elements of the application (such as controls, cards, fonts, pop-ups) in the local dimension. Therefore, the present application can meet both general and fine-grained skinning requirements in the morphological switching process, ensuring skinning efficiency while meeting the flexibility requirements of skinning.
[0169] In an embodiment of the present application, at least one skin package file of an application is obtained, and any skin package file contains skin resources corresponding to a program page in the application, and the skin resources are used to indicate the form rendering of page elements in at least one dimension in the program page; a skin package file is used to provide a display mode for the application; in the process of displaying the application in a first display mode, a skin switching instruction for the application is obtained, and the skin switching instruction is used to indicate switching the application from the first display mode to a second display mode; from at least one skin package file corresponding to the application, a target skin package file associated with the second display mode is obtained; and resource loading processing is performed on the target skin package file to perform form switching of page elements in at least one dimension in the program page of the application, and display the program page in the application in the second display mode. It can be seen that the skin package file provided for the application in the present application is a file used for morphological rendering of multi-dimensional page elements in the program page. Therefore, the morphological switching of page elements (i.e., skinning) can be realized during the operation of the application, thereby meeting the fine-grained skinning requirements; further, since the morphological switching of page elements of the program page can also be performed in multi-dimensional manner, the present application can also provide a multi-dimensional skinning mode to improve the diversity of skin modes, thereby meeting the flexibility requirements of skinning.
[0170] See also Figure 8 , Figure 8 1 is a flow chart of another method for processing a page of an application provided in an embodiment of the present application. The method for processing a page of an application may be performed by a computer device (such as Figure 3 Any terminal device or server shown in the figure) is executed. Figure 8 As shown, the page processing method of the application includes but is not limited to the following steps S801-S808:
[0171] S801: Obtain at least one skin package file of an application.
[0172] Among them, any skin package file contains the skin resource corresponding to the program page in the application, and the skin resource is used to indicate the morphological rendering of the page elements in at least one dimension of the program page; a skin package file is used to provide a display mode for the application. Among them, the number of skin package files included in different applications can be the same or different, and can be flexibly configured based on the specific development needs of the application during the development process. This application does not specifically limit the number of skin package files included in the application and the file content. It should be noted that the specific process of how to configure the skin package file can be referred to in detail. Figure 4 The relevant processes in step S401 in the embodiment will not be repeated here in the embodiment of the present application.
[0173] S802: In the process of displaying the application program in the first display mode, obtaining a skin switching instruction for the application program.
[0174] Among them, the skin switching instruction is an instruction for simply switching the application from the first display mode to the second display mode; the first display mode here can be a default display mode or a specified display mode pre-set for the application, for example, the first display mode can be a display mode after morphological rendering based on the first skin package file of the application. Specifically, the generation method of the skin switching instruction includes: clicking (such as single-click, double-click, or long-press operations) the skin switching control to trigger the generation of the skin switching instruction; or, performing a specified gesture in the operation area (such as drawing a gesture of the symbol "S" or "V") to trigger the generation of the skin switching instruction.
[0175] S803: Acquire a target skin package file associated with the second display mode from at least one skin package file corresponding to the application.
[0176] Among them, since a skin package file of an application is used to provide a display mode, and a skin package file can be stored in association with a display mode, for example, skin package file 1 is stored in association with display mode 1, skin package file 2 is stored in association with display mode 2, and skin package file 3 is stored in association with display mode 3; then, after determining the display mode to be switched (i.e., the second display mode), skin package file 2 associated with the second display mode can be obtained from the above-mentioned skin package files, and the skin package file 2 is used as the target skin package file.
[0177] S804: During the running of the application, determine the target page type corresponding to the program page displayed by the application.
[0178] Among them, different page types refer to the different display types presented to users after the program pages in the application are developed using different technology stacks. For example, the native page can be an Android native page developed by the Android (Android, an operating system) technology stack, the cross-end page can be a Hippy page developed by the Hippy technology stack, and the front-end page can be a mini program page or an H5 page.
[0179] Specifically, since the configuration process of the skin package file includes two configuration methods, and the organizational forms of the skin package files obtained by different configuration methods are also different, then correspondingly, in the process of resource loading based on the skin package file, the resource loading methods of skin package files with different organizational forms are also different. The resource loading process in the following two cases will be introduced:
[0180] Case 1: The target skin package file includes K skin resources (S8051-S8061).
[0181] S8051: If the target skin package file includes K skin resources, then according to the target page type, a target skin resource associated with the target page type is obtained from the K skin resources.
[0182] Among them, the K skin resources in the target skin package file are associated with K page types, and one skin resource is used to indicate the morphological rendering of page elements in the program page under one page type, and K is a positive integer. For example, the K skin resources include: skin resource 1, skin resource 2, and skin resource 3. Skin resource 1 is associated with the native page, skin resource 2 is associated with the cross-end page, and skin resource 3 is associated with the front-end page; then based on the target page type (such as the native page), skin resource 1 can be used as the target skin resource.
[0183] In a possible implementation, a form switching tool is deployed in the application, and the form switching tool provides one or more program interfaces, one of which is used to trigger the acquisition of skin resources under a page type. Then, the computer device acquires the target skin resource associated with the target page type from the target skin package file according to the target page type, including: determining the target program interface to be called in the form switching tool according to the target page type; calling the target program interface of the form switching tool, performing resource parsing processing on the target skin package file, and acquiring the target skin resource associated with the target page type.
[0184] (1) Unified skin replacement pathway:
[0185] Based on this, this application concentrates the skin resources of all program pages in the application into one skin package file, reducing the differences in page skinning implementations implemented by different types of technology stacks and the dispersion of skin resources, making it easier to maintain. Therefore, in this case 1, this application provides a unified skinning path for the application. The detailed process of the unified skinning path is described below in conjunction with the accompanying drawings:
[0186] See also Figure 9a , Figure 9a Schematic diagram of a unified skin-changing pathway provided by an embodiment of the present application. Figure 9a As shown, it is assumed that the program page in the application supports the following three types of page display: native page, cross-end page, front-end page; and a form switching tool (such as skinning SDK) is deployed in the computer device, and the skinning SDK provides a rich program interface for obtaining skin resources under the corresponding page type from the skin package file. Specifically, the program interface provided in the skinning SDK is as follows:
[0187] Base: basic page class, which encapsulates some common functions for program pages or pop-up windows that need to be skinned. That is, program pages or pop-up windows that need to be skinned have the ability to be skinned if they inherit the base class;
[0188] Config: General tool class, for example, it can add dynamic skinning capability to some program pages or page elements that do not have skinning capability yet;
[0189] Listener: detection class, for example, when the display mode of the APP is switched successfully (such as switching from the first display mode to the second display mode), some events can be sent to notify the APP;
[0190] Loader: SkinResLoader, used to load skin resources (such as pictures and colors) in skin package files, SkinThemeLoader, used to load morphology configuration files in skin package files;
[0191] AttrFactory: corresponds to different style attributes of different controls in Android native pages. For example, TextColorAttr represents the color attribute of the text. When the text color needs to be changed, just refresh this attribute; BackgroundAttr represents the background color or background image of the control or page, ProgressBarAttr represents the style of the progress bar; ButtonAttr represents the shape style of the button.
[0192] Furthermore, program pages under different page types in the application can obtain the target program interface required to be called under the current page type (such as the target page type) from the skin package file through the rich interfaces provided by the skinning SDK, so as to obtain the skin resources associated with the program page under the target page type from the skin package file. For example, if the target page type is a native page, the SkinResLoader interface in the skinning SDK can be called to perform resource parsing on the target skin package file to obtain the skin resources under the native page (such as drawables, colors, values, styles, etc.); for another example, if the target page type is a cross-end page, the SkinThemeLoader interface in the skinning SDK can be called to perform resource parsing on the target skin package file to obtain the skin resources under the cross-end page (such as hippyMainPageStyle.json, hippyPersonalPageStyle.json).
[0193] S8061: Load the target skin resource.
[0194] In a possible implementation, the application supports displaying N program pages, any one of the N program pages is represented as program page i, i and N are both positive integers and 1≤i≤N. Then, the computer device performs resource loading processing on the target skin resource, including the following steps ①-②:
[0195] ① Call the target program interface to perform resource parsing on the target skin resource, and obtain the resource objects associated with each of the N program pages in the application. Any resource object is used to indicate the form rendering of the page elements under at least one dimension in the corresponding program page. Among them, the target skin resource may include resource objects (Resources objects) associated with N program pages in the application, and each resource object is used to perform form rendering of the page elements under at least one dimension in any program page, so as to realize the form switching of the page elements of all program pages in the application.
[0196] ② According to the resource object associated with program page i, perform multi-dimensional morphological rendering processing on the page elements of program page i. The morphological rendering process may be to render the corresponding page elements according to the morphological parameters of the page elements indicated by the resource object (such as control size, page background color, application theme, pop-up window style, etc.).
[0197] (2) Dynamic support for front-end pages and cross-end pages:
[0198] In one possible implementation, the target skin package file also includes a page package file of a specified page type, and the page package file includes the page layout and display form of the program page displayed according to the specified page type. If the target page type is a specified page type, the page package file of the specified page type is obtained from the target skin package file, where the specified page type is a cross-end page or a front-end page; resources are loaded based on the page package file, and the page is displayed in the application according to the page layout and display form indicated by the page package file. Among them, the so-called dynamicization refers to the dynamic update of the logic of the cross-end page or the front-end page, and the dynamic update of the logic here is used to indicate the changes in the page function or page layout of the corresponding program page, and is not limited to the changes in the display form of the page elements in the program page.
[0199] See also Figure 9b , Figure 9b Schematic diagram of a process of dynamically loading a page provided by an embodiment of the present application. Figure 9b As shown, the present application can embed the page package file (such as jsbundle) of the cross-end page or the page package file (such as the applet package) of the front-end page directly into the target skin package file. When the application loads the cross-end page or the front-end page, the page package file built into the target skin package file can be used by default first, so as to dynamically load the front-end page or the cross-end page according to the new page layout and page function in the page package file. In this implementation, the page logic can be changed for the program page under certain special page types (such as the front-end page or the cross-end page), so as to meet the diverse page layout requirements during the display process of the application.
[0200] In steps S8051-S8061 shown in situation 1, the present application provides a unified skinning channel for the application. Since the current technology stacks of all App pages can be included into Android native pages, cross-end pages (such as Hippy), and front-end (H5, mini-programs, etc.) pages. Therefore, the present application supports placing the skin resources of all page types of the application into a unified skin package file. During the skin resource loading process, the matching skin resources (such as images and morphological parameters of page elements) can be read through the rich interfaces of the skinning SDK, and then assembled into the morphological parameters of the page elements that can be recognized and read in the program pages of each technology stack, and finally rendered into the program page.
[0201] Case 2: The target skin package file includes common skin resources (S8052-S807).
[0202] S8052: If the target skin package file contains a universal skin resource, determine the target program interface in the form switching tool to be called according to the target page type.
[0203] Among them, the universal skin resource is used to indicate the morphological rendering of page elements in the program page under K page types, K is a positive integer; and the page type here can include: any one of: native page, cross-end page, and front-end page.
[0204] Specifically, a morphology switching tool is deployed in the computer device, which is a tool used to switch display modules for applications, such as a skinning SDK (Software Development Kit); and the skinning SDK is configured with one or more rich program interfaces, one program interface is used to assemble general skin resources into skin resources required for morphological rendering of a program page under a page type, so based on the target page type, the target program interface to be called in the skinning SDK can be determined.
[0205] S8062: Call the target program interface to perform resource conversion processing on the universal skin resource to obtain the converted skin resource. Among them, through the target program interface determined above, the universal skin resource can be converted into a resource that can be recognized and loaded by the program page under the current page type (i.e., the target page type). Therefore, the so-called resource conversion processing refers to: converting the organizational form of the universal skin resource into a skin resource that can be recognized and loaded by the program page under the target page type, so as to facilitate the subsequent morphological rendering of the program page.
[0206] S807: Perform resource loading processing on the converted skin resources.
[0207] In steps S8052-S807 shown in situation 2, the present application supports calling the corresponding target program interface in the skinning SDK according to the target page type, converting the general skin resources, and assembling them into skin resources that can be read and recognized by the program page under the target page type, so as to facilitate efficient and accurate loading of skin resources.
[0208] S808: Switching the form of page elements in at least one dimension of a program page of the application, and displaying the program page of the application in a second display mode.
[0209] In summary, based on the skin loading process shown in Case 1 and Case 2 above, the complete process of loading skin resources is described in detail below with reference to the accompanying drawings. Fig.10 , Fig.10 is a flow chart of loading skin resources provided by an embodiment of the present application. Fig.10 As shown, the skin resource loading process includes the following steps S1-S18:
[0210] S1. Application starts.
[0211] S2. Cloud configuration dynamically triggers skin change.
[0212] S3: Is it debugging mode? If yes, execute S5; if no, execute S4.
[0213] S4. Read the skin package specified by the cloud configuration file.
[0214] S5. Read the skin package file set in debug mode.
[0215] S6: Check whether the skin package exists. If yes, execute S7; if no, execute S12.
[0216] S7. Read the skin package file stream.
[0217] S8: Whether the file stream needs to be re-copied. If yes, execute S11; if no, execute S9.
[0218] S9: Is it already in the cache? If yes, execute S13; if not, execute S10.
[0219] S10. Unzip the skin package, load resources, and add them to the cache.
[0220] S11. Copy the application installation directory.
[0221] S12. Load local resources.
[0222] S13. Get the resource object.
[0223] S14, trigger skin change to complete, refresh the page.
[0224] S15. Cross-end page refresh.
[0225] S16. Refresh the native page.
[0226] S17. Refresh the front-end page.
[0227] S18, skin changing is completed.
[0228] In a possible implementation, the solution also supports dynamic switching of skin package files. Specifically, the dynamic switching process of skin package files includes the following steps ①-②:
[0229] ① During the running of the application, the first running time of the application is detected; if the first running time is within the preset time period, a preset skin package file matching the preset time period is obtained from the cloud resource configuration management platform, and the preset skin package file is used to provide a specified display mode for the application during the preset time period. The preset time period here refers to some special holidays, such as the Spring Festival, National Day, Dragon Boat Festival, Mid-Autumn Festival, etc., and the specified display mode refers to the holiday theme mode provided for the application during the above holidays (such as a theme mode containing National Day elements).
[0230] ② Load resources according to the preset skin package file to switch the application from the second display mode to the specified display mode within the preset time period. The resource loading process of the preset skin package file can refer to the above Fig.10 The skin loading process shown will not be repeated here.
[0231] Optionally, after the application is switched from the second display mode to the designated display mode within the preset time period, the second running time of the application can be detected again; if the second running time is not within the preset time period, the application is switched from the designated display mode to the second display mode or the first display mode; wherein the first display mode refers to: the preset display mode or any display mode of the application. That is, the present application supports dynamically switching the display mode of the application to the designated display mode that conforms to the holidays during holidays, and automatically switches the display mode of the application from the designated display mode back to the original display mode or the default display mode after the holidays, thereby flexibly realizing the dynamic switching of the display mode.
[0232] In the embodiment of the present application, a new universal skinning capability is provided for the application. The solution is not limited to the implementation technology stack of the program page, the skin theme diversity customization of the product operation, or the static preset or dynamic distribution capability. The following technical effects can be achieved:
[0233] (1) Convenient development: With detailed documentation, you only need to replace the skin resources without worrying about the internal logic, thus completely decoupling the skinning and business.
[0234] (2) Flexible expansion: No longer limited to a fixed number of skin modes, such as only day (light) mode and night (dark) mode, you can flexibly expand any number of themes, such as various holiday themes.
[0235] (3) Dynamic operation: For applications that have been launched, the cloud resource configuration management platform’s dynamic distribution capabilities allow users to directly obtain the latest skin theme package without releasing a version, and dynamically switch to the latest skin. For users, they can enjoy the new visual changes of the page without having to manually upgrade the application.
[0236] (4) Cross-platform: In addition to supporting native Android pages, other cross-end or front-end (such as H5, mini-programs) program pages can also easily complete skin customization without worrying about the differences in internal implementation.
[0237] The following is an explanation of the related devices of the page processing solution provided in the embodiment of the present application.
[0238] It should be noted that, in the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0239] See also Fig.11 , Fig.11 1 is a schematic diagram of the structure of a page processing device of an application provided in an embodiment of the present application. The page processing device 1100 of the application can be used to execute the corresponding steps in the page processing method of the application provided in an embodiment of the present application. In specific implementation, the page processing device 1100 of the application can specifically include:
[0240] The acquisition unit 1101 is used to acquire at least one skin package file of the application; any skin package file contains skin resources corresponding to the program page of the application, and the skin resources are used to indicate the form rendering of the page elements under at least one dimension of the program page; a skin package file is used to provide a display mode for the application;
[0241] The processing unit 1102 is used to obtain a skin switching instruction for the application program in the process of displaying the application program in the first display mode, where the skin switching instruction is used to instruct to switch the application program from the first display mode to the second display mode;
[0242] The acquiring unit 1101 is further configured to acquire a target skin package file associated with the second display mode from at least one skin package file corresponding to the application program;
[0243] The processing unit 1102 is further configured to perform resource loading processing on the target skin package file to switch the form of page elements in at least one dimension of the program page of the application and display the program page in the application according to the second display mode.
[0244] In a possible implementation, the processing unit 1102 is further configured to perform the following operations:
[0245] Obtaining a morphology configuration file, the morphology configuration file includes at least one element configuration field, and any element configuration field is used to indicate that a morphology configuration is performed for a program page in an application program;
[0246] Obtaining a global page element under at least one global dimension to be configured in the application, where the global page element includes: any one or more of application theme, page background, font color, pop-up window style, and dividing line color;
[0247] In the form configuration file, corresponding form parameters are configured for each global page element to generate a first configuration file of the application;
[0248] Based on the first configuration file, a skin package file of the application is generated.
[0249] In a possible implementation, the application supports displaying N program pages, any one of the N program pages is represented as program page i, i and N are both positive integers and 1≤i≤N; the processing unit 1102 is further configured to perform the following operations:
[0250] Obtaining a local page element in at least one local dimension to be configured in a program page i of the application, where the local page element includes: any one or more of a control, a card, an icon, and text;
[0251] Based on the first configuration file and the morphology configuration file, respectively configure corresponding morphology parameters for each local page element in the program page i to generate a second configuration file of the application program;
[0252] Based on the second configuration file, a skin package file of the application is generated.
[0253] In a possible implementation, the processing unit 1102 is further configured to perform the following operations:
[0254] Build a page pre-embedded file for the application. The page pre-embedded file is used to provide configuration permissions for the global page elements and local page elements to be configured in the application.
[0255] Based on the page pre-embedded file and the form configuration file, the form configuration is performed for each global page element and local page element in the application, and the skin package file of the application is generated.
[0256] In a possible implementation, the processing unit 1102 generates a skin package file of the application based on the second configuration file, for performing the following operations:
[0257] Obtain an image file corresponding to the application, where the image file contains at least one image to be displayed in the application;
[0258] Obtain K page types corresponding to program pages in the application, and use K organization methods to perform K times of structural organization processing on the image file and the second configuration file to generate K skin resources; and package the K skin resources to generate a skin package file of the application; wherein one organization method corresponds to generating one skin resource under one page type, and K is a positive integer; or,
[0259] The image file and the second configuration file are organized in a general structure in a general organization manner to generate a general skin resource; and a skin package file of the application is generated based on the general skin resource.
[0260] In a possible implementation, the target skin package file includes K skin resources, one skin resource is used to indicate the form rendering of a page element in a program page under a page type, and K is a positive integer;
[0261] The processing unit 1102 performs resource loading processing on the target skin package file to perform the following operations:
[0262] During the running of the application, determining the target page type corresponding to the program page displayed by the application, the target page type including: any one of a native page, a cross-end page, and a front-end page;
[0263] According to the target page type, obtaining the target skin resource associated with the target page type from the target skin package file;
[0264] Perform resource loading process on the target skin resource.
[0265] In a possible implementation, the target skin package file includes a universal skin resource, and the universal skin resource is used to indicate the morphological rendering of page elements in program pages under K types of page types, where K is a positive integer;
[0266] The processing unit 1102 performs resource loading processing on the target skin package file to perform the following operations:
[0267] During the running of the application, determining the target page type corresponding to the program page displayed by the application, the target page type including: any one of a native page, a cross-end page, and a front-end page;
[0268] According to the target page type, determine the target program interface in the form switching tool to be called;
[0269] Calling the target program interface to perform resource conversion processing on the general skin resource to obtain the converted skin resource;
[0270] Perform resource loading processing on the converted skin resources.
[0271] In a possible implementation, a form switching tool is deployed in the application, and the form switching tool provides one or more program interfaces, one of which is used to trigger the acquisition of skin resources under a page type; the processing unit 1102 acquires the target skin resource associated with the target page type from the target skin package file according to the target page type, and performs the following operations:
[0272] According to the target page type, determine the target program interface to be called in the form switching tool;
[0273] The target program interface of the form switching tool is called to perform resource parsing processing on the target skin package file to obtain the target skin resource associated with the target page type.
[0274] In a possible implementation, the application supports displaying N program pages, any one of the N program pages is represented as program page i, i and N are both positive integers and 1≤i≤N; the processing unit 1102 performs resource loading processing on the target skin resource to perform the following operations:
[0275] Call the target program interface to perform resource parsing on the target skin resource, and obtain resource objects associated with each of the N program pages in the application program, wherein any resource object is used to indicate the form rendering of the page element under at least one dimension in the corresponding program page;
[0276] According to the resource objects associated with the program page i, a multi-dimensional page element morphology rendering process is performed on the program page i.
[0277] In a possible implementation, the target skin package file also includes a page package file of a specified page type, and the page package file includes a page layout and a display form of a program page displayed according to the specified page type; the processing unit 1102 is further configured to perform the following operations:
[0278] If the target page type is a specified page type, then the page package file of the specified page type is obtained from the target skin package file; the specified page type is a cross-end page or a front-end page;
[0279] Resources are loaded based on the page package file, and the page is displayed in the application according to the page layout and display form indicated by the page package file.
[0280] In a possible implementation, the processing unit 1102 is further configured to perform the following operations:
[0281] During the running of the application, detecting a first running time of the application;
[0282] If the first running time is within the preset time period, a preset skin package file matching the preset time period is obtained from the cloud resource configuration management platform; the preset skin package file is used to provide a specified display mode for the application program within the preset time period;
[0283] Resources are loaded according to a preset skin package file to switch the application from the second display mode to the designated display mode within a preset time period.
[0284] In a possible implementation, after the application is switched from the second display mode to the specified display mode within a preset time period, the processing unit 1102 is further configured to perform the following operations:
[0285] Detecting a second run time of the application;
[0286] If the second running time is not within the preset time period, switching the application from the specified display mode to the second display mode or the first display mode;
[0287] The first display mode refers to: a preset display mode of the application or any display mode.
[0288] In an embodiment of the present application, a skin package file can be provided for an application, and the skin package file is a file used for morphological rendering of multi-dimensional page elements in a program page. Therefore, the morphological switching of page elements (i.e., skinning) can be realized during the operation of the application, thereby meeting the fine-grained skinning requirements; further, since the morphological switching of page elements of a program page can also be performed in multiple dimensions, the present application can also provide a multi-dimensional skinning mode to increase the diversity of skin modes, thereby meeting the flexibility requirements of skinning.
[0289] See also Fig.12 , Fig.121200 is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. The computer device 1200 is used to execute the steps performed by the computer device in the aforementioned method embodiment. The computer device 1200 may include a device (for example, one or more of a server, a node, a terminal, etc.), and may also include components inside the device (for example, a chip, a software module or a hardware module, etc.). The computer device may include at least one processor 1201 and a communication interface 1202. Further, optionally, the computer device may also include at least one memory 1203 and a bus 1204. In addition, the processor 1201, the communication interface 1202 and the memory 1203 are connected via a bus 1204. Wherein:
[0290] (1) The processor 1201 is a module that performs arithmetic operations and / or logical operations, and may specifically be a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor unit (MPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), a complex programmable logic device (CPLD), a coprocessor (to assist the central processing unit in completing corresponding processing and applications), a micro controller unit (MCU), or a combination of multiple processing modules.
[0291] (2) The communication interface 1202 may be used to provide information input or output for at least one processor 1201. And / or, the communication interface 1202 may be used to receive data sent from the outside and / or send data to the outside, and may be a wired link interface including an Ethernet cable, etc., or a wireless link interface (Wi-Fi, Bluetooth, general wireless transmission, vehicle-mounted short-range communication technology, and other short-range wireless communication technologies, etc.). The communication interface 1202 may be used as a network interface.
[0292] (3) The memory 1203 is used to provide a storage space, in which data such as an operating system and a computer program (including program instructions) can be stored. The memory 1203 can be a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), or a portable read-only memory (CD-ROM), etc., or a combination of multiple thereof.
[0293] In specific implementation, the processor 1201 runs the program instructions stored in the memory 1203 to enable the computer device to execute the method steps in the aforementioned embodiments of the present application; in addition, after the computer device executes the method steps in each embodiment through the processor, the effects achieved can be referred to the description of the aforementioned embodiments and will not be repeated here.
[0294] According to one aspect of the present application, an embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, and the computer program includes program instructions. When the processor executes the above program instructions, the method in the corresponding embodiment of the foregoing text can be executed, so it will not be repeated here. For technical details not disclosed in the computer-readable storage medium embodiment involved in the present application, please refer to the description of the method embodiment of the present application. As an example, the program instructions can be deployed on a computer device, or executed on multiple computer devices located at one location, or, executed on multiple computer devices distributed in multiple locations and interconnected by a communication network.
[0295] According to one aspect of the present application, an embodiment of the present application further provides a computer program product, which includes a computer program, and the computer program is stored in a computer-readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device can execute the method in the corresponding embodiment above, so it will not be repeated here. For technical details not disclosed in the computer program product embodiment involved in the present application, please refer to the description of the method embodiment of the present application.
[0296] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product, which includes one or more computer programs. When a computer program is loaded and executed on a computer device, the process or function described in the embodiment of the present application is generated in whole or in part; the computer device may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer program may be stored in a computer-readable storage medium or transmitted via a computer-readable storage medium; the computer program may be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer device can access or a data processing device such as a server or data center that includes one or more available media integration; wherein the available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
[0297] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A page processing method for an application, characterized in that: include: Get at least one skin package file of the application; Any of the skin package files contains skin resources corresponding to the program page in the application program, and the skin resources are used to indicate the form rendering of page elements in at least one dimension of the program page; A skin package file is used to provide a display mode for the application; In the process of displaying the application in the first display mode, obtaining a skin switching instruction for the application, wherein the skin switching instruction is used to instruct to switch the application from the first display mode to a second display mode; Acquire a target skin package file associated with the second display mode from at least one skin package file corresponding to the application; The target skin package file is subjected to resource loading processing to switch the form of page elements in at least one dimension of the program page of the application, and the program page in the application is displayed according to the second display mode.
2. The method according to claim 1, characterized in that The method further comprises: Acquire a morphology configuration file, wherein the morphology configuration file includes at least one element configuration field, and any one of the element configuration fields is used to indicate that morphology configuration is to be performed for a program page in the application program; Obtaining a global page element under at least one global dimension to be configured in the application, wherein the global page element includes: any one or more of an application theme, a page background, a font color, a pop-up window style, and a dividing line color; In the morphology configuration file, respectively configure corresponding morphology parameters for each of the global page elements to generate a first configuration file for the application; A skin package file of the application is generated based on the first configuration file.
3. The method according to claim 2, characterized in that The application supports displaying N program pages, any one of the N program pages is represented as program page i, i and N are both positive integers and 1≤i≤N; the method further includes: Obtaining a local page element under at least one local dimension to be configured in a program page i of the application, wherein the local page element includes: any one or more of a control, a card, an icon, and a text; Based on the first configuration file and the morphology configuration file, respectively configure corresponding morphology parameters for each local page element in the program page i to generate a second configuration file for the application program; A skin package file of the application is generated based on the second configuration file.
4. The method according to claim 3, characterized in that The method further comprises: Constructing a page pre-embedded file for the application, wherein the page pre-embedded file is used to provide configuration permissions for global page elements and local page elements to be configured in the application; Based on the page pre-embedded file and the form configuration file, form configuration is performed for each global page element and local page element in the application program, and a skin package file of the application program is generated.
5. The method according to claim 4, characterized in that The step of generating a skin package file of the application based on the second configuration file comprises: Obtaining a picture file corresponding to the application, wherein the picture file includes at least one picture to be displayed in the application; Obtain K page types corresponding to program pages in the application, and use K organization methods to perform K times of structural organization processing on the image file and the second configuration file to generate K skin resources; and package the K skin resources to generate a skin package file of the application; wherein one organization method corresponds to generating one skin resource under one page type, and K is a positive integer; or, The image file and the second configuration file are organized in a general structure in a general organization manner to generate a general skin resource; and a skin package file of the application is generated based on the general skin resource.
6. The method according to claim 1, characterized in that The target skin package file includes K skin resources, one skin resource is used to indicate the form rendering of a page element in a program page under a page type, and K is a positive integer; The resource loading process for the target skin package file includes: During the running of the application, determining a target page type corresponding to a program page displayed by the application, the target page type including: any one of a native page, a cross-end page, and a front-end page; According to the target page type, acquiring a target skin resource associated with the target page type from the target skin package file; Perform resource loading processing on the target skin resource.
7. The method according to claim 1, characterized in that The target skin package file includes a universal skin resource, and the universal skin resource is used to instruct to perform morphological rendering on page elements in program pages under K types of page types, where K is a positive integer; The resource loading process for the target skin package file includes: During the running of the application, determining a target page type corresponding to a program page displayed by the application, the target page type including: any one of a native page, a cross-end page, and a front-end page; According to the target page type, determining the target program interface in the form switching tool to be called; Calling the target program interface to perform resource conversion processing on the universal skin resource to obtain a converted skin resource; The resource loading process is performed on the converted skin resource.
8. The method according to claim 6, characterized in that The application is deployed with a form switching tool, and the form switching tool provides one or more program interfaces, one of which is used to trigger the acquisition of skin resources under a page type; the acquisition of target skin resources associated with the target page type from the target skin package file according to the target page type includes: According to the target page type, determining the target program interface to be called in the form switching tool; The target program interface of the form switching tool is called to perform resource parsing processing on the target skin package file to obtain the target skin resource associated with the target page type.
9. The method according to claim 7 or 8, characterized in that The application supports displaying N program pages, any one of the N program pages is represented as program page i, i and N are both positive integers and 1≤i≤N; the resource loading process for the target skin resource includes: Calling the target program interface to perform resource parsing processing on the target skin resource, obtaining resource objects associated with each of the N program pages in the application program, wherein any resource object is used to indicate the form rendering of page elements in at least one dimension of the corresponding program page; According to the resource objects associated with the program page i, a multi-dimensional page element form rendering process is performed on the program page i.
10. The method according to claim 9, characterized in that The target skin package file also includes a page package file of a specified page type, and the page package file includes a page layout and a display form of a program page displayed according to the specified page type; The method further comprises: If the target page type is the specified page type, obtaining a page package file of the specified page type from the target skin package file; the specified page type is a cross-end page or a front-end page; Resources are loaded based on the page package file, and pages are displayed in the application according to the page layout and display form indicated by the page package file.
11. The method according to claim 1, characterized in that The method further comprises: During the running of the application, detecting a first running time of the application; If the first running time is within a preset time period, a preset skin package file matching the preset time period is obtained from the cloud resource configuration management platform; the preset skin package file is used to provide a specified display mode for the application within the preset time period; Resources are loaded according to the preset skin package file to switch the application from the second display mode to the designated display mode within the preset time period.
12. The method according to claim 11, characterized in that After the application is switched from the second display mode to the designated display mode within the preset time period, the method further includes: detecting a second running time of the application program; If the second running time is not within the preset time period, switching the application from the designated display mode to the second display mode or the first display mode; The first display mode refers to: a preset display mode or any display mode of the application.
13. A page processing device for an application, characterized in that: include: An acquisition unit, used for acquiring at least one skin package file of an application; Any of the skin package files contains skin resources corresponding to the program page in the application program, and the skin resources are used to indicate the form rendering of page elements in at least one dimension of the program page; A skin package file is used to provide a display mode for the application; a processing unit, configured to obtain a skin switching instruction for the application program in a process of displaying the application program in a first display mode, wherein the skin switching instruction is used to instruct to switch the application program from the first display mode to a second display mode; The acquisition unit is further configured to acquire a target skin package file associated with the second display mode from at least one skin package file corresponding to the application; The processing unit is further used to perform resource loading processing on the target skin package file to switch the form of page elements in at least one dimension of the program page of the application and display the program page in the application according to the second display mode.
14. A computer device, characterized in that: include: Memory and processor; The memory stores one or more computer programs; A processor, configured to load the one or more computer programs to implement the method according to any one of claims 1 to 12.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 12 is performed.
16. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 12 is performed.
