Method and device for processing page
By obtaining and displaying the fragment components of the current page and associated page for the application, the problems of high code coupling, poor flexibility, low versatility and compatibility of the split-screen display method in the prior art are solved, and efficient and flexible split-screen display effect is achieved.
Patent Information
- Application Number
- CN202411697199.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-03-07
AI Technical Summary
The existing methods for processing split-screen display have problems such as high code coupling, poor flexibility, and low versatility and compatibility.
By providing an application with a method and device for processing pages, fragment components of the current page and associated pages are obtained and displayed in a pre-built target page in split-screen mode. This method utilizes plug-ins and split-screen configuration files to improve the automation, versatility and flexibility of split-screen processing.
A general split-screen display method is realized, and the problems of high code coupling, poor flexibility, low versatility and compatibility in the prior art are overcome, and the user experience of the application is improved.
Smart Images

Figure CN119576287A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of application development, and in particular to a method and device for processing pages. Background Art
[0002] As the types of smart devices increase, the screen sizes of smart devices are becoming more and more diverse. For smart devices with larger screens, there is often a demand to display multiple pages on the screen at the same time (split-screen display).
[0003] Existing methods for processing split-screen display can develop page adaptation for a certain application, or achieve the split-screen display effect through the native split-screen function provided by the smart device itself; however, the split-screen display method developed through adaptation has the problems of high code coupling and poor flexibility; and because the native split-screen function of the smart device depends on the implementation solution of the provider of the smart device or the system version of the smart device, it has the problem of low universality and compatibility. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a method and device for processing pages, which can obtain a current page and associated pages displayed in split-screen mode for an application; obtain a pre-built target page; and obtain a first fragment component corresponding to the current page and a second fragment component corresponding to the associated page; display the first fragment component and the second fragment component in split-screen mode on the target page; an embodiment of the present invention provides a universal split-screen display method, which overcomes the problems of high code coupling, poor flexibility, low versatility and compatibility in existing methods for processing split-screen displays.
[0005] To achieve the above-mentioned purpose, according to one aspect of an embodiment of the present invention, a method for processing pages is provided, which is characterized by including: determining that any current page in an application is displayed in split-screen mode, obtaining an associated page displayed simultaneously with the current page; obtaining a pre-built target page; and obtaining a first fragment component corresponding to the current page and a second fragment component corresponding to the associated page; and displaying the first fragment component and the second fragment component in split-screen mode on the target page.
[0006] Optionally, the application is configured with a split-screen configuration file; before obtaining the first fragment component corresponding to the current page and the second fragment component corresponding to the associated page, it further includes: obtaining each page displayed in split-screen mode in the application from the split-screen configuration file; for each page, executing: building a fragment component for the page; obtaining the page code of the page, migrating the page code to the fragment component, and determining the correspondence between the page and the fragment component.
[0007] Optionally, the application is configured with a split-screen configuration file; determining that any current page in the application is displayed in split-screen mode includes: parsing an option switch for the split-screen mode from the split-screen configuration file, and in response to the option switch indicating that it is on, obtaining each group of pages displayed in split-screen mode; in response to the current page belonging to any group of pages, determining that the current page is displayed in split-screen mode.
[0008] Optionally, the page processing method further includes: obtaining page routing information for jumping between different pages in the application; intercepting messages for starting the current page or an associated page; and starting the target page based on the message according to the page routing information between the target page and the current page or the associated page.
[0009] Optionally, the page processing method further includes: monitoring the current life cycle state of each fragment component in the target page; and modifying the life cycle state of each fragment component according to the operation of the target page and / or each fragment component.
[0010] Optionally, the page processing method further includes: obtaining a split-screen configuration file configured for the application; determining, based on the split-screen configuration file, that the application supports embedded split-screen mode, and using a dynamic registration code constructed based on the split-screen configuration information to display the page configured for split-screen mode in the configuration file in embedded split-screen mode.
[0011] Optionally, the page handling method is applied to the plugin.
[0012] To achieve the above object, according to a second aspect of an embodiment of the present invention, a device for processing a page is provided, characterized in that it includes: a page determination module, a component acquisition module and a split-screen display module; wherein,
[0013] The page determination module is used to determine whether any current page in the application is displayed in split-screen mode and obtain the associated pages displayed simultaneously with the current page;
[0014] The component acquisition module is used to acquire the pre-built target page; acquire the first fragment component corresponding to the current page and the second fragment component corresponding to the associated page;
[0015] The split-screen display module is used to display the first fragment component and the second fragment component in a split-screen layout on the target page.
[0016] Optionally, the application is configured with a split-screen configuration file; before obtaining the first fragment component corresponding to the current page and the second fragment component corresponding to the associated page, the device for processing the page is further used to obtain each page displayed in split-screen mode in the application from the split-screen configuration file; for each page, execute: build a fragment component for the page; obtain the page code of the page, migrate the page code to the fragment component, and determine the correspondence between the page and the fragment component.
[0017] Optionally, the application is configured with a split-screen configuration file; a device for processing pages is used to determine that any current page in the application is displayed in split-screen mode, including: parsing an option switch for the split-screen mode from the split-screen configuration file, and in response to the option switch indicating that it is on, obtaining each group of pages displayed in split-screen mode; in response to the current page belonging to any group of pages, determining that the current page is displayed in split-screen mode.
[0018] Optionally, the page processing device is further used to obtain page routing information for jumping between different pages in the application; intercept messages for starting the current page or an associated page; and start the target page based on the message according to the page routing information between the target page and the current page or an associated page.
[0019] Optionally, the page processing device is further used to monitor the current life cycle status of each fragment component in the target page; and modify the life cycle status of each fragment component according to the operation of the displayed target page and / or each fragment component.
[0020] Optionally, the page processing device is further used to obtain a split-screen configuration file configured for the application; based on the split-screen configuration file, it is determined that the application supports embedded split-screen mode, and the page configured to be displayed in split-screen mode in the configuration file is displayed in embedded split-screen mode using a dynamic registration code constructed based on the split-screen configuration information.
[0021] Optionally, the means for page processing is applied to a plug-in.
[0022] To achieve the above-mentioned purpose, according to the third aspect of an embodiment of the present invention, there is provided an electronic device for processing pages, characterized in that it includes: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by one or more processors, the one or more processors implement any one of the methods for processing pages as described above.
[0023] To achieve the above-mentioned purpose, according to a fourth aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, characterized in that when the program is executed by a processor, any of the above-mentioned methods for processing pages is implemented.
[0024] To achieve the above-mentioned purpose, according to a fifth aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, characterized in that when the computer program is executed by a processor, any one of the above-mentioned methods for processing pages is implemented.
[0025] An embodiment of the above invention has the following advantages or beneficial effects: it can obtain the current page and associated pages displayed in split-screen mode for the application; obtain a pre-built target page; and obtain the first fragment component corresponding to the current page and the second fragment component corresponding to the associated page; display the first fragment component and the second fragment component in split-screen mode on the target page; an embodiment of the present invention provides a general split-screen display method, which overcomes the problems of high code coupling, poor flexibility, low versatility and compatibility in existing methods for processing split-screen display.
[0026] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0028] Figure 1 It is a flowchart of a method for processing pages provided by an embodiment of the present invention;
[0029] Figure 2 This is a page schematic diagram provided by an embodiment of the present invention;
[0030] Figure 3 It is a schematic diagram of a process flow of processing a page provided by an embodiment of the present invention;
[0031] Figure 4 is a schematic diagram of another process of processing pages provided by an embodiment of the present invention;
[0032] Figure 5 It is a structural schematic diagram of a device for processing pages provided by an embodiment of the present invention;
[0033] Figure 6 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0034] Figure 7 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0035] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0036] It should be noted that in the technical solution of the present invention, the collection, use, storage, sharing and transfer of user personal information involved are in compliance with the provisions of relevant laws and regulations, and it is necessary to inform the user and obtain the user's consent or authorization. When applicable, the user's personal information is de-identified and / or anonymized and / or encrypted.
[0037] At present, there are more and more large-screen smart devices, such as foldable screen mobile phones and tablets. When the pages of applications are displayed on foldable screens or tablets, the content displayed on the pages is limited and incomplete. In view of this situation, in order to improve the user experience of the application, the application provider can adopt the following split-screen display adaptation method for the page:
[0038] 1) Responsive page: usually refers to creating a user interface that can adapt to different screen sizes and directions. This method requires full consideration of the interactive changes and animation effects of pages under different screen sizes from the product design stage. This method relies on the experience of designers and requires a lot of R&D resources to be invested in adaptation and development during the implementation stage. The overall R&D cost is high, the code coupling is high, and the flexibility is poor.
[0039] 2) Activity embedding: This solution is universal and standardized on the Android system, but it depends on the system version, which means that devices with lower versions cannot support this solution. In addition, this solution also requires adaptation and development, and has the problem of poor flexibility.
[0040] 3) Parallel Vision Split-Screen Mode: This is a split-screen display adaptation function provided by smart device providers (such as mobile phone manufacturers). It fully utilizes the space by displaying two pages on the screen and reduces display anomalies of pages on the large screen. However, this solution depends on whether the smart device itself supports it and has poor versatility.
[0041] In view of this, if Figure 1 As shown, an embodiment of the present invention provides a method for processing a page, which may include the following steps:
[0042] Step S101: Determine that any current page in the application is displayed in split-screen mode, and obtain an associated page displayed simultaneously with the current page.
[0043] Specifically, the embodiment of the present invention implements the method for processing pages by using a plug-in, that is, the method for processing pages provided by the embodiment of the present invention is applied to a plug-in.
[0044] Furthermore, the embodiment of the present invention reads the split-screen configuration file after the application is started; wherein the split-screen configuration file contains configuration information for the split-screen page of the application, including line selection switches for different types of split-screen models; and two (or more) pages displayed simultaneously in the split-screen page, and the pages displayed simultaneously are, for example, the current page and the associated page. For example: use the logicEntities.body.activityPairs parameter to configure a group of pages displayed in split screens. Usually, one page corresponds to an activity component. The activity component is used as a container. The content of the page can be drawn directly on the activity component, or the page content can be drawn on the fragment component (fragment) and then tiled in the activity.
[0045] Furthermore, when any page is loaded, the split-screen configuration file is used to determine whether the page needs to be displayed in split-screen mode. If so, subsequent split-screen mode processing operations are performed; that is, the application is configured with a split-screen configuration file; determining that any current page in the application is displayed in split-screen mode includes: parsing the option switch for the split-screen mode from the split-screen configuration file, and in response to the option switch indicating that it is on, obtaining each group of pages displayed in split-screen mode; in response to the current page belonging to any group of pages, determining that the current page is displayed in split-screen mode.
[0046] The embodiments of the present invention can be applied to any smart device through plug-ins and split-screen configuration files, thereby improving the automation, versatility and flexibility of page processing for split-screen and reducing the manpower and time costs for page split-screen processing.
[0047] Step S102: Obtain a pre-built target page; and obtain a first fragment component corresponding to the current page and a second fragment component corresponding to the associated page.
[0048] Specifically, the method for displaying in split-screen mode in an embodiment of the present invention is as follows: construct a target page, and pre-construct a fragment component (fragment) of each split-screen displayed page. In an embodiment of the present invention, a page represents the content displayed on the page, and also represents the activity component bound to the page. Further, obtain a first fragment component corresponding to the current page and a second fragment component corresponding to the associated page, so as to display the first fragment component and the second fragment component in split-screen mode.
[0049] Figure 2 A schematic diagram showing a split-screen mode page.
[0050] like Figure 2 As shown, the target page 200 includes two fragment components, the left side is the first fragment component (current page), and the right side is the second fragment component (associated page); it can be understood that the relative positions of two or more fragment components in the target page can be configured through the split-screen configuration file, for example: up and down relationship, left and right relationship, stacking relationship, etc.
[0051] It can be seen that the embodiment of the present invention constructs a corresponding fragment component for each split-screen displayed page, and copies the page code of the page (activity) to the fragment component, so that the content displayed by the fragment component and the jump relationship of the page are consistent with the page, and the split-screen display is realized by inserting the fragment component into the target page, thereby improving the versatility of the split-screen display.
[0052] That is, the application is configured with a split-screen configuration file; before obtaining the first fragment component corresponding to the current page and the second fragment component corresponding to the associated page, it further includes: obtaining each page displayed in split-screen mode in the application from the split-screen configuration file; for each page, executing: building a fragment component for the page; obtaining the page code of the page, migrating the page code to the fragment component, and determining the correspondence between the page and the fragment component.
[0053] Step S103: Display the first fragment component and the second fragment component on the target page in a split-screen mode.
[0054] Specifically, Figure 2 Taking the schematic diagram of split-screen display as an example, the embodiment of the present invention achieves the effect of split-screen display by combining the target page with the first fragment component and the second fragment component.
[0055] Furthermore, the embodiment of the present invention manages the jump and life cycle status of two fragment components displayed in the split-screen mode.
[0056] Specifically, for page jumps, obtain page routing information for jumps between different pages in the application; intercept messages for starting the current page or associated pages; and start the target page based on the message according to the page routing information between the target page and the current page or associated page. Among them, obtain page routing information for jumps between different pages in the application in advance; and modify the original page routing information according to the split-screen processing to form new page routing information. For example, the current page and the associated page are displayed in the style of fragment components respectively. Therefore, the call (for example, display) of the current page and the associated page needs to be processed by the target page instead of the original current page or associated page.
[0057] In the case where the current page or associated page jumps to other pages, for example, the current page on the left jumps to other pages, the fragment components corresponding to the other pages are obtained, and the fragment components corresponding to the other pages are used to replace the fragment components of the current page. The fragment components corresponding to the associated page on the right can also be moved to the left, and the page after the jump is displayed on the right; the movement options before the slice group components (move or not move, moving direction, etc.) can be configured in the split-screen configuration file.
[0058] Furthermore, the current life cycle state of each fragment component in the target page is monitored; according to the operation of the target page and / or each fragment component, the life cycle state of each fragment component is modified respectively. Specifically, since the two fragment components exist in the same target page, the two fragment components receive the same message, resulting in an abnormality in the life cycle state; for example: when operating the fragment component on the left, the fragment component on the right is processed as an inactive state (a life cycle state), that is, the life cycle state of each fragment component is modified. For another example: when the target page returns to the foreground, determine whether the page most recently operated by the current user is the first fragment component or the second fragment component, and modify the life cycle state of the corresponding page (fragment component) through the reference relationship held by the target page.
[0059] like Figure 3 As shown, an embodiment of the present invention provides a method for processing a page, which may include the following steps:
[0060] Step S301: Application compilation.
[0061] Step S302: Determine whether there is a split-screen configuration file; if so, execute step S303, otherwise confirm that the application does not support the page split-screen method of the embodiment of the present invention, and continue to compile and generate the installation package.
[0062] Step S303: Determine whether the split-screen configuration file is legal and verify the legality of the split-screen configuration file. If it passes the verification, execute step S304, otherwise continue to compile and generate the installation package. The execution of this step improves the security of the application.
[0063] Step S304: confirm that the split-screen configuration file has the format of a parallel vision split-screen; wherein the parallel world split-screen model corresponds to a configuration file, and an embodiment of the present invention constructs the split-screen configuration file as a parallel vision split-screen configuration file, providing the versatility of the configuration file, and the present invention does not limit the format and specific content of the split-screen configuration file.
[0064] Step S305: parse the split-screen configuration file to determine whether the function switch of the embedded split-screen conversion is turned on. If it is turned on, execute step S306; otherwise, execute step S307.
[0065] Step S306: Convert the information according to the configuration file into an embedded split-screen code and insert it into the code. That is, obtain the split-screen configuration file configured by the application; determine that the application supports the embedded split-screen mode according to the split-screen configuration file, and use the dynamic registration code constructed based on the split-screen configuration information to display the page configured for the split-screen mode in the allocation configuration file in the embedded split-screen mode.
[0066] Step S307: parse the split-screen configuration file to determine whether to start the split-screen plug-in of the present invention (determined by the switch option in the split-screen configuration file). If yes, execute step S308; otherwise, execute step S311.
[0067] Step S308: converting the pages that are allowed to be split into fragment components according to the configuration file.
[0068] Step S309: convert the original page jump relationship into a new routing table, and insert a new jump method into the original code.
[0069] Step S310: insert the fragment component into the original page container component, that is, determine the corresponding relationship between the page and the fragment component.
[0070] Step S311: Generate an application installation package.
[0071] According to the description of step S301 to step S311, the embodiment of the present invention automatically generates relevant codes during application compilation through ASM technology, without manual development. Code for split screen processing is added through ASM technology (ASM is a general Java bytecode operation and analysis framework, which can be used to modify existing classes or dynamically generate classes directly in binary form; ASM provides some common bytecode conversion and analysis algorithms, from which customized complex conversion and code analysis tools can be built).
[0072] The embodiment of the present invention can also determine whether the functions of the parallel view and embedded split-screen mode in the split-screen configuration file are enabled (supported). If enabled, the corresponding split-screen processing solution method is executed.
[0073] The embodiment of the present invention can automatically generate a dynamic registration code corresponding to the activity embedding scheme according to a configuration file when parallel view is not supported but an embedded split-screen mode (activity embedding) is supported, so that the application can use the split-screen capability of the system.
[0074] Furthermore, when it is determined that both the parallel view and the activity embedding cannot be supported, the split-screen mode (compatible solution) provided by the embodiment of the present invention is used to achieve the split-screen effect.
[0075] Furthermore, the embodiment of the present invention extracts the original page (activity) into a fragment component (fragment), and uses the target page (activity) to nest the fragment page, so that the framework can manage the life cycle and related calls, and convert the original behavior of opening the activity page into opening the fragment page in the split-screen activity page through the routing table capability. And by retaining the original activity page and intercepting the behavior, it is ensured that if an external application calls directly through the activity page name path, it can find the correct page and jump.
[0076] It is understandable that the method of the embodiment of the present invention can also directly use the target page and fragment components of the present invention to achieve split-screen display without determining whether the smart device supports parallel views and / or embedded split-screen models.
[0077] like Figure 4 As shown, an embodiment of the present invention provides a method for processing a page, which may include the following steps:
[0078] Step S401: Application starts.
[0079] Step S402: Determine whether parallel vision is supported and enabled according to the split-screen configuration file; if so, execute step S403; otherwise, execute step S404.
[0080] Step S403: Display the page using the parallel view split screen mode.
[0081] Step S404: Determine whether the system supports the embedded split-screen mode according to the split-screen configuration file; if so, execute step S405; otherwise, execute step S406.
[0082] Step S405: Start the split-screen adaptation code inserted during the application compilation phase.
[0083] Step S406: Determine whether to enable the customized split-screen mode provided by the embodiment of the present invention according to the split-screen configuration file; if yes, execute step S407; otherwise, execute step S408.
[0084] Step S407: Obtain a pre-built target page; obtain a first fragment component corresponding to the current page and a second fragment component corresponding to the associated page; and display the first fragment component and the second fragment component on the target page in a split-screen mode.
[0085] Step S408: Display the page normally (ie, not split-screen display).
[0086] Step S401 to step S408 describe that after the application is started, the plug-in is used to determine whether the smart device where the application is located supports parallel vision and embedded split-screen through the split-screen configuration file. When neither of the above two modes is supported, the custom split-screen mode provided by the embodiment of the present invention is used to improve the flexibility and versatility of processing the split-screen mode, thereby improving the user experience of the application.
[0087] like Figure 5 As shown, an embodiment of the present invention provides a device 500 for processing a page, including: a page determination module 501, a component acquisition module 502 and a split-screen display module 503; wherein,
[0088] The page determination module 501 is used to determine whether any current page in the application is displayed in split-screen mode, and obtain an associated page displayed simultaneously with the current page;
[0089] The component acquisition module 502 is used to acquire a pre-built target page; acquire a first fragment component corresponding to the current page and a second fragment component corresponding to the associated page;
[0090] The split-screen display module 503 is used to display the first fragment component and the second fragment component in a split-screen layout on the target page.
[0091] An embodiment of the present invention also provides an electronic device for processing pages, including: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by one or more processors, the one or more processors implement the method provided in any of the above embodiments.
[0092] An embodiment of the present invention further provides a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the method provided in any of the above embodiments is implemented.
[0093] An embodiment of the present invention further provides a computer program product, including a computer program, and when the computer program is executed by a processor, any one of the above-mentioned methods for processing pages is implemented.
[0094] Figure 6 An exemplary system architecture 600 is shown to which the method for processing pages or the apparatus for processing pages according to the embodiments of the present invention can be applied.
[0095] like Figure 6 As shown, system architecture 600 may include terminal devices 601, 602, 603, network 604 and server 605. Network 604 is used to provide a medium for communication links between terminal devices 601, 602, 603 and server 605. Network 604 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0096] Users can use terminal devices 601, 602, 603 to interact with server 605 through network 604 to receive or send messages, etc. Various client applications can be installed on terminal devices 601, 602, 603, such as electronic shopping mall client applications, web browser applications, search applications, instant messaging tools, and email clients.
[0097] The terminal devices 601 , 602 , and 603 may be various electronic devices having a display screen and supporting various client applications, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0098] The server 605 may be a server that provides various services, such as a background management server that provides support for client applications used by users using the terminal devices 601, 602, and 603. The background management server may store the received split-screen configuration files corresponding to different applications, and send the corresponding split-screen configuration files to the terminal device running the application.
[0099] It should be noted that the method for processing pages provided in the embodiment of the present invention is generally executed by the terminal devices 601 , 602 , and 603 . Accordingly, the apparatus for processing pages is generally disposed in the terminal devices 601 , 602 , and 603 .
[0100] It should be understood that Figure 6 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.
[0101] Reference below Figure 7 , which shows a schematic diagram of the structure of a computer system 700 of a terminal device suitable for implementing an embodiment of the present invention. Figure 7 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0102] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0103] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.
[0104] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the central processing unit (CPU) 701, the above-mentioned functions defined in the system of the present invention are executed.
[0105] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0106] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0107] The modules and / or units involved in the embodiments of the present invention may be implemented in software or hardware. The modules and / or units described may also be provided in a processor. For example, they may be described as follows: a processor includes a page determination module, a component acquisition module, and a split-screen display module. The names of these modules do not, in some cases, constitute limitations on the modules themselves. For example, the page determination module may also be described as a "module for determining pages displayed in split-screen mode in an application."
[0108] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: determining that any current page in the application is displayed in split-screen mode, obtaining an associated page displayed simultaneously with the current page; obtaining a pre-built target page; and obtaining a first fragment component corresponding to the current page and a second fragment component corresponding to the associated page; and displaying the first fragment component and the second fragment component in split-screen mode on the target page.
[0109] An embodiment of the present invention obtains a current page and associated pages displayed in split-screen mode for an application; obtains a pre-built target page; and obtains a first fragment component corresponding to the current page and a second fragment component corresponding to the associated page; and displays the first fragment component and the second fragment component in split-screen mode on the target page; an embodiment of the present invention provides a universal split-screen display method, which overcomes the problems of high code coupling, poor flexibility, low versatility and compatibility in existing methods for processing split-screen display.
[0110] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for processing a page, characterized in that: include: Determine that any current page in the application is displayed in split-screen mode, and obtain an associated page displayed simultaneously with the current page; Get pre-built landing pages; and obtaining a first fragment component corresponding to the current page and a second fragment component corresponding to the associated page; The first fragment component and the second fragment component are displayed on the target page in a split-screen mode.
2. The method according to claim 1, characterized in that The application is configured with a split-screen configuration file; Before obtaining the first fragment component corresponding to the current page and the second fragment component corresponding to the associated page, the method further includes: Obtaining, from the split-screen configuration file, each page displayed in the split-screen mode of the application; For each page, execute: Building a fragment component for said page; The page code of the page is obtained, the page code is migrated to the fragment component, and the corresponding relationship between the page and the fragment component is determined.
3. The method according to claim 1, characterized in that The application is configured with a split-screen configuration file; The step of determining that any current page in the application is displayed in split-screen mode includes: parsing an option switch for the split-screen mode from the split-screen configuration file, and in response to the option switch indicating that it is turned on, acquiring each group of pages displayed in the split-screen mode; In response to the current page belonging to any group of pages, it is determined that the current page is displayed in a split-screen mode.
4. The method according to claim 1, characterized in that Further including: Obtain page routing information for jumping between different pages in the application; Intercepting a message for launching the current page or the associated page; The target page is started based on the message according to page routing information between the target page and the current page or the associated page.
5. The method according to claim 1, characterized in that Further including: Monitoring the current life cycle status of each of the fragment components in the target page; According to the operation conditions on the target page and / or each of the fragment components, the life cycle state of each of the fragment components is modified respectively.
6. The method according to claim 1, characterized in that Further including: Obtaining a split-screen configuration file configured by the application; According to the split-screen configuration file, it is determined that the application supports the embedded split-screen mode, and the page configured for split-screen mode display in the allocation configuration file is displayed in the embedded split-screen mode using a dynamic registration code constructed based on the split-screen configuration information.
7. The method according to claim 1, characterized in that Applies to plugins.
8. A device for processing pages, characterized in that: include: Determine the page module, obtain the component module and the split-screen display module; wherein, The page determination module is used to determine whether any current page in the application is displayed in split-screen mode, and obtain an associated page displayed simultaneously with the current page; The component acquisition module is used to acquire a pre-built target page; acquire a first fragment component corresponding to the current page and a second fragment component corresponding to the associated page; The split-screen display module is used to display the first fragment component and the second fragment component on the target page in a split-screen layout.
9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
11. A computer program product, comprising a computer program, characterized in that When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.